@bento-core/facet-filter 1.0.1-ccdihub.34 → 1.0.1-ccdihub.36
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/FacetFilterController.js +4 -1
- package/dist/NewFacetFilterController.js +192 -0
- package/dist/NewFacetFilterView.js +47 -0
- package/dist/components/facet/FacetView.js +20 -2
- package/dist/components/facet/NewFacetStyle.js +210 -0
- package/dist/components/facet/NewFacetView.js +197 -0
- package/dist/components/facet/NewSearchFacetView.js +218 -0
- package/dist/components/facet/ReduxFacetView.js +10 -7
- package/dist/components/facet/ReduxNewFacetView.js +35 -0
- package/dist/components/facet/ReduxNewSearchFacetView.js +41 -0
- package/dist/components/facet/ReduxSearchFacetView.js +6 -2
- package/dist/components/facet/SearchFacetView.js +20 -2
- package/dist/components/inputs/FilterItems.js +4 -2
- package/dist/components/inputs/slider/InputMinMaxStyle.js +16 -0
- package/dist/components/inputs/slider/InputMinMaxView.js +3 -1
- package/dist/components/inputs/slider/ReduxSlider.js +9 -4
- package/dist/components/inputs/slider/SliderStyle.js +23 -0
- package/dist/components/inputs/slider/SliderView.js +243 -28
- package/dist/index.js +19 -0
- package/dist/store/actions/ActionTypes.js +3 -1
- package/dist/store/actions/Actions.js +18 -2
- package/dist/store/reducers/SideBarReducer.js +47 -4
- package/dist/utils/filter.js +21 -7
- package/package.json +4 -2
- package/src/FacetFilterController.js +3 -0
- package/src/NewFacetFilterController.js +182 -0
- package/src/NewFacetFilterView.js +54 -0
- package/src/components/facet/FacetView.js +20 -1
- package/src/components/facet/NewFacetStyle.js +209 -0
- package/src/components/facet/NewFacetView.js +264 -0
- package/src/components/facet/NewSearchFacetView.js +291 -0
- package/src/components/facet/ReduxFacetView.js +8 -6
- package/src/components/facet/ReduxNewFacetView.js +27 -0
- package/src/components/facet/ReduxNewSearchFacetView.js +35 -0
- package/src/components/facet/ReduxSearchFacetView.js +5 -0
- package/src/components/facet/SearchFacetView.js +20 -1
- package/src/components/inputs/FilterItems.js +2 -1
- package/src/components/inputs/slider/InputMinMaxStyle.js +16 -0
- package/src/components/inputs/slider/InputMinMaxView.js +2 -0
- package/src/components/inputs/slider/ReduxSlider.js +5 -1
- package/src/components/inputs/slider/SliderStyle.js +23 -0
- package/src/components/inputs/slider/SliderView.js +279 -35
- package/src/index.js +3 -1
- package/src/store/actions/ActionTypes.js +2 -0
- package/src/store/actions/Actions.js +16 -0
- package/src/store/reducers/SideBarReducer.js +42 -1
- package/src/utils/filter.js +18 -0
|
@@ -29,7 +29,8 @@ const FacetFilterController = props => {
|
|
|
29
29
|
activeFilters,
|
|
30
30
|
data,
|
|
31
31
|
facetsConfig,
|
|
32
|
-
facetSectionConfig
|
|
32
|
+
facetSectionConfig,
|
|
33
|
+
unknownAgesState
|
|
33
34
|
} = props;
|
|
34
35
|
const filterState = {};
|
|
35
36
|
// console.log(activeFilters);
|
|
@@ -152,8 +153,10 @@ const FacetFilterController = props => {
|
|
|
152
153
|
if (facet.type === _Types.InputTypes.SLIDER) {
|
|
153
154
|
const lowerBound = data[apiForFiltering][ApiLowerBoundName];
|
|
154
155
|
const upperBound = data[apiForFiltering][ApiUpperBoundName];
|
|
156
|
+
const unknownAges = (unknownAgesState === null || unknownAgesState === void 0 ? void 0 : unknownAgesState[facet.datafield]) || 'include';
|
|
155
157
|
updateFacet.minLowerBound = lowerBound;
|
|
156
158
|
updateFacet.maxUpperBound = upperBound;
|
|
159
|
+
updateFacet.unknownAges = unknownAges;
|
|
157
160
|
updateFacet.facetValues = [lowerBound, upperBound];
|
|
158
161
|
updateFacet.style = facet.style;
|
|
159
162
|
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _lodash = _interopRequireDefault(require("lodash"));
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactRedux = require("react-redux");
|
|
10
|
+
var _Types = require("./components/inputs/Types");
|
|
11
|
+
var _NewFacetFilterView = _interopRequireDefault(require("./NewFacetFilterView"));
|
|
12
|
+
const _excluded = ["section"];
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
19
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
21
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
22
|
+
const NewFacetFilterController = props => {
|
|
23
|
+
/**
|
|
24
|
+
* update checkbox state
|
|
25
|
+
* 1. checkbox state
|
|
26
|
+
* 2. subject state
|
|
27
|
+
*/
|
|
28
|
+
const {
|
|
29
|
+
activeFilters,
|
|
30
|
+
data,
|
|
31
|
+
facetsConfig,
|
|
32
|
+
facetSectionConfig,
|
|
33
|
+
selectedSection,
|
|
34
|
+
unknownAgesState
|
|
35
|
+
} = props;
|
|
36
|
+
const filterState = {};
|
|
37
|
+
// console.log(activeFilters);
|
|
38
|
+
for (const [key, value] of Object.entries(activeFilters)) {
|
|
39
|
+
if (key !== 'participant_ids') {
|
|
40
|
+
filterState[key] = value;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const updateFacetState = filterSections => {
|
|
44
|
+
const updateSections = [...filterSections];
|
|
45
|
+
if (!_lodash.default.isEmpty(filterState)) {
|
|
46
|
+
for (const [key, value] of Object.entries(filterState)) {
|
|
47
|
+
updateSections.forEach(sideBar => {
|
|
48
|
+
if (sideBar.type === _Types.InputTypes.CHECKBOX && sideBar.datafield === key) {
|
|
49
|
+
sideBar.facetValues.forEach(item => {
|
|
50
|
+
// item.isChecked = value[item.name] ? value[item.name] : false;
|
|
51
|
+
item.isChecked = value.indexOf(item.name) > -1;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (sideBar.type === _Types.InputTypes.SLIDER && sideBar.datafield === key) {
|
|
55
|
+
sideBar.facetValues = value;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
} else {
|
|
60
|
+
updateSections.forEach(sideBar => {
|
|
61
|
+
if (sideBar.type === _Types.InputTypes.CHECKBOX) {
|
|
62
|
+
sideBar.facetValues.forEach(item => {
|
|
63
|
+
item.isChecked = false;
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* set default value for slider - on clear all filter
|
|
68
|
+
*/
|
|
69
|
+
if (sideBar.type === _Types.InputTypes.SLIDER) {
|
|
70
|
+
const {
|
|
71
|
+
minLowerBound,
|
|
72
|
+
maxUpperBound
|
|
73
|
+
} = sideBar;
|
|
74
|
+
sideBar.facetValues = [minLowerBound, maxUpperBound];
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return updateSections;
|
|
79
|
+
};
|
|
80
|
+
const arrangeBySections = arr => {
|
|
81
|
+
const sideBar = {};
|
|
82
|
+
arr.forEach(_ref => {
|
|
83
|
+
let {
|
|
84
|
+
section
|
|
85
|
+
} = _ref,
|
|
86
|
+
item = _objectWithoutProperties(_ref, _excluded);
|
|
87
|
+
const {
|
|
88
|
+
isExpanded
|
|
89
|
+
} = facetSectionConfig[section];
|
|
90
|
+
if (!sideBar[section]) {
|
|
91
|
+
sideBar[section] = {
|
|
92
|
+
name: section,
|
|
93
|
+
sectionName: section,
|
|
94
|
+
expandSection: isExpanded !== undefined && typeof isExpanded === 'boolean' ? isExpanded : true,
|
|
95
|
+
items: []
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
sideBar[section].items.push(_objectSpread({
|
|
99
|
+
section
|
|
100
|
+
}, item));
|
|
101
|
+
});
|
|
102
|
+
return Object.values(sideBar);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Construct filter object
|
|
107
|
+
* 1. add facet values to facets
|
|
108
|
+
* 2. add 'name' key to each facet value
|
|
109
|
+
*/
|
|
110
|
+
const addFacetValues = facets => {
|
|
111
|
+
const updateFacets = [];
|
|
112
|
+
if (facets) {
|
|
113
|
+
facets.forEach(facet => {
|
|
114
|
+
const updateFacet = _objectSpread(_objectSpread({}, facet), {}, {
|
|
115
|
+
facetValues: []
|
|
116
|
+
});
|
|
117
|
+
const {
|
|
118
|
+
field,
|
|
119
|
+
ApiLowerBoundName,
|
|
120
|
+
ApiUpperBoundName,
|
|
121
|
+
apiForFiltering
|
|
122
|
+
} = updateFacet;
|
|
123
|
+
if (data[apiForFiltering]) {
|
|
124
|
+
if (Array.isArray(data[apiForFiltering])) {
|
|
125
|
+
const validValues = [];
|
|
126
|
+
const updateField = data[apiForFiltering].map(item => {
|
|
127
|
+
const addField = _objectSpread({}, item);
|
|
128
|
+
addField.name = item[field];
|
|
129
|
+
validValues.push(addField.name);
|
|
130
|
+
return addField;
|
|
131
|
+
});
|
|
132
|
+
/**
|
|
133
|
+
* Check if there are orphen filter values and add them to the facet values
|
|
134
|
+
*/
|
|
135
|
+
if (filterState !== undefined) {
|
|
136
|
+
const facetFilter = filterState[facet.datafield];
|
|
137
|
+
if (facetFilter) {
|
|
138
|
+
facetFilter.forEach(item => {
|
|
139
|
+
if (validValues.indexOf(item) === -1) {
|
|
140
|
+
const tmp = {};
|
|
141
|
+
tmp.group = item;
|
|
142
|
+
tmp.name = item;
|
|
143
|
+
tmp.subjects = 0;
|
|
144
|
+
updateField.push(tmp);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
updateFacet.facetValues = updateField;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* add object to facet values
|
|
153
|
+
*/
|
|
154
|
+
if (facet.type === _Types.InputTypes.SLIDER) {
|
|
155
|
+
const lowerBound = data[apiForFiltering][ApiLowerBoundName];
|
|
156
|
+
const upperBound = data[apiForFiltering][ApiUpperBoundName];
|
|
157
|
+
const unknownAges = (unknownAgesState === null || unknownAgesState === void 0 ? void 0 : unknownAgesState[facet.datafield]) || 'include';
|
|
158
|
+
updateFacet.minLowerBound = lowerBound;
|
|
159
|
+
updateFacet.maxUpperBound = upperBound;
|
|
160
|
+
updateFacet.unknownAges = unknownAges;
|
|
161
|
+
updateFacet.facetValues = [lowerBound, upperBound];
|
|
162
|
+
updateFacet.style = facet.style;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
updateFacets.push(updateFacet);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return updateFacets;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Generate facet sections state
|
|
173
|
+
*
|
|
174
|
+
*/
|
|
175
|
+
// const displayFacets = facetsConfig.filter((facet) => facet.show).slice(0, 16);
|
|
176
|
+
const displayFacets = facetsConfig.filter(facet => facet.show);
|
|
177
|
+
const facetStates = addFacetValues(displayFacets);
|
|
178
|
+
const updateState = updateFacetState(facetStates);
|
|
179
|
+
const facetSections = arrangeBySections(updateState);
|
|
180
|
+
const facetSection = facetSections[selectedSection];
|
|
181
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_NewFacetFilterView.default, _extends({}, props, {
|
|
182
|
+
facetSection: facetSection
|
|
183
|
+
})));
|
|
184
|
+
};
|
|
185
|
+
const mapStateToProps = state => {
|
|
186
|
+
var _state$statusReducer;
|
|
187
|
+
return {
|
|
188
|
+
unknownAgesState: (state === null || state === void 0 ? void 0 : (_state$statusReducer = state.statusReducer) === null || _state$statusReducer === void 0 ? void 0 : _state$statusReducer.unknownAgesState) || {}
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
var _default = (0, _reactRedux.connect)(mapStateToProps, null)(NewFacetFilterController);
|
|
192
|
+
exports.default = _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _core = require("@material-ui/core");
|
|
9
|
+
var _FacetFilterStyle = _interopRequireDefault(require("./FacetFilterStyle"));
|
|
10
|
+
var _ReduxNewFacetView = _interopRequireDefault(require("./components/facet/ReduxNewFacetView"));
|
|
11
|
+
var _FilterItems = _interopRequireDefault(require("./components/inputs/FilterItems"));
|
|
12
|
+
var _ReduxNewSearchFacetView = _interopRequireDefault(require("./components/facet/ReduxNewSearchFacetView"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
/* eslint-disable arrow-body-style */
|
|
15
|
+
/* eslint-disable padded-blocks */
|
|
16
|
+
|
|
17
|
+
const BentoFacetFilter = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
facetSection,
|
|
20
|
+
CustomFacetSection,
|
|
21
|
+
CustomFacetView,
|
|
22
|
+
queryParams
|
|
23
|
+
} = _ref;
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, CustomFacetSection && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(CustomFacetSection, {
|
|
25
|
+
section: facetSection,
|
|
26
|
+
expanded: true
|
|
27
|
+
})), facetSection.items.map(facet => {
|
|
28
|
+
if (facet.search) {
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement(_ReduxNewSearchFacetView.default, {
|
|
30
|
+
facet: facet,
|
|
31
|
+
queryParams: queryParams,
|
|
32
|
+
CustomView: CustomFacetView
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_ReduxNewFacetView.default, {
|
|
36
|
+
facet: facet,
|
|
37
|
+
queryParams: queryParams,
|
|
38
|
+
CustomView: CustomFacetView
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement(_core.List, {
|
|
40
|
+
className: "List_".concat(facet.label)
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_FilterItems.default, {
|
|
42
|
+
facet: facet
|
|
43
|
+
})));
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
var _default = (0, _core.withStyles)(_FacetFilterStyle.default)(BentoFacetFilter);
|
|
47
|
+
exports.default = _default;
|
|
@@ -29,8 +29,10 @@ const FacetView = _ref => {
|
|
|
29
29
|
facet,
|
|
30
30
|
onClearFacetSection,
|
|
31
31
|
onClearSliderSection,
|
|
32
|
+
onUnknownAgesChange,
|
|
32
33
|
CustomView,
|
|
33
|
-
queryParams
|
|
34
|
+
queryParams,
|
|
35
|
+
unknownAgesState
|
|
34
36
|
} = _ref;
|
|
35
37
|
const [expand, setExpand] = (0, _react.useState)(facet.expanded !== undefined && typeof facet.expanded === 'boolean' ? facet.expanded : false);
|
|
36
38
|
const onExpandFacet = () => setExpand(!expand);
|
|
@@ -55,11 +57,22 @@ const FacetView = _ref => {
|
|
|
55
57
|
const field = facet.datafield;
|
|
56
58
|
const paramValue = {};
|
|
57
59
|
paramValue[field] = '';
|
|
60
|
+
|
|
61
|
+
// Also clear the corresponding unknownAges parameter if it exists
|
|
62
|
+
const unknownAgesField = "".concat(field, "_unknownAges");
|
|
63
|
+
if (queryParams.includes(unknownAgesField)) {
|
|
64
|
+
paramValue[unknownAgesField] = '';
|
|
65
|
+
}
|
|
58
66
|
const queryStr = (0, _util.generateQueryStr)(query, queryParams, paramValue);
|
|
59
67
|
navigate("/explore".concat(queryStr), {
|
|
60
68
|
replace: true
|
|
61
69
|
});
|
|
62
70
|
setSortBy(null);
|
|
71
|
+
|
|
72
|
+
// Reset the corresponding unknownAges parameter in Redux state
|
|
73
|
+
if (queryParams.includes(unknownAgesField) && onUnknownAgesChange) {
|
|
74
|
+
onUnknownAgesChange(field, 'include');
|
|
75
|
+
}
|
|
63
76
|
if (facet.type === _Types.InputTypes.SLIDER) {
|
|
64
77
|
onClearSliderSection(facet);
|
|
65
78
|
} else {
|
|
@@ -76,7 +89,12 @@ const FacetView = _ref => {
|
|
|
76
89
|
const selectedItems = facetValues && facetValues.filter(item => item.isChecked);
|
|
77
90
|
const displayFacet = _objectSpread({}, facet);
|
|
78
91
|
displayFacet.facetValues = selectedItems;
|
|
79
|
-
|
|
92
|
+
|
|
93
|
+
// Check if facet is active based on selected items or unknown ages selection
|
|
94
|
+
const hasSelectedItems = [...selectedItems].length > 0;
|
|
95
|
+
const unknownAges = (unknownAgesState === null || unknownAgesState === void 0 ? void 0 : unknownAgesState[facet.datafield]) || 'include';
|
|
96
|
+
const hasUnknownAgesSelection = unknownAges !== 'include';
|
|
97
|
+
const isActiveFacet = hasSelectedItems || type === _Types.InputTypes.SLIDER && hasUnknownAgesSelection;
|
|
80
98
|
const limitCheckBoxCount = (facet === null || facet === void 0 ? void 0 : facet.showCheckboxCount) || 5;
|
|
81
99
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.Accordion, {
|
|
82
100
|
square: true,
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _Search_Icon = _interopRequireDefault(require("./assets/Search_Icon.svg"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
var _default = () => ({
|
|
10
|
+
expansionPanelDetailsRoot: {
|
|
11
|
+
display: 'block'
|
|
12
|
+
},
|
|
13
|
+
expansionPanelsideBarItem: {
|
|
14
|
+
boxShadow: 'none',
|
|
15
|
+
marginTop: '8px',
|
|
16
|
+
margin: 'auto',
|
|
17
|
+
position: 'initial',
|
|
18
|
+
'&:before': {
|
|
19
|
+
position: 'initial'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
subSectionSummaryText: {
|
|
23
|
+
marginLeft: '10px',
|
|
24
|
+
lineHeight: 0,
|
|
25
|
+
color: '#323232',
|
|
26
|
+
fontFamily: 'Raleway',
|
|
27
|
+
fontSize: '13px',
|
|
28
|
+
fontWeight: 'bold',
|
|
29
|
+
letterSpacing: '0.25px'
|
|
30
|
+
},
|
|
31
|
+
sortGroup: {
|
|
32
|
+
paddingTop: '10px',
|
|
33
|
+
marginBottom: '5px',
|
|
34
|
+
textAlign: 'left',
|
|
35
|
+
marginLeft: '-5px',
|
|
36
|
+
borderTop: 'none',
|
|
37
|
+
display: 'flex',
|
|
38
|
+
alignItems: 'center'
|
|
39
|
+
},
|
|
40
|
+
sortGroupIcon: {
|
|
41
|
+
cursor: 'pointer',
|
|
42
|
+
fontFamily: 'Nunito',
|
|
43
|
+
fontSize: '10px',
|
|
44
|
+
marginRight: '12px',
|
|
45
|
+
marginLeft: '24px'
|
|
46
|
+
},
|
|
47
|
+
sortGroupItem: {
|
|
48
|
+
cursor: 'pointer',
|
|
49
|
+
fontFamily: 'Nunito',
|
|
50
|
+
fontSize: '10px',
|
|
51
|
+
marginRight: '32px'
|
|
52
|
+
},
|
|
53
|
+
NonSortGroup: {
|
|
54
|
+
marginBottom: '5px',
|
|
55
|
+
borderTop: '1px solid #B1B1B1',
|
|
56
|
+
textAlign: 'left',
|
|
57
|
+
paddingLeft: '10px'
|
|
58
|
+
},
|
|
59
|
+
NonSortGroupItem: {
|
|
60
|
+
fontFamily: 'Nunito',
|
|
61
|
+
fontSize: '10px',
|
|
62
|
+
marginRight: '32px'
|
|
63
|
+
},
|
|
64
|
+
sortGroupItemCounts: {
|
|
65
|
+
cursor: 'pointer',
|
|
66
|
+
fontFamily: 'Nunito',
|
|
67
|
+
fontSize: '10px',
|
|
68
|
+
float: 'right',
|
|
69
|
+
marginRight: '10px',
|
|
70
|
+
marginTop: '5px'
|
|
71
|
+
},
|
|
72
|
+
highlight: {
|
|
73
|
+
color: '#b2c6d6'
|
|
74
|
+
},
|
|
75
|
+
showMore: {
|
|
76
|
+
textAlign: 'right',
|
|
77
|
+
paddingRight: '5px',
|
|
78
|
+
cursor: 'pointer',
|
|
79
|
+
fontSize: '10px',
|
|
80
|
+
width: '100%'
|
|
81
|
+
},
|
|
82
|
+
searchContainer: {
|
|
83
|
+
display: 'flex',
|
|
84
|
+
justifyContent: 'center',
|
|
85
|
+
position: 'relative'
|
|
86
|
+
},
|
|
87
|
+
searchBox: {
|
|
88
|
+
fontSize: '11px',
|
|
89
|
+
fontFamily: 'Nunito',
|
|
90
|
+
width: 'calc(100% - 26px)',
|
|
91
|
+
height: '30px',
|
|
92
|
+
marginTop: '12px',
|
|
93
|
+
borderRadius: '5px',
|
|
94
|
+
background: "url(".concat(_Search_Icon.default, ") right 5px center no-repeat"),
|
|
95
|
+
marginLeft: '6px',
|
|
96
|
+
border: '1px solid',
|
|
97
|
+
padding: '5px'
|
|
98
|
+
},
|
|
99
|
+
searchBoxWithText: {
|
|
100
|
+
fontSize: '11px',
|
|
101
|
+
fontFamily: 'Nunito',
|
|
102
|
+
width: 'calc(100% - 26px)',
|
|
103
|
+
height: '30px',
|
|
104
|
+
marginTop: '12px',
|
|
105
|
+
borderRadius: '5px',
|
|
106
|
+
marginLeft: '6px',
|
|
107
|
+
border: '1px solid',
|
|
108
|
+
padding: '5px'
|
|
109
|
+
},
|
|
110
|
+
expandedDisplayButton: {
|
|
111
|
+
backgroundColor: '#4D889E !important',
|
|
112
|
+
color: 'white',
|
|
113
|
+
width: 'calc(100% - 26px)',
|
|
114
|
+
height: '30px',
|
|
115
|
+
marginBottom: '5px',
|
|
116
|
+
marginLeft: '6px',
|
|
117
|
+
borderRadius: '5px',
|
|
118
|
+
fontSize: '12px',
|
|
119
|
+
fontWeight: '600',
|
|
120
|
+
top: '8px'
|
|
121
|
+
},
|
|
122
|
+
clearTextButton: {
|
|
123
|
+
padding: '0px',
|
|
124
|
+
height: '20px',
|
|
125
|
+
position: 'absolute',
|
|
126
|
+
right: '14px',
|
|
127
|
+
top: '14px'
|
|
128
|
+
},
|
|
129
|
+
timeUnitToggle: {
|
|
130
|
+
marginLeft: '8px',
|
|
131
|
+
marginRight: '20px',
|
|
132
|
+
height: '32px',
|
|
133
|
+
'& .MuiToggleButtonGroup-grouped': {
|
|
134
|
+
borderRadius: '8px',
|
|
135
|
+
'&:not(:first-child)': {
|
|
136
|
+
marginLeft: '0px',
|
|
137
|
+
borderLeft: '1px solid #D3D3D3',
|
|
138
|
+
borderTopLeftRadius: '0px',
|
|
139
|
+
borderBottomLeftRadius: '0px'
|
|
140
|
+
},
|
|
141
|
+
'&:not(:last-child)': {
|
|
142
|
+
borderTopRightRadius: '0px',
|
|
143
|
+
borderBottomRightRadius: '0px'
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
toggleButton: props => {
|
|
148
|
+
const primaryColor = props.facet && props.facet.style && props.facet.style.colorPrimary ? props.facet.style.colorPrimary.color : '#3f51b5';
|
|
149
|
+
return {
|
|
150
|
+
fontFamily: 'Poppins !important',
|
|
151
|
+
fontSize: '11px !important',
|
|
152
|
+
fontWeight: '400 !important',
|
|
153
|
+
fontStyle: 'normal !important',
|
|
154
|
+
lineHeight: '100% !important',
|
|
155
|
+
letterSpacing: '0.02em !important',
|
|
156
|
+
padding: '6px 24px',
|
|
157
|
+
textTransform: 'uppercase !important',
|
|
158
|
+
border: '1px solid #D3D3D3',
|
|
159
|
+
borderRadius: '8px',
|
|
160
|
+
backgroundColor: '#EDEDED',
|
|
161
|
+
color: '#000000',
|
|
162
|
+
'& .MuiToggleButton-label': {
|
|
163
|
+
fontFamily: 'Poppins !important',
|
|
164
|
+
fontSize: '11px !important',
|
|
165
|
+
fontWeight: '400 !important',
|
|
166
|
+
lineHeight: '100% !important',
|
|
167
|
+
letterSpacing: '0.02em !important',
|
|
168
|
+
textTransform: 'uppercase !important'
|
|
169
|
+
},
|
|
170
|
+
'&:hover': {
|
|
171
|
+
backgroundColor: '#E0E0E0'
|
|
172
|
+
},
|
|
173
|
+
'&.Mui-disabled': {
|
|
174
|
+
backgroundColor: '#F5F5F5',
|
|
175
|
+
color: '#BDBDBD',
|
|
176
|
+
border: '1px solid #E0E0E0',
|
|
177
|
+
cursor: 'not-allowed',
|
|
178
|
+
'& .MuiToggleButton-label': {
|
|
179
|
+
color: '#BDBDBD'
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
'&.Mui-selected': {
|
|
183
|
+
backgroundColor: primaryColor,
|
|
184
|
+
color: '#FFFFFF',
|
|
185
|
+
'& .MuiToggleButton-label': {
|
|
186
|
+
fontFamily: 'Poppins !important',
|
|
187
|
+
fontSize: '11px !important',
|
|
188
|
+
fontWeight: '400 !important',
|
|
189
|
+
lineHeight: '100% !important',
|
|
190
|
+
letterSpacing: '0.02em !important',
|
|
191
|
+
textTransform: 'uppercase !important'
|
|
192
|
+
},
|
|
193
|
+
'&:hover': {
|
|
194
|
+
backgroundColor: primaryColor
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
toggleButtonSelected: props => {
|
|
200
|
+
const primaryColor = props.facet && props.facet.style && props.facet.style.colorPrimary ? props.facet.style.colorPrimary.color : '#3f51b5';
|
|
201
|
+
return {
|
|
202
|
+
backgroundColor: primaryColor,
|
|
203
|
+
color: '#FFFFFF !important',
|
|
204
|
+
'&:hover': {
|
|
205
|
+
backgroundColor: primaryColor
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
exports.default = _default;
|