@evoke-platform/ui-components 1.8.0-testing.0 → 1.8.0-testing.2
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/dist/published/components/custom/DataGrid/DataGrid.d.ts +1 -0
- package/dist/published/components/custom/DataGrid/DataGrid.js +2 -1
- package/dist/published/components/custom/DataGrid/Toolbar.d.ts +1 -0
- package/dist/published/components/custom/DataGrid/Toolbar.js +3 -3
- package/dist/published/components/custom/FormV2/FormRendererContainer.js +1 -6
- package/package.json +7 -4
|
@@ -22,6 +22,7 @@ export type DataGridProps<T extends GridValidRowModel> = MuiDataGridProps<T> & {
|
|
|
22
22
|
};
|
|
23
23
|
hideSearchbar?: boolean;
|
|
24
24
|
loadingOptions?: LoadingOptions;
|
|
25
|
+
hideDownload?: boolean;
|
|
25
26
|
};
|
|
26
27
|
export default function <T extends GridValidRowModel>(props: DataGridProps<T>): React.JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -6,7 +6,7 @@ import LinearProgress from '../../core/LinearProgress';
|
|
|
6
6
|
import { dateTimeBetweenOperator } from './DateTimeCustomOperator';
|
|
7
7
|
import Toolbar from './Toolbar';
|
|
8
8
|
export default function (props) {
|
|
9
|
-
const { onRefresh, loading, theme, title, bulkAction, filterSettings, columns, rows, hideSearchbar, loadingOptions, ...rest } = props;
|
|
9
|
+
const { onRefresh, loading, theme, title, bulkAction, filterSettings, columns, rows, hideSearchbar, loadingOptions, hideDownload, ...rest } = props;
|
|
10
10
|
const [anchorEl, setAnchorEl] = useState();
|
|
11
11
|
const [loadingMessageIndex, setLoadingMessageIndex] = useState(0);
|
|
12
12
|
const addColumnFilterOperators = (columns) => {
|
|
@@ -92,6 +92,7 @@ export default function (props) {
|
|
|
92
92
|
title,
|
|
93
93
|
bulkAction,
|
|
94
94
|
hideSearchbar,
|
|
95
|
+
hideDownload,
|
|
95
96
|
},
|
|
96
97
|
panel: {
|
|
97
98
|
anchorEl: anchorEl,
|
|
@@ -10,6 +10,7 @@ export type GridToolbarProps = MuiGridToolbarProps & {
|
|
|
10
10
|
title?: string;
|
|
11
11
|
bulkAction?: BulkAction;
|
|
12
12
|
hideSearchbar?: boolean;
|
|
13
|
+
hideDownload?: boolean;
|
|
13
14
|
};
|
|
14
15
|
declare function Toolbar(props: GridToolbarProps): React.JSX.Element;
|
|
15
16
|
export default Toolbar;
|
|
@@ -6,7 +6,7 @@ import UIThemeProvider from '../../../theme';
|
|
|
6
6
|
import { Button, IconButton } from '../../core';
|
|
7
7
|
import { Grid } from '../../layout';
|
|
8
8
|
function Toolbar(props) {
|
|
9
|
-
const { onRefresh, setAnchorEl, loading, theme, title, bulkAction, hideSearchbar } = props;
|
|
9
|
+
const { onRefresh, setAnchorEl, loading, theme, title, bulkAction, hideSearchbar, hideDownload } = props;
|
|
10
10
|
const styles = {
|
|
11
11
|
container: { display: 'flex', justifyContent: 'space-between', margin: '0 0 15px 0' },
|
|
12
12
|
iconButton: {
|
|
@@ -50,14 +50,14 @@ function Toolbar(props) {
|
|
|
50
50
|
React.createElement(Grid, { item: true, xs: 6 }, !hideSearchbar && (React.createElement(GridToolbarQuickFilter, { variant: "outlined", size: "small", sx: styles.quickFilter }))),
|
|
51
51
|
!bulkAction ? (React.createElement(Grid, { item: true },
|
|
52
52
|
React.createElement(Grid, { container: true, spacing: 1, sx: styles.icon },
|
|
53
|
-
React.createElement(Grid, { item: true, sx: { paddingRight: '15px' } },
|
|
53
|
+
!hideDownload && (React.createElement(Grid, { item: true, sx: { paddingRight: '15px' } },
|
|
54
54
|
React.createElement(GridToolbarExport, { sx: {
|
|
55
55
|
color: '#212B36',
|
|
56
56
|
height: '95%',
|
|
57
57
|
'&:hover': { backgroundColor: '#f2f3f5' },
|
|
58
58
|
paddingLeft: '10px',
|
|
59
59
|
paddingRight: '10px',
|
|
60
|
-
}, printOptions: { disableToolbarButton: true }, startIcon: React.createElement(FileDownloadRounded, null) })),
|
|
60
|
+
}, printOptions: { disableToolbarButton: true }, startIcon: React.createElement(FileDownloadRounded, null) }))),
|
|
61
61
|
React.createElement(Grid, { item: true },
|
|
62
62
|
React.createElement(GridToolbarFilterButton, { componentsProps: {
|
|
63
63
|
button: {
|
|
@@ -463,12 +463,7 @@ function FormRendererContainer(props) {
|
|
|
463
463
|
})();
|
|
464
464
|
}
|
|
465
465
|
const isLoading = (instanceId && !formData && !document) || !form || !sanitizedObject;
|
|
466
|
-
return !error ? (React.createElement(
|
|
467
|
-
backgroundColor: '#ffffff',
|
|
468
|
-
borderRadius: '6px',
|
|
469
|
-
padding: '0px',
|
|
470
|
-
border: !isLoading ? '1px solid #dbe0e4' : undefined,
|
|
471
|
-
} },
|
|
466
|
+
return !error ? (React.createElement(React.Fragment, null,
|
|
472
467
|
!isLoading ? (React.createElement(React.Fragment, null,
|
|
473
468
|
React.createElement(FormRenderer, { onSubmit: saveHandler, hideButtons: document && !hasDocumentUpdateAccess, richTextEditor: richTextEditor, fieldHeight: display?.fieldHeight ?? 'medium', value: formData, stickyFooter: stickyFooter, form: form, instance: dataType !== 'documents' ? instance : document, onChange: onChange, onCancel: onCancel }))) : (React.createElement(Box, { sx: { padding: '20px' } },
|
|
474
469
|
React.createElement(Box, { display: 'flex', width: '100%', justifyContent: 'space-between' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evoke-platform/ui-components",
|
|
3
|
-
"version": "1.8.0-testing.
|
|
3
|
+
"version": "1.8.0-testing.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/published/index.js",
|
|
6
6
|
"module": "dist/published/index.js",
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
"icons.ts",
|
|
10
10
|
"colors.ts"
|
|
11
11
|
],
|
|
12
|
+
"sideEffects": [
|
|
13
|
+
"*.css"
|
|
14
|
+
],
|
|
12
15
|
"exports": {
|
|
13
16
|
".": "./dist/published/index.js",
|
|
14
17
|
"./colors": "./dist/published/colors/index.js",
|
|
@@ -18,9 +21,9 @@
|
|
|
18
21
|
"test": "vitest",
|
|
19
22
|
"test:ui": "vitest --ui",
|
|
20
23
|
"copy-styles": "copyfiles -u 1 src/styles/*.css dist/published/",
|
|
21
|
-
"build": "
|
|
24
|
+
"build": "mkdirp -rf ./dist && tsc && npm run copy-styles",
|
|
22
25
|
"build:cjs": "tsc --module CommonJS --outDir dist/cjs",
|
|
23
|
-
"prepublish": "
|
|
26
|
+
"prepublish": "mkdirp -rf ./dist && tsc && npm run copy-styles",
|
|
24
27
|
"storybook": "start-storybook -p 6006",
|
|
25
28
|
"build-storybook": "build-storybook",
|
|
26
29
|
"lint": "npm run prettier:check && npm run eslint",
|
|
@@ -87,7 +90,7 @@
|
|
|
87
90
|
"yalc": "^1.0.0-pre.53"
|
|
88
91
|
},
|
|
89
92
|
"peerDependencies": {
|
|
90
|
-
"@evoke-platform/context": "^1.
|
|
93
|
+
"@evoke-platform/context": "^1.4.0-dev.5",
|
|
91
94
|
"react": "^18.1.0",
|
|
92
95
|
"react-dom": "^18.1.0"
|
|
93
96
|
},
|