@teselagen/ui 0.7.32 → 0.7.33-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DataTable/utils/filterLocalEntitiesToHasura.d.ts +5 -0
- package/DataTable/utils/initializeHasuraWhereAndFilter.d.ts +2 -0
- package/DataTable/utils/queryParams.d.ts +8 -12
- package/DataTable/utils/simplifyHasuraWhere.d.ts +1 -0
- package/DataTable/utils/tableQueryParamsToHasuraClauses.d.ts +14 -0
- package/{src/DataTable/FilterAndSortMenu.js → FilterAndSortMenu.js} +27 -30
- package/filterLocalEntitiesToHasura.js +216 -0
- package/index.cjs.js +695 -967
- package/index.d.ts +1 -0
- package/index.es.js +695 -967
- package/initializeHasuraWhereAndFilter.js +27 -0
- package/{src/utils/isBeingCalledExcessively.js → isBeingCalledExcessively.js} +0 -1
- package/package.json +1 -1
- package/queryParams.js +336 -0
- package/simplifyHasuraWhere.js +80 -0
- package/tableQueryParamsToHasuraClauses.js +113 -0
- package/{src/DataTable/utils/withTableParams.js → withTableParams.js} +1 -14
- package/src/AdvancedOptions.spec.js +0 -26
- package/src/AsyncValidateFieldSpinner/index.js +0 -12
- package/src/BlueprintError/index.js +0 -14
- package/src/BounceLoader/index.js +0 -16
- package/src/BounceLoader/style.css +0 -45
- package/src/CollapsibleCard/index.js +0 -68
- package/src/CollapsibleCard/style.css +0 -23
- package/src/DNALoader/index.js +0 -20
- package/src/DNALoader/style.css +0 -251
- package/src/DataTable/index.js +0 -3213
- package/src/DataTable/style.css +0 -608
- package/src/DataTable/utils/index.js +0 -55
- package/src/DataTable/utils/queryParams.js +0 -1058
- package/src/DialogFooter/index.js +0 -86
- package/src/DialogFooter/style.css +0 -9
- package/src/FormComponents/index.js +0 -1266
- package/src/FormComponents/style.css +0 -275
- package/src/FormComponents/utils.js +0 -6
- package/src/HotkeysDialog/index.js +0 -79
- package/src/HotkeysDialog/style.css +0 -54
- package/src/InfoHelper/index.js +0 -78
- package/src/InfoHelper/style.css +0 -7
- package/src/IntentText/index.js +0 -18
- package/src/Loading/index.js +0 -70
- package/src/Loading/style.css +0 -4
- package/src/MenuBar/index.js +0 -423
- package/src/MenuBar/style.css +0 -45
- package/src/PromptUnsavedChanges/index.js +0 -38
- package/src/ResizableDraggableDialog/index.js +0 -141
- package/src/ResizableDraggableDialog/style.css +0 -42
- package/src/ScrollToTop/index.js +0 -72
- package/src/TagSelect/index.js +0 -69
- package/src/TagSelect/style.css +0 -13
- package/src/TgHtmlSelect/index.js +0 -20
- package/src/TgSelect/index.js +0 -537
- package/src/TgSelect/style.css +0 -61
- package/src/TgSuggest/index.js +0 -124
- package/src/Timeline/index.js +0 -15
- package/src/enhancers/withDialog/index.js +0 -196
- package/src/index.js +0 -87
- package/src/showConfirmationDialog/index.js +0 -148
- package/src/style.css +0 -265
- /package/{src/AdvancedOptions.js → AdvancedOptions.js} +0 -0
- /package/{src/AssignDefaultsModeContext.js → AssignDefaultsModeContext.js} +0 -0
- /package/{src/DataTable/CellDragHandle.js → CellDragHandle.js} +0 -0
- /package/{src/DataTable/ColumnFilterMenu.js → ColumnFilterMenu.js} +0 -0
- /package/{src/DataTable/Columns.js → Columns.js} +0 -0
- /package/{src/DataTable/DisabledLoadingComponent.js → DisabledLoadingComponent.js} +0 -0
- /package/{src/DataTable/DisplayOptions.js → DisplayOptions.js} +0 -0
- /package/{src/DropdownButton.js → DropdownButton.js} +0 -0
- /package/{src/DataTable/DropdownCell.js → DropdownCell.js} +0 -0
- /package/{src/DataTable/EditableCell.js → EditableCell.js} +0 -0
- /package/{src/FillWindow.css → FillWindow.css} +0 -0
- /package/{src/FillWindow.js → FillWindow.js} +0 -0
- /package/{src/FormComponents/FormSeparator.js → FormSeparator.js} +0 -0
- /package/{src/FormComponents/LoadingDots.js → LoadingDots.js} +0 -0
- /package/{src/MatchHeaders.js → MatchHeaders.js} +0 -0
- /package/{src/DataTable/PagingTool.js → PagingTool.js} +0 -0
- /package/{src/DataTable/RenderCell.js → RenderCell.js} +0 -0
- /package/{src/DataTable/SearchBar.js → SearchBar.js} +0 -0
- /package/{src/SimpleStepViz.js → SimpleStepViz.js} +0 -0
- /package/{src/DataTable/SortableColumns.js → SortableColumns.js} +0 -0
- /package/{src/DataTable/TableFormTrackerContext.js → TableFormTrackerContext.js} +0 -0
- /package/{src/Tag.js → Tag.js} +0 -0
- /package/{src/DataTable/ThComponent.js → ThComponent.js} +0 -0
- /package/{src/Timeline/TimelineEvent.js → TimelineEvent.js} +0 -0
- /package/{src/UploadCsvWizard.css → UploadCsvWizard.css} +0 -0
- /package/{src/UploadCsvWizard.js → UploadCsvWizard.js} +0 -0
- /package/{src/FormComponents/Uploader.js → Uploader.js} +0 -0
- /package/{src/utils/adHoc.js → adHoc.js} +0 -0
- /package/{src/autoTooltip.js → autoTooltip.js} +0 -0
- /package/{src/utils/basicHandleActionsWithFullState.js → basicHandleActionsWithFullState.js} +0 -0
- /package/{src/utils/browserUtils.js → browserUtils.js} +0 -0
- /package/{src/utils/combineReducersWithFullState.js → combineReducersWithFullState.js} +0 -0
- /package/{src/utils/commandControls.js → commandControls.js} +0 -0
- /package/{src/utils/commandUtils.js → commandUtils.js} +0 -0
- /package/{src/constants.js → constants.js} +0 -0
- /package/{src/DataTable/utils/convertSchema.js → convertSchema.js} +0 -0
- /package/{src/customIcons.js → customIcons.js} +0 -0
- /package/{src/DataTable/dataTableEnhancer.js → dataTableEnhancer.js} +0 -0
- /package/{src/DataTable/defaultFormatters.js → defaultFormatters.js} +0 -0
- /package/{src/DataTable/defaultValidators.js → defaultValidators.js} +0 -0
- /package/{src/utils/determineBlackOrWhiteTextColor.js → determineBlackOrWhiteTextColor.js} +0 -0
- /package/{src/DataTable/editCellHelper.js → editCellHelper.js} +0 -0
- /package/{src/DataTable/utils/formatPasteData.js → formatPasteData.js} +0 -0
- /package/{src/DataTable/utils/getAllRows.js → getAllRows.js} +0 -0
- /package/{src/DataTable/utils/getCellCopyText.js → getCellCopyText.js} +0 -0
- /package/{src/DataTable/utils/getCellInfo.js → getCellInfo.js} +0 -0
- /package/{src/DataTable/getCellVal.js → getCellVal.js} +0 -0
- /package/{src/utils/getDayjsFormatter.js → getDayjsFormatter.js} +0 -0
- /package/{src/DataTable/utils/getFieldPathToField.js → getFieldPathToField.js} +0 -0
- /package/{src/DataTable/utils/getIdOrCodeOrIndex.js → getIdOrCodeOrIndex.js} +0 -0
- /package/{src/DataTable/utils/getLastSelectedEntity.js → getLastSelectedEntity.js} +0 -0
- /package/{src/DataTable/utils/getNewEntToSelect.js → getNewEntToSelect.js} +0 -0
- /package/{src/FormComponents/getNewName.js → getNewName.js} +0 -0
- /package/{src/DataTable/utils/getRowCopyText.js → getRowCopyText.js} +0 -0
- /package/{src/DataTable/utils/getTableConfigFromStorage.js → getTableConfigFromStorage.js} +0 -0
- /package/{src/utils/getTextFromEl.js → getTextFromEl.js} +0 -0
- /package/{src/DataTable/getVals.js → getVals.js} +0 -0
- /package/{src/DataTable/utils/handleCopyColumn.js → handleCopyColumn.js} +0 -0
- /package/{src/DataTable/utils/handleCopyHelper.js → handleCopyHelper.js} +0 -0
- /package/{src/DataTable/utils/handleCopyRows.js → handleCopyRows.js} +0 -0
- /package/{src/DataTable/utils/handleCopyTable.js → handleCopyTable.js} +0 -0
- /package/{src/utils/handlerHelpers.js → handlerHelpers.js} +0 -0
- /package/{src/utils/hotkeyUtils.js → hotkeyUtils.js} +0 -0
- /package/{src/utils/hooks/index.js → index.js} +0 -0
- /package/{src/DataTable/utils/isBottomRightCornerOfRectangle.js → isBottomRightCornerOfRectangle.js} +0 -0
- /package/{src/DataTable/utils/isEntityClean.js → isEntityClean.js} +0 -0
- /package/{src/DataTable/isTruthy.js → isTruthy.js} +0 -0
- /package/{src/DataTable/isValueEmpty.js → isValueEmpty.js} +0 -0
- /package/{src/FormComponents/itemUpload.js → itemUpload.js} +0 -0
- /package/{src/utils/menuUtils.js → menuUtils.js} +0 -0
- /package/{src/utils/popoverOverflowModifiers.js → popoverOverflowModifiers.js} +0 -0
- /package/{src/DataTable/utils/primarySelectedValue.js → primarySelectedValue.js} +0 -0
- /package/{src/utils/pureNoFunc.js → pureNoFunc.js} +0 -0
- /package/{src/DataTable/utils/removeCleanRows.js → removeCleanRows.js} +0 -0
- /package/{src/utils/renderOnDoc.js → renderOnDoc.js} +0 -0
- /package/{src/rerenderOnWindowResize.js → rerenderOnWindowResize.js} +0 -0
- /package/{src/DataTable/utils/rowClick.js → rowClick.js} +0 -0
- /package/{src/DataTable/utils/selection.js → selection.js} +0 -0
- /package/{src/showAppSpinner.js → showAppSpinner.js} +0 -0
- /package/{src/showDialogOnDocBody.js → showDialogOnDocBody.js} +0 -0
- /package/{src/utils/showProgressToast.js → showProgressToast.js} +0 -0
- /package/{src/FormComponents/sortify.js → sortify.js} +0 -0
- /package/{src/Timeline/style.css → style.css} +0 -0
- /package/{src/utils/tagUtils.js → tagUtils.js} +0 -0
- /package/{src/utils/tgFormValues.js → tgFormValues.js} +0 -0
- /package/{src/enhancers/withDialog/tg_modalState.js → tg_modalState.js} +0 -0
- /package/{src/throwFormError.js → throwFormError.js} +0 -0
- /package/{src/toastr.js → toastr.js} +0 -0
- /package/{src/FormComponents/tryToMatchSchemas.js → tryToMatchSchemas.js} +0 -0
- /package/{src/typeToCommonType.js → typeToCommonType.js} +0 -0
- /package/{src/utils/hooks/useDeepEqualMemo.js → useDeepEqualMemo.js} +0 -0
- /package/{src/useDialog.js → useDialog.js} +0 -0
- /package/{src/utils/hooks/useStableReference.js → useStableReference.js} +0 -0
- /package/{src/DataTable/utils/useTableEntities.js → useTableEntities.js} +0 -0
- /package/{src/utils/useTraceUpdate.js → useTraceUpdate.js} +0 -0
- /package/{src/DataTable/utils/utils.js → utils.js} +0 -0
- /package/{src/DataTable/validateTableWideErrors.js → validateTableWideErrors.js} +0 -0
- /package/{src/DataTable/viewColumn.js → viewColumn.js} +0 -0
- /package/{src/enhancers/withField.js → withField.js} +0 -0
- /package/{src/enhancers/withFields.js → withFields.js} +0 -0
- /package/{src/enhancers/withLocalStorage.js → withLocalStorage.js} +0 -0
- /package/{src/utils/withSelectTableRecords.js → withSelectTableRecords.js} +0 -0
- /package/{src/DataTable/utils/withSelectedEntities.js → withSelectedEntities.js} +0 -0
- /package/{src/utils/withStore.js → withStore.js} +0 -0
- /package/{src/wrapDialog.js → wrapDialog.js} +0 -0
package/index.es.js
CHANGED
|
@@ -5774,12 +5774,12 @@ var freeGlobal = typeof global == "object" && global && global.Object === Object
|
|
|
5774
5774
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
5775
5775
|
var root$4 = freeGlobal || freeSelf || Function("return this")();
|
|
5776
5776
|
var Symbol$1 = root$4.Symbol;
|
|
5777
|
-
var objectProto$
|
|
5778
|
-
var hasOwnProperty$
|
|
5779
|
-
var nativeObjectToString$2 = objectProto$
|
|
5777
|
+
var objectProto$i = Object.prototype;
|
|
5778
|
+
var hasOwnProperty$f = objectProto$i.hasOwnProperty;
|
|
5779
|
+
var nativeObjectToString$2 = objectProto$i.toString;
|
|
5780
5780
|
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
5781
5781
|
function getRawTag(value) {
|
|
5782
|
-
var isOwn = hasOwnProperty$
|
|
5782
|
+
var isOwn = hasOwnProperty$f.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
5783
5783
|
try {
|
|
5784
5784
|
value[symToStringTag$1] = void 0;
|
|
5785
5785
|
var unmasked = true;
|
|
@@ -5796,8 +5796,8 @@ function getRawTag(value) {
|
|
|
5796
5796
|
return result;
|
|
5797
5797
|
}
|
|
5798
5798
|
__name(getRawTag, "getRawTag");
|
|
5799
|
-
var objectProto$
|
|
5800
|
-
var nativeObjectToString$1 = objectProto$
|
|
5799
|
+
var objectProto$h = Object.prototype;
|
|
5800
|
+
var nativeObjectToString$1 = objectProto$h.toString;
|
|
5801
5801
|
function objectToString(value) {
|
|
5802
5802
|
return nativeObjectToString$1.call(value);
|
|
5803
5803
|
}
|
|
@@ -5944,11 +5944,11 @@ function toSource(func) {
|
|
|
5944
5944
|
__name(toSource, "toSource");
|
|
5945
5945
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
5946
5946
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
5947
|
-
var funcProto$1 = Function.prototype, objectProto$
|
|
5947
|
+
var funcProto$1 = Function.prototype, objectProto$g = Object.prototype;
|
|
5948
5948
|
var funcToString$1 = funcProto$1.toString;
|
|
5949
|
-
var hasOwnProperty$
|
|
5949
|
+
var hasOwnProperty$e = objectProto$g.hasOwnProperty;
|
|
5950
5950
|
var reIsNative = RegExp(
|
|
5951
|
-
"^" + funcToString$1.call(hasOwnProperty$
|
|
5951
|
+
"^" + funcToString$1.call(hasOwnProperty$e).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
5952
5952
|
);
|
|
5953
5953
|
function baseIsNative(value) {
|
|
5954
5954
|
if (!isObject$2(value) || isMasked(value)) {
|
|
@@ -6121,11 +6121,11 @@ function eq$1(value, other) {
|
|
|
6121
6121
|
return value === other || value !== value && other !== other;
|
|
6122
6122
|
}
|
|
6123
6123
|
__name(eq$1, "eq$1");
|
|
6124
|
-
var objectProto$
|
|
6125
|
-
var hasOwnProperty$
|
|
6124
|
+
var objectProto$f = Object.prototype;
|
|
6125
|
+
var hasOwnProperty$d = objectProto$f.hasOwnProperty;
|
|
6126
6126
|
function assignValue(object2, key, value) {
|
|
6127
6127
|
var objValue = object2[key];
|
|
6128
|
-
if (!(hasOwnProperty$
|
|
6128
|
+
if (!(hasOwnProperty$d.call(object2, key) && eq$1(objValue, value)) || value === void 0 && !(key in object2)) {
|
|
6129
6129
|
baseAssignValue(object2, key, value);
|
|
6130
6130
|
}
|
|
6131
6131
|
}
|
|
@@ -6149,11 +6149,11 @@ function copyObject(source, props, object2, customizer) {
|
|
|
6149
6149
|
return object2;
|
|
6150
6150
|
}
|
|
6151
6151
|
__name(copyObject, "copyObject");
|
|
6152
|
-
var nativeMax$
|
|
6152
|
+
var nativeMax$3 = Math.max;
|
|
6153
6153
|
function overRest(func, start2, transform) {
|
|
6154
|
-
start2 = nativeMax$
|
|
6154
|
+
start2 = nativeMax$3(start2 === void 0 ? func.length - 1 : start2, 0);
|
|
6155
6155
|
return function() {
|
|
6156
|
-
var args = arguments, index2 = -1, length = nativeMax$
|
|
6156
|
+
var args = arguments, index2 = -1, length = nativeMax$3(args.length - start2, 0), array2 = Array(length);
|
|
6157
6157
|
while (++index2 < length) {
|
|
6158
6158
|
array2[index2] = args[start2 + index2];
|
|
6159
6159
|
}
|
|
@@ -6210,9 +6210,9 @@ function createAssigner(assigner) {
|
|
|
6210
6210
|
});
|
|
6211
6211
|
}
|
|
6212
6212
|
__name(createAssigner, "createAssigner");
|
|
6213
|
-
var objectProto$
|
|
6213
|
+
var objectProto$e = Object.prototype;
|
|
6214
6214
|
function isPrototype(value) {
|
|
6215
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$
|
|
6215
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$e;
|
|
6216
6216
|
return value === proto;
|
|
6217
6217
|
}
|
|
6218
6218
|
__name(isPrototype, "isPrototype");
|
|
@@ -6229,13 +6229,13 @@ function baseIsArguments(value) {
|
|
|
6229
6229
|
return isObjectLike$1(value) && baseGetTag(value) == argsTag$3;
|
|
6230
6230
|
}
|
|
6231
6231
|
__name(baseIsArguments, "baseIsArguments");
|
|
6232
|
-
var objectProto$
|
|
6233
|
-
var hasOwnProperty$
|
|
6234
|
-
var propertyIsEnumerable$1 = objectProto$
|
|
6232
|
+
var objectProto$d = Object.prototype;
|
|
6233
|
+
var hasOwnProperty$c = objectProto$d.hasOwnProperty;
|
|
6234
|
+
var propertyIsEnumerable$1 = objectProto$d.propertyIsEnumerable;
|
|
6235
6235
|
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
6236
6236
|
return arguments;
|
|
6237
6237
|
}()) ? baseIsArguments : function(value) {
|
|
6238
|
-
return isObjectLike$1(value) && hasOwnProperty$
|
|
6238
|
+
return isObjectLike$1(value) && hasOwnProperty$c.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
6239
6239
|
};
|
|
6240
6240
|
function stubFalse() {
|
|
6241
6241
|
return false;
|
|
@@ -6278,12 +6278,12 @@ var nodeUtil = function() {
|
|
|
6278
6278
|
}();
|
|
6279
6279
|
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
6280
6280
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
6281
|
-
var objectProto$
|
|
6282
|
-
var hasOwnProperty$
|
|
6281
|
+
var objectProto$c = Object.prototype;
|
|
6282
|
+
var hasOwnProperty$b = objectProto$c.hasOwnProperty;
|
|
6283
6283
|
function arrayLikeKeys(value, inherited) {
|
|
6284
6284
|
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;
|
|
6285
6285
|
for (var key in value) {
|
|
6286
|
-
if ((inherited || hasOwnProperty$
|
|
6286
|
+
if ((inherited || hasOwnProperty$b.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
6287
6287
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
6288
6288
|
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
6289
6289
|
isType2 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
@@ -6301,15 +6301,15 @@ function overArg(func, transform) {
|
|
|
6301
6301
|
}
|
|
6302
6302
|
__name(overArg, "overArg");
|
|
6303
6303
|
var nativeKeys = overArg(Object.keys, Object);
|
|
6304
|
-
var objectProto$
|
|
6305
|
-
var hasOwnProperty$
|
|
6304
|
+
var objectProto$b = Object.prototype;
|
|
6305
|
+
var hasOwnProperty$a = objectProto$b.hasOwnProperty;
|
|
6306
6306
|
function baseKeys(object2) {
|
|
6307
6307
|
if (!isPrototype(object2)) {
|
|
6308
6308
|
return nativeKeys(object2);
|
|
6309
6309
|
}
|
|
6310
6310
|
var result = [];
|
|
6311
6311
|
for (var key in Object(object2)) {
|
|
6312
|
-
if (hasOwnProperty$
|
|
6312
|
+
if (hasOwnProperty$a.call(object2, key) && key != "constructor") {
|
|
6313
6313
|
result.push(key);
|
|
6314
6314
|
}
|
|
6315
6315
|
}
|
|
@@ -6330,15 +6330,15 @@ function nativeKeysIn(object2) {
|
|
|
6330
6330
|
return result;
|
|
6331
6331
|
}
|
|
6332
6332
|
__name(nativeKeysIn, "nativeKeysIn");
|
|
6333
|
-
var objectProto$
|
|
6334
|
-
var hasOwnProperty$
|
|
6333
|
+
var objectProto$a = Object.prototype;
|
|
6334
|
+
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
6335
6335
|
function baseKeysIn(object2) {
|
|
6336
6336
|
if (!isObject$2(object2)) {
|
|
6337
6337
|
return nativeKeysIn(object2);
|
|
6338
6338
|
}
|
|
6339
6339
|
var isProto = isPrototype(object2), result = [];
|
|
6340
6340
|
for (var key in object2) {
|
|
6341
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty$
|
|
6341
|
+
if (!(key == "constructor" && (isProto || !hasOwnProperty$9.call(object2, key)))) {
|
|
6342
6342
|
result.push(key);
|
|
6343
6343
|
}
|
|
6344
6344
|
}
|
|
@@ -6374,22 +6374,22 @@ function hashDelete(key) {
|
|
|
6374
6374
|
}
|
|
6375
6375
|
__name(hashDelete, "hashDelete");
|
|
6376
6376
|
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
6377
|
-
var objectProto$
|
|
6378
|
-
var hasOwnProperty$
|
|
6377
|
+
var objectProto$9 = Object.prototype;
|
|
6378
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
6379
6379
|
function hashGet(key) {
|
|
6380
6380
|
var data = this.__data__;
|
|
6381
6381
|
if (nativeCreate) {
|
|
6382
6382
|
var result = data[key];
|
|
6383
6383
|
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
6384
6384
|
}
|
|
6385
|
-
return hasOwnProperty$
|
|
6385
|
+
return hasOwnProperty$8.call(data, key) ? data[key] : void 0;
|
|
6386
6386
|
}
|
|
6387
6387
|
__name(hashGet, "hashGet");
|
|
6388
|
-
var objectProto$
|
|
6389
|
-
var hasOwnProperty$
|
|
6388
|
+
var objectProto$8 = Object.prototype;
|
|
6389
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
6390
6390
|
function hashHas(key) {
|
|
6391
6391
|
var data = this.__data__;
|
|
6392
|
-
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$
|
|
6392
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$7.call(data, key);
|
|
6393
6393
|
}
|
|
6394
6394
|
__name(hashHas, "hashHas");
|
|
6395
6395
|
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
@@ -6652,9 +6652,9 @@ function flatRest(func) {
|
|
|
6652
6652
|
__name(flatRest, "flatRest");
|
|
6653
6653
|
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
6654
6654
|
var objectTag$3 = "[object Object]";
|
|
6655
|
-
var funcProto = Function.prototype, objectProto$
|
|
6655
|
+
var funcProto = Function.prototype, objectProto$7 = Object.prototype;
|
|
6656
6656
|
var funcToString = funcProto.toString;
|
|
6657
|
-
var hasOwnProperty$
|
|
6657
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
6658
6658
|
var objectCtorString = funcToString.call(Object);
|
|
6659
6659
|
function isPlainObject$2(value) {
|
|
6660
6660
|
if (!isObjectLike$1(value) || baseGetTag(value) != objectTag$3) {
|
|
@@ -6664,7 +6664,7 @@ function isPlainObject$2(value) {
|
|
|
6664
6664
|
if (proto === null) {
|
|
6665
6665
|
return true;
|
|
6666
6666
|
}
|
|
6667
|
-
var Ctor = hasOwnProperty$
|
|
6667
|
+
var Ctor = hasOwnProperty$6.call(proto, "constructor") && proto.constructor;
|
|
6668
6668
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
6669
6669
|
}
|
|
6670
6670
|
__name(isPlainObject$2, "isPlainObject$2");
|
|
@@ -7093,8 +7093,8 @@ function stubArray() {
|
|
|
7093
7093
|
return [];
|
|
7094
7094
|
}
|
|
7095
7095
|
__name(stubArray, "stubArray");
|
|
7096
|
-
var objectProto$
|
|
7097
|
-
var propertyIsEnumerable = objectProto$
|
|
7096
|
+
var objectProto$6 = Object.prototype;
|
|
7097
|
+
var propertyIsEnumerable = objectProto$6.propertyIsEnumerable;
|
|
7098
7098
|
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
7099
7099
|
var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object2) {
|
|
7100
7100
|
if (object2 == null) {
|
|
@@ -7162,11 +7162,11 @@ if (DataView$1 && getTag$1(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3
|
|
|
7162
7162
|
return result;
|
|
7163
7163
|
}, "getTag$1");
|
|
7164
7164
|
}
|
|
7165
|
-
var objectProto$
|
|
7166
|
-
var hasOwnProperty$
|
|
7165
|
+
var objectProto$5 = Object.prototype;
|
|
7166
|
+
var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
|
|
7167
7167
|
function initCloneArray(array2) {
|
|
7168
7168
|
var length = array2.length, result = new array2.constructor(length);
|
|
7169
|
-
if (length && typeof array2[0] == "string" && hasOwnProperty$
|
|
7169
|
+
if (length && typeof array2[0] == "string" && hasOwnProperty$5.call(array2, "index")) {
|
|
7170
7170
|
result.index = array2.index;
|
|
7171
7171
|
result.input = array2.input;
|
|
7172
7172
|
}
|
|
@@ -7480,8 +7480,8 @@ function equalByTag(object2, other, tag, bitmask, customizer, equalFunc, stack)
|
|
|
7480
7480
|
}
|
|
7481
7481
|
__name(equalByTag, "equalByTag");
|
|
7482
7482
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
7483
|
-
var objectProto$
|
|
7484
|
-
var hasOwnProperty$
|
|
7483
|
+
var objectProto$4 = Object.prototype;
|
|
7484
|
+
var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
|
|
7485
7485
|
function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
7486
7486
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object2), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
7487
7487
|
if (objLength != othLength && !isPartial) {
|
|
@@ -7490,7 +7490,7 @@ function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
|
7490
7490
|
var index2 = objLength;
|
|
7491
7491
|
while (index2--) {
|
|
7492
7492
|
var key = objProps[index2];
|
|
7493
|
-
if (!(isPartial ? key in other : hasOwnProperty$
|
|
7493
|
+
if (!(isPartial ? key in other : hasOwnProperty$4.call(other, key))) {
|
|
7494
7494
|
return false;
|
|
7495
7495
|
}
|
|
7496
7496
|
}
|
|
@@ -7528,8 +7528,8 @@ function equalObjects(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
|
7528
7528
|
__name(equalObjects, "equalObjects");
|
|
7529
7529
|
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
7530
7530
|
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
7531
|
-
var objectProto$
|
|
7532
|
-
var hasOwnProperty$
|
|
7531
|
+
var objectProto$3 = Object.prototype;
|
|
7532
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
7533
7533
|
function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack) {
|
|
7534
7534
|
var objIsArr = isArray$2(object2), othIsArr = isArray$2(other), objTag = objIsArr ? arrayTag : getTag$1(object2), othTag = othIsArr ? arrayTag : getTag$1(other);
|
|
7535
7535
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
@@ -7547,7 +7547,7 @@ function baseIsEqualDeep(object2, other, bitmask, customizer, equalFunc, stack)
|
|
|
7547
7547
|
return objIsArr || isTypedArray(object2) ? equalArrays(object2, other, bitmask, customizer, equalFunc, stack) : equalByTag(object2, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
7548
7548
|
}
|
|
7549
7549
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
7550
|
-
var objIsWrapped = objIsObj && hasOwnProperty$
|
|
7550
|
+
var objIsWrapped = objIsObj && hasOwnProperty$3.call(object2, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$3.call(other, "__wrapped__");
|
|
7551
7551
|
if (objIsWrapped || othIsWrapped) {
|
|
7552
7552
|
var objUnwrapped = objIsWrapped ? object2.value() : object2, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
7553
7553
|
stack || (stack = new Stack());
|
|
@@ -7763,7 +7763,7 @@ var now = /* @__PURE__ */ __name(function() {
|
|
|
7763
7763
|
return root$4.Date.now();
|
|
7764
7764
|
}, "now");
|
|
7765
7765
|
var FUNC_ERROR_TEXT$2 = "Expected a function";
|
|
7766
|
-
var nativeMax$
|
|
7766
|
+
var nativeMax$2 = Math.max, nativeMin$1 = Math.min;
|
|
7767
7767
|
function debounce(func, wait, options) {
|
|
7768
7768
|
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
|
7769
7769
|
if (typeof func != "function") {
|
|
@@ -7773,7 +7773,7 @@ function debounce(func, wait, options) {
|
|
|
7773
7773
|
if (isObject$2(options)) {
|
|
7774
7774
|
leading = !!options.leading;
|
|
7775
7775
|
maxing = "maxWait" in options;
|
|
7776
|
-
maxWait = maxing ? nativeMax$
|
|
7776
|
+
maxWait = maxing ? nativeMax$2(toNumber(options.maxWait) || 0, wait) : maxWait;
|
|
7777
7777
|
trailing = "trailing" in options ? !!options.trailing : trailing;
|
|
7778
7778
|
}
|
|
7779
7779
|
function invokeFunc(time) {
|
|
@@ -7943,12 +7943,12 @@ function baseMerge(object2, source, srcIndex, customizer, stack) {
|
|
|
7943
7943
|
__name(baseMerge, "baseMerge");
|
|
7944
7944
|
var LARGE_ARRAY_SIZE$1 = 200;
|
|
7945
7945
|
function baseDifference(array2, values2, iteratee, comparator) {
|
|
7946
|
-
var index2 = -1,
|
|
7946
|
+
var index2 = -1, includes2 = arrayIncludes, isCommon = true, length = array2.length, result = [], valuesLength = values2.length;
|
|
7947
7947
|
if (!length) {
|
|
7948
7948
|
return result;
|
|
7949
7949
|
}
|
|
7950
7950
|
if (values2.length >= LARGE_ARRAY_SIZE$1) {
|
|
7951
|
-
|
|
7951
|
+
includes2 = cacheHas;
|
|
7952
7952
|
isCommon = false;
|
|
7953
7953
|
values2 = new SetCache(values2);
|
|
7954
7954
|
}
|
|
@@ -7964,7 +7964,7 @@ function baseDifference(array2, values2, iteratee, comparator) {
|
|
|
7964
7964
|
}
|
|
7965
7965
|
}
|
|
7966
7966
|
result.push(value);
|
|
7967
|
-
} else if (!
|
|
7967
|
+
} else if (!includes2(values2, computed3, comparator)) {
|
|
7968
7968
|
result.push(value);
|
|
7969
7969
|
}
|
|
7970
7970
|
}
|
|
@@ -7979,15 +7979,6 @@ function last$1(array2) {
|
|
|
7979
7979
|
return length ? array2[length - 1] : void 0;
|
|
7980
7980
|
}
|
|
7981
7981
|
__name(last$1, "last$1");
|
|
7982
|
-
function drop(array2, n2, guard) {
|
|
7983
|
-
var length = array2 == null ? 0 : array2.length;
|
|
7984
|
-
if (!length) {
|
|
7985
|
-
return [];
|
|
7986
|
-
}
|
|
7987
|
-
n2 = n2 === void 0 ? 1 : toInteger(n2);
|
|
7988
|
-
return baseSlice(array2, n2 < 0 ? 0 : n2, length);
|
|
7989
|
-
}
|
|
7990
|
-
__name(drop, "drop");
|
|
7991
7982
|
function castFunction(value) {
|
|
7992
7983
|
return typeof value == "function" ? value : identity$1;
|
|
7993
7984
|
}
|
|
@@ -7997,16 +7988,6 @@ function forEach(collection, iteratee) {
|
|
|
7997
7988
|
return func(collection, castFunction(iteratee));
|
|
7998
7989
|
}
|
|
7999
7990
|
__name(forEach, "forEach");
|
|
8000
|
-
function endsWith$1(string2, target, position2) {
|
|
8001
|
-
string2 = toString$4(string2);
|
|
8002
|
-
target = baseToString$1(target);
|
|
8003
|
-
var length = string2.length;
|
|
8004
|
-
position2 = position2 === void 0 ? length : baseClamp(toInteger(position2), 0, length);
|
|
8005
|
-
var end2 = position2;
|
|
8006
|
-
position2 -= target.length;
|
|
8007
|
-
return position2 >= 0 && string2.slice(position2, end2) == target;
|
|
8008
|
-
}
|
|
8009
|
-
__name(endsWith$1, "endsWith$1");
|
|
8010
7991
|
function arrayEvery(array2, predicate) {
|
|
8011
7992
|
var index2 = -1, length = array2 == null ? 0 : array2.length;
|
|
8012
7993
|
while (++index2 < length) {
|
|
@@ -8067,6 +8048,16 @@ function baseGt(value, other) {
|
|
|
8067
8048
|
return value > other;
|
|
8068
8049
|
}
|
|
8069
8050
|
__name(baseGt, "baseGt");
|
|
8051
|
+
var objectProto$2 = Object.prototype;
|
|
8052
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
8053
|
+
function baseHas(object2, key) {
|
|
8054
|
+
return object2 != null && hasOwnProperty$2.call(object2, key);
|
|
8055
|
+
}
|
|
8056
|
+
__name(baseHas, "baseHas");
|
|
8057
|
+
function has$1(object2, path2) {
|
|
8058
|
+
return object2 != null && hasPath(object2, path2, baseHas);
|
|
8059
|
+
}
|
|
8060
|
+
__name(has$1, "has$1");
|
|
8070
8061
|
var stringTag = "[object String]";
|
|
8071
8062
|
function isString$1(value) {
|
|
8072
8063
|
return typeof value == "string" || !isArray$2(value) && isObjectLike$1(value) && baseGetTag(value) == stringTag;
|
|
@@ -8082,6 +8073,17 @@ function values(object2) {
|
|
|
8082
8073
|
return object2 == null ? [] : baseValues(object2, keys$1(object2));
|
|
8083
8074
|
}
|
|
8084
8075
|
__name(values, "values");
|
|
8076
|
+
var nativeMax$1 = Math.max;
|
|
8077
|
+
function includes(collection, value, fromIndex, guard) {
|
|
8078
|
+
collection = isArrayLike(collection) ? collection : values(collection);
|
|
8079
|
+
fromIndex = fromIndex && true ? toInteger(fromIndex) : 0;
|
|
8080
|
+
var length = collection.length;
|
|
8081
|
+
if (fromIndex < 0) {
|
|
8082
|
+
fromIndex = nativeMax$1(length + fromIndex, 0);
|
|
8083
|
+
}
|
|
8084
|
+
return isString$1(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
|
|
8085
|
+
}
|
|
8086
|
+
__name(includes, "includes");
|
|
8085
8087
|
function baseInverter(object2, setter, iteratee, accumulator) {
|
|
8086
8088
|
baseForOwn(object2, function(value, key, object3) {
|
|
8087
8089
|
setter(accumulator, iteratee(value), key, object3);
|
|
@@ -8142,15 +8144,15 @@ function isEqualWith(value, other, customizer) {
|
|
|
8142
8144
|
return result === void 0 ? baseIsEqual(value, other, void 0, customizer) : !!result;
|
|
8143
8145
|
}
|
|
8144
8146
|
__name(isEqualWith, "isEqualWith");
|
|
8145
|
-
function isInteger(value) {
|
|
8146
|
-
return typeof value == "number" && value == toInteger(value);
|
|
8147
|
-
}
|
|
8148
|
-
__name(isInteger, "isInteger");
|
|
8149
8147
|
var numberTag = "[object Number]";
|
|
8150
8148
|
function isNumber$1(value) {
|
|
8151
8149
|
return typeof value == "number" || isObjectLike$1(value) && baseGetTag(value) == numberTag;
|
|
8152
8150
|
}
|
|
8153
8151
|
__name(isNumber$1, "isNumber$1");
|
|
8152
|
+
function isNull(value) {
|
|
8153
|
+
return value === null;
|
|
8154
|
+
}
|
|
8155
|
+
__name(isNull, "isNull");
|
|
8154
8156
|
function isUndefined(value) {
|
|
8155
8157
|
return value === void 0;
|
|
8156
8158
|
}
|
|
@@ -8607,14 +8609,14 @@ var createSet = !(Set$1 && 1 / setToArray(new Set$1([, -0]))[1] == INFINITY) ? n
|
|
|
8607
8609
|
};
|
|
8608
8610
|
var LARGE_ARRAY_SIZE = 200;
|
|
8609
8611
|
function baseUniq(array2, iteratee, comparator) {
|
|
8610
|
-
var index2 = -1,
|
|
8612
|
+
var index2 = -1, includes2 = arrayIncludes, length = array2.length, isCommon = true, result = [], seen = result;
|
|
8611
8613
|
if (length >= LARGE_ARRAY_SIZE) {
|
|
8612
8614
|
var set5 = iteratee ? null : createSet(array2);
|
|
8613
8615
|
if (set5) {
|
|
8614
8616
|
return setToArray(set5);
|
|
8615
8617
|
}
|
|
8616
8618
|
isCommon = false;
|
|
8617
|
-
|
|
8619
|
+
includes2 = cacheHas;
|
|
8618
8620
|
seen = new SetCache();
|
|
8619
8621
|
} else {
|
|
8620
8622
|
seen = iteratee ? [] : result;
|
|
@@ -8634,7 +8636,7 @@ function baseUniq(array2, iteratee, comparator) {
|
|
|
8634
8636
|
seen.push(computed3);
|
|
8635
8637
|
}
|
|
8636
8638
|
result.push(value);
|
|
8637
|
-
} else if (!
|
|
8639
|
+
} else if (!includes2(seen, computed3, comparator)) {
|
|
8638
8640
|
if (seen !== result) {
|
|
8639
8641
|
seen.push(computed3);
|
|
8640
8642
|
}
|
|
@@ -8644,10 +8646,6 @@ function baseUniq(array2, iteratee, comparator) {
|
|
|
8644
8646
|
return result;
|
|
8645
8647
|
}
|
|
8646
8648
|
__name(baseUniq, "baseUniq");
|
|
8647
|
-
function uniq(array2) {
|
|
8648
|
-
return array2 && array2.length ? baseUniq(array2) : [];
|
|
8649
|
-
}
|
|
8650
|
-
__name(uniq, "uniq");
|
|
8651
8649
|
function uniqBy(array2, iteratee) {
|
|
8652
8650
|
return array2 && array2.length ? baseUniq(array2, baseIteratee(iteratee)) : [];
|
|
8653
8651
|
}
|
|
@@ -19376,293 +19374,283 @@ function requireLib$1() {
|
|
|
19376
19374
|
__name(requireLib$1, "requireLib$1");
|
|
19377
19375
|
var libExports$1 = /* @__PURE__ */ requireLib$1();
|
|
19378
19376
|
const queryString = /* @__PURE__ */ getDefaultExportFromCjs(libExports$1);
|
|
19379
|
-
|
|
19380
|
-
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
19386
|
-
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19391
|
-
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19396
|
-
|
|
19397
|
-
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
|
|
19405
|
-
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
}, "u") }, g2 = "en", D2 = {};
|
|
19409
|
-
D2[g2] = M2;
|
|
19410
|
-
var p2 = "$isDayjsObject", S2 = /* @__PURE__ */ __name(function(t3) {
|
|
19411
|
-
return t3 instanceof _2 || !(!t3 || !t3[p2]);
|
|
19412
|
-
}, "S"), w2 = /* @__PURE__ */ __name(function t3(e2, n3, r3) {
|
|
19413
|
-
var i3;
|
|
19414
|
-
if (!e2) return g2;
|
|
19415
|
-
if ("string" == typeof e2) {
|
|
19416
|
-
var s3 = e2.toLowerCase();
|
|
19417
|
-
D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
|
|
19418
|
-
var u3 = e2.split("-");
|
|
19419
|
-
if (!i3 && u3.length > 1) return t3(u3[0]);
|
|
19420
|
-
} else {
|
|
19421
|
-
var a3 = e2.name;
|
|
19422
|
-
D2[a3] = e2, i3 = a3;
|
|
19377
|
+
function tableQueryParamsToHasuraClauses({
|
|
19378
|
+
page,
|
|
19379
|
+
pageSize,
|
|
19380
|
+
searchTerm,
|
|
19381
|
+
filters,
|
|
19382
|
+
order: order2,
|
|
19383
|
+
schema,
|
|
19384
|
+
// Add schema as a parameter
|
|
19385
|
+
additionalFilter
|
|
19386
|
+
}) {
|
|
19387
|
+
let where = {};
|
|
19388
|
+
const order_by = {};
|
|
19389
|
+
const limit = pageSize || 25;
|
|
19390
|
+
const offset3 = page && pageSize ? (page - 1) * pageSize : 0;
|
|
19391
|
+
if (searchTerm) {
|
|
19392
|
+
const searchTermFilters = [];
|
|
19393
|
+
schema.fields.forEach((field) => {
|
|
19394
|
+
const { type: type2, path: path2, searchDisabled } = field;
|
|
19395
|
+
if (searchDisabled || field.filterDisabled || type2 === "color") return;
|
|
19396
|
+
const filterValue = searchTerm;
|
|
19397
|
+
if (type2 === "string" || type2 === "lookup") {
|
|
19398
|
+
searchTermFilters.push({
|
|
19399
|
+
[path2]: { _ilike: `%${filterValue}%` }
|
|
19400
|
+
});
|
|
19401
|
+
} else if (type2 === "boolean") {
|
|
19402
|
+
let regex;
|
|
19403
|
+
try {
|
|
19404
|
+
regex = new RegExp("^" + searchTerm, "ig");
|
|
19405
|
+
} catch (error) {
|
|
19423
19406
|
}
|
|
19424
|
-
|
|
19425
|
-
|
|
19426
|
-
|
|
19427
|
-
|
|
19428
|
-
|
|
19429
|
-
|
|
19430
|
-
|
|
19431
|
-
|
|
19432
|
-
|
|
19433
|
-
|
|
19434
|
-
function M3(t3) {
|
|
19435
|
-
this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
|
19407
|
+
if (regex) {
|
|
19408
|
+
if ("true".replace(regex, "") !== "true") {
|
|
19409
|
+
searchTermFilters.push({
|
|
19410
|
+
[path2]: { _eq: true }
|
|
19411
|
+
});
|
|
19412
|
+
} else if ("false".replace(regex, "") !== "false") {
|
|
19413
|
+
searchTermFilters.push({
|
|
19414
|
+
[path2]: { _eq: false }
|
|
19415
|
+
});
|
|
19416
|
+
}
|
|
19436
19417
|
}
|
|
19437
|
-
|
|
19438
|
-
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
|
|
19458
|
-
return
|
|
19459
|
-
|
|
19460
|
-
return
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
|
|
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
|
-
|
|
19497
|
-
|
|
19498
|
-
|
|
19499
|
-
|
|
19418
|
+
} else if ((type2 === "number" || type2 === "integer") && !isNaN(filterValue)) {
|
|
19419
|
+
searchTermFilters.push({
|
|
19420
|
+
[path2]: { _eq: parseFloat(filterValue) }
|
|
19421
|
+
});
|
|
19422
|
+
}
|
|
19423
|
+
});
|
|
19424
|
+
if (searchTermFilters.length > 0) {
|
|
19425
|
+
if (Object.keys(where).length > 0) {
|
|
19426
|
+
where = { _and: [where, { _or: searchTermFilters }] };
|
|
19427
|
+
} else {
|
|
19428
|
+
where = { _or: searchTermFilters };
|
|
19429
|
+
}
|
|
19430
|
+
}
|
|
19431
|
+
}
|
|
19432
|
+
if (filters && filters.length > 0) {
|
|
19433
|
+
const filterClauses = filters.map((filter2) => {
|
|
19434
|
+
const { selectedFilter, filterOn, filterValue } = filter2;
|
|
19435
|
+
switch (selectedFilter) {
|
|
19436
|
+
case "textContains":
|
|
19437
|
+
return { [filterOn]: { _ilike: `%${filterValue}%` } };
|
|
19438
|
+
case "textEquals":
|
|
19439
|
+
return { [filterOn]: { _eq: filterValue } };
|
|
19440
|
+
case "textNotEquals":
|
|
19441
|
+
return { [filterOn]: { _neq: filterValue } };
|
|
19442
|
+
case "numberEquals":
|
|
19443
|
+
return { [filterOn]: { _eq: parseFloat(filterValue) } };
|
|
19444
|
+
case "numberGreaterThan":
|
|
19445
|
+
return { [filterOn]: { _gt: parseFloat(filterValue) } };
|
|
19446
|
+
case "numberLessThan":
|
|
19447
|
+
return { [filterOn]: { _lt: parseFloat(filterValue) } };
|
|
19448
|
+
case "numberGreaterThanEquals":
|
|
19449
|
+
return { [filterOn]: { _gte: parseFloat(filterValue) } };
|
|
19450
|
+
case "numberLessThanEquals":
|
|
19451
|
+
return { [filterOn]: { _lte: parseFloat(filterValue) } };
|
|
19452
|
+
case "isNull":
|
|
19453
|
+
return { [filterOn]: { _is_null: true } };
|
|
19454
|
+
case "isNotNull":
|
|
19455
|
+
return { [filterOn]: { _is_null: false } };
|
|
19456
|
+
default:
|
|
19457
|
+
console.warn(`Unsupported filter type: ${selectedFilter}`);
|
|
19458
|
+
return {};
|
|
19459
|
+
}
|
|
19460
|
+
});
|
|
19461
|
+
if (filterClauses.length > 0) {
|
|
19462
|
+
if (Object.keys(where).length > 0) {
|
|
19463
|
+
where = { _and: [where, ...filterClauses] };
|
|
19464
|
+
} else {
|
|
19465
|
+
where = { _and: filterClauses };
|
|
19466
|
+
}
|
|
19467
|
+
}
|
|
19468
|
+
}
|
|
19469
|
+
if (order2 && order2.length > 0) {
|
|
19470
|
+
order2.forEach((item) => {
|
|
19471
|
+
const field = item.startsWith("-") ? item.substring(1) : item;
|
|
19472
|
+
const direction = item.startsWith("-") ? "desc" : "asc";
|
|
19473
|
+
order_by[field] = direction;
|
|
19474
|
+
});
|
|
19475
|
+
}
|
|
19476
|
+
if (additionalFilter) {
|
|
19477
|
+
where = { _and: [where, additionalFilter] };
|
|
19478
|
+
}
|
|
19479
|
+
return { where, order_by, limit, offset: offset3 };
|
|
19480
|
+
}
|
|
19481
|
+
__name(tableQueryParamsToHasuraClauses, "tableQueryParamsToHasuraClauses");
|
|
19482
|
+
function filterLocalEntitiesToHasura(records, { where, order_by, limit, offset: offset3, isInfinite } = {}) {
|
|
19483
|
+
let filteredRecords = [...records];
|
|
19484
|
+
if (where) {
|
|
19485
|
+
filteredRecords = applyWhereClause(filteredRecords, where);
|
|
19486
|
+
}
|
|
19487
|
+
if (order_by) {
|
|
19488
|
+
filteredRecords = applyOrderBy(filteredRecords, order_by);
|
|
19489
|
+
}
|
|
19490
|
+
const allFilteredRecords = [...filteredRecords];
|
|
19491
|
+
if (!isInfinite && offset3 !== void 0) {
|
|
19492
|
+
filteredRecords = filteredRecords.slice(offset3);
|
|
19493
|
+
}
|
|
19494
|
+
if (!isInfinite && limit !== void 0) {
|
|
19495
|
+
filteredRecords = filteredRecords.slice(0, limit);
|
|
19496
|
+
}
|
|
19497
|
+
return {
|
|
19498
|
+
entities: filteredRecords,
|
|
19499
|
+
entitiesAcrossPages: allFilteredRecords,
|
|
19500
|
+
entityCount: allFilteredRecords.length
|
|
19501
|
+
};
|
|
19502
|
+
}
|
|
19503
|
+
__name(filterLocalEntitiesToHasura, "filterLocalEntitiesToHasura");
|
|
19504
|
+
function applyWhereClause(records, where) {
|
|
19505
|
+
function applyFilter(record, filter2) {
|
|
19506
|
+
if (isEmpty$1(filter2)) {
|
|
19507
|
+
return true;
|
|
19508
|
+
}
|
|
19509
|
+
for (const key in filter2) {
|
|
19510
|
+
if (key === "_and") {
|
|
19511
|
+
if (!every(filter2[key], (subFilter) => applyFilter(record, subFilter))) {
|
|
19512
|
+
return false;
|
|
19513
|
+
}
|
|
19514
|
+
} else if (key === "_or") {
|
|
19515
|
+
if (!some(filter2[key], (subFilter) => applyFilter(record, subFilter))) {
|
|
19516
|
+
return false;
|
|
19517
|
+
}
|
|
19518
|
+
} else if (key === "_not") {
|
|
19519
|
+
if (applyFilter(record, filter2[key])) {
|
|
19520
|
+
return false;
|
|
19521
|
+
}
|
|
19522
|
+
} else {
|
|
19523
|
+
const value = record[key];
|
|
19524
|
+
const conditions = filter2[key];
|
|
19525
|
+
for (const operator in conditions) {
|
|
19526
|
+
const conditionValue = conditions[operator];
|
|
19527
|
+
if (operator === "_gt" && conditions._lt) {
|
|
19528
|
+
if (!(value > conditionValue && value < conditions._lt))
|
|
19529
|
+
return false;
|
|
19530
|
+
continue;
|
|
19500
19531
|
}
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
return this.init(), this;
|
|
19510
|
-
}, m3.set = function(t3, e2) {
|
|
19511
|
-
return this.clone().$set(t3, e2);
|
|
19512
|
-
}, m3.get = function(t3) {
|
|
19513
|
-
return this[b2.p(t3)]();
|
|
19514
|
-
}, m3.add = function(r3, f3) {
|
|
19515
|
-
var d3, l3 = this;
|
|
19516
|
-
r3 = Number(r3);
|
|
19517
|
-
var $2 = b2.p(f3), y3 = /* @__PURE__ */ __name(function(t3) {
|
|
19518
|
-
var e2 = O2(l3);
|
|
19519
|
-
return b2.w(e2.date(e2.date() + Math.round(t3 * r3)), l3);
|
|
19520
|
-
}, "y");
|
|
19521
|
-
if ($2 === c2) return this.set(c2, this.$M + r3);
|
|
19522
|
-
if ($2 === h2) return this.set(h2, this.$y + r3);
|
|
19523
|
-
if ($2 === a2) return y3(1);
|
|
19524
|
-
if ($2 === o2) return y3(7);
|
|
19525
|
-
var M4 = (d3 = {}, d3[s2] = e, d3[u2] = n2, d3[i2] = t2, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4;
|
|
19526
|
-
return b2.w(m4, this);
|
|
19527
|
-
}, m3.subtract = function(t3, e2) {
|
|
19528
|
-
return this.add(-1 * t3, e2);
|
|
19529
|
-
}, m3.format = function(t3) {
|
|
19530
|
-
var e2 = this, n3 = this.$locale();
|
|
19531
|
-
if (!this.isValid()) return n3.invalidDate || l2;
|
|
19532
|
-
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) {
|
|
19533
|
-
return t4 && (t4[n4] || t4(e2, r3)) || i4[n4].slice(0, s4);
|
|
19534
|
-
}, "h"), d3 = /* @__PURE__ */ __name(function(t4) {
|
|
19535
|
-
return b2.s(s3 % 12 || 12, t4, "0");
|
|
19536
|
-
}, "d"), $2 = f3 || function(t4, e3, n4) {
|
|
19537
|
-
var r4 = t4 < 12 ? "AM" : "PM";
|
|
19538
|
-
return n4 ? r4.toLowerCase() : r4;
|
|
19539
|
-
};
|
|
19540
|
-
return r3.replace(y2, function(t4, r4) {
|
|
19541
|
-
return r4 || function(t5) {
|
|
19542
|
-
switch (t5) {
|
|
19543
|
-
case "YY":
|
|
19544
|
-
return String(e2.$y).slice(-2);
|
|
19545
|
-
case "YYYY":
|
|
19546
|
-
return b2.s(e2.$y, 4, "0");
|
|
19547
|
-
case "M":
|
|
19548
|
-
return a3 + 1;
|
|
19549
|
-
case "MM":
|
|
19550
|
-
return b2.s(a3 + 1, 2, "0");
|
|
19551
|
-
case "MMM":
|
|
19552
|
-
return h3(n3.monthsShort, a3, c3, 3);
|
|
19553
|
-
case "MMMM":
|
|
19554
|
-
return h3(c3, a3);
|
|
19555
|
-
case "D":
|
|
19556
|
-
return e2.$D;
|
|
19557
|
-
case "DD":
|
|
19558
|
-
return b2.s(e2.$D, 2, "0");
|
|
19559
|
-
case "d":
|
|
19560
|
-
return String(e2.$W);
|
|
19561
|
-
case "dd":
|
|
19562
|
-
return h3(n3.weekdaysMin, e2.$W, o3, 2);
|
|
19563
|
-
case "ddd":
|
|
19564
|
-
return h3(n3.weekdaysShort, e2.$W, o3, 3);
|
|
19565
|
-
case "dddd":
|
|
19566
|
-
return o3[e2.$W];
|
|
19567
|
-
case "H":
|
|
19568
|
-
return String(s3);
|
|
19569
|
-
case "HH":
|
|
19570
|
-
return b2.s(s3, 2, "0");
|
|
19571
|
-
case "h":
|
|
19572
|
-
return d3(1);
|
|
19573
|
-
case "hh":
|
|
19574
|
-
return d3(2);
|
|
19575
|
-
case "a":
|
|
19576
|
-
return $2(s3, u3, true);
|
|
19577
|
-
case "A":
|
|
19578
|
-
return $2(s3, u3, false);
|
|
19579
|
-
case "m":
|
|
19580
|
-
return String(u3);
|
|
19581
|
-
case "mm":
|
|
19582
|
-
return b2.s(u3, 2, "0");
|
|
19583
|
-
case "s":
|
|
19584
|
-
return String(e2.$s);
|
|
19585
|
-
case "ss":
|
|
19586
|
-
return b2.s(e2.$s, 2, "0");
|
|
19587
|
-
case "SSS":
|
|
19588
|
-
return b2.s(e2.$ms, 3, "0");
|
|
19589
|
-
case "Z":
|
|
19590
|
-
return i3;
|
|
19591
|
-
}
|
|
19592
|
-
return null;
|
|
19593
|
-
}(t4) || i3.replace(":", "");
|
|
19594
|
-
});
|
|
19595
|
-
}, m3.utcOffset = function() {
|
|
19596
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
19597
|
-
}, m3.diff = function(r3, d3, l3) {
|
|
19598
|
-
var $2, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e, g3 = this - m4, D3 = /* @__PURE__ */ __name(function() {
|
|
19599
|
-
return b2.m(y3, m4);
|
|
19600
|
-
}, "D");
|
|
19601
|
-
switch (M4) {
|
|
19602
|
-
case h2:
|
|
19603
|
-
$2 = D3() / 12;
|
|
19532
|
+
if (operator === "_gte" && conditions._lte) {
|
|
19533
|
+
if (!(value >= conditionValue && value <= conditions._lte))
|
|
19534
|
+
return false;
|
|
19535
|
+
continue;
|
|
19536
|
+
}
|
|
19537
|
+
switch (operator) {
|
|
19538
|
+
case "_eq":
|
|
19539
|
+
if (!isEqual(value, conditionValue)) return false;
|
|
19604
19540
|
break;
|
|
19605
|
-
case
|
|
19606
|
-
|
|
19541
|
+
case "_neq":
|
|
19542
|
+
if (isEqual(value, conditionValue)) return false;
|
|
19607
19543
|
break;
|
|
19608
|
-
case
|
|
19609
|
-
|
|
19544
|
+
case "_gt":
|
|
19545
|
+
if (!(value > conditionValue)) return false;
|
|
19610
19546
|
break;
|
|
19611
|
-
case
|
|
19612
|
-
|
|
19547
|
+
case "_gte":
|
|
19548
|
+
if (!(value >= conditionValue)) return false;
|
|
19613
19549
|
break;
|
|
19614
|
-
case
|
|
19615
|
-
|
|
19550
|
+
case "_lt":
|
|
19551
|
+
if (!(value < conditionValue)) return false;
|
|
19616
19552
|
break;
|
|
19617
|
-
case
|
|
19618
|
-
|
|
19553
|
+
case "_lte":
|
|
19554
|
+
if (!(value <= conditionValue)) return false;
|
|
19619
19555
|
break;
|
|
19620
|
-
case
|
|
19621
|
-
$
|
|
19556
|
+
case "_like":
|
|
19557
|
+
if (!isString$1(value) || !new RegExp(conditionValue.replace(/%/g, ".*")).test(value))
|
|
19558
|
+
return false;
|
|
19622
19559
|
break;
|
|
19623
|
-
case
|
|
19624
|
-
$
|
|
19560
|
+
case "_ilike":
|
|
19561
|
+
if (!isString$1(value) || !new RegExp(conditionValue.replace(/%/g, ".*"), "i").test(value))
|
|
19562
|
+
return false;
|
|
19563
|
+
break;
|
|
19564
|
+
case "_nlike":
|
|
19565
|
+
if (!isString$1(value) || new RegExp(conditionValue.replace(/%/g, ".*")).test(value))
|
|
19566
|
+
return false;
|
|
19567
|
+
break;
|
|
19568
|
+
case "_nilike":
|
|
19569
|
+
if (!isString$1(value) || new RegExp(conditionValue.replace(/%/g, ".*"), "i").test(value))
|
|
19570
|
+
return false;
|
|
19571
|
+
break;
|
|
19572
|
+
case "_starts_with":
|
|
19573
|
+
if (!isString$1(value) || !value.startsWith(conditionValue))
|
|
19574
|
+
return false;
|
|
19575
|
+
break;
|
|
19576
|
+
case "_ends_with":
|
|
19577
|
+
if (!isString$1(value) || !value.endsWith(conditionValue))
|
|
19578
|
+
return false;
|
|
19579
|
+
break;
|
|
19580
|
+
case "_is_null":
|
|
19581
|
+
if (conditionValue && !isNull(value) || !conditionValue && isNull(value))
|
|
19582
|
+
return false;
|
|
19583
|
+
break;
|
|
19584
|
+
case "_contains":
|
|
19585
|
+
if (!isArray$2(value) || !every(conditionValue, (item) => includes(value, item)))
|
|
19586
|
+
return false;
|
|
19587
|
+
break;
|
|
19588
|
+
case "_contained_in":
|
|
19589
|
+
if (!isArray$2(value) || !every(value, (item) => includes(conditionValue, item)))
|
|
19590
|
+
return false;
|
|
19591
|
+
break;
|
|
19592
|
+
case "_has_key":
|
|
19593
|
+
if (!isObject$2(value) || !has$1(value, conditionValue)) return false;
|
|
19594
|
+
break;
|
|
19595
|
+
case "_has_keys_any":
|
|
19596
|
+
if (!isObject$2(value) || !some(conditionValue, (item) => has$1(value, item)))
|
|
19597
|
+
return false;
|
|
19598
|
+
break;
|
|
19599
|
+
case "_has_keys_all":
|
|
19600
|
+
if (!isObject$2(value) || !every(conditionValue, (item) => has$1(value, item)))
|
|
19601
|
+
return false;
|
|
19602
|
+
break;
|
|
19603
|
+
case "_similar":
|
|
19604
|
+
if (!isString$1(value) || !new RegExp(conditionValue.replace(/%/g, ".*")).test(value))
|
|
19605
|
+
return false;
|
|
19625
19606
|
break;
|
|
19626
19607
|
default:
|
|
19627
|
-
|
|
19608
|
+
if (operator.startsWith("_")) {
|
|
19609
|
+
console.warn(`Unsupported operator: ${operator}`);
|
|
19610
|
+
return false;
|
|
19611
|
+
} else {
|
|
19612
|
+
console.warn(`Unsupported operator: ${operator}`);
|
|
19613
|
+
return false;
|
|
19614
|
+
}
|
|
19628
19615
|
}
|
|
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
|
-
|
|
19656
|
-
|
|
19657
|
-
|
|
19658
|
-
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
|
|
19662
|
-
}
|
|
19663
|
-
|
|
19664
|
-
|
|
19665
|
-
|
|
19616
|
+
}
|
|
19617
|
+
}
|
|
19618
|
+
}
|
|
19619
|
+
return true;
|
|
19620
|
+
}
|
|
19621
|
+
__name(applyFilter, "applyFilter");
|
|
19622
|
+
return records.filter((record) => applyFilter(record, where));
|
|
19623
|
+
}
|
|
19624
|
+
__name(applyWhereClause, "applyWhereClause");
|
|
19625
|
+
function applyOrderBy(records, order_by) {
|
|
19626
|
+
const keys2 = Object.keys(order_by);
|
|
19627
|
+
if (keys2.length > 0) {
|
|
19628
|
+
const field = keys2[0];
|
|
19629
|
+
const direction = order_by[field] === "asc" ? "asc" : "desc";
|
|
19630
|
+
return orderBy$1(records, [field], [direction]);
|
|
19631
|
+
}
|
|
19632
|
+
return records;
|
|
19633
|
+
}
|
|
19634
|
+
__name(applyOrderBy, "applyOrderBy");
|
|
19635
|
+
function initializeHasuraWhereAndFilter(additionalFilter, where = {}, currentParams) {
|
|
19636
|
+
where._and = where._and || [];
|
|
19637
|
+
where._or = where._or || [];
|
|
19638
|
+
if (typeof additionalFilter === "function") {
|
|
19639
|
+
const newWhere = additionalFilter(where, currentParams);
|
|
19640
|
+
if (newWhere) {
|
|
19641
|
+
where = __spreadValues(__spreadValues({}, where), newWhere);
|
|
19642
|
+
}
|
|
19643
|
+
} else if (typeof additionalFilter === "object")
|
|
19644
|
+
where._and.push(additionalFilter);
|
|
19645
|
+
}
|
|
19646
|
+
__name(initializeHasuraWhereAndFilter, "initializeHasuraWhereAndFilter");
|
|
19647
|
+
const addCustomColumnFilters = /* @__PURE__ */ __name((where, fields, currentParams) => {
|
|
19648
|
+
fields.forEach((field) => {
|
|
19649
|
+
const { customColumnFilter, filterDisabled } = field;
|
|
19650
|
+
if (filterDisabled || !customColumnFilter) return;
|
|
19651
|
+
customColumnFilter(where, currentParams);
|
|
19652
|
+
});
|
|
19653
|
+
}, "addCustomColumnFilters");
|
|
19666
19654
|
const defaultPageSizes = [5, 10, 15, 25, 50, 100, 200, 400];
|
|
19667
19655
|
function safeStringify(val) {
|
|
19668
19656
|
if (val !== null && typeof val === "object") {
|
|
@@ -19685,319 +19673,6 @@ function getCCDisplayName(field) {
|
|
|
19685
19673
|
);
|
|
19686
19674
|
}
|
|
19687
19675
|
__name(getCCDisplayName, "getCCDisplayName");
|
|
19688
|
-
function getFieldsMappedByCCDisplayName(schema) {
|
|
19689
|
-
return schema.fields.reduce((acc, field) => {
|
|
19690
|
-
const ccDisplayName = getCCDisplayName(field);
|
|
19691
|
-
acc[ccDisplayName] = field;
|
|
19692
|
-
return acc;
|
|
19693
|
-
}, {});
|
|
19694
|
-
}
|
|
19695
|
-
__name(getFieldsMappedByCCDisplayName, "getFieldsMappedByCCDisplayName");
|
|
19696
|
-
function orderEntitiesLocal(orderArray, entities, schema, ownProps) {
|
|
19697
|
-
if (orderArray == null ? void 0 : orderArray.length) {
|
|
19698
|
-
const orderFuncs = [];
|
|
19699
|
-
const ascOrDescArray = [];
|
|
19700
|
-
orderArray.forEach((order2) => {
|
|
19701
|
-
const ccDisplayName = order2.replace(/^-/gi, "");
|
|
19702
|
-
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
19703
|
-
const field = ccFields[ccDisplayName];
|
|
19704
|
-
if (!field) {
|
|
19705
|
-
throw new Error(
|
|
19706
|
-
"Ruh roh, there should have been a column to sort on for " + order2 + " but none was found in " + schema.fields
|
|
19707
|
-
);
|
|
19708
|
-
}
|
|
19709
|
-
const { path: path2, getValueToFilterOn, sortFn } = field;
|
|
19710
|
-
if (field.type === "timestamp") {
|
|
19711
|
-
ascOrDescArray.push("desc");
|
|
19712
|
-
}
|
|
19713
|
-
ascOrDescArray.push(ccDisplayName === order2 ? "asc" : "desc");
|
|
19714
|
-
if (field.type === "timestamp") {
|
|
19715
|
-
orderFuncs.push((r2) => {
|
|
19716
|
-
const val = get$3(r2, path2);
|
|
19717
|
-
return !!val;
|
|
19718
|
-
});
|
|
19719
|
-
}
|
|
19720
|
-
if (path2 && endsWith$1(path2.toLowerCase(), "id")) {
|
|
19721
|
-
orderFuncs.push((o2) => {
|
|
19722
|
-
return parseInt(get$3(o2, path2), 10);
|
|
19723
|
-
});
|
|
19724
|
-
} else if (sortFn) {
|
|
19725
|
-
const toOrder = Array.isArray(sortFn) ? sortFn : [sortFn];
|
|
19726
|
-
orderFuncs.push(...toOrder);
|
|
19727
|
-
} else if (getValueToFilterOn) {
|
|
19728
|
-
orderFuncs.push((o2) => {
|
|
19729
|
-
return getValueToFilterOn(o2, ownProps);
|
|
19730
|
-
});
|
|
19731
|
-
} else {
|
|
19732
|
-
orderFuncs.push((r2) => {
|
|
19733
|
-
const val = get$3(r2, path2);
|
|
19734
|
-
return val && val.toLowerCase ? val.toLowerCase() : val;
|
|
19735
|
-
});
|
|
19736
|
-
}
|
|
19737
|
-
});
|
|
19738
|
-
entities = orderBy$1(entities, orderFuncs, ascOrDescArray);
|
|
19739
|
-
}
|
|
19740
|
-
return entities;
|
|
19741
|
-
}
|
|
19742
|
-
__name(orderEntitiesLocal, "orderEntitiesLocal");
|
|
19743
|
-
function getAndAndOrFilters(allFilters) {
|
|
19744
|
-
const orFilters = [];
|
|
19745
|
-
const andFilters = [];
|
|
19746
|
-
const otherOrFilters = [];
|
|
19747
|
-
allFilters.forEach((filter2) => {
|
|
19748
|
-
if (filter2.isOrFilter && typeof filter2.filterValue === "string" && filter2.filterValue.includes(",")) {
|
|
19749
|
-
const allFilterValues = filter2.filterValue.split(",");
|
|
19750
|
-
allFilterValues.forEach((filterValue, i2) => {
|
|
19751
|
-
filterValue = filterValue.trim();
|
|
19752
|
-
if (!filterValue) return;
|
|
19753
|
-
const newFilter = __spreadProps(__spreadValues({}, filter2), {
|
|
19754
|
-
filterValue
|
|
19755
|
-
});
|
|
19756
|
-
if (i2 === 0) {
|
|
19757
|
-
orFilters.push(newFilter);
|
|
19758
|
-
} else {
|
|
19759
|
-
const iMinus = i2 - 1;
|
|
19760
|
-
if (!otherOrFilters[iMinus]) otherOrFilters[iMinus] = [];
|
|
19761
|
-
otherOrFilters[iMinus].push(newFilter);
|
|
19762
|
-
}
|
|
19763
|
-
});
|
|
19764
|
-
} else if (filter2.isOrFilter) {
|
|
19765
|
-
orFilters.push(filter2);
|
|
19766
|
-
} else {
|
|
19767
|
-
andFilters.push(filter2);
|
|
19768
|
-
}
|
|
19769
|
-
});
|
|
19770
|
-
return {
|
|
19771
|
-
orFilters,
|
|
19772
|
-
andFilters,
|
|
19773
|
-
otherOrFilters
|
|
19774
|
-
};
|
|
19775
|
-
}
|
|
19776
|
-
__name(getAndAndOrFilters, "getAndAndOrFilters");
|
|
19777
|
-
function filterEntitiesLocal(filters = [], searchTerm, entities, schema, ownProps) {
|
|
19778
|
-
const allFilters = getAllFilters(filters, searchTerm, schema);
|
|
19779
|
-
if (allFilters.length) {
|
|
19780
|
-
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
19781
|
-
const { andFilters, orFilters, otherOrFilters } = getAndAndOrFilters(allFilters);
|
|
19782
|
-
andFilters.forEach((filter2) => {
|
|
19783
|
-
entities = getEntitiesForGivenFilter(
|
|
19784
|
-
entities,
|
|
19785
|
-
filter2,
|
|
19786
|
-
ccFields,
|
|
19787
|
-
ownProps
|
|
19788
|
-
);
|
|
19789
|
-
});
|
|
19790
|
-
if (orFilters.length) {
|
|
19791
|
-
let orEntities = [];
|
|
19792
|
-
orFilters.concat(...otherOrFilters).forEach((filter2) => {
|
|
19793
|
-
orEntities = orEntities.concat(
|
|
19794
|
-
getEntitiesForGivenFilter(entities, filter2, ccFields, ownProps)
|
|
19795
|
-
);
|
|
19796
|
-
});
|
|
19797
|
-
entities = uniq(orEntities);
|
|
19798
|
-
}
|
|
19799
|
-
}
|
|
19800
|
-
return entities;
|
|
19801
|
-
}
|
|
19802
|
-
__name(filterEntitiesLocal, "filterEntitiesLocal");
|
|
19803
|
-
function cleanFilterValue(_filterValue, type2) {
|
|
19804
|
-
let filterValue = _filterValue;
|
|
19805
|
-
if (type2 === "number" || type2 === "integer") {
|
|
19806
|
-
filterValue = Array.isArray(filterValue) ? filterValue.map((val) => Number(val)) : Number(filterValue);
|
|
19807
|
-
}
|
|
19808
|
-
return filterValue;
|
|
19809
|
-
}
|
|
19810
|
-
__name(cleanFilterValue, "cleanFilterValue");
|
|
19811
|
-
function getEntitiesForGivenFilter(entities, filter2, ccFields, ownProps) {
|
|
19812
|
-
const { filterOn, filterValue: _filterValue, selectedFilter } = filter2;
|
|
19813
|
-
const field = ccFields[filterOn];
|
|
19814
|
-
const { path: path2, getValueToFilterOn } = field;
|
|
19815
|
-
const filterValue = cleanFilterValue(_filterValue, field.type);
|
|
19816
|
-
const subFilter = getSubFilter(false, selectedFilter, filterValue);
|
|
19817
|
-
entities = entities.filter((entity) => {
|
|
19818
|
-
const fieldVal = getValueToFilterOn ? getValueToFilterOn(entity, ownProps) : get$3(entity, path2);
|
|
19819
|
-
const shouldKeep = subFilter(fieldVal);
|
|
19820
|
-
return shouldKeep;
|
|
19821
|
-
});
|
|
19822
|
-
return entities;
|
|
19823
|
-
}
|
|
19824
|
-
__name(getEntitiesForGivenFilter, "getEntitiesForGivenFilter");
|
|
19825
|
-
function getFiltersFromSearchTerm(searchTerm, schema) {
|
|
19826
|
-
const searchTermFilters = [];
|
|
19827
|
-
if (searchTerm) {
|
|
19828
|
-
const sharedFields = {
|
|
19829
|
-
isOrFilter: true,
|
|
19830
|
-
isSearchTermFilter: true
|
|
19831
|
-
};
|
|
19832
|
-
schema.fields.forEach((field) => {
|
|
19833
|
-
const { type: type2, searchDisabled } = field;
|
|
19834
|
-
if (searchDisabled || field.filterDisabled || type2 === "color") return;
|
|
19835
|
-
const ccDisplayName = getCCDisplayName(field);
|
|
19836
|
-
const filterValue = cleanFilterValue(searchTerm, type2);
|
|
19837
|
-
if (type2 === "string" || type2 === "lookup") {
|
|
19838
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19839
|
-
filterOn: ccDisplayName,
|
|
19840
|
-
filterValue: searchTerm,
|
|
19841
|
-
selectedFilter: "contains"
|
|
19842
|
-
}));
|
|
19843
|
-
} else if (type2 === "boolean") {
|
|
19844
|
-
let regex;
|
|
19845
|
-
try {
|
|
19846
|
-
regex = new RegExp("^" + searchTerm, "ig");
|
|
19847
|
-
} catch (error) {
|
|
19848
|
-
}
|
|
19849
|
-
if (regex) {
|
|
19850
|
-
if ("true".replace(regex, "") !== "true") {
|
|
19851
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19852
|
-
filterOn: ccDisplayName,
|
|
19853
|
-
filterValue: true,
|
|
19854
|
-
selectedFilter: "true"
|
|
19855
|
-
}));
|
|
19856
|
-
} else if ("false".replace(regex, "") !== "false") {
|
|
19857
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19858
|
-
filterOn: ccDisplayName,
|
|
19859
|
-
filterValue: false,
|
|
19860
|
-
selectedFilter: "false"
|
|
19861
|
-
}));
|
|
19862
|
-
}
|
|
19863
|
-
}
|
|
19864
|
-
} else if ((type2 === "number" || type2 === "integer") && !isNaN(filterValue)) {
|
|
19865
|
-
if (type2 === "integer" && !isInteger(filterValue)) {
|
|
19866
|
-
return;
|
|
19867
|
-
}
|
|
19868
|
-
searchTermFilters.push(__spreadProps(__spreadValues({}, sharedFields), {
|
|
19869
|
-
filterOn: ccDisplayName,
|
|
19870
|
-
filterValue,
|
|
19871
|
-
selectedFilter: "equalTo"
|
|
19872
|
-
}));
|
|
19873
|
-
}
|
|
19874
|
-
});
|
|
19875
|
-
}
|
|
19876
|
-
return searchTermFilters;
|
|
19877
|
-
}
|
|
19878
|
-
__name(getFiltersFromSearchTerm, "getFiltersFromSearchTerm");
|
|
19879
|
-
function getSubFilter(qb, selectedFilter, filterValue) {
|
|
19880
|
-
const ccSelectedFilter = camelCase(selectedFilter);
|
|
19881
|
-
let stringFilterValue = filterValue && filterValue.toString ? filterValue.toString() : filterValue;
|
|
19882
|
-
if (stringFilterValue === false) {
|
|
19883
|
-
stringFilterValue = "false";
|
|
19884
|
-
} else {
|
|
19885
|
-
stringFilterValue = stringFilterValue || "";
|
|
19886
|
-
}
|
|
19887
|
-
const filterValLower = stringFilterValue.toLowerCase && stringFilterValue.toLowerCase();
|
|
19888
|
-
const arrayFilterValue = Array.isArray(filterValue) ? filterValue : stringFilterValue.split(";");
|
|
19889
|
-
if (ccSelectedFilter === "startsWith") {
|
|
19890
|
-
return qb ? qb.startsWith(stringFilterValue) : (fieldVal) => {
|
|
19891
|
-
if (!fieldVal || !fieldVal.toLowerCase) return false;
|
|
19892
|
-
return startsWith(fieldVal.toLowerCase(), filterValLower);
|
|
19893
|
-
};
|
|
19894
|
-
} else if (ccSelectedFilter === "endsWith") {
|
|
19895
|
-
return qb ? qb.endsWith(stringFilterValue) : (fieldVal) => {
|
|
19896
|
-
if (!fieldVal || !fieldVal.toLowerCase) return false;
|
|
19897
|
-
return endsWith$1(fieldVal.toLowerCase(), filterValLower);
|
|
19898
|
-
};
|
|
19899
|
-
} else if (ccSelectedFilter === "contains" || ccSelectedFilter === "notContains") {
|
|
19900
|
-
return qb ? ccSelectedFilter === "contains" ? qb.contains(stringFilterValue.replace(/_/g, "\\_")) : qb.notContains(stringFilterValue.replace(/_/g, "\\_")) : (fieldVal) => {
|
|
19901
|
-
if (!fieldVal || !fieldVal.toLowerCase) return false;
|
|
19902
|
-
return ccSelectedFilter === "contains" ? fieldVal.toLowerCase().replace(filterValLower, "") !== fieldVal.toLowerCase() : fieldVal.toLowerCase().replace(filterValLower, "") === fieldVal.toLowerCase();
|
|
19903
|
-
};
|
|
19904
|
-
} else if (ccSelectedFilter === "inList") {
|
|
19905
|
-
return qb ? qb.inList(arrayFilterValue) : (fieldVal) => {
|
|
19906
|
-
if (!(fieldVal == null ? void 0 : fieldVal.toString)) return false;
|
|
19907
|
-
return arrayFilterValue.map((val) => {
|
|
19908
|
-
if (val) {
|
|
19909
|
-
if (val.toString) return val.toString().toLowerCase();
|
|
19910
|
-
return val.toLowerCase();
|
|
19911
|
-
}
|
|
19912
|
-
return void 0;
|
|
19913
|
-
}).indexOf(fieldVal.toString().toLowerCase()) > -1;
|
|
19914
|
-
};
|
|
19915
|
-
} else if (ccSelectedFilter === "notInList") {
|
|
19916
|
-
return qb ? qb.notInList(arrayFilterValue) : (fieldVal) => {
|
|
19917
|
-
if (!(fieldVal == null ? void 0 : fieldVal.toString)) return false;
|
|
19918
|
-
return arrayFilterValue.map((val) => {
|
|
19919
|
-
if (val) {
|
|
19920
|
-
if (val.toString) return val.toString().toLowerCase();
|
|
19921
|
-
return val.toLowerCase();
|
|
19922
|
-
}
|
|
19923
|
-
return void 0;
|
|
19924
|
-
}).indexOf(fieldVal.toString().toLowerCase()) === -1;
|
|
19925
|
-
};
|
|
19926
|
-
} else if (ccSelectedFilter === "isEmpty") {
|
|
19927
|
-
return qb ? qb.isEmpty() : (fieldVal) => {
|
|
19928
|
-
return !fieldVal;
|
|
19929
|
-
};
|
|
19930
|
-
} else if (ccSelectedFilter === "notEmpty") {
|
|
19931
|
-
return qb ? [qb.notNull(), qb.notEquals("")] : (fieldVal) => {
|
|
19932
|
-
return !!fieldVal;
|
|
19933
|
-
};
|
|
19934
|
-
} else if (ccSelectedFilter === "isExactly") {
|
|
19935
|
-
return qb ? filterValue : (fieldVal) => {
|
|
19936
|
-
return fieldVal === filterValue;
|
|
19937
|
-
};
|
|
19938
|
-
} else if (ccSelectedFilter === "true") {
|
|
19939
|
-
return qb ? qb.equals(true) : (fieldVal) => {
|
|
19940
|
-
return !!fieldVal;
|
|
19941
|
-
};
|
|
19942
|
-
} else if (ccSelectedFilter === "false") {
|
|
19943
|
-
return qb ? qb.equals(false) : (fieldVal) => {
|
|
19944
|
-
return !fieldVal;
|
|
19945
|
-
};
|
|
19946
|
-
} else if (ccSelectedFilter === "isBetween") {
|
|
19947
|
-
return qb ? qb.between(
|
|
19948
|
-
new Date(arrayFilterValue[0]),
|
|
19949
|
-
new Date(new Date(arrayFilterValue[1]).setHours(23, 59))
|
|
19950
|
-
// set end of day for more accurate filtering
|
|
19951
|
-
) : (fieldVal) => {
|
|
19952
|
-
return dayjs(arrayFilterValue[0]).valueOf() <= dayjs(fieldVal).valueOf() && dayjs(fieldVal).valueOf() <= dayjs(arrayFilterValue[1]).valueOf();
|
|
19953
|
-
};
|
|
19954
|
-
} else if (ccSelectedFilter === "notBetween") {
|
|
19955
|
-
return qb ? qb.notBetween(
|
|
19956
|
-
new Date(arrayFilterValue[0]),
|
|
19957
|
-
new Date(new Date(arrayFilterValue[1]).setHours(23, 59))
|
|
19958
|
-
// set end of day for more accurate filtering
|
|
19959
|
-
) : (fieldVal) => {
|
|
19960
|
-
return dayjs(arrayFilterValue[0]).valueOf() > dayjs(fieldVal).valueOf() || dayjs(fieldVal).valueOf() > dayjs(arrayFilterValue[1]).valueOf();
|
|
19961
|
-
};
|
|
19962
|
-
} else if (ccSelectedFilter === "isBefore") {
|
|
19963
|
-
return qb ? qb.lessThan(new Date(filterValue)) : (fieldVal) => {
|
|
19964
|
-
return dayjs(fieldVal).valueOf() < dayjs(filterValue).valueOf();
|
|
19965
|
-
};
|
|
19966
|
-
} else if (ccSelectedFilter === "isAfter") {
|
|
19967
|
-
return qb ? qb.greaterThan(new Date(new Date(filterValue).setHours(23, 59))) : (fieldVal) => {
|
|
19968
|
-
return dayjs(fieldVal).valueOf() > dayjs(filterValue).valueOf();
|
|
19969
|
-
};
|
|
19970
|
-
} else if (ccSelectedFilter === "greaterThan") {
|
|
19971
|
-
return qb ? qb.greaterThan(filterValue) : (fieldVal) => {
|
|
19972
|
-
return fieldVal > filterValue;
|
|
19973
|
-
};
|
|
19974
|
-
} else if (ccSelectedFilter === "lessThan") {
|
|
19975
|
-
return qb ? qb.lessThan(filterValue) : (fieldVal) => {
|
|
19976
|
-
return fieldVal < filterValue;
|
|
19977
|
-
};
|
|
19978
|
-
} else if (ccSelectedFilter === "inRange") {
|
|
19979
|
-
return qb ? qb.between(filterValue[0], filterValue[1]) : (fieldVal) => {
|
|
19980
|
-
return filterValue[0] <= fieldVal && fieldVal <= filterValue[1];
|
|
19981
|
-
};
|
|
19982
|
-
} else if (ccSelectedFilter === "outsideRange") {
|
|
19983
|
-
return qb ? qb.notBetween(filterValue[0], filterValue[1]) : (fieldVal) => {
|
|
19984
|
-
return filterValue[0] > fieldVal || fieldVal > filterValue[1];
|
|
19985
|
-
};
|
|
19986
|
-
} else if (ccSelectedFilter === "equalTo") {
|
|
19987
|
-
return qb ? filterValue : (fieldVal) => {
|
|
19988
|
-
return fieldVal === filterValue;
|
|
19989
|
-
};
|
|
19990
|
-
} else if (ccSelectedFilter === "regex") {
|
|
19991
|
-
return qb ? qb.matchesRegex(filterValue) : (fieldVal) => {
|
|
19992
|
-
new RegExp(filterValue).test(fieldVal);
|
|
19993
|
-
return fieldVal;
|
|
19994
|
-
};
|
|
19995
|
-
}
|
|
19996
|
-
throw new Error(
|
|
19997
|
-
`Unsupported filter ${selectedFilter}. Please make a new filter if you need one`
|
|
19998
|
-
);
|
|
19999
|
-
}
|
|
20000
|
-
__name(getSubFilter, "getSubFilter");
|
|
20001
19676
|
function getCurrentParamsFromUrl(location2, isSimple) {
|
|
20002
19677
|
let { search: search2 } = location2;
|
|
20003
19678
|
if (isSimple) {
|
|
@@ -20069,22 +19744,6 @@ function parseFilters(newParams) {
|
|
|
20069
19744
|
});
|
|
20070
19745
|
}
|
|
20071
19746
|
__name(parseFilters, "parseFilters");
|
|
20072
|
-
function buildRef(qb, reference2, searchField, expression) {
|
|
20073
|
-
if (reference2.reference) {
|
|
20074
|
-
return qb.related(reference2.target).whereAny({
|
|
20075
|
-
[reference2.sourceField]: buildRef(
|
|
20076
|
-
qb,
|
|
20077
|
-
reference2.reference,
|
|
20078
|
-
searchField,
|
|
20079
|
-
expression
|
|
20080
|
-
)
|
|
20081
|
-
});
|
|
20082
|
-
}
|
|
20083
|
-
return qb.related(reference2.target).whereAny({
|
|
20084
|
-
[searchField]: expression
|
|
20085
|
-
});
|
|
20086
|
-
}
|
|
20087
|
-
__name(buildRef, "buildRef");
|
|
20088
19747
|
function makeDataTableHandlers({
|
|
20089
19748
|
setNewParams,
|
|
20090
19749
|
defaults,
|
|
@@ -20172,40 +19831,18 @@ function makeDataTableHandlers({
|
|
|
20172
19831
|
};
|
|
20173
19832
|
}
|
|
20174
19833
|
__name(makeDataTableHandlers, "makeDataTableHandlers");
|
|
20175
|
-
function cleanupFilter(filter2) {
|
|
20176
|
-
let filterToUse = filter2;
|
|
20177
|
-
if (filterToUse.selectedFilter === "inList" && typeof filterToUse.filterValue === "number") {
|
|
20178
|
-
filterToUse = __spreadProps(__spreadValues({}, filterToUse), {
|
|
20179
|
-
filterValue: filterToUse.filterValue.toString()
|
|
20180
|
-
});
|
|
20181
|
-
}
|
|
20182
|
-
return filterToUse;
|
|
20183
|
-
}
|
|
20184
|
-
__name(cleanupFilter, "cleanupFilter");
|
|
20185
|
-
function getAllFilters(filters, searchTerm, schema) {
|
|
20186
|
-
let allFilters = [
|
|
20187
|
-
...filters,
|
|
20188
|
-
...getFiltersFromSearchTerm(searchTerm, schema)
|
|
20189
|
-
];
|
|
20190
|
-
allFilters = allFilters.filter((val) => {
|
|
20191
|
-
return val !== "";
|
|
20192
|
-
});
|
|
20193
|
-
return allFilters.map(cleanupFilter);
|
|
20194
|
-
}
|
|
20195
|
-
__name(getAllFilters, "getAllFilters");
|
|
20196
19834
|
function getQueryParams({
|
|
20197
19835
|
currentParams,
|
|
20198
|
-
urlConnected,
|
|
19836
|
+
// urlConnected,
|
|
20199
19837
|
defaults,
|
|
20200
19838
|
schema,
|
|
20201
19839
|
isInfinite,
|
|
20202
19840
|
entities,
|
|
20203
19841
|
isLocalCall,
|
|
20204
19842
|
additionalFilter,
|
|
20205
|
-
additionalOrFilter,
|
|
20206
19843
|
doNotCoercePageSize,
|
|
20207
|
-
noOrderError,
|
|
20208
|
-
isCodeModel,
|
|
19844
|
+
// noOrderError,
|
|
19845
|
+
// isCodeModel,
|
|
20209
19846
|
ownProps
|
|
20210
19847
|
}) {
|
|
20211
19848
|
Object.keys(currentParams).forEach(function(key) {
|
|
@@ -20236,224 +19873,36 @@ function getQueryParams({
|
|
|
20236
19873
|
filters,
|
|
20237
19874
|
searchTerm
|
|
20238
19875
|
};
|
|
19876
|
+
const { where, order_by, limit, offset: offset3 } = tableQueryParamsToHasuraClauses({
|
|
19877
|
+
page,
|
|
19878
|
+
pageSize,
|
|
19879
|
+
searchTerm,
|
|
19880
|
+
filters,
|
|
19881
|
+
order: order2,
|
|
19882
|
+
schema
|
|
19883
|
+
});
|
|
19884
|
+
initializeHasuraWhereAndFilter(additionalFilter, where, currentParams);
|
|
19885
|
+
addCustomColumnFilters(where, schema.fields, currentParams);
|
|
20239
19886
|
if (isLocalCall) {
|
|
20240
|
-
|
|
20241
|
-
|
|
20242
|
-
|
|
20243
|
-
|
|
20244
|
-
|
|
20245
|
-
|
|
20246
|
-
|
|
20247
|
-
);
|
|
20248
|
-
newEntities = orderEntitiesLocal(order2, newEntities, schema, ownProps);
|
|
20249
|
-
const entitiesAcrossPages = newEntities;
|
|
20250
|
-
const newEntityCount = newEntities.length;
|
|
20251
|
-
if (!isInfinite && !ownProps.controlled_pageSize) {
|
|
20252
|
-
const offset3 = (page - 1) * pageSize;
|
|
20253
|
-
newEntities = take(drop(newEntities, offset3), pageSize);
|
|
20254
|
-
}
|
|
20255
|
-
toReturn.entities = newEntities;
|
|
20256
|
-
toReturn.entitiesAcrossPages = entitiesAcrossPages;
|
|
20257
|
-
toReturn.entityCount = newEntityCount;
|
|
20258
|
-
return toReturn;
|
|
19887
|
+
return filterLocalEntitiesToHasura(entities, {
|
|
19888
|
+
where,
|
|
19889
|
+
order_by,
|
|
19890
|
+
limit,
|
|
19891
|
+
offset: offset3,
|
|
19892
|
+
isInfinite
|
|
19893
|
+
});
|
|
20259
19894
|
} else {
|
|
20260
|
-
const graphqlQueryParams = {
|
|
20261
|
-
// need to make sure sort exists because of https://github.com/apollographql/apollo-client/issues/3077
|
|
20262
|
-
sort: []
|
|
20263
|
-
};
|
|
20264
|
-
if (isInfinite) {
|
|
20265
|
-
graphqlQueryParams.pageSize = 999;
|
|
20266
|
-
graphqlQueryParams.pageNumber = 1;
|
|
20267
|
-
} else {
|
|
20268
|
-
graphqlQueryParams.pageNumber = Number(page);
|
|
20269
|
-
graphqlQueryParams.pageSize = ownProps.controlled_pageSize || Number(pageSize);
|
|
20270
|
-
}
|
|
20271
|
-
const { model } = schema;
|
|
20272
|
-
if (!window.QueryBuilder) return toReturn;
|
|
20273
|
-
const qb = new window.QueryBuilder(model);
|
|
20274
|
-
const ccFields = getFieldsMappedByCCDisplayName(schema);
|
|
20275
|
-
if (tableQueryParams.order && tableQueryParams.order.length) {
|
|
20276
|
-
tableQueryParams.order.forEach((orderVal) => {
|
|
20277
|
-
const ccDisplayName = orderVal.replace(/^-/gi, "");
|
|
20278
|
-
const schemaForField = ccFields[ccDisplayName];
|
|
20279
|
-
if (schemaForField) {
|
|
20280
|
-
const { path: path2 } = schemaForField;
|
|
20281
|
-
const reversed = ccDisplayName !== orderVal;
|
|
20282
|
-
const prefix2 = reversed ? "-" : "";
|
|
20283
|
-
graphqlQueryParams.sort = [
|
|
20284
|
-
...graphqlQueryParams.sort || [],
|
|
20285
|
-
prefix2 + path2
|
|
20286
|
-
];
|
|
20287
|
-
} else {
|
|
20288
|
-
!noOrderError && console.error(
|
|
20289
|
-
"No schema for field found!",
|
|
20290
|
-
ccDisplayName,
|
|
20291
|
-
JSON.stringify(schema.fields, null, 2)
|
|
20292
|
-
);
|
|
20293
|
-
}
|
|
20294
|
-
});
|
|
20295
|
-
}
|
|
20296
|
-
let errorParsingUrlString;
|
|
20297
|
-
const additionalFilterToUse = additionalFilter(qb, currentParams);
|
|
20298
|
-
let additionalOrFilterToUse = additionalOrFilter(qb, currentParams);
|
|
20299
|
-
if (additionalOrFilterToUse && additionalOrFilterToUse.ignoreSearchTerm) {
|
|
20300
|
-
searchTerm = "";
|
|
20301
|
-
additionalOrFilterToUse = additionalOrFilterToUse.additionalOrFilterToUse;
|
|
20302
|
-
}
|
|
20303
|
-
const allFilters = getAllFilters(filters, searchTerm, schema);
|
|
20304
|
-
const { andFilters, orFilters, otherOrFilters } = getAndAndOrFilters(allFilters);
|
|
20305
|
-
try {
|
|
20306
|
-
const flattenFilters = /* @__PURE__ */ __name((filterObj) => {
|
|
20307
|
-
return flatMap(Object.keys(filterObj), (key) => {
|
|
20308
|
-
return filterObj[key].map((filter2) => ({
|
|
20309
|
-
[key]: filter2
|
|
20310
|
-
}));
|
|
20311
|
-
});
|
|
20312
|
-
}, "flattenFilters");
|
|
20313
|
-
const orFiltersObject = getQueries(orFilters, qb, ccFields);
|
|
20314
|
-
let allOrFilters = flattenFilters(orFiltersObject);
|
|
20315
|
-
otherOrFilters.forEach((orFilters2) => {
|
|
20316
|
-
const otherOrFiltersObject = getQueries(orFilters2, qb, ccFields);
|
|
20317
|
-
allOrFilters = allOrFilters.concat(
|
|
20318
|
-
flattenFilters(otherOrFiltersObject)
|
|
20319
|
-
);
|
|
20320
|
-
});
|
|
20321
|
-
allOrFilters.push(additionalOrFilterToUse);
|
|
20322
|
-
allOrFilters = allOrFilters.filter((obj) => !isEmpty$1(obj));
|
|
20323
|
-
const unflattenedAndQueries = getQueries(andFilters, qb, ccFields);
|
|
20324
|
-
let allAndFilters = flattenFilters(unflattenedAndQueries);
|
|
20325
|
-
allAndFilters.push(additionalFilterToUse);
|
|
20326
|
-
allAndFilters = allAndFilters.filter((obj) => !isEmpty$1(obj));
|
|
20327
|
-
if (allAndFilters.length) {
|
|
20328
|
-
qb.whereAll(...allAndFilters);
|
|
20329
|
-
}
|
|
20330
|
-
if (allOrFilters.length) {
|
|
20331
|
-
qb.andWhereAny(...allOrFilters);
|
|
20332
|
-
}
|
|
20333
|
-
const columnCustomFilters = getColumnCustomFilters(
|
|
20334
|
-
andFilters,
|
|
20335
|
-
qb,
|
|
20336
|
-
ccFields
|
|
20337
|
-
);
|
|
20338
|
-
if (columnCustomFilters.length) {
|
|
20339
|
-
qb.whereAll(...columnCustomFilters);
|
|
20340
|
-
}
|
|
20341
|
-
} catch (e) {
|
|
20342
|
-
if (urlConnected) {
|
|
20343
|
-
errorParsingUrlString = e;
|
|
20344
|
-
console.error(
|
|
20345
|
-
"The following error occurred when trying to build the query params. This is probably due to a malformed URL:",
|
|
20346
|
-
e
|
|
20347
|
-
);
|
|
20348
|
-
} else {
|
|
20349
|
-
console.error("Error building query params from filter:");
|
|
20350
|
-
throw e;
|
|
20351
|
-
}
|
|
20352
|
-
}
|
|
20353
|
-
if (qb.query.filters.length) {
|
|
20354
|
-
graphqlQueryParams.filter = qb.toJSON();
|
|
20355
|
-
}
|
|
20356
|
-
if (!graphqlQueryParams.sort.length) {
|
|
20357
|
-
graphqlQueryParams.sort.push("-updatedAt");
|
|
20358
|
-
}
|
|
20359
|
-
graphqlQueryParams.sort.push(
|
|
20360
|
-
isCodeModel ? "code" : window.__sortId || "id"
|
|
20361
|
-
);
|
|
20362
19895
|
return __spreadProps(__spreadValues({}, toReturn), {
|
|
20363
|
-
|
|
20364
|
-
|
|
20365
|
-
|
|
19896
|
+
variables: {
|
|
19897
|
+
where,
|
|
19898
|
+
order_by,
|
|
19899
|
+
limit,
|
|
19900
|
+
offset: offset3
|
|
19901
|
+
}
|
|
20366
19902
|
});
|
|
20367
19903
|
}
|
|
20368
19904
|
}
|
|
20369
19905
|
__name(getQueryParams, "getQueryParams");
|
|
20370
|
-
function getSubFiltersAndPath(filter2, qb, ccFields) {
|
|
20371
|
-
const { selectedFilter, filterValue, filterOn } = filter2;
|
|
20372
|
-
const fieldSchema = ccFields[filterOn];
|
|
20373
|
-
let filterValueToUse = filterValue;
|
|
20374
|
-
if (fieldSchema) {
|
|
20375
|
-
if (fieldSchema.normalizeFilter) {
|
|
20376
|
-
filterValueToUse = fieldSchema.normalizeFilter(
|
|
20377
|
-
filterValue,
|
|
20378
|
-
selectedFilter,
|
|
20379
|
-
filterOn
|
|
20380
|
-
);
|
|
20381
|
-
}
|
|
20382
|
-
}
|
|
20383
|
-
const _subFilters = getSubFilter(qb, selectedFilter, filterValueToUse);
|
|
20384
|
-
let filterField;
|
|
20385
|
-
if (fieldSchema) {
|
|
20386
|
-
const { path: path2, reference: reference2 } = fieldSchema;
|
|
20387
|
-
if (reference2) {
|
|
20388
|
-
filterField = reference2.sourceField;
|
|
20389
|
-
} else {
|
|
20390
|
-
filterField = path2;
|
|
20391
|
-
}
|
|
20392
|
-
} else if (filterOn === "id") {
|
|
20393
|
-
filterField = filterOn;
|
|
20394
|
-
} else {
|
|
20395
|
-
console.error("Trying to filter on unknown field");
|
|
20396
|
-
}
|
|
20397
|
-
const subFiltersToUse = [];
|
|
20398
|
-
const subFilters = Array.isArray(_subFilters) ? _subFilters : [_subFilters];
|
|
20399
|
-
subFilters.forEach((subFilter) => {
|
|
20400
|
-
let subFilterToUse = subFilter;
|
|
20401
|
-
if (fieldSchema) {
|
|
20402
|
-
const { path: path2, reference: reference2 } = fieldSchema;
|
|
20403
|
-
if (reference2) {
|
|
20404
|
-
subFilterToUse = buildRef(
|
|
20405
|
-
qb,
|
|
20406
|
-
reference2,
|
|
20407
|
-
last$1(path2.split(".")),
|
|
20408
|
-
subFilter
|
|
20409
|
-
);
|
|
20410
|
-
}
|
|
20411
|
-
}
|
|
20412
|
-
subFiltersToUse.push(subFilterToUse);
|
|
20413
|
-
});
|
|
20414
|
-
return {
|
|
20415
|
-
path: filterField,
|
|
20416
|
-
subFilters: subFiltersToUse
|
|
20417
|
-
};
|
|
20418
|
-
}
|
|
20419
|
-
__name(getSubFiltersAndPath, "getSubFiltersAndPath");
|
|
20420
|
-
function getQueries(filters, qb, ccFields) {
|
|
20421
|
-
const subQueries = filters.reduce((acc, filter2) => {
|
|
20422
|
-
if (!filter2) {
|
|
20423
|
-
console.warn("We should always have a filter object!");
|
|
20424
|
-
return acc;
|
|
20425
|
-
}
|
|
20426
|
-
const { filterOn } = filter2;
|
|
20427
|
-
const fieldSchema = ccFields[filterOn];
|
|
20428
|
-
if (!filter2.isSearchTermFilter && (fieldSchema == null ? void 0 : fieldSchema.additionalColumnFilter))
|
|
20429
|
-
return acc;
|
|
20430
|
-
const { path: path2, subFilters } = getSubFiltersAndPath(filter2, qb, ccFields);
|
|
20431
|
-
acc[path2] = subFilters;
|
|
20432
|
-
return acc;
|
|
20433
|
-
}, {});
|
|
20434
|
-
return subQueries;
|
|
20435
|
-
}
|
|
20436
|
-
__name(getQueries, "getQueries");
|
|
20437
|
-
function getColumnCustomFilters(filters, qb, ccFields) {
|
|
20438
|
-
const subQueries = filters.reduce((acc, filter2) => {
|
|
20439
|
-
if (!filter2) {
|
|
20440
|
-
console.warn("We should always have a filter object!");
|
|
20441
|
-
return acc;
|
|
20442
|
-
}
|
|
20443
|
-
const { filterOn } = filter2;
|
|
20444
|
-
const fieldSchema = ccFields[filterOn];
|
|
20445
|
-
if (filter2.isSearchTermFilter || !(fieldSchema == null ? void 0 : fieldSchema.additionalColumnFilter)) {
|
|
20446
|
-
return acc;
|
|
20447
|
-
}
|
|
20448
|
-
const { path: path2, subFilters } = getSubFiltersAndPath(filter2, qb, ccFields);
|
|
20449
|
-
subFilters.forEach((subFilter) => {
|
|
20450
|
-
acc.push(fieldSchema.additionalColumnFilter(qb, subFilter, path2));
|
|
20451
|
-
});
|
|
20452
|
-
return acc;
|
|
20453
|
-
}, []);
|
|
20454
|
-
return subQueries;
|
|
20455
|
-
}
|
|
20456
|
-
__name(getColumnCustomFilters, "getColumnCustomFilters");
|
|
20457
19906
|
function PagingInput({ disabled, onBlur, defaultPage }) {
|
|
20458
19907
|
const [page, setPage] = useState(defaultPage);
|
|
20459
19908
|
const defaultValue2 = useRef(defaultPage);
|
|
@@ -32967,6 +32416,293 @@ const InfoHelper = /* @__PURE__ */ __name((_g) => {
|
|
|
32967
32416
|
toReturn
|
|
32968
32417
|
);
|
|
32969
32418
|
}, "InfoHelper");
|
|
32419
|
+
var dayjs_min$1 = { exports: {} };
|
|
32420
|
+
var dayjs_min = dayjs_min$1.exports;
|
|
32421
|
+
var hasRequiredDayjs_min;
|
|
32422
|
+
function requireDayjs_min() {
|
|
32423
|
+
if (hasRequiredDayjs_min) return dayjs_min$1.exports;
|
|
32424
|
+
hasRequiredDayjs_min = 1;
|
|
32425
|
+
(function(module2, exports2) {
|
|
32426
|
+
!function(t2, e) {
|
|
32427
|
+
module2.exports = e();
|
|
32428
|
+
}(dayjs_min, function() {
|
|
32429
|
+
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) {
|
|
32430
|
+
var e2 = ["th", "st", "nd", "rd"], n3 = t3 % 100;
|
|
32431
|
+
return "[" + t3 + (e2[(n3 - 20) % 10] || e2[n3] || e2[0]) + "]";
|
|
32432
|
+
}, "ordinal") }, m2 = /* @__PURE__ */ __name(function(t3, e2, n3) {
|
|
32433
|
+
var r3 = String(t3);
|
|
32434
|
+
return !r3 || r3.length >= e2 ? t3 : "" + Array(e2 + 1 - r3.length).join(n3) + t3;
|
|
32435
|
+
}, "m"), v2 = { s: m2, z: /* @__PURE__ */ __name(function(t3) {
|
|
32436
|
+
var e2 = -t3.utcOffset(), n3 = Math.abs(e2), r3 = Math.floor(n3 / 60), i3 = n3 % 60;
|
|
32437
|
+
return (e2 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i3, 2, "0");
|
|
32438
|
+
}, "z"), m: /* @__PURE__ */ __name(function t3(e2, n3) {
|
|
32439
|
+
if (e2.date() < n3.date()) return -t3(n3, e2);
|
|
32440
|
+
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);
|
|
32441
|
+
return +(-(r3 + (n3 - i3) / (s3 ? i3 - u3 : u3 - i3)) || 0);
|
|
32442
|
+
}, "t"), a: /* @__PURE__ */ __name(function(t3) {
|
|
32443
|
+
return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3);
|
|
32444
|
+
}, "a"), p: /* @__PURE__ */ __name(function(t3) {
|
|
32445
|
+
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$/, "");
|
|
32446
|
+
}, "p"), u: /* @__PURE__ */ __name(function(t3) {
|
|
32447
|
+
return void 0 === t3;
|
|
32448
|
+
}, "u") }, g2 = "en", D2 = {};
|
|
32449
|
+
D2[g2] = M2;
|
|
32450
|
+
var p2 = "$isDayjsObject", S2 = /* @__PURE__ */ __name(function(t3) {
|
|
32451
|
+
return t3 instanceof _2 || !(!t3 || !t3[p2]);
|
|
32452
|
+
}, "S"), w2 = /* @__PURE__ */ __name(function t3(e2, n3, r3) {
|
|
32453
|
+
var i3;
|
|
32454
|
+
if (!e2) return g2;
|
|
32455
|
+
if ("string" == typeof e2) {
|
|
32456
|
+
var s3 = e2.toLowerCase();
|
|
32457
|
+
D2[s3] && (i3 = s3), n3 && (D2[s3] = n3, i3 = s3);
|
|
32458
|
+
var u3 = e2.split("-");
|
|
32459
|
+
if (!i3 && u3.length > 1) return t3(u3[0]);
|
|
32460
|
+
} else {
|
|
32461
|
+
var a3 = e2.name;
|
|
32462
|
+
D2[a3] = e2, i3 = a3;
|
|
32463
|
+
}
|
|
32464
|
+
return !r3 && i3 && (g2 = i3), i3 || !r3 && g2;
|
|
32465
|
+
}, "t"), O2 = /* @__PURE__ */ __name(function(t3, e2) {
|
|
32466
|
+
if (S2(t3)) return t3.clone();
|
|
32467
|
+
var n3 = "object" == typeof e2 ? e2 : {};
|
|
32468
|
+
return n3.date = t3, n3.args = arguments, new _2(n3);
|
|
32469
|
+
}, "O"), b2 = v2;
|
|
32470
|
+
b2.l = w2, b2.i = S2, b2.w = function(t3, e2) {
|
|
32471
|
+
return O2(t3, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
|
|
32472
|
+
};
|
|
32473
|
+
var _2 = function() {
|
|
32474
|
+
function M3(t3) {
|
|
32475
|
+
this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true;
|
|
32476
|
+
}
|
|
32477
|
+
__name(M3, "M");
|
|
32478
|
+
var m3 = M3.prototype;
|
|
32479
|
+
return m3.parse = function(t3) {
|
|
32480
|
+
this.$d = function(t4) {
|
|
32481
|
+
var e2 = t4.date, n3 = t4.utc;
|
|
32482
|
+
if (null === e2) return /* @__PURE__ */ new Date(NaN);
|
|
32483
|
+
if (b2.u(e2)) return /* @__PURE__ */ new Date();
|
|
32484
|
+
if (e2 instanceof Date) return new Date(e2);
|
|
32485
|
+
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
32486
|
+
var r3 = e2.match($);
|
|
32487
|
+
if (r3) {
|
|
32488
|
+
var i3 = r3[2] - 1 || 0, s3 = (r3[7] || "0").substring(0, 3);
|
|
32489
|
+
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);
|
|
32490
|
+
}
|
|
32491
|
+
}
|
|
32492
|
+
return new Date(e2);
|
|
32493
|
+
}(t3), this.init();
|
|
32494
|
+
}, m3.init = function() {
|
|
32495
|
+
var t3 = this.$d;
|
|
32496
|
+
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();
|
|
32497
|
+
}, m3.$utils = function() {
|
|
32498
|
+
return b2;
|
|
32499
|
+
}, m3.isValid = function() {
|
|
32500
|
+
return !(this.$d.toString() === l2);
|
|
32501
|
+
}, m3.isSame = function(t3, e2) {
|
|
32502
|
+
var n3 = O2(t3);
|
|
32503
|
+
return this.startOf(e2) <= n3 && n3 <= this.endOf(e2);
|
|
32504
|
+
}, m3.isAfter = function(t3, e2) {
|
|
32505
|
+
return O2(t3) < this.startOf(e2);
|
|
32506
|
+
}, m3.isBefore = function(t3, e2) {
|
|
32507
|
+
return this.endOf(e2) < O2(t3);
|
|
32508
|
+
}, m3.$g = function(t3, e2, n3) {
|
|
32509
|
+
return b2.u(t3) ? this[e2] : this.set(n3, t3);
|
|
32510
|
+
}, m3.unix = function() {
|
|
32511
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
32512
|
+
}, m3.valueOf = function() {
|
|
32513
|
+
return this.$d.getTime();
|
|
32514
|
+
}, m3.startOf = function(t3, e2) {
|
|
32515
|
+
var n3 = this, r3 = !!b2.u(e2) || e2, f3 = b2.p(t3), l3 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
32516
|
+
var i3 = b2.w(n3.$u ? Date.UTC(n3.$y, e3, t4) : new Date(n3.$y, e3, t4), n3);
|
|
32517
|
+
return r3 ? i3 : i3.endOf(a2);
|
|
32518
|
+
}, "l"), $2 = /* @__PURE__ */ __name(function(t4, e3) {
|
|
32519
|
+
return b2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n3);
|
|
32520
|
+
}, "$"), y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
|
|
32521
|
+
switch (f3) {
|
|
32522
|
+
case h2:
|
|
32523
|
+
return r3 ? l3(1, 0) : l3(31, 11);
|
|
32524
|
+
case c2:
|
|
32525
|
+
return r3 ? l3(1, M4) : l3(0, M4 + 1);
|
|
32526
|
+
case o2:
|
|
32527
|
+
var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
|
|
32528
|
+
return l3(r3 ? m4 - D3 : m4 + (6 - D3), M4);
|
|
32529
|
+
case a2:
|
|
32530
|
+
case d2:
|
|
32531
|
+
return $2(v3 + "Hours", 0);
|
|
32532
|
+
case u2:
|
|
32533
|
+
return $2(v3 + "Minutes", 1);
|
|
32534
|
+
case s2:
|
|
32535
|
+
return $2(v3 + "Seconds", 2);
|
|
32536
|
+
case i2:
|
|
32537
|
+
return $2(v3 + "Milliseconds", 3);
|
|
32538
|
+
default:
|
|
32539
|
+
return this.clone();
|
|
32540
|
+
}
|
|
32541
|
+
}, m3.endOf = function(t3) {
|
|
32542
|
+
return this.startOf(t3, false);
|
|
32543
|
+
}, m3.$set = function(t3, e2) {
|
|
32544
|
+
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;
|
|
32545
|
+
if (o3 === c2 || o3 === h2) {
|
|
32546
|
+
var y3 = this.clone().set(d2, 1);
|
|
32547
|
+
y3.$d[l3]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
|
|
32548
|
+
} else l3 && this.$d[l3]($2);
|
|
32549
|
+
return this.init(), this;
|
|
32550
|
+
}, m3.set = function(t3, e2) {
|
|
32551
|
+
return this.clone().$set(t3, e2);
|
|
32552
|
+
}, m3.get = function(t3) {
|
|
32553
|
+
return this[b2.p(t3)]();
|
|
32554
|
+
}, m3.add = function(r3, f3) {
|
|
32555
|
+
var d3, l3 = this;
|
|
32556
|
+
r3 = Number(r3);
|
|
32557
|
+
var $2 = b2.p(f3), y3 = /* @__PURE__ */ __name(function(t3) {
|
|
32558
|
+
var e2 = O2(l3);
|
|
32559
|
+
return b2.w(e2.date(e2.date() + Math.round(t3 * r3)), l3);
|
|
32560
|
+
}, "y");
|
|
32561
|
+
if ($2 === c2) return this.set(c2, this.$M + r3);
|
|
32562
|
+
if ($2 === h2) return this.set(h2, this.$y + r3);
|
|
32563
|
+
if ($2 === a2) return y3(1);
|
|
32564
|
+
if ($2 === o2) return y3(7);
|
|
32565
|
+
var M4 = (d3 = {}, d3[s2] = e, d3[u2] = n2, d3[i2] = t2, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4;
|
|
32566
|
+
return b2.w(m4, this);
|
|
32567
|
+
}, m3.subtract = function(t3, e2) {
|
|
32568
|
+
return this.add(-1 * t3, e2);
|
|
32569
|
+
}, m3.format = function(t3) {
|
|
32570
|
+
var e2 = this, n3 = this.$locale();
|
|
32571
|
+
if (!this.isValid()) return n3.invalidDate || l2;
|
|
32572
|
+
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) {
|
|
32573
|
+
return t4 && (t4[n4] || t4(e2, r3)) || i4[n4].slice(0, s4);
|
|
32574
|
+
}, "h"), d3 = /* @__PURE__ */ __name(function(t4) {
|
|
32575
|
+
return b2.s(s3 % 12 || 12, t4, "0");
|
|
32576
|
+
}, "d"), $2 = f3 || function(t4, e3, n4) {
|
|
32577
|
+
var r4 = t4 < 12 ? "AM" : "PM";
|
|
32578
|
+
return n4 ? r4.toLowerCase() : r4;
|
|
32579
|
+
};
|
|
32580
|
+
return r3.replace(y2, function(t4, r4) {
|
|
32581
|
+
return r4 || function(t5) {
|
|
32582
|
+
switch (t5) {
|
|
32583
|
+
case "YY":
|
|
32584
|
+
return String(e2.$y).slice(-2);
|
|
32585
|
+
case "YYYY":
|
|
32586
|
+
return b2.s(e2.$y, 4, "0");
|
|
32587
|
+
case "M":
|
|
32588
|
+
return a3 + 1;
|
|
32589
|
+
case "MM":
|
|
32590
|
+
return b2.s(a3 + 1, 2, "0");
|
|
32591
|
+
case "MMM":
|
|
32592
|
+
return h3(n3.monthsShort, a3, c3, 3);
|
|
32593
|
+
case "MMMM":
|
|
32594
|
+
return h3(c3, a3);
|
|
32595
|
+
case "D":
|
|
32596
|
+
return e2.$D;
|
|
32597
|
+
case "DD":
|
|
32598
|
+
return b2.s(e2.$D, 2, "0");
|
|
32599
|
+
case "d":
|
|
32600
|
+
return String(e2.$W);
|
|
32601
|
+
case "dd":
|
|
32602
|
+
return h3(n3.weekdaysMin, e2.$W, o3, 2);
|
|
32603
|
+
case "ddd":
|
|
32604
|
+
return h3(n3.weekdaysShort, e2.$W, o3, 3);
|
|
32605
|
+
case "dddd":
|
|
32606
|
+
return o3[e2.$W];
|
|
32607
|
+
case "H":
|
|
32608
|
+
return String(s3);
|
|
32609
|
+
case "HH":
|
|
32610
|
+
return b2.s(s3, 2, "0");
|
|
32611
|
+
case "h":
|
|
32612
|
+
return d3(1);
|
|
32613
|
+
case "hh":
|
|
32614
|
+
return d3(2);
|
|
32615
|
+
case "a":
|
|
32616
|
+
return $2(s3, u3, true);
|
|
32617
|
+
case "A":
|
|
32618
|
+
return $2(s3, u3, false);
|
|
32619
|
+
case "m":
|
|
32620
|
+
return String(u3);
|
|
32621
|
+
case "mm":
|
|
32622
|
+
return b2.s(u3, 2, "0");
|
|
32623
|
+
case "s":
|
|
32624
|
+
return String(e2.$s);
|
|
32625
|
+
case "ss":
|
|
32626
|
+
return b2.s(e2.$s, 2, "0");
|
|
32627
|
+
case "SSS":
|
|
32628
|
+
return b2.s(e2.$ms, 3, "0");
|
|
32629
|
+
case "Z":
|
|
32630
|
+
return i3;
|
|
32631
|
+
}
|
|
32632
|
+
return null;
|
|
32633
|
+
}(t4) || i3.replace(":", "");
|
|
32634
|
+
});
|
|
32635
|
+
}, m3.utcOffset = function() {
|
|
32636
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
32637
|
+
}, m3.diff = function(r3, d3, l3) {
|
|
32638
|
+
var $2, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e, g3 = this - m4, D3 = /* @__PURE__ */ __name(function() {
|
|
32639
|
+
return b2.m(y3, m4);
|
|
32640
|
+
}, "D");
|
|
32641
|
+
switch (M4) {
|
|
32642
|
+
case h2:
|
|
32643
|
+
$2 = D3() / 12;
|
|
32644
|
+
break;
|
|
32645
|
+
case c2:
|
|
32646
|
+
$2 = D3();
|
|
32647
|
+
break;
|
|
32648
|
+
case f2:
|
|
32649
|
+
$2 = D3() / 3;
|
|
32650
|
+
break;
|
|
32651
|
+
case o2:
|
|
32652
|
+
$2 = (g3 - v3) / 6048e5;
|
|
32653
|
+
break;
|
|
32654
|
+
case a2:
|
|
32655
|
+
$2 = (g3 - v3) / 864e5;
|
|
32656
|
+
break;
|
|
32657
|
+
case u2:
|
|
32658
|
+
$2 = g3 / n2;
|
|
32659
|
+
break;
|
|
32660
|
+
case s2:
|
|
32661
|
+
$2 = g3 / e;
|
|
32662
|
+
break;
|
|
32663
|
+
case i2:
|
|
32664
|
+
$2 = g3 / t2;
|
|
32665
|
+
break;
|
|
32666
|
+
default:
|
|
32667
|
+
$2 = g3;
|
|
32668
|
+
}
|
|
32669
|
+
return l3 ? $2 : b2.a($2);
|
|
32670
|
+
}, m3.daysInMonth = function() {
|
|
32671
|
+
return this.endOf(c2).$D;
|
|
32672
|
+
}, m3.$locale = function() {
|
|
32673
|
+
return D2[this.$L];
|
|
32674
|
+
}, m3.locale = function(t3, e2) {
|
|
32675
|
+
if (!t3) return this.$L;
|
|
32676
|
+
var n3 = this.clone(), r3 = w2(t3, e2, true);
|
|
32677
|
+
return r3 && (n3.$L = r3), n3;
|
|
32678
|
+
}, m3.clone = function() {
|
|
32679
|
+
return b2.w(this.$d, this);
|
|
32680
|
+
}, m3.toDate = function() {
|
|
32681
|
+
return new Date(this.valueOf());
|
|
32682
|
+
}, m3.toJSON = function() {
|
|
32683
|
+
return this.isValid() ? this.toISOString() : null;
|
|
32684
|
+
}, m3.toISOString = function() {
|
|
32685
|
+
return this.$d.toISOString();
|
|
32686
|
+
}, m3.toString = function() {
|
|
32687
|
+
return this.$d.toUTCString();
|
|
32688
|
+
}, M3;
|
|
32689
|
+
}(), k2 = _2.prototype;
|
|
32690
|
+
return O2.prototype = k2, [["$ms", r2], ["$s", i2], ["$m", s2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) {
|
|
32691
|
+
k2[t3[1]] = function(e2) {
|
|
32692
|
+
return this.$g(e2, t3[0], t3[1]);
|
|
32693
|
+
};
|
|
32694
|
+
}), O2.extend = function(t3, e2) {
|
|
32695
|
+
return t3.$i || (t3(e2, _2, O2), t3.$i = true), O2;
|
|
32696
|
+
}, O2.locale = w2, O2.isDayjs = S2, O2.unix = function(t3) {
|
|
32697
|
+
return O2(1e3 * t3);
|
|
32698
|
+
}, O2.en = D2[g2], O2.Ls = D2, O2.p = {}, O2;
|
|
32699
|
+
});
|
|
32700
|
+
})(dayjs_min$1);
|
|
32701
|
+
return dayjs_min$1.exports;
|
|
32702
|
+
}
|
|
32703
|
+
__name(requireDayjs_min, "requireDayjs_min");
|
|
32704
|
+
var dayjs_minExports = requireDayjs_min();
|
|
32705
|
+
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
|
|
32970
32706
|
var localizedFormat$2 = { exports: {} };
|
|
32971
32707
|
var localizedFormat$1 = localizedFormat$2.exports;
|
|
32972
32708
|
var hasRequiredLocalizedFormat;
|
|
@@ -50757,42 +50493,42 @@ function getFilterMenuItems(dataType) {
|
|
|
50757
50493
|
let filterMenuItems2 = [];
|
|
50758
50494
|
if (dataType === "string") {
|
|
50759
50495
|
filterMenuItems2 = [
|
|
50760
|
-
"
|
|
50761
|
-
"
|
|
50762
|
-
"
|
|
50763
|
-
"
|
|
50764
|
-
"
|
|
50765
|
-
"
|
|
50766
|
-
"
|
|
50767
|
-
"
|
|
50768
|
-
"
|
|
50769
|
-
"
|
|
50496
|
+
"contains",
|
|
50497
|
+
"notContains",
|
|
50498
|
+
"startsWith",
|
|
50499
|
+
"endsWith",
|
|
50500
|
+
"isExactly",
|
|
50501
|
+
"regex",
|
|
50502
|
+
"inList",
|
|
50503
|
+
"notInList",
|
|
50504
|
+
"isEmpty",
|
|
50505
|
+
"notEmpty"
|
|
50770
50506
|
];
|
|
50771
50507
|
} else if (dataType === "lookup") {
|
|
50772
50508
|
filterMenuItems2 = [
|
|
50773
|
-
"
|
|
50774
|
-
"
|
|
50775
|
-
"
|
|
50776
|
-
"
|
|
50777
|
-
"
|
|
50778
|
-
"
|
|
50509
|
+
"contains",
|
|
50510
|
+
"notContains",
|
|
50511
|
+
"startsWith",
|
|
50512
|
+
"endsWith",
|
|
50513
|
+
"isExactly",
|
|
50514
|
+
"regex"
|
|
50779
50515
|
];
|
|
50780
50516
|
} else if (dataType === "boolean") {
|
|
50781
|
-
filterMenuItems2 = ["
|
|
50517
|
+
filterMenuItems2 = ["true", "false"];
|
|
50782
50518
|
} else if (dataType === "number" || dataType === "integer") {
|
|
50783
50519
|
filterMenuItems2 = [
|
|
50784
|
-
"
|
|
50785
|
-
"
|
|
50786
|
-
"
|
|
50787
|
-
"
|
|
50788
|
-
"
|
|
50789
|
-
"
|
|
50790
|
-
"
|
|
50520
|
+
"greaterThan",
|
|
50521
|
+
"lessThan",
|
|
50522
|
+
"inRange",
|
|
50523
|
+
"outsideRange",
|
|
50524
|
+
"equalTo",
|
|
50525
|
+
"inList",
|
|
50526
|
+
"notInList"
|
|
50791
50527
|
];
|
|
50792
50528
|
} else if (dataType === "timestamp") {
|
|
50793
|
-
filterMenuItems2 = ["
|
|
50529
|
+
filterMenuItems2 = ["isBetween", "notBetween", "isBefore", "isAfter"];
|
|
50794
50530
|
}
|
|
50795
|
-
return filterMenuItems2;
|
|
50531
|
+
return filterMenuItems2.map((item) => startCase(item));
|
|
50796
50532
|
}
|
|
50797
50533
|
__name(getFilterMenuItems, "getFilterMenuItems");
|
|
50798
50534
|
const ColumnFilterMenu = /* @__PURE__ */ __name(({
|
|
@@ -56380,20 +56116,15 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
56380
56116
|
props = __spreadValues(__spreadValues({}, props), tableParams);
|
|
56381
56117
|
const queryParams = useMemo(() => {
|
|
56382
56118
|
if (!isTableParamsConnected) {
|
|
56383
|
-
const additionalFilterToUse = typeof props.additionalFilter === "function" ? props.additionalFilter : () => props.additionalFilter;
|
|
56384
|
-
const additionalOrFilterToUse = typeof props.additionalOrFilter === "function" ? props.additionalOrFilter : () => props.additionalOrFilter;
|
|
56385
56119
|
return getQueryParams({
|
|
56386
56120
|
doNotCoercePageSize,
|
|
56387
56121
|
currentParams,
|
|
56388
56122
|
entities: props.entities,
|
|
56389
|
-
// for local table
|
|
56390
|
-
urlConnected,
|
|
56391
56123
|
defaults,
|
|
56392
56124
|
schema: convertedSchema,
|
|
56393
56125
|
isInfinite,
|
|
56394
56126
|
isLocalCall,
|
|
56395
|
-
additionalFilter:
|
|
56396
|
-
additionalOrFilter: additionalOrFilterToUse,
|
|
56127
|
+
additionalFilter: props.additionalFilter,
|
|
56397
56128
|
noOrderError: props.noOrderError,
|
|
56398
56129
|
isCodeModel: props.isCodeModel,
|
|
56399
56130
|
ownProps: props
|
|
@@ -56536,7 +56267,12 @@ const DataTable = /* @__PURE__ */ __name((_I) => {
|
|
|
56536
56267
|
entities,
|
|
56537
56268
|
change: change$1
|
|
56538
56269
|
});
|
|
56539
|
-
}, [
|
|
56270
|
+
}, [
|
|
56271
|
+
entitiesAcrossPages,
|
|
56272
|
+
reduxFormSelectedEntityIdMap,
|
|
56273
|
+
change$1,
|
|
56274
|
+
noExcessiveCheck
|
|
56275
|
+
]);
|
|
56540
56276
|
const [tableConfig, setTableConfig] = useState({ fieldOptions: [] });
|
|
56541
56277
|
useEffect(() => {
|
|
56542
56278
|
if (withDisplayOptions) {
|
|
@@ -71758,7 +71494,6 @@ const useTableParams = /* @__PURE__ */ __name((props) => {
|
|
|
71758
71494
|
var _a;
|
|
71759
71495
|
const {
|
|
71760
71496
|
additionalFilter,
|
|
71761
|
-
additionalOrFilter,
|
|
71762
71497
|
controlled_pageSize,
|
|
71763
71498
|
defaults: _defaults,
|
|
71764
71499
|
doNotCoercePageSize,
|
|
@@ -71866,28 +71601,20 @@ const useTableParams = /* @__PURE__ */ __name((props) => {
|
|
|
71866
71601
|
[controlled_pageSize, defaultsToUse, pageSize, history == null ? void 0 : history.location]
|
|
71867
71602
|
);
|
|
71868
71603
|
const queryParams = useMemo(() => {
|
|
71869
|
-
const additionalFilterToUse = typeof additionalFilter === "function" ? additionalFilter : () => additionalFilter;
|
|
71870
|
-
const additionalOrFilterToUse = typeof additionalOrFilter === "function" ? additionalOrFilter : () => additionalOrFilter;
|
|
71871
71604
|
return getQueryParams({
|
|
71872
71605
|
doNotCoercePageSize,
|
|
71873
71606
|
currentParams,
|
|
71874
71607
|
entities,
|
|
71875
|
-
// for local table
|
|
71876
|
-
urlConnected,
|
|
71877
71608
|
defaults: defaultsToUse,
|
|
71878
71609
|
schema: convertedSchema,
|
|
71879
71610
|
isInfinite: isInfinite || isSimple && !withPaging,
|
|
71880
71611
|
isLocalCall,
|
|
71881
|
-
additionalFilter
|
|
71882
|
-
additionalOrFilter: additionalOrFilterToUse,
|
|
71883
|
-
noOrderError,
|
|
71884
|
-
isCodeModel,
|
|
71612
|
+
additionalFilter,
|
|
71885
71613
|
ownProps: passingProps
|
|
71886
71614
|
});
|
|
71887
71615
|
}, [
|
|
71888
71616
|
additionalFilter,
|
|
71889
71617
|
passingProps,
|
|
71890
|
-
additionalOrFilter,
|
|
71891
71618
|
doNotCoercePageSize,
|
|
71892
71619
|
currentParams,
|
|
71893
71620
|
entities,
|
|
@@ -78064,6 +77791,7 @@ export {
|
|
|
78064
77791
|
getTagsAndTagOptions,
|
|
78065
77792
|
getTextFromEl,
|
|
78066
77793
|
hotkeysById,
|
|
77794
|
+
initializeHasuraWhereAndFilter,
|
|
78067
77795
|
inventoryIcon,
|
|
78068
77796
|
isSafari,
|
|
78069
77797
|
keyboardIcon,
|