synapse-react-client 4.0.33 → 4.0.35
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.js +1 -1
- package/dist/assets/icons/curie-head.svg +21 -0
- package/dist/components/AccessRequirementList/AccessRequirementList.d.ts +29 -3
- package/dist/components/AccessRequirementList/AccessRequirementList.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.js +153 -84
- package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.js +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.d.ts +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js +49 -42
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts +6 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js +161 -155
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts +21 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +164 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts +22 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js +264 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.js +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js +105 -96
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.d.ts +13 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js +122 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts +17 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js +112 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts +27 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js +194 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.d.ts +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.js +7 -7
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.js.map +1 -1
- package/dist/components/DraggableDialog/DraggableDialog.d.ts +2 -1
- package/dist/components/DraggableDialog/DraggableDialog.d.ts.map +1 -1
- package/dist/components/DraggableDialog/DraggableDialog.js +42 -33
- package/dist/components/DraggableDialog/DraggableDialog.js.map +1 -1
- package/dist/components/EntityTreeTable/hooks/useTableColumns.d.ts.map +1 -1
- package/dist/components/EntityTreeTable/hooks/useTableColumns.js +12 -6
- package/dist/components/EntityTreeTable/hooks/useTableColumns.js.map +1 -1
- package/dist/components/ExperimentalMode/ExperimentalMode.js +2 -1
- package/dist/components/ExperimentalMode/ExperimentalMode.js.map +1 -1
- package/dist/components/FilePreview/PdfPreview.d.ts.map +1 -1
- package/dist/components/FilePreview/PdfPreview.js +23 -20
- package/dist/components/FilePreview/PdfPreview.js.map +1 -1
- package/dist/components/GenericCard/SynapseCardLabel.d.ts.map +1 -1
- package/dist/components/GenericCard/SynapseCardLabel.js +100 -99
- package/dist/components/GenericCard/SynapseCardLabel.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +64 -55
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js +4 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
- package/dist/components/StorybookComponentWrapper.d.ts.map +1 -1
- package/dist/components/StorybookComponentWrapper.js +16 -13
- package/dist/components/StorybookComponentWrapper.js.map +1 -1
- package/dist/components/SynapseChat/GridAgentChat.js +6 -6
- package/dist/components/SynapseChat/SynapseChat.d.ts +2 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.js +118 -74
- package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.d.ts +3 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChatInteraction.js +21 -21
- package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChatMessage.d.ts +1 -0
- package/dist/components/SynapseChat/SynapseChatMessage.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChatMessage.js +9 -8
- package/dist/components/SynapseChat/SynapseChatMessage.js.map +1 -1
- package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapsePortalChatDialog.js +2 -1
- package/dist/components/SynapseChat/SynapsePortalChatDialog.js.map +1 -1
- package/dist/components/TanStackTable/TanStackTableUtils.d.ts.map +1 -1
- package/dist/components/TanStackTable/TanStackTableUtils.js +6 -6
- package/dist/components/TanStackTable/TanStackTableUtils.js.map +1 -1
- package/dist/components/dataaccess/AccessRequirementDashboard.d.ts.map +1 -1
- package/dist/components/dataaccess/AccessRequirementDashboard.js +55 -55
- package/dist/components/dataaccess/AccessRequirementDashboard.js.map +1 -1
- package/dist/components/dataaccess/EDucTemplateTable.d.ts +3 -0
- package/dist/components/dataaccess/EDucTemplateTable.d.ts.map +1 -0
- package/dist/components/dataaccess/EDucTemplateTable.js +213 -0
- package/dist/components/dataaccess/EDucTemplateTable.js.map +1 -0
- package/dist/components/dataaccess/ReviewerDashboard.d.ts.map +1 -1
- package/dist/components/dataaccess/ReviewerDashboard.js +44 -34
- package/dist/components/dataaccess/ReviewerDashboard.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts +12 -0
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -0
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +84 -0
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -0
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js +20 -18
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js.map +1 -1
- package/dist/components/entity/page/CreatedByModifiedBy.d.ts.map +1 -1
- package/dist/components/entity/page/CreatedByModifiedBy.js +43 -61
- package/dist/components/entity/page/CreatedByModifiedBy.js.map +1 -1
- package/dist/components/entity/page/createdByModifiedByTooltips.d.ts +7 -0
- package/dist/components/entity/page/createdByModifiedByTooltips.d.ts.map +1 -0
- package/dist/components/entity/page/createdByModifiedByTooltips.js +36 -0
- package/dist/components/entity/page/createdByModifiedByTooltips.js.map +1 -0
- package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.d.ts.map +1 -1
- package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js +130 -65
- package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js.map +1 -1
- package/dist/components/widgets/Range.js +8 -2
- package/dist/components/widgets/Range.js.map +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts +2 -0
- package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.js +35 -40
- package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
- package/dist/components/widgets/query-filter/RangeFacetFilter.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/RangeFacetFilter.js +2 -1
- package/dist/components/widgets/query-filter/RangeFacetFilter.js.map +1 -1
- package/dist/components/widgets/query-filter/RangeFacetFilterUI.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/RangeFacetFilterUI.js +19 -19
- package/dist/components/widgets/query-filter/RangeFacetFilterUI.js.map +1 -1
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +48 -23
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/eDucTemplateHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/eDucTemplateHandlers.js +9 -9
- package/dist/mocks/msw/handlers/eDucTemplateHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/fileHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/fileHandlers.js +22 -22
- package/dist/mocks/msw/handlers/fileHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/userProfileHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/userProfileHandlers.js +36 -36
- package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
- package/dist/mocks/user/mock_user_profile.d.ts +1 -0
- package/dist/mocks/user/mock_user_profile.d.ts.map +1 -1
- package/dist/mocks/user/mock_user_profile.js +45 -45
- package/dist/mocks/user/mock_user_profile.js.map +1 -1
- package/dist/style/components/facet_nav/_facet-nav-panel.scss +0 -6
- package/dist/synapse-queries/KeyFactory.d.ts +1 -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/synapse-queries/dataaccess/index.js +4 -4
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts +13 -1
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useEDuc.js +67 -49
- package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
- package/dist/synapse-queries/index.js +185 -184
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/APIConstants.d.ts +6 -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/AppUtils/session/ApplicationSessionManager.d.ts.map +1 -1
- package/dist/utils/AppUtils/session/ApplicationSessionManager.js +20 -19
- package/dist/utils/AppUtils/session/ApplicationSessionManager.js.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts +1 -0
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.js +1 -1
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
- package/dist/utils/functions/RegularExpressions.d.ts +7 -0
- package/dist/utils/functions/RegularExpressions.d.ts.map +1 -1
- package/dist/utils/functions/RegularExpressions.js +5 -4
- package/dist/utils/functions/RegularExpressions.js.map +1 -1
- package/dist/utils/hooks/useFetchBlobUrl.d.ts +9 -0
- package/dist/utils/hooks/useFetchBlobUrl.d.ts.map +1 -0
- package/dist/utils/hooks/useFetchBlobUrl.js +19 -0
- package/dist/utils/hooks/useFetchBlobUrl.js.map +1 -0
- package/dist/utils/hooks/useIsHydrated.d.ts +9 -0
- package/dist/utils/hooks/useIsHydrated.d.ts.map +1 -0
- package/dist/utils/hooks/useIsHydrated.js +10 -0
- package/dist/utils/hooks/useIsHydrated.js.map +1 -0
- package/package.json +2 -2
|
@@ -4,7 +4,8 @@ type DraggableDialogProps = {
|
|
|
4
4
|
onClose?: () => void;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
title?: ReactNode;
|
|
7
|
+
variant?: 'default' | 'curie';
|
|
7
8
|
};
|
|
8
|
-
export default function DraggableDialog({ open, onClose, title, children, }: DraggableDialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default function DraggableDialog({ open, onClose, title, children, variant, }: DraggableDialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
10
|
export {};
|
|
10
11
|
//# sourceMappingURL=DraggableDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableDialog.d.ts","sourceRoot":"","sources":["../../../src/components/DraggableDialog/DraggableDialog.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAU,SAAS,EAAuB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"DraggableDialog.d.ts","sourceRoot":"","sources":["../../../src/components/DraggableDialog/DraggableDialog.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAU,SAAS,EAAuB,MAAM,OAAO,CAAA;AAM9D,KAAK,oBAAoB,GAAG;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;CAC9B,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACtC,IAAY,EACZ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,OAAmB,GACpB,EAAE,oBAAoB,kDAwItB"}
|
|
@@ -6,13 +6,14 @@ import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
|
6
6
|
import g from "@mui/icons-material/Close";
|
|
7
7
|
import _ from "react-draggable";
|
|
8
8
|
//#region src/components/DraggableDialog/DraggableDialog.tsx
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
var v = 700;
|
|
10
|
+
function y({ open: y = !1, onClose: b, title: x, children: S, variant: C = "default" }) {
|
|
11
|
+
let w = p(), T = f(w.breakpoints.down("sm")), E = r(null), [D, O] = i(), [k, A] = i({
|
|
11
12
|
x: 100,
|
|
12
|
-
y: 100
|
|
13
|
-
}), { width:
|
|
13
|
+
y: C === "curie" ? 50 : 100
|
|
14
|
+
}), { width: j, height: M, handleResizeStart: N } = e({
|
|
14
15
|
initialWidth: 600,
|
|
15
|
-
initialHeight: 500,
|
|
16
|
+
initialHeight: C === "curie" ? v : 500,
|
|
16
17
|
minWidth: 300,
|
|
17
18
|
minHeight: 200,
|
|
18
19
|
maxWidth: 1200,
|
|
@@ -21,26 +22,26 @@ function v({ open: v = !1, onClose: y, title: b, children: x }) {
|
|
|
21
22
|
if (n(() => {
|
|
22
23
|
function e() {
|
|
23
24
|
let e = {
|
|
24
|
-
left: -(
|
|
25
|
+
left: -(j - 100),
|
|
25
26
|
top: 0,
|
|
26
27
|
right: window.innerWidth - 100,
|
|
27
28
|
bottom: window.innerHeight - 100
|
|
28
29
|
};
|
|
29
|
-
|
|
30
|
+
O(e), A((t) => ({
|
|
30
31
|
x: Math.max(e.left, Math.min(t.x, e.right)),
|
|
31
32
|
y: Math.max(e.top, Math.min(t.y, e.bottom))
|
|
32
33
|
}));
|
|
33
34
|
}
|
|
34
35
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
35
|
-
}, [
|
|
36
|
-
let
|
|
36
|
+
}, [j, M]), !y) return null;
|
|
37
|
+
let P = /* @__PURE__ */ h(l, {
|
|
37
38
|
elevation: 5,
|
|
38
39
|
sx: {
|
|
39
40
|
display: "flex",
|
|
40
41
|
flexDirection: "column",
|
|
41
|
-
height:
|
|
42
|
-
width:
|
|
43
|
-
...
|
|
42
|
+
height: T ? "95vh" : `${M}px`,
|
|
43
|
+
width: T ? "95vw" : `${j}px`,
|
|
44
|
+
...T && { position: "fixed" }
|
|
44
45
|
},
|
|
45
46
|
children: [
|
|
46
47
|
/* @__PURE__ */ h(u, {
|
|
@@ -49,63 +50,71 @@ function v({ open: v = !1, onClose: y, title: b, children: x }) {
|
|
|
49
50
|
gap: "5px",
|
|
50
51
|
className: "drag-handle",
|
|
51
52
|
sx: {
|
|
52
|
-
padding: "20px",
|
|
53
|
+
padding: C === "curie" ? "44px 44px 20px 44px" : "20px",
|
|
53
54
|
cursor: "move"
|
|
54
55
|
},
|
|
55
56
|
children: [
|
|
56
|
-
/* @__PURE__ */ m(d, {
|
|
57
|
+
C !== "curie" && /* @__PURE__ */ m(d, {
|
|
57
58
|
variant: "headline1",
|
|
58
|
-
children:
|
|
59
|
+
children: x
|
|
59
60
|
}),
|
|
60
61
|
/* @__PURE__ */ m(a, { sx: { flexGrow: 1 } }),
|
|
61
62
|
/* @__PURE__ */ m(c, {
|
|
62
|
-
onClick:
|
|
63
|
-
children: /* @__PURE__ */ m(g, {
|
|
63
|
+
onClick: b,
|
|
64
|
+
children: /* @__PURE__ */ m(g, { sx: C === "curie" ? {
|
|
65
|
+
width: "16px",
|
|
66
|
+
height: "16px"
|
|
67
|
+
} : void 0 })
|
|
64
68
|
})
|
|
65
69
|
]
|
|
66
70
|
}),
|
|
67
|
-
/* @__PURE__ */ m(s, { sx: { mx: 2 } }),
|
|
71
|
+
C !== "curie" && /* @__PURE__ */ m(s, { sx: { mx: 2 } }),
|
|
68
72
|
/* @__PURE__ */ m(o, {
|
|
69
73
|
sx: {
|
|
70
74
|
height: "100%",
|
|
71
75
|
maxWidth: "100%",
|
|
72
|
-
padding: "16px"
|
|
76
|
+
padding: "16px",
|
|
77
|
+
...C === "curie" && {
|
|
78
|
+
borderTop: "none",
|
|
79
|
+
borderBottom: "none",
|
|
80
|
+
padding: C === "curie" ? "0 44px 44px 44px" : "44px"
|
|
81
|
+
}
|
|
73
82
|
},
|
|
74
|
-
children:
|
|
83
|
+
children: S
|
|
75
84
|
})
|
|
76
85
|
]
|
|
77
86
|
});
|
|
78
87
|
return /* @__PURE__ */ m(a, {
|
|
79
88
|
sx: {
|
|
80
89
|
position: "fixed",
|
|
81
|
-
zIndex:
|
|
90
|
+
zIndex: w.zIndex.modal,
|
|
82
91
|
top: 0,
|
|
83
92
|
left: 0,
|
|
84
|
-
pointerEvents:
|
|
93
|
+
pointerEvents: T ? "auto" : "none"
|
|
85
94
|
},
|
|
86
|
-
children:
|
|
87
|
-
position:
|
|
88
|
-
onDrag: (e, t) =>
|
|
95
|
+
children: T ? P : /* @__PURE__ */ m(_, {
|
|
96
|
+
position: k,
|
|
97
|
+
onDrag: (e, t) => A({
|
|
89
98
|
x: t.x,
|
|
90
99
|
y: t.y
|
|
91
100
|
}),
|
|
92
|
-
nodeRef:
|
|
93
|
-
bounds:
|
|
101
|
+
nodeRef: E,
|
|
102
|
+
bounds: D,
|
|
94
103
|
handle: ".drag-handle",
|
|
95
104
|
children: /* @__PURE__ */ m(a, {
|
|
96
|
-
ref:
|
|
105
|
+
ref: E,
|
|
97
106
|
sx: { pointerEvents: "auto" },
|
|
98
107
|
children: /* @__PURE__ */ m(t, {
|
|
99
|
-
width:
|
|
100
|
-
height:
|
|
101
|
-
onResizeStart:
|
|
102
|
-
children:
|
|
108
|
+
width: j,
|
|
109
|
+
height: M,
|
|
110
|
+
onResizeStart: N,
|
|
111
|
+
children: P
|
|
103
112
|
})
|
|
104
113
|
})
|
|
105
114
|
})
|
|
106
115
|
});
|
|
107
116
|
}
|
|
108
117
|
//#endregion
|
|
109
|
-
export {
|
|
118
|
+
export { y as default };
|
|
110
119
|
|
|
111
120
|
//# sourceMappingURL=DraggableDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableDialog.js","names":[],"sources":["../../../src/components/DraggableDialog/DraggableDialog.tsx"],"sourcesContent":["import Draggable, { DraggableBounds } from 'react-draggable'\nimport {\n Box,\n IconButton,\n Paper,\n Stack,\n Typography,\n Divider,\n useMediaQuery,\n useTheme,\n DialogContent,\n} from '@mui/material'\nimport CloseIcon from '@mui/icons-material/Close'\nimport { useRef, ReactNode, useEffect, useState } from 'react'\nimport { useResizable } from '../ResizableContainer/hooks/useResizable'\nimport { ResizableContainer } from '../ResizableContainer/ResizableContainer'\n\ntype DraggableDialogProps = {\n open?: boolean\n onClose?: () => void\n children: ReactNode\n title?: ReactNode\n}\n\nexport default function DraggableDialog({\n open = false,\n onClose,\n title,\n children,\n}: DraggableDialogProps) {\n const theme = useTheme()\n const isMobile = useMediaQuery(theme.breakpoints.down('sm'))\n const draggableRef = useRef<HTMLDivElement>(null)\n const [bounds, setBounds] = useState<DraggableBounds>()\n const [position, setPosition] = useState({
|
|
1
|
+
{"version":3,"file":"DraggableDialog.js","names":[],"sources":["../../../src/components/DraggableDialog/DraggableDialog.tsx"],"sourcesContent":["import Draggable, { DraggableBounds } from 'react-draggable'\nimport {\n Box,\n IconButton,\n Paper,\n Stack,\n Typography,\n Divider,\n useMediaQuery,\n useTheme,\n DialogContent,\n} from '@mui/material'\nimport CloseIcon from '@mui/icons-material/Close'\nimport { useRef, ReactNode, useEffect, useState } from 'react'\nimport { useResizable } from '../ResizableContainer/hooks/useResizable'\nimport { ResizableContainer } from '../ResizableContainer/ResizableContainer'\n\nconst CURIE_INITIAL_SIZE = 700\n\ntype DraggableDialogProps = {\n open?: boolean\n onClose?: () => void\n children: ReactNode\n title?: ReactNode\n variant?: 'default' | 'curie'\n}\n\nexport default function DraggableDialog({\n open = false,\n onClose,\n title,\n children,\n variant = 'default',\n}: DraggableDialogProps) {\n const theme = useTheme()\n const isMobile = useMediaQuery(theme.breakpoints.down('sm'))\n const draggableRef = useRef<HTMLDivElement>(null)\n const [bounds, setBounds] = useState<DraggableBounds>()\n const [position, setPosition] = useState({\n x: 100,\n y: variant === 'curie' ? 50 : 100,\n })\n const { width, height, handleResizeStart } = useResizable({\n initialWidth: 600,\n initialHeight: variant === 'curie' ? CURIE_INITIAL_SIZE : 500,\n minWidth: 300,\n minHeight: 200,\n maxWidth: 1200,\n maxHeight: 800,\n })\n\n useEffect(() => {\n // Calculate draggable bounds to keep dialog within viewport with margin\n function updateBounds() {\n const margin = 100\n const dialogWidth = width\n\n const newBounds = {\n left: -(dialogWidth - margin),\n top: 0,\n right: window.innerWidth - margin,\n bottom: window.innerHeight - margin,\n }\n\n setBounds(newBounds)\n\n // Clamp dialog position to new bounds to keep it visible after window resize\n setPosition(prevPosition => ({\n x: Math.max(newBounds.left, Math.min(prevPosition.x, newBounds.right)),\n y: Math.max(newBounds.top, Math.min(prevPosition.y, newBounds.bottom)),\n }))\n }\n updateBounds()\n window.addEventListener('resize', updateBounds)\n return () => window.removeEventListener('resize', updateBounds)\n }, [width, height])\n\n if (!open) {\n return null\n }\n\n const paperContent = (\n <Paper\n elevation={5}\n sx={{\n display: 'flex',\n flexDirection: 'column',\n height: isMobile ? '95vh' : `${height}px`,\n width: isMobile ? '95vw' : `${width}px`,\n ...(isMobile && {\n position: 'fixed',\n }),\n }}\n >\n <Stack\n direction=\"row\"\n alignItems=\"center\"\n gap=\"5px\"\n className=\"drag-handle\"\n sx={{\n padding: variant === 'curie' ? '44px 44px 20px 44px' : '20px',\n cursor: 'move',\n }}\n >\n {variant !== 'curie' && (\n <Typography variant=\"headline1\">{title}</Typography>\n )}\n <Box sx={{ flexGrow: 1 }} />\n <IconButton onClick={onClose}>\n <CloseIcon\n sx={\n variant === 'curie'\n ? { width: '16px', height: '16px' }\n : undefined\n }\n />\n </IconButton>\n </Stack>\n {variant !== 'curie' && <Divider sx={{ mx: 2 }} />}\n <DialogContent\n sx={{\n height: '100%',\n maxWidth: '100%',\n padding: '16px',\n ...(variant === 'curie' && {\n borderTop: 'none',\n borderBottom: 'none',\n padding: variant === 'curie' ? '0 44px 44px 44px' : '44px',\n }),\n }}\n >\n {children}\n </DialogContent>\n </Paper>\n )\n\n return (\n <Box\n sx={{\n position: 'fixed',\n zIndex: theme.zIndex.modal,\n top: 0,\n left: 0,\n pointerEvents: isMobile ? 'auto' : 'none',\n }}\n >\n {isMobile ? (\n paperContent\n ) : (\n <Draggable\n position={position}\n onDrag={(e, data) => setPosition({ x: data.x, y: data.y })}\n nodeRef={draggableRef}\n bounds={bounds}\n handle=\".drag-handle\"\n >\n <Box ref={draggableRef} sx={{ pointerEvents: 'auto' }}>\n <ResizableContainer\n width={width}\n height={height}\n onResizeStart={handleResizeStart}\n >\n {paperContent}\n </ResizableContainer>\n </Box>\n </Draggable>\n )}\n </Box>\n )\n}\n"],"mappings":";;;;;;;;AAiBA,IAAM,IAAqB;AAU3B,SAAwB,EAAgB,EACtC,UAAO,IACP,YACA,UACA,aACA,aAAU,aACa;CACvB,IAAM,IAAQ,EAAS,GACjB,IAAW,EAAc,EAAM,YAAY,KAAK,IAAI,CAAC,GACrD,IAAe,EAAuB,IAAI,GAC1C,CAAC,GAAQ,KAAa,EAA0B,GAChD,CAAC,GAAU,KAAe,EAAS;EACvC,GAAG;EACH,GAAG,MAAY,UAAU,KAAK;CAChC,CAAC,GACK,EAAE,UAAO,WAAQ,yBAAsB,EAAa;EACxD,cAAc;EACd,eAAe,MAAY,UAAU,IAAqB;EAC1D,UAAU;EACV,WAAW;EACX,UAAU;EACV,WAAW;CACb,CAAC;CA4BD,IA1BA,QAAgB;EAEd,SAAS,IAAe;GACtB,IAGM,IAAY;IAChB,MAAM,EAAE,IAAc;IACtB,KAAK;IACL,OAAO,OAAO,aAAa;IAC3B,QAAQ,OAAO,cAAc;GAC/B;GAKA,AAHA,EAAU,CAAS,GAGnB,GAAY,OAAiB;IAC3B,GAAG,KAAK,IAAI,EAAU,MAAM,KAAK,IAAI,EAAa,GAAG,EAAU,KAAK,CAAC;IACrE,GAAG,KAAK,IAAI,EAAU,KAAK,KAAK,IAAI,EAAa,GAAG,EAAU,MAAM,CAAC;GACvE,EAAE;EACJ;EAGA,OAFA,EAAa,GACb,OAAO,iBAAiB,UAAU,CAAY,SACjC,OAAO,oBAAoB,UAAU,CAAY;CAChE,GAAG,CAAC,GAAO,CAAM,CAAC,GAEd,CAAC,GACH,OAAO;CAGT,IAAM,IACJ,kBAAC,GAAD;EACE,WAAW;EACX,IAAI;GACF,SAAS;GACT,eAAe;GACf,QAAQ,IAAW,SAAS,GAAG,EAAO;GACtC,OAAO,IAAW,SAAS,GAAG,EAAM;GACpC,GAAI,KAAY,EACd,UAAU,QACZ;EACF;YAVF;GAYE,kBAAC,GAAD;IACE,WAAU;IACV,YAAW;IACX,KAAI;IACJ,WAAU;IACV,IAAI;KACF,SAAS,MAAY,UAAU,wBAAwB;KACvD,QAAQ;IACV;cARF;KAUG,MAAY,WACX,kBAAC,GAAD;MAAY,SAAQ;gBAAa;KAAkB,CAAA;KAErD,kBAAC,GAAD,EAAK,IAAI,EAAE,UAAU,EAAE,EAAI,CAAA;KAC3B,kBAAC,GAAD;MAAY,SAAS;gBACnB,kBAAC,GAAD,EACE,IACE,MAAY,UACR;OAAE,OAAO;OAAQ,QAAQ;MAAO,IAChC,KAAA,EAEP,CAAA;KACS,CAAA;IACP;;GACN,MAAY,WAAW,kBAAC,GAAD,EAAS,IAAI,EAAE,IAAI,EAAE,EAAI,CAAA;GACjD,kBAAC,GAAD;IACE,IAAI;KACF,QAAQ;KACR,UAAU;KACV,SAAS;KACT,GAAI,MAAY,WAAW;MACzB,WAAW;MACX,cAAc;MACd,SAAS,MAAY,UAAU,qBAAqB;KACtD;IACF;IAEC;GACY,CAAA;EACV;;CAGT,OACE,kBAAC,GAAD;EACE,IAAI;GACF,UAAU;GACV,QAAQ,EAAM,OAAO;GACrB,KAAK;GACL,MAAM;GACN,eAAe,IAAW,SAAS;EACrC;YAEC,IACC,IAEA,kBAAC,GAAD;GACY;GACV,SAAS,GAAG,MAAS,EAAY;IAAE,GAAG,EAAK;IAAG,GAAG,EAAK;GAAE,CAAC;GACzD,SAAS;GACD;GACR,QAAO;aAEP,kBAAC,GAAD;IAAK,KAAK;IAAc,IAAI,EAAE,eAAe,OAAO;cAClD,kBAAC,GAAD;KACS;KACC;KACR,eAAe;eAEd;IACiB,CAAA;GACjB,CAAA;EACI,CAAA;CAEV,CAAA;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/EntityTreeTable/hooks/useTableColumns.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAmBpD,eAAO,MAAM,eAAe,GAC1B,eAAe,OAAO,EACtB,4BAA0B,
|
|
1
|
+
{"version":3,"file":"useTableColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/EntityTreeTable/hooks/useTableColumns.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAmBpD,eAAO,MAAM,eAAe,GAC1B,eAAe,OAAO,EACtB,4BAA0B,iCAmH3B,CAAA"}
|
|
@@ -33,40 +33,46 @@ var y = (y, b = !1) => {
|
|
|
33
33
|
header: d,
|
|
34
34
|
cell: e,
|
|
35
35
|
enableSorting: y,
|
|
36
|
-
size:
|
|
36
|
+
size: 600
|
|
37
37
|
}), C && (m.push({
|
|
38
38
|
id: "badges",
|
|
39
39
|
header: "",
|
|
40
40
|
cell: f,
|
|
41
41
|
enableSorting: !1,
|
|
42
|
+
enableResizing: !1,
|
|
42
43
|
size: 120
|
|
43
44
|
}), m.push({
|
|
44
45
|
id: "id",
|
|
45
46
|
header: n,
|
|
46
47
|
cell: t,
|
|
47
|
-
enableSorting: !1
|
|
48
|
+
enableSorting: !1,
|
|
49
|
+
size: 110
|
|
48
50
|
})), S && m.push({
|
|
49
51
|
accessorKey: "entityHeader.createdOn",
|
|
50
52
|
id: "createdOn",
|
|
51
53
|
header: l,
|
|
52
54
|
cell: a,
|
|
53
|
-
enableSorting: y
|
|
55
|
+
enableSorting: y,
|
|
56
|
+
size: 130
|
|
54
57
|
}), C && m.push({
|
|
55
58
|
accessorKey: "entityHeader.modifiedOn",
|
|
56
59
|
id: "modifiedOn",
|
|
57
60
|
header: u,
|
|
58
61
|
cell: r,
|
|
59
|
-
enableSorting: y
|
|
62
|
+
enableSorting: y,
|
|
63
|
+
size: 130
|
|
60
64
|
}), S && m.push({
|
|
61
65
|
id: "modifiedBy",
|
|
62
66
|
header: "Modified By",
|
|
63
67
|
cell: i,
|
|
64
|
-
enableSorting: !1
|
|
68
|
+
enableSorting: !1,
|
|
69
|
+
size: 130
|
|
65
70
|
}), C && m.push({
|
|
66
71
|
id: "size",
|
|
67
72
|
header: "Size",
|
|
68
73
|
cell: o,
|
|
69
|
-
enableSorting: !1
|
|
74
|
+
enableSorting: !1,
|
|
75
|
+
size: 80
|
|
70
76
|
}), S && m.push({
|
|
71
77
|
id: "md5",
|
|
72
78
|
header: "MD5",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableColumns.js","names":[],"sources":["../../../../src/components/EntityTreeTable/hooks/useTableColumns.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { ColumnDef } from '@tanstack/react-table'\nimport { useTheme, useMediaQuery } from '@mui/material'\nimport { EntityBundleRow } from '../EntityTreeTable'\nimport { NameCell } from '../components/EntityNameCell'\nimport { IdCell } from '../components/IdCell'\nimport { IdColumnHeader } from '../components/IdColumnHeader'\nimport { ModifiedOnCell } from '../../EntityFinder/details/view/table/ModifiedOnCell'\nimport { ModifiedByCell } from '../../EntityFinder/details/view/table/ModifiedByCell'\nimport { CreatedOnCell } from '../../EntityFinder/details/view/table/CreatedOnCell'\nimport { FileEntitySizeCell } from '../../EntityFinder/details/view/table/FileEntitySizeCell'\nimport { FileEntityMD5Cell } from '../../EntityFinder/details/view/table/FileEntityMD5Cell'\nimport { AddFileToDownloadListCell } from '../../EntityFinder/details/view/table/AddToDownloadListCell'\nimport {\n NameColumnHeader,\n CreatedOnColumnHeader,\n ModifiedOnColumnHeader,\n} from '../components/ColumnHeaders'\nimport { EntityBadgeIconsCell } from '../components/EntityBadgeIconsCell'\nimport { CheckboxCell } from '../components/CheckboxCell'\nimport PlaylistAddIcon from '@mui/icons-material/PlaylistAdd'\n\nexport const useTableColumns = (\n enableSorting: boolean,\n showCheckboxColumn = false,\n) => {\n // Responsive design hooks\n const theme = useTheme()\n const isXtraLarge = useMediaQuery(theme.breakpoints.up('xl'))\n const isMediumAndUp = useMediaQuery(theme.breakpoints.up('md'))\n\n // Table columns\n const columns = useMemo<ColumnDef<EntityBundleRow>[]>(() => {\n const baseColumns: ColumnDef<EntityBundleRow>[] = []\n\n if (showCheckboxColumn) {\n baseColumns.push({\n id: 'select',\n header: '',\n cell: CheckboxCell,\n enableSorting: false,\n size: 45,\n minSize: 45,\n maxSize: 45,\n })\n }\n\n baseColumns.push({\n accessorKey: 'entityHeader.name',\n id: 'name',\n header: NameColumnHeader,\n cell: NameCell,\n enableSorting: enableSorting,\n size:
|
|
1
|
+
{"version":3,"file":"useTableColumns.js","names":[],"sources":["../../../../src/components/EntityTreeTable/hooks/useTableColumns.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { ColumnDef } from '@tanstack/react-table'\nimport { useTheme, useMediaQuery } from '@mui/material'\nimport { EntityBundleRow } from '../EntityTreeTable'\nimport { NameCell } from '../components/EntityNameCell'\nimport { IdCell } from '../components/IdCell'\nimport { IdColumnHeader } from '../components/IdColumnHeader'\nimport { ModifiedOnCell } from '../../EntityFinder/details/view/table/ModifiedOnCell'\nimport { ModifiedByCell } from '../../EntityFinder/details/view/table/ModifiedByCell'\nimport { CreatedOnCell } from '../../EntityFinder/details/view/table/CreatedOnCell'\nimport { FileEntitySizeCell } from '../../EntityFinder/details/view/table/FileEntitySizeCell'\nimport { FileEntityMD5Cell } from '../../EntityFinder/details/view/table/FileEntityMD5Cell'\nimport { AddFileToDownloadListCell } from '../../EntityFinder/details/view/table/AddToDownloadListCell'\nimport {\n NameColumnHeader,\n CreatedOnColumnHeader,\n ModifiedOnColumnHeader,\n} from '../components/ColumnHeaders'\nimport { EntityBadgeIconsCell } from '../components/EntityBadgeIconsCell'\nimport { CheckboxCell } from '../components/CheckboxCell'\nimport PlaylistAddIcon from '@mui/icons-material/PlaylistAdd'\n\nexport const useTableColumns = (\n enableSorting: boolean,\n showCheckboxColumn = false,\n) => {\n // Responsive design hooks\n const theme = useTheme()\n const isXtraLarge = useMediaQuery(theme.breakpoints.up('xl'))\n const isMediumAndUp = useMediaQuery(theme.breakpoints.up('md'))\n\n // Table columns\n const columns = useMemo<ColumnDef<EntityBundleRow>[]>(() => {\n const baseColumns: ColumnDef<EntityBundleRow>[] = []\n\n if (showCheckboxColumn) {\n baseColumns.push({\n id: 'select',\n header: '',\n cell: CheckboxCell,\n enableSorting: false,\n size: 45,\n minSize: 45,\n maxSize: 45,\n })\n }\n\n baseColumns.push({\n accessorKey: 'entityHeader.name',\n id: 'name',\n header: NameColumnHeader,\n cell: NameCell,\n enableSorting: enableSorting,\n size: 600,\n })\n if (isMediumAndUp) {\n baseColumns.push({\n id: 'badges',\n header: '',\n cell: EntityBadgeIconsCell,\n enableSorting: false,\n enableResizing: false,\n size: 120,\n })\n baseColumns.push({\n id: 'id',\n header: IdColumnHeader,\n cell: IdCell,\n enableSorting: false,\n size: 110,\n })\n }\n if (isXtraLarge) {\n baseColumns.push({\n accessorKey: 'entityHeader.createdOn',\n id: 'createdOn',\n header: CreatedOnColumnHeader,\n cell: CreatedOnCell,\n enableSorting: enableSorting,\n size: 130,\n })\n }\n\n if (isMediumAndUp) {\n baseColumns.push({\n accessorKey: 'entityHeader.modifiedOn',\n id: 'modifiedOn',\n header: ModifiedOnColumnHeader,\n cell: ModifiedOnCell,\n enableSorting: enableSorting,\n size: 130,\n })\n }\n\n if (isXtraLarge) {\n baseColumns.push({\n id: 'modifiedBy',\n header: 'Modified By',\n cell: ModifiedByCell,\n enableSorting: false,\n size: 130,\n })\n }\n\n if (isMediumAndUp) {\n baseColumns.push({\n id: 'size',\n header: 'Size',\n cell: FileEntitySizeCell,\n enableSorting: false,\n size: 80,\n })\n }\n if (isXtraLarge) {\n baseColumns.push({\n id: 'md5',\n header: 'MD5',\n cell: FileEntityMD5Cell,\n enableSorting: false,\n })\n }\n\n baseColumns.push({\n id: 'download',\n header: 'Download',\n cell: props => (\n <AddFileToDownloadListCell\n {...props}\n downloadIcon={<PlaylistAddIcon />}\n />\n ),\n enableSorting: false,\n size: 90,\n })\n\n return baseColumns\n }, [enableSorting, isXtraLarge, isMediumAndUp, showCheckboxColumn])\n\n return columns\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAsBA,IAAa,KACX,GACA,IAAqB,OAClB;CAEH,IAAM,IAAQ,EAAS,GACjB,IAAc,EAAc,EAAM,YAAY,GAAG,IAAI,CAAC,GACtD,IAAgB,EAAc,EAAM,YAAY,GAAG,IAAI,CAAC;CA6G9D,OA1GgB,QAA4C;EAC1D,IAAM,IAA4C,CAAC;EAsGnD,OApGI,KACF,EAAY,KAAK;GACf,IAAI;GACJ,QAAQ;GACR,MAAM;GACN,eAAe;GACf,MAAM;GACN,SAAS;GACT,SAAS;EACX,CAAC,GAGH,EAAY,KAAK;GACf,aAAa;GACb,IAAI;GACJ,QAAQ;GACR,MAAM;GACS;GACf,MAAM;EACR,CAAC,GACG,MACF,EAAY,KAAK;GACf,IAAI;GACJ,QAAQ;GACR,MAAM;GACN,eAAe;GACf,gBAAgB;GAChB,MAAM;EACR,CAAC,GACD,EAAY,KAAK;GACf,IAAI;GACJ,QAAQ;GACR,MAAM;GACN,eAAe;GACf,MAAM;EACR,CAAC,IAEC,KACF,EAAY,KAAK;GACf,aAAa;GACb,IAAI;GACJ,QAAQ;GACR,MAAM;GACS;GACf,MAAM;EACR,CAAC,GAGC,KACF,EAAY,KAAK;GACf,aAAa;GACb,IAAI;GACJ,QAAQ;GACR,MAAM;GACS;GACf,MAAM;EACR,CAAC,GAGC,KACF,EAAY,KAAK;GACf,IAAI;GACJ,QAAQ;GACR,MAAM;GACN,eAAe;GACf,MAAM;EACR,CAAC,GAGC,KACF,EAAY,KAAK;GACf,IAAI;GACJ,QAAQ;GACR,MAAM;GACN,eAAe;GACf,MAAM;EACR,CAAC,GAEC,KACF,EAAY,KAAK;GACf,IAAI;GACJ,QAAQ;GACR,MAAM;GACN,eAAe;EACjB,CAAC,GAGH,EAAY,KAAK;GACf,IAAI;GACJ,QAAQ;GACR,OAAM,MACJ,kBAAC,GAAD;IACE,GAAI;IACJ,cAAc,kBAAC,GAAD,CAAkB,CAAA;GACjC,CAAA;GAEH,eAAe;GACf,MAAM;EACR,CAAC,GAEM;CACT,GAAG;EAAC;EAAe;EAAa;EAAe;CAAkB,CAE1D;AACT"}
|
|
@@ -9,7 +9,8 @@ var d = "experimental-mode", f = "This mode gives you early access to features t
|
|
|
9
9
|
function p({ onExperimentalModeToggle: p }) {
|
|
10
10
|
let m = a(), [h, g, _] = c(e, {
|
|
11
11
|
path: "/",
|
|
12
|
-
domain: (typeof window < "u" ? window.location.hostname.toLowerCase() : "").endsWith(".synapse.org") ? "synapse.org" : void 0
|
|
12
|
+
domain: (typeof window < "u" ? window.location.hostname.toLowerCase() : "").endsWith(".synapse.org") ? "synapse.org" : void 0,
|
|
13
|
+
initializeWithValue: !1
|
|
13
14
|
});
|
|
14
15
|
return /* @__PURE__ */ s(t, {
|
|
15
16
|
sx: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExperimentalMode.js","names":[],"sources":["../../../src/components/ExperimentalMode/ExperimentalMode.tsx"],"sourcesContent":["import { EXPERIMENTAL_MODE_COOKIE } from '@/utils/SynapseConstants'\nimport { InfoOutlined } from '@mui/icons-material'\nimport { Box, IconButton, Tooltip, Typography, useTheme } from '@mui/material'\nimport Switch from 'react-switch'\nimport { useCookieValue } from '@react-hookz/web/useCookieValue/index.js'\n\nconst EXPERIMENTAL_MODE_SWITCH_ID = 'experimental-mode'\nconst experimentalModeText =\n 'This mode gives you early access to features that are still in development. Please note that we do not guarantee an absence of errors, and that the data created using these features may be lost during product upgrade.'\n\nexport type ExperimentalModeProps = {\n onExperimentalModeToggle?: (newValue: boolean) => void\n}\nfunction ExperimentalMode({ onExperimentalModeToggle }: ExperimentalModeProps) {\n const theme = useTheme()\n\n const getExperimentalModeCookieOptions = () => {\n const hostname =\n typeof window !== 'undefined'\n ? window.location.hostname.toLowerCase()\n : ''\n return {\n path: '/',\n domain: hostname.endsWith('.synapse.org') ? 'synapse.org' : undefined,\n }\n }\n\n const [\n experimentalModeCookie,\n setExperimentalModeCookie,\n removeExperimentalModeCookie,\n ] = useCookieValue(\n
|
|
1
|
+
{"version":3,"file":"ExperimentalMode.js","names":[],"sources":["../../../src/components/ExperimentalMode/ExperimentalMode.tsx"],"sourcesContent":["import { EXPERIMENTAL_MODE_COOKIE } from '@/utils/SynapseConstants'\nimport { InfoOutlined } from '@mui/icons-material'\nimport { Box, IconButton, Tooltip, Typography, useTheme } from '@mui/material'\nimport Switch from 'react-switch'\nimport { useCookieValue } from '@react-hookz/web/useCookieValue/index.js'\n\nconst EXPERIMENTAL_MODE_SWITCH_ID = 'experimental-mode'\nconst experimentalModeText =\n 'This mode gives you early access to features that are still in development. Please note that we do not guarantee an absence of errors, and that the data created using these features may be lost during product upgrade.'\n\nexport type ExperimentalModeProps = {\n onExperimentalModeToggle?: (newValue: boolean) => void\n}\nfunction ExperimentalMode({ onExperimentalModeToggle }: ExperimentalModeProps) {\n const theme = useTheme()\n\n const getExperimentalModeCookieOptions = () => {\n const hostname =\n typeof window !== 'undefined'\n ? window.location.hostname.toLowerCase()\n : ''\n return {\n path: '/',\n domain: hostname.endsWith('.synapse.org') ? 'synapse.org' : undefined,\n }\n }\n\n const [\n experimentalModeCookie,\n setExperimentalModeCookie,\n removeExperimentalModeCookie,\n ] = useCookieValue(EXPERIMENTAL_MODE_COOKIE, {\n ...getExperimentalModeCookieOptions(),\n initializeWithValue: false,\n })\n\n const createExperimentalModeCookie = () => {\n setExperimentalModeCookie('true')\n\n if (onExperimentalModeToggle) {\n onExperimentalModeToggle(true)\n }\n }\n\n const deleteExperimentalModeCookie = () => {\n removeExperimentalModeCookie()\n if (onExperimentalModeToggle) {\n onExperimentalModeToggle(false)\n }\n }\n\n return (\n <Box sx={{ display: 'flex', alignItems: 'center' }}>\n <Typography\n component={'label'}\n variant=\"body1\"\n htmlFor={EXPERIMENTAL_MODE_SWITCH_ID}\n >\n Experimental Mode\n </Typography>\n <Tooltip title={experimentalModeText} arrow placement=\"top\">\n <IconButton\n aria-label=\"info\"\n color=\"inherit\"\n sx={{ '&:hover': { backgroundColor: 'transparent' } }}\n >\n <InfoOutlined sx={{ verticalAlign: 'middle' }} />\n </IconButton>\n </Tooltip>\n <Switch\n id={EXPERIMENTAL_MODE_SWITCH_ID}\n width={35}\n height={20}\n onColor={theme.palette.secondary.main}\n checkedIcon={false}\n uncheckedIcon={false}\n checked={experimentalModeCookie === 'true'}\n onChange={\n experimentalModeCookie === 'true'\n ? deleteExperimentalModeCookie\n : createExperimentalModeCookie\n }\n />\n </Box>\n )\n}\n\nexport default ExperimentalMode\n"],"mappings":";;;;;;;AAMA,IAAM,IAA8B,qBAC9B,IACJ;AAKF,SAAS,EAAiB,EAAE,+BAAmD;CAC7E,IAAM,IAAQ,EAAS,GAajB,CACJ,GACA,GACA,KACE,EAAe,GAA0B;EATzC,MAAM;EACN,SALA,OAAO,SAAW,MACd,OAAO,SAAS,SAAS,YAAY,IACrC,IAGa,SAAS,cAAc,IAAI,gBAAgB,KAAA;EAU9D,qBAAqB;CACvB,CAAC;CAiBD,OACE,kBAAC,GAAD;EAAK,IAAI;GAAE,SAAS;GAAQ,YAAY;EAAS;YAAjD;GACE,kBAAC,GAAD;IACE,WAAW;IACX,SAAQ;IACR,SAAS;cACV;GAEW,CAAA;GACZ,kBAAC,GAAD;IAAS,OAAO;IAAsB,OAAA;IAAM,WAAU;cACpD,kBAAC,GAAD;KACE,cAAW;KACX,OAAM;KACN,IAAI,EAAE,WAAW,EAAE,iBAAiB,cAAc,EAAE;eAEpD,kBAAC,GAAD,EAAc,IAAI,EAAE,eAAe,SAAS,EAAI,CAAA;IACtC,CAAA;GACL,CAAA;GACT,kBAAC,GAAD;IACE,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,SAAS,EAAM,QAAQ,UAAU;IACjC,aAAa;IACb,eAAe;IACf,SAAS,MAA2B;IACpC,UACE,MAA2B,eAlCQ;KAEzC,AADA,EAA6B,GACzB,KACF,EAAyB,EAAK;IAElC,UAb2C;KAGzC,AAFA,EAA0B,MAAM,GAE5B,KACF,EAAyB,EAAI;IAEjC;GAwCK,CAAA;EACE;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfPreview.d.ts","sourceRoot":"","sources":["../../../src/components/FilePreview/PdfPreview.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PdfPreview.d.ts","sourceRoot":"","sources":["../../../src/components/FilePreview/PdfPreview.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,UAAU,EACV,qBAAqB,EACtB,MAAM,iCAAiC,CAAA;AAGxC,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAA;IACtB,qBAAqB,EAAE,qBAAqB,CAAA;CAC7C,CAAA;AAED,eAAO,MAAM,UAAU,QAAyB,CAAA;AAGhD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CAsCxD"}
|
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
import { Alert as a } from "@mui/material";
|
|
7
|
-
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
1
|
+
import { calculateFriendlyFileSize as e } from "../../utils/functions/calculateFriendlyFileSize.js";
|
|
2
|
+
import t from "../../synapse-client/index.js";
|
|
3
|
+
import { useFetchBlobUrl as n } from "../../utils/hooks/useFetchBlobUrl.js";
|
|
4
|
+
import { Alert as r, Skeleton as i } from "@mui/material";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
6
|
//#region src/components/FilePreview/PdfPreview.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
let { fileHandle:
|
|
12
|
-
|
|
7
|
+
var s = 1024 ** 2 * 30, c = e(s);
|
|
8
|
+
function l(l) {
|
|
9
|
+
let { fileHandle: u, fileHandleAssociation: d } = l, { blobUrl: f, error: p } = n(u.contentSize > s ? void 0 : t.getPortalFileHandleServletUrl(d.fileHandleId, d.associateObjectId, d.associateObjectType)), m = e(u.contentSize);
|
|
10
|
+
return u.contentSize > s ? /* @__PURE__ */ o(r, {
|
|
13
11
|
severity: "error",
|
|
14
12
|
sx: { marginBottom: "20px" },
|
|
15
13
|
children: [
|
|
16
14
|
"The PDF preview was not shown because the file size (",
|
|
17
|
-
|
|
15
|
+
m,
|
|
18
16
|
") exceeds the maximum preview size (",
|
|
19
|
-
|
|
17
|
+
c,
|
|
20
18
|
")"
|
|
21
19
|
]
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
}) : p ? /* @__PURE__ */ o(r, {
|
|
21
|
+
severity: "error",
|
|
22
|
+
sx: { marginBottom: "20px" },
|
|
23
|
+
children: ["The PDF preview could not be loaded: ", p.message]
|
|
24
|
+
}) : f ? /* @__PURE__ */ a("iframe", {
|
|
25
|
+
src: f,
|
|
27
26
|
height: "800px",
|
|
28
27
|
style: {
|
|
29
28
|
border: 0,
|
|
30
29
|
width: "100%"
|
|
31
30
|
}
|
|
32
|
-
})
|
|
31
|
+
}) : /* @__PURE__ */ a(i, {
|
|
32
|
+
variant: "rectangular",
|
|
33
|
+
width: "100%",
|
|
34
|
+
height: "800px"
|
|
35
|
+
});
|
|
33
36
|
}
|
|
34
37
|
//#endregion
|
|
35
|
-
export {
|
|
38
|
+
export { l as default, s as maxPdfSize };
|
|
36
39
|
|
|
37
40
|
//# sourceMappingURL=PdfPreview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PdfPreview.js","names":[],"sources":["../../../src/components/FilePreview/PdfPreview.tsx"],"sourcesContent":["import SynapseClient from '@/synapse-client'\nimport {
|
|
1
|
+
{"version":3,"file":"PdfPreview.js","names":[],"sources":["../../../src/components/FilePreview/PdfPreview.tsx"],"sourcesContent":["import SynapseClient from '@/synapse-client'\nimport { calculateFriendlyFileSize } from '@/utils/functions/calculateFriendlyFileSize'\nimport { Alert, Skeleton } from '@mui/material'\nimport {\n FileHandle,\n FileHandleAssociation,\n} from '@sage-bionetworks/synapse-types'\nimport { useFetchBlobUrl } from '@/utils/hooks/useFetchBlobUrl'\n\nexport type PdfPreviewProps = {\n fileHandle: FileHandle\n fileHandleAssociation: FileHandleAssociation\n}\n\nexport const maxPdfSize = Math.pow(1024, 2) * 30 // 30MB\nconst friendlyMaxPdfSize = calculateFriendlyFileSize(maxPdfSize) // 30MB\n\n/**\n * Renders raw HTML. Uses file handle data to determine if the content should be sanitized.\n * @param props\n * @returns\n */\nexport default function PdfPreview(props: PdfPreviewProps) {\n const { fileHandle, fileHandleAssociation: fha } = props\n\n const { blobUrl, error: blobError } = useFetchBlobUrl(\n fileHandle.contentSize > maxPdfSize\n ? undefined\n : SynapseClient.getPortalFileHandleServletUrl(\n fha.fileHandleId,\n fha.associateObjectId,\n fha.associateObjectType,\n ),\n )\n\n const friendlyFileSize = calculateFriendlyFileSize(fileHandle.contentSize)\n if (fileHandle.contentSize > maxPdfSize) {\n return (\n <Alert severity=\"error\" sx={{ marginBottom: '20px' }}>\n The PDF preview was not shown because the file size ({friendlyFileSize})\n exceeds the maximum preview size ({friendlyMaxPdfSize})\n </Alert>\n )\n }\n\n if (blobError) {\n return (\n <Alert severity=\"error\" sx={{ marginBottom: '20px' }}>\n The PDF preview could not be loaded: {blobError.message}\n </Alert>\n )\n }\n\n if (!blobUrl) {\n return <Skeleton variant=\"rectangular\" width=\"100%\" height=\"800px\" />\n }\n\n return (\n <iframe src={blobUrl} height=\"800px\" style={{ border: 0, width: '100%' }} />\n )\n}\n"],"mappings":";;;;;;AAcA,IAAa,IAAsB,QAAM,IAAK,IACxC,IAAqB,EAA0B,CAAU;AAO/D,SAAwB,EAAW,GAAwB;CACzD,IAAM,EAAE,eAAY,uBAAuB,MAAQ,GAE7C,EAAE,YAAS,OAAO,MAAc,EACpC,EAAW,cAAc,IACrB,KAAA,IACA,EAAc,8BACZ,EAAI,cACJ,EAAI,mBACJ,EAAI,mBACN,CACN,GAEM,IAAmB,EAA0B,EAAW,WAAW;CAsBzE,OArBI,EAAW,cAAc,IAEzB,kBAAC,GAAD;EAAO,UAAS;EAAQ,IAAI,EAAE,cAAc,OAAO;YAAnD;GAAsD;GACE;GAAiB;GACpC;GAAmB;EACjD;MAIP,IAEA,kBAAC,GAAD;EAAO,UAAS;EAAQ,IAAI,EAAE,cAAc,OAAO;YAAnD,CAAsD,yCACd,EAAU,OAC3C;MAIN,IAKH,kBAAC,UAAD;EAAQ,KAAK;EAAS,QAAO;EAAQ,OAAO;GAAE,QAAQ;GAAG,OAAO;EAAO;CAAI,CAAA,IAJpE,kBAAC,GAAD;EAAU,SAAQ;EAAc,OAAM;EAAO,QAAO;CAAS,CAAA;AAMxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SynapseCardLabel.d.ts","sourceRoot":"","sources":["../../../src/components/GenericCard/SynapseCardLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;
|
|
1
|
+
{"version":3,"file":"SynapseCardLabel.d.ts","sourceRoot":"","sources":["../../../src/components/GenericCard/SynapseCardLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAO9D,OAAO,EACL,WAAW,EAEX,GAAG,EACH,YAAY,EACb,MAAM,iCAAiC,CAAA;AAIxC,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,WAAW,EACX,8BAA8B,EAC/B,MAAM,0CAA0C,CAAA;AASjD,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EACL,QAAQ,GACR,YAAY,GACZ,mBAAmB,GACnB,WAAW,GACX,8BAA8B,GAC9B,SAAS,CAAA;IACb,aAAa,EAAE,YAAY,EAAE,GAAG,SAAS,CAAA;IACzC,YAAY,EAAE,WAAW,EAAE,GAAG,SAAS,CAAA;IACvC,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;CACtC,CAAA;AACD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAiR5D"}
|