1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import React, { ReactElement, memo, useState } from "react";
6 import { Dispatch } from "redux";
28 } from "@material-ui/core";
29 import { ArvadosTheme } from "common/custom-theme";
30 import { CloseIcon, InputIcon, OutputIcon, MaximizeIcon, UnMaximizeIcon, InfoIcon } from "components/icon/icon";
31 import { MPVPanelProps } from "components/multi-panel-view/multi-panel-view";
33 BooleanCommandInputParameter,
34 CommandInputParameter,
37 DirectoryArrayCommandInputParameter,
38 DirectoryCommandInputParameter,
39 EnumCommandInputParameter,
40 FileArrayCommandInputParameter,
41 FileCommandInputParameter,
42 FloatArrayCommandInputParameter,
43 FloatCommandInputParameter,
44 IntArrayCommandInputParameter,
45 IntCommandInputParameter,
48 StringArrayCommandInputParameter,
49 StringCommandInputParameter,
51 } from "models/workflow";
52 import { CommandOutputParameter } from "cwlts/mappings/v1.0/CommandOutputParameter";
53 import { File } from "models/workflow";
54 import { getInlineFileUrl } from "views-components/context-menu/actions/helpers";
55 import { AuthState } from "store/auth/auth-reducer";
56 import mime from "mime";
57 import { DefaultView } from "components/default-view/default-view";
58 import { getNavUrl } from "routes/routes";
59 import { Link as RouterLink } from "react-router-dom";
60 import { Link as MuiLink } from "@material-ui/core";
61 import { InputCollectionMount } from "store/processes/processes-actions";
62 import { connect } from "react-redux";
63 import { RootState } from "store/store";
64 import { ProcessOutputCollectionFiles } from "./process-output-collection-files";
65 import { Process } from "store/processes/process";
66 import { navigateTo } from "store/navigation/navigation-action";
67 import classNames from "classnames";
68 import { DefaultVirtualCodeSnippet } from "components/default-code-snippet/default-virtual-code-snippet";
69 import { KEEP_URL_REGEX } from "models/resource";
70 import { FixedSizeList } from 'react-window';
71 import AutoSizer from "react-virtualized-auto-sizer";
72 import { LinkProps } from "@material-ui/core/Link";
83 | "paramTableCellText"
94 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
99 paddingTop: theme.spacing.unit,
103 fontSize: "1.875rem",
104 color: theme.customs.colors.greyL,
107 alignSelf: "flex-start",
108 paddingTop: theme.spacing.unit * 0.5,
112 height: `calc(100% - ${theme.spacing.unit * 6}px)`,
113 padding: theme.spacing.unit * 1.0,
116 paddingBottom: theme.spacing.unit * 1,
122 paddingTop: theme.spacing.unit * 0.5,
123 color: theme.customs.colors.greyD,
124 fontSize: "1.875rem",
126 // Applies to table tab and collection table content
129 maxHeight: `calc(100% - ${theme.spacing.unit * 6}px)`,
131 // Use flexbox to keep scrolling at the virtual list level
133 flexDirection: "column",
134 alignItems: "stretch", // Stretches output collection to full width
138 // Param table virtual list styles
141 flexDirection: "column",
147 padding: "4px 25px 10px",
151 height: "100vh", // Must be constrained by panel maxHeight
153 // Flex header/body rows
154 "& thead tr, & > tbody tr": {
156 // Flex header/body cells
163 // Column width overrides
164 "& th:nth-of-type(1), & td:nth-of-type(1)": {
167 "& th:nth-last-of-type(1), & td:nth-last-of-type(1)": {
176 padding: "2px 25px 2px",
179 flexDirection: "row",
180 alignItems: "center",
181 whiteSpace: "nowrap",
185 // Param value cell typography styles
186 paramTableCellText: {
189 // Every cell contents requires a wrapper for the ellipsis
190 // since adding ellipses to an anchor element parent results in misaligned tooltip
193 textOverflow: "ellipsis",
198 textOverflow: "ellipsis",
204 verticalAlign: "bottom",
205 paddingBottom: "10px",
208 paddingRight: "25px",
213 height: `calc(100% - ${theme.spacing.unit * 6}px)`,
216 color: theme.palette.primary.main,
217 textDecoration: "none",
218 // Overflow wrap for mounts table
219 overflowWrap: "break-word",
222 // Output collection tab link
226 color: theme.palette.primary.main,
227 textDecoration: "none",
228 overflowWrap: "break-word",
236 color: theme.customs.colors.grey700,
240 borderBottom: "none",
242 paddingBottom: "2px",
253 wordWrap: "break-word",
257 export enum ProcessIOCardType {
258 INPUT = "Input Parameters",
259 OUTPUT = "Output Parameters",
261 export interface ProcessIOCardDataProps {
263 label: ProcessIOCardType;
264 params: ProcessIOParameter[] | null;
266 mounts?: InputCollectionMount[];
268 forceShowParams?: boolean;
271 export interface ProcessIOCardActionProps {
272 navigateTo: (uuid: string) => void;
275 const mapDispatchToProps = (dispatch: Dispatch): ProcessIOCardActionProps => ({
276 navigateTo: uuid => dispatch<any>(navigateTo(uuid)),
279 type ProcessIOCardProps = ProcessIOCardDataProps & ProcessIOCardActionProps & WithStyles<CssRules> & MPVPanelProps;
281 export const ProcessIOCard = withStyles(styles)(
301 }: ProcessIOCardProps) => {
302 const [mainProcTabState, setMainProcTabState] = useState(0);
303 const [subProcTabState, setSubProcTabState] = useState(0);
304 const handleMainProcTabChange = (event: React.MouseEvent<HTMLElement>, value: number) => {
305 setMainProcTabState(value);
307 const handleSubProcTabChange = (event: React.MouseEvent<HTMLElement>, value: number) => {
308 setSubProcTabState(value);
311 const PanelIcon = label === ProcessIOCardType.INPUT ? InputIcon : OutputIcon;
312 const mainProcess = !(process && process!.containerRequest.requestingContainerUuid);
313 const showParamTable = mainProcess || forceShowParams;
315 const loading = raw === null || raw === undefined || params === null;
317 const hasRaw = !!(raw && Object.keys(raw).length > 0);
318 const hasParams = !!(params && params.length > 0);
319 // isRawLoaded allows subprocess panel to display raw even if it's {}
320 const isRawLoaded = !!(raw && Object.keys(raw).length >= 0);
323 const hasInputMounts = !!(label === ProcessIOCardType.INPUT && mounts && mounts.length);
324 const hasOutputCollecton = !!(label === ProcessIOCardType.OUTPUT && outputUuid);
325 // Subprocess should not show loading if hasOutputCollection or hasInputMounts
326 const subProcessLoading = loading && !hasOutputCollecton && !hasInputMounts;
330 className={classes.card}
331 data-cy="process-io-card"
334 className={classes.header}
336 content: classes.title,
337 avatar: classes.avatar,
339 avatar={<PanelIcon className={classes.iconHeader} />}
351 {doUnMaximizePanel && panelMaximized && (
353 title={`Unmaximize ${panelName || "panel"}`}
356 <IconButton onClick={doUnMaximizePanel}>
361 {doMaximizePanel && !panelMaximized && (
363 title={`Maximize ${panelName || "panel"}`}
366 <IconButton onClick={doMaximizePanel}>
373 title={`Close ${panelName || "panel"}`}
377 disabled={panelMaximized}
378 onClick={doHidePanel}
387 <CardContent className={classes.content}>
390 {/* raw is undefined until params are loaded */}
401 {/* Once loaded, either raw or params may still be empty
402 * Raw when all params are empty
403 * Params when raw is provided by containerRequest properties but workflow mount is absent for preview
405 {!loading && (hasRaw || hasParams) && (
408 value={mainProcTabState}
409 onChange={handleMainProcTabChange}
411 className={classes.symmetricTabs}
413 {/* params will be empty on processes without workflow definitions in mounts, so we only show raw */}
414 {hasParams && <Tab label="Parameters" />}
415 {!forceShowParams && <Tab label="JSON" />}
416 {hasOutputCollecton && <Tab label="Collection" />}
418 {mainProcTabState === 0 && params && hasParams && (
419 <div className={classes.tableWrapper}>
422 valueLabel={forceShowParams ? "Default value" : "Value"}
426 {(mainProcTabState === 1 || !hasParams) && (
427 <div className={classes.jsonWrapper}>
428 <ProcessIORaw data={raw} />
431 {mainProcTabState === 2 && hasOutputCollecton && (
434 <Typography className={classes.collectionLink}>
435 Output Collection:{" "}
437 className={classes.keepLink}
439 navigateTo(outputUuid || "");
446 <ProcessOutputCollectionFiles
448 currentItemUuid={outputUuid}
455 {!loading && !hasRaw && !hasParams && (
462 <DefaultView messages={["No parameters found"]} />
469 {subProcessLoading ? (
478 ) : !subProcessLoading && (hasInputMounts || hasOutputCollecton || isRawLoaded) ? (
481 value={subProcTabState}
482 onChange={handleSubProcTabChange}
484 className={classes.symmetricTabs}
486 {hasInputMounts && <Tab label="Collections" />}
487 {hasOutputCollecton && <Tab label="Collection" />}
488 {isRawLoaded && <Tab label="JSON" />}
490 {subProcTabState === 0 && hasInputMounts && <ProcessInputMounts mounts={mounts || []} />}
491 {subProcTabState === 0 && hasOutputCollecton && (
492 <div className={classes.tableWrapper}>
495 <Typography className={classes.collectionLink}>
496 Output Collection:{" "}
498 className={classes.keepLink}
500 navigateTo(outputUuid || "");
507 <ProcessOutputCollectionFiles
509 currentItemUuid={outputUuid}
514 {isRawLoaded && (subProcTabState === 1 || (!hasInputMounts && !hasOutputCollecton)) && (
515 <div className={classes.jsonWrapper}>
516 <ProcessIORaw data={raw} />
527 <DefaultView messages={["No data to display"]} />
539 export type ProcessIOValue = {
540 display: ReactElement<any, any>;
542 collection?: ReactElement<any, any>;
546 export type ProcessIOParameter = {
549 value: ProcessIOValue;
552 interface ProcessIOPreviewDataProps {
553 data: ProcessIOParameter[];
557 type ProcessIOPreviewProps = ProcessIOPreviewDataProps & WithStyles<CssRules>;
559 const ProcessIOPreview = memo(
560 withStyles(styles)(({ classes, data, valueLabel }: ProcessIOPreviewProps) => {
561 const showLabel = data.some((param: ProcessIOParameter) => param.label);
563 const hasMoreValues = (index: number) => (
564 data[index+1] && !isMainRow(data[index+1])
567 const isMainRow = (param: ProcessIOParameter) => (
569 ((param.id || param.label) &&
570 !param.value.secondary)
573 const RenderRow = ({index, style}) => {
574 const param = data[index];
577 [classes.noBorderRow]: hasMoreValues(index),
582 className={classNames(rowClasses)}
583 data-cy={isMainRow(param) ? "process-io-param" : ""}>
585 <Tooltip title={param.id}>
586 <Typography className={classes.paramTableCellText}>
593 {showLabel && <TableCell>
594 <Tooltip title={param.label}>
595 <Typography className={classes.paramTableCellText}>
608 <Typography className={classes.paramTableCellText}>
609 {/** Collection is an anchor so doesn't require wrapper element */}
610 {param.value.collection}
618 className={classes.paramTableRoot}
619 aria-label="Process IO Preview"
623 <TableCell>Name</TableCell>
624 {showLabel && <TableCell>Label</TableCell>}
625 <TableCell>{valueLabel}</TableCell>
626 <TableCell>Collection</TableCell>
631 {({ height, width }) =>
634 itemCount={data.length}
648 interface ProcessValuePreviewProps {
649 value: ProcessIOValue;
652 const ProcessValuePreview = withStyles(styles)(({ value, classes }: ProcessValuePreviewProps & WithStyles<CssRules>) => (
653 <Typography className={classNames(classes.paramTableCellText, value.secondary && classes.secondaryVal)}>
658 interface ProcessIORawDataProps {
659 data: ProcessIOParameter[];
662 const ProcessIORaw = withStyles(styles)(({ data }: ProcessIORawDataProps) => (
663 <Paper elevation={0} style={{minWidth: "100%", height: "100%"}}>
664 <DefaultVirtualCodeSnippet
665 lines={JSON.stringify(data, null, 2).split('\n')}
671 interface ProcessInputMountsDataProps {
672 mounts: InputCollectionMount[];
675 type ProcessInputMountsProps = ProcessInputMountsDataProps & WithStyles<CssRules>;
677 const ProcessInputMounts = withStyles(styles)(
678 connect((state: RootState) => ({
680 }))(({ mounts, classes, auth }: ProcessInputMountsProps & { auth: AuthState }) => (
682 className={classes.mountsTableRoot}
683 aria-label="Process Input Mounts"
687 <TableCell>Path</TableCell>
688 <TableCell>Portable Data Hash</TableCell>
692 {mounts.map(mount => (
693 <TableRow key={mount.path}>
695 <pre>{mount.path}</pre>
699 to={getNavUrl(mount.pdh, auth)}
700 className={classes.keepLink}
712 type FileWithSecondaryFiles = {
713 secondaryFiles: File[];
716 export const getIOParamDisplayValue = (auth: AuthState, input: CommandInputParameter | CommandOutputParameter, pdh?: string): ProcessIOValue[] => {
718 case isPrimitiveOfType(input, CWLType.BOOLEAN):
719 const boolValue = (input as BooleanCommandInputParameter).value;
720 return boolValue !== undefined && !(Array.isArray(boolValue) && boolValue.length === 0)
721 ? [{ display: <PrimitiveTooltip data={boolValue}>{renderPrimitiveValue(boolValue, false)}</PrimitiveTooltip> }]
722 : [{ display: <EmptyValue /> }];
724 case isPrimitiveOfType(input, CWLType.INT):
725 case isPrimitiveOfType(input, CWLType.LONG):
726 const intValue = (input as IntCommandInputParameter).value;
727 return intValue !== undefined &&
728 // Missing values are empty array
729 !(Array.isArray(intValue) && intValue.length === 0)
730 ? [{ display: <PrimitiveTooltip data={intValue}>{renderPrimitiveValue(intValue, false)}</PrimitiveTooltip> }]
731 : [{ display: <EmptyValue /> }];
733 case isPrimitiveOfType(input, CWLType.FLOAT):
734 case isPrimitiveOfType(input, CWLType.DOUBLE):
735 const floatValue = (input as FloatCommandInputParameter).value;
736 return floatValue !== undefined && !(Array.isArray(floatValue) && floatValue.length === 0)
737 ? [{ display: <PrimitiveTooltip data={floatValue}>{renderPrimitiveValue(floatValue, false)}</PrimitiveTooltip> }]
738 : [{ display: <EmptyValue /> }];
740 case isPrimitiveOfType(input, CWLType.STRING):
741 const stringValue = (input as StringCommandInputParameter).value || undefined;
742 return stringValue !== undefined && !(Array.isArray(stringValue) && stringValue.length === 0)
743 ? [{ display: <PrimitiveTooltip data={stringValue}>{renderPrimitiveValue(stringValue, false)}</PrimitiveTooltip> }]
744 : [{ display: <EmptyValue /> }];
746 case isPrimitiveOfType(input, CWLType.FILE):
747 const mainFile = (input as FileCommandInputParameter).value;
748 // secondaryFiles: File[] is not part of CommandOutputParameter so we cast to access secondaryFiles
749 const secondaryFiles = (mainFile as unknown as FileWithSecondaryFiles)?.secondaryFiles || [];
750 const files = [...(mainFile && !(Array.isArray(mainFile) && mainFile.length === 0) ? [mainFile] : []), ...secondaryFiles];
751 const mainFilePdhUrl = mainFile ? getResourcePdhUrl(mainFile, pdh) : "";
753 ? files.map((file, i) => fileToProcessIOValue(file, i > 0, auth, pdh, i > 0 ? mainFilePdhUrl : ""))
754 : [{ display: <EmptyValue /> }];
756 case isPrimitiveOfType(input, CWLType.DIRECTORY):
757 const directory = (input as DirectoryCommandInputParameter).value;
758 return directory !== undefined && !(Array.isArray(directory) && directory.length === 0)
759 ? [directoryToProcessIOValue(directory, auth, pdh)]
760 : [{ display: <EmptyValue /> }];
762 case getEnumType(input) !== null:
763 const enumValue = (input as EnumCommandInputParameter).value;
764 return enumValue !== undefined && enumValue ? [{ display: <PrimitiveTooltip data={enumValue}>{enumValue}</PrimitiveTooltip> }] : [{ display: <EmptyValue /> }];
766 case isArrayOfType(input, CWLType.STRING):
767 const strArray = (input as StringArrayCommandInputParameter).value || [];
768 return strArray.length ? [{ display: <PrimitiveArrayTooltip data={strArray}>{strArray.map(val => renderPrimitiveValue(val, true))}</PrimitiveArrayTooltip> }] : [{ display: <EmptyValue /> }];
770 case isArrayOfType(input, CWLType.INT):
771 case isArrayOfType(input, CWLType.LONG):
772 const intArray = (input as IntArrayCommandInputParameter).value || [];
773 return intArray.length ? [{ display: <PrimitiveArrayTooltip data={intArray}>{intArray.map(val => renderPrimitiveValue(val, true))}</PrimitiveArrayTooltip> }] : [{ display: <EmptyValue /> }];
775 case isArrayOfType(input, CWLType.FLOAT):
776 case isArrayOfType(input, CWLType.DOUBLE):
777 const floatArray = (input as FloatArrayCommandInputParameter).value || [];
778 return floatArray.length ? [{ display: <PrimitiveArrayTooltip data={floatArray}>{floatArray.map(val => renderPrimitiveValue(val, true))}</PrimitiveArrayTooltip> }] : [{ display: <EmptyValue /> }];
780 case isArrayOfType(input, CWLType.FILE):
781 const fileArrayMainFiles = (input as FileArrayCommandInputParameter).value || [];
782 const firstMainFilePdh = fileArrayMainFiles.length > 0 && fileArrayMainFiles[0] ? getResourcePdhUrl(fileArrayMainFiles[0], pdh) : "";
784 // Convert each main and secondaryFiles into array of ProcessIOValue preserving ordering
785 let fileArrayValues: ProcessIOValue[] = [];
786 for (let i = 0; i < fileArrayMainFiles.length; i++) {
787 const secondaryFiles = (fileArrayMainFiles[i] as unknown as FileWithSecondaryFiles)?.secondaryFiles || [];
788 fileArrayValues.push(
789 // Pass firstMainFilePdh to secondary files and every main file besides the first to hide pdh if equal
790 ...(fileArrayMainFiles[i] ? [fileToProcessIOValue(fileArrayMainFiles[i], false, auth, pdh, i > 0 ? firstMainFilePdh : "")] : []),
791 ...secondaryFiles.map(file => fileToProcessIOValue(file, true, auth, pdh, firstMainFilePdh))
795 return fileArrayValues.length ? fileArrayValues : [{ display: <EmptyValue /> }];
797 case isArrayOfType(input, CWLType.DIRECTORY):
798 const directories = (input as DirectoryArrayCommandInputParameter).value || [];
799 return directories.length ? directories.map(directory => directoryToProcessIOValue(directory, auth, pdh)) : [{ display: <EmptyValue /> }];
802 return [{ display: <UnsupportedValue /> }];
806 interface PrimitiveTooltipProps {
807 data: boolean | number | string;
810 const PrimitiveTooltip = (props: React.PropsWithChildren<PrimitiveTooltipProps>) => (
811 <Tooltip title={typeof props.data !== 'object' ? String(props.data) : ""}>
812 <pre>{props.children}</pre>
816 interface PrimitiveArrayTooltipProps {
820 const PrimitiveArrayTooltip = (props: React.PropsWithChildren<PrimitiveArrayTooltipProps>) => (
821 <Tooltip title={props.data.join(', ')}>
822 <span>{props.children}</span>
827 const renderPrimitiveValue = (value: any, asChip: boolean) => {
828 const isObject = typeof value === "object";
833 label={String(value)}
834 style={{marginRight: "10px"}}
840 return asChip ? <UnsupportedValueChip /> : <UnsupportedValue />;
845 * @returns keep url without keep: prefix
847 const getKeepUrl = (file: File | Directory, pdh?: string): string => {
848 const isKeepUrl = file.location?.startsWith("keep:") || false;
849 const keepUrl = isKeepUrl ? file.location?.replace("keep:", "") : pdh ? `${pdh}/${file.location}` : file.location;
850 return keepUrl || "";
853 interface KeepUrlProps {
855 res: File | Directory;
859 const getResourcePdhUrl = (res: File | Directory, pdh?: string): string => {
860 const keepUrl = getKeepUrl(res, pdh);
861 return keepUrl ? keepUrl.split("/").slice(0, 1)[0] : "";
864 const KeepUrlBase = withStyles(styles)(({ auth, res, pdh, classes }: KeepUrlProps & WithStyles<CssRules>) => {
865 const pdhUrl = getResourcePdhUrl(res, pdh);
866 // Passing a pdh always returns a relative wb2 collection url
867 const pdhWbPath = getNavUrl(pdhUrl, auth);
868 return pdhUrl && pdhWbPath ? (
869 <Tooltip title={<>View collection in Workbench<br />{pdhUrl}</>}>
872 className={classes.keepLink}
882 const KeepUrlPath = withStyles(styles)(({ auth, res, pdh, classes }: KeepUrlProps & WithStyles<CssRules>) => {
883 const keepUrl = getKeepUrl(res, pdh);
884 const keepUrlParts = keepUrl ? keepUrl.split("/") : [];
885 const keepUrlPath = keepUrlParts.length > 1 ? keepUrlParts.slice(1).join("/") : "";
887 const keepUrlPathNav = getKeepNavUrl(auth, res, pdh);
888 return keepUrlPathNav ? (
889 <Tooltip classes={{tooltip: classes.wrapTooltip}} title={<>View in keep-web<br />{keepUrlPath || "/"}</>}>
891 className={classes.keepLink}
892 href={keepUrlPathNav}
894 rel="noopener noreferrer"
904 const getKeepNavUrl = (auth: AuthState, file: File | Directory, pdh?: string): string => {
905 let keepUrl = getKeepUrl(file, pdh);
906 return getInlineFileUrl(
907 `${auth.config.keepWebServiceUrl}/c=${keepUrl}?api_token=${auth.apiToken}`,
908 auth.config.keepWebServiceUrl,
909 auth.config.keepWebInlineServiceUrl
913 const getImageUrl = (auth: AuthState, file: File, pdh?: string): string => {
914 const keepUrl = getKeepUrl(file, pdh);
915 return getInlineFileUrl(
916 `${auth.config.keepWebServiceUrl}/c=${keepUrl}?api_token=${auth.apiToken}`,
917 auth.config.keepWebServiceUrl,
918 auth.config.keepWebInlineServiceUrl
922 const isFileImage = (basename?: string): boolean => {
923 return basename ? (mime.getType(basename) || "").startsWith("image/") : false;
926 const isFileUrl = (location?: string): boolean =>
927 !!location && !KEEP_URL_REGEX.exec(location) && (location.startsWith("http://") || location.startsWith("https://"));
929 const normalizeDirectoryLocation = (directory: Directory): Directory => {
930 if (!directory.location) {
935 location: (directory.location || "").endsWith("/") ? directory.location : directory.location + "/",
939 const directoryToProcessIOValue = (directory: Directory, auth: AuthState, pdh?: string): ProcessIOValue => {
940 if (isExternalValue(directory)) {
941 return { display: <UnsupportedValue /> };
944 const normalizedDirectory = normalizeDirectoryLocation(directory);
949 res={normalizedDirectory}
956 res={normalizedDirectory}
963 type MuiLinkWithTooltipProps = WithStyles<CssRules> & React.PropsWithChildren<LinkProps>;
965 const MuiLinkWithTooltip = withStyles(styles)((props: MuiLinkWithTooltipProps) => (
966 <Tooltip title={props.title} classes={{tooltip: props.classes.wrapTooltip}}>
973 const fileToProcessIOValue = (file: File, secondary: boolean, auth: AuthState, pdh: string | undefined, mainFilePdh: string): ProcessIOValue => {
974 if (isExternalValue(file)) {
975 return { display: <UnsupportedValue /> };
978 if (isFileUrl(file.location)) {
985 title={file.location}
988 </MuiLinkWithTooltip>
994 const resourcePdh = getResourcePdhUrl(file, pdh);
1004 imageUrl: isFileImage(file.basename) ? getImageUrl(auth, file, pdh) : undefined,
1006 resourcePdh !== mainFilePdh ? (
1018 const isExternalValue = (val: any) => Object.keys(val).includes("$import") || Object.keys(val).includes("$include");
1020 export const EmptyValue = withStyles(styles)(({ classes }: WithStyles<CssRules>) => <span className={classes.emptyValue}>No value</span>);
1022 const UnsupportedValue = withStyles(styles)(({ classes }: WithStyles<CssRules>) => <span className={classes.emptyValue}>Cannot display value</span>);
1024 const UnsupportedValueChip = withStyles(styles)(({ classes }: WithStyles<CssRules>) => (
1027 label={"Cannot display value"}