@antscorp/antsomi-ui 1.3.5-beta.901 → 1.3.5-beta.902

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.
@@ -5,13 +5,11 @@ import { Flex, Typography, Icon, Button, } from '@antscorp/antsomi-ui/es/compone
5
5
  // Styled
6
6
  import { CloseButton, ContentWrapper } from './styled';
7
7
  // Locales
8
- import i18nInstance from '@antscorp/antsomi-ui/es/locales/i18n';
9
- // Constants
10
- import { translations } from '@antscorp/antsomi-ui/es/locales/translations';
8
+ import { translate, translations } from '@antscorp/antsomi-locales';
11
9
  const { Text } = Typography;
12
10
  export const ApplyPopupContent = props => {
13
11
  const { title, children, cancelButtonProps, applyButtonProps, footerProps, onApply, onCancel, ...restProps } = props;
14
12
  const { align = 'center', justify = 'flex-end' } = footerProps || {};
15
- const { t } = i18nInstance;
16
- return (_jsxs(ContentWrapper, { ...restProps, children: [_jsxs(Flex, { className: "content__body", vertical: true, gap: 20, children: [_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsx(Text, { className: "content__title", ellipsis: { tooltip: true }, children: title }), _jsx(CloseButton, { align: "center", justify: "center", onClick: onCancel, children: _jsx(Icon, { type: "icon-ants-remove-slim" }) })] }), children] }), _jsxs(Flex, { ...footerProps, align: align, justify: justify, className: clsx('content__footer', footerProps?.className), children: [_jsx(Button, { onClick: onCancel, ...cancelButtonProps, children: t(translations.cancel.title).toString() }), _jsx(Button, { type: "primary", onClick: onApply, ...applyButtonProps, children: t(translations.apply.title).toString() })] })] }));
13
+ // const { t } = i18nInstance;
14
+ return (_jsxs(ContentWrapper, { ...restProps, children: [_jsxs(Flex, { className: "content__body", vertical: true, gap: 20, children: [_jsxs(Flex, { align: "center", justify: "space-between", children: [_jsx(Text, { className: "content__title", ellipsis: { tooltip: true }, children: title }), _jsx(CloseButton, { align: "center", justify: "center", onClick: onCancel, children: _jsx(Icon, { type: "icon-ants-remove-slim" }) })] }), children] }), _jsxs(Flex, { ...footerProps, align: align, justify: justify, className: clsx('content__footer', footerProps?.className), children: [_jsx(Button, { onClick: onCancel, ...cancelButtonProps, children: translate(translations._ACT_CANCEL) }), _jsx(Button, { type: "primary", onClick: onApply, ...applyButtonProps, children: translate(translations._ACT_APPLY) })] })] }));
17
15
  };
@@ -326,7 +326,7 @@ export function MatchesAny(props) {
326
326
  }
327
327
  return null;
328
328
  };
329
- const renderSelectList = () => (_jsxs("div", { className: "matches-any__section matches-any__section--left", children: [_jsxs("div", { className: "matches-any__header", children: [!!groupSelectProps && (_jsx(PopoverSelect, { ...groupSelectProps, children: _jsxs(GroupSelectButton, { type: "default", size: "small", shape: "round", children: [_jsxs("span", { className: "group-name", children: [groupSelectProps?.name, ":"] }), `${groupSelectProps?.selected?.length || 0} ${t(translations.global.selected)}`] }) })), _jsx("div", { style: { width: '100%' }, children: _jsx(Input.CustomSearch, { ref: searchInputRef, autoFocus: true, value: searchValue, placeholder: `${t(translations.global.search)?.toString()}...`, onAfterChange: searchValue => {
329
+ const renderSelectList = () => (_jsxs("div", { className: "matches-any__section matches-any__section--left", children: [_jsxs("div", { className: "matches-any__header", children: [!!groupSelectProps && (_jsx(PopoverSelect, { ...groupSelectProps, children: _jsxs(GroupSelectButton, { type: "default", size: "small", shape: "round", children: [_jsxs("span", { className: "group-name", children: [groupSelectProps?.name, ":"] }), `${groupSelectProps?.selected?.length || 0} ${t(translations.global.selected)}`] }) })), _jsx("div", { style: { width: '100%' }, children: _jsx(Input.CustomSearch, { ref: searchInputRef, autoFocus: true, value: searchValue, placeholder: translate(translationsLocale._ACT_SEARCH), onAfterChange: searchValue => {
330
330
  if (onChangeSearch) {
331
331
  onChangeSearch(searchValue);
332
332
  }
@@ -342,7 +342,7 @@ export function MatchesAny(props) {
342
342
  */
343
343
  !loading &&
344
344
  (!!searchValue && !listEmptyProps ? (_jsx(EmptyData, { showIcon: false, description: t(translations.global.noResultsMatchesKeyWord).toString() })) : (_jsx(EmptyData, { icon: listEmptyIcon, showIcon: !!listEmptyIcon, description: listEmptyDescription, ...restListEmptyProps })))) })] })] }));
345
- const renderSelectedList = () => (_jsxs("div", { className: "matches-any__section", children: [_jsxs(Flex, { className: "matches-any__header", justify: "space-between", children: [_jsx(Text, { strong: true, children: `${t(translations.global.selected)} (${selectedItems?.length || 0}${maxSelectedItem && maxSelectedItem > 0 ? `/${maxSelectedItem}` : ''})` }), _jsx(TextButton, { disabled: isDisableRemoveAll, onClick: onRemoveAll, children: t(translations.global.removeAll).toString() })] }), _jsx("div", { className: "matches-any__body", children: !selectedItems?.length && !loading ? (_jsx(EmptyData, { icon: selectedListEmptyIcon, description: selectedListEmptyDescription, ...restSelectedListEmptyProps })) : (_jsx(StyledTree, { defaultExpandAll: true, expandedKeys: selectedExpandedKeys, selectable: false, treeData: selectedTreeData, titleRender: item => renderItemNodeTitle({
345
+ const renderSelectedList = () => (_jsxs("div", { className: "matches-any__section", children: [_jsxs(Flex, { className: "matches-any__header", justify: "space-between", children: [_jsx(Text, { strong: true, children: `${t(translations.global.selected)} (${selectedItems?.length || 0}${maxSelectedItem && maxSelectedItem > 0 ? `/${maxSelectedItem}` : ''})` }), _jsx(TextButton, { disabled: isDisableRemoveAll, onClick: onRemoveAll, children: translate(translations._ACT_REMOVE_ALL) })] }), _jsx("div", { className: "matches-any__body", children: !selectedItems?.length && !loading ? (_jsx(EmptyData, { icon: selectedListEmptyIcon, description: selectedListEmptyDescription, ...restSelectedListEmptyProps })) : (_jsx(StyledTree, { defaultExpandAll: true, expandedKeys: selectedExpandedKeys, selectable: false, treeData: selectedTreeData, titleRender: item => renderItemNodeTitle({
346
346
  item: item,
347
347
  mode: 'select',
348
348
  onRemoveItem,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.901",
3
+ "version": "1.3.5-beta.902",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",