@zengenti/contensis-react-base 3.0.2-beta.9 → 3.1.1-beta.0
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/README.md +38 -2
- package/cjs/{App-81a45001.js → App-555eebb0.js} +70 -34
- package/cjs/App-555eebb0.js.map +1 -0
- package/cjs/{login-51b66359.js → ChangePassword.container-f3f94d8f.js} +246 -84
- package/cjs/ChangePassword.container-f3f94d8f.js.map +1 -0
- package/cjs/{ContensisDeliveryApi-de88df2a.js → ContensisDeliveryApi-ea5ffdc2.js} +162 -122
- package/cjs/ContensisDeliveryApi-ea5ffdc2.js.map +1 -0
- package/cjs/CookieConstants-000427db.js +10 -0
- package/cjs/CookieConstants-000427db.js.map +1 -0
- package/cjs/{RouteLoader-47d70a26.js → RouteLoader-014a95b9.js} +8 -5
- package/cjs/RouteLoader-014a95b9.js.map +1 -0
- package/cjs/{ToJs-61c03582.js → ToJs-64970869.js} +49 -2
- package/cjs/ToJs-64970869.js.map +1 -0
- package/cjs/_commonjsHelpers-b3309d7b.js +11 -0
- package/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
- package/cjs/client.js +14 -12
- package/cjs/client.js.map +1 -1
- package/cjs/contensis-react-base.js +47 -361
- package/cjs/contensis-react-base.js.map +1 -1
- package/cjs/forms.js +3495 -127
- package/cjs/forms.js.map +1 -1
- package/cjs/redux.js +3 -4
- package/cjs/redux.js.map +1 -1
- package/cjs/routing.js +4 -3
- package/cjs/routing.js.map +1 -1
- package/cjs/{sagas-6d12e7ca.js → sagas-e04b94c1.js} +44 -20
- package/cjs/sagas-e04b94c1.js.map +1 -0
- package/cjs/search.js +13 -13
- package/cjs/search.js.map +1 -1
- package/cjs/{selectors-c76c2676.js → selectors-8e56cc34.js} +14 -13
- package/cjs/selectors-8e56cc34.js.map +1 -0
- package/cjs/user.js +33 -159
- package/cjs/user.js.map +1 -1
- package/cjs/util.js +6 -4
- package/cjs/util.js.map +1 -1
- package/cjs/{version-886f49d8.js → version-91b90ee8.js} +3 -3
- package/cjs/{version-886f49d8.js.map → version-91b90ee8.js.map} +1 -1
- package/cjs/{version-38afaf2a.js → version-fb4ba30b.js} +16 -24
- package/cjs/version-fb4ba30b.js.map +1 -0
- package/esm/{App-5f914483.js → App-aaea6310.js} +64 -29
- package/esm/App-aaea6310.js.map +1 -0
- package/esm/{login-4d07c2de.js → ChangePassword.container-724c8e0a.js} +229 -78
- package/esm/ChangePassword.container-724c8e0a.js.map +1 -0
- package/esm/ContensisDeliveryApi-fe53fa10.js +265 -0
- package/esm/ContensisDeliveryApi-fe53fa10.js.map +1 -0
- package/esm/CookieConstants-3d3b6531.js +6 -0
- package/esm/CookieConstants-3d3b6531.js.map +1 -0
- package/esm/{RouteLoader-f5d5f733.js → RouteLoader-fe64ca81.js} +8 -5
- package/esm/RouteLoader-fe64ca81.js.map +1 -0
- package/esm/{ToJs-0066e629.js → ToJs-c75473e9.js} +49 -3
- package/esm/ToJs-c75473e9.js.map +1 -0
- package/esm/_commonjsHelpers-1789f0cf.js +8 -0
- package/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
- package/esm/client.js +15 -13
- package/esm/client.js.map +1 -1
- package/esm/contensis-react-base.js +46 -361
- package/esm/contensis-react-base.js.map +1 -1
- package/esm/forms.js +3497 -129
- package/esm/forms.js.map +1 -1
- package/esm/redux.js +6 -7
- package/esm/redux.js.map +1 -1
- package/esm/routing.js +4 -3
- package/esm/routing.js.map +1 -1
- package/esm/{sagas-53d2aefb.js → sagas-933a8fc8.js} +44 -20
- package/esm/sagas-933a8fc8.js.map +1 -0
- package/esm/search.js +14 -14
- package/esm/search.js.map +1 -1
- package/esm/{selectors-3f0d804d.js → selectors-0fe67d47.js} +14 -14
- package/esm/selectors-0fe67d47.js.map +1 -0
- package/esm/user.js +21 -151
- package/esm/user.js.map +1 -1
- package/esm/util.js +4 -4
- package/esm/{version-dd31c7f0.js → version-7ea8bea8.js} +17 -24
- package/esm/version-7ea8bea8.js.map +1 -0
- package/esm/{version-f4629693.js → version-f42f7bdc.js} +3 -3
- package/esm/{version-f4629693.js.map → version-f42f7bdc.js.map} +1 -1
- package/models/client/client.d.ts +1 -1
- package/models/config.d.ts +4 -4
- package/models/redux/appstate.d.ts +2 -1
- package/models/routing/redux/actions.d.ts +10 -6
- package/models/routing/redux/selectors.d.ts +5 -4
- package/models/routing/redux/types.d.ts +0 -1
- package/models/routing/routes.d.ts +20 -17
- package/models/routing/util/queries.d.ts +3 -2
- package/models/search/models/Queries.d.ts +9 -10
- package/models/search/models/Search.d.ts +26 -24
- package/models/search/models/SearchActions.d.ts +36 -36
- package/models/search/models/SearchState.d.ts +11 -11
- package/models/search/models/SearchUtil.d.ts +1 -1
- package/models/search/models/WithSearch.d.ts +1 -1
- package/models/search/redux/actions.d.ts +7 -7
- package/models/search/redux/selectors.d.ts +27 -27
- package/models/search/redux/types.d.ts +21 -21
- package/models/search/redux/util.d.ts +2 -2
- package/models/search/search/ContensisDeliveryApi.d.ts +1 -1
- package/models/search/search/expressions.d.ts +4 -4
- package/models/search/search/util.d.ts +2 -2
- package/models/search/transformations/state-to-queryparams.mapper.d.ts +1 -1
- package/models/server/features/linkdepth-api/LinkDepthSearchService.d.ts +1 -1
- package/models/server/features/linkdepth-api/search.d.ts +3 -3
- package/models/server/internalServer.d.ts +7 -5
- package/models/server/util/bundles.d.ts +2 -2
- package/models/server/util/handleExceptions.d.ts +1 -1
- package/models/testImmer/redux/reducer.d.ts +1 -1
- package/models/user/components/Login.d.ts +2 -3
- package/models/user/containers/ChangePassword.container.d.ts +2 -2
- package/models/user/containers/ForgotPassword.container.d.ts +2 -2
- package/models/user/containers/Login.container.d.ts +2 -2
- package/models/user/containers/Registration.container.d.ts +2 -2
- package/models/user/hocs/withLogin.d.ts +5 -11
- package/models/user/hocs/withRegistration.d.ts +2 -8
- package/models/user/redux/actions.d.ts +2 -2
- package/models/user/redux/sagas/login.d.ts +9 -8
- package/models/user/redux/selectors.d.ts +4 -4
- package/models/user/util/CookieConstants.d.ts +8 -0
- package/models/user/util/CookieHelper.class.d.ts +15 -3
- package/models/user/util/LoginHelper.class.d.ts +27 -23
- package/models/util/CachedDeliveryApi.d.ts +25 -0
- package/models/util/ContensisDeliveryApi.d.ts +20 -44
- package/models/util/LruCache.d.ts +12 -0
- package/models/util/ToJs.d.ts +1 -1
- package/models/util/index.d.ts +1 -1
- package/models/util/json-mapper.d.ts +1 -1
- package/package.json +10 -11
- package/cjs/App-81a45001.js.map +0 -1
- package/cjs/ContensisDeliveryApi-de88df2a.js.map +0 -1
- package/cjs/RouteLoader-47d70a26.js.map +0 -1
- package/cjs/ToJs-61c03582.js.map +0 -1
- package/cjs/login-51b66359.js.map +0 -1
- package/cjs/sagas-6d12e7ca.js.map +0 -1
- package/cjs/selectors-c76c2676.js.map +0 -1
- package/cjs/version-38afaf2a.js.map +0 -1
- package/esm/App-5f914483.js.map +0 -1
- package/esm/ContensisDeliveryApi-ad06857d.js +0 -227
- package/esm/ContensisDeliveryApi-ad06857d.js.map +0 -1
- package/esm/RouteLoader-f5d5f733.js.map +0 -1
- package/esm/ToJs-0066e629.js.map +0 -1
- package/esm/login-4d07c2de.js.map +0 -1
- package/esm/sagas-53d2aefb.js.map +0 -1
- package/esm/selectors-3f0d804d.js.map +0 -1
- package/esm/version-dd31c7f0.js.map +0 -1
package/esm/redux.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { n as navigation$2, v as version$1, G as GET_NODE_TREE, e as version$3 } from './version-
|
|
2
|
-
export { r as store } from './version-
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
import { v as version$2, n as navigation$3 } from './version-
|
|
6
|
-
export { c as convertSagaArray, b as injectReducer, i as injectRedux, d as injectSaga, u as useInjectRedux } from './version-
|
|
1
|
+
import { n as navigation$2, v as version$1, G as GET_NODE_TREE, e as version$3 } from './version-7ea8bea8.js';
|
|
2
|
+
export { r as store } from './version-7ea8bea8.js';
|
|
3
|
+
import { F as routing$1, E as action, G as routing$2, H as routing$3 } from './selectors-0fe67d47.js';
|
|
4
|
+
export { E as action, g as getIn, I as getJS } from './selectors-0fe67d47.js';
|
|
5
|
+
import { v as version$2, n as navigation$3 } from './version-f42f7bdc.js';
|
|
6
|
+
export { c as convertSagaArray, b as injectReducer, i as injectRedux, d as injectSaga, u as useInjectRedux } from './version-f42f7bdc.js';
|
|
7
7
|
import 'redux';
|
|
8
8
|
import 'redux-thunk';
|
|
9
9
|
import 'redux-saga';
|
|
10
10
|
import 'redux-injectors';
|
|
11
11
|
import 'immer';
|
|
12
|
-
import 'deepmerge';
|
|
13
12
|
import './reducers-3d5c37d1.js';
|
|
14
13
|
import 'jsonpath-mapper';
|
|
15
14
|
import 'query-string';
|
package/esm/redux.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redux.js","sources":["../src/redux/types/index.js","../src/redux/actions/navigation.js","../src/redux/actions/index.js","../src/redux/selectors/index.js","../src/redux/index.ts"],"sourcesContent":["import * as navigation from './navigation';\nimport * as routing from '~/routing/redux/types';\nimport * as version from './version';\n\nexport default { navigation, routing, version };\n","import { action } from '../util';\n\nimport { GET_NODE_TREE } from '~/redux/types/navigation';\n\nexport const loadNavigationTree = () => action(GET_NODE_TREE);\n","import * as navigation from './navigation';\nimport * as routing from '~/routing/redux/actions';\nimport * as version from './version';\n\nexport default { navigation, routing, version };\n","import * as navigation from './navigation';\nimport * as routing from '~/routing/redux/selectors';\nimport * as version from './version';\n\nexport default { navigation, routing, version };\n","import types from './types';\nimport actions from './actions';\nimport selectors from './selectors';\n\nexport { action, getJS, getImmutableOrJS as getIn } from './util';\n\nexport { reduxStore as store } from './store/store';\n\nexport {\n convertSagaArray,\n injectRedux,\n injectReducer,\n injectSaga,\n useInjectRedux,\n} from './store/injectors';\n\n// Remap the objects so they are presented in \"feature\" hierarchy\n// e.g. { routing: { types, actions }, navigation: { types, actions } }\n// instead of { types: { routing, navigation }, actions: { routing, navigation } }\n\nexport const navigation = {\n types: types.navigation,\n actions: actions.navigation,\n selectors: selectors.navigation,\n};\nexport const routing = {\n types: types.routing,\n actions: actions.routing,\n selectors: selectors.routing,\n};\nexport const version = {\n types: types.version,\n actions: actions.version,\n selectors: selectors.version,\n};\n"],"names":["navigation","routing","version","loadNavigationTree","action","GET_NODE_TREE","types","actions","selectors"],"mappings":"
|
|
1
|
+
{"version":3,"file":"redux.js","sources":["../src/redux/types/index.js","../src/redux/actions/navigation.js","../src/redux/actions/index.js","../src/redux/selectors/index.js","../src/redux/index.ts"],"sourcesContent":["import * as navigation from './navigation';\nimport * as routing from '~/routing/redux/types';\nimport * as version from './version';\n\nexport default { navigation, routing, version };\n","import { action } from '../util';\n\nimport { GET_NODE_TREE } from '~/redux/types/navigation';\n\nexport const loadNavigationTree = () => action(GET_NODE_TREE);\n","import * as navigation from './navigation';\nimport * as routing from '~/routing/redux/actions';\nimport * as version from './version';\n\nexport default { navigation, routing, version };\n","import * as navigation from './navigation';\nimport * as routing from '~/routing/redux/selectors';\nimport * as version from './version';\n\nexport default { navigation, routing, version };\n","import types from './types';\nimport actions from './actions';\nimport selectors from './selectors';\n\nexport { action, getJS, getImmutableOrJS as getIn } from './util';\n\nexport { reduxStore as store } from './store/store';\n\nexport {\n convertSagaArray,\n injectRedux,\n injectReducer,\n injectSaga,\n useInjectRedux,\n} from './store/injectors';\n\n// Remap the objects so they are presented in \"feature\" hierarchy\n// e.g. { routing: { types, actions }, navigation: { types, actions } }\n// instead of { types: { routing, navigation }, actions: { routing, navigation } }\n\nexport const navigation = {\n types: types.navigation,\n actions: actions.navigation,\n selectors: selectors.navigation,\n};\nexport const routing = {\n types: types.routing,\n actions: actions.routing,\n selectors: selectors.routing,\n};\nexport const version = {\n types: types.version,\n actions: actions.version,\n selectors: selectors.version,\n};\n"],"names":["navigation","routing","version","loadNavigationTree","action","GET_NODE_TREE","types","actions","selectors"],"mappings":";;;;;;;;;;;;;;;;AAIA,YAAe;cAAEA,YAAU;WAAEC,SAAO;AAAEC,WAAAA,SAAAA;AAAQ,CAAC;;ACAxC,MAAMC,kBAAkB,GAAGA,MAAMC,MAAM,CAACC,aAAa,CAAC;;;;;;;ACA7D,cAAe;cAAEL,YAAU;WAAEC,SAAO;AAAEC,WAAAA,SAAAA;AAAQ,CAAC;;ACA/C,gBAAe;cAAEF,YAAU;WAAEC,SAAO;AAAEC,WAAAA,SAAAA;AAAQ,CAAC;;ACY/C;AACA;AACA;;AAEO,MAAMF,UAAU,GAAG;EACxBM,KAAK,EAAEA,KAAK,CAACN,UAAU;EACvBO,OAAO,EAAEA,OAAO,CAACP,UAAU;EAC3BQ,SAAS,EAAEA,SAAS,CAACR,UAAAA;AACvB,EAAC;AACM,MAAMC,OAAO,GAAG;EACrBK,KAAK,EAAEA,KAAK,CAACL,OAAO;EACpBM,OAAO,EAAEA,OAAO,CAACN,OAAO;EACxBO,SAAS,EAAEA,SAAS,CAACP,OAAAA;AACvB,EAAC;AACM,MAAMC,OAAO,GAAG;EACrBI,KAAK,EAAEA,KAAK,CAACJ,OAAO;EACpBK,OAAO,EAAEA,OAAO,CAACL,OAAO;EACxBM,SAAS,EAAEA,SAAS,CAACN,OAAAA;AACvB;;;;"}
|
package/esm/routing.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { R as RouteLoader } from './RouteLoader-
|
|
1
|
+
export { G as actions, H as selectors, F as types } from './selectors-0fe67d47.js';
|
|
2
|
+
export { R as RouteLoader } from './RouteLoader-fe64ca81.js';
|
|
3
3
|
import 'jsonpath-mapper';
|
|
4
4
|
import 'query-string';
|
|
5
5
|
import 'react';
|
|
6
|
+
import 'react-cookie';
|
|
6
7
|
import 'react-redux';
|
|
7
8
|
import 'react-hot-loader';
|
|
8
9
|
import 'react-router-dom';
|
|
9
10
|
import 'react-router-config';
|
|
10
11
|
import 'reselect';
|
|
11
|
-
import './ToJs-
|
|
12
|
+
import './ToJs-c75473e9.js';
|
|
12
13
|
//# sourceMappingURL=routing.js.map
|
package/esm/routing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"routing.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -111,18 +111,18 @@ const clearFilters$1 = filterKey => {
|
|
|
111
111
|
filterKey
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
|
-
const updatePageIndex$1 = (pageIndex,
|
|
114
|
+
const updatePageIndex$1 = (pageIndex, scrollToElement) => {
|
|
115
115
|
return {
|
|
116
116
|
type: UPDATE_PAGE_INDEX,
|
|
117
117
|
pageIndex,
|
|
118
|
-
|
|
118
|
+
scrollToElement
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
|
-
const updatePageSize$1 = (pageSize,
|
|
121
|
+
const updatePageSize$1 = (pageSize, scrollToElement) => {
|
|
122
122
|
return {
|
|
123
123
|
type: UPDATE_PAGE_SIZE,
|
|
124
124
|
pageSize,
|
|
125
|
-
|
|
125
|
+
scrollToElement
|
|
126
126
|
};
|
|
127
127
|
};
|
|
128
128
|
const updateCurrentFacet$1 = facet => {
|
|
@@ -143,13 +143,13 @@ const updateSearchTerm$1 = term => {
|
|
|
143
143
|
term
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
|
-
const updateSelectedFilters = (filter, key, isUnknownItem = false,
|
|
146
|
+
const updateSelectedFilters = (filter, key, isUnknownItem = false, scrollToElement) => {
|
|
147
147
|
return {
|
|
148
148
|
type: UPDATE_SELECTED_FILTERS,
|
|
149
149
|
filter,
|
|
150
150
|
key,
|
|
151
151
|
isUnknownItem,
|
|
152
|
-
|
|
152
|
+
scrollToElement
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
155
|
const updateSortOrder$1 = (orderBy, facet) => {
|
|
@@ -1021,7 +1021,7 @@ const customWhereExpressions = where => {
|
|
|
1021
1021
|
});
|
|
1022
1022
|
};
|
|
1023
1023
|
const makeJsExpression = (operator, field, value) => operator === 'freeText' || operator === 'contains' ? Op[operator](field, value) : operator === 'in' ? Op[operator](field, ...value) : operator === 'exists' ? Op[operator](field, value) : operator === 'between' ? Op[operator](field, value[0], value[1]) : operator === 'distanceWithin' ? Op[operator](field, value === null || value === void 0 ? void 0 : value.lat, value === null || value === void 0 ? void 0 : value.lon, value === null || value === void 0 ? void 0 : value.distance) : Op[operator](field, value);
|
|
1024
|
-
const termExpressions = (searchTerm, weightedSearchFields, fuzzySearch) => {
|
|
1024
|
+
const termExpressions = (searchTerm, weightedSearchFields, fuzzySearch, omitSearchFields = []) => {
|
|
1025
1025
|
if (searchTerm && weightedSearchFields && weightedSearchFields.length > 0) {
|
|
1026
1026
|
// Extract any phrases in quotes to array
|
|
1027
1027
|
const quotedPhrases = extractQuotedPhrases(searchTerm);
|
|
@@ -1069,11 +1069,25 @@ const termExpressions = (searchTerm, weightedSearchFields, fuzzySearch) => {
|
|
|
1069
1069
|
});
|
|
1070
1070
|
|
|
1071
1071
|
// Wrap operators in an Or operator
|
|
1072
|
-
|
|
1072
|
+
const expressions = Op.or().addRange(operators);
|
|
1073
|
+
if (!omitSearchFields.find(sf => sf === Fields.searchContent))
|
|
1074
|
+
// include "searchContent" field by default unless omitted
|
|
1075
|
+
return [expressions.add(Op.freeText(Fields.searchContent, searchTerm, fuzzySearch))];else return [expressions];
|
|
1073
1076
|
} else if (searchTerm) {
|
|
1074
1077
|
// Searching without weightedSearchFields defined will fall back
|
|
1075
1078
|
// to a default set of search fields with arbritary weights set.
|
|
1076
|
-
|
|
1079
|
+
|
|
1080
|
+
const exp = [];
|
|
1081
|
+
if (!omitSearchFields.find(sf => sf === Fields.entryTitle)) {
|
|
1082
|
+
exp.push(Op.equalTo(Fields.entryTitle, searchTerm).weight(10));
|
|
1083
|
+
exp.push(Op.freeText(Fields.entryTitle, searchTerm, fuzzySearch).weight(2));
|
|
1084
|
+
}
|
|
1085
|
+
if (!omitSearchFields.find(sf => sf === Fields.entryDescription)) exp.push(Op.freeText(Fields.entryDescription, searchTerm, fuzzySearch).weight(2));
|
|
1086
|
+
if (!omitSearchFields.find(sf => sf === Fields.keywords)) exp.push(Op.contains(Fields.keywords, searchTerm).weight(2));
|
|
1087
|
+
if (!omitSearchFields.find(sf => sf === Fields.sys.uri)) exp.push(Op.contains(Fields.sys.uri, searchTerm).weight(2));
|
|
1088
|
+
if (!omitSearchFields.find(sf => sf === Fields.sys.allUris)) exp.push(Op.contains(Fields.sys.allUris, searchTerm));
|
|
1089
|
+
if (!omitSearchFields.find(sf => sf === Fields.searchContent)) exp.push(Op.freeText(Fields.searchContent, searchTerm, fuzzySearch));
|
|
1090
|
+
return [Op.or(...exp)];
|
|
1077
1091
|
} else {
|
|
1078
1092
|
return [];
|
|
1079
1093
|
}
|
|
@@ -1116,13 +1130,14 @@ const searchQuery = ({
|
|
|
1116
1130
|
languages,
|
|
1117
1131
|
pageSize,
|
|
1118
1132
|
pageIndex,
|
|
1133
|
+
omitDefaultSearchFields,
|
|
1119
1134
|
orderBy,
|
|
1120
1135
|
searchTerm,
|
|
1121
1136
|
versionStatus,
|
|
1122
1137
|
webpageTemplates,
|
|
1123
1138
|
weightedSearchFields
|
|
1124
1139
|
}, isFeatured = false) => {
|
|
1125
|
-
let expressions = [...termExpressions(searchTerm, weightedSearchFields, fuzzySearch), ...defaultExpressions(versionStatus), ...includeInSearchExpressions(webpageTemplates, includeInSearchFields), ...languagesExpression(languages), ...customWhereExpressions(customWhere), ...excludeIdsExpression(excludeIds)];
|
|
1140
|
+
let expressions = [...termExpressions(searchTerm, weightedSearchFields, fuzzySearch, omitDefaultSearchFields), ...defaultExpressions(versionStatus), ...includeInSearchExpressions(webpageTemplates, includeInSearchFields), ...languagesExpression(languages), ...customWhereExpressions(customWhere), ...excludeIdsExpression(excludeIds)];
|
|
1126
1141
|
if (isFeatured) expressions = [...expressions, ...featuredResultsExpression(featuredResults)];
|
|
1127
1142
|
if (!isFeatured || featuredResults && !featuredResults.contentTypeId) expressions = [...expressions, ...filterExpressions(filters), ...contentTypeIdExpression(contentTypeIds, webpageTemplates, assetTypes)];
|
|
1128
1143
|
const query = new Query(...expressions);
|
|
@@ -1358,6 +1373,7 @@ const queryParamsTemplate = {
|
|
|
1358
1373
|
}) => action.defaultLang ? [action.defaultLang] : [],
|
|
1359
1374
|
linkDepth: root => getQueryParameter(root, 'linkDepth', 0),
|
|
1360
1375
|
loadMorePaging: root => getQueryParameter(root, 'loadMorePaging', false),
|
|
1376
|
+
omitDefaultSearchFields: root => getQueryParameter(root, 'omitDefaultSearchFields', []),
|
|
1361
1377
|
orderBy: root => getQueryParameter(root, 'orderBy', []),
|
|
1362
1378
|
pageIndex: root => {
|
|
1363
1379
|
const {
|
|
@@ -1391,7 +1407,7 @@ const queryParamsTemplate = {
|
|
|
1391
1407
|
context
|
|
1392
1408
|
}) => {
|
|
1393
1409
|
var _getFacet;
|
|
1394
|
-
return ((_getFacet = getFacet(state, facet, context)) === null || _getFacet === void 0 ? void 0 : _getFacet.projectId) || selectCurrentProject(state);
|
|
1410
|
+
return ((_getFacet = getFacet(state, facet, context, 'js')) === null || _getFacet === void 0 ? void 0 : _getFacet.projectId) || selectCurrentProject(state);
|
|
1395
1411
|
},
|
|
1396
1412
|
searchTerm: root => root.context !== Context.minilist || getQueryParameter(root, 'useSearchTerm', false) ? getSearchTerm(root.state) : '',
|
|
1397
1413
|
selectedFilters: ({
|
|
@@ -1512,8 +1528,16 @@ const debugExecuteSearch = (action, state) => {
|
|
|
1512
1528
|
console.log(stateParams, queryParams);
|
|
1513
1529
|
console.log('getSelectedFilters', getSelectedFilters(action.ogState || state, action.facet, action.context, 'js'), 'params', action.params);
|
|
1514
1530
|
};
|
|
1515
|
-
const
|
|
1516
|
-
if (typeof window !== 'undefined')
|
|
1531
|
+
const scrollTo = scrollToElement => {
|
|
1532
|
+
if (typeof window !== 'undefined') {
|
|
1533
|
+
if (typeof scrollToElement === 'number')
|
|
1534
|
+
// Used to be Y coordinate, deprecated, because it's not accessible
|
|
1535
|
+
console.warn('updatePageIndex arg2 needs string');else if (typeof scrollToElement === 'string') {
|
|
1536
|
+
/* Effectively simulates an anchor link. Needed for accessibility, as window.scrollTo
|
|
1537
|
+
does not change focus, only scrolls the screen */
|
|
1538
|
+
window.location.href = `${location.pathname}${location.search}#${scrollToElement}`;
|
|
1539
|
+
}
|
|
1540
|
+
}
|
|
1517
1541
|
};
|
|
1518
1542
|
|
|
1519
1543
|
// *** FILTER ITEM MAPPING ***
|
|
@@ -1893,34 +1917,34 @@ function* updatePageIndex(action) {
|
|
|
1893
1917
|
const {
|
|
1894
1918
|
pageIndex,
|
|
1895
1919
|
mappers,
|
|
1896
|
-
|
|
1920
|
+
scrollToElement
|
|
1897
1921
|
} = action;
|
|
1898
1922
|
const uri = yield buildUri({
|
|
1899
1923
|
pageIndex
|
|
1900
1924
|
}, mappers);
|
|
1901
1925
|
yield put(navigate(uri));
|
|
1902
|
-
if (typeof
|
|
1926
|
+
if (typeof scrollToElement !== 'undefined') scrollTo(scrollToElement);
|
|
1903
1927
|
}
|
|
1904
1928
|
function* updatePageSize(action) {
|
|
1905
1929
|
const {
|
|
1906
1930
|
pageSize,
|
|
1907
1931
|
mappers,
|
|
1908
|
-
|
|
1932
|
+
scrollToElement
|
|
1909
1933
|
} = action;
|
|
1910
1934
|
const uri = yield buildUri({
|
|
1911
1935
|
pageSize
|
|
1912
1936
|
}, mappers);
|
|
1913
1937
|
yield put(navigate(uri));
|
|
1914
|
-
if (typeof
|
|
1938
|
+
if (typeof scrollToElement !== 'undefined') scrollTo(scrollToElement);
|
|
1915
1939
|
}
|
|
1916
1940
|
function* applySearchFilter(action) {
|
|
1917
1941
|
const {
|
|
1918
1942
|
mappers,
|
|
1919
|
-
|
|
1943
|
+
scrollToElement
|
|
1920
1944
|
} = action;
|
|
1921
1945
|
const uri = yield buildUri({}, mappers);
|
|
1922
1946
|
yield put(navigate(uri));
|
|
1923
|
-
if (typeof
|
|
1947
|
+
if (typeof scrollToElement !== 'undefined') scrollTo(scrollToElement);
|
|
1924
1948
|
}
|
|
1925
1949
|
function* buildUri({
|
|
1926
1950
|
facet,
|
|
@@ -1956,4 +1980,4 @@ function* triggerSearchSsr(options) {
|
|
|
1956
1980
|
}
|
|
1957
1981
|
|
|
1958
1982
|
export { EXECUTE_SEARCH as $, clearFilters$1 as A, updateCurrentFacet$1 as B, updateCurrentTab$1 as C, updatePageIndex$1 as D, updatePageSize$1 as E, updateSearchTerm$1 as F, updateSelectedFilters as G, updateSortOrder$1 as H, selectListing as I, mapStateToSearchUri as J, Context as K, selectFacets as L, triggerSearch as M, getFilters as N, toArray as O, UPDATE_SELECTED_FILTERS as P, UPDATE_SEARCH_TERM as Q, UPDATE_PAGE_SIZE as R, UPDATE_PAGE_INDEX as S, SET_SEARCH_FILTERS as T, UPDATE_SORT_ORDER as U, SET_SEARCH_ENTRIES as V, SET_ROUTE_FILTERS as W, LOAD_FILTERS_COMPLETE as X, LOAD_FILTERS_ERROR as Y, LOAD_FILTERS as Z, EXECUTE_SEARCH_ERROR as _, customWhereExpressions as a, CLEAR_FILTERS as a0, APPLY_CONFIG as a1, actions as a2, selectors as a3, types as a4, expressions as a5, queries as a6, doSearch as a7, setRouteFilters as a8, searchSagas as a9, triggerListingSsr as aa, triggerMinilistSsr as ab, triggerSearchSsr as ac, routeParams as ad, getPageIndex as b, contentTypeIdExpression as c, defaultExpressions as d, getCurrentTab as e, filterExpressions as f, getCurrentFacet as g, getFacet as h, getTabFacets as i, getFacetsTotalCount as j, getFacetTitles as k, getFeaturedResults as l, getRenderableFilters as m, getIsLoading as n, orderByExpression as o, getPaging as p, getPageIsLoading as q, getResults as r, getSearchTerm as s, termExpressions as t, getSearchTotalCount as u, getSelectedFilters as v, getQueryParameter as w, getTabsAndFacets as x, getTotalCount as y, withMappers as z };
|
|
1959
|
-
//# sourceMappingURL=sagas-
|
|
1983
|
+
//# sourceMappingURL=sagas-933a8fc8.js.map
|