@mailstep/design-system 0.8.9 → 0.8.10
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/package.json +1 -1
- package/ui/Blocks/CommonGrid/components/Filters/GridSelect/GridSelect.d.ts +1 -1
- package/ui/Blocks/CommonGrid/components/Filters/GridSelect/GridSelect.js +3 -3
- package/ui/Blocks/CommonGrid/types.d.ts +1 -1
- package/ui/index.es.js +3996 -3982
- package/ui/index.umd.js +166 -166
package/package.json
CHANGED
|
@@ -64,7 +64,7 @@ import uniqBy from 'lodash/uniqBy';
|
|
|
64
64
|
import { isOptionArray } from './guards';
|
|
65
65
|
var minColumnWidth = 120;
|
|
66
66
|
var SelectFilter = function (_a) {
|
|
67
|
-
var onChange = _a.onChange, _b = _a.isClearable, isClearable = _b === void 0 ? true : _b, disabled = _a.disabled, placeholder = _a.placeholder, _c = _a.showValue, showValue = _c === void 0 ? true : _c, columnWidth = _a.columnWidth, isMulti = _a.isMulti, value = _a.value, options = _a.options, checkAllButton = _a.checkAllButton, asyncLoadKey = _a.asyncLoadKey, onAsyncLoadFilterOptions = _a.onAsyncLoadFilterOptions, _d = _a.
|
|
67
|
+
var onChange = _a.onChange, _b = _a.isClearable, isClearable = _b === void 0 ? true : _b, disabled = _a.disabled, placeholder = _a.placeholder, _c = _a.showValue, showValue = _c === void 0 ? true : _c, columnWidth = _a.columnWidth, isMulti = _a.isMulti, value = _a.value, options = _a.options, checkAllButton = _a.checkAllButton, asyncLoadKey = _a.asyncLoadKey, onAsyncLoadFilterOptions = _a.onAsyncLoadFilterOptions, _d = _a.withNotEqComparator, withNotEqComparator = _d === void 0 ? true : _d;
|
|
68
68
|
var _e = useState([]), loadedOptions = _e[0], setLoadedOptions = _e[1];
|
|
69
69
|
var _f = useState(false), isNotEqNoValue = _f[0], setIsNotEqNoValue = _f[1];
|
|
70
70
|
var isAsync = !!asyncLoadKey;
|
|
@@ -104,9 +104,9 @@ var SelectFilter = function (_a) {
|
|
|
104
104
|
var isSelectClearable = isWide ? isClearable : false;
|
|
105
105
|
var placeholderValue = placeholder || (isAsync ? i18n._({ id: 'dataGrid.filterCell', message: 'Type to filter' }) : undefined);
|
|
106
106
|
if (isMulti) {
|
|
107
|
-
var placeholderIcon = isWide ? (isNotEq ? 'notEqual' : 'equals') : null;
|
|
107
|
+
var placeholderIcon = isWide && isAsync ? (isNotEq ? 'notEqual' : 'equals') : null;
|
|
108
108
|
var selectValue = showValue ? (isOptionArray(value) ? value.map(function (option) { return String(option.value); }) : value) : undefined;
|
|
109
|
-
return (_jsx(Select, { maxMenuHeight: 250, onChange: handleOnMultiChange, value: selectValue, options: defaultOptions || options, showSelectAllButton: checkAllButton, style: "gridFilter", loadOptions: isAsync ? handleLoadOptions : undefined, defaultOptions: defaultOptions, placeholder: placeholderValue, noOptionsMessage: function () { return null; }, containerVariant: isAsync ? 'search' : undefined, placeholderIcon: placeholderIcon, onIconClick:
|
|
109
|
+
return (_jsx(Select, { maxMenuHeight: 250, onChange: handleOnMultiChange, value: selectValue, options: defaultOptions || options, showSelectAllButton: checkAllButton, style: "gridFilter", loadOptions: isAsync ? handleLoadOptions : undefined, defaultOptions: defaultOptions, placeholder: placeholderValue, noOptionsMessage: function () { return null; }, containerVariant: isAsync ? 'search' : undefined, placeholderIcon: placeholderIcon, onIconClick: withNotEqComparator ? handleIconClick : undefined, optionVariant: "checkbox", multiLabelVariant: "count", isMulti: true, disabled: disabled, isClearable: isSelectClearable }));
|
|
110
110
|
}
|
|
111
111
|
return (_jsx(SingleSelect, { maxMenuHeight: 250, onChange: onChange, value: showValue ? value : undefined, options: options, style: "gridFilter", loadOptions: isAsync ? handleLoadOptions : undefined, placeholder: placeholderValue, placeholderIcon: isWide ? undefined : null, isClearable: isSelectClearable, disabled: disabled }));
|
|
112
112
|
};
|
|
@@ -117,7 +117,7 @@ export type ColumnDefinition<ColumnName extends string = string> = ColumnBasePro
|
|
|
117
117
|
isUuid?: boolean;
|
|
118
118
|
defaultComparator?: string;
|
|
119
119
|
checkAllButton?: boolean;
|
|
120
|
-
|
|
120
|
+
withNotEqComparator?: boolean;
|
|
121
121
|
};
|
|
122
122
|
getFilterCriteria?: (value: string) => Record<string, any> | null;
|
|
123
123
|
filterOptions?: Option[];
|