@redocly/theme 0.59.0-next.8 → 0.59.0-next.9

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.
@@ -49,7 +49,7 @@ const RedoclyIcon_1 = require("../../icons/RedoclyIcon/RedoclyIcon");
49
49
  const defaultConfig = {
50
50
  hide: false,
51
51
  inputType: 'button',
52
- inputIcon: 'redocly',
52
+ inputIcon: 'sparkles',
53
53
  };
54
54
  const getIcon = (iconType, inputType = 'button') => {
55
55
  const iconSize = inputType === 'icon'
@@ -17,6 +17,10 @@ const filterComponents = {
17
17
  function CatalogFilter({ filter, filterValuesCasing, showCounter = true, className, }) {
18
18
  if (!filter.parentUsed)
19
19
  return null;
20
+ const filteredOptions = filter.filteredOptions || filter.options;
21
+ if (!filteredOptions || filteredOptions.length === 0) {
22
+ return null;
23
+ }
20
24
  const FilterComponent = filterComponents[(filter.type || 'checkboxes')];
21
25
  return (react_1.default.createElement(CatalogFilterGroup, { className: className, "data-component-name": "Catalog/CatalogFilter", key: filter.property + filter.title },
22
26
  react_1.default.createElement(FilterComponent, { filter: filter, filterValuesCasing: filterValuesCasing, showCounter: showCounter })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/theme",
3
- "version": "0.59.0-next.8",
3
+ "version": "0.59.0-next.9",
4
4
  "description": "Shared UI components lib",
5
5
  "keywords": [
6
6
  "theme",
@@ -87,7 +87,7 @@
87
87
  "openapi-sampler": "1.6.2",
88
88
  "react-calendar": "5.1.0",
89
89
  "react-date-picker": "11.0.0",
90
- "@redocly/config": "0.36.1",
90
+ "@redocly/config": "0.36.2",
91
91
  "@redocly/realm-asyncapi-sdk": "0.5.0-next.3"
92
92
  },
93
93
  "scripts": {
@@ -21,7 +21,7 @@ interface AIAssistantButtonConfig {
21
21
  const defaultConfig: Required<AIAssistantButtonConfig> = {
22
22
  hide: false,
23
23
  inputType: 'button',
24
- inputIcon: 'redocly',
24
+ inputIcon: 'sparkles',
25
25
  };
26
26
 
27
27
  const getIcon = (
@@ -26,6 +26,11 @@ export function CatalogFilter({
26
26
  }: CatalogFilterProps): JSX.Element | null {
27
27
  if (!filter.parentUsed) return null;
28
28
 
29
+ const filteredOptions = filter.filteredOptions || filter.options;
30
+ if (!filteredOptions || filteredOptions.length === 0) {
31
+ return null;
32
+ }
33
+
29
34
  const FilterComponent = filterComponents[(filter.type || 'checkboxes') as FilterTypes];
30
35
 
31
36
  return (