@budibase/shared-core 2.29.2 → 2.29.4
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/dist/filters.d.ts +2 -2
- package/dist/helpers/integrations.d.ts +1 -1
- package/dist/index.js +18 -8
- package/dist/index.js.map +2 -2
- package/dist/index.js.meta.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
package/dist/filters.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Datasource, BBReferenceFieldSubType, FieldType, FormulaType, SearchFilter, SearchFilters,
|
|
1
|
+
import { Datasource, BBReferenceFieldSubType, FieldType, FormulaType, SearchFilter, SearchFilters, SearchQueryFields, SortType, FieldConstraints, SortOrder, RowSearchParams, SearchResponse } from "@budibase/types";
|
|
2
2
|
/**
|
|
3
3
|
* Returns the valid operator options for a certain data type
|
|
4
4
|
*/
|
|
@@ -16,7 +16,7 @@ export declare const getValidOperatorsForType: (fieldType: {
|
|
|
16
16
|
/**
|
|
17
17
|
* Operators which do not support empty strings as values
|
|
18
18
|
*/
|
|
19
|
-
export declare const NoEmptyFilterStrings: (
|
|
19
|
+
export declare const NoEmptyFilterStrings: (keyof SearchQueryFields)[];
|
|
20
20
|
/**
|
|
21
21
|
* Removes a numeric prefix on field names designed to give fields uniqueness
|
|
22
22
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Datasource, SourceName } from "@budibase/types";
|
|
2
|
-
export declare function isGoogleSheets(type: SourceName):
|
|
2
|
+
export declare function isGoogleSheets(type: SourceName): type is SourceName.GOOGLE_SHEETS;
|
|
3
3
|
export declare function isSQL(datasource: Datasource): boolean;
|
package/dist/index.js
CHANGED
|
@@ -10700,12 +10700,16 @@ var buildQuery = (filter) => {
|
|
|
10700
10700
|
query.equal = query.equal || {};
|
|
10701
10701
|
query.equal[field] = true;
|
|
10702
10702
|
} else {
|
|
10703
|
-
query[queryOperator] =
|
|
10704
|
-
|
|
10703
|
+
query[queryOperator] = {
|
|
10704
|
+
...query[queryOperator],
|
|
10705
|
+
[field]: value
|
|
10706
|
+
};
|
|
10705
10707
|
}
|
|
10706
10708
|
} else {
|
|
10707
|
-
query[queryOperator] =
|
|
10708
|
-
|
|
10709
|
+
query[queryOperator] = {
|
|
10710
|
+
...query[queryOperator],
|
|
10711
|
+
[field]: value
|
|
10712
|
+
};
|
|
10709
10713
|
}
|
|
10710
10714
|
}
|
|
10711
10715
|
});
|
|
@@ -11234,17 +11238,23 @@ function canBeSortColumn(type) {
|
|
|
11234
11238
|
return !!allowSortColumnByType[type];
|
|
11235
11239
|
}
|
|
11236
11240
|
function findDuplicateInternalColumns(table) {
|
|
11237
|
-
const
|
|
11238
|
-
const
|
|
11241
|
+
const casedKeys = Object.keys(table.schema);
|
|
11242
|
+
const uncasedKeys = casedKeys.map((colName) => colName.toLowerCase());
|
|
11243
|
+
const set = new Set(uncasedKeys);
|
|
11239
11244
|
let duplicates = [];
|
|
11240
|
-
if (set.size !==
|
|
11245
|
+
if (set.size !== uncasedKeys.length) {
|
|
11241
11246
|
for (let key of set.keys()) {
|
|
11242
|
-
const count =
|
|
11247
|
+
const count = uncasedKeys.filter((name) => name === key).length;
|
|
11243
11248
|
if (count > 1) {
|
|
11244
11249
|
duplicates.push(key);
|
|
11245
11250
|
}
|
|
11246
11251
|
}
|
|
11247
11252
|
}
|
|
11253
|
+
for (let internalColumn of CONSTANT_INTERNAL_ROW_COLS) {
|
|
11254
|
+
if (casedKeys.find((key) => key === internalColumn)) {
|
|
11255
|
+
duplicates.push(internalColumn);
|
|
11256
|
+
}
|
|
11257
|
+
}
|
|
11248
11258
|
return duplicates;
|
|
11249
11259
|
}
|
|
11250
11260
|
// Annotate the CommonJS export names for ESM import in node:
|