synapse-react-client 4.0.44 → 4.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SWC.index.d.ts +1 -1
- package/dist/SWC.index.js +2 -2
- package/dist/SWC.index.js.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.d.ts +2 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.js +126 -125
- package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementListItem.d.ts +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementListItem.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementListItem.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +28 -16
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js +99 -97
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/RequestDataStep.d.ts +1 -4
- package/dist/components/AccessRequirementList/RequestDataStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/RequestDataStep.js +15 -18
- package/dist/components/AccessRequirementList/RequestDataStep.js.map +1 -1
- package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.d.ts.map +1 -1
- package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.js +52 -49
- package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.js.map +1 -1
- package/dist/components/FormTemplateEditor/useSaveFormTemplate.d.ts.map +1 -1
- package/dist/components/FormTemplateEditor/useSaveFormTemplate.js.map +1 -1
- package/dist/components/FormTemplateReferenceField/FormTemplatePreviewDialog.d.ts +9 -0
- package/dist/components/FormTemplateReferenceField/FormTemplatePreviewDialog.d.ts.map +1 -0
- package/dist/components/FormTemplateReferenceField/FormTemplatePreviewDialog.js +45 -0
- package/dist/components/FormTemplateReferenceField/FormTemplatePreviewDialog.js.map +1 -0
- package/dist/components/FormTemplateReferenceField/FormTemplateReferenceField.d.ts +22 -0
- package/dist/components/FormTemplateReferenceField/FormTemplateReferenceField.d.ts.map +1 -0
- package/dist/components/FormTemplateReferenceField/FormTemplateReferenceField.js +139 -0
- package/dist/components/FormTemplateReferenceField/FormTemplateReferenceField.js.map +1 -0
- package/dist/components/Forum/ForumTable.d.ts +17 -5
- package/dist/components/Forum/ForumTable.d.ts.map +1 -1
- package/dist/components/Forum/ForumTable.js +94 -77
- package/dist/components/Forum/ForumTable.js.map +1 -1
- package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.d.ts.map +1 -1
- package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js +142 -108
- package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
- package/dist/components/SetBasicAccessRequirementFields/AccessorRequirements.d.ts.map +1 -1
- package/dist/components/SetBasicAccessRequirementFields/AccessorRequirements.js +15 -15
- package/dist/components/SetBasicAccessRequirementFields/AccessorRequirements.js.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js +57 -55
- package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +4 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts +5 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts.map +1 -1
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js +37 -26
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js.map +1 -1
- package/dist/mocks/msw/handlers/discussionHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/discussionHandlers.js +40 -33
- package/dist/mocks/msw/handlers/discussionHandlers.js.map +1 -1
- package/dist/synapse-client/SynapseClient.d.ts +10 -0
- package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
- package/dist/synapse-client/SynapseClient.js +486 -482
- package/dist/synapse-client/SynapseClient.js.map +1 -1
- package/dist/synapse-client/index.js +3 -3
- package/dist/synapse-queries/KeyFactory.d.ts +13 -1
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +11 -1
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/dataaccess/index.js +4 -4
- package/dist/synapse-queries/dataaccess/useAccessRequirements.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useAccessRequirements.js +4 -1
- package/dist/synapse-queries/dataaccess/useAccessRequirements.js.map +1 -1
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts +19 -5
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useEDuc.js +29 -21
- package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
- package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts +12 -0
- package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useFormTemplate.js +52 -30
- package/dist/synapse-queries/dataaccess/useFormTemplate.js.map +1 -1
- package/dist/synapse-queries/forum/useForum.d.ts +5 -1
- package/dist/synapse-queries/forum/useForum.d.ts.map +1 -1
- package/dist/synapse-queries/forum/useForum.js +23 -1
- package/dist/synapse-queries/forum/useForum.js.map +1 -1
- package/dist/synapse-queries/index.js +185 -184
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.d.ts +5 -3
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.d.ts.map +1 -1
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.js +12 -15
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
- package/dist/utils/functions/getEndpoint.d.ts +1 -0
- package/dist/utils/functions/getEndpoint.d.ts.map +1 -1
- package/dist/utils/functions/getEndpoint.js +3 -3
- package/dist/utils/functions/getEndpoint.js.map +1 -1
- package/dist/utils/types/RequestableAccessRequirement.d.ts +8 -0
- package/dist/utils/types/RequestableAccessRequirement.d.ts.map +1 -0
- package/dist/utils/types/RequestableAccessRequirement.js +9 -0
- package/dist/utils/types/RequestableAccessRequirement.js.map +1 -0
- package/package.json +2 -2
- package/dist/testutils/ReactQueryMockUtils.js +0 -676
- package/dist/testutils/ReactQueryMockUtils.js.map +0 -1
|
@@ -1,86 +1,89 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import n from "../
|
|
4
|
-
import r from "
|
|
5
|
-
import
|
|
1
|
+
import { useGetFeatureFlag as e } from "../../synapse-queries/featureflags/useGetFeatureFlag.js";
|
|
2
|
+
import t from "../ConfirmationDialog/index.js";
|
|
3
|
+
import { AccessRequirementAclEditor as n } from "../AccessRequirementAclEditor/AccessRequirementAclEditor.js";
|
|
4
|
+
import { FeatureFlagEnum as r } from "../../utils/featureflag/FeatureFlags.js";
|
|
5
|
+
import i from "../SetBasicAccessRequirementFields/index.js";
|
|
6
|
+
import a from "../SetManagedAccessRequirementFields/index.js";
|
|
7
|
+
import { SetAccessRequirementCommonFields as o } from "../SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js";
|
|
6
8
|
import "../SetAccessRequirementCommonFields/index.js";
|
|
7
|
-
import { getDialogTitle as
|
|
8
|
-
import { useMemo as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE as
|
|
9
|
+
import { getDialogTitle as s, isLastStep as c } from "./CreateOrUpdateAccessRequirementWizardUtils.js";
|
|
10
|
+
import { useMemo as l, useRef as u, useState as d } from "react";
|
|
11
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
12
|
+
import { JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE as p, MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE as m } from "@sage-bionetworks/synapse-types";
|
|
11
13
|
//#region src/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.tsx
|
|
12
|
-
function
|
|
13
|
-
let { open:
|
|
14
|
-
switch (
|
|
15
|
-
case "SET_AR_COMMON_FIELDS": return /* @__PURE__ */
|
|
16
|
-
ref:
|
|
14
|
+
function h(h) {
|
|
15
|
+
let { open: g, onCancel: _, onComplete: v } = h, y = e(r.ACT_DASHBOARD_FORM_TEMPLATES), [b, x] = d("SET_AR_COMMON_FIELDS"), [S, C] = d(!1), [w, T] = d(h.accessRequirementId), E = u(null), D = u(null), O = u(null), k = u(null), A = !!h.accessRequirementId, j = l(() => {
|
|
16
|
+
switch (b) {
|
|
17
|
+
case "SET_AR_COMMON_FIELDS": return /* @__PURE__ */ f(o, {
|
|
18
|
+
ref: E,
|
|
17
19
|
onSave: (e, t) => {
|
|
18
|
-
|
|
20
|
+
T(e), x(t === m || y && t === p ? "SET_MANAGED_AR_FIELDS" : "SET_BASIC_AR_FIELDS"), C(!1);
|
|
19
21
|
},
|
|
20
|
-
onError: () =>
|
|
21
|
-
subject:
|
|
22
|
-
accessRequirementId:
|
|
22
|
+
onError: () => C(!1),
|
|
23
|
+
subject: h.subject,
|
|
24
|
+
accessRequirementId: h.accessRequirementId
|
|
23
25
|
});
|
|
24
|
-
case "SET_MANAGED_AR_FIELDS": return /* @__PURE__ */
|
|
25
|
-
ref:
|
|
26
|
-
accessRequirementId:
|
|
26
|
+
case "SET_MANAGED_AR_FIELDS": return /* @__PURE__ */ f(a, {
|
|
27
|
+
ref: D,
|
|
28
|
+
accessRequirementId: w,
|
|
27
29
|
onSave: () => {
|
|
28
|
-
|
|
30
|
+
x("SET_MANAGED_AR_ACL_PERMISSIONS"), C(!1);
|
|
29
31
|
},
|
|
30
32
|
onError: () => {
|
|
31
|
-
|
|
33
|
+
C(!1);
|
|
32
34
|
}
|
|
33
35
|
});
|
|
34
|
-
case "SET_MANAGED_AR_ACL_PERMISSIONS": return /* @__PURE__ */
|
|
35
|
-
ref:
|
|
36
|
-
accessRequirementId:
|
|
36
|
+
case "SET_MANAGED_AR_ACL_PERMISSIONS": return /* @__PURE__ */ f(n, {
|
|
37
|
+
ref: O,
|
|
38
|
+
accessRequirementId: w,
|
|
37
39
|
onSaveComplete: (e) => {
|
|
38
|
-
e &&
|
|
40
|
+
e && v(w), C(!1);
|
|
39
41
|
}
|
|
40
42
|
});
|
|
41
|
-
case "SET_BASIC_AR_FIELDS": return /* @__PURE__ */
|
|
42
|
-
ref:
|
|
43
|
-
accessRequirementId:
|
|
43
|
+
case "SET_BASIC_AR_FIELDS": return /* @__PURE__ */ f(i, {
|
|
44
|
+
ref: k,
|
|
45
|
+
accessRequirementId: w,
|
|
44
46
|
onSave: () => {
|
|
45
|
-
|
|
47
|
+
v(w), C(!1);
|
|
46
48
|
},
|
|
47
|
-
onError: () =>
|
|
49
|
+
onError: () => C(!1)
|
|
48
50
|
});
|
|
49
51
|
}
|
|
50
52
|
}, [
|
|
51
|
-
g,
|
|
52
|
-
f.subject,
|
|
53
|
-
f.accessRequirementId,
|
|
54
53
|
b,
|
|
55
|
-
h
|
|
54
|
+
h.subject,
|
|
55
|
+
h.accessRequirementId,
|
|
56
|
+
w,
|
|
57
|
+
v,
|
|
58
|
+
y
|
|
56
59
|
]);
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
open:
|
|
59
|
-
onCancel:
|
|
60
|
+
return /* @__PURE__ */ f(t, {
|
|
61
|
+
open: g,
|
|
62
|
+
onCancel: _,
|
|
60
63
|
onConfirm: (e) => {
|
|
61
|
-
switch (e.preventDefault(),
|
|
64
|
+
switch (e.preventDefault(), C(!0), b) {
|
|
62
65
|
case "SET_AR_COMMON_FIELDS":
|
|
63
|
-
|
|
66
|
+
E?.current?.save();
|
|
64
67
|
return;
|
|
65
68
|
case "SET_MANAGED_AR_FIELDS":
|
|
66
|
-
|
|
69
|
+
D?.current?.save();
|
|
67
70
|
return;
|
|
68
71
|
case "SET_MANAGED_AR_ACL_PERMISSIONS":
|
|
69
|
-
|
|
72
|
+
O?.current?.save();
|
|
70
73
|
return;
|
|
71
|
-
case "SET_BASIC_AR_FIELDS":
|
|
74
|
+
case "SET_BASIC_AR_FIELDS": k?.current?.save();
|
|
72
75
|
}
|
|
73
76
|
},
|
|
74
77
|
confirmButtonProps: {
|
|
75
|
-
children:
|
|
76
|
-
disabled:
|
|
78
|
+
children: c(b) ? "Save" : "Save & Continue",
|
|
79
|
+
disabled: S
|
|
77
80
|
},
|
|
78
81
|
maxWidth: "md",
|
|
79
|
-
title:
|
|
80
|
-
content:
|
|
82
|
+
title: s(b, A),
|
|
83
|
+
content: j
|
|
81
84
|
});
|
|
82
85
|
}
|
|
83
86
|
//#endregion
|
|
84
|
-
export {
|
|
87
|
+
export { h as CreateOrUpdateAccessRequirementWizard, h as default };
|
|
85
88
|
|
|
86
89
|
//# sourceMappingURL=CreateOrUpdateAccessRequirementWizard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateOrUpdateAccessRequirementWizard.js","names":[],"sources":["../../../src/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"CreateOrUpdateAccessRequirementWizard.js","names":[],"sources":["../../../src/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.tsx"],"sourcesContent":["import { useGetFeatureFlag } from '@/synapse-queries/featureflags/useGetFeatureFlag'\nimport { FeatureFlagEnum } from '@/utils/featureflag/FeatureFlags'\nimport {\n JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n} from '@sage-bionetworks/synapse-types'\nimport { MouseEventHandler, useMemo, useRef, useState } from 'react'\nimport {\n AccessRequirementAclEditor,\n AccessRequirementAclEditorHandle,\n} from '../AccessRequirementAclEditor/AccessRequirementAclEditor'\nimport ConfirmationDialog from '../ConfirmationDialog'\nimport {\n SetAccessRequirementCommonFields,\n SetAccessRequirementCommonFieldsHandle,\n SetAccessRequirementCommonFieldsProps,\n} from '../SetAccessRequirementCommonFields'\nimport SetBasicAccessRequirementFields, {\n SetBasicAccessRequirementFieldsHandle,\n} from '../SetBasicAccessRequirementFields'\nimport SetManagedAccessRequirementFields, {\n SetManagedAccessRequirementFieldsHandle,\n} from '../SetManagedAccessRequirementFields'\nimport {\n CreateOrUpdateAccessRequirementWizardStep,\n getDialogTitle,\n isLastStep,\n} from './CreateOrUpdateAccessRequirementWizardUtils'\n\nexport type CreateOrUpdateAccessRequirementWizardProps = {\n open: boolean\n onCancel: () => void\n onComplete: (accessRequirementID?: string) => void // return the (possibly new) Access Requirement ID\n} & Pick<\n SetAccessRequirementCommonFieldsProps,\n 'subject' | 'accessRequirementId'\n>\n\nexport function CreateOrUpdateAccessRequirementWizard(\n props: CreateOrUpdateAccessRequirementWizardProps,\n) {\n const { open, onCancel, onComplete } = props\n const isSchemaDrivenEnabled = useGetFeatureFlag(\n FeatureFlagEnum.ACT_DASHBOARD_FORM_TEMPLATES,\n )\n\n const [step, setStep] = useState<CreateOrUpdateAccessRequirementWizardStep>(\n 'SET_AR_COMMON_FIELDS',\n )\n const [isLoading, setIsLoading] = useState<boolean>(false)\n const [accessRequirementId, setAccessRequirementId] = useState<\n string | undefined\n >(props.accessRequirementId)\n\n const setArCommonFieldsRef =\n useRef<SetAccessRequirementCommonFieldsHandle>(null)\n const setManagedArFieldsRef =\n useRef<SetManagedAccessRequirementFieldsHandle>(null)\n const editArAclRef = useRef<AccessRequirementAclEditorHandle>(null)\n const setBasicArFieldsRef =\n useRef<SetBasicAccessRequirementFieldsHandle>(null)\n\n const isEditing = Boolean(props['accessRequirementId'])\n\n const stepContent = useMemo(() => {\n switch (step) {\n case 'SET_AR_COMMON_FIELDS':\n return (\n <SetAccessRequirementCommonFields\n ref={setArCommonFieldsRef}\n onSave={(accessRequirementId, accessRequirementConcreteType) => {\n setAccessRequirementId(accessRequirementId)\n const isReviewedInSynapse =\n accessRequirementConcreteType ===\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE ||\n (isSchemaDrivenEnabled &&\n accessRequirementConcreteType ===\n JSON_SCHEMA_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE)\n const nextStep: CreateOrUpdateAccessRequirementWizardStep =\n isReviewedInSynapse\n ? 'SET_MANAGED_AR_FIELDS'\n : 'SET_BASIC_AR_FIELDS'\n setStep(nextStep)\n setIsLoading(false)\n }}\n onError={() => setIsLoading(false)}\n subject={props.subject}\n accessRequirementId={props.accessRequirementId}\n />\n )\n case 'SET_MANAGED_AR_FIELDS':\n return (\n <SetManagedAccessRequirementFields\n ref={setManagedArFieldsRef}\n accessRequirementId={accessRequirementId!}\n onSave={() => {\n setStep('SET_MANAGED_AR_ACL_PERMISSIONS')\n setIsLoading(false)\n }}\n onError={() => {\n setIsLoading(false)\n }}\n />\n )\n case 'SET_MANAGED_AR_ACL_PERMISSIONS':\n return (\n <AccessRequirementAclEditor\n ref={editArAclRef}\n accessRequirementId={accessRequirementId!}\n onSaveComplete={saveSuccessful => {\n if (saveSuccessful) {\n onComplete(accessRequirementId)\n }\n setIsLoading(false)\n }}\n />\n )\n case 'SET_BASIC_AR_FIELDS':\n return (\n <SetBasicAccessRequirementFields\n ref={setBasicArFieldsRef}\n accessRequirementId={accessRequirementId!}\n onSave={() => {\n onComplete(accessRequirementId)\n setIsLoading(false)\n }}\n onError={() => setIsLoading(false)}\n />\n )\n }\n }, [\n step,\n props.subject,\n props.accessRequirementId,\n accessRequirementId,\n onComplete,\n isSchemaDrivenEnabled,\n ])\n\n const onClickPrimary: MouseEventHandler<HTMLButtonElement> = e => {\n // SWC-7055 - The default action may trigger `beforeunload` and erroneously warn the user about leaving the page.\n e.preventDefault()\n setIsLoading(true)\n switch (step) {\n case 'SET_AR_COMMON_FIELDS':\n setArCommonFieldsRef?.current?.save()\n return\n case 'SET_MANAGED_AR_FIELDS':\n setManagedArFieldsRef?.current?.save()\n return\n case 'SET_MANAGED_AR_ACL_PERMISSIONS':\n editArAclRef?.current?.save()\n return\n case 'SET_BASIC_AR_FIELDS':\n setBasicArFieldsRef?.current?.save()\n }\n }\n\n return (\n <ConfirmationDialog\n open={open}\n onCancel={onCancel}\n onConfirm={onClickPrimary}\n confirmButtonProps={{\n children: isLastStep(step) ? 'Save' : 'Save & Continue',\n disabled: isLoading,\n }}\n maxWidth={'md'}\n title={getDialogTitle(step, isEditing)}\n content={stepContent}\n />\n )\n}\n\nexport default CreateOrUpdateAccessRequirementWizard\n"],"mappings":";;;;;;;;;;;;;AAsCA,SAAgB,EACd,GACA;CACA,IAAM,EAAE,SAAM,aAAU,kBAAe,GACjC,IAAwB,EAC5B,EAAgB,4BAClB,GAEM,CAAC,GAAM,KAAW,EACtB,sBACF,GACM,CAAC,GAAW,KAAgB,EAAkB,EAAK,GACnD,CAAC,GAAqB,KAA0B,EAEpD,EAAM,mBAAmB,GAErB,IACJ,EAA+C,IAAI,GAC/C,IACJ,EAAgD,IAAI,GAChD,IAAe,EAAyC,IAAI,GAC5D,IACJ,EAA8C,IAAI,GAE9C,IAAY,EAAQ,EAAM,qBAE1B,IAAc,QAAc;EAChC,QAAQ,GAAR;GACE,KAAK,wBACH,OACE,kBAAC,GAAD;IACE,KAAK;IACL,SAAS,GAAqB,MAAkC;KAa9D,AAZA,EAAuB,CAAmB,GAW1C,EATE,MACE,KACD,KACC,MACE,IAGA,0BACA,qBACU,GAChB,EAAa,EAAK;IACpB;IACA,eAAe,EAAa,EAAK;IACjC,SAAS,EAAM;IACf,qBAAqB,EAAM;GAC5B,CAAA;GAEL,KAAK,yBACH,OACE,kBAAC,GAAD;IACE,KAAK;IACgB;IACrB,cAAc;KAEZ,AADA,EAAQ,gCAAgC,GACxC,EAAa,EAAK;IACpB;IACA,eAAe;KACb,EAAa,EAAK;IACpB;GACD,CAAA;GAEL,KAAK,kCACH,OACE,kBAAC,GAAD;IACE,KAAK;IACgB;IACrB,iBAAgB,MAAkB;KAIhC,AAHI,KACF,EAAW,CAAmB,GAEhC,EAAa,EAAK;IACpB;GACD,CAAA;GAEL,KAAK,uBACH,OACE,kBAAC,GAAD;IACE,KAAK;IACgB;IACrB,cAAc;KAEZ,AADA,EAAW,CAAmB,GAC9B,EAAa,EAAK;IACpB;IACA,eAAe,EAAa,EAAK;GAClC,CAAA;EAEP;CACF,GAAG;EACD;EACA,EAAM;EACN,EAAM;EACN;EACA;EACA;CACF,CAAC;CAqBD,OACE,kBAAC,GAAD;EACQ;EACI;EACV,YAvByD,MAAK;GAIhE,QAFA,EAAE,eAAe,GACjB,EAAa,EAAI,GACT,GAAR;IACE,KAAK;KACH,GAAsB,SAAS,KAAK;KACpC;IACF,KAAK;KACH,GAAuB,SAAS,KAAK;KACrC;IACF,KAAK;KACH,GAAc,SAAS,KAAK;KAC5B;IACF,KAAK,uBACH,GAAqB,SAAS,KAAK;GACvC;EACF;EAOI,oBAAoB;GAClB,UAAU,EAAW,CAAI,IAAI,SAAS;GACtC,UAAU;EACZ;EACA,UAAU;EACV,OAAO,EAAe,GAAM,CAAS;EACrC,SAAS;CACV,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSaveFormTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/FormTemplateEditor/useSaveFormTemplate.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"useSaveFormTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/FormTemplateEditor/useSaveFormTemplate.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAA;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,OAAO,EAEL,kBAAkB,EAEnB,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,wBAAwB,EAAuB,MAAM,SAAS,CAAA;AAMvE,OAAO,EACL,gCAAgC,EAEjC,MAAM,0BAA0B,CAAA;AAEjC,MAAM,MAAM,2BAA2B,GAAG;IACxC,eAAe,CAAC,EAAE,YAAY,CAAA;IAC9B,iBAAiB,CAAC,EAAE,UAAU,CAAA;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,wBAAwB,EAAE,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,2BAA2B,GACnC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,YAAY,CAAA;CAAE,GACpC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,gBAAgB,EAAE,gCAAgC,EAAE,CAAA;CAAE,CAAA;AAEvE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,CAAC,EAAE,IAAI,CACZ,kBAAkB,CAChB,2BAA2B,EAC3B,kBAAkB,EAClB,2BAA2B,CAC5B,EACD,YAAY,CACb,4IA2EF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSaveFormTemplate.js","names":[],"sources":["../../../src/components/FormTemplateEditor/useSaveFormTemplate.ts"],"sourcesContent":["/*\n * Network orchestration for saving a FormTemplate draft: pre-flight client-side validation\n * (mirroring the server's per-field rules, since the server only returns a flat message),\n * registering a new JSON Schema version when the schema body changed, and creating or updating\n * the FormTemplate against that schema version.\n */\nimport { getJsonSchemaVersionsQuery } from '@/synapse-queries/jsonschema/useListJsonSchemaVersions'\nimport { useCreateJsonSchema } from '@/synapse-queries/jsonschema/useCreateJsonSchema'\nimport {\n useCreateFormTemplate,\n useUpdateFormTemplate,\n} from '@/synapse-queries/dataaccess/useFormTemplate'\nimport { FormTemplate
|
|
1
|
+
{"version":3,"file":"useSaveFormTemplate.js","names":[],"sources":["../../../src/components/FormTemplateEditor/useSaveFormTemplate.ts"],"sourcesContent":["/*\n * Network orchestration for saving a FormTemplate draft: pre-flight client-side validation\n * (mirroring the server's per-field rules, since the server only returns a flat message),\n * registering a new JSON Schema version when the schema body changed, and creating or updating\n * the FormTemplate against that schema version.\n */\nimport { getJsonSchemaVersionsQuery } from '@/synapse-queries/jsonschema/useListJsonSchemaVersions'\nimport { useCreateJsonSchema } from '@/synapse-queries/jsonschema/useCreateJsonSchema'\nimport {\n useCreateFormTemplate,\n useUpdateFormTemplate,\n} from '@/synapse-queries/dataaccess/useFormTemplate'\nimport { FormTemplate } from '@sage-bionetworks/synapse-client'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport { RJSFSchema } from '@rjsf/utils'\nimport isEqual from 'lodash-es/isEqual'\nimport {\n useMutation,\n UseMutationOptions,\n useQueryClient,\n} from '@tanstack/react-query'\nimport { useSynapseContext } from '@/utils/context/SynapseContext'\nimport { EditableFormTemplateStep, toFormTemplateSteps } from './utils'\nimport {\n formatSchema$id,\n getNextSchemaVersion,\n resolveFormTemplateSchemaName,\n} from './formTemplateSchema'\nimport {\n FormTemplateFieldValidationError,\n validateFormTemplateFields,\n} from './formTemplateValidation'\n\nexport type SaveFormTemplateDraftParams = {\n initialTemplate?: FormTemplate\n initialJsonSchema?: RJSFSchema\n name: string\n jsonSchema: RJSFSchema\n steps: EditableFormTemplateStep[]\n}\n\nexport type SaveFormTemplateDraftResult =\n | { ok: true; template: FormTemplate }\n | { ok: false; validationErrors: FormTemplateFieldValidationError[] }\n\n/**\n * Owns the create-schema, create-template, and update-template mutations, and sequences them\n * into a single save mutation. A validation failure resolves as `{ ok: false, validationErrors }`\n * rather than rejecting; a network failure (including a 412 conflict from a concurrent edit)\n * rejects normally, surfaced via the returned mutation's `error`.\n */\nexport function useSaveFormTemplate(\n options?: Omit<\n UseMutationOptions<\n SaveFormTemplateDraftResult,\n SynapseClientError,\n SaveFormTemplateDraftParams\n >,\n 'mutationFn'\n >,\n) {\n const queryClient = useQueryClient()\n const { synapseClient, keyFactory } = useSynapseContext()\n const createSchema = useCreateJsonSchema()\n const createTemplate = useCreateFormTemplate()\n const updateTemplate = useUpdateFormTemplate()\n\n return useMutation<\n SaveFormTemplateDraftResult,\n SynapseClientError,\n SaveFormTemplateDraftParams\n >({\n ...options,\n mutationFn: async params => {\n const formTemplateSteps = toFormTemplateSteps(params.steps)\n\n const validationErrors = validateFormTemplateFields(\n formTemplateSteps,\n params.jsonSchema,\n )\n if (validationErrors.length > 0) {\n return { ok: false, validationErrors }\n }\n\n // The schema registry has no update operation — every save that changed the schema body\n // registers a fresh, immutable version. Re-registering an unchanged body would still create\n // an unnecessary version, so skip it when the draft's schema matches what was last resolved.\n let schema$id = params.initialTemplate?.schema$id ?? ''\n const schemaChanged = !isEqual(\n params.jsonSchema,\n params.initialJsonSchema,\n )\n if (schemaChanged || !schema$id) {\n const templateSchemaName = resolveFormTemplateSchemaName(\n params.name,\n params.initialTemplate?.schema$id,\n )\n // Registered versions are immutable, so the list is read fresh on every save to pick a\n // version that does not exist yet.\n const registeredVersions = await queryClient.fetchQuery({\n ...getJsonSchemaVersionsQuery(\n templateSchemaName.organizationName,\n templateSchemaName.schemaName,\n { synapseClient, keyFactory },\n ),\n staleTime: 0,\n })\n const response = await createSchema.mutateAsync({\n ...params.jsonSchema,\n $id: formatSchema$id(\n templateSchemaName,\n getNextSchemaVersion(registeredVersions),\n ),\n })\n schema$id = response.newVersionInfo!.$id!\n }\n\n const formTemplate: FormTemplate = {\n ...params.initialTemplate,\n name: params.name,\n schema$id,\n steps: formTemplateSteps,\n }\n\n const template = params.initialTemplate?.id\n ? await updateTemplate.mutateAsync({\n templateId: params.initialTemplate.id,\n formTemplate,\n })\n : await createTemplate.mutateAsync(formTemplate)\n\n return { ok: true, template }\n },\n })\n}\n"],"mappings":";;;;;;;;;;AAmDA,SAAgB,EACd,GAQA;CACA,IAAM,IAAc,EAAe,GAC7B,EAAE,kBAAe,kBAAe,EAAkB,GAClD,IAAe,EAAoB,GACnC,IAAiB,EAAsB,GACvC,IAAiB,EAAsB;CAE7C,OAAO,EAIL;EACA,GAAG;EACH,YAAY,OAAM,MAAU;GAC1B,IAAM,IAAoB,EAAoB,EAAO,KAAK,GAEpD,IAAmB,EACvB,GACA,EAAO,UACT;GACA,IAAI,EAAiB,SAAS,GAC5B,OAAO;IAAE,IAAI;IAAO;GAAiB;GAMvC,IAAI,IAAY,EAAO,iBAAiB,aAAa;GAKrD,IAAI,CAJmB,EACrB,EAAO,YACP,EAAO,iBACT,KACqB,CAAC,GAAW;IAC/B,IAAM,IAAqB,EACzB,EAAO,MACP,EAAO,iBAAiB,SAC1B,GAGM,IAAqB,MAAM,EAAY,WAAW;KACtD,GAAG,EACD,EAAmB,kBACnB,EAAmB,YACnB;MAAE;MAAe;KAAW,CAC9B;KACA,WAAW;IACb,CAAC;IAQD,KAAY,MAPW,EAAa,YAAY;KAC9C,GAAG,EAAO;KACV,KAAK,EACH,GACA,EAAqB,CAAkB,CACzC;IACF,CAAC,GACoB,eAAgB;GACvC;GAEA,IAAM,IAA6B;IACjC,GAAG,EAAO;IACV,MAAM,EAAO;IACb;IACA,OAAO;GACT;GASA,OAAO;IAAE,IAAI;IAAM,UAPF,EAAO,iBAAiB,KACrC,MAAM,EAAe,YAAY;KAC/B,YAAY,EAAO,gBAAgB;KACnC;IACF,CAAC,IACD,MAAM,EAAe,YAAY,CAAY;GAErB;EAC9B;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FormTemplate } from '@sage-bionetworks/synapse-client';
|
|
2
|
+
export type FormTemplatePreviewDialogProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
template: FormTemplate;
|
|
6
|
+
};
|
|
7
|
+
/** Previews the form that a FormTemplate version presents to a requester. */
|
|
8
|
+
export declare function FormTemplatePreviewDialog(props: FormTemplatePreviewDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=FormTemplatePreviewDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormTemplatePreviewDialog.d.ts","sourceRoot":"","sources":["../../../src/components/FormTemplateReferenceField/FormTemplatePreviewDialog.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAE/D,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,YAAY,CAAA;CACvB,CAAA;AAED,6EAA6E;AAC7E,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,8BAA8B,2CA8BtC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useGetRegisteredSchema as e } from "../../synapse-queries/jsonschema/useSchema.js";
|
|
2
|
+
import { FormTemplatePreview as t } from "../FormTemplateEditor/FormTemplatePreview.js";
|
|
3
|
+
import { Alert as n, Button as r, Dialog as i, DialogActions as a, DialogContent as o, DialogTitle as s, Skeleton as c } from "@mui/material";
|
|
4
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/FormTemplateReferenceField/FormTemplatePreviewDialog.tsx
|
|
6
|
+
function d(d) {
|
|
7
|
+
let { open: f, onClose: p, template: m } = d, { data: h, isLoading: g, error: _ } = e(m.schema$id, { enabled: f });
|
|
8
|
+
return /* @__PURE__ */ u(i, {
|
|
9
|
+
open: f,
|
|
10
|
+
onClose: p,
|
|
11
|
+
maxWidth: "md",
|
|
12
|
+
fullWidth: !0,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ u(s, { children: [
|
|
15
|
+
"Preview: ",
|
|
16
|
+
m.name,
|
|
17
|
+
" (version ",
|
|
18
|
+
m.versionNumber,
|
|
19
|
+
")"
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ u(o, { children: [
|
|
22
|
+
g && /* @__PURE__ */ l(c, {
|
|
23
|
+
variant: "rounded",
|
|
24
|
+
height: 200
|
|
25
|
+
}),
|
|
26
|
+
_ && /* @__PURE__ */ l(n, {
|
|
27
|
+
severity: "error",
|
|
28
|
+
children: _.reason
|
|
29
|
+
}),
|
|
30
|
+
h && /* @__PURE__ */ l(t, {
|
|
31
|
+
template: m,
|
|
32
|
+
jsonSchema: h
|
|
33
|
+
})
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ l(a, { children: /* @__PURE__ */ l(r, {
|
|
36
|
+
onClick: p,
|
|
37
|
+
children: "Close"
|
|
38
|
+
}) })
|
|
39
|
+
]
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { d as FormTemplatePreviewDialog };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=FormTemplatePreviewDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormTemplatePreviewDialog.js","names":[],"sources":["../../../src/components/FormTemplateReferenceField/FormTemplatePreviewDialog.tsx"],"sourcesContent":["import { FormTemplatePreview } from '@/components/FormTemplateEditor/FormTemplatePreview'\nimport { useGetRegisteredSchema } from '@/synapse-queries/jsonschema/useSchema'\nimport {\n Alert,\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Skeleton,\n} from '@mui/material'\nimport { RJSFSchema } from '@rjsf/utils'\nimport { FormTemplate } from '@sage-bionetworks/synapse-client'\n\nexport type FormTemplatePreviewDialogProps = {\n open: boolean\n onClose: () => void\n template: FormTemplate\n}\n\n/** Previews the form that a FormTemplate version presents to a requester. */\nexport function FormTemplatePreviewDialog(\n props: FormTemplatePreviewDialogProps,\n) {\n const { open, onClose, template } = props\n\n const {\n data: schema,\n isLoading,\n error,\n } = useGetRegisteredSchema(template.schema$id, { enabled: open })\n\n return (\n <Dialog open={open} onClose={onClose} maxWidth=\"md\" fullWidth>\n <DialogTitle>\n Preview: {template.name} (version {template.versionNumber})\n </DialogTitle>\n <DialogContent>\n {isLoading && <Skeleton variant=\"rounded\" height={200} />}\n {error && <Alert severity=\"error\">{error.reason}</Alert>}\n {schema && (\n <FormTemplatePreview\n template={template}\n jsonSchema={schema as RJSFSchema}\n />\n )}\n </DialogContent>\n <DialogActions>\n <Button onClick={onClose}>Close</Button>\n </DialogActions>\n </Dialog>\n )\n}\n"],"mappings":";;;;;AAqBA,SAAgB,EACd,GACA;CACA,IAAM,EAAE,SAAM,YAAS,gBAAa,GAE9B,EACJ,MAAM,GACN,cACA,aACE,EAAuB,EAAS,WAAW,EAAE,SAAS,EAAK,CAAC;CAEhE,OACE,kBAAC,GAAD;EAAc;EAAe;EAAS,UAAS;EAAK,WAAA;YAApD;GACE,kBAAC,GAAD,EAAA,UAAA;IAAa;IACD,EAAS;IAAK;IAAW,EAAS;IAAc;GAC/C,EAAA,CAAA;GACb,kBAAC,GAAD,EAAA,UAAA;IACG,KAAa,kBAAC,GAAD;KAAU,SAAQ;KAAU,QAAQ;IAAM,CAAA;IACvD,KAAS,kBAAC,GAAD;KAAO,UAAS;eAAS,EAAM;IAAc,CAAA;IACtD,KACC,kBAAC,GAAD;KACY;KACV,YAAY;IACb,CAAA;GAEU,EAAA,CAAA;GACf,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;IAAQ,SAAS;cAAS;GAAa,CAAA,EAC1B,CAAA;EACT;;AAEZ"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FormTemplate, FormTemplateReference } from '@sage-bionetworks/synapse-client';
|
|
2
|
+
import { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError';
|
|
3
|
+
export declare const SELECT_FORM_TEMPLATE_ERROR = "Select a form template and version for this Access Requirement.";
|
|
4
|
+
/**
|
|
5
|
+
* Why a reference cannot be saved on an Access Requirement, or undefined if it can. These mirror
|
|
6
|
+
* the checks the server makes when an Access Requirement is created or updated.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getFormTemplateReferenceError(reference: FormTemplateReference | undefined, loadedVersion: {
|
|
9
|
+
template?: FormTemplate;
|
|
10
|
+
error?: SynapseClientError;
|
|
11
|
+
}): string | undefined;
|
|
12
|
+
export declare function useFormTemplateReferenceError(reference: FormTemplateReference | undefined): string | undefined;
|
|
13
|
+
export type FormTemplateReferenceFieldProps = {
|
|
14
|
+
value: FormTemplateReference | undefined;
|
|
15
|
+
onChange: (value: FormTemplateReference) => void;
|
|
16
|
+
error?: string | null;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Select the version of a FormTemplate that an Access Requirement presents to requesters.
|
|
20
|
+
*/
|
|
21
|
+
export declare function FormTemplateReferenceField(props: FormTemplateReferenceFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=FormTemplateReferenceField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormTemplateReferenceField.d.ts","sourceRoot":"","sources":["../../../src/components/FormTemplateReferenceField/FormTemplateReferenceField.tsx"],"names":[],"mappings":"AAqBA,OAAO,EACL,YAAY,EACZ,qBAAqB,EACtB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAA;AAI7F,eAAO,MAAM,0BAA0B,oEAC4B,CAAA;AAEnE;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,qBAAqB,GAAG,SAAS,EAC5C,aAAa,EAAE;IAAE,QAAQ,CAAC,EAAE,YAAY,CAAC;IAAC,KAAK,CAAC,EAAE,kBAAkB,CAAA;CAAE,GACrE,MAAM,GAAG,SAAS,CAYpB;AAED,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,qBAAqB,GAAG,SAAS,GAC3C,MAAM,GAAG,SAAS,CASpB;AAYD,MAAM,MAAM,+BAA+B,GAAG;IAC5C,KAAK,EAAE,qBAAqB,GAAG,SAAS,CAAA;IAExC,QAAQ,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAA;IAEhD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB,CAAA;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,+BAA+B,2CAqKvC"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { useGetFormTemplateVersion as e, useGetFormTemplateVersions as t, useSearchFormTemplatesInfinite as n } from "../../synapse-queries/dataaccess/useFormTemplate.js";
|
|
2
|
+
import { StyledFormControl as r } from "../styled/StyledFormControl.js";
|
|
3
|
+
import "../dataaccess/FormTemplateTable.js";
|
|
4
|
+
import { FormTemplatePreviewDialog as i } from "./FormTemplatePreviewDialog.js";
|
|
5
|
+
import { useId as a, useMemo as o, useState as s } from "react";
|
|
6
|
+
import { Alert as c, Autocomplete as l, Box as u, Button as d, FormHelperText as f, InputLabel as p, MenuItem as m, Select as h, Stack as g, TextField as _, Typography as v } from "@mui/material";
|
|
7
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
8
|
+
import { keepPreviousData as x } from "@tanstack/react-query";
|
|
9
|
+
import { useDebouncedState as S } from "@react-hookz/web";
|
|
10
|
+
//#region src/components/FormTemplateReferenceField/FormTemplateReferenceField.tsx
|
|
11
|
+
var C = "Select a form template and version for this Access Requirement.";
|
|
12
|
+
function w(e, t) {
|
|
13
|
+
if (!e) return C;
|
|
14
|
+
let n = `Version ${e.templateVersionNumber} of the form template with the id '${e.templateId}'`;
|
|
15
|
+
if (t.error) return `${n} could not be loaded: ${t.error.reason}`;
|
|
16
|
+
if (t.template?.deprecated) return `${n} is deprecated, so it cannot be referenced by an Access Requirement.`;
|
|
17
|
+
}
|
|
18
|
+
function T(t) {
|
|
19
|
+
let { data: n, error: r } = e(t?.templateId, t?.templateVersionNumber);
|
|
20
|
+
return w(t, {
|
|
21
|
+
template: n,
|
|
22
|
+
error: r ?? void 0
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function E(e, t) {
|
|
26
|
+
let n = [e.versionNumber === t ? "latest" : void 0, e.deprecated ? "deprecated" : void 0].filter(Boolean);
|
|
27
|
+
return n.length > 0 ? `Version ${e.versionNumber} (${n.join(", ")})` : `Version ${e.versionNumber}`;
|
|
28
|
+
}
|
|
29
|
+
function D(C) {
|
|
30
|
+
let { value: w, onChange: T, error: D } = C, O = a(), [k, A] = S("", 500), [j, M] = s(!1), { data: N, isLoading: P } = n(o(() => ({
|
|
31
|
+
name: k || void 0,
|
|
32
|
+
includeDeprecated: !1
|
|
33
|
+
}), [k]), { placeholderData: x }), { data: F } = e(w?.templateId, w?.templateVersionNumber), { versions: I, latestVersion: L } = t(w?.templateId), R = o(() => {
|
|
34
|
+
let e = N?.pages.flatMap((e) => e.results ?? []) ?? [];
|
|
35
|
+
return F && !e.some((e) => e.id === F.id) ? [F, ...e] : e;
|
|
36
|
+
}, [N, F]), z = L?.versionNumber ?? 0, B = w != null && L != null && !L.deprecated && z > w.templateVersionNumber;
|
|
37
|
+
return /* @__PURE__ */ b(g, {
|
|
38
|
+
sx: { gap: 2 },
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ y(l, {
|
|
41
|
+
id: "formTemplate",
|
|
42
|
+
options: R,
|
|
43
|
+
loading: P,
|
|
44
|
+
value: F ?? null,
|
|
45
|
+
filterOptions: (e) => e,
|
|
46
|
+
onInputChange: (e, t, n) => {
|
|
47
|
+
n === "input" && A(t);
|
|
48
|
+
},
|
|
49
|
+
onChange: (e, t) => {
|
|
50
|
+
t?.id != null && t.versionNumber != null && t.id !== w?.templateId && T({
|
|
51
|
+
templateId: t.id,
|
|
52
|
+
templateVersionNumber: t.versionNumber
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
getOptionLabel: (e) => e.name,
|
|
56
|
+
isOptionEqualToValue: (e, t) => e.id === t.id,
|
|
57
|
+
renderInput: (e) => /* @__PURE__ */ y(_, {
|
|
58
|
+
...e,
|
|
59
|
+
label: "Form template",
|
|
60
|
+
error: !!D,
|
|
61
|
+
helperText: "Search for the form template that requesters complete to request access."
|
|
62
|
+
})
|
|
63
|
+
}),
|
|
64
|
+
w && /* @__PURE__ */ b(r, {
|
|
65
|
+
error: !!D,
|
|
66
|
+
children: [/* @__PURE__ */ y(p, {
|
|
67
|
+
id: O,
|
|
68
|
+
children: "Template version"
|
|
69
|
+
}), /* @__PURE__ */ b(h, {
|
|
70
|
+
labelId: O,
|
|
71
|
+
value: w.templateVersionNumber,
|
|
72
|
+
onChange: (e) => T({
|
|
73
|
+
templateId: w.templateId,
|
|
74
|
+
templateVersionNumber: Number(e.target.value)
|
|
75
|
+
}),
|
|
76
|
+
children: [I.map((e) => /* @__PURE__ */ y(m, {
|
|
77
|
+
value: e.versionNumber,
|
|
78
|
+
disabled: e.deprecated,
|
|
79
|
+
children: E(e, z)
|
|
80
|
+
}, e.versionNumber)), I.every((e) => e.versionNumber !== w.templateVersionNumber) && /* @__PURE__ */ b(m, {
|
|
81
|
+
value: w.templateVersionNumber,
|
|
82
|
+
disabled: !0,
|
|
83
|
+
children: ["Version ", w.templateVersionNumber]
|
|
84
|
+
})]
|
|
85
|
+
})]
|
|
86
|
+
}),
|
|
87
|
+
F?.deprecated && /* @__PURE__ */ b(c, {
|
|
88
|
+
severity: "warning",
|
|
89
|
+
children: [
|
|
90
|
+
"Version ",
|
|
91
|
+
F.versionNumber,
|
|
92
|
+
" of this form template is deprecated. Select another version before saving."
|
|
93
|
+
]
|
|
94
|
+
}),
|
|
95
|
+
B && /* @__PURE__ */ b(c, {
|
|
96
|
+
severity: "info",
|
|
97
|
+
action: /* @__PURE__ */ b(d, {
|
|
98
|
+
color: "inherit",
|
|
99
|
+
size: "small",
|
|
100
|
+
onClick: () => T({
|
|
101
|
+
templateId: w.templateId,
|
|
102
|
+
templateVersionNumber: z
|
|
103
|
+
}),
|
|
104
|
+
children: ["Update to version ", z]
|
|
105
|
+
}),
|
|
106
|
+
children: [
|
|
107
|
+
"A newer version of this form template is available. This Access Requirement stays on version ",
|
|
108
|
+
w.templateVersionNumber,
|
|
109
|
+
" until you update it."
|
|
110
|
+
]
|
|
111
|
+
}),
|
|
112
|
+
F && /* @__PURE__ */ b(u, { children: [
|
|
113
|
+
/* @__PURE__ */ b(v, {
|
|
114
|
+
variant: "body1",
|
|
115
|
+
children: ["Pinned schema: ", /* @__PURE__ */ y("code", { children: F.schema$id })]
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ y(d, {
|
|
118
|
+
variant: "outlined",
|
|
119
|
+
sx: { mt: 1 },
|
|
120
|
+
onClick: () => M(!0),
|
|
121
|
+
children: "Preview form"
|
|
122
|
+
}),
|
|
123
|
+
/* @__PURE__ */ y(i, {
|
|
124
|
+
open: j,
|
|
125
|
+
onClose: () => M(!1),
|
|
126
|
+
template: F
|
|
127
|
+
})
|
|
128
|
+
] }),
|
|
129
|
+
D && /* @__PURE__ */ y(f, {
|
|
130
|
+
error: !0,
|
|
131
|
+
children: D
|
|
132
|
+
})
|
|
133
|
+
]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
export { D as FormTemplateReferenceField, C as SELECT_FORM_TEMPLATE_ERROR, w as getFormTemplateReferenceError, T as useFormTemplateReferenceError };
|
|
138
|
+
|
|
139
|
+
//# sourceMappingURL=FormTemplateReferenceField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormTemplateReferenceField.js","names":[],"sources":["../../../src/components/FormTemplateReferenceField/FormTemplateReferenceField.tsx"],"sourcesContent":["import { NAME_SEARCH_DEBOUNCE_DELAY_MS } from '@/components/dataaccess/FormTemplateTable'\nimport { StyledFormControl } from '@/components/styled/StyledFormControl'\nimport {\n useGetFormTemplateVersion,\n useGetFormTemplateVersions,\n useSearchFormTemplatesInfinite,\n} from '@/synapse-queries/dataaccess/useFormTemplate'\nimport {\n Alert,\n Autocomplete,\n Box,\n Button,\n FormHelperText,\n InputLabel,\n MenuItem,\n Select,\n Stack,\n TextField,\n Typography,\n} from '@mui/material'\nimport { useDebouncedState } from '@react-hookz/web'\nimport {\n FormTemplate,\n FormTemplateReference,\n} from '@sage-bionetworks/synapse-client'\nimport { keepPreviousData } from '@tanstack/react-query'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport { useId, useMemo, useState } from 'react'\nimport { FormTemplatePreviewDialog } from './FormTemplatePreviewDialog'\n\nexport const SELECT_FORM_TEMPLATE_ERROR =\n 'Select a form template and version for this Access Requirement.'\n\n/**\n * Why a reference cannot be saved on an Access Requirement, or undefined if it can. These mirror\n * the checks the server makes when an Access Requirement is created or updated.\n */\nexport function getFormTemplateReferenceError(\n reference: FormTemplateReference | undefined,\n loadedVersion: { template?: FormTemplate; error?: SynapseClientError },\n): string | undefined {\n if (!reference) {\n return SELECT_FORM_TEMPLATE_ERROR\n }\n const description = `Version ${reference.templateVersionNumber} of the form template with the id '${reference.templateId}'`\n if (loadedVersion.error) {\n return `${description} could not be loaded: ${loadedVersion.error.reason}`\n }\n if (loadedVersion.template?.deprecated) {\n return `${description} is deprecated, so it cannot be referenced by an Access Requirement.`\n }\n return undefined\n}\n\nexport function useFormTemplateReferenceError(\n reference: FormTemplateReference | undefined,\n): string | undefined {\n const { data: template, error } = useGetFormTemplateVersion(\n reference?.templateId,\n reference?.templateVersionNumber,\n )\n return getFormTemplateReferenceError(reference, {\n template,\n error: error ?? undefined,\n })\n}\n\nfunction describeVersion(version: FormTemplate, latestVersionNumber: number) {\n const labels = [\n version.versionNumber === latestVersionNumber ? 'latest' : undefined,\n version.deprecated ? 'deprecated' : undefined,\n ].filter(Boolean)\n return labels.length > 0\n ? `Version ${version.versionNumber} (${labels.join(', ')})`\n : `Version ${version.versionNumber}`\n}\n\nexport type FormTemplateReferenceFieldProps = {\n value: FormTemplateReference | undefined\n /* The template version is never changed except through this callback; a newer version is never adopted automatically. */\n onChange: (value: FormTemplateReference) => void\n /* A reason the current value is not valid, shown below the field */\n error?: string | null\n}\n\n/**\n * Select the version of a FormTemplate that an Access Requirement presents to requesters.\n */\nexport function FormTemplateReferenceField(\n props: FormTemplateReferenceFieldProps,\n) {\n const { value, onChange, error } = props\n const versionLabelId = useId()\n\n const [searchText, setSearchText] = useDebouncedState<string>(\n '',\n NAME_SEARCH_DEBOUNCE_DELAY_MS,\n )\n const [isPreviewOpen, setIsPreviewOpen] = useState(false)\n\n const searchRequest = useMemo(\n () => ({ name: searchText || undefined, includeDeprecated: false }),\n [searchText],\n )\n const { data: searchData, isLoading: isSearching } =\n useSearchFormTemplatesInfinite(searchRequest, {\n placeholderData: keepPreviousData,\n })\n\n const { data: selectedVersion } = useGetFormTemplateVersion(\n value?.templateId,\n value?.templateVersionNumber,\n )\n const { versions, latestVersion } = useGetFormTemplateVersions(\n value?.templateId,\n )\n\n const templateOptions = useMemo(() => {\n const searchResults =\n searchData?.pages.flatMap(page => page.results ?? []) ?? []\n return selectedVersion &&\n !searchResults.some(template => template.id === selectedVersion.id)\n ? [selectedVersion, ...searchResults]\n : searchResults\n }, [searchData, selectedVersion])\n\n const latestVersionNumber = latestVersion?.versionNumber ?? 0\n const canUpdateToLatest =\n value != null &&\n latestVersion != null &&\n !latestVersion.deprecated &&\n latestVersionNumber > value.templateVersionNumber\n\n return (\n <Stack sx={{ gap: 2 }}>\n <Autocomplete<FormTemplate>\n id=\"formTemplate\"\n options={templateOptions}\n loading={isSearching}\n value={selectedVersion ?? null}\n // Names are matched by the server\n filterOptions={options => options}\n onInputChange={(_event, text, reason) => {\n if (reason === 'input') {\n setSearchText(text)\n }\n }}\n onChange={(_event, template) => {\n // Choosing the template that is already selected must not move it to the latest version\n if (\n template?.id != null &&\n template.versionNumber != null &&\n template.id !== value?.templateId\n ) {\n onChange({\n templateId: template.id,\n templateVersionNumber: template.versionNumber,\n })\n }\n }}\n getOptionLabel={template => template.name}\n isOptionEqualToValue={(option, selected) => option.id === selected.id}\n renderInput={params => (\n <TextField\n {...params}\n label=\"Form template\"\n error={Boolean(error)}\n helperText=\"Search for the form template that requesters complete to request access.\"\n />\n )}\n />\n {value && (\n <StyledFormControl error={Boolean(error)}>\n <InputLabel id={versionLabelId}>Template version</InputLabel>\n <Select\n labelId={versionLabelId}\n value={value.templateVersionNumber}\n onChange={event =>\n onChange({\n templateId: value.templateId,\n templateVersionNumber: Number(event.target.value),\n })\n }\n >\n {versions.map(version => (\n <MenuItem\n key={version.versionNumber}\n value={version.versionNumber}\n disabled={version.deprecated}\n >\n {describeVersion(version, latestVersionNumber)}\n </MenuItem>\n ))}\n {versions.every(\n version => version.versionNumber !== value.templateVersionNumber,\n ) && (\n <MenuItem value={value.templateVersionNumber} disabled>\n Version {value.templateVersionNumber}\n </MenuItem>\n )}\n </Select>\n </StyledFormControl>\n )}\n {selectedVersion?.deprecated && (\n <Alert severity=\"warning\">\n Version {selectedVersion.versionNumber} of this form template is\n deprecated. Select another version before saving.\n </Alert>\n )}\n {canUpdateToLatest && (\n <Alert\n severity=\"info\"\n action={\n <Button\n color=\"inherit\"\n size=\"small\"\n onClick={() =>\n onChange({\n templateId: value.templateId,\n templateVersionNumber: latestVersionNumber,\n })\n }\n >\n Update to version {latestVersionNumber}\n </Button>\n }\n >\n A newer version of this form template is available. This Access\n Requirement stays on version {value.templateVersionNumber} until you\n update it.\n </Alert>\n )}\n {selectedVersion && (\n <Box>\n <Typography variant=\"body1\">\n Pinned schema: <code>{selectedVersion.schema$id}</code>\n </Typography>\n <Button\n variant=\"outlined\"\n sx={{ mt: 1 }}\n onClick={() => setIsPreviewOpen(true)}\n >\n Preview form\n </Button>\n <FormTemplatePreviewDialog\n open={isPreviewOpen}\n onClose={() => setIsPreviewOpen(false)}\n template={selectedVersion}\n />\n </Box>\n )}\n {error && <FormHelperText error>{error}</FormHelperText>}\n </Stack>\n )\n}\n"],"mappings":"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"}
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { DiscussionFilter } from '@sage-bionetworks/synapse-types';
|
|
2
|
-
|
|
3
|
-
forumId: string;
|
|
2
|
+
type ForumTableBaseProps = {
|
|
4
3
|
limit: number;
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/** Called with the clicked thread's ID and the ID of the project it belongs to */
|
|
5
|
+
onClickLink: (threadId: string, projectId?: string) => void;
|
|
6
|
+
noBackgroundColor?: boolean;
|
|
7
|
+
/** Called when the first page loads, with whether there are no threads */
|
|
8
|
+
onIsEmptyChange?: (isEmpty: boolean) => void;
|
|
9
|
+
/** Max height of the table before it scrolls. Use 'none' for full height. @default '250px' */
|
|
10
|
+
maxHeight?: string;
|
|
7
11
|
};
|
|
8
|
-
export
|
|
12
|
+
export type ForumTableProps = ForumTableBaseProps & ({
|
|
13
|
+
forumId: string;
|
|
14
|
+
filter: DiscussionFilter;
|
|
15
|
+
} | {
|
|
16
|
+
entityId: string;
|
|
17
|
+
onViewForumClicked?: () => void;
|
|
18
|
+
});
|
|
19
|
+
export declare function ForumTable(props: ForumTableProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default ForumTable;
|
|
9
21
|
//# sourceMappingURL=ForumTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForumTable.d.ts","sourceRoot":"","sources":["../../../src/components/Forum/ForumTable.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ForumTable.d.ts","sourceRoot":"","sources":["../../../src/components/Forum/ForumTable.tsx"],"names":[],"mappings":"AASA,OAAO,EACL,gBAAgB,EAGjB,MAAM,iCAAiC,CAAA;AAsBxC,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,kFAAkF;IAClF,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,0EAA0E;IAC1E,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IAC5C,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAC/C,CACI;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,gBAAgB,CAAA;CAAE,GAC7C;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,CACxD,CAAA;AAuEH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CA0HhD;AAED,eAAe,UAAU,CAAA"}
|