@zengenti/contensis-react-base 3.0.0-beta.14 → 3.0.0-beta.18
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/cjs/{App-46ac2129.js → App-9792d455.js} +5 -5
- package/cjs/App-9792d455.js.map +1 -0
- package/cjs/{RouteLoader-5edfed0a.js → RouteLoader-2d908c75.js} +2 -2
- package/cjs/{RouteLoader-5edfed0a.js.map → RouteLoader-2d908c75.js.map} +1 -1
- package/cjs/{ToJs-52c31b19.js → ToJs-6fdfaed6.js} +5 -5
- package/cjs/ToJs-6fdfaed6.js.map +1 -0
- package/cjs/client.js +4 -4
- package/cjs/contensis-react-base.js +4 -4
- package/cjs/{login-899c5a07.js → login-c9f4fcfa.js} +4 -4
- package/cjs/login-c9f4fcfa.js.map +1 -0
- package/cjs/routing.js +2 -2
- package/cjs/search.js +6 -6
- package/cjs/search.js.map +1 -1
- package/cjs/user.js +2 -2
- package/esm/{App-030844f0.js → App-90fd8f7e.js} +5 -5
- package/esm/App-90fd8f7e.js.map +1 -0
- package/esm/{RouteLoader-1c11f8fc.js → RouteLoader-40ab136e.js} +2 -2
- package/esm/{RouteLoader-1c11f8fc.js.map → RouteLoader-40ab136e.js.map} +1 -1
- package/esm/{ToJs-b2cb5be8.js → ToJs-d32b27da.js} +5 -5
- package/esm/ToJs-d32b27da.js.map +1 -0
- package/esm/client.js +5 -5
- package/esm/contensis-react-base.js +5 -5
- package/esm/{login-c6201bd7.js → login-b2e7fa24.js} +4 -4
- package/esm/login-b2e7fa24.js.map +1 -0
- package/esm/routing.js +2 -2
- package/esm/search.js +6 -6
- package/esm/search.js.map +1 -1
- package/esm/user.js +3 -3
- package/models/user/redux/selectors.d.ts +5 -4
- package/package-lock.json +2 -2
- package/package.json +2 -2
- package/cjs/App-46ac2129.js.map +0 -1
- package/cjs/ToJs-52c31b19.js.map +0 -1
- package/cjs/login-899c5a07.js.map +0 -1
- package/esm/App-030844f0.js.map +0 -1
- package/esm/ToJs-b2cb5be8.js.map +0 -1
- package/esm/login-c6201bd7.js.map +0 -1
package/cjs/search.js
CHANGED
|
@@ -930,8 +930,8 @@ const dataFormatExpression = (contentTypeIds, dataFormat = DataFormats.entry) =>
|
|
|
930
930
|
const withExpr = fieldExpression(Fields.sys.contentTypeId, withContentTypeIds)[0];
|
|
931
931
|
const notExpr = contensisCoreApi.Op.not(fieldExpression(Fields.sys.contentTypeId, notContentTypeIds)[0]);
|
|
932
932
|
andExpr.add(dataFormatExpr);
|
|
933
|
-
if (withContentTypeIds.length > 0) andExpr.add(withExpr);
|
|
934
|
-
if (notContentTypeIds.length > 0) andExpr.add(notExpr);
|
|
933
|
+
if (withContentTypeIds.length > 0 && withExpr) andExpr.add(withExpr);
|
|
934
|
+
if (notContentTypeIds.length > 0 && notExpr) andExpr.add(notExpr);
|
|
935
935
|
return [andExpr];
|
|
936
936
|
}
|
|
937
937
|
|
|
@@ -987,8 +987,8 @@ const equalToOrIn = (field, value, operator = 'equalTo') => {
|
|
|
987
987
|
if (value.length === 0) return [];
|
|
988
988
|
|
|
989
989
|
if (Array.isArray(value)) {
|
|
990
|
-
if (
|
|
991
|
-
return [contensisCoreApi.Op.
|
|
990
|
+
if (operator === 'equalTo') return [contensisCoreApi.Op.in(field, ...value)];
|
|
991
|
+
return [contensisCoreApi.Op.or(...value.map(innerValue => contensisCoreApi.Op[operator](field, innerValue, undefined, undefined)))];
|
|
992
992
|
}
|
|
993
993
|
|
|
994
994
|
return [];
|
|
@@ -1068,7 +1068,7 @@ const customWhereExpressions = where => {
|
|
|
1068
1068
|
if (idx === 1 && // operator !== 'and' &&
|
|
1069
1069
|
// operator !== 'or' &&
|
|
1070
1070
|
operator !== 'between' && operator !== 'distanceWithin') {
|
|
1071
|
-
expression = operator === 'freeText' || operator === 'contains' ? contensisCoreApi.Op[operator](field, value) : operator === 'in' ? contensisCoreApi.Op[operator](field, ...value) : contensisCoreApi.Op[operator](field, value);
|
|
1071
|
+
expression = operator === 'freeText' || operator === 'contains' ? contensisCoreApi.Op[operator](field, value) : operator === 'in' ? contensisCoreApi.Op[operator](field, ...value) : operator === 'exists' ? contensisCoreApi.Op[operator](field, value) : contensisCoreApi.Op[operator](field, value);
|
|
1072
1072
|
if (typeof weight === 'number') expression = expression.weight(weight);
|
|
1073
1073
|
}
|
|
1074
1074
|
});
|
|
@@ -1363,7 +1363,7 @@ const filterExpressionMapper = {
|
|
|
1363
1363
|
// Value: so we can filter a specific field by an array of values
|
|
1364
1364
|
// e.g. taxonomy key or contentTypeId array
|
|
1365
1365
|
values: 'selectedValues',
|
|
1366
|
-
|
|
1366
|
+
fieldOperator: 'fieldOperator',
|
|
1367
1367
|
logicOperator: 'logicOperator'
|
|
1368
1368
|
};
|
|
1369
1369
|
|