@irontec/ivoz-ui 1.5.2 → 1.6.1
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/components/List/Content/Empty.js +10 -2
- package/components/List/Content/Empty.styles.js +7 -0
- package/components/List/Content/FastSearchField.js +1 -1
- package/components/List/Filter/ContentFilterSelector/ContentFilterSelector.js +1 -1
- package/components/List/List.js +4 -1
- package/entities/DefaultEntityBehavior/List.js +1 -1
- package/package.json +1 -1
|
@@ -3,8 +3,9 @@ import { Link } from 'react-router-dom';
|
|
|
3
3
|
import _ from '../../../services/translations/translate';
|
|
4
4
|
import { SolidButton } from '../../shared/Button/Button.styles';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { Fade } from '@mui/material';
|
|
6
|
+
import { Box, Fade } from '@mui/material';
|
|
7
7
|
import { useStoreState } from '../../../store';
|
|
8
|
+
import { MultiselectMoreChildEntityLinks } from './Shared/MultiselectMoreChildEntityLinks';
|
|
8
9
|
export const Empty = (props) => {
|
|
9
10
|
const { entityService, className } = props;
|
|
10
11
|
const { t } = useTranslation();
|
|
@@ -22,10 +23,17 @@ export const Empty = (props) => {
|
|
|
22
23
|
singularTitle = t(translationKey, { count: 1 }).toLowerCase();
|
|
23
24
|
pluralTitle = t(translationKey, { count: 2 }).toLowerCase();
|
|
24
25
|
}
|
|
26
|
+
const globalActions = Object.values(entity.customActions).filter((action) => action.global);
|
|
25
27
|
return (_jsx(Fade, Object.assign({ in: true, style: {
|
|
26
28
|
transitionDelay: '750ms',
|
|
27
29
|
}, unmountOnExit: true }, { children: _jsxs("section", Object.assign({ className: className }, { children: [_jsx("img", { src: 'assets/img/empty.svg', alt: '' }), _jsx("h3", { children: _('No {{entity}} yet', { entity: pluralTitle }) }), _jsx("p", { children: _('You haven’t created any {{entity}} yet.', {
|
|
28
30
|
entity: singularTitle,
|
|
29
|
-
}) }), create && (
|
|
31
|
+
}) }), create && (_jsxs(Box, Object.assign({ className: 'empty-actions' }, { children: [globalActions &&
|
|
32
|
+
globalActions.length < 2 &&
|
|
33
|
+
globalActions
|
|
34
|
+
.map((item) => item.action)
|
|
35
|
+
.map((Action, key) => {
|
|
36
|
+
return (_jsx(Action, { rows: [], selectedValues: [], entityService: entityService }, key));
|
|
37
|
+
}), globalActions && globalActions.length > 1 && (_jsx(MultiselectMoreChildEntityLinks, { childActions: globalActions, selectedValues: [], rows: [], entityService: entityService })), _jsx(Link, Object.assign({ to: location.pathname + '/create' }, { children: _jsx(SolidButton, { children: _('New {{entity}}', { entity: singularTitle }) }) }))] })))] })) })));
|
|
30
38
|
};
|
|
31
39
|
export default Empty;
|
|
@@ -69,7 +69,7 @@ const FastSearchField = (props, ref) => {
|
|
|
69
69
|
};
|
|
70
70
|
useEffect(() => {
|
|
71
71
|
//reset value
|
|
72
|
-
setValue((firstColumnCriteria === null || firstColumnCriteria === void 0 ? void 0 : firstColumnCriteria.value) || '');
|
|
72
|
+
setValue(decodeURIComponent(firstColumnCriteria === null || firstColumnCriteria === void 0 ? void 0 : firstColumnCriteria.value) || '');
|
|
73
73
|
}, [firstColumnCriteria]);
|
|
74
74
|
useEffect(() => {
|
|
75
75
|
if (isDatetime) {
|
package/components/List/List.js
CHANGED
|
@@ -99,7 +99,10 @@ const List = function (props) {
|
|
|
99
99
|
}
|
|
100
100
|
setPrevReqQuerystring(reqQuerystring);
|
|
101
101
|
const criteria = queryStringToCriteria();
|
|
102
|
-
|
|
102
|
+
const sanitizeData = criteria.map((row) => {
|
|
103
|
+
return Object.assign(Object.assign({}, row), { value: encodeURIComponent(row.value) });
|
|
104
|
+
});
|
|
105
|
+
setQueryStringCriteria(sanitizeData);
|
|
103
106
|
setCriteriaIsReady(true);
|
|
104
107
|
}, [
|
|
105
108
|
reqQuerystring,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ListContent } from '../../components/List/Content/';
|
|
3
3
|
const List = (props) => {
|
|
4
|
-
return _jsx(ListContent, Object.assign({}, props));
|
|
4
|
+
return (_jsx(ListContent, Object.assign({}, props)));
|
|
5
5
|
};
|
|
6
6
|
export default List;
|