@luscii-healthtech/web-ui 38.3.0 → 38.4.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.
@@ -6795,10 +6795,10 @@ const FilterMenu = (props) => {
6795
6795
  };
6796
6796
 
6797
6797
  const isSortingOption = (option) => {
6798
- if (!option || !lodash.isObjectLike(option)) {
6798
+ if (!option || !lodash.isObjectLike(option) || typeof option !== "object") {
6799
6799
  return false;
6800
6800
  }
6801
- return typeof option === "object" && "sortingCompare" in option && lodash.isFunction(option === null || option === void 0 ? void 0 : option.sortingCompare);
6801
+ return "isChecked" in option && "label" in option && "id" in option && "value" in option && "sortingCompare" in option && lodash.isFunction(option.sortingCompare);
6802
6802
  };
6803
6803
  const SortMenu = (props) => {
6804
6804
  const { localization, sortingOptions, onSortOptionChange } = props;
@@ -6831,10 +6831,14 @@ const FiltersMenus = (props) => {
6831
6831
  };
6832
6832
 
6833
6833
  const isPresetFilterOption = (option) => {
6834
- if (!option || !lodash.isObjectLike(option)) {
6834
+ if (!option || !lodash.isObjectLike(option) || typeof option !== "object") {
6835
6835
  return false;
6836
6836
  }
6837
- return typeof option === "object" && "filterFn" in option && lodash.isFunction(option.filterFn);
6837
+ const hasBasicShape = "isChecked" in option && "label" in option && "value" in option && "id" in option;
6838
+ if (!hasBasicShape) {
6839
+ return false;
6840
+ }
6841
+ return "filterFn" in option ? lodash.isFunction(option.filterFn) : true;
6838
6842
  };
6839
6843
  const PresetFiltersMenu = (props) => {
6840
6844
  const { localization, presetFilterOptions, onPresetFilterOptionChange } = props;