@antscorp/antsomi-ui 1.3.5-beta.696 → 1.3.5-beta.697

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.
@@ -17,6 +17,10 @@ import { searchStringQuery } from '@antscorp/antsomi-ui/es/utils';
17
17
  import { Button, Checkbox } from '../../../../atoms';
18
18
  import { StyledAction, StyledFooter, StyledListFieldsWrapper } from './styled';
19
19
  import { List } from 'antd';
20
+ import { EmptyData } from '../../../EmptyData';
21
+ import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
22
+ import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
23
+ const { t } = i18nInstance;
20
24
  export const PopoverSelect = (props) => {
21
25
  var _a, _b;
22
26
  const { open: openProp, selected, options: optionsProp = [], onCancel, onApply, inputSearchProps = {}, children, showAllLabel = 'Show all', showSelectedLabel = 'Show selected', selectAllLabel = 'Select all', deselectAllLabel = 'Unselect all', onSearchPredicate } = props, rest = __rest(props, ["open", "selected", "options", "onCancel", "onApply", "inputSearchProps", "children", "showAllLabel", "showSelectedLabel", "selectAllLabel", "deselectAllLabel", "onSearchPredicate"]);
@@ -122,9 +126,9 @@ export const PopoverSelect = (props) => {
122
126
  optionsProp.length > 0 && (React.createElement(StyledAction, null,
123
127
  React.createElement(Button, { type: "link", size: "small", onClick: () => setShowSelected(current => !current) }, showSelected ? showAllLabel : showSelectedLabel),
124
128
  selectedKeys.size === options.length ? (React.createElement(Button, { type: "link", onClick: handleDeselectAll }, deselectAllLabel)) : (React.createElement(Button, { type: "link", onClick: handleSelectAll }, selectAllLabel)))),
125
- !!filteredOptions.length && (React.createElement(StyledListFieldsWrapper, { autoHeight: true, autoHeightMax: 260 },
129
+ filteredOptions.length ? (React.createElement(StyledListFieldsWrapper, { autoHeight: true, autoHeightMax: 260 },
126
130
  React.createElement(List, { bordered: false, dataSource: filteredOptions, renderItem: option => (React.createElement(List.Item, null,
127
- React.createElement(Checkbox, { onChange: e => handleToggleField(option, e.target.checked), checked: selectedKeys.has(option.key) }, renderCheckBoxLabel(option)))) }))),
131
+ React.createElement(Checkbox, { onChange: e => handleToggleField(option, e.target.checked), checked: selectedKeys.has(option.key) }, renderCheckBoxLabel(option)))) }))) : (React.createElement(EmptyData, { showIcon: false, description: t(translations.noData).toString() })),
128
132
  React.createElement(StyledFooter, null,
129
133
  React.createElement(Button, { onClick: handleCancel }, "Cancel"),
130
134
  React.createElement(Button, { onClick: handleApply, disabled: applyDisabled, type: "primary" }, "Apply"))), overlayInnerStyle: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.696",
3
+ "version": "1.3.5-beta.697",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",