@mailstep/design-system 0.7.79-beta.5 → 0.7.79-beta.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.7.79-beta.5",
3
+ "version": "0.7.79-beta.7",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -55,6 +55,7 @@ var SelectFilter = function (_a) {
55
55
  var onChange = _a.onChange, isMulti = _a.isMulti, value = _a.value, options = _a.options, checkAllButton = _a.checkAllButton, asyncLoadKey = _a.asyncLoadKey, onAsyncLoadFilterOptions = _a.onAsyncLoadFilterOptions;
56
56
  var _b = useState([]), loadedOptions = _b[0], setLoadedOptions = _b[1];
57
57
  var handleOnMultiChange = useCallback(function (options) {
58
+ console.log('handleOnMultiChange', options);
58
59
  onChange === null || onChange === void 0 ? void 0 : onChange(!isArray(options) || !(options === null || options === void 0 ? void 0 : options.length) ? null : options);
59
60
  }, [onChange]);
60
61
  var isAsync = !!asyncLoadKey;
@@ -77,7 +78,7 @@ var SelectFilter = function (_a) {
77
78
  }); }, [options]);
78
79
  if (isMulti) {
79
80
  var defaultOptions = isAsync && isOptionArray(value) ? uniqBy(__spreadArray(__spreadArray([], loadedOptions, true), value, true), 'value') : undefined;
80
- return (_jsx(Select, { maxMenuHeight: 250, onChange: handleOnMultiChange, value: isOptionArray(value) ? value.map(function (option) { return String(option.value); }) : value, options: isAsync && isOptionArray(value) ? defaultOptions : options, showSelectAllButton: checkAllButton, style: "gridFilter", loadOptions: isAsync ? handleLoadOptions : undefined, defaultOptions: defaultOptions, placeholder: isAsync ? i18n._({ id: 'dataGrid.filterCell', message: 'Type to filter' }) : undefined, noOptionsMessage: function () { return null; }, containerVariant: isAsync ? 'search' : undefined, optionVariant: "checkbox", multiLabelVariant: "count", isMulti: true }));
81
+ return (_jsx(Select, { maxMenuHeight: 250, onChange: handleOnMultiChange, value: isOptionArray(value) ? value.map(function (option) { return String(option.value); }) : value, options: defaultOptions || options, showSelectAllButton: checkAllButton, style: "gridFilter", loadOptions: isAsync ? handleLoadOptions : undefined, defaultOptions: defaultOptions, placeholder: isAsync ? i18n._({ id: 'dataGrid.filterCell', message: 'Type to filter' }) : undefined, noOptionsMessage: function () { return null; }, containerVariant: isAsync ? 'search' : undefined, optionVariant: "checkbox", multiLabelVariant: "count", isMulti: true }));
81
82
  }
82
83
  return (_jsx(SingleSelect, { maxMenuHeight: 250, onChange: onChange, value: value, options: options, style: "gridFilter", loadOptions: isAsync ? handleLoadOptions : undefined, placeholder: isAsync ? i18n._({ id: 'dataGrid.filterCell', message: 'Type to filter' }) : undefined, isClearable: true }));
83
84
  };
@@ -75,6 +75,7 @@ var Select = function (_a) {
75
75
  console.error('CheckboxSelect incompatible props');
76
76
  }
77
77
  var setAllOptions = useCallback(function () {
78
+ console.log('setAllOptions', options);
78
79
  onChange === null || onChange === void 0 ? void 0 : onChange((options || []));
79
80
  }, [onChange, options]);
80
81
  var unsetAllOptions = useCallback(function () {
@@ -122,8 +122,11 @@ export var CustomStyles = {
122
122
  },
123
123
  clearIndicator: function (styles, state) {
124
124
  var theme = state.theme;
125
- return __assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: theme.narrowIndicators ? '0px 0px 0px 2px' : '0px 4px', color: theme.colors.dropdownIndicatorColor });
125
+ return __assign(__assign({}, styles), { justifyContent: 'center', alignItems: 'center', padding: theme.narrowIndicators ? '0px 4px 0px 0px' : '0px 4px', color: theme.colors.dropdownIndicatorColor });
126
126
  },
127
+ indicatorSeparator: function () { return ({
128
+ display: 'none',
129
+ }); }
127
130
  };
128
131
  export var getCustomTheme = function (theme, optionVariant, useFilterSubvariant) {
129
132
  var inputTextColor = th.color('blue2')({ theme: theme });