@gen3/frontend 0.12.63 → 0.12.64
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/dts/components/Content/Form.d.ts +5 -5
- package/dist/dts/components/Content/Form.d.ts.map +1 -1
- package/dist/dts/components/Content/Form.js +9 -1
- package/dist/dts/components/Content/Form.js.map +1 -1
- package/dist/dts/components/Content/FormContent.d.ts +16 -5
- package/dist/dts/components/Content/FormContent.d.ts.map +1 -1
- package/dist/dts/components/Content/FormContent.js +26 -4
- package/dist/dts/components/Content/FormContent.js.map +1 -1
- package/dist/dts/components/Content/formValidators.d.ts +7 -0
- package/dist/dts/components/Content/formValidators.d.ts.map +1 -0
- package/dist/dts/components/Content/formValidators.js +52 -0
- package/dist/dts/components/Content/formValidators.js.map +1 -0
- package/dist/dts/components/Providers/Gen3Provider.d.ts +7 -7
- package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +22 -22
- package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -1
- package/dist/dts/features/CohortSimilarity/cohortSimilarityApi.d.ts +4 -4
- package/dist/dts/features/DiscoveryForms/StudyRegistration/FormContentViews.d.ts +16 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/FormContentViews.d.ts.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/FormContentViews.js +18 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/FormContentViews.js.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/FormContentViews.stories.d.ts +30 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/FormContentViews.stories.d.ts.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/FormContentViews.stories.js +367 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/FormContentViews.stories.js.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/StudyRegistrationAccessRequestOutcome.d.ts +7 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/StudyRegistrationAccessRequestOutcome.d.ts.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/StudyRegistrationAccessRequestOutcome.js +14 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/StudyRegistrationAccessRequestOutcome.js.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/index.d.ts +8 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/index.d.ts.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/index.js +11 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/index.js.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/types.d.ts +55 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/types.d.ts.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/types.js +8 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/types.js.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/getClinicalTrialMetadata.d.ts +2 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/getClinicalTrialMetadata.d.ts.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/getClinicalTrialMetadata.js +17 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/getClinicalTrialMetadata.js.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/preprocessStudyRegistrationMetadata.d.ts +10 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/preprocessStudyRegistrationMetadata.d.ts.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/preprocessStudyRegistrationMetadata.js +77 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/preprocessStudyRegistrationMetadata.js.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/useStudyRegistration.d.ts +12 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/useStudyRegistration.d.ts.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/useStudyRegistration.js +160 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/useStudyRegistration/useStudyRegistration.js.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/userCanRegisterStudy.d.ts +6 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/userCanRegisterStudy.d.ts.map +1 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/userCanRegisterStudy.js +10 -0
- package/dist/dts/features/DiscoveryForms/StudyRegistration/userCanRegisterStudy.js.map +1 -0
- package/dist/dts/features/Navigation/FixedNavPageLayout.js +1 -1
- package/dist/dts/features/Navigation/FixedNavPageLayout.js.map +1 -1
- package/dist/dts/features/Study/StudyDetails/StudyDetailsHeaderButtons.d.ts.map +1 -1
- package/dist/dts/features/Study/StudyDetails/StudyDetailsHeaderButtons.js +26 -8
- package/dist/dts/features/Study/StudyDetails/StudyDetailsHeaderButtons.js.map +1 -1
- package/dist/dts/pages/StudyForms/StudyRegistration/data.d.ts +4 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/data.d.ts.map +1 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/data.js +32 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/data.js.map +1 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/index.d.ts +10 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/index.d.ts.map +1 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/index.js +12 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/index.js.map +1 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/types.d.ts +28 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/types.d.ts.map +1 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/types.js +2 -0
- package/dist/dts/pages/StudyForms/StudyRegistration/types.js.map +1 -0
- package/dist/index/cjs/QueryPanel-DNGXxrpC.js +43 -0
- package/dist/index/cjs/QueryPanel-DNGXxrpC.js.map +1 -0
- package/dist/index/cjs/index-7sUtTikC.js +42117 -0
- package/dist/index/cjs/index-7sUtTikC.js.map +1 -0
- package/dist/index/cjs/index.js +1 -1
- package/dist/index/esm/QueryPanel-C3JVntIb.js +37 -0
- package/dist/index/esm/QueryPanel-C3JVntIb.js.map +1 -0
- package/dist/index/esm/index-B_0ks9Pi.js +41830 -0
- package/dist/index/esm/index-B_0ks9Pi.js.map +1 -0
- package/dist/index/esm/index.js +1 -1
- package/dist/index.d.ts +22 -12
- package/dist/pages/cjs/CohortBuilder-DircXqXL.js +576 -0
- package/dist/pages/cjs/CohortBuilder-DircXqXL.js.map +1 -0
- package/dist/pages/cjs/QueryPanel-qYWbo2Cb.js +43 -0
- package/dist/pages/cjs/QueryPanel-qYWbo2Cb.js.map +1 -0
- package/dist/pages/cjs/index-BQzYPjdE.js +32499 -0
- package/dist/pages/cjs/index-BQzYPjdE.js.map +1 -0
- package/dist/pages/cjs/index.js +1 -1
- package/dist/pages/esm/CohortBuilder-CI9PAFLd.js +573 -0
- package/dist/pages/esm/CohortBuilder-CI9PAFLd.js.map +1 -0
- package/dist/pages/esm/QueryPanel-BEqldpr5.js +37 -0
- package/dist/pages/esm/QueryPanel-BEqldpr5.js.map +1 -0
- package/dist/pages/esm/index-BoZwM5wd.js +32389 -0
- package/dist/pages/esm/index-BoZwM5wd.js.map +1 -0
- package/dist/pages/esm/index.js +1 -1
- package/dist/pages.d.ts +15 -5
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormContentProps } from './FormContent';
|
|
3
|
-
interface FormPropsBody extends Omit<FormContentProps, 'keyString' | 'form'> {
|
|
4
|
-
readonly errorText
|
|
2
|
+
import type { FormContentProps } from './FormContent';
|
|
3
|
+
export interface FormPropsBody extends Omit<FormContentProps, 'keyString' | 'form'> {
|
|
4
|
+
readonly errorText?: string;
|
|
5
5
|
readonly variable?: string;
|
|
6
|
-
readonly
|
|
6
|
+
readonly required?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export interface FormOnSubmitReturnProps {
|
|
9
9
|
[key: string]: string;
|
|
@@ -16,7 +16,7 @@ export interface FormProps {
|
|
|
16
16
|
readonly submitButtonText?: string;
|
|
17
17
|
readonly showResetButton?: boolean;
|
|
18
18
|
readonly body: FormPropsBody[];
|
|
19
|
-
readonly onSubmit: (values: FormOnSubmitReturnProps) => void | Promise<
|
|
19
|
+
readonly onSubmit: (values: FormOnSubmitReturnProps) => void | Promise<unknown>;
|
|
20
20
|
readonly errorMessage?: string;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/Form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAOtD,MAAM,WAAW,aAAc,SAAQ,IAAI,CACzC,gBAAgB,EAChB,WAAW,GAAG,MAAM,CACrB;IACC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,IAAI,EAAE,aAAa,EAAE,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,CACjB,MAAM,EAAE,uBAAuB,KAC5B,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;;;;GAUG;AACH,QAAA,MAAM,IAAI,GAAI,iFAOX,SAAS,sBA6FX,CAAC;AACF,eAAe,IAAI,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { createElement as _createElement } from "react";
|
|
|
3
3
|
import FormContent, { FormContentType } from './FormContent';
|
|
4
4
|
import { Button, Text } from '@mantine/core';
|
|
5
5
|
import { useForm, isEmail, isNotEmpty } from '@mantine/form';
|
|
6
|
+
import { isCedarUUIDValid, isClinicalTrialIDValid } from './formValidators';
|
|
6
7
|
/**
|
|
7
8
|
* Renders Form content dynamically based on the provided body and additional properties.
|
|
8
9
|
*
|
|
@@ -28,8 +29,15 @@ const Form = ({ className = '', body, submitButtonText = 'Submit', showResetButt
|
|
|
28
29
|
const isvalidEmail = item.errorText || 'Invalid email';
|
|
29
30
|
validate[itemKey] = isEmail(isvalidEmail);
|
|
30
31
|
}
|
|
32
|
+
if (item.type === FormContentType.ClinicalTrialID) {
|
|
33
|
+
validate[itemKey] = isClinicalTrialIDValid(item.errorText);
|
|
34
|
+
}
|
|
31
35
|
if (item.required) {
|
|
32
36
|
switch (item.type) {
|
|
37
|
+
case FormContentType.CedarUserUUID: {
|
|
38
|
+
validate[itemKey] = isCedarUUIDValid(item.errorText);
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
33
41
|
case FormContentType.Email: {
|
|
34
42
|
const isValidEmail = item.errorText || 'Invalid email';
|
|
35
43
|
validate[itemKey] = isEmail(isValidEmail);
|
|
@@ -56,7 +64,7 @@ const Form = ({ className = '', body, submitButtonText = 'Submit', showResetButt
|
|
|
56
64
|
initialValues,
|
|
57
65
|
validate,
|
|
58
66
|
});
|
|
59
|
-
return (_jsxs("form", { onSubmit: form.onSubmit(onSubmit), className: className, children: [bodyWithKey
|
|
67
|
+
return (_jsxs("form", { onSubmit: form.onSubmit(onSubmit), className: className, children: [bodyWithKey.map((content, index) => (_createElement(FormContent, { ...content, form: form, key: index }))), errorMessage && _jsx(Text, { c: "red", children: errorMessage }), _jsx(Button, { type: "submit", disabled: form.submitting, loading: form.submitting, children: submitButtonText }), showResetButton && (_jsx(Button, { className: "ml-2", variant: "outline", onClick: form.reset, disabled: form.submitting, children: "Reset" }))] }));
|
|
60
68
|
};
|
|
61
69
|
export default Form;
|
|
62
70
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../src/components/Content/Form.tsx"],"names":[],"mappings":";;AAEA,OAAO,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"Form.js","sourceRoot":"","sources":["../../../../src/components/Content/Form.tsx"],"names":[],"mappings":";;AAEA,OAAO,WAAW,EAAE,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AA6B5E;;;;;;;;;;GAUG;AACH,MAAM,IAAI,GAAG,CAAC,EACZ,SAAS,GAAG,EAAE,EACd,IAAI,EACJ,gBAAgB,GAAG,QAAQ,EAC3B,eAAe,GAAG,KAAK,EACvB,QAAQ,EACR,YAAY,GACF,EAAE,EAAE;IACd,MAAM,aAAa,GAA4B,EAAE,CAAC;IAClD,MAAM,QAAQ,GAA+C,EAAE,CAAC;IAEhE,MAAM,WAAW,GAA8C,IAAI,CAAC,GAA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,EAAC,SAAS,EACjB,OAAO,EAAE,IAAI,CAAC,KAAK,EACnB,QAAQ,EAAE,IAAI,CAAC,UAAU,sBAGlB,CACV,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,IAAI,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { UseFormReturnType } from '@mantine/form';
|
|
3
|
+
import type { TextContentProps } from './TextContent';
|
|
4
|
+
import { ContentType } from './TextContent';
|
|
4
5
|
/**
|
|
5
6
|
* Enum representing various content types for form-based data.
|
|
6
7
|
*
|
|
@@ -11,7 +12,15 @@ export declare enum FormContentType {
|
|
|
11
12
|
Email = "Email",// mantine TextInput set to validate email
|
|
12
13
|
Checkbox = "Checkbox",// mantine Checkbox
|
|
13
14
|
Textarea = "Textarea",// mantine Textarea
|
|
14
|
-
RadioGroup = "RadioGroup"
|
|
15
|
+
RadioGroup = "RadioGroup",// mantine Radio.Group
|
|
16
|
+
Select = "Select",// mantine Select
|
|
17
|
+
Tags = "Tags",// mantine Tags
|
|
18
|
+
CedarUserUUID = "CedarUserUUID",// Cedar User ID text input
|
|
19
|
+
ClinicalTrialID = "ClinicalTrialID"
|
|
20
|
+
}
|
|
21
|
+
export interface SelectOptionItem {
|
|
22
|
+
label: string;
|
|
23
|
+
value: string;
|
|
15
24
|
}
|
|
16
25
|
/**
|
|
17
26
|
* Interface representing the properties for rendering form content.
|
|
@@ -20,13 +29,15 @@ export interface FormContentProps extends Omit<TextContentProps, 'type' | 'text'
|
|
|
20
29
|
readonly text?: TextContentProps['text'];
|
|
21
30
|
readonly type?: FormContentType | ContentType;
|
|
22
31
|
readonly label?: string;
|
|
32
|
+
readonly initialValue?: string;
|
|
33
|
+
readonly dropdownData?: SelectOptionItem[];
|
|
23
34
|
readonly description?: string;
|
|
24
35
|
readonly placeholder?: string;
|
|
25
36
|
readonly disabled?: boolean;
|
|
26
37
|
readonly required?: boolean;
|
|
27
38
|
readonly tooltip?: string;
|
|
28
39
|
readonly keyString: string;
|
|
29
|
-
readonly form: UseFormReturnType<
|
|
40
|
+
readonly form: UseFormReturnType<Record<string, unknown>, (values: Record<string, unknown>) => Record<string, unknown>>;
|
|
30
41
|
}
|
|
31
42
|
/**
|
|
32
43
|
* Renders form and textual content dynamically based on the provided type and additional properties.
|
|
@@ -48,6 +59,6 @@ export interface FormContentProps extends Omit<TextContentProps, 'type' | 'text'
|
|
|
48
59
|
* @param {FormContentProps['form']} props.form - @mantine/form useForm() object
|
|
49
60
|
* @returns {JSX.Element} A JSX element that renders the content dynamically based on the input type and properties.
|
|
50
61
|
*/
|
|
51
|
-
declare const FormContent: ({ text, label, description, placeholder, disabled, required, tooltip, className, type, keyString, form, }: FormContentProps) => React.JSX.Element | undefined;
|
|
62
|
+
declare const FormContent: ({ text, label, initialValue, dropdownData, description, placeholder, disabled, required, tooltip, className, type, keyString, form, }: FormContentProps) => React.JSX.Element | undefined;
|
|
52
63
|
export default FormContent;
|
|
53
64
|
//# sourceMappingURL=FormContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/FormContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FormContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/FormContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAoB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAYzD;;;;GAIG;AACH,oBAAY,eAAe;IACzB,SAAS,cAAc,CAAE,oBAAoB;IAC7C,KAAK,UAAU,CAAE,0CAA0C;IAC3D,QAAQ,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,QAAA,MAAM,WAAW,GAAI,uIAclB,gBAAgB,kCAyJlB,CAAC;AACF,eAAe,WAAW,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import TextContent, { ContentType } from './TextContent';
|
|
3
|
-
import { Checkbox, Radio, Stack, TextInput, Textarea, Tooltip, } from '@mantine/core';
|
|
3
|
+
import { Checkbox, Radio, Select, Stack, TagsInput, TextInput, Textarea, Tooltip, } from '@mantine/core';
|
|
4
4
|
/**
|
|
5
5
|
* Enum representing various content types for form-based data.
|
|
6
6
|
*
|
|
@@ -13,6 +13,10 @@ export var FormContentType;
|
|
|
13
13
|
FormContentType["Checkbox"] = "Checkbox";
|
|
14
14
|
FormContentType["Textarea"] = "Textarea";
|
|
15
15
|
FormContentType["RadioGroup"] = "RadioGroup";
|
|
16
|
+
FormContentType["Select"] = "Select";
|
|
17
|
+
FormContentType["Tags"] = "Tags";
|
|
18
|
+
FormContentType["CedarUserUUID"] = "CedarUserUUID";
|
|
19
|
+
FormContentType["ClinicalTrialID"] = "ClinicalTrialID";
|
|
16
20
|
})(FormContentType || (FormContentType = {}));
|
|
17
21
|
/**
|
|
18
22
|
* Renders form and textual content dynamically based on the provided type and additional properties.
|
|
@@ -34,7 +38,7 @@ export var FormContentType;
|
|
|
34
38
|
* @param {FormContentProps['form']} props.form - @mantine/form useForm() object
|
|
35
39
|
* @returns {JSX.Element} A JSX element that renders the content dynamically based on the input type and properties.
|
|
36
40
|
*/
|
|
37
|
-
const FormContent = ({ text, label, description, placeholder, disabled, required, tooltip, className = '', type = ContentType.Text, keyString, form, }) => {
|
|
41
|
+
const FormContent = ({ text, label, initialValue, dropdownData, description, placeholder, disabled, required, tooltip, className = '', type = ContentType.Text, keyString, form, }) => {
|
|
38
42
|
//code for tooltips on form items
|
|
39
43
|
let inputContainer;
|
|
40
44
|
if (tooltip) {
|
|
@@ -42,10 +46,12 @@ const FormContent = ({ text, label, description, placeholder, disabled, required
|
|
|
42
46
|
}
|
|
43
47
|
switch (type) {
|
|
44
48
|
case FormContentType.Email:
|
|
49
|
+
case FormContentType.CedarUserUUID:
|
|
50
|
+
case FormContentType.ClinicalTrialID:
|
|
45
51
|
case FormContentType.TextInput: {
|
|
46
52
|
return (_jsx(TextInput, { className: className, classNames: {
|
|
47
53
|
label: 'text-sm font-bold',
|
|
48
|
-
input: 'max-w-
|
|
54
|
+
input: 'max-w-lg mt-2',
|
|
49
55
|
description: 'text-sm text-[var(--mantine-color-text)]',
|
|
50
56
|
}, label: label, description: description, placeholder: placeholder, disabled: disabled || form.submitting, required: required, inputContainer: inputContainer, ...form.getInputProps(keyString) }, form.key(keyString)));
|
|
51
57
|
}
|
|
@@ -70,10 +76,26 @@ const FormContent = ({ text, label, description, placeholder, disabled, required
|
|
|
70
76
|
}
|
|
71
77
|
return RadioGroupElement;
|
|
72
78
|
}
|
|
79
|
+
case FormContentType.Select: {
|
|
80
|
+
const SelectElement = (_jsx(Select, { className: className, classNames: {
|
|
81
|
+
label: 'text-sm font-bold',
|
|
82
|
+
root: 'max-w-lg mt-2',
|
|
83
|
+
}, data: dropdownData, defaultValue: initialValue, label: label, description: description, placeholder: placeholder, disabled: disabled || form.submitting, required: required, ...form.getInputProps(keyString) }, form.key(keyString)));
|
|
84
|
+
if (inputContainer) {
|
|
85
|
+
return inputContainer(SelectElement);
|
|
86
|
+
}
|
|
87
|
+
return SelectElement;
|
|
88
|
+
}
|
|
89
|
+
case FormContentType.Tags: {
|
|
90
|
+
return (_jsx(TagsInput, { label: label, classNames: {
|
|
91
|
+
label: 'text-sm font-bold whitespace-pre-line',
|
|
92
|
+
root: 'max-w-lg mt-2',
|
|
93
|
+
}, placeholder: placeholder, ...form.getInputProps(keyString) }, form.key(keyString)));
|
|
94
|
+
}
|
|
73
95
|
case FormContentType.Textarea: {
|
|
74
96
|
return (_jsx(Textarea, { className: className, classNames: {
|
|
75
97
|
label: 'text-sm font-bold',
|
|
76
|
-
input: 'max-w-
|
|
98
|
+
input: 'max-w-lg h-40 mt-2',
|
|
77
99
|
description: 'text-sm text-[var(--mantine-color-text)]',
|
|
78
100
|
}, label: label, description: description, placeholder: placeholder, disabled: disabled || form.submitting, required: required, inputContainer: inputContainer, ...form.getInputProps(keyString) }, form.key(keyString)));
|
|
79
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormContent.js","sourceRoot":"","sources":["../../../../src/components/Content/FormContent.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FormContent.js","sourceRoot":"","sources":["../../../../src/components/Content/FormContent.tsx"],"names":[],"mappings":";AAGA,OAAO,WAAW,EAAE,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,KAAK,EACL,SAAS,EACT,SAAS,EACT,QAAQ,EACR,OAAO,GACR,MAAM,eAAe,CAAC;AAEvB;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAUX;AAVD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,kCAAe,CAAA;IACf,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,4CAAyB,CAAA;IACzB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;IACb,kDAA+B,CAAA;IAC/B,sDAAmC,CAAA;AACrC,CAAC,EAVW,eAAe,KAAf,eAAe,QAU1B;AA+BD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,GAAG,EAAE,EACd,IAAI,GAAG,WAAW,CAAC,IAAI,EACvB,SAAS,EACT,IAAI,GACa,EAAE,EAAE;IACrB,iCAAiC;IACjC,IAAI,cAAc,CAAC;IACnB,IAAI,OAAO,EAAE,CAAC;QACZ,cAAc,GAAG,CAA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EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAmB,IACpB,SAAS,CACd,CACH,CAAC;YACJ,CAAC;IACL,CAAC;AACH,CAAC,CAAC;AACF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JSONObject } from '@gen3/core';
|
|
2
|
+
type Validator = (value: unknown) => string | null;
|
|
3
|
+
type AsyncValidator = (value: unknown, values?: JSONObject, path?: string, signal?: AbortSignal) => Promise<string | null>;
|
|
4
|
+
declare const isCedarUUIDValid: (errorText?: string) => Validator;
|
|
5
|
+
declare const isClinicalTrialIDValid: (errorText?: string) => AsyncValidator;
|
|
6
|
+
export { isCedarUUIDValid, isClinicalTrialIDValid };
|
|
7
|
+
//# sourceMappingURL=formValidators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formValidators.d.ts","sourceRoot":"","sources":["../../../../src/components/Content/formValidators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,CAAC;AACnD,KAAK,cAAc,GAAG,CACpB,KAAK,EAAE,OAAO,EACd,MAAM,CAAC,EAAE,UAAU,EACnB,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,WAAW,KACjB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;AAe5B,QAAA,MAAM,gBAAgB,GACpB,YAAW,MAAyC,KACnD,SAKF,CAAC;AA4BF,QAAA,MAAM,sBAAsB,GAC1B,YAAW,MAA+C,KACzD,cAQF,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { toString } from 'lodash';
|
|
2
|
+
/* CEDAR ID VALIDATION */
|
|
3
|
+
const CEDAR_UUID_REGEX = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
|
|
4
|
+
const validateCedarUUID = (errorText = 'Invalid Cedar User UUID') => {
|
|
5
|
+
return (value) => {
|
|
6
|
+
if (!value || toString(value).trim() === '')
|
|
7
|
+
return null;
|
|
8
|
+
return CEDAR_UUID_REGEX.test(toString(value)) ? null : errorText;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
const isCedarUUIDValid = (errorText = 'Valid Cedar User UUID required') => {
|
|
12
|
+
return (value) => {
|
|
13
|
+
if (!value || toString(value).trim() === '')
|
|
14
|
+
return errorText;
|
|
15
|
+
return validateCedarUUID(errorText)(value);
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/* CLINICAL TRIALS GOV ID VALIDATION */
|
|
19
|
+
const validateClinicalTrialID = (errorText = 'Invalid ClinicalTrials.gov ID') => {
|
|
20
|
+
return async (value, _, __, signal) => {
|
|
21
|
+
const ctID = toString(value || '').trim();
|
|
22
|
+
if (!ctID)
|
|
23
|
+
return null; // Pass empty values for optional fields
|
|
24
|
+
try {
|
|
25
|
+
const resp = await fetch(`https://clinicaltrials.gov/api/v2/studies/${ctID}?fields=NCTId`, { signal });
|
|
26
|
+
if (!resp.ok)
|
|
27
|
+
return 'Unable to verify ClinicalTrials.gov ID';
|
|
28
|
+
const respJson = await resp.json();
|
|
29
|
+
if (respJson?.protocolSection?.identificationModule?.nctId === ctID) {
|
|
30
|
+
return null; // Valid
|
|
31
|
+
}
|
|
32
|
+
return errorText;
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
if (error instanceof Error && error.name === 'AbortError')
|
|
36
|
+
return null;
|
|
37
|
+
return 'Unable to verify ClinicalTrials.gov ID';
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
// Required check (returns error if only if invalid)
|
|
42
|
+
const isClinicalTrialIDValid = (errorText = 'Valid ClinicalTrials.gov ID required') => {
|
|
43
|
+
return async (value, values, path, signal) => {
|
|
44
|
+
if (!value || toString(value).trim() === '')
|
|
45
|
+
return null; // Validation to only check if user entered text
|
|
46
|
+
else {
|
|
47
|
+
return validateClinicalTrialID(errorText)(value, values, path, signal);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export { isCedarUUIDValid, isClinicalTrialIDValid };
|
|
52
|
+
//# sourceMappingURL=formValidators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formValidators.js","sourceRoot":"","sources":["../../../../src/components/Content/formValidators.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAUlC,yBAAyB;AACzB,MAAM,gBAAgB,GACpB,wFAAwF,CAAC;AAE3F,MAAM,iBAAiB,GAAG,CACxB,SAAS,GAAG,yBAAyB,EAC1B,EAAE;IACb,OAAO,CAAC,KAAc,EAAE,EAAE;QACxB,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,IAAI,CAAC;QACzD,OAAO,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,YAAoB,gCAAgC,EACzC,EAAE;IACb,OAAO,CAAC,KAAc,EAAE,EAAE;QACxB,IAAI,CAAC,KAAK,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,SAAS,CAAC;QAC9D,OAAO,iBAAiB,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,uCAAuC;A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K,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACzE,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -87,8 +87,8 @@ export declare const createMantineTheme: (fonts: Fonts, colors: Record<string, T
|
|
|
87
87
|
} | undefined;
|
|
88
88
|
radius?: {
|
|
89
89
|
[x: string & {}]: string | undefined;
|
|
90
|
-
sm?: string | undefined;
|
|
91
90
|
xs?: string | undefined;
|
|
91
|
+
sm?: string | undefined;
|
|
92
92
|
md?: string | undefined;
|
|
93
93
|
lg?: string | undefined;
|
|
94
94
|
xl?: string | undefined;
|
|
@@ -97,24 +97,24 @@ export declare const createMantineTheme: (fonts: Fonts, colors: Record<string, T
|
|
|
97
97
|
spacing?: {
|
|
98
98
|
[x: number]: string | undefined;
|
|
99
99
|
[x: string & {}]: string | undefined;
|
|
100
|
-
sm?: string | undefined;
|
|
101
100
|
xs?: string | undefined;
|
|
101
|
+
sm?: string | undefined;
|
|
102
102
|
md?: string | undefined;
|
|
103
103
|
lg?: string | undefined;
|
|
104
104
|
xl?: string | undefined;
|
|
105
105
|
} | undefined;
|
|
106
106
|
fontSizes?: {
|
|
107
107
|
[x: string & {}]: string | undefined;
|
|
108
|
-
sm?: string | undefined;
|
|
109
108
|
xs?: string | undefined;
|
|
109
|
+
sm?: string | undefined;
|
|
110
110
|
md?: string | undefined;
|
|
111
111
|
lg?: string | undefined;
|
|
112
112
|
xl?: string | undefined;
|
|
113
113
|
} | undefined;
|
|
114
114
|
lineHeights?: {
|
|
115
115
|
[x: string & {}]: string | undefined;
|
|
116
|
-
sm?: string | undefined;
|
|
117
116
|
xs?: string | undefined;
|
|
117
|
+
sm?: string | undefined;
|
|
118
118
|
md?: string | undefined;
|
|
119
119
|
lg?: string | undefined;
|
|
120
120
|
xl?: string | undefined;
|
|
@@ -127,22 +127,22 @@ export declare const createMantineTheme: (fonts: Fonts, colors: Record<string, T
|
|
|
127
127
|
} | undefined;
|
|
128
128
|
breakpoints?: {
|
|
129
129
|
[x: string & {}]: string | undefined;
|
|
130
|
-
sm?: string | undefined;
|
|
131
130
|
xs?: string | undefined;
|
|
131
|
+
sm?: string | undefined;
|
|
132
132
|
md?: string | undefined;
|
|
133
133
|
lg?: string | undefined;
|
|
134
134
|
xl?: string | undefined;
|
|
135
135
|
} | undefined;
|
|
136
136
|
shadows?: {
|
|
137
137
|
[x: string & {}]: string | undefined;
|
|
138
|
-
sm?: string | undefined;
|
|
139
138
|
xs?: string | undefined;
|
|
139
|
+
sm?: string | undefined;
|
|
140
140
|
md?: string | undefined;
|
|
141
141
|
lg?: string | undefined;
|
|
142
142
|
xl?: string | undefined;
|
|
143
143
|
} | undefined;
|
|
144
144
|
respectReducedMotion?: boolean | undefined;
|
|
145
|
-
cursorType?: "
|
|
145
|
+
cursorType?: "default" | "pointer" | undefined;
|
|
146
146
|
defaultGradient?: {
|
|
147
147
|
from?: string | undefined;
|
|
148
148
|
to?: string | undefined;
|
|
@@ -2,58 +2,58 @@ import React from 'react';
|
|
|
2
2
|
import type { StoryObj } from '@storybook/nextjs';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
component: React.FC<{
|
|
5
|
-
|
|
5
|
+
height?: string | undefined;
|
|
6
6
|
type?: string | undefined;
|
|
7
|
+
classNames?: import("../..").StylingOverrideWithMergeControl | undefined;
|
|
7
8
|
title: string;
|
|
8
|
-
height?: string | undefined;
|
|
9
|
-
description: string;
|
|
10
9
|
href: string;
|
|
10
|
+
description: string;
|
|
11
|
+
tags?: Array<string> | undefined;
|
|
11
12
|
count?: number | undefined;
|
|
12
13
|
icon?: (string | React.ReactElement) | undefined;
|
|
13
|
-
readonly rightComponent?: React.FC | undefined;
|
|
14
|
-
readonly selectionScreen?: React.FC | undefined;
|
|
15
|
-
hasDemo?: boolean | undefined;
|
|
16
14
|
loginRequired: boolean;
|
|
15
|
+
onButtonClick?: import("./types").AnalysisCardSelectionFunction | undefined;
|
|
16
|
+
hasDemo?: boolean | undefined;
|
|
17
17
|
demoHref?: string | undefined;
|
|
18
|
+
btnText?: string | undefined;
|
|
18
19
|
appId?: string | undefined;
|
|
20
|
+
noDataTooltip?: string | undefined;
|
|
21
|
+
hideCounts?: boolean | undefined;
|
|
19
22
|
componentName?: string | undefined;
|
|
20
23
|
countFunction?: (() => string) | undefined;
|
|
21
24
|
countIndex?: string | undefined;
|
|
22
25
|
countUnits?: string | undefined;
|
|
23
|
-
hideCounts?: boolean | undefined;
|
|
24
|
-
noDataTooltip?: string | undefined;
|
|
25
26
|
cardType?: "regular" | "compact" | undefined;
|
|
26
|
-
btnText?: string | undefined;
|
|
27
|
-
onButtonClick?: import("./types").AnalysisCardSelectionFunction | undefined;
|
|
28
|
-
tags?: Array<string> | undefined;
|
|
29
27
|
readonly leftComponent?: React.FC | undefined;
|
|
28
|
+
readonly rightComponent?: React.FC | undefined;
|
|
29
|
+
readonly selectionScreen?: React.FC | undefined;
|
|
30
30
|
}>;
|
|
31
31
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
32
|
-
|
|
32
|
+
height?: string | undefined;
|
|
33
33
|
type?: string | undefined;
|
|
34
|
+
classNames?: import("../..").StylingOverrideWithMergeControl | undefined;
|
|
34
35
|
title: string;
|
|
35
|
-
height?: string | undefined;
|
|
36
|
-
description: string;
|
|
37
36
|
href: string;
|
|
37
|
+
description: string;
|
|
38
|
+
tags?: Array<string> | undefined;
|
|
38
39
|
count?: number | undefined;
|
|
39
40
|
icon?: (string | React.ReactElement) | undefined;
|
|
40
|
-
readonly rightComponent?: React.FC | undefined;
|
|
41
|
-
readonly selectionScreen?: React.FC | undefined;
|
|
42
|
-
hasDemo?: boolean | undefined;
|
|
43
41
|
loginRequired: boolean;
|
|
42
|
+
onButtonClick?: import("./types").AnalysisCardSelectionFunction | undefined;
|
|
43
|
+
hasDemo?: boolean | undefined;
|
|
44
44
|
demoHref?: string | undefined;
|
|
45
|
+
btnText?: string | undefined;
|
|
45
46
|
appId?: string | undefined;
|
|
47
|
+
noDataTooltip?: string | undefined;
|
|
48
|
+
hideCounts?: boolean | undefined;
|
|
46
49
|
componentName?: string | undefined;
|
|
47
50
|
countFunction?: (() => string) | undefined;
|
|
48
51
|
countIndex?: string | undefined;
|
|
49
52
|
countUnits?: string | undefined;
|
|
50
|
-
hideCounts?: boolean | undefined;
|
|
51
|
-
noDataTooltip?: string | undefined;
|
|
52
53
|
cardType?: "regular" | "compact" | undefined;
|
|
53
|
-
btnText?: string | undefined;
|
|
54
|
-
onButtonClick?: import("./types").AnalysisCardSelectionFunction | undefined;
|
|
55
|
-
tags?: Array<string> | undefined;
|
|
56
54
|
readonly leftComponent?: React.FC | undefined;
|
|
55
|
+
readonly rightComponent?: React.FC | undefined;
|
|
56
|
+
readonly selectionScreen?: React.FC | undefined;
|
|
57
57
|
}>) => React.JSX.Element)[];
|
|
58
58
|
};
|
|
59
59
|
export default meta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { JSONObject } from '@gen3/core';
|
|
3
3
|
import { CellRendererFunction, CellRendererFunctionProps } from './types';
|
|
4
|
-
export declare const ArrayCellRenderer: (cellRenderFunction: CellRendererFunction, props: CellRendererFunctionProps<JSONObject>, ...args: any[]) => string | number | bigint | boolean |
|
|
4
|
+
export declare const ArrayCellRenderer: (cellRenderFunction: CellRendererFunction, props: CellRendererFunctionProps<JSONObject>, ...args: any[]) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
5
5
|
//# sourceMappingURL=ArrayCellRenderer.d.ts.map
|
|
@@ -41,7 +41,7 @@ export declare const useGetDatasetQuery: <R extends Record<string, any> = import
|
|
|
41
41
|
isFetching: false;
|
|
42
42
|
isSuccess: false;
|
|
43
43
|
isError: false;
|
|
44
|
-
}, "
|
|
44
|
+
}, "data" | "fulfilledTimeStamp" | "error" | "isFetching" | "isSuccess"> & {
|
|
45
45
|
isSuccess: true;
|
|
46
46
|
isFetching: true;
|
|
47
47
|
error: undefined;
|
|
@@ -61,7 +61,7 @@ export declare const useGetDatasetQuery: <R extends Record<string, any> = import
|
|
|
61
61
|
isFetching: false;
|
|
62
62
|
isSuccess: false;
|
|
63
63
|
isError: false;
|
|
64
|
-
}, "
|
|
64
|
+
}, "data" | "fulfilledTimeStamp" | "error" | "currentData" | "isFetching" | "isSuccess"> & {
|
|
65
65
|
isSuccess: true;
|
|
66
66
|
isFetching: false;
|
|
67
67
|
error: undefined;
|
|
@@ -134,7 +134,7 @@ export declare const useGetDatasetQuery: <R extends Record<string, any> = import
|
|
|
134
134
|
isFetching: false;
|
|
135
135
|
isSuccess: false;
|
|
136
136
|
isError: false;
|
|
137
|
-
}, "
|
|
137
|
+
}, "data" | "fulfilledTimeStamp" | "error" | "isFetching" | "isSuccess"> & {
|
|
138
138
|
isSuccess: true;
|
|
139
139
|
isFetching: true;
|
|
140
140
|
error: undefined;
|
|
@@ -154,7 +154,7 @@ export declare const useGetDatasetQuery: <R extends Record<string, any> = import
|
|
|
154
154
|
isFetching: false;
|
|
155
155
|
isSuccess: false;
|
|
156
156
|
isError: false;
|
|
157
|
-
}, "
|
|
157
|
+
}, "data" | "fulfilledTimeStamp" | "error" | "currentData" | "isFetching" | "isSuccess"> & {
|
|
158
158
|
isSuccess: true;
|
|
159
159
|
isFetching: false;
|
|
160
160
|
error: undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormOutcome } from './types';
|
|
3
|
+
import type { FormOnSubmitReturnProps, FormProps } from '../../../components/Content/Form';
|
|
4
|
+
import type { StudyRegistrationFormConfig } from '../../../pages/StudyForms/StudyRegistration/types';
|
|
5
|
+
interface FormContentViewsProps {
|
|
6
|
+
formOutcome: FormOutcome;
|
|
7
|
+
formError?: string;
|
|
8
|
+
studyUID: string | null;
|
|
9
|
+
formBody: FormProps['body'];
|
|
10
|
+
config: StudyRegistrationFormConfig;
|
|
11
|
+
onSubmit: (formValues: FormOnSubmitReturnProps) => Promise<void>;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const FormContentViews: ({ formOutcome, formError, studyUID, formBody, config, onSubmit, isLoading, }: FormContentViewsProps) => React.JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=FormContentViews.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContentViews.d.ts","sourceRoot":"","sources":["../../../../../src/features/DiscoveryForms/StudyRegistration/FormContentViews.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EACV,uBAAuB,EACvB,SAAS,EACV,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAGrG,UAAU,qBAAqB;IAC7B,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC5B,MAAM,EAAE,2BAA2B,CAAC;IACpC,QAAQ,EAAE,CAAC,UAAU,EAAE,uBAAuB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,SAAS,EAAE,OAAO,CAAC;CACpB;AACD,eAAO,MAAM,gBAAgB,GAAI,8EAQ9B,qBAAqB,sBAsDvB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Form from '../../../components/Content/Form';
|
|
3
|
+
import StudyRegistrationAccessRequestOutcome from './StudyRegistrationAccessRequestOutcome';
|
|
4
|
+
import { Center, Loader } from '@mantine/core';
|
|
5
|
+
import { FormOutcome } from './types';
|
|
6
|
+
export const FormContentViews = ({ formOutcome, formError, studyUID, formBody, config, onSubmit, isLoading, }) => {
|
|
7
|
+
if (isLoading) {
|
|
8
|
+
return (_jsx(Center, { h: "50vh", children: _jsx(Loader, {}) }));
|
|
9
|
+
}
|
|
10
|
+
if (formOutcome === FormOutcome.success) {
|
|
11
|
+
return (_jsx(StudyRegistrationAccessRequestOutcome, { outcomeConfig: config[FormOutcome.success] }));
|
|
12
|
+
}
|
|
13
|
+
if (formOutcome === FormOutcome.error) {
|
|
14
|
+
return (_jsxs("div", { className: "[&>div]:flex-col", children: [_jsx(StudyRegistrationAccessRequestOutcome, { outcomeConfig: config[FormOutcome.error] }), _jsx("div", { className: "mt-6", children: _jsx("div", { className: "max-w-lg m-auto text-center", children: formError ? (_jsxs(_Fragment, { children: [_jsx("strong", { children: "Form Error:" }), _jsx("div", { children: formError })] })) : (`No form error information available.`) }) })] }));
|
|
15
|
+
}
|
|
16
|
+
return (_jsx(Form, { className: "*:mt-5 mb-5 max-w-lg", body: formBody, showResetButton: true, onSubmit: onSubmit, errorMessage: formError }, studyUID));
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=FormContentViews.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContentViews.js","sourceRoot":"","sources":["../../../../../src/features/DiscoveryForms/StudyRegistration/FormContentViews.tsx"],"names":[],"mappings":";AACA,OAAO,IAAI,MAAM,kCAAkC,CAAC;AACpD,OAAO,qCAAqC,MAAM,yCAAyC,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAiBtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,GACa,EAAE,EAAE;IAC1B,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CACL,KAAC,MAAM,IAAC,CAAC,EAAC,MAAM,YACd,KAAC,MAAM,KAAG,GACH,CACV,CAAC;IACJ,CAAC;IACD,IAAI,WAAW,KAAK,WAAW,CAAC,OAAO,EAAE,CAAC;QACxC,OAAO,CACL,KAAC,qCAAqC,IACpC,aAAa,EACX,MAAM,CACJ,WAAW,CAAC,OAAO,CACyC,GAEhE,CACH,CAAC;IACJ,CAAC;IACD,IAAI,WAAW,KAAK,WAAW,CAAC,KAAK,EAAE,CAAC;QACtC,OAAO,CACL,eAAK,SAAS,EAAC,kBAAkB,aAC/B,KAAC,qCAAqC,IACpC,aAAa,EACX,MAAM,CACJ,WAAW,CAAC,KAAK,CAC2C,GAEhE,EACF,cAAK,SAAS,EAAC,MAAM,YACnB,cAAK,SAAS,EAAC,6BAA6B,YACzC,SAAS,CAAC,CAAC,CAAC,CACX,8BACE,2CAA4B,EAC5B,wBAAM,SAAS,GAAO,IACrB,CACJ,CAAC,CAAC,CAAC,CACF,sCAAsC,CACvC,GACG,GACF,IACF,CACP,CAAC;IACJ,CAAC;IACD,OAAO,CACL,KAAC,IAAI,IAEH,SAAS,EAAC,sBAAsB,EAChC,IAAI,EAAE,QAAQ,EACd,eAAe,QACf,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,SAAS,IALlB,QAAQ,CAMb,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FormOutcome } from './types';
|
|
2
|
+
declare const meta: unknown;
|
|
3
|
+
export default meta;
|
|
4
|
+
export declare const PendingState: {
|
|
5
|
+
args: {
|
|
6
|
+
formOutcome: FormOutcome;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare const SuccessState: {
|
|
10
|
+
args: {
|
|
11
|
+
formOutcome: FormOutcome;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const LoadingState: {
|
|
15
|
+
args: {
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const ErrorState: {
|
|
20
|
+
args: {
|
|
21
|
+
formOutcome: FormOutcome;
|
|
22
|
+
formError: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const ErrorStateNoErrorInfo: {
|
|
26
|
+
args: {
|
|
27
|
+
formOutcome: FormOutcome;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=FormContentViews.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContentViews.stories.d.ts","sourceRoot":"","sources":["../../../../../src/features/DiscoveryForms/StudyRegistration/FormContentViews.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA4UtC,QAAA,MAAM,IAAI,EAAE,OAiB6B,CAAC;AAC1C,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AACF,eAAO,MAAM,UAAU;;;;;CAMtB,CAAC;AACF,eAAO,MAAM,qBAAqB;;;;CAIjC,CAAC"}
|