synapse-react-client 4.0.11 → 4.0.12
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/SWC.index.d.ts +1 -1
- package/dist/SWC.index.js +1 -1
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.d.ts +44 -0
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.d.ts.map +1 -0
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.js +46 -0
- package/dist/components/AdaptiveTwoColumnLayout/AdaptiveTwoColumnLayout.js.map +1 -0
- package/dist/components/DownloadCart/DownloadCartPage.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadCartPage.js +183 -185
- package/dist/components/DownloadCart/DownloadCartPage.js.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js +1 -1
- package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js.map +1 -1
- package/dist/components/EntityAclEditor/EntityAclEditor.js +8 -8
- package/dist/components/EntityAclEditor/EntityAclEditor.js.map +1 -1
- package/dist/components/EntityAclEditor/InheritanceMessage.d.ts.map +1 -1
- package/dist/components/EntityAclEditor/InheritanceMessage.js +1 -2
- package/dist/components/EntityAclEditor/InheritanceMessage.js.map +1 -1
- package/dist/components/FullTextSearch/FullTextSearch.d.ts.map +1 -1
- package/dist/components/FullTextSearch/FullTextSearch.js +86 -47
- package/dist/components/FullTextSearch/FullTextSearch.js.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.js +157 -157
- package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
- package/dist/components/HeaderCard.d.ts.map +1 -1
- package/dist/components/HeaderCard.js +131 -130
- package/dist/components/HeaderCard.js.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts +4 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js +3 -2
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js.map +1 -1
- package/dist/components/QueryContext/QueryContext.d.ts +6 -0
- package/dist/components/QueryContext/QueryContext.d.ts.map +1 -1
- package/dist/components/QueryContext/QueryContext.js.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +12 -11
- package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +5 -0
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +32 -29
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/UseRowSet.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/UseRowSet.js +4 -1
- package/dist/components/QueryWrapperPlotNav/UseRowSet.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts +59 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +174 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts +40 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts.map +1 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js +100 -0
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js.map +1 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts +56 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.d.ts.map +1 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js +73 -0
- package/dist/components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav.js.map +1 -0
- package/dist/components/ShareThisPage/ShareThisPage.js +1 -1
- package/dist/components/ShareThisPage/ShareThisPage.js.map +1 -1
- package/dist/components/SynapseChat/GridAgentChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/GridAgentChat.js +20 -14
- package/dist/components/SynapseChat/GridAgentChat.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts +3 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.js +51 -36
- package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.css +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js +8 -7
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.scss +16 -0
- package/dist/components/SynapseHomepageV2/WordPressNews.d.ts +3 -1
- package/dist/components/SynapseHomepageV2/WordPressNews.d.ts.map +1 -1
- package/dist/components/SynapseHomepageV2/WordPressNews.js +9 -8
- package/dist/components/SynapseHomepageV2/WordPressNews.js.map +1 -1
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.d.ts +2 -1
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.d.ts.map +1 -1
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.js +2 -2
- package/dist/components/SynapseHomepageV2/WordPressNewsItem.js.map +1 -1
- package/dist/components/SynapseTable/SearchV2.d.ts +7 -0
- package/dist/components/SynapseTable/SearchV2.d.ts.map +1 -1
- package/dist/components/SynapseTable/SearchV2.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.d.ts.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js.map +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.d.ts.map +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.js +6 -5
- package/dist/components/SynapseTable/usePrefetchTableData.js.map +1 -1
- package/dist/components/ToastMessage/ToastMessage.d.ts +1 -1
- package/dist/components/ToastMessage/ToastMessage.d.ts.map +1 -1
- package/dist/components/ToastMessage/ToastMessage.js +2 -2
- package/dist/components/ToastMessage/ToastMessage.js.map +1 -1
- package/dist/components/error/ErrorPage.d.ts +0 -4
- package/dist/components/error/ErrorPage.d.ts.map +1 -1
- package/dist/components/error/ErrorPage.js +25 -30
- package/dist/components/error/ErrorPage.js.map +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +41 -39
- package/dist/components/widgets/query-filter/FacetFilterControls.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/FacetFilterControls.js +2 -2
- package/dist/components/widgets/query-filter/FacetFilterControls.js.map +1 -1
- package/dist/index.js +52 -50
- package/dist/index.js.map +1 -1
- package/dist/mocks/entity/index.d.ts.map +1 -1
- package/dist/mocks/entity/index.js +18 -16
- package/dist/mocks/entity/index.js.map +1 -1
- package/dist/mocks/mockSearchQueryData.d.ts +14 -0
- package/dist/mocks/mockSearchQueryData.d.ts.map +1 -0
- package/dist/mocks/mockSearchQueryData.js +564 -0
- package/dist/mocks/mockSearchQueryData.js.map +1 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.d.ts +22 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.js +63 -0
- package/dist/mocks/msw/handlers/searchQueryHandlers.js.map +1 -0
- package/dist/mocks/msw/handlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers.js +9 -7
- package/dist/mocks/msw/handlers.js.map +1 -1
- package/dist/style/components/_cards.scss +15 -0
- package/dist/style/main.css +1 -1
- package/dist/synapse-client/SynapseClient.d.ts +7 -1
- package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
- package/dist/synapse-client/SynapseClient.js +422 -417
- package/dist/synapse-client/SynapseClient.js.map +1 -1
- package/dist/synapse-client/index.js +3 -3
- package/dist/synapse-queries/KeyFactory.d.ts +2 -0
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +3 -0
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/APIConstants.d.ts +2 -0
- package/dist/utils/APIConstants.d.ts.map +1 -1
- package/dist/utils/APIConstants.js +2 -2
- package/dist/utils/APIConstants.js.map +1 -1
- package/dist/utils/functions/calculateFriendlyFileSize.d.ts.map +1 -1
- package/dist/utils/functions/calculateFriendlyFileSize.js +3 -3
- package/dist/utils/functions/calculateFriendlyFileSize.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,64 +1,103 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { useDebouncedEffect as e } from "../../utils/hooks/useDebouncedEffect.js";
|
|
2
|
+
import "../../utils/hooks/index.js";
|
|
3
|
+
import { HelpPopover as t } from "../HelpPopover/HelpPopover.js";
|
|
4
|
+
import n from "../IconSvg/IconSvg.js";
|
|
5
|
+
import { useQueryContext as r } from "../QueryContext/QueryContext.js";
|
|
4
6
|
import "../QueryContext/index.js";
|
|
5
|
-
import { useGetQueryMetadata as
|
|
6
|
-
import { useQueryVisualizationContext as
|
|
7
|
+
import { useGetQueryMetadata as i } from "../QueryWrapper/useGetQueryMetadata.js";
|
|
8
|
+
import { useQueryVisualizationContext as a } from "../QueryVisualizationWrapper/QueryVisualizationContext.js";
|
|
7
9
|
import "../QueryVisualizationWrapper/index.js";
|
|
8
|
-
import { updateQueryUsingSearchTerm as
|
|
9
|
-
import { IconSvgButton as
|
|
10
|
-
import { useRef as
|
|
11
|
-
import { Collapse as
|
|
12
|
-
import { Fragment as
|
|
10
|
+
import { updateQueryUsingSearchTerm as o } from "./FullTextSearchUtils.js";
|
|
11
|
+
import { IconSvgButton as s } from "../IconSvgButton.js";
|
|
12
|
+
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
13
|
+
import { Autocomplete as d, Collapse as f, TextField as p } from "@mui/material";
|
|
14
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
15
|
//#region src/components/FullTextSearch/FullTextSearch.tsx
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let { executeQueryRequest:
|
|
17
|
-
|
|
16
|
+
var _ = 3, v = 300;
|
|
17
|
+
function y({ ftsConfig: y }) {
|
|
18
|
+
let { executeQueryRequest: b } = r(), { showSearchBar: x } = a(), [S, C] = u(""), [w, T] = u([]), E = l(null), { data: D } = i(), O = D?.columnModels;
|
|
19
|
+
c(() => {
|
|
20
|
+
(!y?.getSuggestions || S.trim().length < _) && T([]);
|
|
21
|
+
}, [y?.getSuggestions, S]), e(() => {
|
|
22
|
+
!y?.getSuggestions || S.trim().length < _ || y.getSuggestions(S).then(T).catch(() => T([]));
|
|
23
|
+
}, [S, y], v);
|
|
24
|
+
let k = (e) => {
|
|
25
|
+
b((t) => o(t, O, e, y)), C(""), T([]);
|
|
26
|
+
}, A = (e) => {
|
|
27
|
+
e.preventDefault(), S.trim().length < _ ? E.current?.setCustomValidity(`Search term must have a minimum of ${_} characters`) : k(S);
|
|
28
|
+
}, j = (e) => {
|
|
29
|
+
E.current?.setCustomValidity(""), C(e.currentTarget.value);
|
|
30
|
+
}, M = /* @__PURE__ */ h(n, {
|
|
31
|
+
icon: "search",
|
|
32
|
+
wrap: !1,
|
|
33
|
+
sx: {
|
|
34
|
+
mr: 1,
|
|
35
|
+
color: "grey.600"
|
|
36
|
+
}
|
|
37
|
+
}), N = /* @__PURE__ */ g(m, { children: [S.length > 0 && /* @__PURE__ */ h(s, {
|
|
38
|
+
icon: "close",
|
|
39
|
+
size: "small",
|
|
40
|
+
onClick: () => {
|
|
41
|
+
C(""), T([]);
|
|
42
|
+
}
|
|
43
|
+
}), y?.searchHelpURL && /* @__PURE__ */ h(t, {
|
|
44
|
+
markdownText: "This search bar is powered by MySQL Full Text Search.",
|
|
45
|
+
helpUrl: y.searchHelpURL,
|
|
46
|
+
placement: "left"
|
|
47
|
+
})] });
|
|
48
|
+
return /* @__PURE__ */ h("div", {
|
|
18
49
|
className: "QueryWrapperFullTextSearchInput",
|
|
19
|
-
children: /* @__PURE__ */ f
|
|
20
|
-
in:
|
|
50
|
+
children: /* @__PURE__ */ h(f, {
|
|
51
|
+
in: x,
|
|
21
52
|
timeout: {
|
|
22
53
|
enter: 300,
|
|
23
54
|
exit: 300
|
|
24
55
|
},
|
|
25
|
-
children: /* @__PURE__ */
|
|
26
|
-
onSubmit:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
56
|
+
children: /* @__PURE__ */ h("form", {
|
|
57
|
+
onSubmit: A,
|
|
58
|
+
children: y?.getSuggestions ? /* @__PURE__ */ h(d, {
|
|
59
|
+
freeSolo: !0,
|
|
60
|
+
disableClearable: !0,
|
|
61
|
+
options: w,
|
|
62
|
+
inputValue: S,
|
|
63
|
+
onInputChange: (e, t, n) => {
|
|
64
|
+
n === "input" && (E.current?.setCustomValidity(""), C(t));
|
|
65
|
+
},
|
|
66
|
+
onChange: (e, t) => {
|
|
67
|
+
typeof t == "string" && t.trim().length >= _ && k(t);
|
|
33
68
|
},
|
|
69
|
+
renderInput: (e) => /* @__PURE__ */ h(p, {
|
|
70
|
+
...e,
|
|
71
|
+
inputRef: E,
|
|
72
|
+
sx: { width: "100%" },
|
|
73
|
+
placeholder: "Enter Search Terms",
|
|
74
|
+
type: "text",
|
|
75
|
+
slotProps: {
|
|
76
|
+
input: {
|
|
77
|
+
...e.InputProps,
|
|
78
|
+
startAdornment: M,
|
|
79
|
+
endAdornment: N
|
|
80
|
+
},
|
|
81
|
+
htmlInput: {
|
|
82
|
+
...e.inputProps,
|
|
83
|
+
minLength: _
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
}) : /* @__PURE__ */ h(p, {
|
|
88
|
+
sx: { width: "100%" },
|
|
89
|
+
onChange: j,
|
|
34
90
|
placeholder: "Enter Search Terms",
|
|
35
|
-
value:
|
|
91
|
+
value: S,
|
|
36
92
|
type: "text",
|
|
37
93
|
slotProps: {
|
|
38
94
|
input: {
|
|
39
|
-
startAdornment:
|
|
40
|
-
|
|
41
|
-
wrap: !1,
|
|
42
|
-
sx: {
|
|
43
|
-
mr: 1,
|
|
44
|
-
color: "grey.600"
|
|
45
|
-
}
|
|
46
|
-
}),
|
|
47
|
-
endAdornment: /* @__PURE__ */ p(d, { children: [v.length > 0 && /* @__PURE__ */ f(o, {
|
|
48
|
-
icon: "close",
|
|
49
|
-
size: "small",
|
|
50
|
-
onClick: () => {
|
|
51
|
-
y("");
|
|
52
|
-
}
|
|
53
|
-
}), /* @__PURE__ */ f(e, {
|
|
54
|
-
markdownText: "This search bar is powered by MySQL Full Text Search.",
|
|
55
|
-
helpUrl: h?.searchHelpURL,
|
|
56
|
-
placement: "left"
|
|
57
|
-
})] })
|
|
95
|
+
startAdornment: M,
|
|
96
|
+
endAdornment: N
|
|
58
97
|
},
|
|
59
98
|
htmlInput: {
|
|
60
|
-
minLength:
|
|
61
|
-
ref:
|
|
99
|
+
minLength: _,
|
|
100
|
+
ref: E
|
|
62
101
|
}
|
|
63
102
|
}
|
|
64
103
|
})
|
|
@@ -67,6 +106,6 @@ function h({ ftsConfig: h }) {
|
|
|
67
106
|
});
|
|
68
107
|
}
|
|
69
108
|
//#endregion
|
|
70
|
-
export {
|
|
109
|
+
export { y as FullTextSearch, y as default };
|
|
71
110
|
|
|
72
111
|
//# sourceMappingURL=FullTextSearch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FullTextSearch.js","names":[],"sources":["../../../src/components/FullTextSearch/FullTextSearch.tsx"],"sourcesContent":["import { Collapse, TextField } from '@mui/material'\nimport React, {
|
|
1
|
+
{"version":3,"file":"FullTextSearch.js","names":[],"sources":["../../../src/components/FullTextSearch/FullTextSearch.tsx"],"sourcesContent":["import { Autocomplete, Collapse, TextField } from '@mui/material'\nimport React, {\n ChangeEvent,\n SyntheticEvent,\n useEffect,\n useRef,\n useState,\n} from 'react'\nimport { useDebouncedEffect } from '@/utils/hooks'\nimport { HelpPopover } from '../HelpPopover/HelpPopover'\nimport IconSvg from '../IconSvg/IconSvg'\nimport { IconSvgButton } from '../IconSvgButton'\nimport { useQueryContext } from '../QueryContext'\nimport { useQueryVisualizationContext } from '../QueryVisualizationWrapper'\nimport { useGetQueryMetadata } from '../QueryWrapper/useGetQueryMetadata'\nimport { updateQueryUsingSearchTerm } from './FullTextSearchUtils'\nimport { FTSConfig } from '../SynapseTable/SearchV2'\n\n// See PLFM-7011\nconst MIN_SEARCH_QUERY_LENGTH = 3\nconst SUGGESTION_DEBOUNCE_MS = 300\n\nexport type FullTextSearchProps = {\n ftsConfig?: FTSConfig\n}\n\nexport function FullTextSearch({\n ftsConfig,\n}: FullTextSearchProps): React.ReactNode {\n const { executeQueryRequest } = useQueryContext()\n const { showSearchBar } = useQueryVisualizationContext()\n const [searchText, setSearchText] = useState('')\n const [suggestions, setSuggestions] = useState<string[]>([])\n const searchInputRef = useRef<HTMLInputElement>(null)\n\n const { data } = useGetQueryMetadata()\n const columnModels = data?.columnModels\n\n // Clear suggestions immediately when the search text is too short\n useEffect(() => {\n if (\n !ftsConfig?.getSuggestions ||\n searchText.trim().length < MIN_SEARCH_QUERY_LENGTH\n ) {\n setSuggestions([])\n }\n }, [ftsConfig?.getSuggestions, searchText])\n\n // Fetch autocomplete suggestions whenever searchText changes (debounced)\n useDebouncedEffect(\n () => {\n if (\n !ftsConfig?.getSuggestions ||\n searchText.trim().length < MIN_SEARCH_QUERY_LENGTH\n ) {\n return\n }\n ftsConfig\n .getSuggestions(searchText)\n .then(setSuggestions)\n .catch(() => setSuggestions([]))\n },\n [searchText, ftsConfig],\n SUGGESTION_DEBOUNCE_MS,\n )\n\n const executeSearch = (text: string) => {\n executeQueryRequest(queryBundleRequest =>\n updateQueryUsingSearchTerm(\n queryBundleRequest,\n columnModels,\n text,\n ftsConfig,\n ),\n )\n setSearchText('')\n setSuggestions([])\n }\n\n const search = (event: SyntheticEvent<HTMLFormElement>) => {\n event.preventDefault()\n\n // The HTML validation doesn't trim the string, so we add an extra check.\n // We don't auto-trim the form text ourselves because the user may still be focused on the input.\n if (searchText.trim().length < MIN_SEARCH_QUERY_LENGTH) {\n searchInputRef.current?.setCustomValidity(\n `Search term must have a minimum of ${MIN_SEARCH_QUERY_LENGTH} characters`,\n )\n } else {\n executeSearch(searchText)\n }\n }\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n searchInputRef.current?.setCustomValidity('')\n setSearchText(event.currentTarget.value)\n }\n\n const startAdornment = (\n <IconSvg\n icon=\"search\"\n wrap={false}\n sx={{\n mr: 1,\n color: 'grey.600',\n }}\n />\n )\n\n const endAdornment = (\n <>\n {searchText.length > 0 && (\n <IconSvgButton\n icon=\"close\"\n size=\"small\"\n onClick={() => {\n setSearchText('')\n setSuggestions([])\n }}\n />\n )}\n {ftsConfig?.searchHelpURL && (\n <HelpPopover\n markdownText={'This search bar is powered by MySQL Full Text Search.'}\n helpUrl={ftsConfig.searchHelpURL}\n placement=\"left\"\n />\n )}\n </>\n )\n\n return (\n <div className={`QueryWrapperFullTextSearchInput`}>\n <Collapse in={showSearchBar} timeout={{ enter: 300, exit: 300 }}>\n <form onSubmit={search}>\n {ftsConfig?.getSuggestions ? (\n <Autocomplete\n freeSolo\n disableClearable\n options={suggestions}\n inputValue={searchText}\n onInputChange={(_, newValue, reason) => {\n if (reason !== 'input') return\n searchInputRef.current?.setCustomValidity('')\n setSearchText(newValue)\n }}\n onChange={(_, newValue) => {\n // Auto-execute search when a suggestion is selected from the dropdown\n if (\n typeof newValue === 'string' &&\n newValue.trim().length >= MIN_SEARCH_QUERY_LENGTH\n ) {\n executeSearch(newValue)\n }\n }}\n renderInput={params => (\n <TextField\n {...params}\n inputRef={searchInputRef}\n sx={{ width: '100%' }}\n placeholder=\"Enter Search Terms\"\n type=\"text\"\n slotProps={{\n input: {\n ...params.InputProps,\n startAdornment,\n endAdornment,\n },\n htmlInput: {\n ...params.inputProps,\n minLength: MIN_SEARCH_QUERY_LENGTH,\n },\n }}\n />\n )}\n />\n ) : (\n <TextField\n sx={{ width: '100%' }}\n onChange={handleChange}\n placeholder=\"Enter Search Terms\"\n value={searchText}\n type=\"text\"\n slotProps={{\n input: {\n startAdornment,\n endAdornment,\n },\n htmlInput: {\n minLength: MIN_SEARCH_QUERY_LENGTH,\n ref: searchInputRef,\n },\n }}\n />\n )}\n </form>\n </Collapse>\n </div>\n )\n}\n\nexport default FullTextSearch\n"],"mappings":";;;;;;;;;;;;;;;AAmBA,IAAM,IAA0B,GAC1B,IAAyB;AAM/B,SAAgB,EAAe,EAC7B,gBACuC;CACvC,IAAM,EAAE,2BAAwB,GAAiB,EAC3C,EAAE,qBAAkB,GAA8B,EAClD,CAAC,GAAY,KAAiB,EAAS,GAAG,EAC1C,CAAC,GAAa,KAAkB,EAAmB,EAAE,CAAC,EACtD,IAAiB,EAAyB,KAAK,EAE/C,EAAE,YAAS,GAAqB,EAChC,IAAe,GAAM;AAa3B,CAVA,QAAgB;AACd,GACE,CAAC,GAAW,kBACZ,EAAW,MAAM,CAAC,SAAS,MAE3B,EAAe,EAAE,CAAC;IAEnB,CAAC,GAAW,gBAAgB,EAAW,CAAC,EAG3C,QACQ;AAEF,GAAC,GAAW,kBACZ,EAAW,MAAM,CAAC,SAAS,KAI7B,EACG,eAAe,EAAW,CAC1B,KAAK,EAAe,CACpB,YAAY,EAAe,EAA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AAU;MACV,IAAI,EAAE,OAAO,QAAQ;MACrB,aAAY;MACZ,MAAK;MACL,WAAW;OACT,OAAO;QACL,GAAG,EAAO;QACV;QACA;QACD;OACD,WAAW;QACT,GAAG,EAAO;QACV,WAAW;QACZ;OACF;MACD,CAAA;KAEJ,CAAA,GAEF,kBAAC,GAAD;KACE,IAAI,EAAE,OAAO,QAAQ;KACrB,UAAU;KACV,aAAY;KACZ,OAAO;KACP,MAAK;KACL,WAAW;MACT,OAAO;OACL;OACA;OACD;MACD,WAAW;OACT,WAAW;OACX,KAAK;OACN;MACF;KACD,CAAA;IAEC,CAAA;GACE,CAAA;EACP,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRowGenericCard.d.ts","sourceRoot":"","sources":["../../../src/components/GenericCard/TableRowGenericCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAA;AA2B9E,OAAO,EACL,WAAW,EAGX,YAAY,EAEb,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAyC,MAAM,OAAO,CAAA;AAI7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAIjD,OAAsB,EACpB,kBAAkB,EACnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAA;AAGjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAA;AAI3E,KAAK,sBAAsB,GAAG;IAC5B,4DAA4D;IAC5D,EAAE,EAAE;QACF,MAAM,EAAE,OAAO,CAAA;KAChB,CAAA;IACD,2FAA2F;IAC3F,OAAO,CAAC,EAAE;QACR,MAAM,EAAE,kBAAkB,CAAA;KAC3B,CAAA;CACF,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,2DAA2D;IAC3D,EAAE,EAAE;QACF,MAAM,EAAE,QAAQ,CAAA;QAChB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,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AM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC9B,IAAI,EAAE,MAAM,EAAE,CAAA;KACf,CAAC,CAAA;CACH,GAAG,eAAe,CAAA;AAmBnB;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"TableRowGenericCard.d.ts","sourceRoot":"","sources":["../../../src/components/GenericCard/TableRowGenericCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAA;AA2B9E,OAAO,EACL,WAAW,EAGX,YAAY,EAEb,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAyC,MAAM,OAAO,CAAA;AAI7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAIjD,OAAsB,EACpB,kBAAkB,EACnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oDAAoD,CAAA;AAGjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAA;AAI3E,KAAK,sBAAsB,GAAG;IAC5B,4DAA4D;IAC5D,EAAE,EAAE;QACF,MAAM,EAAE,OAAO,CAAA;KAChB,CAAA;IACD,2FAA2F;IAC3F,OAAO,CAAC,EAAE;QACR,MAAM,EAAE,kBAAkB,CAAA;KAC3B,CAAA;CACF,CAAA;AAED,KAAK,yBAAyB,GAAG;IAC/B,2DAA2D;IAC3D,EAAE,EAAE;QACF,MAAM,EAAE,QAAQ,CAAA;QAChB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,gEAAgE;IAChE,OAAO,CAAC,EAAE;QACR,MAAM,EAAE,QAAQ,CAAA;QAChB,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,mBAAmB,GAC3B,sBAAsB,GACtB,yBAAyB,CAAA;AAE7B;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,IAAI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./GenericCardActionButton.js";
|
|
|
12
12
|
import ie from "./CroissantButton/CroissantButton.js";
|
|
13
13
|
import { GenericCardIcon as ae } from "./GenericCardIcon.js";
|
|
14
14
|
import oe from "./PortalDOI/PortalDOI.js";
|
|
15
|
-
import { getCandidateDoiId as
|
|
16
|
-
import { mapRowToRecord as
|
|
17
|
-
import
|
|
18
|
-
import { EntityDownloadConfirmation as
|
|
15
|
+
import { getCandidateDoiId as se, useShowDoiCardLabel as ce } from "./PortalDOI/PortalDOIUtils.js";
|
|
16
|
+
import { mapRowToRecord as le } from "../SynapseTable/SynapseTableUtils.js";
|
|
17
|
+
import ue from "../CitationPopover/index.js";
|
|
18
|
+
import { EntityDownloadConfirmation as de } from "../EntityDownloadConfirmation/EntityDownloadConfirmation.js";
|
|
19
19
|
import "../EntityDownloadConfirmation/index.js";
|
|
20
|
-
import { useQueryContext as
|
|
21
|
-
import
|
|
22
|
-
import { useQueryVisualizationContext as
|
|
20
|
+
import { useQueryContext as fe } from "../QueryContext/QueryContext.js";
|
|
21
|
+
import pe from "../IconList.js";
|
|
22
|
+
import { useQueryVisualizationContext as me } from "../QueryVisualizationWrapper/QueryVisualizationContext.js";
|
|
23
23
|
import "../QueryVisualizationWrapper/index.js";
|
|
24
|
-
import
|
|
25
|
-
import { GenericCard as
|
|
26
|
-
import { SynapseCardLabel as
|
|
27
|
-
import { useResolvedSynapseEntity as
|
|
28
|
-
import { useCallback as
|
|
29
|
-
import { Box as
|
|
30
|
-
import { Fragment as
|
|
31
|
-
import { ColumnTypeEnum as
|
|
32
|
-
import { GetAppTwoTone as
|
|
33
|
-
import { useInView as
|
|
24
|
+
import he from "../ShareThisPage/ShareThisPage.js";
|
|
25
|
+
import { GenericCard as ge } from "./GenericCard.js";
|
|
26
|
+
import { SynapseCardLabel as l } from "./SynapseCardLabel.js";
|
|
27
|
+
import { useResolvedSynapseEntity as _e } from "./useResolvedSynapseEntity.js";
|
|
28
|
+
import { useCallback as ve, useMemo as u, useState as d } from "react";
|
|
29
|
+
import { Box as ye, Collapse as be, Link as xe, Stack as f, Typography as Se } from "@mui/material";
|
|
30
|
+
import { Fragment as Ce, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
31
|
+
import { ColumnTypeEnum as we } from "@sage-bionetworks/synapse-types";
|
|
32
|
+
import { GetAppTwoTone as Te } from "@mui/icons-material";
|
|
33
|
+
import { useInView as Ee } from "react-intersection-observer";
|
|
34
34
|
//#region src/components/GenericCard/TableRowGenericCard.tsx
|
|
35
|
-
function
|
|
35
|
+
function De(e) {
|
|
36
36
|
let { synapseId: n, version: r } = e;
|
|
37
|
-
return /* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ m("span", { children: [
|
|
38
38
|
r,
|
|
39
39
|
"\xA0\xA0",
|
|
40
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ p("a", {
|
|
41
41
|
target: s.NEW_WINDOW,
|
|
42
42
|
rel: "noopener noreferrer",
|
|
43
43
|
href: `${t.PORTAL}Synapse:${n}.${r}`,
|
|
@@ -45,230 +45,230 @@ function Te(e) {
|
|
|
45
45
|
})
|
|
46
46
|
] });
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
let [s,
|
|
50
|
-
|
|
51
|
-
value:
|
|
52
|
-
columnName:
|
|
53
|
-
selectColumns:
|
|
54
|
-
columnModels:
|
|
48
|
+
function h(t) {
|
|
49
|
+
let [s, h] = d(!1), [Oe, ke] = d(!1), { entityId: Ae, versionNumber: je } = fe(), { getColumnDisplayName: g } = me(), { ref: Me, inView: Ne } = Ee(), { data: _ } = ee(Ae, je), { schema: v, data: y, rowId: b, versionNumber: Pe, genericCardSchema: x, secondaryLabelLimit: Fe, sharePageLinkButtonProps: Ie, selectColumns: S, columnModels: C, iconOptions: Le, useTypeColumnForIcon: w = !1, isHeader: T = !1, sustainabilityScorecard: Re, headerCardVariant: ze, titleLinkConfig: E, ctaLinkConfig: D, labelLinkConfig: Be, descriptionConfig: Ve, columnIconOptions: O, CardTypeAdornment: k, charCountCutoff: He } = t, { link: Ue = "", type: A, includeCitation: We, includeShareButton: Ge, defaultCitationFormat: Ke, citationBoilerplateText: qe, downloadCartSynId: j, portalDoiConfiguration: M } = x, N = y[v[x.title]], P = x.subTitle && y[v[x.subTitle]];
|
|
50
|
+
P = x.subTitle && ne({
|
|
51
|
+
value: P,
|
|
52
|
+
columnName: x.subTitle,
|
|
53
|
+
selectColumns: S,
|
|
54
|
+
columnModels: C
|
|
55
55
|
}).str;
|
|
56
|
-
let
|
|
56
|
+
let Je = y[v[x.description || ""]], F = y[v[x.icon || ""]], I = y[v[x.dataTypeIconNames || ""]], L = y[v[x.imageFileHandleColumnName || ""]], Ye = C?.find((e) => x.link === e.name)?.columnType, R = y[v[Ue]] || "", { href: Xe, target: Ze } = c(R, E, y, v, b), Qe = x.synapseEntityConfig, z = ve((e) => {
|
|
57
57
|
if (!e) return;
|
|
58
|
-
let t =
|
|
59
|
-
if (t !== void 0) return
|
|
60
|
-
}, [
|
|
61
|
-
let { titleAreaDetails: e } =
|
|
58
|
+
let t = v[e];
|
|
59
|
+
if (t !== void 0) return y[t];
|
|
60
|
+
}, [v, y]), $e = u(() => {
|
|
61
|
+
let { titleAreaDetails: e } = x;
|
|
62
62
|
if (!e) return;
|
|
63
|
-
let t = typeof e == "function" ? e(
|
|
63
|
+
let t = typeof e == "function" ? e(v, y) : e;
|
|
64
64
|
if (t.length === 0) return;
|
|
65
65
|
let n = t.map((e) => {
|
|
66
|
-
let t =
|
|
66
|
+
let t = y[v[e]];
|
|
67
67
|
return t ? {
|
|
68
|
-
name:
|
|
68
|
+
name: g(e),
|
|
69
69
|
rawValue: t,
|
|
70
70
|
columnName: e
|
|
71
71
|
} : null;
|
|
72
72
|
}).filter(Boolean);
|
|
73
|
-
if (n.length !== 0) return /* @__PURE__ */
|
|
73
|
+
if (n.length !== 0) return /* @__PURE__ */ p(f, {
|
|
74
74
|
direction: "column",
|
|
75
75
|
gap: "4px",
|
|
76
|
-
children: n.map(({ name: e, rawValue: t, columnName: n }) => /* @__PURE__ */
|
|
76
|
+
children: n.map(({ name: e, rawValue: t, columnName: n }) => /* @__PURE__ */ m(f, {
|
|
77
77
|
direction: "row",
|
|
78
78
|
gap: "4px",
|
|
79
79
|
alignItems: "center",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ m(Se, {
|
|
81
81
|
component: "span",
|
|
82
82
|
variant: "body1",
|
|
83
83
|
children: [e, ":"]
|
|
84
|
-
}), /* @__PURE__ */
|
|
84
|
+
}), /* @__PURE__ */ p(l, {
|
|
85
85
|
value: t,
|
|
86
86
|
columnName: n,
|
|
87
87
|
labelLink: void 0,
|
|
88
|
-
isHeader:
|
|
89
|
-
selectColumns:
|
|
90
|
-
columnModels:
|
|
91
|
-
rowData:
|
|
92
|
-
columnIconOptions:
|
|
88
|
+
isHeader: T,
|
|
89
|
+
selectColumns: S,
|
|
90
|
+
columnModels: C,
|
|
91
|
+
rowData: y,
|
|
92
|
+
columnIconOptions: O
|
|
93
93
|
})]
|
|
94
94
|
}, n))
|
|
95
95
|
});
|
|
96
96
|
}, [
|
|
97
|
-
C,
|
|
98
97
|
x,
|
|
99
|
-
|
|
98
|
+
y,
|
|
100
99
|
v,
|
|
101
|
-
|
|
102
|
-
w,
|
|
100
|
+
g,
|
|
103
101
|
T,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
102
|
+
S,
|
|
103
|
+
C,
|
|
104
|
+
O
|
|
105
|
+
]), { entityId: B, entityVersionNumber: V } = _e({
|
|
106
|
+
synapseEntityConfig: Qe,
|
|
107
|
+
getColumnValue: z,
|
|
108
|
+
rowId: b,
|
|
109
|
+
rowVersionNumber: Pe
|
|
110
|
+
}), H = B, U = V;
|
|
111
|
+
if (j) {
|
|
112
|
+
let e = a(z(j) ?? "");
|
|
113
|
+
H = e?.targetId, U = e?.targetVersionNumber;
|
|
114
114
|
}
|
|
115
|
-
let
|
|
116
|
-
data:
|
|
117
|
-
portalDoiConfiguration:
|
|
118
|
-
}),
|
|
119
|
-
portalId:
|
|
120
|
-
resourceId:
|
|
121
|
-
}),
|
|
122
|
-
if (
|
|
115
|
+
let W = se({
|
|
116
|
+
data: u(() => le(y, v), [y, v]),
|
|
117
|
+
portalDoiConfiguration: M
|
|
118
|
+
}), et = ce({
|
|
119
|
+
portalId: M?.portalId,
|
|
120
|
+
resourceId: W
|
|
121
|
+
}), G = [], { secondaryLabels: K = [] } = x, q = x.customSecondaryLabelConfig;
|
|
122
|
+
if (et && M && W && Ne && G.push({
|
|
123
123
|
columnDisplayName: "DOI",
|
|
124
|
-
value: /* @__PURE__ */
|
|
125
|
-
portalId:
|
|
126
|
-
resourceId:
|
|
124
|
+
value: /* @__PURE__ */ p(oe, {
|
|
125
|
+
portalId: M.portalId,
|
|
126
|
+
resourceId: W
|
|
127
127
|
})
|
|
128
|
-
}),
|
|
129
|
-
let { key: e, value: t } =
|
|
130
|
-
|
|
128
|
+
}), q?.isVisible(v, y)) {
|
|
129
|
+
let { key: e, value: t } = q;
|
|
130
|
+
H ? G.push({
|
|
131
131
|
columnDisplayName: "HOW TO DOWNLOAD",
|
|
132
|
-
value: /* @__PURE__ */
|
|
133
|
-
onClick: () =>
|
|
132
|
+
value: /* @__PURE__ */ p(xe, {
|
|
133
|
+
onClick: () => h((e) => !e),
|
|
134
134
|
children: "Click here to add to Synapse download list"
|
|
135
135
|
})
|
|
136
|
-
}) :
|
|
136
|
+
}) : G.push({
|
|
137
137
|
columnDisplayName: e,
|
|
138
138
|
value: t
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
let
|
|
142
|
-
for (let e = 0; e <
|
|
143
|
-
let t =
|
|
141
|
+
let tt = _ && !i(_);
|
|
142
|
+
for (let e = 0; e < K.length; e += 1) {
|
|
143
|
+
let t = K[e], i = y[v[t]], a = i, o;
|
|
144
144
|
if (a && i !== "[]" && i !== "[\"\"]") {
|
|
145
|
-
if (r(
|
|
146
|
-
else if (
|
|
147
|
-
let e =
|
|
148
|
-
a = /* @__PURE__ */
|
|
145
|
+
if (r(_) && t === "datasetSizeInBytes") o = "Size", a = n(parseInt(i));
|
|
146
|
+
else if (tt && t === "currentVersion") {
|
|
147
|
+
let e = y[v.id];
|
|
148
|
+
a = /* @__PURE__ */ p(De, {
|
|
149
149
|
synapseId: e,
|
|
150
150
|
version: i
|
|
151
151
|
}), o = "Version";
|
|
152
152
|
} else {
|
|
153
|
-
let e =
|
|
154
|
-
a = /* @__PURE__ */
|
|
153
|
+
let e = Be?.find((e) => e.matchColumnName === t);
|
|
154
|
+
a = /* @__PURE__ */ p(l, {
|
|
155
155
|
value: i,
|
|
156
156
|
columnName: t,
|
|
157
157
|
labelLink: e,
|
|
158
|
-
isHeader:
|
|
159
|
-
selectColumns:
|
|
160
|
-
columnModels:
|
|
161
|
-
rowData:
|
|
162
|
-
columnIconOptions:
|
|
163
|
-
}), o =
|
|
158
|
+
isHeader: T,
|
|
159
|
+
selectColumns: S,
|
|
160
|
+
columnModels: C,
|
|
161
|
+
rowData: y,
|
|
162
|
+
columnIconOptions: O
|
|
163
|
+
}), o = g(t);
|
|
164
164
|
}
|
|
165
|
-
|
|
165
|
+
G.push({
|
|
166
166
|
columnDisplayName: o,
|
|
167
167
|
value: a,
|
|
168
168
|
columnName: t
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
let
|
|
173
|
-
let t =
|
|
172
|
+
let J = te(_, L || R, y[v.id]), nt = g(x.description || ""), Y = o("doi", S, C), X = Y === void 0 ? void 0 : y[Y], Z = (D ? Array.isArray(D) ? D : [D] : []).map((e) => {
|
|
173
|
+
let t = y[v[e.link]] || "";
|
|
174
174
|
if (!t) return null;
|
|
175
|
-
let { href: n, target: r } = c(t, void 0,
|
|
175
|
+
let { href: n, target: r } = c(t, void 0, y, v, b);
|
|
176
176
|
return {
|
|
177
177
|
text: e.text,
|
|
178
178
|
href: n,
|
|
179
179
|
target: r
|
|
180
180
|
};
|
|
181
|
-
}).filter(Boolean),
|
|
182
|
-
|
|
183
|
-
datasetId:
|
|
184
|
-
datasetVersionNumber:
|
|
181
|
+
}).filter(Boolean), Q = /* @__PURE__ */ p(Ce, {});
|
|
182
|
+
B != null && V != null && (Q = /* @__PURE__ */ p(ie, {
|
|
183
|
+
datasetId: B,
|
|
184
|
+
datasetVersionNumber: V
|
|
185
185
|
}));
|
|
186
|
-
let
|
|
187
|
-
schema:
|
|
188
|
-
data:
|
|
189
|
-
}) : null;
|
|
190
|
-
return /* @__PURE__ */
|
|
191
|
-
ref:
|
|
192
|
-
icon: /* @__PURE__ */
|
|
193
|
-
type:
|
|
194
|
-
useTypeForIcon:
|
|
195
|
-
thumbnailRequiresPadding:
|
|
196
|
-
imageFileHandleId:
|
|
197
|
-
fileHandleAssociation:
|
|
198
|
-
iconOptions:
|
|
199
|
-
iconValue:
|
|
200
|
-
}),
|
|
201
|
-
isHeader:
|
|
202
|
-
sustainabilityScorecard:
|
|
203
|
-
headerCardVariant:
|
|
204
|
-
type:
|
|
205
|
-
title:
|
|
206
|
-
subtitle:
|
|
186
|
+
let rt = k ? /* @__PURE__ */ p(k, {
|
|
187
|
+
schema: v,
|
|
188
|
+
data: y
|
|
189
|
+
}) : null, $ = !0;
|
|
190
|
+
return T && !L && !F && ($ = !1), /* @__PURE__ */ p(ge, {
|
|
191
|
+
ref: Me,
|
|
192
|
+
icon: $ ? /* @__PURE__ */ p(ae, {
|
|
193
|
+
type: w ? y[v.type] : x.type,
|
|
194
|
+
useTypeForIcon: w,
|
|
195
|
+
thumbnailRequiresPadding: x.thumbnailRequiresPadding,
|
|
196
|
+
imageFileHandleId: L,
|
|
197
|
+
fileHandleAssociation: J,
|
|
198
|
+
iconOptions: Le,
|
|
199
|
+
iconValue: F
|
|
200
|
+
}) : void 0,
|
|
201
|
+
isHeader: T,
|
|
202
|
+
sustainabilityScorecard: Re,
|
|
203
|
+
headerCardVariant: ze,
|
|
204
|
+
type: A,
|
|
205
|
+
title: N,
|
|
206
|
+
subtitle: P,
|
|
207
207
|
titleLinkConfiguration: {
|
|
208
|
-
target:
|
|
209
|
-
href:
|
|
208
|
+
target: Ze,
|
|
209
|
+
href: Xe
|
|
210
210
|
},
|
|
211
|
-
cardTypeAdornment:
|
|
212
|
-
titleAsFileHandleLinkConfiguration: !
|
|
213
|
-
fileHandleAssociation:
|
|
214
|
-
showDownloadIcon:
|
|
211
|
+
cardTypeAdornment: rt,
|
|
212
|
+
titleAsFileHandleLinkConfiguration: !E && Ye === we.FILEHANDLEID && J ? {
|
|
213
|
+
fileHandleAssociation: J,
|
|
214
|
+
showDownloadIcon: A !== e
|
|
215
215
|
} : void 0,
|
|
216
|
-
ctaLinkConfig:
|
|
217
|
-
titleAreaRightContent:
|
|
218
|
-
description:
|
|
219
|
-
descriptionSubTitle:
|
|
220
|
-
descriptionConfig:
|
|
221
|
-
charCountCutoff:
|
|
222
|
-
labels:
|
|
223
|
-
secondaryLabelLimit:
|
|
224
|
-
useStylesForDisplayedImage: !!
|
|
225
|
-
cardTopContent:
|
|
216
|
+
ctaLinkConfig: Z.length > 0 ? Z : void 0,
|
|
217
|
+
titleAreaRightContent: $e,
|
|
218
|
+
description: Je,
|
|
219
|
+
descriptionSubTitle: nt,
|
|
220
|
+
descriptionConfig: Ve,
|
|
221
|
+
charCountCutoff: He,
|
|
222
|
+
labels: G,
|
|
223
|
+
secondaryLabelLimit: Fe,
|
|
224
|
+
useStylesForDisplayedImage: !!L,
|
|
225
|
+
cardTopContent: H && /* @__PURE__ */ p(be, {
|
|
226
226
|
in: s,
|
|
227
|
-
children: /* @__PURE__ */
|
|
228
|
-
entityId:
|
|
229
|
-
versionNumber:
|
|
230
|
-
handleClose: () =>
|
|
227
|
+
children: /* @__PURE__ */ p(de, {
|
|
228
|
+
entityId: H,
|
|
229
|
+
versionNumber: U,
|
|
230
|
+
handleClose: () => h(!1),
|
|
231
231
|
onIsLoadingChange: (e) => {
|
|
232
|
-
|
|
232
|
+
ke(e);
|
|
233
233
|
}
|
|
234
234
|
})
|
|
235
235
|
}),
|
|
236
|
-
renderedIconList:
|
|
236
|
+
renderedIconList: O?.columns?.dataType && I?.length && /* @__PURE__ */ p("div", {
|
|
237
237
|
style: { marginTop: "20px" },
|
|
238
|
-
children: /* @__PURE__ */
|
|
239
|
-
iconConfigs:
|
|
240
|
-
iconNames: JSON.parse(
|
|
238
|
+
children: /* @__PURE__ */ p(pe, {
|
|
239
|
+
iconConfigs: O.columns.dataType,
|
|
240
|
+
iconNames: JSON.parse(I),
|
|
241
241
|
commonIconProps: { sx: { fontSize: "40px" } },
|
|
242
242
|
useBackground: !0,
|
|
243
243
|
useTheme: !0
|
|
244
244
|
})
|
|
245
245
|
}),
|
|
246
|
-
cardTopButtons: /* @__PURE__ */
|
|
246
|
+
cardTopButtons: /* @__PURE__ */ m(ye, {
|
|
247
247
|
sx: {
|
|
248
248
|
display: "flex",
|
|
249
249
|
gap: 1
|
|
250
250
|
},
|
|
251
251
|
children: [
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
onClick: () =>
|
|
252
|
+
Q,
|
|
253
|
+
H && /* @__PURE__ */ p(re, {
|
|
254
|
+
onClick: () => h((e) => !e),
|
|
255
255
|
variant: "outlined",
|
|
256
|
-
startIcon: /* @__PURE__ */
|
|
257
|
-
loading:
|
|
256
|
+
startIcon: /* @__PURE__ */ p(Te, { sx: { height: "12px" } }),
|
|
257
|
+
loading: Oe,
|
|
258
258
|
children: "Download"
|
|
259
259
|
}),
|
|
260
|
-
|
|
261
|
-
title:
|
|
262
|
-
doi:
|
|
263
|
-
boilerplateText:
|
|
264
|
-
defaultCitationFormat:
|
|
260
|
+
We && X && /* @__PURE__ */ p(ue, {
|
|
261
|
+
title: N,
|
|
262
|
+
doi: X,
|
|
263
|
+
boilerplateText: qe,
|
|
264
|
+
defaultCitationFormat: Ke
|
|
265
265
|
}),
|
|
266
|
-
|
|
266
|
+
Ge && T && /* @__PURE__ */ p(he, { ...Ie })
|
|
267
267
|
]
|
|
268
268
|
})
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
271
|
//#endregion
|
|
272
|
-
export {
|
|
272
|
+
export { h as TableRowGenericCard, h as default };
|
|
273
273
|
|
|
274
274
|
//# sourceMappingURL=TableRowGenericCard.js.map
|