@4alldigital/foundation-ui--gamma 1.31.13 → 1.31.14
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/index.esm.js
CHANGED
|
@@ -973,7 +973,7 @@ function Search(_a) {
|
|
|
973
973
|
resultsFields: {},
|
|
974
974
|
alwaysSearchOnInitialLoad: true,
|
|
975
975
|
initialPlaceholder: 'Search...',
|
|
976
|
-
} : _c, _d = _a.facetDisplay, facetDisplay = _d === void 0 ? [] : _d, _e = _a.noSidebar, noSidebar = _e === void 0 ? false : _e, customConnector = _a.customConnector, showPagingInfo = _a.showPagingInfo, gridClasses = _a.gridClasses;
|
|
976
|
+
} : _c, _d = _a.facetDisplay, facetDisplay = _d === void 0 ? [] : _d, _e = _a.noSidebar, noSidebar = _e === void 0 ? false : _e, customConnector = _a.customConnector, showPagingInfo = _a.showPagingInfo, gridClasses = _a.gridClasses, _f = _a.initialState, initialState = _f === void 0 ? {} : _f, _g = _a.showTextSearch, showTextSearch = _g === void 0 ? true : _g;
|
|
977
977
|
var connector = useMemo(function () {
|
|
978
978
|
var defaultConnector = {
|
|
979
979
|
host: process.env.REACT_APP_ELASTICSEARCH_HOST,
|
|
@@ -1021,9 +1021,7 @@ function Search(_a) {
|
|
|
1021
1021
|
// size: 4,
|
|
1022
1022
|
// },
|
|
1023
1023
|
},
|
|
1024
|
-
initialState: {
|
|
1025
|
-
resultsPerPage: (showOptions === null || showOptions === void 0 ? void 0 : showOptions[0]) || 8,
|
|
1026
|
-
},
|
|
1024
|
+
initialState: __assign({ resultsPerPage: (showOptions === null || showOptions === void 0 ? void 0 : showOptions[0]) || 8 }, initialState),
|
|
1027
1025
|
};
|
|
1028
1026
|
}, [config]);
|
|
1029
1027
|
return (jsx(SearchProvider, { config: searchConfig, children: jsx(WithSearch, { mapContextToProps: function (_a) {
|
|
@@ -1033,7 +1031,7 @@ function Search(_a) {
|
|
|
1033
1031
|
});
|
|
1034
1032
|
}, children: function (_a) {
|
|
1035
1033
|
var wasSearched = _a.wasSearched;
|
|
1036
|
-
return (jsx("div", { className: "App", children: jsx(ErrorBoundary, { children: jsx(Layout, { header: jsx(SearchBox$1, { view: function (props) { return (jsx(SearchBox, __assign({}, props, { wasSearched: wasSearched, placeholder: config.initialPlaceholder }))); } }), sideContent: !noSidebar &&
|
|
1034
|
+
return (jsx("div", { className: "App", children: jsx(ErrorBoundary, { children: jsx(Layout, { header: showTextSearch && (jsx(SearchBox$1, { view: function (props) { return (jsx(SearchBox, __assign({}, props, { wasSearched: wasSearched, placeholder: config.initialPlaceholder }))); } })), sideContent: !noSidebar &&
|
|
1037
1035
|
facetDisplay && (jsxs("div", { children: [wasSearched && jsx(Sorting$1, { label: 'Sort by', sortOptions: sortOptions, view: Sorting }), facetDisplay === null || facetDisplay === void 0 ? void 0 : facetDisplay.map(function (_a) {
|
|
1038
1036
|
var field = _a.field, label = _a.label, view = _a.view;
|
|
1039
1037
|
return (jsx(Facet, { field: field, label: label, view: view }, field));
|
package/dist/index.js
CHANGED
|
@@ -975,7 +975,7 @@ function Search(_a) {
|
|
|
975
975
|
resultsFields: {},
|
|
976
976
|
alwaysSearchOnInitialLoad: true,
|
|
977
977
|
initialPlaceholder: 'Search...',
|
|
978
|
-
} : _c, _d = _a.facetDisplay, facetDisplay = _d === void 0 ? [] : _d, _e = _a.noSidebar, noSidebar = _e === void 0 ? false : _e, customConnector = _a.customConnector, showPagingInfo = _a.showPagingInfo, gridClasses = _a.gridClasses;
|
|
978
|
+
} : _c, _d = _a.facetDisplay, facetDisplay = _d === void 0 ? [] : _d, _e = _a.noSidebar, noSidebar = _e === void 0 ? false : _e, customConnector = _a.customConnector, showPagingInfo = _a.showPagingInfo, gridClasses = _a.gridClasses, _f = _a.initialState, initialState = _f === void 0 ? {} : _f, _g = _a.showTextSearch, showTextSearch = _g === void 0 ? true : _g;
|
|
979
979
|
var connector = React.useMemo(function () {
|
|
980
980
|
var defaultConnector = {
|
|
981
981
|
host: process.env.REACT_APP_ELASTICSEARCH_HOST,
|
|
@@ -1023,9 +1023,7 @@ function Search(_a) {
|
|
|
1023
1023
|
// size: 4,
|
|
1024
1024
|
// },
|
|
1025
1025
|
},
|
|
1026
|
-
initialState: {
|
|
1027
|
-
resultsPerPage: (showOptions === null || showOptions === void 0 ? void 0 : showOptions[0]) || 8,
|
|
1028
|
-
},
|
|
1026
|
+
initialState: __assign({ resultsPerPage: (showOptions === null || showOptions === void 0 ? void 0 : showOptions[0]) || 8 }, initialState),
|
|
1029
1027
|
};
|
|
1030
1028
|
}, [config]);
|
|
1031
1029
|
return (jsxRuntime.jsx(reactSearchUi.SearchProvider, { config: searchConfig, children: jsxRuntime.jsx(reactSearchUi.WithSearch, { mapContextToProps: function (_a) {
|
|
@@ -1035,7 +1033,7 @@ function Search(_a) {
|
|
|
1035
1033
|
});
|
|
1036
1034
|
}, children: function (_a) {
|
|
1037
1035
|
var wasSearched = _a.wasSearched;
|
|
1038
|
-
return (jsxRuntime.jsx("div", { className: "App", children: jsxRuntime.jsx(reactSearchUi.ErrorBoundary, { children: jsxRuntime.jsx(Layout, { header: jsxRuntime.jsx(reactSearchUi.SearchBox, { view: function (props) { return (jsxRuntime.jsx(SearchBox, __assign({}, props, { wasSearched: wasSearched, placeholder: config.initialPlaceholder }))); } }), sideContent: !noSidebar &&
|
|
1036
|
+
return (jsxRuntime.jsx("div", { className: "App", children: jsxRuntime.jsx(reactSearchUi.ErrorBoundary, { children: jsxRuntime.jsx(Layout, { header: showTextSearch && (jsxRuntime.jsx(reactSearchUi.SearchBox, { view: function (props) { return (jsxRuntime.jsx(SearchBox, __assign({}, props, { wasSearched: wasSearched, placeholder: config.initialPlaceholder }))); } })), sideContent: !noSidebar &&
|
|
1039
1037
|
facetDisplay && (jsxRuntime.jsxs("div", { children: [wasSearched && jsxRuntime.jsx(reactSearchUi.Sorting, { label: 'Sort by', sortOptions: sortOptions, view: Sorting }), facetDisplay === null || facetDisplay === void 0 ? void 0 : facetDisplay.map(function (_a) {
|
|
1040
1038
|
var field = _a.field, label = _a.label, view = _a.view;
|
|
1041
1039
|
return (jsxRuntime.jsx(reactSearchUi.Facet, { field: field, label: label, view: view }, field));
|
|
@@ -2,4 +2,4 @@ import React from 'react';
|
|
|
2
2
|
import '@elastic/eui/dist/eui_theme_light.css';
|
|
3
3
|
import '@elastic/react-search-ui-views/lib/styles/styles.css';
|
|
4
4
|
import { Props } from './Search.types';
|
|
5
|
-
export default function Search({ showOptions, sortOptions, resultAs, ResultFieldMap, config, facetDisplay, noSidebar, customConnector, showPagingInfo, gridClasses, }: Props): React.ReactElement;
|
|
5
|
+
export default function Search({ showOptions, sortOptions, resultAs, ResultFieldMap, config, facetDisplay, noSidebar, customConnector, showPagingInfo, gridClasses, initialState, showTextSearch, }: Props): React.ReactElement;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { RequestState } from '@elastic/search-ui';
|
|
2
3
|
import { cardMap } from './views/Result/Result.types';
|
|
3
4
|
export declare enum ResultAsTypes {
|
|
4
5
|
cardBasic = "cardBasic",
|
|
@@ -33,5 +34,7 @@ export interface Props {
|
|
|
33
34
|
};
|
|
34
35
|
showPagingInfo?: boolean;
|
|
35
36
|
gridClasses?: string;
|
|
37
|
+
initialState?: RequestState;
|
|
38
|
+
showTextSearch?: boolean;
|
|
36
39
|
}
|
|
37
40
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4alldigital/foundation-ui--gamma",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.14",
|
|
4
4
|
"description": "Foundation UI Component library with GAMMA theme. ",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "b3293e1df3b173a349c6c090cef9b99fb511b223",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@elastic/datemath": "^5.0.3",
|
|
31
31
|
"@elastic/eui": "^94.1.0",
|