@evoke-platform/ui-components 1.4.0-testing.2 → 1.4.0-testing.4
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/core/Chip/Chip.d.ts +5 -2
- package/dist/published/components/core/Chip/Chip.js +6 -3
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.d.ts +1 -0
- package/dist/published/components/custom/CriteriaBuilder/CriteriaBuilder.js +3 -18
- package/dist/published/components/custom/CriteriaBuilder/ValueEditor.js +23 -8
- package/dist/published/components/custom/CriteriaBuilder/index.d.ts +2 -1
- package/dist/published/components/custom/CriteriaBuilder/index.js +2 -1
- package/dist/published/components/custom/CriteriaBuilder/utils.d.ts +13 -0
- package/dist/published/components/custom/CriteriaBuilder/utils.js +58 -1
- package/dist/published/components/custom/Form/Common/FormComponentWrapper.js +2 -1
- package/dist/published/components/custom/HistoryLog/DisplayedProperty.d.ts +2 -1
- package/dist/published/components/custom/HistoryLog/DisplayedProperty.js +5 -2
- package/dist/published/components/custom/HistoryLog/HistoryData.d.ts +1 -0
- package/dist/published/components/custom/HistoryLog/HistoryData.js +9 -3
- package/dist/published/components/custom/HistoryLog/index.js +24 -2
- package/dist/published/components/custom/index.d.ts +1 -1
- package/dist/published/components/custom/index.js +1 -1
- package/dist/published/index.d.ts +1 -1
- package/dist/published/index.js +1 -1
- package/dist/published/stories/Chip.stories.d.ts +4 -3
- package/dist/published/stories/Chip.stories.js +4 -2
- package/package.json +1 -1
@@ -1,4 +1,7 @@
|
|
1
|
-
import { ChipProps } from '@mui/material';
|
1
|
+
import { ChipProps as MUIChipProps } from '@mui/material';
|
2
2
|
import React from 'react';
|
3
|
-
|
3
|
+
export interface ChipProps extends MUIChipProps {
|
4
|
+
tooltip?: string;
|
5
|
+
}
|
6
|
+
declare const Chip: ({ tooltip, ...props }: ChipProps) => React.JSX.Element;
|
4
7
|
export default Chip;
|
@@ -1,8 +1,11 @@
|
|
1
1
|
import { Chip as MUIChip } from '@mui/material';
|
2
2
|
import React from 'react';
|
3
|
-
import
|
4
|
-
const Chip = (props) => {
|
5
|
-
|
3
|
+
import Tooltip from '../Tooltip';
|
4
|
+
const Chip = ({ tooltip, ...props }) => {
|
5
|
+
if (!tooltip) {
|
6
|
+
return React.createElement(MUIChip, { ...props });
|
7
|
+
}
|
8
|
+
return (React.createElement(Tooltip, { title: tooltip },
|
6
9
|
React.createElement(MUIChip, { ...props })));
|
7
10
|
};
|
8
11
|
export default Chip;
|
@@ -26,6 +26,7 @@ export type CriteriaInputProps = {
|
|
26
26
|
fetchObject?: (objectId: string) => Promise<EvokeObject | undefined>;
|
27
27
|
object: TreeViewObject;
|
28
28
|
};
|
29
|
+
rootObject?: EvokeObject;
|
29
30
|
/**
|
30
31
|
* String matching operators ('contains', 'beginsWith', 'endsWith') use regex patterns.
|
31
32
|
* Special characters like .*+?^${}()|[] are escaped (\\) by default.
|
@@ -12,23 +12,8 @@ import { Box } from '../../layout';
|
|
12
12
|
import { OverflowTextField } from '../OverflowTextField';
|
13
13
|
import { difference } from '../util';
|
14
14
|
import PropertyTree from './PropertyTree';
|
15
|
-
import { parseMongoDB, traversePropertyPath } from './utils';
|
15
|
+
import { ALL_OPERATORS, parseMongoDB, traversePropertyPath } from './utils';
|
16
16
|
import ValueEditor from './ValueEditor';
|
17
|
-
const ALL_OPERATORS = [
|
18
|
-
{ name: '=', label: 'Is' },
|
19
|
-
{ name: '!=', label: 'Is not' },
|
20
|
-
{ name: '<', label: 'Less than' },
|
21
|
-
{ name: '>', label: 'Greater than' },
|
22
|
-
{ name: '<=', label: 'Less than or equal to' },
|
23
|
-
{ name: '>=', label: 'Greater than or equal to' },
|
24
|
-
{ name: 'contains', label: 'Contains' },
|
25
|
-
{ name: 'beginsWith', label: 'Starts with' },
|
26
|
-
{ name: 'endsWith', label: 'Ends with' },
|
27
|
-
{ name: 'null', label: 'Is empty' },
|
28
|
-
{ name: 'notNull', label: 'Is not empty' },
|
29
|
-
{ name: 'in', label: 'In' },
|
30
|
-
{ name: 'notIn', label: 'Not in' },
|
31
|
-
];
|
32
17
|
const styles = {
|
33
18
|
buttons: {
|
34
19
|
padding: '6px 16px',
|
@@ -280,7 +265,7 @@ export const valueEditor = (props) => {
|
|
280
265
|
return ValueEditor(props);
|
281
266
|
};
|
282
267
|
const CriteriaBuilder = (props) => {
|
283
|
-
const { properties, criteria, setCriteria, originalCriteria, enablePresetValues, presetValues, operators, disabled, disabledCriteria, hideBorder, presetGroupLabel, customValueEditor, treeViewOpts, disableRegexEscapeChars, } = props;
|
268
|
+
const { properties, criteria, setCriteria, originalCriteria, enablePresetValues, presetValues, operators, disabled, disabledCriteria, hideBorder, presetGroupLabel, customValueEditor, treeViewOpts, disableRegexEscapeChars, rootObject, } = props;
|
284
269
|
const [query, setQuery] = useState(undefined);
|
285
270
|
const [propertyTreeMap, setPropertyTreeMap] = useState();
|
286
271
|
useEffect(() => {
|
@@ -437,7 +422,6 @@ const CriteriaBuilder = (props) => {
|
|
437
422
|
'.ruleGroup:not(.ruleGroup .ruleGroup)': {
|
438
423
|
borderStyle: 'hidden',
|
439
424
|
background: '#fff',
|
440
|
-
maxWidth: '70vw',
|
441
425
|
},
|
442
426
|
'.ruleGroup-header': {
|
443
427
|
display: 'block',
|
@@ -499,6 +483,7 @@ const CriteriaBuilder = (props) => {
|
|
499
483
|
valueEditor: customValueEditor ? customValueEditor.component : valueEditor,
|
500
484
|
}, context: {
|
501
485
|
...(customValueEditor?.props ?? {}),
|
486
|
+
rootObject,
|
502
487
|
presetValues,
|
503
488
|
enablePresetValues,
|
504
489
|
presetGroupLabel,
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { Instant, LocalDate, LocalDateTime, LocalTime, ZoneId } from '@js-joda/core';
|
2
|
-
import { ClearRounded } from '@mui/icons-material';
|
2
|
+
import { ClearRounded, CodeRounded } from '@mui/icons-material';
|
3
3
|
import { Box, darken, lighten, styled } from '@mui/material';
|
4
4
|
import { TimePicker } from '@mui/x-date-pickers';
|
5
5
|
import React, { useEffect, useRef, useState } from 'react';
|
6
6
|
import { InvalidDate } from '../../../util';
|
7
|
-
import { Autocomplete, Chip, DatePicker, DateTimePicker, LocalizationProvider, Menu, MenuItem, TextField, Typography, } from '../../core';
|
7
|
+
import { Autocomplete, Chip, DatePicker, DateTimePicker, IconButton, LocalizationProvider, Menu, MenuItem, TextField, Typography, } from '../../core';
|
8
8
|
import { NumericFormat } from '../FormField/InputFieldComponent';
|
9
9
|
const GroupHeader = styled('div')(({ theme }) => ({
|
10
10
|
position: 'sticky',
|
@@ -54,6 +54,9 @@ const ValueEditor = (props) => {
|
|
54
54
|
width: '33%',
|
55
55
|
background: readOnly ? '#f4f6f8' : '#fff',
|
56
56
|
borderRadius: '8px',
|
57
|
+
'& .MuiAutocomplete-tag': {
|
58
|
+
backgroundColor: '#edeff1',
|
59
|
+
},
|
57
60
|
},
|
58
61
|
};
|
59
62
|
useEffect(() => {
|
@@ -274,14 +277,26 @@ const ValueEditor = (props) => {
|
|
274
277
|
}
|
275
278
|
};
|
276
279
|
return (React.createElement(React.Fragment, null,
|
277
|
-
isPresetValueSelected ? (React.createElement(
|
278
|
-
borderRadius: '8px',
|
279
|
-
fontSize: '14px',
|
280
|
+
isPresetValueSelected ? (React.createElement(Box, { ref: inputRef, sx: {
|
280
281
|
width: '33%',
|
281
|
-
|
282
|
-
padding: '0 5px',
|
282
|
+
display: 'flex',
|
283
283
|
justifyContent: 'space-between',
|
284
|
-
|
284
|
+
alignItems: 'center',
|
285
|
+
height: '40px',
|
286
|
+
border: readOnly ? undefined : '1px solid #d5d5d5',
|
287
|
+
borderRadius: '8px',
|
288
|
+
backgroundColor: readOnly ? '#edeff1' : '#ffffff',
|
289
|
+
} },
|
290
|
+
React.createElement(Chip, { label: presetDisplayValue, sx: {
|
291
|
+
fontSize: '14px',
|
292
|
+
margin: '6px',
|
293
|
+
backgroundColor: '#edeff1',
|
294
|
+
borderRadius: '6px',
|
295
|
+
color: '#212B36',
|
296
|
+
height: '28px',
|
297
|
+
}, icon: React.createElement(CodeRounded, { sx: { height: '18px' } }) }),
|
298
|
+
!readOnly && (React.createElement(IconButton, { onClick: clearValue, sx: { padding: '3px', margin: '3px' } },
|
299
|
+
React.createElement(ClearRounded, { fontSize: "small", sx: { color: 'rgba(0, 0, 0, 0.54)' } }))))) : (getEditor()),
|
285
300
|
!!presetValues?.length && (React.createElement(Menu, { open: openPresetValues, anchorEl: inputRef?.current, PaperProps: { sx: { borderRadius: '8px', width: inputRef?.current?.offsetWidth } }, onClose: onClose }, presetValues &&
|
286
301
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
287
302
|
presetValues.map((option) => (React.createElement(MenuItem, { ...props, onClick: () => setPresetValue(option.value.name), sx: { padding: '8px', minHeight: '25px' } },
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Property } from '@evoke-platform/context';
|
1
2
|
import { RuleGroupType } from 'react-querybuilder';
|
2
3
|
import { ExpandedProperty, Obj, ObjectProperty } from '../../../types';
|
3
4
|
/**
|
@@ -61,4 +62,16 @@ export declare const truncateNamePath: (namePath: string, limit?: number) => str
|
|
61
62
|
* @returns {RuleGroupType} - Correctly formatted rule or rules for the query builder.
|
62
63
|
*/
|
63
64
|
export declare function parseMongoDB(mongoQuery: Record<string, unknown>): RuleGroupType;
|
65
|
+
export declare const ALL_OPERATORS: {
|
66
|
+
name: string;
|
67
|
+
label: string;
|
68
|
+
}[];
|
69
|
+
/**
|
70
|
+
* Gets a human readable representation of a MongoDB query.
|
71
|
+
*
|
72
|
+
* @param {Record<string, unknown>} [mongoQuery] - The MongoDB query
|
73
|
+
* @param {Property[]} [properties] - The object properties referenced in the query
|
74
|
+
* @returns {string} The resulting query string.
|
75
|
+
*/
|
76
|
+
export declare const getReadableQuery: (mongoQuery?: Record<string, unknown>, properties?: Property[]) => string;
|
64
77
|
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { isArray, isEmpty } from 'lodash';
|
1
|
+
import { isArray, isEmpty, startCase } from 'lodash';
|
2
2
|
/**
|
3
3
|
* Recursively updates a node in a tree structure by applying an updater function to the node with the specified ID.
|
4
4
|
*
|
@@ -302,3 +302,60 @@ export function parseMongoDB(mongoQuery) {
|
|
302
302
|
};
|
303
303
|
}
|
304
304
|
}
|
305
|
+
export const ALL_OPERATORS = [
|
306
|
+
{ name: '=', label: 'Is' },
|
307
|
+
{ name: '!=', label: 'Is not' },
|
308
|
+
{ name: '<', label: 'Less than' },
|
309
|
+
{ name: '>', label: 'Greater than' },
|
310
|
+
{ name: '<=', label: 'Less than or equal to' },
|
311
|
+
{ name: '>=', label: 'Greater than or equal to' },
|
312
|
+
{ name: 'contains', label: 'Contains' },
|
313
|
+
{ name: 'beginsWith', label: 'Starts with' },
|
314
|
+
{ name: 'endsWith', label: 'Ends with' },
|
315
|
+
{ name: 'null', label: 'Is empty' },
|
316
|
+
{ name: 'notNull', label: 'Is not empty' },
|
317
|
+
{ name: 'in', label: 'In' },
|
318
|
+
{ name: 'notIn', label: 'Not in' },
|
319
|
+
];
|
320
|
+
/**
|
321
|
+
* Gets a human readable representation of a MongoDB query.
|
322
|
+
*
|
323
|
+
* @param {Record<string, unknown>} [mongoQuery] - The MongoDB query
|
324
|
+
* @param {Property[]} [properties] - The object properties referenced in the query
|
325
|
+
* @returns {string} The resulting query string.
|
326
|
+
*/
|
327
|
+
export const getReadableQuery = (mongoQuery, properties) => {
|
328
|
+
function isPresetValue(value) {
|
329
|
+
return typeof value === 'string' && value.startsWith('{{{') && value.endsWith('}}}');
|
330
|
+
}
|
331
|
+
function parseValue(val) {
|
332
|
+
if (val && Array.isArray(val)) {
|
333
|
+
return val.map((v) => (isPresetValue(v) ? startCase(v.slice(3, -3)) : v)).join(', ');
|
334
|
+
}
|
335
|
+
else {
|
336
|
+
return isPresetValue(val) ? startCase(val.slice(3, -3)) : `${val}`;
|
337
|
+
}
|
338
|
+
}
|
339
|
+
function getOperatorLabel(operator) {
|
340
|
+
const operatorObj = ALL_OPERATORS.find((o) => o.name === operator);
|
341
|
+
const defaultLabel = operatorObj ? operatorObj.label.toLowerCase() : operator;
|
342
|
+
if (['<', '>', '<=', '>='].includes(operator)) {
|
343
|
+
return `is ${defaultLabel}`;
|
344
|
+
}
|
345
|
+
return defaultLabel;
|
346
|
+
}
|
347
|
+
function buildQueryString(rule) {
|
348
|
+
if ('combinator' in rule) {
|
349
|
+
return rule?.rules?.map(buildQueryString).filter(Boolean).join(` ${rule.combinator.toLowerCase()} `);
|
350
|
+
}
|
351
|
+
else {
|
352
|
+
const property = properties?.find((p) => p.id === rule.field);
|
353
|
+
return `${property?.name ?? rule.field} ${getOperatorLabel(rule.operator)} ${parseValue(rule.value)}`;
|
354
|
+
}
|
355
|
+
}
|
356
|
+
if (!mongoQuery) {
|
357
|
+
return '';
|
358
|
+
}
|
359
|
+
const parsedQuery = parseMongoDB(mongoQuery);
|
360
|
+
return buildQueryString(parsedQuery);
|
361
|
+
};
|
@@ -81,7 +81,8 @@ export const FormComponentWrapper = (props) => {
|
|
81
81
|
property && onChange(property.id, '');
|
82
82
|
} },
|
83
83
|
React.createElement(HighlightOffOutlined, { sx: clearBtnStyles }))))),
|
84
|
-
React.createElement(
|
84
|
+
React.createElement(Box, { sx: { ...(displayOption === 'radioButton' && { display: 'flex' }) } },
|
85
|
+
React.createElement(Typography, { variant: "caption", sx: descriptionStyles }, description)),
|
85
86
|
React.createElement(Box, { sx: { display: 'flex', flexDirection: 'row' } },
|
86
87
|
React.createElement(PrefixSuffix, { prefix: prefix, height: fieldHeight }),
|
87
88
|
React.createElement(Box, { sx: { width: '100%', paddingTop: '6px' } }, children),
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import { Property } from '@evoke-platform/context';
|
1
|
+
import { Obj, Property } from '@evoke-platform/context';
|
2
2
|
import React from 'react';
|
3
3
|
type DisplayedPropertyProps = {
|
4
4
|
property: Property;
|
5
5
|
value: unknown;
|
6
|
+
referencedObject?: Obj;
|
6
7
|
};
|
7
8
|
declare const DisplayedProperty: (props: DisplayedPropertyProps) => React.JSX.Element;
|
8
9
|
export default DisplayedProperty;
|
@@ -2,9 +2,10 @@ import { DateTime } from 'luxon';
|
|
2
2
|
import React from 'react';
|
3
3
|
import { CardMedia, Typography } from '../../core';
|
4
4
|
import { Grid } from '../../layout';
|
5
|
+
import { getReadableQuery } from '../CriteriaBuilder';
|
5
6
|
import { RichTextViewer } from '../RichTextViewer';
|
6
7
|
const DisplayedProperty = (props) => {
|
7
|
-
const { property, value } = props;
|
8
|
+
const { property, value, referencedObject } = props;
|
8
9
|
const getAddressAsString = (address) => {
|
9
10
|
let stringAddress = '';
|
10
11
|
if (address?.line1)
|
@@ -22,7 +23,7 @@ const DisplayedProperty = (props) => {
|
|
22
23
|
return stringAddress;
|
23
24
|
};
|
24
25
|
const formatData = (property, value) => {
|
25
|
-
if (property?.objectId) {
|
26
|
+
if (property?.objectId && property?.type === 'object') {
|
26
27
|
return value?.name ?? value?.id;
|
27
28
|
}
|
28
29
|
switch (property?.type) {
|
@@ -47,6 +48,8 @@ const DisplayedProperty = (props) => {
|
|
47
48
|
return value ? DateTime.fromISO(value).toFormat('MM/dd/yyyy hh:mm a') : undefined;
|
48
49
|
case 'document':
|
49
50
|
return value && Array.isArray(value) ? value.map((v) => v.name).join(', ') : undefined;
|
51
|
+
case 'criteria':
|
52
|
+
return getReadableQuery(value ?? {}, referencedObject?.properties);
|
50
53
|
}
|
51
54
|
return value;
|
52
55
|
};
|
@@ -30,7 +30,7 @@ const styles = {
|
|
30
30
|
},
|
31
31
|
};
|
32
32
|
const HistoricalData = (props) => {
|
33
|
-
const { records, documentHistory, object } = props;
|
33
|
+
const { records, documentHistory, object, referencedObjects } = props;
|
34
34
|
const getPastDocumentVersion = (history) => {
|
35
35
|
const documentVersions = documentHistory?.[history.subject?.id ?? 'unknown'] ?? [];
|
36
36
|
const currentVersion = documentVersions?.map((v) => v.timestamp).indexOf(history.timestamp);
|
@@ -65,11 +65,17 @@ const HistoricalData = (props) => {
|
|
65
65
|
fontWeight: 600,
|
66
66
|
minWidth: 'fit-content',
|
67
67
|
alignSelf: 'flex-start',
|
68
|
+
lineHeight: '17px',
|
69
|
+
padding: '3px 8px',
|
68
70
|
} }, property.name)),
|
69
|
-
React.createElement(DisplayedProperty, { property: property, value: d.historicalValue
|
71
|
+
React.createElement(DisplayedProperty, { property: property, value: d.historicalValue, referencedObject: property.objectId
|
72
|
+
? referencedObjects?.find((o) => o.id === property.objectId)
|
73
|
+
: undefined }),
|
70
74
|
React.createElement(Grid, { item: true, xs: 0.5 },
|
71
75
|
React.createElement(ArrowForward, { sx: { fontSize: '12px' } })),
|
72
|
-
React.createElement(DisplayedProperty, { property: property, value: d.updatedValue
|
76
|
+
React.createElement(DisplayedProperty, { property: property, value: d.updatedValue, referencedObject: property.objectId
|
77
|
+
? referencedObjects?.find((o) => o.id === property.objectId)
|
78
|
+
: undefined }))));
|
73
79
|
}))),
|
74
80
|
['document', 'correspondence'].includes(r.type) && (React.createElement(Box, null,
|
75
81
|
React.createElement(Box, { display: "grid", gridTemplateColumns: 'fit-content(100%) fit-content(2%) fit-content(100%)', alignItems: "center", sx: { overflowWrap: 'break-word' } },
|
@@ -1,6 +1,9 @@
|
|
1
|
+
import { useApiServices } from '@evoke-platform/context';
|
1
2
|
import { Circle } from '@mui/icons-material';
|
3
|
+
import { uniq } from 'lodash';
|
2
4
|
import { DateTime } from 'luxon';
|
3
5
|
import React, { useEffect, useState } from 'react';
|
6
|
+
import { Snackbar } from '../../core';
|
4
7
|
import Typography from '../../core/Typography';
|
5
8
|
import Box from '../../layout/Box';
|
6
9
|
import HistoryFilter from './Filter';
|
@@ -20,9 +23,27 @@ export const HistoryLog = (props) => {
|
|
20
23
|
const { object, history, loading, title } = props;
|
21
24
|
const [historyMap, setHistoryMap] = useState({});
|
22
25
|
const [documentHistory, setDocumentHistory] = useState({});
|
26
|
+
const [referencedObjects, setReferencedObjects] = useState([]);
|
23
27
|
const [filteredHistory, setFilteredHistory] = useState({});
|
24
28
|
const [filter, setFilter] = useState([]);
|
25
29
|
const [order, setOrder] = useState('desc');
|
30
|
+
const [showSnackbar, setShowSnackbar] = useState(false);
|
31
|
+
const apiServices = useApiServices();
|
32
|
+
useEffect(() => {
|
33
|
+
const criteriaProperties = object.properties?.filter((property) => property.type === 'criteria');
|
34
|
+
if (criteriaProperties?.length) {
|
35
|
+
const uniqueObjectIds = uniq(criteriaProperties?.map((property) => property.objectId));
|
36
|
+
Promise.all(uniqueObjectIds.map((objectId) => apiServices.get(`/data/objects/${objectId}/effective`, {
|
37
|
+
params: {
|
38
|
+
filter: {
|
39
|
+
fields: ['id', 'name', 'properties'],
|
40
|
+
},
|
41
|
+
},
|
42
|
+
})))
|
43
|
+
.then((objs) => setReferencedObjects(objs))
|
44
|
+
.catch(() => setShowSnackbar(true));
|
45
|
+
}
|
46
|
+
}, [object, apiServices]);
|
26
47
|
const sortHistoryByTimestamp = (historicalData, order) => {
|
27
48
|
return historicalData.sort((a, b) => order === 'desc' ? b.timestamp.localeCompare(a.timestamp) : a.timestamp.localeCompare(b.timestamp));
|
28
49
|
};
|
@@ -78,13 +99,14 @@ export const HistoryLog = (props) => {
|
|
78
99
|
' ',
|
79
100
|
"\u00A0"),
|
80
101
|
React.createElement(Typography, { sx: { fontWeight: 600, fontSize: '16px', color: '#637381' } }, format(new Date(date + ' 00:00:000'), 'MMM dd, yyyy'))),
|
81
|
-
React.createElement(HistoricalData, { object: object, records: records, documentHistory: documentHistory })));
|
102
|
+
React.createElement(HistoricalData, { object: object, records: records, documentHistory: documentHistory, referencedObjects: referencedObjects })));
|
82
103
|
}
|
83
104
|
return null;
|
84
105
|
}),
|
85
106
|
!loading && filteredHistory && Object.values(filteredHistory).every((v) => !v.length) && (React.createElement(Box, { width: '100%', display: 'grid', justifyContent: 'center', marginTop: '60px' },
|
86
107
|
React.createElement(Typography, { fontSize: '20px', fontWeight: 700 }, "You Have No History"),
|
87
108
|
React.createElement(Typography, { fontSize: '14px', fontWeight: 400 }, "Try modifying the history type."))),
|
88
|
-
loading && React.createElement(HistoryLoading, null)
|
109
|
+
loading && React.createElement(HistoryLoading, null),
|
110
|
+
React.createElement(Snackbar, { open: showSnackbar, handleClose: () => setShowSnackbar(false), message: 'Error occurred when loading referenced objects', error: true })));
|
89
111
|
};
|
90
112
|
export default HistoryLog;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export { BuilderGrid } from './BuilderGrid';
|
2
|
-
export { CriteriaBuilder } from './CriteriaBuilder';
|
2
|
+
export { CriteriaBuilder, getReadableQuery } from './CriteriaBuilder';
|
3
3
|
export { DataGrid } from './DataGrid';
|
4
4
|
export { ErrorComponent } from './ErrorComponent';
|
5
5
|
export { Form } from './Form';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export { BuilderGrid } from './BuilderGrid';
|
2
|
-
export { CriteriaBuilder } from './CriteriaBuilder';
|
2
|
+
export { CriteriaBuilder, getReadableQuery } from './CriteriaBuilder';
|
3
3
|
export { DataGrid } from './DataGrid';
|
4
4
|
export { ErrorComponent } from './ErrorComponent';
|
5
5
|
export { Form } from './Form';
|
@@ -2,7 +2,7 @@ export { ClickAwayListener, createTheme, darken, lighten, styled, Toolbar } from
|
|
2
2
|
export { CalendarPicker, DateTimePicker, MonthPicker, PickersDay, StaticDateTimePicker, StaticTimePicker, TimePicker, YearPicker, } from '@mui/x-date-pickers';
|
3
3
|
export * from './colors';
|
4
4
|
export * from './components/core';
|
5
|
-
export { BuilderGrid, CriteriaBuilder, DataGrid, ErrorComponent, Form, FormField, HistoryLog, MenuBar, MultiSelect, RepeatableField, RichTextViewer, UserAvatar, } from './components/custom';
|
5
|
+
export { BuilderGrid, CriteriaBuilder, DataGrid, ErrorComponent, Form, FormField, getReadableQuery, HistoryLog, MenuBar, MultiSelect, RepeatableField, RichTextViewer, UserAvatar, } from './components/custom';
|
6
6
|
export type { FormRef } from './components/custom';
|
7
7
|
export { NumericFormat } from './components/custom/FormField/InputFieldComponent';
|
8
8
|
export { Box, Container, Grid, Stack } from './components/layout';
|
package/dist/published/index.js
CHANGED
@@ -2,7 +2,7 @@ export { ClickAwayListener, createTheme, darken, lighten, styled, Toolbar } from
|
|
2
2
|
export { CalendarPicker, DateTimePicker, MonthPicker, PickersDay, StaticDateTimePicker, StaticTimePicker, TimePicker, YearPicker, } from '@mui/x-date-pickers';
|
3
3
|
export * from './colors';
|
4
4
|
export * from './components/core';
|
5
|
-
export { BuilderGrid, CriteriaBuilder, DataGrid, ErrorComponent, Form, FormField, HistoryLog, MenuBar, MultiSelect, RepeatableField, RichTextViewer, UserAvatar, } from './components/custom';
|
5
|
+
export { BuilderGrid, CriteriaBuilder, DataGrid, ErrorComponent, Form, FormField, getReadableQuery, HistoryLog, MenuBar, MultiSelect, RepeatableField, RichTextViewer, UserAvatar, } from './components/custom';
|
6
6
|
export { NumericFormat } from './components/custom/FormField/InputFieldComponent';
|
7
7
|
export { Box, Container, Grid, Stack } from './components/layout';
|
8
8
|
export * from './theme';
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { ChipProps } from '@mui/material';
|
2
1
|
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
3
2
|
import React from 'react';
|
4
|
-
|
3
|
+
import { ChipProps } from '../components/core/Chip/Chip';
|
4
|
+
declare const _default: ComponentMeta<({ tooltip, ...props }: ChipProps) => React.JSX.Element>;
|
5
5
|
export default _default;
|
6
|
-
export declare const
|
6
|
+
export declare const ChipWithTooltip: ComponentStory<({ tooltip, ...props }: ChipProps) => React.JSX.Element>;
|
7
|
+
export declare const Chip: ComponentStory<({ tooltip, ...props }: ChipProps) => React.JSX.Element>;
|
@@ -1,8 +1,10 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { Chip as CustomChip } from '../index';
|
3
3
|
export default {
|
4
|
-
|
4
|
+
label: 'Data Display/Chip',
|
5
5
|
component: CustomChip,
|
6
6
|
};
|
7
|
-
const ChipTemplate = (args) => React.createElement(CustomChip, { ...args });
|
7
|
+
const ChipTemplate = (args) => (React.createElement(CustomChip, { label: "Basic Chip", ...args }));
|
8
|
+
const ChipWithToolipTemplate = (args) => (React.createElement(CustomChip, { tooltip: "Here is a tooltip", label: "Chip with Tooltip", ...args }));
|
9
|
+
export const ChipWithTooltip = ChipWithToolipTemplate.bind({});
|
8
10
|
export const Chip = ChipTemplate.bind({});
|