@bento-core/facet-filter 1.0.1-ccdihub.30 → 1.0.1-ccdihub.31
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.
|
@@ -85,7 +85,7 @@ const SearchFacetView = _ref => {
|
|
|
85
85
|
className: classes.NonSortGroup
|
|
86
86
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
87
87
|
className: classes.NonSortGroupItem
|
|
88
|
-
}, "No data for this field")), /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
+
}, "No data for this field")), facetValues.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
89
89
|
className: classes.searchContainer
|
|
90
90
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
91
91
|
className: searchText && searchText.trim() !== '' ? classes.searchBoxWithText : classes.searchBox,
|
|
@@ -105,7 +105,7 @@ const SearchFacetView = _ref => {
|
|
|
105
105
|
})
|
|
106
106
|
}, /*#__PURE__*/_react.default.createElement(_Close.default, {
|
|
107
107
|
fontSize: "small"
|
|
108
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
108
|
+
}))), facetValues.length > 0 && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
109
109
|
className: classes.sortGroup
|
|
110
110
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
111
111
|
className: classes.sortGroupIcon
|
|
@@ -119,7 +119,7 @@ const SearchFacetView = _ref => {
|
|
|
119
119
|
height: 12,
|
|
120
120
|
width: 12,
|
|
121
121
|
alt: "clear-icon"
|
|
122
|
-
}))),
|
|
122
|
+
}))), /*#__PURE__*/_react.default.createElement("span", {
|
|
123
123
|
className: (0, _clsx.default)(classes.sortGroupItem, {
|
|
124
124
|
[classes.highlight]: sortBy === _Sort.sortType.ALPHABET
|
|
125
125
|
}),
|
|
@@ -133,12 +133,12 @@ const SearchFacetView = _ref => {
|
|
|
133
133
|
onClick: () => {
|
|
134
134
|
onSortChange(facet.datafield, _Sort.sortType.NUMERIC);
|
|
135
135
|
}
|
|
136
|
-
}, "Sort by count"))
|
|
136
|
+
}, "Sort by count")), /*#__PURE__*/_react.default.createElement(_SearchFilterItems.default, {
|
|
137
137
|
searchText: searchText,
|
|
138
138
|
facet: facet,
|
|
139
139
|
queryParams: queryParams,
|
|
140
140
|
sortBy: sortBy
|
|
141
|
-
})), !expand && type === _Types.InputTypes.CHECKBOX && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.List, {
|
|
141
|
+
}))), !expand && type === _Types.InputTypes.CHECKBOX && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.List, {
|
|
142
142
|
id: "filter_Items"
|
|
143
143
|
}, /*#__PURE__*/_react.default.createElement(_FilterItems.default, {
|
|
144
144
|
facet: displayFacet,
|
|
@@ -32,7 +32,8 @@ const FacetSectionView = _ref => {
|
|
|
32
32
|
root: classes.expansionPanelsideBarItem
|
|
33
33
|
}
|
|
34
34
|
}, CustomSection ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(CustomSection, {
|
|
35
|
-
section: section
|
|
35
|
+
section: section,
|
|
36
|
+
expanded: expand
|
|
36
37
|
})) : /*#__PURE__*/_react.default.createElement(_AccordionSummaryView.default, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
37
38
|
className: classes.sectionSummaryText
|
|
38
39
|
}, section && section.sectionName)), /*#__PURE__*/_react.default.createElement(_core.AccordionDetails, {
|
package/package.json
CHANGED
|
@@ -102,86 +102,91 @@ const SearchFacetView = ({
|
|
|
102
102
|
</div>
|
|
103
103
|
)
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
&& searchText.trim() !== ''
|
|
116
|
-
&& (
|
|
117
|
-
<IconButton
|
|
118
|
-
aria-label="close"
|
|
119
|
-
onClick={() => onSearchTextChange(facet.datafield, '')}
|
|
120
|
-
className={classes.clearTextButton}
|
|
121
|
-
sx={(theme) => ({
|
|
122
|
-
position: 'absolute',
|
|
123
|
-
right: 7,
|
|
124
|
-
top: 7,
|
|
125
|
-
color: theme.palette.grey[500],
|
|
126
|
-
})}
|
|
127
|
-
>
|
|
128
|
-
<CloseIcon fontSize="small" />
|
|
129
|
-
</IconButton>
|
|
130
|
-
)
|
|
131
|
-
}
|
|
132
|
-
</div>
|
|
133
|
-
<div className={classes.sortGroup}>
|
|
134
|
-
<span className={classes.sortGroupIcon}>
|
|
135
|
-
<Icon
|
|
136
|
-
style={{ fontSize: 10 }}
|
|
137
|
-
onClick={onClearSection}
|
|
138
|
-
>
|
|
139
|
-
<img
|
|
140
|
-
src={clearIcon}
|
|
141
|
-
height={12}
|
|
142
|
-
width={12}
|
|
143
|
-
alt="clear-icon"
|
|
105
|
+
{
|
|
106
|
+
(facetValues.length > 0)
|
|
107
|
+
&& (
|
|
108
|
+
<div className={classes.searchContainer}>
|
|
109
|
+
<input
|
|
110
|
+
className={searchText && searchText.trim() !== '' ? classes.searchBoxWithText : classes.searchBox}
|
|
111
|
+
value={searchText}
|
|
112
|
+
type="text"
|
|
113
|
+
placeholder="e.g. Sarcoma, Neoplasm"
|
|
114
|
+
onChange={(e) => onSearchTextChange(facet.datafield, e.target.value)}
|
|
144
115
|
/>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
116
|
+
{
|
|
117
|
+
searchText
|
|
118
|
+
&& searchText.trim() !== ''
|
|
119
|
+
&& (
|
|
120
|
+
<IconButton
|
|
121
|
+
aria-label="close"
|
|
122
|
+
onClick={() => onSearchTextChange(facet.datafield, '')}
|
|
123
|
+
className={classes.clearTextButton}
|
|
124
|
+
sx={(theme) => ({
|
|
125
|
+
position: 'absolute',
|
|
126
|
+
right: 7,
|
|
127
|
+
top: 7,
|
|
128
|
+
color: theme.palette.grey[500],
|
|
129
|
+
})}
|
|
130
|
+
>
|
|
131
|
+
<CloseIcon fontSize="small" />
|
|
132
|
+
</IconButton>
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
</div>
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
{
|
|
139
|
+
(facetValues.length > 0)
|
|
149
140
|
&& (
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
141
|
+
<>
|
|
142
|
+
<div className={classes.sortGroup}>
|
|
143
|
+
<span className={classes.sortGroupIcon}>
|
|
144
|
+
<Icon
|
|
145
|
+
style={{ fontSize: 10 }}
|
|
146
|
+
onClick={onClearSection}
|
|
147
|
+
>
|
|
148
|
+
<img
|
|
149
|
+
src={clearIcon}
|
|
150
|
+
height={12}
|
|
151
|
+
width={12}
|
|
152
|
+
alt="clear-icon"
|
|
153
|
+
/>
|
|
154
|
+
</Icon>
|
|
155
|
+
</span>
|
|
156
|
+
<span
|
|
157
|
+
className={
|
|
158
|
+
clsx(classes.sortGroupItem, {
|
|
159
|
+
[classes.highlight]: sortBy === sortType.ALPHABET,
|
|
160
|
+
})
|
|
161
|
+
}
|
|
162
|
+
onClick={() => {
|
|
163
|
+
onSortChange(facet.datafield, sortType.ALPHABET);
|
|
164
|
+
}}
|
|
165
|
+
>
|
|
166
|
+
Sort alphabetically
|
|
167
|
+
</span>
|
|
168
|
+
<span
|
|
169
|
+
className={
|
|
170
|
+
clsx(classes.sortGroupItemCounts, {
|
|
171
|
+
[classes.highlight]: sortBy === sortType.NUMERIC,
|
|
172
|
+
})
|
|
173
|
+
}
|
|
174
|
+
onClick={() => {
|
|
175
|
+
onSortChange(facet.datafield, sortType.NUMERIC);
|
|
176
|
+
}}
|
|
177
|
+
>
|
|
178
|
+
Sort by count
|
|
179
|
+
</span>
|
|
180
|
+
</div>
|
|
181
|
+
<SearchFilterItems
|
|
182
|
+
searchText={searchText}
|
|
183
|
+
facet={facet}
|
|
184
|
+
queryParams={queryParams}
|
|
185
|
+
sortBy={sortBy}
|
|
186
|
+
/>
|
|
187
|
+
</>
|
|
176
188
|
)
|
|
177
|
-
|
|
178
|
-
</div>
|
|
179
|
-
<SearchFilterItems
|
|
180
|
-
searchText={searchText}
|
|
181
|
-
facet={facet}
|
|
182
|
-
queryParams={queryParams}
|
|
183
|
-
sortBy={sortBy}
|
|
184
|
-
/>
|
|
189
|
+
}
|
|
185
190
|
</Accordion>
|
|
186
191
|
{
|
|
187
192
|
(!expand && type === InputTypes.CHECKBOX) && (
|