synapse-react-client 4.0.5 → 4.0.6-SWC-7803
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 +2 -0
- package/dist/SWC.index.d.ts.map +1 -1
- package/dist/SWC.index.js +45 -39
- package/dist/SWC.index.js.map +1 -1
- package/dist/assets/DefaultColorfulPortalCardBackground.svg +50 -12
- package/dist/assets/DefaultColorfulPortalCardBackground.svg.js +4 -4
- package/dist/assets/DefaultColorfulPortalCardBackground.svg.js.map +1 -1
- package/dist/components/CreateProjectModal/CreateProjectModal.d.ts +2 -1
- package/dist/components/CreateProjectModal/CreateProjectModal.d.ts.map +1 -1
- package/dist/components/CreateProjectModal/CreateProjectModal.js +35 -30
- package/dist/components/CreateProjectModal/CreateProjectModal.js.map +1 -1
- package/dist/components/DataGrid/DataGridWebSocket.d.ts +4 -0
- package/dist/components/DataGrid/DataGridWebSocket.d.ts.map +1 -1
- package/dist/components/DataGrid/DataGridWebSocket.js +47 -37
- package/dist/components/DataGrid/DataGridWebSocket.js.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.js +193 -152
- package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.d.ts +6 -1
- package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.js +78 -69
- package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTable.d.ts +6 -1
- package/dist/components/SynapseTable/SynapseTable.d.ts.map +1 -1
- package/dist/components/SynapseTable/SynapseTable.js +123 -93
- package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
- package/dist/components/TextField/TextField.css +1 -0
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.d.ts.map +1 -1
- package/dist/components/TextField/TextField.js +30 -28
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.module.scss +18 -0
- package/dist/components/TextField/TextField.module.scss.js +12 -0
- package/dist/components/TextField/TextField.module.scss.js.map +1 -0
- package/dist/components/styled/HoverPopover.css +1 -1
- package/dist/components/styled/HoverPopover.d.ts.map +1 -1
- package/dist/components/styled/HoverPopover.js +6 -5
- package/dist/components/styled/HoverPopover.js.map +1 -1
- package/dist/components/styled/HoverPopover.module.scss +2 -1
- package/dist/components/styled/HoverPopover.module.scss.js +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts +5 -2
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +46 -33
- package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +52 -27
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.d.ts +7 -0
- package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.d.ts.map +1 -0
- package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js +323 -0
- package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js.map +1 -0
- package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.d.ts +7 -1
- package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.js +7 -7
- package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.js.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts +9 -5
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js +79 -16
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.d.ts +12 -0
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.d.ts.map +1 -0
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.js +20 -0
- package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.js.map +1 -0
- package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.d.ts +3 -3
- package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js +54 -41
- package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js.map +1 -1
- package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.d.ts +2 -2
- package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.js +11 -4
- package/dist/features/entity/metadata-task/utils/getCreateGridRequestForMetadataTask.js.map +1 -1
- package/dist/features/entity/metadata-task/utils/taskHasAssignee.d.ts +3 -0
- package/dist/features/entity/metadata-task/utils/taskHasAssignee.d.ts.map +1 -0
- package/dist/features/entity/metadata-task/utils/taskHasAssignee.js +7 -0
- package/dist/features/entity/metadata-task/utils/taskHasAssignee.js.map +1 -0
- package/dist/mocks/curation/mockCurationTask.d.ts +10 -0
- package/dist/mocks/curation/mockCurationTask.d.ts.map +1 -0
- package/dist/mocks/curation/mockCurationTask.js +24 -0
- package/dist/mocks/curation/mockCurationTask.js.map +1 -0
- package/dist/synapse-queries/KeyFactory.d.ts +8 -3
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +22 -7
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.d.ts +6 -3
- package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
- package/dist/synapse-queries/curation/task/useCurationTask.js +62 -18
- package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
- package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts +2 -0
- package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts.map +1 -1
- package/dist/synapse-queries/grid/useEstablishWebsocketConnection.js.map +1 -1
- package/dist/synapse-queries/grid/useGridSession.d.ts +17 -2
- package/dist/synapse-queries/grid/useGridSession.d.ts.map +1 -1
- package/dist/synapse-queries/grid/useGridSession.js +63 -30
- package/dist/synapse-queries/grid/useGridSession.js.map +1 -1
- package/dist/synapse-queries/index.js +103 -99
- package/dist/synapse-queries/team/index.js +18 -15
- package/dist/synapse-queries/team/useTeamMembers.d.ts +34 -0
- package/dist/synapse-queries/team/useTeamMembers.d.ts.map +1 -1
- package/dist/synapse-queries/team/useTeamMembers.js +110 -69
- package/dist/synapse-queries/team/useTeamMembers.js.map +1 -1
- package/dist/synapse-queries/types.d.ts +13 -0
- package/dist/synapse-queries/types.d.ts.map +1 -0
- package/dist/synapse-queries/types.js +2 -0
- package/dist/synapse-queries/types.js.map +1 -0
- package/dist/synapse-queries/user/index.js +12 -11
- package/dist/synapse-queries/user/useUserGroupHeader.d.ts +5 -0
- package/dist/synapse-queries/user/useUserGroupHeader.d.ts.map +1 -1
- package/dist/synapse-queries/user/useUserGroupHeader.js +28 -21
- package/dist/synapse-queries/user/useUserGroupHeader.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/hooks/useOverlay.d.ts +2 -2
- package/dist/utils/hooks/useOverlay.d.ts.map +1 -1
- package/dist/utils/hooks/useOverlay.js +41 -41
- package/dist/utils/hooks/useOverlay.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaskBundle } from '@sage-bionetworks/synapse-client';
|
|
2
|
+
export declare const OPEN_CURATOR_ERROR_TITLE = "An error occurred while trying to open Curator";
|
|
3
|
+
export declare const OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE = "You don't have permission to view the existing Curator session for this task. It was likely created by another data contributor. A data manager should create a new task and assign it to you or your team.";
|
|
4
|
+
export declare const NO_TASK_ASSIGNEE_WARNING_DIALOG_TITLE = "Task is Unassigned";
|
|
2
5
|
/**
|
|
3
6
|
* Handles rendering the 'Actions' cell in the Metadata Task table, which provides buttons for the user
|
|
4
7
|
* to accomplish the actions they can take on a Metadata Task, such as opening a data grid for the entity referenced
|
|
5
8
|
* by the task.
|
|
6
9
|
*/
|
|
7
10
|
export default function MetadataTaskTableActionCell(props: {
|
|
8
|
-
|
|
11
|
+
taskBundle: TaskBundle;
|
|
9
12
|
canEdit: boolean;
|
|
10
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
//# sourceMappingURL=MetadataTaskTableActionCell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetadataTaskTableActionCell.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTaskTableActionCell.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MetadataTaskTableActionCell.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTaskTableActionCell.tsx"],"names":[],"mappings":"AAMA,OAAO,EAGL,UAAU,EACX,MAAM,kCAAkC,CAAA;AAIzC,eAAO,MAAM,wBAAwB,mDACa,CAAA;AAClD,eAAO,MAAM,uCAAuC,gNAC2J,CAAA;AAE/M,eAAO,MAAM,qCAAqC,uBAAuB,CAAA;AAOzE;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,KAAK,EAAE;IACzD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;CACjB,2CAwEA"}
|
|
@@ -1,44 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { jsx as e, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { displayToast as p } from "../../../../components/ToastMessage/ToastMessage.js";
|
|
3
|
+
import h from "../hooks/useGridSessionForCurationTask_legacy.js";
|
|
4
|
+
import { useGetEntityPermissions as O } from "../../../../synapse-queries/entity/useEntity.js";
|
|
5
|
+
import { getLinkToGridSession as S } from "../../../../utils/functions/getSynapseWebClientLink.js";
|
|
6
|
+
import { StickyNote2Outlined as w } from "@mui/icons-material";
|
|
7
|
+
import { Tooltip as I, Button as _ } from "@mui/material";
|
|
8
|
+
import { SynapseClientError as A } from "@sage-bionetworks/synapse-client";
|
|
9
|
+
import { useCallback as g } from "react";
|
|
10
|
+
import { getGridSourceIdForTask as R } from "../utils/getGridSourceIdForTask.js";
|
|
11
|
+
const k = "An error occurred while trying to open Curator", G = "You don't have permission to view the existing Curator session for this task. It was likely created by another data contributor. A data manager should create a new task and assign it to you or your team.", B = "Task is Unassigned";
|
|
12
|
+
function N(i, n) {
|
|
13
|
+
const o = S(i, n);
|
|
14
|
+
window.open(o, "_blank", "noopener");
|
|
15
|
+
}
|
|
16
|
+
function M(i) {
|
|
17
|
+
const { taskBundle: n } = i, o = n.task, {
|
|
18
|
+
mutateAsync: r,
|
|
19
|
+
isPending: s
|
|
20
|
+
} = h(), a = R(o), {
|
|
21
|
+
data: d,
|
|
22
|
+
isLoading: T
|
|
23
|
+
} = O(a), c = T, l = d?.canView, y = s || c || !l, E = l ? "Open Curator to edit metadata" : d?.canView ? "You must have READ access to " + a + " to view the Working Copy" : "You do not have permission to view the Working Copy", m = g(async () => {
|
|
24
|
+
let u;
|
|
15
25
|
try {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
console.error("Error opening Curator for curation task",
|
|
23
|
-
title:
|
|
24
|
-
});
|
|
26
|
+
u = await r({
|
|
27
|
+
curationTask: o
|
|
28
|
+
}), N(u.sessionId, o.taskId);
|
|
29
|
+
} catch (t) {
|
|
30
|
+
t instanceof A && t.status === 403 ? (console.error(t), p(G, "danger", {
|
|
31
|
+
title: k
|
|
32
|
+
})) : (console.error("Error opening Curator for curation task", t), p(t.message, "danger", {
|
|
33
|
+
title: k
|
|
34
|
+
}));
|
|
25
35
|
}
|
|
26
|
-
}, [
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
}, [o, r]), C = g(() => {
|
|
37
|
+
m();
|
|
38
|
+
}, [m]);
|
|
39
|
+
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(I, { title: E, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
|
|
40
|
+
_,
|
|
29
41
|
{
|
|
30
42
|
size: "small",
|
|
31
|
-
startIcon: /* @__PURE__ */
|
|
32
|
-
loading:
|
|
33
|
-
disabled:
|
|
34
|
-
onClick:
|
|
35
|
-
p();
|
|
36
|
-
},
|
|
43
|
+
startIcon: /* @__PURE__ */ e(w, {}),
|
|
44
|
+
loading: s || c,
|
|
45
|
+
disabled: y,
|
|
46
|
+
onClick: C,
|
|
37
47
|
children: "Open Curator"
|
|
38
48
|
}
|
|
39
49
|
) }) }) });
|
|
40
50
|
}
|
|
41
51
|
export {
|
|
42
|
-
|
|
52
|
+
B as NO_TASK_ASSIGNEE_WARNING_DIALOG_TITLE,
|
|
53
|
+
k as OPEN_CURATOR_ERROR_TITLE,
|
|
54
|
+
G as OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE,
|
|
55
|
+
M as default
|
|
43
56
|
};
|
|
44
57
|
//# sourceMappingURL=MetadataTaskTableActionCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetadataTaskTableActionCell.js","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTaskTableActionCell.tsx"],"sourcesContent":["import { getLinkToGridSession } from '@/utils/functions/getSynapseWebClientLink'\nimport { StickyNote2Outlined } from '@mui/icons-material'\nimport { Button, Tooltip } from '@mui/material'\nimport {
|
|
1
|
+
{"version":3,"file":"MetadataTaskTableActionCell.js","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTaskTableActionCell.tsx"],"sourcesContent":["import { displayToast } from '@/components/ToastMessage/ToastMessage'\nimport useGridSessionForCurationTask_legacy from '@/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy'\nimport { useGetEntityPermissions } from '@/synapse-queries/entity/useEntity'\nimport { getLinkToGridSession } from '@/utils/functions/getSynapseWebClientLink'\nimport { StickyNote2Outlined } from '@mui/icons-material'\nimport { Button, Tooltip } from '@mui/material'\nimport {\n GridSession,\n SynapseClientError,\n TaskBundle,\n} from '@sage-bionetworks/synapse-client'\nimport { useCallback } from 'react'\nimport { getGridSourceIdForTask } from '../utils/getGridSourceIdForTask'\n\nexport const OPEN_CURATOR_ERROR_TITLE =\n 'An error occurred while trying to open Curator'\nexport const OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE =\n \"You don't have permission to view the existing Curator session for this task. It was likely created by another data contributor. A data manager should create a new task and assign it to you or your team.\"\n\nexport const NO_TASK_ASSIGNEE_WARNING_DIALOG_TITLE = 'Task is Unassigned'\n\nfunction openGridSessionInNewWindow(gridSessionId: string, taskId: number) {\n const gridUrl = getLinkToGridSession(gridSessionId, taskId)\n window.open(gridUrl, '_blank', 'noopener')\n}\n\n/**\n * Handles rendering the 'Actions' cell in the Metadata Task table, which provides buttons for the user\n * to accomplish the actions they can take on a Metadata Task, such as opening a data grid for the entity referenced\n * by the task.\n */\nexport default function MetadataTaskTableActionCell(props: {\n taskBundle: TaskBundle\n canEdit: boolean\n}) {\n const { taskBundle } = props\n const curationTask = taskBundle.task!\n\n const {\n mutateAsync: getOrCreateLegacyGridSessionForUnassignedTask,\n isPending: openGridIsPending,\n } = useGridSessionForCurationTask_legacy()\n\n const gridSourceEntityId = getGridSourceIdForTask(curationTask)\n const {\n data: sourceEntityPermissions,\n isLoading: isLoadingEntityPermissions,\n } = useGetEntityPermissions(gridSourceEntityId)\n\n const isLoading = isLoadingEntityPermissions\n\n const hasPermission = sourceEntityPermissions?.canView\n\n const isOpenDataGridDisabled =\n openGridIsPending || isLoading || !hasPermission\n const toolTipTitle = hasPermission\n ? 'Open Curator to edit metadata'\n : sourceEntityPermissions?.canView\n ? 'You must have READ access to ' +\n gridSourceEntityId +\n ' to view the Working Copy'\n : 'You do not have permission to view the Working Copy'\n\n const openNewOrExistingCuratorSession = useCallback(async () => {\n let gridSession: GridSession\n try {\n gridSession = await getOrCreateLegacyGridSessionForUnassignedTask({\n curationTask,\n })\n openGridSessionInNewWindow(gridSession.sessionId!, curationTask.taskId!)\n } catch (error) {\n if (error instanceof SynapseClientError && error.status === 403) {\n console.error(error)\n displayToast(OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE, 'danger', {\n title: OPEN_CURATOR_ERROR_TITLE,\n })\n } else {\n console.error('Error opening Curator for curation task', error)\n displayToast(error.message, 'danger', {\n title: OPEN_CURATOR_ERROR_TITLE,\n })\n }\n }\n }, [curationTask, getOrCreateLegacyGridSessionForUnassignedTask])\n\n const handleClickOpenCurator = useCallback(() => {\n void openNewOrExistingCuratorSession()\n }, [openNewOrExistingCuratorSession])\n\n return (\n <>\n <Tooltip title={toolTipTitle}>\n <span>\n <Button\n size={'small'}\n startIcon={<StickyNote2Outlined />}\n loading={openGridIsPending || isLoading}\n disabled={isOpenDataGridDisabled}\n onClick={handleClickOpenCurator}\n >\n Open Curator\n </Button>\n </span>\n </Tooltip>\n </>\n )\n}\n"],"names":["OPEN_CURATOR_ERROR_TITLE","OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE","NO_TASK_ASSIGNEE_WARNING_DIALOG_TITLE","openGridSessionInNewWindow","gridSessionId","taskId","gridUrl","getLinkToGridSession","MetadataTaskTableActionCell","props","taskBundle","curationTask","getOrCreateLegacyGridSessionForUnassignedTask","openGridIsPending","useGridSessionForCurationTask_legacy","gridSourceEntityId","getGridSourceIdForTask","sourceEntityPermissions","isLoadingEntityPermissions","useGetEntityPermissions","isLoading","hasPermission","isOpenDataGridDisabled","toolTipTitle","openNewOrExistingCuratorSession","useCallback","gridSession","error","SynapseClientError","displayToast","handleClickOpenCurator","jsx","Tooltip","Button","StickyNote2Outlined"],"mappings":";;;;;;;;;;AAcO,MAAMA,IACX,kDACWC,IACX,+MAEWC,IAAwC;AAErD,SAASC,EAA2BC,GAAuBC,GAAgB;AACzE,QAAMC,IAAUC,EAAqBH,GAAeC,CAAM;AAC1D,SAAO,KAAKC,GAAS,UAAU,UAAU;AAC3C;AAOA,SAAwBE,EAA4BC,GAGjD;AACD,QAAM,EAAE,YAAAC,MAAeD,GACjBE,IAAeD,EAAW,MAE1B;AAAA,IACJ,aAAaE;AAAA,IACb,WAAWC;AAAA,EAAA,IACTC,EAAA,GAEEC,IAAqBC,EAAuBL,CAAY,GACxD;AAAA,IACJ,MAAMM;AAAA,IACN,WAAWC;AAAA,EAAA,IACTC,EAAwBJ,CAAkB,GAExCK,IAAYF,GAEZG,IAAgBJ,GAAyB,SAEzCK,IACJT,KAAqBO,KAAa,CAACC,GAC/BE,IAAeF,IACjB,kCACAJ,GAAyB,UACzB,kCACAF,IACA,8BACA,uDAEES,IAAkCC,EAAY,YAAY;AAC9D,QAAIC;AACJ,QAAI;AACF,MAAAA,IAAc,MAAMd,EAA8C;AAAA,QAChE,cAAAD;AAAA,MAAA,CACD,GACDR,EAA2BuB,EAAY,WAAYf,EAAa,MAAO;AAAA,IACzE,SAASgB,GAAO;AACd,MAAIA,aAAiBC,KAAsBD,EAAM,WAAW,OAC1D,QAAQ,MAAMA,CAAK,GACnBE,EAAa5B,GAAyC,UAAU;AAAA,QAC9D,OAAOD;AAAA,MAAA,CACR,MAED,QAAQ,MAAM,2CAA2C2B,CAAK,GAC9DE,EAAaF,EAAM,SAAS,UAAU;AAAA,QACpC,OAAO3B;AAAA,MAAA,CACR;AAAA,IAEL;AAAA,EACF,GAAG,CAACW,GAAcC,CAA6C,CAAC,GAE1DkB,IAAyBL,EAAY,MAAM;AAC/C,IAAKD,EAAA;AAAA,EACP,GAAG,CAACA,CAA+B,CAAC;AAEpC,gCAEI,UAAA,gBAAAO,EAACC,GAAA,EAAQ,OAAOT,GACd,4BAAC,QAAA,EACC,UAAA,gBAAAQ;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,MAAM;AAAA,MACN,6BAAYC,GAAA,EAAoB;AAAA,MAChC,SAASrB,KAAqBO;AAAA,MAC9B,UAAUE;AAAA,MACV,SAASQ;AAAA,MACV,UAAA;AAAA,IAAA;AAAA,EAAA,EAED,CACF,GACF,GACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetadataTasksPage.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTasksPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MetadataTasksPage.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTasksPage.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAgDtE"}
|
|
@@ -1,32 +1,57 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { useMetadataTaskTable as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import T from "../../../../components/layout/InfiniteTableLayout.js";
|
|
3
|
+
import u from "../../../../components/TanStackTable/StyledTanStackTable.js";
|
|
4
|
+
import { useMetadataTaskTable as h } from "../hooks/useMetadataTaskTable.js";
|
|
5
|
+
import { Stack as s, FormControlLabel as p, Switch as k } from "@mui/material";
|
|
6
|
+
import { useState as x } from "react";
|
|
7
|
+
function j(n) {
|
|
8
|
+
const { projectId: i } = n, [t, r] = x({
|
|
9
|
+
projectId: i,
|
|
10
|
+
assignedToMe: !1
|
|
11
|
+
}), { table: a, isLoading: o, hasNextPage: l, fetchNextPage: c, isFetchingNextPage: d } = h({
|
|
12
|
+
listCurationTaskRequest: t
|
|
8
13
|
});
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
return /* @__PURE__ */ f(s, { children: [
|
|
15
|
+
/* @__PURE__ */ e(s, { direction: "row", justifyContent: "flex-end", children: /* @__PURE__ */ e(
|
|
16
|
+
p,
|
|
17
|
+
{
|
|
18
|
+
control: /* @__PURE__ */ e(
|
|
19
|
+
k,
|
|
20
|
+
{
|
|
21
|
+
checked: !!t.assignedToMe,
|
|
22
|
+
onChange: (b, m) => {
|
|
23
|
+
r((g) => ({
|
|
24
|
+
...g,
|
|
25
|
+
assignedToMe: m
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
label: "View only tasks assigned to me"
|
|
31
|
+
}
|
|
32
|
+
) }),
|
|
33
|
+
/* @__PURE__ */ e(
|
|
34
|
+
T,
|
|
35
|
+
{
|
|
36
|
+
table: /* @__PURE__ */ e(
|
|
37
|
+
u,
|
|
38
|
+
{
|
|
39
|
+
table: a,
|
|
40
|
+
styledTableContainerProps: { sx: { my: 2 } }
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
isLoading: o,
|
|
44
|
+
isEmpty: !o && a.getRowModel().rows.length === 0,
|
|
45
|
+
hasNextPage: l,
|
|
46
|
+
onFetchNextPageClicked: () => {
|
|
47
|
+
c();
|
|
48
|
+
},
|
|
49
|
+
isFetchingNextPage: d
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
28
53
|
}
|
|
29
54
|
export {
|
|
30
|
-
|
|
55
|
+
j as default
|
|
31
56
|
};
|
|
32
57
|
//# sourceMappingURL=MetadataTasksPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetadataTasksPage.js","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTasksPage.tsx"],"sourcesContent":["import InfiniteTableLayout from '@/components/layout/InfiniteTableLayout'\nimport StyledTanStackTable from '@/components/TanStackTable/StyledTanStackTable'\nimport { useMetadataTaskTable } from '@/features/entity/metadata-task/hooks/useMetadataTaskTable'\n\nexport type MetadataTaskTableProps = {\n projectId: string\n}\n\n/**\n * Displays a list of metadata curation tasks for a particular project, with actions that can be performed on each task.\n * @param props\n * @constructor\n */\nexport default function MetadataTasksPage(props: MetadataTaskTableProps) {\n const { projectId } = props\n\n const { table, isLoading, hasNextPage, fetchNextPage, isFetchingNextPage } =\n useMetadataTaskTable({\n
|
|
1
|
+
{"version":3,"file":"MetadataTasksPage.js","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTasksPage.tsx"],"sourcesContent":["import InfiniteTableLayout from '@/components/layout/InfiniteTableLayout'\nimport StyledTanStackTable from '@/components/TanStackTable/StyledTanStackTable'\nimport { useMetadataTaskTable } from '@/features/entity/metadata-task/hooks/useMetadataTaskTable'\nimport { FormControlLabel, Stack, Switch } from '@mui/material'\nimport { useState } from 'react'\nimport { ListCurationTaskRequest } from '@sage-bionetworks/synapse-client'\n\nexport type MetadataTaskTableProps = {\n projectId: string\n}\n\n/**\n * Displays a list of metadata curation tasks for a particular project, with actions that can be performed on each task.\n * @param props\n * @constructor\n */\nexport default function MetadataTasksPage(props: MetadataTaskTableProps) {\n const { projectId } = props\n const [listCurationTaskRequest, setListCurationTaskRequest] =\n useState<ListCurationTaskRequest>({\n projectId,\n assignedToMe: false,\n })\n\n const { table, isLoading, hasNextPage, fetchNextPage, isFetchingNextPage } =\n useMetadataTaskTable({\n listCurationTaskRequest,\n })\n\n return (\n <Stack>\n <Stack direction=\"row\" justifyContent=\"flex-end\">\n <FormControlLabel\n control={\n <Switch\n checked={!!listCurationTaskRequest.assignedToMe}\n onChange={(_e, checked) => {\n setListCurationTaskRequest(prev => ({\n ...prev,\n assignedToMe: checked,\n }))\n }}\n />\n }\n label=\"View only tasks assigned to me\"\n />\n </Stack>\n <InfiniteTableLayout\n table={\n <StyledTanStackTable\n table={table}\n styledTableContainerProps={{ sx: { my: 2 } }}\n />\n }\n isLoading={isLoading}\n isEmpty={!isLoading && table.getRowModel().rows.length === 0}\n hasNextPage={hasNextPage}\n onFetchNextPageClicked={() => {\n fetchNextPage()\n }}\n isFetchingNextPage={isFetchingNextPage}\n />\n </Stack>\n )\n}\n"],"names":["MetadataTasksPage","props","projectId","listCurationTaskRequest","setListCurationTaskRequest","useState","table","isLoading","hasNextPage","fetchNextPage","isFetchingNextPage","useMetadataTaskTable","Stack","jsx","FormControlLabel","Switch","_e","checked","prev","InfiniteTableLayout","StyledTanStackTable"],"mappings":";;;;;;AAgBA,SAAwBA,EAAkBC,GAA+B;AACvE,QAAM,EAAE,WAAAC,MAAcD,GAChB,CAACE,GAAyBC,CAA0B,IACxDC,EAAkC;AAAA,IAChC,WAAAH;AAAA,IACA,cAAc;AAAA,EAAA,CACf,GAEG,EAAE,OAAAI,GAAO,WAAAC,GAAW,aAAAC,GAAa,eAAAC,GAAe,oBAAAC,EAAA,IACpDC,EAAqB;AAAA,IACnB,yBAAAR;AAAA,EAAA,CACD;AAEH,2BACGS,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACD,GAAA,EAAM,WAAU,OAAM,gBAAe,YACpC,UAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SACE,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,SAAS,CAAC,CAACZ,EAAwB;AAAA,YACnC,UAAU,CAACa,GAAIC,MAAY;AACzB,cAAAb,EAA2B,CAAAc,OAAS;AAAA,gBAClC,GAAGA;AAAA,gBACH,cAAcD;AAAA,cAAA,EACd;AAAA,YACJ;AAAA,UAAA;AAAA,QAAA;AAAA,QAGJ,OAAM;AAAA,MAAA;AAAA,IAAA,GAEV;AAAA,IACA,gBAAAJ;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OACE,gBAAAN;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,OAAAd;AAAA,YACA,2BAA2B,EAAE,IAAI,EAAE,IAAI,IAAE;AAAA,UAAE;AAAA,QAAA;AAAA,QAG/C,WAAAC;AAAA,QACA,SAAS,CAACA,KAAaD,EAAM,YAAA,EAAc,KAAK,WAAW;AAAA,QAC3D,aAAAE;AAAA,QACA,wBAAwB,MAAM;AAC5B,UAAAC,EAAA;AAAA,QACF;AAAA,QACA,oBAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TaskBundle } from '@sage-bionetworks/synapse-client';
|
|
2
|
+
export type MetadataTasksTableAssigneeCellProps = {
|
|
3
|
+
taskBundle: TaskBundle;
|
|
4
|
+
canEdit: boolean;
|
|
5
|
+
};
|
|
6
|
+
export default function MetadataTasksTableAssigneeCell(props: MetadataTasksTableAssigneeCellProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=MetadataTasksTableAssigneeCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetadataTasksTableAssigneeCell.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAK7D,MAAM,MAAM,mCAAmC,GAAG;IAChD,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,8BAA8B,CACpD,KAAK,EAAE,mCAAmC,2CAwH3C"}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { ConfirmationDialog as T } from "../../../../components/ConfirmationDialog/ConfirmationDialog.js";
|
|
3
|
+
import w from "../../../../components/UserOrTeamBadge/UserOrTeamBadge.js";
|
|
4
|
+
import b from "../../../../components/UserSearchBox/UserSearchBox.js";
|
|
5
|
+
import "../../../../assets/icons/error_page/maintenance.svg.js";
|
|
6
|
+
import "../../../../assets/icons/error_page/no-access.svg.js";
|
|
7
|
+
import "../../../../assets/icons/error_page/unavailable.svg.js";
|
|
8
|
+
import "../../../../utils/PermissionLevelToAccessType.js";
|
|
9
|
+
import "../../../../utils/SynapseConstants.js";
|
|
10
|
+
import { useState as e, useCallback as I } from "react";
|
|
11
|
+
import "../../../../synapse-client/SynapseClient.js";
|
|
12
|
+
import "@sage-bionetworks/synapse-client/generated/models/ErrorResponseCode";
|
|
13
|
+
import "@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse";
|
|
14
|
+
import "@sage-bionetworks/synapse-client/util/SynapseClientError";
|
|
15
|
+
import { TYPE_FILTER as A } from "@sage-bionetworks/synapse-types";
|
|
16
|
+
import "../../../../utils/functions/EntityTypeUtils.js";
|
|
17
|
+
import "lodash-es";
|
|
18
|
+
import "@sage-bionetworks/synapse-client/util/synapseClientFetch";
|
|
19
|
+
import "../../../../utils/context/SynapseContext.js";
|
|
20
|
+
import "use-deep-compare-effect";
|
|
21
|
+
import "@tanstack/react-query";
|
|
22
|
+
import "@tanstack/query-core";
|
|
23
|
+
import "lodash-es/isEmpty";
|
|
24
|
+
import "lodash-es/isEqual";
|
|
25
|
+
import "lodash-es/xorWith";
|
|
26
|
+
import { Stack as d, Typography as S, Alert as P, Box as B, IconButton as x } from "@mui/material";
|
|
27
|
+
import "@sage-bionetworks/synapse-client";
|
|
28
|
+
import "../../../../utils/types/IsType.js";
|
|
29
|
+
import "../../../../utils/hooks/useCookiePreferences.js";
|
|
30
|
+
import "../../../../utils/hooks/useSourceAppConfigs.js";
|
|
31
|
+
import "universal-cookie";
|
|
32
|
+
import "../../../../utils/AppUtils/session/ApplicationSessionContext.js";
|
|
33
|
+
import "../../../../utils/context/FullContextProvider.js";
|
|
34
|
+
import "../../../../utils/context/DocumentMetadataContext.js";
|
|
35
|
+
import '../../../../components/Plot/SynapsePlot.css';import '../../../../components/FullWidthAlert/FullWidthAlert.css';import '../../../../style/components/_spinner.css';/* empty css */
|
|
36
|
+
import "react-router";
|
|
37
|
+
import { displayToast as E } from "../../../../components/ToastMessage/ToastMessage.js";
|
|
38
|
+
import "@sage-bionetworks/synapse-client/generated/models/DoiObjectType";
|
|
39
|
+
import { EditTwoTone as U } from "@mui/icons-material";
|
|
40
|
+
import "react-error-boundary";
|
|
41
|
+
/* empty css */
|
|
42
|
+
import "../../../../components/AccessTokenPage/AccessTokenCard/AccessTokenCard.js";
|
|
43
|
+
import "@mui/icons-material/ContentCopy";
|
|
44
|
+
import "../../../../components/styled/StyledFormControl.js";
|
|
45
|
+
import "../../../../assets/icons/account-certified.svg.js";
|
|
46
|
+
import "../../../../assets/icons/account-enabled-mfa.svg.js";
|
|
47
|
+
import "../../../../assets/icons/account-validated.svg.js";
|
|
48
|
+
import "../../../../utils/functions/DateFormatter.js";
|
|
49
|
+
import "@react-hookz/web";
|
|
50
|
+
import "dayjs";
|
|
51
|
+
import "../../../../assets/ArcusBioIcon.svg.js";
|
|
52
|
+
import "@mui/material/SvgIcon";
|
|
53
|
+
import "../../../../assets/icons/AccessPending.svg.js";
|
|
54
|
+
import "../../../../assets/icons/AccessPendingCloud.svg.js";
|
|
55
|
+
import "../../../../assets/icons/FileWithShield.svg.js";
|
|
56
|
+
import "../../../../assets/icons/MultiFile.svg.js";
|
|
57
|
+
import "../../../../assets/icons/UnpackagableFile.svg.js";
|
|
58
|
+
import "../../../../assets/icons/bioChemicalPhysical.svg.js";
|
|
59
|
+
import "../../../../assets/icons/computationalTool.svg.js";
|
|
60
|
+
import "../../../../assets/icons/dataReuse.svg.js";
|
|
61
|
+
import "../../../../assets/icons/inSilicoModel.svg.js";
|
|
62
|
+
import "../../../../assets/icons/modelSystem.svg.js";
|
|
63
|
+
import "../../../../assets/mui_components/PackagableFile.svg.js";
|
|
64
|
+
import "../../../../assets/icons/spatialProfiling.svg.js";
|
|
65
|
+
import "../../../../components/Authentication/AuthenticationMethodSelection.js";
|
|
66
|
+
import "mui-one-time-password-input";
|
|
67
|
+
import "../../../../components/Authentication/TwoFactorEnrollmentForm.js";
|
|
68
|
+
import "../../../../components/styled/LeftRightPanel.js";
|
|
69
|
+
import "../../../../components/Authentication/RecoveryCodeGrid.js";
|
|
70
|
+
import "../../../../components/GenericCard/GenericCardActionButton.js";
|
|
71
|
+
import "@mui/material/Link";
|
|
72
|
+
import "@mui/material/Skeleton";
|
|
73
|
+
import "@mui/material/Tooltip";
|
|
74
|
+
import "@mui/material/Typography";
|
|
75
|
+
import "../../../../assets/icons/chart2.svg.js";
|
|
76
|
+
import "../../../../assets/icons/Data2.svg.js";
|
|
77
|
+
import "../../../../assets/icons/DNA_Two.svg.js";
|
|
78
|
+
import "../../../../assets/icons/file.svg.js";
|
|
79
|
+
import "../../../../assets/icons/institution.svg.js";
|
|
80
|
+
import "../../../../assets/icons/mouse.svg.js";
|
|
81
|
+
import "../../../../assets/icons/organizations.svg.js";
|
|
82
|
+
import "../../../../assets/icons/person.svg.js";
|
|
83
|
+
import "../../../../assets/icons/study-active.svg.js";
|
|
84
|
+
import "../../../../assets/icons/study-complete.svg.js";
|
|
85
|
+
import "../../../../assets/icons/translational.svg.js";
|
|
86
|
+
import "../../../../assets/icons/tree_horizontal.svg.js";
|
|
87
|
+
import "../../../../assets/icons/standardDataModel.svg.js";
|
|
88
|
+
import "../../../../assets/icons/Challenge.svg.js";
|
|
89
|
+
import "react-intersection-observer";
|
|
90
|
+
import "@mui/icons-material/Close";
|
|
91
|
+
import "../../../../components/styled/StyledPopover.js";
|
|
92
|
+
import "../../../../components/Markdown/MarkdownSynapse.js";
|
|
93
|
+
import "@rjsf/utils";
|
|
94
|
+
import "../../../../components/SchemaDrivenAnnotationEditor/template/AdditionalPropertyContext.js";
|
|
95
|
+
import "@mui/material/TextField";
|
|
96
|
+
import "jsonpath-plus";
|
|
97
|
+
import "@mui/material/ListItem";
|
|
98
|
+
import "@mui/material/FormHelperText";
|
|
99
|
+
import "@mui/material/List";
|
|
100
|
+
import "../../../../components/DateTimePicker/DateTimePicker.js";
|
|
101
|
+
import "../../../../components/JsonSchemaForm/widgets/SelectWidget.js";
|
|
102
|
+
import "@rjsf/mui";
|
|
103
|
+
import "@rjsf/validator-ajv8";
|
|
104
|
+
import "../../../../utils/context/GlobalIsEditingContext.js";
|
|
105
|
+
import "../../../../assets/icons/DoubleQuotes.svg.js";
|
|
106
|
+
import "../../../../components/EntityDownloadConfirmation/EntityDownloadConfirmation.js";
|
|
107
|
+
import "../../../../components/QueryContext/QueryContext.js";
|
|
108
|
+
import "../../../../components/QueryVisualizationWrapper/QueryVisualizationContext.js";
|
|
109
|
+
import "react-share";
|
|
110
|
+
import "../../../../components/GenericCard/GenericCard.js";
|
|
111
|
+
import "@mui/system";
|
|
112
|
+
import "../../../../components/GenericCard/Linkify.js";
|
|
113
|
+
import "jotai";
|
|
114
|
+
import "lodash-es/noop";
|
|
115
|
+
import "../../../../components/QueryWrapper/TableRowSelectionState.js";
|
|
116
|
+
import "../../../../components/styled/WideButton.js";
|
|
117
|
+
import "pluralize";
|
|
118
|
+
import "react-select";
|
|
119
|
+
import "../../../../components/AccessRequirementList/AccessRequirementList.js";
|
|
120
|
+
import "../../../../components/DownloadCart/ActionRequiredCard/ActionRequiredCard.js";
|
|
121
|
+
import "../../../../components/EntityAclEditor/EntityAclEditor.js";
|
|
122
|
+
import "../../../../components/SynapseTable/SynapseTable.js";
|
|
123
|
+
import "../../../../components/styled/StyledTableContainer.js";
|
|
124
|
+
import "@mui/icons-material/ExitToApp";
|
|
125
|
+
import "../../../../components/ChallengeTeamWizard/CreateChallengeTeam.js";
|
|
126
|
+
import "../../../../components/ChallengeTeamWizard/MembershipRequestForm.js";
|
|
127
|
+
import "@mui/x-data-grid";
|
|
128
|
+
import "@mui/material/InputBase";
|
|
129
|
+
import "@mui/icons-material/Search";
|
|
130
|
+
import "@mui/icons-material/AddCircleTwoTone";
|
|
131
|
+
import "../../../../components/EntityFinder/details/configurations/EntityChildrenDetails.js";
|
|
132
|
+
import "../../../../components/EntityFinder/details/view/DetailsView.js";
|
|
133
|
+
import "immutable";
|
|
134
|
+
import "../../../../components/styled/LightTooltip.js";
|
|
135
|
+
import "../../../../assets/illustrations/challenges_illustration.svg.js";
|
|
136
|
+
import "../../../../assets/illustrations/cohort_builder_illustration.svg.js";
|
|
137
|
+
import "../../../../assets/illustrations/data_access_management_illustration.svg.js";
|
|
138
|
+
import "../../../../assets/illustrations/datasets_illustration.svg.js";
|
|
139
|
+
import "../../../../assets/illustrations/discussions_illustration.svg.js";
|
|
140
|
+
import "../../../../assets/illustrations/docker_illustration.svg.js";
|
|
141
|
+
import "../../../../assets/illustrations/favorites_illustration.svg.js";
|
|
142
|
+
import "../../../../assets/illustrations/files_illustration.svg.js";
|
|
143
|
+
import "../../../../assets/illustrations/following_illustration.svg.js";
|
|
144
|
+
import "../../../../assets/illustrations/projects_illustration.svg.js";
|
|
145
|
+
import "../../../../assets/illustrations/tables_illustration.svg.js";
|
|
146
|
+
import "../../../../assets/illustrations/teams_illustration.svg.js";
|
|
147
|
+
import "../../../../assets/illustrations/trash_can_illustration.svg.js";
|
|
148
|
+
import "../../../../assets/illustrations/wikis_illustration.svg.js";
|
|
149
|
+
import "../../../../assets/illustrations/donation_illustration.svg.js";
|
|
150
|
+
import "../../../../assets/illustrations/left_dot_blob_illustration.svg.js";
|
|
151
|
+
import "../../../../assets/illustrations/right_dot_blob_illustration.svg.js";
|
|
152
|
+
import "../../../../assets/illustrations/left_dot_blob_dark_illustration.svg.js";
|
|
153
|
+
import "../../../../assets/illustrations/right_dot_blob_dark_illustration.svg.js";
|
|
154
|
+
import "../../../../assets/illustrations/underconstruction_illustration.svg.js";
|
|
155
|
+
import "../../../../components/DownloadCart/DownloadListTable.js";
|
|
156
|
+
import "@hyperjump/json-schema";
|
|
157
|
+
import "@hyperjump/json-schema/draft-07";
|
|
158
|
+
import "@hyperjump/json-schema/annotated-instance/experimental";
|
|
159
|
+
import "@hyperjump/json-schema/annotations/experimental";
|
|
160
|
+
import "@rjsf/core";
|
|
161
|
+
import "../../../../components/EntityFinder/EntityFinder.js";
|
|
162
|
+
import "shortid";
|
|
163
|
+
import "../../../../components/Evaluation/EvaluationRoundEditor.js";
|
|
164
|
+
import "react-switch";
|
|
165
|
+
import "../../../../components/Plot/Plot.js";
|
|
166
|
+
import "../../../../components/ColorGradient/ColorGradient.js";
|
|
167
|
+
import "@mui/x-date-pickers";
|
|
168
|
+
import "@mui/x-date-pickers/AdapterDayjs";
|
|
169
|
+
import "@mui/x-date-pickers/LocalizationProvider";
|
|
170
|
+
import "../../../../components/FeaturedDataTabs/FacetPlotsCardGrid.js";
|
|
171
|
+
import "../../../../components/Forum/ForumTable.js";
|
|
172
|
+
import "@mui/icons-material/NavigateNext";
|
|
173
|
+
import "@react-google-maps/api";
|
|
174
|
+
import "../../../../components/Markdown/MarkdownUtils.js";
|
|
175
|
+
import "../../../../components/OAuthClientManagement/OAuthManagement.js";
|
|
176
|
+
import "../../../../components/OrientationBanner/OrientationBanner.js";
|
|
177
|
+
import "lodash-es/cloneDeep";
|
|
178
|
+
import "lodash-es/uniq";
|
|
179
|
+
import "lodash-es/countBy";
|
|
180
|
+
import "lodash-es/first";
|
|
181
|
+
import "lodash-es/orderBy";
|
|
182
|
+
import "../../../../components/styled/LargeButton.js";
|
|
183
|
+
import "../../../../assets/illustrations/diagonalLinePattern.svg.js";
|
|
184
|
+
import "@upsetjs/react";
|
|
185
|
+
/* empty css */
|
|
186
|
+
import "reactflow";
|
|
187
|
+
import "../../../../components/ProvenanceGraph/ProvenanceUtils.js";
|
|
188
|
+
import "reactflow/dist/style.css";
|
|
189
|
+
import "../../../../components/download_list/DownloadDetails.js";
|
|
190
|
+
import "react-transition-group";
|
|
191
|
+
import "../../../../components/WizardChoiceButton/WizardChoiceButton.js";
|
|
192
|
+
import "../../../../components/SynapseTable/export/ExternalAnalysisPlatformsConstants.js";
|
|
193
|
+
import "react-hot-toast";
|
|
194
|
+
import "../../../../components/styled/InlineBadge.js";
|
|
195
|
+
import "../../../../components/AccessRequirementAclEditor/AccessRequirementAclEditor.js";
|
|
196
|
+
import "../../../../components/RssFeedCards/RssFeedCards.js";
|
|
197
|
+
import "../../../../components/styled/InputSizedButton.js";
|
|
198
|
+
import "../../../../components/SubsectionRowRenderer/SubsectionRowRenderer.js";
|
|
199
|
+
import "@apidevtools/json-schema-ref-parser";
|
|
200
|
+
import "json-rules-engine";
|
|
201
|
+
import "lodash-es/find";
|
|
202
|
+
import "lodash-es/findIndex";
|
|
203
|
+
import "lodash-es/get";
|
|
204
|
+
import "lodash-es/isUndefined";
|
|
205
|
+
import "lodash-es/keys";
|
|
206
|
+
import "lodash-es/pick";
|
|
207
|
+
import "lodash-es/remove";
|
|
208
|
+
import "lodash-es/set";
|
|
209
|
+
import "lodash-es/trimStart";
|
|
210
|
+
import "../../../../components/SynapseForm/SynapseFormSubmissionGrid.js";
|
|
211
|
+
import "../../../../components/SynapseChat/AccessLevelMenu.js";
|
|
212
|
+
import "react-draggable";
|
|
213
|
+
import "../../../../components/TimelinePlot/phasesQueryResponseData.js";
|
|
214
|
+
import "../../../../components/EntityHeaderTable/EntityHeaderTable.js";
|
|
215
|
+
import "../../../../components/MuiContainer.js";
|
|
216
|
+
import "@mui/material/Grid";
|
|
217
|
+
import "@mui/icons-material/ArrowForwardIos";
|
|
218
|
+
import "../../../../components/PortalAclEditor/PortalAclEditor.js";
|
|
219
|
+
import "../../../../components/SynapseHomepageV2/HomepageStyles.js";
|
|
220
|
+
import "../../../../assets/icons/Checkbox/Checked.svg.js";
|
|
221
|
+
import "../../../../assets/icons/Checkbox/Indeterminate.svg.js";
|
|
222
|
+
import "../../../../assets/icons/Checkbox/Unchecked.svg.js";
|
|
223
|
+
import "../../../../theme/palette/Palettes.js";
|
|
224
|
+
import "@mui/material/styles";
|
|
225
|
+
import "@mui/utils";
|
|
226
|
+
import "../../../../components/Webhook/WebhookDashboard.js";
|
|
227
|
+
import "../../../../mocks/query/mock_query_data.js";
|
|
228
|
+
import "../../../../mocks/realm/mockRealmPrincipal.js";
|
|
229
|
+
import { useUpdateCurationTask as D } from "../../../../synapse-queries/curation/task/useCurationTask.js";
|
|
230
|
+
import L from "../utils/taskHasAssignee.js";
|
|
231
|
+
function Xr(u) {
|
|
232
|
+
const { taskBundle: s, canEdit: g } = u, o = s.task, { assigneePrincipalId: m } = o, [n, p] = e(!1), [h, f] = e(
|
|
233
|
+
m ?? null
|
|
234
|
+
), [k, a] = e(!1), { mutateAsync: l, isPending: y } = D({
|
|
235
|
+
onError: (i) => {
|
|
236
|
+
E("Error updating task assignee: " + i.message, "danger");
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
let c = /* @__PURE__ */ t(
|
|
240
|
+
B,
|
|
241
|
+
{
|
|
242
|
+
component: "span",
|
|
243
|
+
sx: { flexGrow: 1, fontStyle: "italic", color: "grey.700" },
|
|
244
|
+
children: "Unassigned"
|
|
245
|
+
}
|
|
246
|
+
);
|
|
247
|
+
L(o) && (c = /* @__PURE__ */ t(w, { principalId: m }));
|
|
248
|
+
const v = I(
|
|
249
|
+
async (i) => {
|
|
250
|
+
await l({
|
|
251
|
+
...o,
|
|
252
|
+
assigneePrincipalId: i
|
|
253
|
+
}), p(!1);
|
|
254
|
+
},
|
|
255
|
+
[o, l]
|
|
256
|
+
), C = /* @__PURE__ */ t(
|
|
257
|
+
T,
|
|
258
|
+
{
|
|
259
|
+
title: "Set Assignee",
|
|
260
|
+
open: n,
|
|
261
|
+
content: /* @__PURE__ */ r(d, { gap: 2, children: [
|
|
262
|
+
/* @__PURE__ */ t(S, { variant: "body1", gutterBottom: !0, children: "Assign this task to a team or an individual user. All members of a team will be able to collaborate in the same Curator session." }),
|
|
263
|
+
/* @__PURE__ */ t(
|
|
264
|
+
b,
|
|
265
|
+
{
|
|
266
|
+
defaultValue: m,
|
|
267
|
+
onChange: (i) => f(i),
|
|
268
|
+
typeFilter: A.ALL
|
|
269
|
+
},
|
|
270
|
+
n.toString()
|
|
271
|
+
),
|
|
272
|
+
s.status?.executionDetails?.activeSessionId && /* @__PURE__ */ r(P, { severity: "warning", children: [
|
|
273
|
+
"This task has an active Curator session. If you change the assignee, these effects could happen:",
|
|
274
|
+
/* @__PURE__ */ r("ul", { children: [
|
|
275
|
+
/* @__PURE__ */ t("li", { children: "Current assignee(s) may lose access to the session, unsaved changes will be lost, and they may not be able to complete their work." }),
|
|
276
|
+
/* @__PURE__ */ t("li", { children: "New assignee(s) may not have permission to access the current session" })
|
|
277
|
+
] }),
|
|
278
|
+
"To avoid these issues, a data manager should create a new task."
|
|
279
|
+
] })
|
|
280
|
+
] }),
|
|
281
|
+
confirmButtonProps: {
|
|
282
|
+
children: "Save",
|
|
283
|
+
loading: y
|
|
284
|
+
},
|
|
285
|
+
onConfirm: () => {
|
|
286
|
+
v(h ?? void 0);
|
|
287
|
+
},
|
|
288
|
+
onCancel: () => p(!1)
|
|
289
|
+
}
|
|
290
|
+
);
|
|
291
|
+
return /* @__PURE__ */ r(
|
|
292
|
+
d,
|
|
293
|
+
{
|
|
294
|
+
direction: "row",
|
|
295
|
+
alignItems: "center",
|
|
296
|
+
justifyContent: "space-between",
|
|
297
|
+
spacing: 1,
|
|
298
|
+
onMouseOver: () => {
|
|
299
|
+
a(!0);
|
|
300
|
+
},
|
|
301
|
+
onMouseLeave: () => {
|
|
302
|
+
a(!1);
|
|
303
|
+
},
|
|
304
|
+
children: [
|
|
305
|
+
/* @__PURE__ */ t("span", { style: { overflow: "hidden" }, children: c }),
|
|
306
|
+
k && g && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
|
|
307
|
+
x,
|
|
308
|
+
{
|
|
309
|
+
"aria-label": "Edit assignee",
|
|
310
|
+
size: "small",
|
|
311
|
+
onClick: () => p(!0),
|
|
312
|
+
children: /* @__PURE__ */ t(U, { fontSize: "inherit" })
|
|
313
|
+
}
|
|
314
|
+
) }),
|
|
315
|
+
C
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
export {
|
|
321
|
+
Xr as default
|
|
322
|
+
};
|
|
323
|
+
//# sourceMappingURL=MetadataTasksTableAssigneeCell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetadataTasksTableAssigneeCell.js","sources":["../../../../../src/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.tsx"],"sourcesContent":["import { ConfirmationDialog } from '@/components/ConfirmationDialog'\nimport UserOrTeamBadge from '@/components/UserOrTeamBadge/UserOrTeamBadge'\nimport UserSearchBox from '@/components/UserSearchBox/UserSearchBox'\nimport { displayToast } from '@/index'\nimport { useUpdateCurationTask } from '@/synapse-queries/curation/task/useCurationTask'\nimport { EditTwoTone } from '@mui/icons-material'\nimport { Alert, Box, IconButton, Stack, Typography } from '@mui/material'\nimport { TaskBundle } from '@sage-bionetworks/synapse-client'\nimport { TYPE_FILTER } from '@sage-bionetworks/synapse-types'\nimport { useCallback, useState } from 'react'\nimport taskHasAssignee from '../utils/taskHasAssignee'\n\nexport type MetadataTasksTableAssigneeCellProps = {\n taskBundle: TaskBundle\n canEdit: boolean\n}\n\nexport default function MetadataTasksTableAssigneeCell(\n props: MetadataTasksTableAssigneeCellProps,\n) {\n const { taskBundle, canEdit } = props\n const curationTask = taskBundle.task!\n const { assigneePrincipalId } = curationTask\n const [showUserPicker, setShowUserPicker] = useState(false)\n const [selectedPrincipalId, setSelectedPrincipalId] = useState<string | null>(\n assigneePrincipalId ?? null,\n )\n const [isHoveringOnCell, setIsHoveringOnCell] = useState(false)\n\n const { mutateAsync: updateCurationTask, isPending: updateTaskIsPending } =\n useUpdateCurationTask({\n onError: error => {\n displayToast('Error updating task assignee: ' + error.message, 'danger')\n },\n })\n\n let assigneeDisplay = (\n <Box\n component=\"span\"\n sx={{ flexGrow: 1, fontStyle: 'italic', color: 'grey.700' }}\n >\n Unassigned\n </Box>\n )\n\n const hasAssignee = taskHasAssignee(curationTask)\n if (hasAssignee) {\n assigneeDisplay = <UserOrTeamBadge principalId={assigneePrincipalId} />\n }\n\n const onConfirmUpdateAssignee = useCallback(\n async (assigneeId: string | undefined) => {\n await updateCurationTask({\n ...curationTask,\n assigneePrincipalId: assigneeId,\n })\n setShowUserPicker(false)\n },\n [curationTask, updateCurationTask],\n )\n\n const editDialog = (\n <ConfirmationDialog\n title=\"Set Assignee\"\n open={showUserPicker}\n content={\n <Stack gap={2}>\n <Typography variant=\"body1\" gutterBottom>\n Assign this task to a team or an individual user. All members of a\n team will be able to collaborate in the same Curator session.\n </Typography>\n <UserSearchBox\n key={showUserPicker.toString()}\n defaultValue={assigneePrincipalId}\n onChange={principalId => setSelectedPrincipalId(principalId)}\n typeFilter={TYPE_FILTER.ALL}\n />\n {taskBundle.status?.executionDetails?.activeSessionId && (\n <Alert severity=\"warning\">\n This task has an active Curator session. If you change the\n assignee, these effects could happen:\n <ul>\n <li>\n Current assignee(s) may lose access to the session, unsaved\n changes will be lost, and they may not be able to complete\n their work.\n </li>\n <li>\n New assignee(s) may not have permission to access the current\n session\n </li>\n </ul>\n To avoid these issues, a data manager should create a new task.\n </Alert>\n )}\n </Stack>\n }\n confirmButtonProps={{\n children: 'Save',\n loading: updateTaskIsPending,\n }}\n onConfirm={() => {\n onConfirmUpdateAssignee(selectedPrincipalId ?? undefined)\n }}\n onCancel={() => setShowUserPicker(false)}\n />\n )\n\n const editButton = (\n <div>\n <IconButton\n aria-label=\"Edit assignee\"\n size=\"small\"\n onClick={() => setShowUserPicker(true)}\n >\n <EditTwoTone fontSize=\"inherit\" />\n </IconButton>\n </div>\n )\n\n return (\n <Stack\n direction={'row'}\n alignItems={'center'}\n justifyContent={'space-between'}\n spacing={1}\n onMouseOver={() => {\n setIsHoveringOnCell(true)\n }}\n onMouseLeave={() => {\n setIsHoveringOnCell(false)\n }}\n >\n <span style={{ overflow: 'hidden' }}>{assigneeDisplay}</span>\n {isHoveringOnCell && canEdit && editButton}\n {editDialog}\n </Stack>\n )\n}\n"],"names":["MetadataTasksTableAssigneeCell","props","taskBundle","canEdit","curationTask","assigneePrincipalId","showUserPicker","setShowUserPicker","useState","selectedPrincipalId","setSelectedPrincipalId","isHoveringOnCell","setIsHoveringOnCell","updateCurationTask","updateTaskIsPending","useUpdateCurationTask","error","displayToast","assigneeDisplay","jsx","Box","taskHasAssignee","UserOrTeamBadge","onConfirmUpdateAssignee","useCallback","assigneeId","editDialog","ConfirmationDialog","jsxs","Stack","Typography","UserSearchBox","principalId","TYPE_FILTER","Alert","IconButton","EditTwoTone"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,SAAwBA,GACtBC,GACA;AACA,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYF,GAC1BG,IAAeF,EAAW,MAC1B,EAAE,qBAAAG,MAAwBD,GAC1B,CAACE,GAAgBC,CAAiB,IAAIC,EAAS,EAAK,GACpD,CAACC,GAAqBC,CAAsB,IAAIF;AAAA,IACpDH,KAAuB;AAAA,EAAA,GAEnB,CAACM,GAAkBC,CAAmB,IAAIJ,EAAS,EAAK,GAExD,EAAE,aAAaK,GAAoB,WAAWC,EAAA,IAClDC,EAAsB;AAAA,IACpB,SAAS,CAAAC,MAAS;AAChB,MAAAC,EAAa,mCAAmCD,EAAM,SAAS,QAAQ;AAAA,IACzE;AAAA,EAAA,CACD;AAEH,MAAIE,IACF,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,IAAI,EAAE,UAAU,GAAG,WAAW,UAAU,OAAO,WAAA;AAAA,MAChD,UAAA;AAAA,IAAA;AAAA,EAAA;AAMH,EADoBC,EAAgBjB,CAAY,MAE9Cc,IAAkB,gBAAAC,EAACG,GAAA,EAAgB,aAAajB,EAAA,CAAqB;AAGvE,QAAMkB,IAA0BC;AAAA,IAC9B,OAAOC,MAAmC;AACxC,YAAMZ,EAAmB;AAAA,QACvB,GAAGT;AAAA,QACH,qBAAqBqB;AAAA,MAAA,CACtB,GACDlB,EAAkB,EAAK;AAAA,IACzB;AAAA,IACA,CAACH,GAAcS,CAAkB;AAAA,EAAA,GAG7Ba,IACJ,gBAAAP;AAAA,IAACQ;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,MAAMrB;AAAA,MACN,SACE,gBAAAsB,EAACC,GAAA,EAAM,KAAK,GACV,UAAA;AAAA,QAAA,gBAAAV,EAACW,GAAA,EAAW,SAAQ,SAAQ,cAAY,IAAC,UAAA,oIAGzC;AAAA,QACA,gBAAAX;AAAA,UAACY;AAAA,UAAA;AAAA,YAEC,cAAc1B;AAAA,YACd,UAAU,CAAA2B,MAAetB,EAAuBsB,CAAW;AAAA,YAC3D,YAAYC,EAAY;AAAA,UAAA;AAAA,UAHnB3B,EAAe,SAAA;AAAA,QAAS;AAAA,QAK9BJ,EAAW,QAAQ,kBAAkB,mBACpC,gBAAA0B,EAACM,GAAA,EAAM,UAAS,WAAU,UAAA;AAAA,UAAA;AAAA,4BAGvB,MAAA,EACC,UAAA;AAAA,YAAA,gBAAAf,EAAC,QAAG,UAAA,qIAAA,CAIJ;AAAA,YACA,gBAAAA,EAAC,QAAG,UAAA,wEAAA,CAGJ;AAAA,UAAA,GACF;AAAA,UAAK;AAAA,QAAA,EAAA,CAEP;AAAA,MAAA,GAEJ;AAAA,MAEF,oBAAoB;AAAA,QAClB,UAAU;AAAA,QACV,SAASL;AAAA,MAAA;AAAA,MAEX,WAAW,MAAM;AACf,QAAAS,EAAwBd,KAAuB,MAAS;AAAA,MAC1D;AAAA,MACA,UAAU,MAAMF,EAAkB,EAAK;AAAA,IAAA;AAAA,EAAA;AAgB3C,SACE,gBAAAqB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,SAAS;AAAA,MACT,aAAa,MAAM;AACjB,QAAAjB,EAAoB,EAAI;AAAA,MAC1B;AAAA,MACA,cAAc,MAAM;AAClB,QAAAA,EAAoB,EAAK;AAAA,MAC3B;AAAA,MAEA,UAAA;AAAA,QAAA,gBAAAO,EAAC,UAAK,OAAO,EAAE,UAAU,SAAA,GAAa,UAAAD,GAAgB;AAAA,QACrDP,KAAoBR,uBAzBtB,OAAA,EACC,UAAA,gBAAAgB;AAAA,UAACgB;AAAA,UAAA;AAAA,YACC,cAAW;AAAA,YACX,MAAK;AAAA,YACL,SAAS,MAAM5B,EAAkB,EAAI;AAAA,YAErC,UAAA,gBAAAY,EAACiB,GAAA,EAAY,UAAS,UAAA,CAAU;AAAA,UAAA;AAAA,QAAA,GAEpC;AAAA,QAkBGV;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|