synapse-react-client 4.0.40 → 4.0.41
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 -0
- package/dist/SWC.index.d.ts.map +1 -1
- package/dist/SWC.index.js +2 -1
- package/dist/SWC.index.js.map +1 -1
- package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.d.ts +1 -0
- package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.d.ts.map +1 -1
- package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.js +12 -12
- package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.js.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.d.ts.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.js +51 -48
- package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
- package/dist/components/Authentication/Constants.d.ts +4 -0
- package/dist/components/Authentication/Constants.d.ts.map +1 -1
- package/dist/components/Authentication/Constants.js +5 -2
- package/dist/components/Authentication/Constants.js.map +1 -1
- package/dist/components/Authentication/RecoveryCodeGrid.d.ts.map +1 -1
- package/dist/components/Authentication/RecoveryCodeGrid.js +8 -1
- package/dist/components/Authentication/RecoveryCodeGrid.js.map +1 -1
- package/dist/components/Authentication/RegenerateBackupCodesWarning.js +4 -1
- package/dist/components/Authentication/RegenerateBackupCodesWarning.js.map +1 -1
- package/dist/components/Authentication/TOTPForm.d.ts.map +1 -1
- package/dist/components/Authentication/TOTPForm.js +20 -18
- package/dist/components/Authentication/TOTPForm.js.map +1 -1
- package/dist/components/Authentication/TwoFactorBackupCodes.d.ts.map +1 -1
- package/dist/components/Authentication/TwoFactorBackupCodes.js +41 -12
- package/dist/components/Authentication/TwoFactorBackupCodes.js.map +1 -1
- package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
- package/dist/components/Authentication/TwoFactorEnrollmentForm.js +74 -71
- package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js +43 -46
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -1
- package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.d.ts +11 -0
- package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.js +61 -0
- package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.js.map +1 -0
- package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.d.ts +33 -0
- package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js +187 -0
- package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js.map +1 -0
- package/dist/components/FormTemplateEditor/FormTemplatePreview.d.ts +14 -0
- package/dist/components/FormTemplateEditor/FormTemplatePreview.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/FormTemplatePreview.js +83 -0
- package/dist/components/FormTemplateEditor/FormTemplatePreview.js.map +1 -0
- package/dist/components/FormTemplateEditor/JsonSchemaBodyEditor.d.ts +13 -0
- package/dist/components/FormTemplateEditor/JsonSchemaBodyEditor.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/JsonSchemaBodyEditor.js +33 -0
- package/dist/components/FormTemplateEditor/JsonSchemaBodyEditor.js.map +1 -0
- package/dist/components/FormTemplateEditor/formTemplateValidation.d.ts +32 -0
- package/dist/components/FormTemplateEditor/formTemplateValidation.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/formTemplateValidation.js +75 -0
- package/dist/components/FormTemplateEditor/formTemplateValidation.js.map +1 -0
- package/dist/components/FormTemplateEditor/schemaFieldUtils.d.ts +25 -0
- package/dist/components/FormTemplateEditor/schemaFieldUtils.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/schemaFieldUtils.js +66 -0
- package/dist/components/FormTemplateEditor/schemaFieldUtils.js.map +1 -0
- package/dist/components/FormTemplateEditor/useSaveFormTemplate.d.ts +28 -0
- package/dist/components/FormTemplateEditor/useSaveFormTemplate.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/useSaveFormTemplate.js +39 -0
- package/dist/components/FormTemplateEditor/useSaveFormTemplate.js.map +1 -0
- package/dist/components/FormTemplateEditor/utils.d.ts +21 -0
- package/dist/components/FormTemplateEditor/utils.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/utils.js +27 -0
- package/dist/components/FormTemplateEditor/utils.js.map +1 -0
- package/dist/components/JsonSchemaForm/CustomFormContext.d.ts +1 -1
- package/dist/components/JsonSchemaForm/CustomFormContext.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.css +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.module.scss +6 -1
- package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js +4 -0
- package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.css +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.d.ts +2 -0
- package/dist/components/QueryBuilder/FilterConditionRow.d.ts.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.js +112 -109
- package/dist/components/QueryBuilder/FilterConditionRow.js.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.module.js +10 -11
- package/dist/components/QueryBuilder/FilterConditionRow.module.js.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.module.scss +0 -5
- package/dist/components/QueryBuilder/FilterGroupNode.css +1 -1
- package/dist/components/QueryBuilder/FilterGroupNode.d.ts +4 -0
- package/dist/components/QueryBuilder/FilterGroupNode.d.ts.map +1 -1
- package/dist/components/QueryBuilder/FilterGroupNode.js +85 -51
- package/dist/components/QueryBuilder/FilterGroupNode.js.map +1 -1
- package/dist/components/QueryBuilder/FilterGroupNode.module.js +10 -9
- package/dist/components/QueryBuilder/FilterGroupNode.module.js.map +1 -1
- package/dist/components/QueryBuilder/FilterGroupNode.module.scss +9 -0
- package/dist/components/QueryBuilder/QBDragHandle.d.ts +10 -0
- package/dist/components/QueryBuilder/QBDragHandle.d.ts.map +1 -0
- package/dist/components/QueryBuilder/QBDragHandle.js +22 -0
- package/dist/components/QueryBuilder/QBDragHandle.js.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.d.ts.map +1 -1
- package/dist/components/QueryBuilder/QueryBuilderControls.js +112 -107
- package/dist/components/QueryBuilder/QueryBuilderControls.js.map +1 -1
- package/dist/components/QueryBuilder/qbTreeToReadable.js +11 -11
- package/dist/components/QueryBuilder/queryBuilderDnd.d.ts +27 -0
- package/dist/components/QueryBuilder/queryBuilderDnd.d.ts.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderDnd.js +41 -0
- package/dist/components/QueryBuilder/queryBuilderDnd.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderDrag.css +1 -0
- package/dist/components/QueryBuilder/queryBuilderDrag.module.js +8 -0
- package/dist/components/QueryBuilder/queryBuilderDrag.module.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderDrag.module.scss +12 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.d.ts +13 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.d.ts.map +1 -1
- package/dist/components/QueryBuilder/queryBuilderOperations.js +39 -36
- package/dist/components/QueryBuilder/queryBuilderOperations.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +46 -47
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts +0 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts.map +1 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.js +35 -36
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.js.map +1 -1
- package/dist/components/styled/LeftRightPanel.d.ts.map +1 -1
- package/dist/components/styled/LeftRightPanel.js +19 -2
- package/dist/components/styled/LeftRightPanel.js.map +1 -1
- package/dist/mocks/accessRequirement/mockFormTemplates.d.ts +2 -2
- package/dist/mocks/accessRequirement/mockFormTemplates.d.ts.map +1 -1
- package/dist/mocks/accessRequirement/mockFormTemplates.js +7 -14
- package/dist/mocks/accessRequirement/mockFormTemplates.js.map +1 -1
- package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts +4 -1
- package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts.map +1 -1
- package/dist/mocks/accessRequirement/mockJsonSchemas.js +36 -15
- package/dist/mocks/accessRequirement/mockJsonSchemas.js.map +1 -1
- package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts +41 -14
- package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/asyncJobHandlers.js +53 -44
- package/dist/mocks/msw/handlers/asyncJobHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/chatHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/chatHandlers.js +19 -13
- package/dist/mocks/msw/handlers/chatHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/schemaHandlers.d.ts +2 -1
- package/dist/mocks/msw/handlers/schemaHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/schemaHandlers.js +13 -7
- package/dist/mocks/msw/handlers/schemaHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/searchQueryHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/searchQueryHandlers.js +24 -18
- package/dist/mocks/msw/handlers/searchQueryHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/tableQueryHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/tableQueryHandlers.js +35 -16
- package/dist/mocks/msw/handlers/tableQueryHandlers.js.map +1 -1
- package/dist/synapse-queries/KeyFactory.d.ts +1 -2
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +2 -5
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/dataaccess/index.d.ts +0 -1
- package/dist/synapse-queries/dataaccess/index.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/index.js +3 -4
- package/dist/synapse-queries/index.js +180 -184
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.d.ts +9 -0
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.d.ts.map +1 -0
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.js +22 -0
- package/dist/synapse-queries/jsonschema/useCreateJsonSchema.js.map +1 -0
- package/dist/testutils/vitest.setup.js +18 -9
- package/dist/testutils/vitest.setup.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/APIConstants.d.ts +1 -0
- package/dist/utils/APIConstants.d.ts.map +1 -1
- package/dist/utils/APIConstants.js +2 -2
- package/dist/utils/APIConstants.js.map +1 -1
- package/dist/utils/appendFinalQueryParamKey.d.ts.map +1 -1
- package/dist/utils/appendFinalQueryParamKey.js +4 -1
- package/dist/utils/appendFinalQueryParamKey.js.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts +1 -0
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.js +1 -1
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
- package/dist/utils/functions/ArrayUtils.d.ts +3 -0
- package/dist/utils/functions/ArrayUtils.d.ts.map +1 -1
- package/dist/utils/functions/ArrayUtils.js +7 -1
- package/dist/utils/functions/ArrayUtils.js.map +1 -1
- package/dist/utils/jsonschema/generateDataAccessSchema.d.ts +26 -0
- package/dist/utils/jsonschema/generateDataAccessSchema.d.ts.map +1 -0
- package/dist/utils/jsonschema/generateDataAccessSchema.js +28 -0
- package/dist/utils/jsonschema/generateDataAccessSchema.js.map +1 -0
- package/dist/utils/jsonschema/submissionContext.d.ts +86 -0
- package/dist/utils/jsonschema/submissionContext.d.ts.map +1 -0
- package/dist/utils/jsonschema/submissionContext.js +186 -0
- package/dist/utils/jsonschema/submissionContext.js.map +1 -0
- package/package.json +5 -3
- package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.d.ts +0 -6
- package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.d.ts.map +0 -1
- package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.js +0 -32
- package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.js.map +0 -1
- package/dist/components/entity/page/title_bar/TitleBarProperties.d.ts +0 -9
- package/dist/components/entity/page/title_bar/TitleBarProperties.d.ts.map +0 -1
- package/dist/components/entity/page/title_bar/TitleBarProperties.js +0 -24
- package/dist/components/entity/page/title_bar/TitleBarProperties.js.map +0 -1
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.d.ts +0 -21
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.d.ts.map +0 -1
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.js +0 -34
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.js.map +0 -1
package/dist/SWC.index.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ declare const SynapseComponents: {
|
|
|
90
90
|
HtmlPreview: import("react").LazyExoticComponent<typeof import("./components/FilePreview/HtmlPreview/HtmlPreview").default>;
|
|
91
91
|
IDUReport: import("react").LazyExoticComponent<typeof import("./components/IDUReport/IDUReport").IDUReport>;
|
|
92
92
|
IconSvg: import("react").LazyExoticComponent<typeof import("./components").IconSvg>;
|
|
93
|
+
ImposeRestrictionDialog: import("react").LazyExoticComponent<typeof import("./components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog").default>;
|
|
93
94
|
MetadataTasksPage: import("react").LazyExoticComponent<typeof import("./features/entity/metadata-task/components/MetadataTasksPageRouter").default>;
|
|
94
95
|
OAuthManagement: import("react").LazyExoticComponent<typeof import("./components").OAuthClientManagement>;
|
|
95
96
|
OrientationBanner: import("react").LazyExoticComponent<typeof import("./components").OrientationBanner>;
|
package/dist/SWC.index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SWC.index.d.ts","sourceRoot":"","sources":["../src/SWC.index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAEL,qBAAqB,EACtB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,aAAa,EAAE,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAA;AACnD,OAAO,QAAQ,MAAM,0BAA0B,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAA;AACzE,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,6BAA6B,EAC7B,8BAA8B,EAC/B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AACzE,OAAO,EAEL,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAGxD,OAAO,mBAAmB,CAAA;AAK1B,QAAA,MAAM,YAAY;;CAEjB,CAAA;AAED,QAAA,MAA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V,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,UAAU,EACV,qBAAqB,GACtB,CAAA"}
|
package/dist/SWC.index.js
CHANGED
|
@@ -75,6 +75,7 @@ var x = { BackendDestinationEnum: r }, S = {
|
|
|
75
75
|
HtmlPreview: b(() => import("./components/FilePreview/HtmlPreview/HtmlPreview.js")),
|
|
76
76
|
IDUReport: b(() => import("./components/IDUReport/IDUReport.js")),
|
|
77
77
|
IconSvg: b(() => import("./components/IconSvg/IconSvg.js")),
|
|
78
|
+
ImposeRestrictionDialog: b(() => import("./components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.js")),
|
|
78
79
|
MetadataTasksPage: b(() => import("./features/entity/metadata-task/components/MetadataTasksPageRouter.js")),
|
|
79
80
|
OAuthManagement: b(() => import("./components/OAuthClientManagement/OAuthManagement.js")),
|
|
80
81
|
OrientationBanner: b(() => import("./components/OrientationBanner/OrientationBanner.js")),
|
|
@@ -116,7 +117,7 @@ var x = { BackendDestinationEnum: r }, S = {
|
|
|
116
117
|
sendSearchResultsReturnedEvent: y,
|
|
117
118
|
sendSearchResultReturnedEvent: v,
|
|
118
119
|
sendSearchResultClickedEvent: _
|
|
119
|
-
}, T = "4.0.
|
|
120
|
+
}, T = "4.0.41";
|
|
120
121
|
//#endregion
|
|
121
122
|
export { w as Analytics, a as HttpClient, d as Palettes, o as SynapseClient, C as SynapseComponents, n as SynapseConstants, S as SynapseContext, x as SynapseEnums, m as SynapseQueries, T as SynapseReactClientVersion, p as SynapseSessionManager, i as xssOptions };
|
|
122
123
|
|
package/dist/SWC.index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SWC.index.js","names":[],"sources":["../src/SWC.index.ts"],"sourcesContent":["/**\n * SWC.index.ts represents the entry point for the Synapse React Client library as it is published to NPM and\n * used by SynapseWebClient.\n *\n * If you wish to export a component or other object to be used by SynapseWebClient, you should add it to this file.\n */\n\nimport { lazy } from 'react'\nimport {\n displayToast,\n SynapseToastContainer,\n} from './components/ToastMessage/ToastMessage'\nimport SynapseClient, { HttpClient } from './synapse-client'\nimport * as SynapseQueries from './synapse-queries'\nimport Palettes from './theme/palette/Palettes'\nimport { SynapseConstants } from './utils'\nimport { sendAnalyticsEvent } from './utils/analytics/sendAnalyticsEvent'\nimport {\n sendSearchQuerySubmittedEvent,\n sendSearchResultClickedEvent,\n sendSearchResultReturnedEvent,\n sendSearchResultsReturnedEvent,\n} from './utils/analytics/sendSearchEvent'\nimport { FullContextProvider } from './utils/context/FullContextProvider'\nimport {\n SynapseContextConsumer,\n SynapseContextProvider,\n useSynapseContext,\n} from './utils/context/SynapseContext'\nimport { BackendDestinationEnum } from './utils/functions'\nimport { xssOptions } from './utils/functions/SanitizeHtmlUtils'\nimport { getCurrentCookiePreferences } from './utils/hooks'\nimport { SynapseSessionManager } from './utils/AppUtils'\n\n// Also include scss in the bundle\nimport './style/main.scss'\n\n// Injected at build time by Vite's `define`\ndeclare const __SRC_VERSION__: string\n\nconst SynapseEnums = {\n BackendDestinationEnum,\n}\n\nconst SynapseContext = {\n FullContextProvider,\n SynapseContextProvider,\n SynapseContextConsumer,\n useSynapseContext,\n}\n\nconst SynapseComponents = {\n AccessRequirementAclEditor: lazy(\n () => import('./components/AccessRequirementAclEditor'),\n ),\n AccessRequirementList: lazy(\n () => import('./components/AccessRequirementList/AccessRequirementList'),\n ),\n AccessRequirementRelatedProjectsList: lazy(\n () => import('./components/AccessRequirementRelatedProjectsList'),\n ),\n AccountLevelBadges: lazy(\n () => import('./components/AccountLevelBadges/AccountLevelBadges'),\n ),\n AddToDownloadListConfirmationAlert: lazy(\n () =>\n import('./components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert'),\n ),\n AvailableEvaluationQueueList: lazy(\n () =>\n import('./components/ChallengeSubmission/AvailableEvaluationQueueList'),\n ),\n CertificationQuiz: lazy(\n () => import('./components/CertificationQuiz/CertificationQuiz'),\n ),\n CookiesNotification: lazy(() => import('./components/CookiesNotification')),\n CreateOrUpdateAccessRequirementWizard: lazy(\n () => import('./components/CreateOrUpdateAccessRequirementWizard'),\n ),\n CreateOrUpdateDoiModal: lazy(\n () => import('./components/doi/CreateOrUpdateDoiModal'),\n ),\n CreateTableFromCsvDialog: lazy(\n () => import('./components/table/CsvPreview/CreateTableFromCsvDialog'),\n ),\n CreateTableViewWizard: lazy(\n () => import('./components/CreateTableViewWizard/CreateTableViewWizard'),\n ),\n CreatedByModifiedBy: lazy(\n () => import('./components/entity/page/CreatedByModifiedBy'),\n ),\n CsvPreview: lazy(() => import('./components/table/CsvPreview/CsvPreview')),\n CuratorDashboard: lazy(\n () => import('./features/curator/dashboard/CuratorDashboardRouter'),\n ),\n DatasetItemsEditor: lazy(\n () => import('./components/SynapseTable/datasets/DatasetItemsEditor'),\n ),\n DiscussionThread: lazy(() => import('./components/Forum/DiscussionThread')),\n DiscussionEmpty: lazy(() => import('./components/Forum/DiscussionEmpty')),\n DownloadCartPage: lazy(\n () => import('./components/DownloadCart/DownloadCartPage'),\n ),\n EntityAclEditorModal: lazy(\n () => import('./components/EntityAclEditor/EntityAclEditorModal'),\n ),\n EntityActionMenu: lazy(\n () => import('./components/entity/page/action_menu/EntityActionMenu'),\n ),\n EntityBadgeIcons: lazy(\n () => import('./components/EntityBadgeIcons/EntityBadgeIcons'),\n ),\n EntityCitation: lazy(() => import('./components/EntityCitation')),\n ProjectInfo: lazy(() => import('./components/ProjectInfo/ProjectInfo')),\n EntityFinder: lazy(() => import('./components/EntityFinder/EntityFinder')),\n EntityForm: lazy(() => import('./components/EntityForm/EntityForm')),\n EntityHeaderTable: lazy(() => import('./components/EntityHeaderTable')),\n EntityModal: lazy(() => import('./components/entity/metadata/EntityModal')),\n EntityPageBreadcrumbs: lazy(\n () => import('./components/entity/page/breadcrumbs/EntityPageBreadcrumbs'),\n ),\n EntityPageTitleBar: lazy(\n () => import('./components/entity/page/title_bar/EntityPageTitleBar'),\n ),\n EntityTreeTable: lazy(\n () => import('./components/EntityTreeTable/EntityTreeTable'),\n ),\n EntitySidebar: lazy(() => import('./components/EntitySidebar/EntitySidebar')),\n EntityTypeIcon: lazy(() => import('./components/EntityIcon')),\n EntityUploadModal: lazy(\n () => import('./components/EntityUpload/EntityUploadModal'),\n ),\n EntityViewScopeEditorModal: lazy(\n () =>\n import('./components/EntityViewScopeEditor/EntityViewScopeEditorModal'),\n ),\n CreateProjectModal: lazy(() =>\n import('./components/CreateProjectModal/CreateProjectModal').then(m => ({\n default: m.CreateProjectModal,\n })),\n ),\n ErrorPage: lazy(() => import('./components/error/ErrorPage')),\n EvaluationCard: lazy(() => import('./components/Evaluation/EvaluationCard')),\n EvaluationEditorPage: lazy(\n () => import('./components/Evaluation/EvaluationEditorPage'),\n ),\n FavoritesPage: lazy(() => import('./components/favorites/FavoritesPage')),\n ForumSearch: lazy(() => import('./components/ForumSearch/ForumSearch')),\n FullWidthAlert: lazy(\n () => import('./components/FullWidthAlert/FullWidthAlert'),\n ),\n GoogleAnalytics: lazy(\n () => import('./components/GoogleAnalytics/GoogleAnalytics'),\n ),\n GovernanceMarkdownGithub: lazy(\n () => import('./components/Markdown/GovernanceMarkdownGithub'),\n ),\n GridPage: lazy(() => import('./features/curator/GridPage/GridPage')),\n HasAccess: lazy(() => import('./components/HasAccess/HasAccessV2')),\n HelpPopover: lazy(() => import('./components/HelpPopover/HelpPopover')),\n HtmlPreview: lazy(\n () => import('./components/FilePreview/HtmlPreview/HtmlPreview'),\n ),\n IDUReport: lazy(() => import('./components/IDUReport/IDUReport')),\n IconSvg: lazy(() => import('./components/IconSvg/IconSvg')),\n MetadataTasksPage: lazy(\n () =>\n import('./features/entity/metadata-task/components/MetadataTasksPageRouter'),\n ),\n OAuthManagement: lazy(\n () => import('./components/OAuthClientManagement/OAuthManagement'),\n ),\n OrientationBanner: lazy(\n () => import('./components/OrientationBanner/OrientationBanner'),\n ),\n PageProgress: lazy(() => import('./components/PageProgress/PageProgress')),\n ProjectDataAvailability: lazy(\n () => import('./components/ProjectStorage/ProjectDataAvailability'),\n ),\n ProjectVisibilityChip: lazy(\n () => import('./components/ProjectVisibilityChip/ProjectVisibilityChip'),\n ),\n ProvenanceGraph: lazy(\n () => import('./components/ProvenanceGraph/ProvenanceGraph'),\n ),\n QueryWrapperPlotNav: lazy(\n () => import('./components/QueryWrapperPlotNav/QueryWrapperPlotNav'),\n ),\n RejectProfileValidationRequestModal: lazy(\n () => import('./components/dataaccess/RejectProfileValidationRequestModal'),\n ),\n ReviewerDashboard: lazy(\n () => import('./components/dataaccess/ReviewerDashboard'),\n ),\n SearchQueryWrapperPlotNav: lazy(\n () =>\n import('./components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav'),\n ),\n ShareThisPage: lazy(() => import('./components/ShareThisPage')),\n SkeletonButton: lazy(() => import('./components/Skeleton/SkeletonButton')),\n SqlDefinedTableEditorModal: lazy(\n () =>\n import('./components/SqlDefinedTableEditor/SqlDefinedTableEditorModal'),\n ),\n StandaloneQueryWrapper: lazy(\n () => import('./components/StandaloneQueryWrapper/StandaloneQueryWrapper'),\n ),\n StatisticsPlot: lazy(() => import('./components/StatisticsPlot')),\n SubmissionViewScopeEditorModal: lazy(\n () =>\n import('./components/SubmissionViewScopeEditor/SubmissionViewScopeEditorModal'),\n ),\n SubscriptionPage: lazy(() => import('./components/SubscriptionPage')),\n SynapseChat: lazy(() => import('./components/SynapseChat/SynapseChat')),\n SynapseGrid: lazy(() => import('./components/DataGrid/SynapseGrid')),\n SynapseFooter: lazy(() => import('./components/SynapseFooter/SynapseFooter')),\n SynapseHomepageV2: lazy(\n () => import('./components/SynapseHomepageV2/SynapseHomepageV2'),\n ),\n SynapseNavDrawer: lazy(\n () => import('./components/SynapseNavDrawer/SynapseNavDrawer'),\n ),\n SynapsePlansPage: lazy(\n () => import('./components/SynapseHomepageV2/SynapsePlansPage'),\n ),\n SynapsePortalBanners: lazy(\n () => import('./components/SynapsePortalBanners/SynapsePortalBanners'),\n ),\n SynapseSearchPage: lazy(\n () => import('./components/SynapseSearchPageResults/SynapseSearchPage'),\n ),\n SynapseToastContainer,\n TableColumnSchemaEditor: lazy(\n () =>\n import('./components/TableColumnSchemaEditor/TableColumnSchemaEditor'),\n ),\n TrashCanList: lazy(() => import('./components/trash/TrashCanList')),\n UpdateTableWithCsvDialog: lazy(\n () => import('./components/table/CsvPreview/UpdateTableWithCsvDialog'),\n ),\n UserAccessRequestHistoryPlace: lazy(\n () =>\n import('./components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace'),\n ),\n UserCard: lazy(() => import('./components/UserCard/UserCard')),\n UserProfileLinks: lazy(\n () => import('./components/UserProfileLinks/UserProfileLinks'),\n ),\n displayToast,\n getCurrentCookiePreferences,\n}\n\nconst Analytics = {\n sendAnalyticsEvent,\n sendSearchQuerySubmittedEvent,\n sendSearchResultsReturnedEvent,\n sendSearchResultReturnedEvent,\n sendSearchResultClickedEvent,\n}\n\n// Include the version in the build\nconst SynapseReactClientVersion = __SRC_VERSION__\n\nexport {\n Analytics,\n HttpClient,\n SynapseReactClientVersion,\n SynapseComponents,\n SynapseConstants,\n SynapseClient,\n SynapseContext,\n SynapseEnums,\n SynapseQueries,\n Palettes,\n xssOptions,\n SynapseSessionManager,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,IAAM,IAAe,EACnB,0BACF,GAEM,IAAiB;CACrB;CACA;CACA;CACA;AACF,GAEM,IAAoB;CACxB,4BAA4B,QACpB,OAAO,mDACf;CACA,uBAAuB,QACf,OAAO,8DACf;CACA,sCAAsC,QAC9B,OAAO,6DACf;CACA,oBAAoB,QACZ,OAAO,wDACf;CACA,oCAAoC,QAEhC,OAAO,sGACX;CACA,8BAA8B,QAE1B,OAAO,mEACX;CACA,mBAAmB,QACX,OAAO,sDACf;CACA,qBAAqB,QAAW,OAAO,4CAAmC;CAC1E,uCAAuC,QAC/B,OAAO,8D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+
{"version":3,"file":"SWC.index.js","names":[],"sources":["../src/SWC.index.ts"],"sourcesContent":["/**\n * SWC.index.ts represents the entry point for the Synapse React Client library as it is published to NPM and\n * used by SynapseWebClient.\n *\n * If you wish to export a component or other object to be used by SynapseWebClient, you should add it to this file.\n */\n\nimport { lazy } from 'react'\nimport {\n displayToast,\n SynapseToastContainer,\n} from './components/ToastMessage/ToastMessage'\nimport SynapseClient, { HttpClient } from './synapse-client'\nimport * as SynapseQueries from './synapse-queries'\nimport Palettes from './theme/palette/Palettes'\nimport { SynapseConstants } from './utils'\nimport { sendAnalyticsEvent } from './utils/analytics/sendAnalyticsEvent'\nimport {\n sendSearchQuerySubmittedEvent,\n sendSearchResultClickedEvent,\n sendSearchResultReturnedEvent,\n sendSearchResultsReturnedEvent,\n} from './utils/analytics/sendSearchEvent'\nimport { FullContextProvider } from './utils/context/FullContextProvider'\nimport {\n SynapseContextConsumer,\n SynapseContextProvider,\n useSynapseContext,\n} from './utils/context/SynapseContext'\nimport { BackendDestinationEnum } from './utils/functions'\nimport { xssOptions } from './utils/functions/SanitizeHtmlUtils'\nimport { getCurrentCookiePreferences } from './utils/hooks'\nimport { SynapseSessionManager } from './utils/AppUtils'\n\n// Also include scss in the bundle\nimport './style/main.scss'\n\n// Injected at build time by Vite's `define`\ndeclare const __SRC_VERSION__: string\n\nconst SynapseEnums = {\n BackendDestinationEnum,\n}\n\nconst SynapseContext = {\n FullContextProvider,\n SynapseContextProvider,\n SynapseContextConsumer,\n useSynapseContext,\n}\n\nconst SynapseComponents = {\n AccessRequirementAclEditor: lazy(\n () => import('./components/AccessRequirementAclEditor'),\n ),\n AccessRequirementList: lazy(\n () => import('./components/AccessRequirementList/AccessRequirementList'),\n ),\n AccessRequirementRelatedProjectsList: lazy(\n () => import('./components/AccessRequirementRelatedProjectsList'),\n ),\n AccountLevelBadges: lazy(\n () => import('./components/AccountLevelBadges/AccountLevelBadges'),\n ),\n AddToDownloadListConfirmationAlert: lazy(\n () =>\n import('./components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert'),\n ),\n AvailableEvaluationQueueList: lazy(\n () =>\n import('./components/ChallengeSubmission/AvailableEvaluationQueueList'),\n ),\n CertificationQuiz: lazy(\n () => import('./components/CertificationQuiz/CertificationQuiz'),\n ),\n CookiesNotification: lazy(() => import('./components/CookiesNotification')),\n CreateOrUpdateAccessRequirementWizard: lazy(\n () => import('./components/CreateOrUpdateAccessRequirementWizard'),\n ),\n CreateOrUpdateDoiModal: lazy(\n () => import('./components/doi/CreateOrUpdateDoiModal'),\n ),\n CreateTableFromCsvDialog: lazy(\n () => import('./components/table/CsvPreview/CreateTableFromCsvDialog'),\n ),\n CreateTableViewWizard: lazy(\n () => import('./components/CreateTableViewWizard/CreateTableViewWizard'),\n ),\n CreatedByModifiedBy: lazy(\n () => import('./components/entity/page/CreatedByModifiedBy'),\n ),\n CsvPreview: lazy(() => import('./components/table/CsvPreview/CsvPreview')),\n CuratorDashboard: lazy(\n () => import('./features/curator/dashboard/CuratorDashboardRouter'),\n ),\n DatasetItemsEditor: lazy(\n () => import('./components/SynapseTable/datasets/DatasetItemsEditor'),\n ),\n DiscussionThread: lazy(() => import('./components/Forum/DiscussionThread')),\n DiscussionEmpty: lazy(() => import('./components/Forum/DiscussionEmpty')),\n DownloadCartPage: lazy(\n () => import('./components/DownloadCart/DownloadCartPage'),\n ),\n EntityAclEditorModal: lazy(\n () => import('./components/EntityAclEditor/EntityAclEditorModal'),\n ),\n EntityActionMenu: lazy(\n () => import('./components/entity/page/action_menu/EntityActionMenu'),\n ),\n EntityBadgeIcons: lazy(\n () => import('./components/EntityBadgeIcons/EntityBadgeIcons'),\n ),\n EntityCitation: lazy(() => import('./components/EntityCitation')),\n ProjectInfo: lazy(() => import('./components/ProjectInfo/ProjectInfo')),\n EntityFinder: lazy(() => import('./components/EntityFinder/EntityFinder')),\n EntityForm: lazy(() => import('./components/EntityForm/EntityForm')),\n EntityHeaderTable: lazy(() => import('./components/EntityHeaderTable')),\n EntityModal: lazy(() => import('./components/entity/metadata/EntityModal')),\n EntityPageBreadcrumbs: lazy(\n () => import('./components/entity/page/breadcrumbs/EntityPageBreadcrumbs'),\n ),\n EntityPageTitleBar: lazy(\n () => import('./components/entity/page/title_bar/EntityPageTitleBar'),\n ),\n EntityTreeTable: lazy(\n () => import('./components/EntityTreeTable/EntityTreeTable'),\n ),\n EntitySidebar: lazy(() => import('./components/EntitySidebar/EntitySidebar')),\n EntityTypeIcon: lazy(() => import('./components/EntityIcon')),\n EntityUploadModal: lazy(\n () => import('./components/EntityUpload/EntityUploadModal'),\n ),\n EntityViewScopeEditorModal: lazy(\n () =>\n import('./components/EntityViewScopeEditor/EntityViewScopeEditorModal'),\n ),\n CreateProjectModal: lazy(() =>\n import('./components/CreateProjectModal/CreateProjectModal').then(m => ({\n default: m.CreateProjectModal,\n })),\n ),\n ErrorPage: lazy(() => import('./components/error/ErrorPage')),\n EvaluationCard: lazy(() => import('./components/Evaluation/EvaluationCard')),\n EvaluationEditorPage: lazy(\n () => import('./components/Evaluation/EvaluationEditorPage'),\n ),\n FavoritesPage: lazy(() => import('./components/favorites/FavoritesPage')),\n ForumSearch: lazy(() => import('./components/ForumSearch/ForumSearch')),\n FullWidthAlert: lazy(\n () => import('./components/FullWidthAlert/FullWidthAlert'),\n ),\n GoogleAnalytics: lazy(\n () => import('./components/GoogleAnalytics/GoogleAnalytics'),\n ),\n GovernanceMarkdownGithub: lazy(\n () => import('./components/Markdown/GovernanceMarkdownGithub'),\n ),\n GridPage: lazy(() => import('./features/curator/GridPage/GridPage')),\n HasAccess: lazy(() => import('./components/HasAccess/HasAccessV2')),\n HelpPopover: lazy(() => import('./components/HelpPopover/HelpPopover')),\n HtmlPreview: lazy(\n () => import('./components/FilePreview/HtmlPreview/HtmlPreview'),\n ),\n IDUReport: lazy(() => import('./components/IDUReport/IDUReport')),\n IconSvg: lazy(() => import('./components/IconSvg/IconSvg')),\n ImposeRestrictionDialog: lazy(\n () =>\n import('./components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog'),\n ),\n MetadataTasksPage: lazy(\n () =>\n import('./features/entity/metadata-task/components/MetadataTasksPageRouter'),\n ),\n OAuthManagement: lazy(\n () => import('./components/OAuthClientManagement/OAuthManagement'),\n ),\n OrientationBanner: lazy(\n () => import('./components/OrientationBanner/OrientationBanner'),\n ),\n PageProgress: lazy(() => import('./components/PageProgress/PageProgress')),\n ProjectDataAvailability: lazy(\n () => import('./components/ProjectStorage/ProjectDataAvailability'),\n ),\n ProjectVisibilityChip: lazy(\n () => import('./components/ProjectVisibilityChip/ProjectVisibilityChip'),\n ),\n ProvenanceGraph: lazy(\n () => import('./components/ProvenanceGraph/ProvenanceGraph'),\n ),\n QueryWrapperPlotNav: lazy(\n () => import('./components/QueryWrapperPlotNav/QueryWrapperPlotNav'),\n ),\n RejectProfileValidationRequestModal: lazy(\n () => import('./components/dataaccess/RejectProfileValidationRequestModal'),\n ),\n ReviewerDashboard: lazy(\n () => import('./components/dataaccess/ReviewerDashboard'),\n ),\n SearchQueryWrapperPlotNav: lazy(\n () =>\n import('./components/SearchQueryWrapperPlotNav/SearchQueryWrapperPlotNav'),\n ),\n ShareThisPage: lazy(() => import('./components/ShareThisPage')),\n SkeletonButton: lazy(() => import('./components/Skeleton/SkeletonButton')),\n SqlDefinedTableEditorModal: lazy(\n () =>\n import('./components/SqlDefinedTableEditor/SqlDefinedTableEditorModal'),\n ),\n StandaloneQueryWrapper: lazy(\n () => import('./components/StandaloneQueryWrapper/StandaloneQueryWrapper'),\n ),\n StatisticsPlot: lazy(() => import('./components/StatisticsPlot')),\n SubmissionViewScopeEditorModal: lazy(\n () =>\n import('./components/SubmissionViewScopeEditor/SubmissionViewScopeEditorModal'),\n ),\n SubscriptionPage: lazy(() => import('./components/SubscriptionPage')),\n SynapseChat: lazy(() => import('./components/SynapseChat/SynapseChat')),\n SynapseGrid: lazy(() => import('./components/DataGrid/SynapseGrid')),\n SynapseFooter: lazy(() => import('./components/SynapseFooter/SynapseFooter')),\n SynapseHomepageV2: lazy(\n () => import('./components/SynapseHomepageV2/SynapseHomepageV2'),\n ),\n SynapseNavDrawer: lazy(\n () => import('./components/SynapseNavDrawer/SynapseNavDrawer'),\n ),\n SynapsePlansPage: lazy(\n () => import('./components/SynapseHomepageV2/SynapsePlansPage'),\n ),\n SynapsePortalBanners: lazy(\n () => import('./components/SynapsePortalBanners/SynapsePortalBanners'),\n ),\n SynapseSearchPage: lazy(\n () => import('./components/SynapseSearchPageResults/SynapseSearchPage'),\n ),\n SynapseToastContainer,\n TableColumnSchemaEditor: lazy(\n () =>\n import('./components/TableColumnSchemaEditor/TableColumnSchemaEditor'),\n ),\n TrashCanList: lazy(() => import('./components/trash/TrashCanList')),\n UpdateTableWithCsvDialog: lazy(\n () => import('./components/table/CsvPreview/UpdateTableWithCsvDialog'),\n ),\n UserAccessRequestHistoryPlace: lazy(\n () =>\n import('./components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace'),\n ),\n UserCard: lazy(() => import('./components/UserCard/UserCard')),\n UserProfileLinks: lazy(\n () => import('./components/UserProfileLinks/UserProfileLinks'),\n ),\n displayToast,\n getCurrentCookiePreferences,\n}\n\nconst Analytics = {\n sendAnalyticsEvent,\n sendSearchQuerySubmittedEvent,\n sendSearchResultsReturnedEvent,\n sendSearchResultReturnedEvent,\n sendSearchResultClickedEvent,\n}\n\n// Include the version in the build\nconst SynapseReactClientVersion = __SRC_VERSION__\n\nexport {\n Analytics,\n HttpClient,\n SynapseReactClientVersion,\n SynapseComponents,\n SynapseConstants,\n SynapseClient,\n SynapseContext,\n SynapseEnums,\n SynapseQueries,\n Palettes,\n xssOptions,\n SynapseSessionManager,\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,IAAM,IAAe,EACnB,0BACF,GAEM,IAAiB;CACrB;CACA;CACA;CACA;AACF,GAEM,IAAoB;CACxB,4BAA4B,QACpB,OAAO,mDACf;CACA,uBAAuB,QACf,OAAO,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B,QAErB,OAAO,kEACX;CACA,cAAc,QAAW,OAAO,qCAAkC;CAClE,0BAA0B,QAClB,OAAO,4DACf;CACA,+BAA+B,QAE3B,OAAO,oFACX;CACA,UAAU,QAAW,OAAO,oCAAiC;CAC7D,kBAAkB,QACV,OAAO,oDACf;CACA;CACA;AACF,GAEM,IAAY;CAChB;CACA;CACA;CACA;CACA;AACF,GAGM,IAAA"}
|
package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type ImposeRestrictionFormProps = {
|
|
|
2
2
|
entityId: string;
|
|
3
3
|
open: boolean;
|
|
4
4
|
onClose: () => void;
|
|
5
|
+
onSuccess?: () => void;
|
|
5
6
|
};
|
|
6
7
|
export default function ImposeRestrictionDialog(props: ImposeRestrictionFormProps): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
//# sourceMappingURL=ImposeRestrictionDialog.d.ts.map
|
package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImposeRestrictionDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.tsx"],"names":[],"mappings":"AAeA,MAAM,MAAM,0BAA0B,GAAG;IAEvC,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"ImposeRestrictionDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.tsx"],"names":[],"mappings":"AAeA,MAAM,MAAM,0BAA0B,GAAG;IAEvC,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,KAAK,EAAE,0BAA0B,2CA4FlC"}
|
package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.js
CHANGED
|
@@ -21,29 +21,29 @@ function m(m) {
|
|
|
21
21
|
}),
|
|
22
22
|
"."
|
|
23
23
|
]
|
|
24
|
-
}), { entityId: g, open: _, onClose: v } = m, [
|
|
24
|
+
}), { entityId: g, open: _, onClose: v, onSuccess: y } = m, [b, x] = a(null), { mutate: S, isPending: C } = r({
|
|
25
25
|
onSuccess: () => {
|
|
26
|
-
t("Successfully imposed restriction", "success"), window.open("https://sagebionetworks.jira.com/servicedesk/customer/portal/8/group/15/create/134", "_blank"), v();
|
|
26
|
+
t("Successfully imposed restriction", "success"), window.open("https://sagebionetworks.jira.com/servicedesk/customer/portal/8/group/15/create/134", "_blank"), y?.(), v();
|
|
27
27
|
},
|
|
28
28
|
onError: (e) => {
|
|
29
29
|
t(`Failed to impose restriction: ${e.reason}`, "danger");
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
-
function
|
|
33
|
-
|
|
32
|
+
function w() {
|
|
33
|
+
b ? S(g) : v();
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
35
|
+
function T(e) {
|
|
36
|
+
x(e.target.value === "true");
|
|
37
37
|
}
|
|
38
38
|
return /* @__PURE__ */ f(i, {
|
|
39
39
|
title: "Conditions for Use",
|
|
40
|
-
onConfirm: () =>
|
|
40
|
+
onConfirm: () => w(),
|
|
41
41
|
titleHelpPopoverProps: {
|
|
42
42
|
markdownText: "Conditions for use describes data use requirements that must be fulfilled before downloading.",
|
|
43
43
|
helpUrl: n
|
|
44
44
|
},
|
|
45
|
-
confirmButtonProps: { disabled:
|
|
46
|
-
cancelButtonProps: { disabled:
|
|
45
|
+
confirmButtonProps: { disabled: b == null || C },
|
|
46
|
+
cancelButtonProps: { disabled: C },
|
|
47
47
|
onCancel: () => v(),
|
|
48
48
|
open: _,
|
|
49
49
|
content: /* @__PURE__ */ p(o, {
|
|
@@ -54,8 +54,8 @@ function m(m) {
|
|
|
54
54
|
children: "Is this sensitive human data that must be protected?"
|
|
55
55
|
}),
|
|
56
56
|
/* @__PURE__ */ p(u, {
|
|
57
|
-
value:
|
|
58
|
-
onChange:
|
|
57
|
+
value: b,
|
|
58
|
+
onChange: T,
|
|
59
59
|
children: [/* @__PURE__ */ f(s, {
|
|
60
60
|
control: /* @__PURE__ */ f(l, {}),
|
|
61
61
|
label: "Yes",
|
|
@@ -66,7 +66,7 @@ function m(m) {
|
|
|
66
66
|
value: !1
|
|
67
67
|
})]
|
|
68
68
|
}),
|
|
69
|
-
|
|
69
|
+
b === !1 && /* @__PURE__ */ f(e, {
|
|
70
70
|
variant: "warning",
|
|
71
71
|
isGlobal: !1,
|
|
72
72
|
description: h
|
package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImposeRestrictionDialog.js","names":[],"sources":["../../../../src/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.tsx"],"sourcesContent":["import { useCreateLockAccessRequirement } from '@/synapse-queries'\nimport { SYNAPSE_DOCS_SHARING_SETTINGS_PERMISSIONS_CONDITIONS_FOR_USE_URL } from '@/utils/SynapseConstants'\nimport {\n FormControl,\n FormControlLabel,\n FormLabel,\n Radio,\n RadioGroup,\n Typography,\n} from '@mui/material'\nimport { ChangeEvent, useState } from 'react'\nimport { ConfirmationDialog } from '../../ConfirmationDialog'\nimport FullWidthAlert from '../../FullWidthAlert/FullWidthAlert'\nimport { displayToast } from '../../ToastMessage/ToastMessage'\n\nexport type ImposeRestrictionFormProps = {\n /* The ID of the entity that the user may choose to restrict */\n entityId: string\n open: boolean\n onClose: () => void\n}\n\nexport default function ImposeRestrictionDialog(\n props: ImposeRestrictionFormProps,\n) {\n const NOT_HUMAN_DATA_WARNING = (\n <Typography variant={'smallText1'}>\n Sage Bionetworks does not typically impose conditions for use on non-human\n data unless there is a legal, ethical or regulatory reason to do so. If\n you want to add conditions for use to this content, please contact the\n Synapse Access and Compliance Team (ACT) to discuss at{' '}\n <a href={'mailto:act@sagebase.org'}>act@sagebase.org</a>.\n </Typography>\n )\n\n const { entityId, open, onClose } = props\n const [isSensitiveHumanData, setIsSensitiveHumanData] = useState<\n boolean | null\n >(null)\n\n const {\n mutate: createLockedAccessRequirement,\n isPending: createLockedARIsPending,\n } = useCreateLockAccessRequirement({\n onSuccess: () => {\n displayToast('Successfully imposed restriction', 'success')\n // PORTALS-2664: Send the user to the ACT Service Desk\n // so they can tell ACT more information about what kind of\n // Conditions For Use (or Data Access Restriction) should be\n // added.\n window.open(\n 'https://sagebionetworks.jira.com/servicedesk/customer/portal/8/group/15/create/134',\n '_blank',\n )\n onClose()\n },\n onError: e => {\n displayToast(`Failed to impose restriction: ${e.reason}`, 'danger')\n },\n })\n\n function okClickedHandler() {\n if (isSensitiveHumanData) {\n createLockedAccessRequirement(entityId)\n } else {\n onClose()\n }\n }\n\n function radioOnChangeHandler(event: ChangeEvent<HTMLInputElement>) {\n setIsSensitiveHumanData((event.target as HTMLInputElement).value === 'true')\n }\n\n return (\n <ConfirmationDialog\n title={'Conditions for Use'}\n onConfirm={() => okClickedHandler()}\n titleHelpPopoverProps={{\n markdownText:\n 'Conditions for use describes data use requirements that must be fulfilled before downloading.',\n helpUrl:\n SYNAPSE_DOCS_SHARING_SETTINGS_PERMISSIONS_CONDITIONS_FOR_USE_URL,\n }}\n confirmButtonProps={{\n disabled: isSensitiveHumanData == null || createLockedARIsPending,\n }}\n cancelButtonProps={{\n disabled: createLockedARIsPending,\n }}\n onCancel={() => onClose()}\n open={open}\n content={\n <FormControl sx={{ width: '100%' }}>\n <FormLabel id=\"demo-radio-buttons-group-label\">\n Is this sensitive human data that must be protected?\n </FormLabel>\n <RadioGroup\n value={isSensitiveHumanData}\n onChange={radioOnChangeHandler}\n >\n <FormControlLabel control={<Radio />} label={'Yes'} value={true} />\n <FormControlLabel control={<Radio />} label={'No'} value={false} />\n </RadioGroup>\n {isSensitiveHumanData === false && (\n <FullWidthAlert\n variant={'warning'}\n isGlobal={false}\n description={NOT_HUMAN_DATA_WARNING}\n />\n )}\n </FormControl>\n }\n />\n )\n}\n"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ImposeRestrictionDialog.js","names":[],"sources":["../../../../src/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.tsx"],"sourcesContent":["import { useCreateLockAccessRequirement } from '@/synapse-queries'\nimport { SYNAPSE_DOCS_SHARING_SETTINGS_PERMISSIONS_CONDITIONS_FOR_USE_URL } from '@/utils/SynapseConstants'\nimport {\n FormControl,\n FormControlLabel,\n FormLabel,\n Radio,\n RadioGroup,\n Typography,\n} from '@mui/material'\nimport { ChangeEvent, useState } from 'react'\nimport { ConfirmationDialog } from '../../ConfirmationDialog'\nimport FullWidthAlert from '../../FullWidthAlert/FullWidthAlert'\nimport { displayToast } from '../../ToastMessage/ToastMessage'\n\nexport type ImposeRestrictionFormProps = {\n /* The ID of the entity that the user may choose to restrict */\n entityId: string\n open: boolean\n onClose: () => void\n onSuccess?: () => void\n}\n\nexport default function ImposeRestrictionDialog(\n props: ImposeRestrictionFormProps,\n) {\n const NOT_HUMAN_DATA_WARNING = (\n <Typography variant={'smallText1'}>\n Sage Bionetworks does not typically impose conditions for use on non-human\n data unless there is a legal, ethical or regulatory reason to do so. If\n you want to add conditions for use to this content, please contact the\n Synapse Access and Compliance Team (ACT) to discuss at{' '}\n <a href={'mailto:act@sagebase.org'}>act@sagebase.org</a>.\n </Typography>\n )\n\n const { entityId, open, onClose, onSuccess } = props\n const [isSensitiveHumanData, setIsSensitiveHumanData] = useState<\n boolean | null\n >(null)\n\n const {\n mutate: createLockedAccessRequirement,\n isPending: createLockedARIsPending,\n } = useCreateLockAccessRequirement({\n onSuccess: () => {\n displayToast('Successfully imposed restriction', 'success')\n // PORTALS-2664: Send the user to the ACT Service Desk\n // so they can tell ACT more information about what kind of\n // Conditions For Use (or Data Access Restriction) should be\n // added.\n window.open(\n 'https://sagebionetworks.jira.com/servicedesk/customer/portal/8/group/15/create/134',\n '_blank',\n )\n onSuccess?.()\n onClose()\n },\n onError: e => {\n displayToast(`Failed to impose restriction: ${e.reason}`, 'danger')\n },\n })\n\n function okClickedHandler() {\n if (isSensitiveHumanData) {\n createLockedAccessRequirement(entityId)\n } else {\n onClose()\n }\n }\n\n function radioOnChangeHandler(event: ChangeEvent<HTMLInputElement>) {\n setIsSensitiveHumanData((event.target as HTMLInputElement).value === 'true')\n }\n\n return (\n <ConfirmationDialog\n title={'Conditions for Use'}\n onConfirm={() => okClickedHandler()}\n titleHelpPopoverProps={{\n markdownText:\n 'Conditions for use describes data use requirements that must be fulfilled before downloading.',\n helpUrl:\n SYNAPSE_DOCS_SHARING_SETTINGS_PERMISSIONS_CONDITIONS_FOR_USE_URL,\n }}\n confirmButtonProps={{\n disabled: isSensitiveHumanData == null || createLockedARIsPending,\n }}\n cancelButtonProps={{\n disabled: createLockedARIsPending,\n }}\n onCancel={() => onClose()}\n open={open}\n content={\n <FormControl sx={{ width: '100%' }}>\n <FormLabel id=\"demo-radio-buttons-group-label\">\n Is this sensitive human data that must be protected?\n </FormLabel>\n <RadioGroup\n value={isSensitiveHumanData}\n onChange={radioOnChangeHandler}\n >\n <FormControlLabel control={<Radio />} label={'Yes'} value={true} />\n <FormControlLabel control={<Radio />} label={'No'} value={false} />\n </RadioGroup>\n {isSensitiveHumanData === false && (\n <FullWidthAlert\n variant={'warning'}\n isGlobal={false}\n description={NOT_HUMAN_DATA_WARNING}\n />\n )}\n </FormControl>\n }\n />\n )\n}\n"],"mappings":";;;;;;;;;;;AAuBA,SAAwB,EACtB,GACA;CACA,IAAM,IACJ,kBAAC,GAAD;EAAY,SAAS;YAArB;GAAmC;GAIsB;GACvD,kBAAC,KAAD;IAAG,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/Aridhia/AridhiaAccessStatus.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AridhiaAccessStatus.d.ts","sourceRoot":"","sources":["../../../src/components/Aridhia/AridhiaAccessStatus.tsx"],"names":[],"mappings":"AAoBA,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,+FAA+F;IAC/F,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAkK1E"}
|
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
import { SRC_SIGN_IN_CLASS as e } from "../../utils/SynapseConstants.js";
|
|
2
2
|
import { useSynapseContext as t } from "../../utils/context/SynapseContext.js";
|
|
3
3
|
import "../../utils/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { useGetFeatureFlag as n } from "../../synapse-queries/featureflags/useGetFeatureFlag.js";
|
|
5
|
+
import "../../synapse-queries/index.js";
|
|
6
|
+
import { DialogBase as r } from "../DialogBase.js";
|
|
7
|
+
import i, { RestrictionUiType as a } from "../HasAccess/AccessIcon.js";
|
|
8
|
+
import { FeatureFlagEnum as o } from "../../utils/featureflag/FeatureFlags.js";
|
|
9
|
+
import { findRequestForDataset as s, getRestrictionUiTypeFromAridhiaRequest as c } from "./aridhiaAccessStatusUtils.js";
|
|
10
|
+
import { getAridhiaFairPortalDatasetUrl as l } from "./aridhiaFairPortalUrls.js";
|
|
11
|
+
import { useGetAridhiaRequests as u } from "../../aridhia-queries/useGetAridhiaRequests.js";
|
|
9
12
|
import "../../aridhia-queries/index.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { useAridhiaDarWizardParts as
|
|
13
|
-
import { useState as
|
|
14
|
-
import { Button as
|
|
15
|
-
import { Fragment as
|
|
13
|
+
import d from "./AridhiaDarStatusPopover.js";
|
|
14
|
+
import f from "./RdcaDapEligibilityDialog.js";
|
|
15
|
+
import { useAridhiaDarWizardParts as p } from "./DarWizard/AridhiaDarWizard.js";
|
|
16
|
+
import { useState as m } from "react";
|
|
17
|
+
import { Button as h } from "@mui/material";
|
|
18
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
16
19
|
//#region src/components/Aridhia/AridhiaAccessStatus.tsx
|
|
17
|
-
var
|
|
20
|
+
var y = {
|
|
18
21
|
p: "0px",
|
|
19
22
|
minWidth: "unset"
|
|
20
23
|
};
|
|
21
|
-
function
|
|
22
|
-
let { datasetCode:
|
|
23
|
-
enabled:
|
|
24
|
-
onClose: () =>
|
|
24
|
+
function b(b) {
|
|
25
|
+
let { datasetCode: x, fairPortalUrl: S } = b, { isAuthenticated: C } = t(), w = n(o.AMPALS_RDCA_DAP_FORM_ENABLED), { data: T, isLoading: E, isError: D, error: O } = u(), [k, A] = m(null), [j, M] = m(!1), [N, P] = m(!1), { content: F, actions: I } = p({ datasetCode: x }, {
|
|
26
|
+
enabled: N,
|
|
27
|
+
onClose: () => P(!1)
|
|
25
28
|
});
|
|
26
|
-
if (!
|
|
27
|
-
sx:
|
|
29
|
+
if (!C) return /* @__PURE__ */ _(h, {
|
|
30
|
+
sx: y,
|
|
28
31
|
className: e,
|
|
29
32
|
onClick: (e) => {
|
|
30
33
|
if (e.isTrusted) {
|
|
@@ -32,53 +35,53 @@ function v(v) {
|
|
|
32
35
|
e.currentTarget.dispatchEvent(t);
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
|
-
children: /* @__PURE__ */
|
|
38
|
+
children: /* @__PURE__ */ _(i, { restrictionUiType: a.AccessBlockedToAnonymous })
|
|
36
39
|
});
|
|
37
|
-
let
|
|
38
|
-
if (!
|
|
39
|
-
sx:
|
|
40
|
-
onClick: () =>
|
|
40
|
+
let L = null;
|
|
41
|
+
if (!E) if (D && O.isEligibilityFailure) L = /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(h, {
|
|
42
|
+
sx: y,
|
|
43
|
+
onClick: () => M(!0),
|
|
41
44
|
"aria-label": "Link your RDCA-DAP account",
|
|
42
|
-
children: /* @__PURE__ */
|
|
43
|
-
}), /* @__PURE__ */
|
|
44
|
-
open:
|
|
45
|
-
onClose: () =>
|
|
45
|
+
children: /* @__PURE__ */ _(i, { restrictionUiType: a.AccessBlockedByRDCADAPAccountNotLinked })
|
|
46
|
+
}), /* @__PURE__ */ _(f, {
|
|
47
|
+
open: j,
|
|
48
|
+
onClose: () => M(!1)
|
|
46
49
|
})] });
|
|
47
50
|
else {
|
|
48
|
-
let e =
|
|
49
|
-
|
|
50
|
-
href:
|
|
51
|
+
let e = s(T?.items ?? [], x), t = c(e), n = /* @__PURE__ */ _(i, { restrictionUiType: t });
|
|
52
|
+
t === a.AccessibleOnRDCADAP || !e && !w ? L = S ? /* @__PURE__ */ _("a", {
|
|
53
|
+
href: l(S, x),
|
|
51
54
|
target: "_blank",
|
|
52
55
|
rel: "noopener noreferrer",
|
|
53
56
|
children: n
|
|
54
|
-
}) : n : e ? /* @__PURE__ */ g
|
|
55
|
-
sx:
|
|
56
|
-
onClick: (e) =>
|
|
57
|
+
}) : n : e ? L = /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(h, {
|
|
58
|
+
sx: y,
|
|
59
|
+
onClick: (e) => A(e.currentTarget),
|
|
57
60
|
"aria-label": "View data access request status",
|
|
58
61
|
children: n
|
|
59
|
-
}), /* @__PURE__ */
|
|
60
|
-
open: !!
|
|
61
|
-
anchorEl:
|
|
62
|
-
onClose: () =>
|
|
62
|
+
}), /* @__PURE__ */ _(d, {
|
|
63
|
+
open: !!k,
|
|
64
|
+
anchorEl: k,
|
|
65
|
+
onClose: () => A(null),
|
|
63
66
|
request: e,
|
|
64
|
-
fairPortalUrl:
|
|
65
|
-
})] }) : /* @__PURE__ */ h
|
|
66
|
-
sx:
|
|
67
|
-
onClick: () =>
|
|
67
|
+
fairPortalUrl: S
|
|
68
|
+
})] }) : w && (L = /* @__PURE__ */ _(h, {
|
|
69
|
+
sx: y,
|
|
70
|
+
onClick: () => P(!0),
|
|
68
71
|
"aria-label": "Request data access",
|
|
69
72
|
children: n
|
|
70
|
-
});
|
|
73
|
+
}));
|
|
71
74
|
}
|
|
72
|
-
return /* @__PURE__ */ g
|
|
73
|
-
open:
|
|
74
|
-
onCancel: () =>
|
|
75
|
+
return /* @__PURE__ */ v(g, { children: [L, /* @__PURE__ */ _(r, {
|
|
76
|
+
open: N,
|
|
77
|
+
onCancel: () => P(!1),
|
|
75
78
|
maxWidth: "md",
|
|
76
79
|
title: "Request Data Access",
|
|
77
|
-
content:
|
|
78
|
-
actions:
|
|
80
|
+
content: F,
|
|
81
|
+
actions: I
|
|
79
82
|
})] });
|
|
80
83
|
}
|
|
81
84
|
//#endregion
|
|
82
|
-
export {
|
|
85
|
+
export { b as default };
|
|
83
86
|
|
|
84
87
|
//# sourceMappingURL=AridhiaAccessStatus.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AridhiaAccessStatus.js","names":[],"sources":["../../../src/components/Aridhia/AridhiaAccessStatus.tsx"],"sourcesContent":["import { ReactNode, useState } from 'react'\nimport { useGetAridhiaRequests } from '@/aridhia-queries'\nimport { useSynapseContext } from '@/utils'\nimport { SRC_SIGN_IN_CLASS } from '@/utils/SynapseConstants'\nimport { Button } from '@mui/material'\nimport { DialogBase } from '../DialogBase'\nimport AccessIcon, { RestrictionUiType } from '../HasAccess/AccessIcon'\nimport {\n findRequestForDataset,\n getRestrictionUiTypeFromAridhiaRequest,\n} from './aridhiaAccessStatusUtils'\nimport { getAridhiaFairPortalDatasetUrl } from './aridhiaFairPortalUrls'\nimport AridhiaDarStatusPopover from './AridhiaDarStatusPopover'\nimport { useAridhiaDarWizardParts } from './DarWizard/AridhiaDarWizard'\nimport RdcaDapEligibilityDialog from './RdcaDapEligibilityDialog'\n\nconst buttonSx = { p: '0px', minWidth: 'unset' }\n\nexport type AridhiaAccessStatusProps = {\n /**\n * dataset code\n */\n datasetCode: string\n /** Base URL of the RDCA-DAP FAIR portal's browsable UI, e.g. `https://fair.dap.c-path.org`. */\n fairPortalUrl?: string\n}\n\n/**\n * Component that displays the Aridhia data access request status.\n * If the user is not authenticated with Aridhia, shows a sign-in button.\n * Otherwise, shows the access status based on the data access requests.\n */\nexport default function AridhiaAccessStatus(props: AridhiaAccessStatusProps) {\n const { datasetCode, fairPortalUrl } = props\n const { isAuthenticated } = useSynapseContext()\n\n const {\n data: requestsResponse,\n isLoading,\n isError,\n error,\n } = useGetAridhiaRequests()\n const [popoverAnchorEl, setPopoverAnchorEl] = useState<HTMLElement | null>(\n null,\n )\n const [eligibilityDialogOpen, setEligibilityDialogOpen] = useState(false)\n const [requestDialogOpen, setRequestDialogOpen] = useState(false)\n const { content: wizardContent, actions: wizardActions } =\n useAridhiaDarWizardParts(\n { datasetCode },\n {\n enabled: requestDialogOpen,\n onClose: () => setRequestDialogOpen(false),\n },\n )\n\n if (!isAuthenticated) {\n return (\n <Button\n sx={buttonSx}\n className={SRC_SIGN_IN_CLASS}\n onClick={ev => {\n if (ev.isTrusted) {\n /*\n There is a tricky problem - \n The portals listens to click events for buttons with the class SRC_SIGN_IN_CLASS set, it listens to this event\n so that it can display the login modal.\n\n This button has an svg inside of it which is problematic because more often than not clicking this button will \n instead click that svg. The event listener in the portals will break as a result.\n\n Though the svg may get the actual click event, because of event bubbling this button will get its onClick called.\n Once onClick is called we can manually dispatch an event off of this button. This does pose a problem, we end up in a \n infinite loop because this button keeps dispatching click events, so we can use the isTrusted to recognize if onClick was\n triggered programmatically or by user click. Lastly, using { bubbles: true } ensures the event bubbles up to the document level.\n\n */\n const clickEvent = new MouseEvent('click', { bubbles: true })\n ev.currentTarget.dispatchEvent(clickEvent)\n }\n }}\n >\n <AccessIcon\n restrictionUiType={RestrictionUiType.AccessBlockedToAnonymous}\n />\n </Button>\n )\n }\n\n let content: ReactNode = null\n if (isLoading) {\n // Show loading state — nothing to render yet.\n } else if (isError && error.isEligibilityFailure) {\n // The token exchange (or any other request) failed because this user has no linked\n // RDCA-DAP account yet — the DAR wizard is unreachable until that's resolved.\n content = (\n <>\n <Button\n sx={buttonSx}\n onClick={() => setEligibilityDialogOpen(true)}\n aria-label=\"Link your RDCA-DAP account\"\n >\n <AccessIcon\n restrictionUiType={\n RestrictionUiType.AccessBlockedByRDCADAPAccountNotLinked\n }\n />\n </Button>\n <RdcaDapEligibilityDialog\n open={eligibilityDialogOpen}\n onClose={() => setEligibilityDialogOpen(false)}\n />\n </>\n )\n } else {\n // Check if there's a request for this dataset\n const entityRequest = findRequestForDataset(\n requestsResponse?.items ?? [],\n datasetCode,\n )\n const restrictionUiType =\n getRestrictionUiTypeFromAridhiaRequest(entityRequest)\n const icon = <AccessIcon restrictionUiType={restrictionUiType} />\n\n if (restrictionUiType === RestrictionUiType.AccessibleOnRDCADAP) {\n // Approved, or the
|
|
1
|
+
{"version":3,"file":"AridhiaAccessStatus.js","names":[],"sources":["../../../src/components/Aridhia/AridhiaAccessStatus.tsx"],"sourcesContent":["import { ReactNode, useState } from 'react'\nimport { useGetAridhiaRequests } from '@/aridhia-queries'\nimport { useGetFeatureFlag } from '@/synapse-queries'\nimport { useSynapseContext } from '@/utils'\nimport { FeatureFlagEnum } from '@/utils/featureflag/FeatureFlags'\nimport { SRC_SIGN_IN_CLASS } from '@/utils/SynapseConstants'\nimport { Button } from '@mui/material'\nimport { DialogBase } from '../DialogBase'\nimport AccessIcon, { RestrictionUiType } from '../HasAccess/AccessIcon'\nimport {\n findRequestForDataset,\n getRestrictionUiTypeFromAridhiaRequest,\n} from './aridhiaAccessStatusUtils'\nimport { getAridhiaFairPortalDatasetUrl } from './aridhiaFairPortalUrls'\nimport AridhiaDarStatusPopover from './AridhiaDarStatusPopover'\nimport { useAridhiaDarWizardParts } from './DarWizard/AridhiaDarWizard'\nimport RdcaDapEligibilityDialog from './RdcaDapEligibilityDialog'\n\nconst buttonSx = { p: '0px', minWidth: 'unset' }\n\nexport type AridhiaAccessStatusProps = {\n /**\n * dataset code\n */\n datasetCode: string\n /** Base URL of the RDCA-DAP FAIR portal's browsable UI, e.g. `https://fair.dap.c-path.org`. */\n fairPortalUrl?: string\n}\n\n/**\n * Component that displays the Aridhia data access request status.\n * If the user is not authenticated with Aridhia, shows a sign-in button.\n * Otherwise, shows the access status based on the data access requests.\n */\nexport default function AridhiaAccessStatus(props: AridhiaAccessStatusProps) {\n const { datasetCode, fairPortalUrl } = props\n const { isAuthenticated } = useSynapseContext()\n const isDarFormEnabled = useGetFeatureFlag(\n FeatureFlagEnum.AMPALS_RDCA_DAP_FORM_ENABLED,\n )\n\n const {\n data: requestsResponse,\n isLoading,\n isError,\n error,\n } = useGetAridhiaRequests()\n const [popoverAnchorEl, setPopoverAnchorEl] = useState<HTMLElement | null>(\n null,\n )\n const [eligibilityDialogOpen, setEligibilityDialogOpen] = useState(false)\n const [requestDialogOpen, setRequestDialogOpen] = useState(false)\n const { content: wizardContent, actions: wizardActions } =\n useAridhiaDarWizardParts(\n { datasetCode },\n {\n enabled: requestDialogOpen,\n onClose: () => setRequestDialogOpen(false),\n },\n )\n\n if (!isAuthenticated) {\n return (\n <Button\n sx={buttonSx}\n className={SRC_SIGN_IN_CLASS}\n onClick={ev => {\n if (ev.isTrusted) {\n /*\n There is a tricky problem - \n The portals listens to click events for buttons with the class SRC_SIGN_IN_CLASS set, it listens to this event\n so that it can display the login modal.\n\n This button has an svg inside of it which is problematic because more often than not clicking this button will \n instead click that svg. The event listener in the portals will break as a result.\n\n Though the svg may get the actual click event, because of event bubbling this button will get its onClick called.\n Once onClick is called we can manually dispatch an event off of this button. This does pose a problem, we end up in a \n infinite loop because this button keeps dispatching click events, so we can use the isTrusted to recognize if onClick was\n triggered programmatically or by user click. Lastly, using { bubbles: true } ensures the event bubbles up to the document level.\n\n */\n const clickEvent = new MouseEvent('click', { bubbles: true })\n ev.currentTarget.dispatchEvent(clickEvent)\n }\n }}\n >\n <AccessIcon\n restrictionUiType={RestrictionUiType.AccessBlockedToAnonymous}\n />\n </Button>\n )\n }\n\n let content: ReactNode = null\n if (isLoading) {\n // Show loading state — nothing to render yet.\n } else if (isError && error.isEligibilityFailure) {\n // The token exchange (or any other request) failed because this user has no linked\n // RDCA-DAP account yet — the DAR wizard is unreachable until that's resolved.\n content = (\n <>\n <Button\n sx={buttonSx}\n onClick={() => setEligibilityDialogOpen(true)}\n aria-label=\"Link your RDCA-DAP account\"\n >\n <AccessIcon\n restrictionUiType={\n RestrictionUiType.AccessBlockedByRDCADAPAccountNotLinked\n }\n />\n </Button>\n <RdcaDapEligibilityDialog\n open={eligibilityDialogOpen}\n onClose={() => setEligibilityDialogOpen(false)}\n />\n </>\n )\n } else {\n // Check if there's a request for this dataset\n const entityRequest = findRequestForDataset(\n requestsResponse?.items ?? [],\n datasetCode,\n )\n const restrictionUiType =\n getRestrictionUiTypeFromAridhiaRequest(entityRequest)\n const icon = <AccessIcon restrictionUiType={restrictionUiType} />\n\n if (\n restrictionUiType === RestrictionUiType.AccessibleOnRDCADAP ||\n (!entityRequest && !isDarFormEnabled)\n ) {\n // Approved, or no request yet with the in-app request form not enabled — keep the\n // existing link-out to RDCA-DAP to access or request the data.\n content = fairPortalUrl ? (\n <a\n href={getAridhiaFairPortalDatasetUrl(fairPortalUrl, datasetCode)}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {icon}\n </a>\n ) : (\n icon\n )\n } else if (entityRequest) {\n // Pending or denied — click opens the status popover.\n content = (\n <>\n <Button\n sx={buttonSx}\n onClick={ev => setPopoverAnchorEl(ev.currentTarget)}\n aria-label=\"View data access request status\"\n >\n {icon}\n </Button>\n <AridhiaDarStatusPopover\n open={!!popoverAnchorEl}\n anchorEl={popoverAnchorEl}\n onClose={() => setPopoverAnchorEl(null)}\n request={entityRequest}\n fairPortalUrl={fairPortalUrl}\n />\n </>\n )\n } else if (isDarFormEnabled) {\n // No request yet, and the in-app request form is enabled — the icon opens the request\n // wizard in a dialog. The same wizard also renders at the route-based, non-modal\n // `AridhiaDarWizard` page for a full-page entry point.\n content = (\n <Button\n sx={buttonSx}\n onClick={() => setRequestDialogOpen(true)}\n aria-label=\"Request data access\"\n >\n {icon}\n </Button>\n )\n }\n }\n\n return (\n <>\n {content}\n {/* Ensure all authenticated return paths render the wizard dialog to prevent flicker as the DAR state changes (e.g. on the confirmation screen). */}\n <DialogBase\n open={requestDialogOpen}\n onCancel={() => setRequestDialogOpen(false)}\n maxWidth=\"md\"\n title=\"Request Data Access\"\n content={wizardContent}\n actions={wizardActions}\n />\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAM,IAAW;CAAE,GAAG;CAAO,UAAU;AAAQ;AAgB/C,SAAwB,EAAoB,GAAiC;CAC3E,IAAM,EAAE,gBAAa,qBAAkB,GACjC,EAAE,uBAAoB,EAAkB,GACxC,IAAmB,EACvB,EAAgB,4BAClB,GAEM,EACJ,MAAM,GACN,cACA,YACA,aACE,EAAsB,GACpB,CAAC,GAAiB,KAAsB,EAC5C,IACF,GACM,CAAC,GAAuB,KAA4B,EAAS,EAAK,GAClE,CAAC,GAAmB,KAAwB,EAAS,EAAK,GAC1D,EAAE,SAAS,GAAe,SAAS,MACvC,EACE,EAAE,eAAY,GACd;EACE,SAAS;EACT,eAAe,EAAqB,EAAK;CAC3C,CACF;CAEF,IAAI,CAAC,GACH,OACE,kBAAC,GAAD;EACE,IAAI;EACJ,WAAW;EACX,UAAS,MAAM;GACb,IAAI,EAAG,WAAW;IAehB,IAAM,IAAa,IAAI,WAAW,SAAS,EAAE,SAAS,GAAK,CAAC;IAC5D,EAAG,cAAc,cAAc,CAAU;GAC3C;EACF;YAEA,kBAAC,GAAD,EACE,mBAAmB,EAAkB,yBACtC,CAAA;CACK,CAAA;CAIZ,IAAI,IAAqB;CACzB,IAAI,IAEG,IAAI,KAAW,EAAM,sBAG1B,IACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACE,IAAI;EACJ,eAAe,EAAyB,EAAI;EAC5C,cAAW;YAEX,kBAAC,GAAD,EACE,mBACE,EAAkB,uCAErB,CAAA;CACK,CAAA,GACR,kBAAC,GAAD;EACE,MAAM;EACN,eAAe,EAAyB,EAAK;CAC9C,CAAA,CACD,EAAA,CAAA;MAEC;EAEL,IAAM,IAAgB,EACpB,GAAkB,SAAS,CAAC,GAC5B,CACF,GACM,IACJ,EAAuC,CAAa,GAChD,IAAO,kBAAC,GAAD,EAA+B,qBAAoB,CAAA;EAEhE,AACE,MAAsB,EAAkB,uBACvC,CAAC,KAAiB,CAAC,IAIpB,IAAU,IACR,kBAAC,KAAD;GACE,MAAM,EAA+B,GAAe,CAAW;GAC/D,QAAO;GACP,KAAI;aAEH;EACA,CAAA,IAEH,IAEO,IAET,IACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;GACE,IAAI;GACJ,UAAS,MAAM,EAAmB,EAAG,aAAa;GAClD,cAAW;aAEV;EACK,CAAA,GACR,kBAAC,GAAD;GACE,MAAM,CAAC,CAAC;GACR,UAAU;GACV,eAAe,EAAmB,IAAI;GACtC,SAAS;GACM;EAChB,CAAA,CACD,EAAA,CAAA,IAEK,MAIT,IACE,kBAAC,GAAD;GACE,IAAI;GACJ,eAAe,EAAqB,EAAI;GACxC,cAAW;aAEV;EACK,CAAA;CAGd;CAEA,OACE,kBAAA,GAAA,EAAA,UAAA,CACG,GAED,kBAAC,GAAD;EACE,MAAM;EACN,gBAAgB,EAAqB,EAAK;EAC1C,UAAS;EACT,OAAM;EACN,SAAS;EACT,SAAS;CACV,CAAA,CACD,EAAA,CAAA;AAEN"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const TOTP_GUIDANCE_TEXT = "Enter the 6-digit, time-based verification code provided by your authenticator app.";
|
|
2
2
|
export declare const RECOVERY_CODE_GUIDANCE_TEXT_SHORT = "Enter a one-time backup code. Your backup code is a 16 digit code, with groups of 4 letters or numbers separated by hyphens.";
|
|
3
3
|
export declare const TOTP_CLOCK_SKEW_ERROR_APPENDAGE = "Please ensure automatic date and time is enabled in your device settings and try again.";
|
|
4
|
+
export declare const NUMERIC_CODE_HTML_INPUT_PROPS: {
|
|
5
|
+
readonly inputMode: "numeric";
|
|
6
|
+
readonly pattern: "[0-9]*";
|
|
7
|
+
};
|
|
4
8
|
//# sourceMappingURL=Constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../src/components/Authentication/Constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,wFACwD,CAAA;AAEvF,eAAO,MAAM,iCAAiC,iIACkF,CAAA;AAEhI,eAAO,MAAM,+BAA+B,4FAC+C,CAAA"}
|
|
1
|
+
{"version":3,"file":"Constants.d.ts","sourceRoot":"","sources":["../../../src/components/Authentication/Constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,wFACwD,CAAA;AAEvF,eAAO,MAAM,iCAAiC,iIACkF,CAAA;AAEhI,eAAO,MAAM,+BAA+B,4FAC+C,CAAA;AAE3F,eAAO,MAAM,6BAA6B;;;CAGsB,CAAA"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
//#region src/components/Authentication/Constants.ts
|
|
2
|
-
var e = "Enter the 6-digit, time-based verification code provided by your authenticator app.", t = "Enter a one-time backup code. Your backup code is a 16 digit code, with groups of 4 letters or numbers separated by hyphens.", n = "Please ensure automatic date and time is enabled in your device settings and try again."
|
|
2
|
+
var e = "Enter the 6-digit, time-based verification code provided by your authenticator app.", t = "Enter a one-time backup code. Your backup code is a 16 digit code, with groups of 4 letters or numbers separated by hyphens.", n = "Please ensure automatic date and time is enabled in your device settings and try again.", r = {
|
|
3
|
+
inputMode: "numeric",
|
|
4
|
+
pattern: "[0-9]*"
|
|
5
|
+
};
|
|
3
6
|
//#endregion
|
|
4
|
-
export { t as RECOVERY_CODE_GUIDANCE_TEXT_SHORT, n as TOTP_CLOCK_SKEW_ERROR_APPENDAGE, e as TOTP_GUIDANCE_TEXT };
|
|
7
|
+
export { r as NUMERIC_CODE_HTML_INPUT_PROPS, t as RECOVERY_CODE_GUIDANCE_TEXT_SHORT, n as TOTP_CLOCK_SKEW_ERROR_APPENDAGE, e as TOTP_GUIDANCE_TEXT };
|
|
5
8
|
|
|
6
9
|
//# sourceMappingURL=Constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Constants.js","names":[],"sources":["../../../src/components/Authentication/Constants.ts"],"sourcesContent":["export const TOTP_GUIDANCE_TEXT =\n 'Enter the 6-digit, time-based verification code provided by your authenticator app.'\n\nexport const RECOVERY_CODE_GUIDANCE_TEXT_SHORT =\n 'Enter a one-time backup code. Your backup code is a 16 digit code, with groups of 4 letters or numbers separated by hyphens.'\n\nexport const TOTP_CLOCK_SKEW_ERROR_APPENDAGE =\n 'Please ensure automatic date and time is enabled in your device settings and try again.'\n"],"mappings":";AAAA,IAAa,IACX,uFAEW,IACX,gIAEW,IACX"}
|
|
1
|
+
{"version":3,"file":"Constants.js","names":[],"sources":["../../../src/components/Authentication/Constants.ts"],"sourcesContent":["export const TOTP_GUIDANCE_TEXT =\n 'Enter the 6-digit, time-based verification code provided by your authenticator app.'\n\nexport const RECOVERY_CODE_GUIDANCE_TEXT_SHORT =\n 'Enter a one-time backup code. Your backup code is a 16 digit code, with groups of 4 letters or numbers separated by hyphens.'\n\nexport const TOTP_CLOCK_SKEW_ERROR_APPENDAGE =\n 'Please ensure automatic date and time is enabled in your device settings and try again.'\n\nexport const NUMERIC_CODE_HTML_INPUT_PROPS = {\n inputMode: 'numeric',\n pattern: '[0-9]*',\n} as const satisfies React.InputHTMLAttributes<HTMLInputElement>\n"],"mappings":";AAAA,IAAa,IACX,uFAEW,IACX,gIAEW,IACX,2FAEW,IAAgC;CAC3C,WAAW;CACX,SAAS;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecoveryCodeGrid.d.ts","sourceRoot":"","sources":["../../../src/components/Authentication/RecoveryCodeGrid.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAU5E,KAAK,qBAAqB,GAAG;IAC3B,aAAa,CAAC,EAAE,0BAA0B,CAAA;CAC3C,CAAA;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"RecoveryCodeGrid.d.ts","sourceRoot":"","sources":["../../../src/components/Authentication/RecoveryCodeGrid.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AAU5E,KAAK,qBAAqB,GAAG;IAC3B,aAAa,CAAC,EAAE,0BAA0B,CAAA;CAC3C,CAAA;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAqC5D"}
|
|
@@ -9,7 +9,14 @@ function a(a) {
|
|
|
9
9
|
return /* @__PURE__ */ n(t, {
|
|
10
10
|
sx: {
|
|
11
11
|
display: "grid",
|
|
12
|
-
gridTemplateColumns:
|
|
12
|
+
gridTemplateColumns: {
|
|
13
|
+
xs: "max-content",
|
|
14
|
+
md: "47.5% 47.5%"
|
|
15
|
+
},
|
|
16
|
+
justifyContent: {
|
|
17
|
+
xs: "center",
|
|
18
|
+
md: "stretch"
|
|
19
|
+
},
|
|
13
20
|
columnGap: "5%",
|
|
14
21
|
gridTemplateRows: "repeat(5, 1fr)",
|
|
15
22
|
fontFamily: "Menlo, Courier New, Courier, monospace",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecoveryCodeGrid.js","names":[],"sources":["../../../src/components/Authentication/RecoveryCodeGrid.tsx"],"sourcesContent":["import ConditionalWrapper from '@/components/utils/ConditionalWrapper'\nimport { Box } from '@mui/material'\nimport Skeleton from '@mui/material/Skeleton'\nimport { TwoFactorAuthRecoveryCodes } from '@sage-bionetworks/synapse-types'\n\nconst DEFAULT_RECOVERY_CODE_COUNT = 10\n\n// Placeholder codes used to render skeletons while loading\nconst PLACEHOLDER_RECOVERY_CODE = '1234-5678-9012-3456'\nconst PLACEHOLDER_RECOVERY_CODES = Array(DEFAULT_RECOVERY_CODE_COUNT).fill(\n PLACEHOLDER_RECOVERY_CODE,\n)\n\ntype RecoveryCodeGridProps = {\n recoveryCodes?: TwoFactorAuthRecoveryCodes\n}\n\nexport function RecoveryCodeGrid(props: RecoveryCodeGridProps) {\n const { recoveryCodes } = props\n return (\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: '47.5% 47.5%',\n columnGap: '5%',\n gridTemplateRows: 'repeat(5, 1fr)',\n fontFamily: 'Menlo, Courier New, Courier, monospace',\n my: 2,\n }}\n >\n {(recoveryCodes?.codes ?? PLACEHOLDER_RECOVERY_CODES).map(\n (code, index) => {\n return (\n <ConditionalWrapper\n key={index}\n condition={!recoveryCodes}\n wrapper={Skeleton}\n wrapperProps={{ width: '100%', height: '100%' }}\n >\n <Box\n sx={{\n my: 1,\n fontSize: '13px',\n }}\n >\n {code}\n </Box>\n </ConditionalWrapper>\n )\n },\n )}\n </Box>\n )\n}\n"],"mappings":";;;;;AASA,IAAM,IAA6B,MAAM,EAA2B,EAAE,KACpE,qBACF;AAMA,SAAgB,EAAiB,GAA8B;CAC7D,IAAM,EAAE,qBAAkB;CAC1B,OACE,kBAAC,GAAD;EACE,IAAI;GACF,SAAS;GACT,qBAAqB;
|
|
1
|
+
{"version":3,"file":"RecoveryCodeGrid.js","names":[],"sources":["../../../src/components/Authentication/RecoveryCodeGrid.tsx"],"sourcesContent":["import ConditionalWrapper from '@/components/utils/ConditionalWrapper'\nimport { Box } from '@mui/material'\nimport Skeleton from '@mui/material/Skeleton'\nimport { TwoFactorAuthRecoveryCodes } from '@sage-bionetworks/synapse-types'\n\nconst DEFAULT_RECOVERY_CODE_COUNT = 10\n\n// Placeholder codes used to render skeletons while loading\nconst PLACEHOLDER_RECOVERY_CODE = '1234-5678-9012-3456'\nconst PLACEHOLDER_RECOVERY_CODES = Array(DEFAULT_RECOVERY_CODE_COUNT).fill(\n PLACEHOLDER_RECOVERY_CODE,\n)\n\ntype RecoveryCodeGridProps = {\n recoveryCodes?: TwoFactorAuthRecoveryCodes\n}\n\nexport function RecoveryCodeGrid(props: RecoveryCodeGridProps) {\n const { recoveryCodes } = props\n return (\n <Box\n sx={{\n display: 'grid',\n gridTemplateColumns: { xs: 'max-content', md: '47.5% 47.5%' },\n justifyContent: { xs: 'center', md: 'stretch' },\n columnGap: '5%',\n gridTemplateRows: 'repeat(5, 1fr)',\n fontFamily: 'Menlo, Courier New, Courier, monospace',\n my: 2,\n }}\n >\n {(recoveryCodes?.codes ?? PLACEHOLDER_RECOVERY_CODES).map(\n (code, index) => {\n return (\n <ConditionalWrapper\n key={index}\n condition={!recoveryCodes}\n wrapper={Skeleton}\n wrapperProps={{ width: '100%', height: '100%' }}\n >\n <Box\n sx={{\n my: 1,\n fontSize: '13px',\n }}\n >\n {code}\n </Box>\n </ConditionalWrapper>\n )\n },\n )}\n </Box>\n )\n}\n"],"mappings":";;;;;AASA,IAAM,IAA6B,MAAM,EAA2B,EAAE,KACpE,qBACF;AAMA,SAAgB,EAAiB,GAA8B;CAC7D,IAAM,EAAE,qBAAkB;CAC1B,OACE,kBAAC,GAAD;EACE,IAAI;GACF,SAAS;GACT,qBAAqB;IAAE,IAAI;IAAe,IAAI;GAAc;GAC5D,gBAAgB;IAAE,IAAI;IAAU,IAAI;GAAU;GAC9C,WAAW;GACX,kBAAkB;GAClB,YAAY;GACZ,IAAI;EACN;aAEE,GAAe,SAAS,GAA4B,KACnD,GAAM,MAEH,kBAAC,GAAD;GAEE,WAAW,CAAC;GACZ,SAAS;GACT,cAAc;IAAE,OAAO;IAAQ,QAAQ;GAAO;aAE9C,kBAAC,GAAD;IACE,IAAI;KACF,IAAI;KACJ,UAAU;IACZ;cAEC;GACE,CAAA;EACa,GAbb,CAaa,CAG1B;CACG,CAAA;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RegenerateBackupCodesWarning.js","names":[],"sources":["../../../src/components/Authentication/RegenerateBackupCodesWarning.tsx"],"sourcesContent":["import FrontHand from '@/assets/icons/FrontHand'\nimport { Avatar, Box, Button, Paper, Typography, useTheme } from '@mui/material'\n\ntype RegenerateBackupCodesWarningProps = {\n onConfirm: () => void\n onCancel: () => void\n}\n\nexport function RegenerateBackupCodesWarning(\n props: RegenerateBackupCodesWarningProps,\n) {\n const { onConfirm, onCancel } = props\n const theme = useTheme()\n return (\n <Paper sx={{ m: 'auto', maxWidth: '500px', p: 8 }}>\n <Avatar\n sx={{\n bgcolor: theme.palette.primary.main,\n height: '100px',\n width: '100px',\n }}\n >\n <FrontHand sx={{ height: '54px', width: '54px' }} />\n </Avatar>\n <Box sx={{ my: 5 }}>\n <Typography variant={'headline1'} sx={{ mb: 2 }}>\n Really regenerate backup codes?\n </Typography>\n <Typography variant={'body1'} sx={{ my: 1 }}>\n This will invalidate your old backup codes\n </Typography>\n <Typography variant={'body1'} sx={{ my: 1 }}>\n If you click “yes”, below, we will generate 10 new backup codes,\n replacing your old ones, which will no longer function.\n </Typography>\n </Box>\n <Button\n fullWidth\n variant=\"contained\"\n onClick={onConfirm}\n sx={{ height: '50px', my: 1 }}\n >\n Yes, regenerate backup codes\n </Button>\n <Button\n fullWidth\n variant=\"text\"\n onClick={onCancel}\n sx={{ height: '50px', my: 1 }}\n >\n Nevermind\n </Button>\n </Paper>\n )\n}\n"],"mappings":";;;;AAQA,SAAgB,EACd,GACA;CACA,IAAM,EAAE,cAAW,gBAAa;CAEhC,OACE,kBAAC,GAAD;EAAO,IAAI;GAAE,GAAG;GAAQ,UAAU;GAAS,GAAG;EAAE;
|
|
1
|
+
{"version":3,"file":"RegenerateBackupCodesWarning.js","names":[],"sources":["../../../src/components/Authentication/RegenerateBackupCodesWarning.tsx"],"sourcesContent":["import FrontHand from '@/assets/icons/FrontHand'\nimport { Avatar, Box, Button, Paper, Typography, useTheme } from '@mui/material'\n\ntype RegenerateBackupCodesWarningProps = {\n onConfirm: () => void\n onCancel: () => void\n}\n\nexport function RegenerateBackupCodesWarning(\n props: RegenerateBackupCodesWarningProps,\n) {\n const { onConfirm, onCancel } = props\n const theme = useTheme()\n return (\n <Paper sx={{ m: 'auto', maxWidth: '500px', p: { xs: '20px', md: 8 } }}>\n <Avatar\n sx={{\n bgcolor: theme.palette.primary.main,\n height: '100px',\n width: '100px',\n }}\n >\n <FrontHand sx={{ height: '54px', width: '54px' }} />\n </Avatar>\n <Box sx={{ my: 5 }}>\n <Typography variant={'headline1'} sx={{ mb: 2 }}>\n Really regenerate backup codes?\n </Typography>\n <Typography variant={'body1'} sx={{ my: 1 }}>\n This will invalidate your old backup codes\n </Typography>\n <Typography variant={'body1'} sx={{ my: 1 }}>\n If you click “yes”, below, we will generate 10 new backup codes,\n replacing your old ones, which will no longer function.\n </Typography>\n </Box>\n <Button\n fullWidth\n variant=\"contained\"\n onClick={onConfirm}\n sx={{ height: '50px', my: 1 }}\n >\n Yes, regenerate backup codes\n </Button>\n <Button\n fullWidth\n variant=\"text\"\n onClick={onCancel}\n sx={{ height: '50px', my: 1 }}\n >\n Nevermind\n </Button>\n </Paper>\n )\n}\n"],"mappings":";;;;AAQA,SAAgB,EACd,GACA;CACA,IAAM,EAAE,cAAW,gBAAa;CAEhC,OACE,kBAAC,GAAD;EAAO,IAAI;GAAE,GAAG;GAAQ,UAAU;GAAS,GAAG;IAAE,IAAI;IAAQ,IAAI;GAAE;EAAE;YAApE;GACE,kBAAC,GAAD;IACE,IAAI;KACF,SALM,EAKG,EAAM,QAAQ,QAAQ;KAC/B,QAAQ;KACR,OAAO;IACT;cAEA,kBAAC,GAAD,EAAW,IAAI;KAAE,QAAQ;KAAQ,OAAO;IAAO,EAAI,CAAA;GAC7C,CAAA;GACR,kBAAC,GAAD;IAAK,IAAI,EAAE,IAAI,EAAE;cAAjB;KACE,kBAAC,GAAD;MAAY,SAAS;MAAa,IAAI,EAAE,IAAI,EAAE;gBAAG;KAErC,CAAA;KACZ,kBAAC,GAAD;MAAY,SAAS;MAAS,IAAI,EAAE,IAAI,EAAE;gBAAG;KAEjC,CAAA;KACZ,kBAAC,GAAD;MAAY,SAAS;MAAS,IAAI,EAAE,IAAI,EAAE;gBAAG;KAGjC,CAAA;IACT;;GACL,kBAAC,GAAD;IACE,WAAA;IACA,SAAQ;IACR,SAAS;IACT,IAAI;KAAE,QAAQ;KAAQ,IAAI;IAAE;cAC7B;GAEO,CAAA;GACR,kBAAC,GAAD;IACE,WAAA;IACA,SAAQ;IACR,SAAS;IACT,IAAI;KAAE,QAAQ;KAAQ,IAAI;IAAE;cAC7B;GAEO,CAAA;EACH;;AAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TOTPForm.d.ts","sourceRoot":"","sources":["../../../src/components/Authentication/TOTPForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"TOTPForm.d.ts","sourceRoot":"","sources":["../../../src/components/Authentication/TOTPForm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAS9C,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,cAAc,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAA;CACjD,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA6DpD"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { NUMERIC_CODE_HTML_INPUT_PROPS as e } from "./Constants.js";
|
|
2
|
+
import { useState as t } from "react";
|
|
3
|
+
import { Box as n, Button as r } from "@mui/material";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import { MuiOtpInput as o } from "mui-one-time-password-input";
|
|
5
6
|
//#region src/components/Authentication/TOTPForm.tsx
|
|
6
|
-
var
|
|
7
|
+
var s = 6, c = [
|
|
7
8
|
"0",
|
|
8
9
|
"1",
|
|
9
10
|
"2",
|
|
@@ -15,15 +16,16 @@ var o = 6, s = [
|
|
|
15
16
|
"8",
|
|
16
17
|
"9"
|
|
17
18
|
];
|
|
18
|
-
function
|
|
19
|
-
let { onSubmit:
|
|
20
|
-
return /* @__PURE__ */
|
|
19
|
+
function l(l) {
|
|
20
|
+
let { onSubmit: u, loginIsPending: d } = l, [f, p] = t("");
|
|
21
|
+
return /* @__PURE__ */ a(n, { children: [/* @__PURE__ */ i(o, {
|
|
21
22
|
autoFocus: !0,
|
|
22
|
-
length:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
length: s,
|
|
24
|
+
TextFieldsProps: { slotProps: { htmlInput: e } },
|
|
25
|
+
value: f,
|
|
26
|
+
onChange: p,
|
|
27
|
+
onComplete: u,
|
|
28
|
+
validateChar: (e) => c.includes(e) || e === "",
|
|
27
29
|
gap: "2px",
|
|
28
30
|
sx: {
|
|
29
31
|
mx: "auto",
|
|
@@ -42,7 +44,7 @@ function c(c) {
|
|
|
42
44
|
},
|
|
43
45
|
".MuiFormControl-root:not(:first-of-type):not(:last-of-type) > .MuiInputBase-root": { borderRadius: 0 }
|
|
44
46
|
}
|
|
45
|
-
}), /* @__PURE__ */ r
|
|
47
|
+
}), /* @__PURE__ */ i(r, {
|
|
46
48
|
fullWidth: !0,
|
|
47
49
|
type: "submit",
|
|
48
50
|
color: "primary",
|
|
@@ -52,14 +54,14 @@ function c(c) {
|
|
|
52
54
|
mt: 4,
|
|
53
55
|
mb: 2
|
|
54
56
|
},
|
|
55
|
-
disabled:
|
|
57
|
+
disabled: f.length !== s || d,
|
|
56
58
|
onClick: (e) => {
|
|
57
|
-
e.preventDefault(),
|
|
59
|
+
e.preventDefault(), u(f);
|
|
58
60
|
},
|
|
59
|
-
children:
|
|
61
|
+
children: d ? "Verifying..." : "Submit"
|
|
60
62
|
})] });
|
|
61
63
|
}
|
|
62
64
|
//#endregion
|
|
63
|
-
export {
|
|
65
|
+
export { l as default };
|
|
64
66
|
|
|
65
67
|
//# sourceMappingURL=TOTPForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TOTPForm.js","names":[],"sources":["../../../src/components/Authentication/TOTPForm.tsx"],"sourcesContent":["import { UseLoginReturn } from '@/utils/hooks'\nimport { Box, Button } from '@mui/material'\nimport { MuiOtpInput } from 'mui-one-time-password-input'\nimport { useState } from 'react'\n\nconst TOTP_LENGTH = 6\nconst DIGIT_CHARACTERS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n\ntype TOTPFormProps = {\n onSubmit: (value: string) => void\n loginIsPending: UseLoginReturn['loginIsPending']\n}\n\nexport default function TOTPForm(props: TOTPFormProps) {\n const { onSubmit, loginIsPending } = props\n const [verificationCode, setVerificationCode] = useState('')\n return (\n <Box>\n <MuiOtpInput\n autoFocus\n length={TOTP_LENGTH}\n value={verificationCode}\n onChange={setVerificationCode}\n onComplete={onSubmit}\n validateChar={(character: string) => {\n return DIGIT_CHARACTERS.includes(character) || character === ''\n }}\n gap={'2px'}\n sx={{\n mx: 'auto',\n maxWidth: '350px',\n '.MuiInputBase-root': {\n paddingLeft: '5px',\n paddingRight: '5px',\n },\n '.MuiFormControl-root:first-of-type > .MuiInputBase-root': {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n '.MuiFormControl-root:last-of-type > .MuiInputBase-root': {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n },\n '.MuiFormControl-root:not(:first-of-type):not(:last-of-type) > .MuiInputBase-root':\n {\n borderRadius: 0,\n },\n }}\n />\n <Button\n fullWidth\n type=\"submit\"\n color=\"primary\"\n variant=\"contained\"\n sx={{\n height: '50px',\n mt: 4,\n mb: 2,\n }}\n disabled={verificationCode.length !== TOTP_LENGTH || loginIsPending}\n onClick={e => {\n e.preventDefault()\n onSubmit(verificationCode)\n }}\n >\n {loginIsPending ? 'Verifying...' : 'Submit'}\n </Button>\n </Box>\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TOTPForm.js","names":[],"sources":["../../../src/components/Authentication/TOTPForm.tsx"],"sourcesContent":["import { UseLoginReturn } from '@/utils/hooks'\nimport { Box, Button } from '@mui/material'\nimport { MuiOtpInput } from 'mui-one-time-password-input'\nimport { useState } from 'react'\nimport { NUMERIC_CODE_HTML_INPUT_PROPS } from './Constants'\n\nconst TOTP_LENGTH = 6\nconst DIGIT_CHARACTERS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n\ntype TOTPFormProps = {\n onSubmit: (value: string) => void\n loginIsPending: UseLoginReturn['loginIsPending']\n}\n\nexport default function TOTPForm(props: TOTPFormProps) {\n const { onSubmit, loginIsPending } = props\n const [verificationCode, setVerificationCode] = useState('')\n return (\n <Box>\n <MuiOtpInput\n autoFocus\n length={TOTP_LENGTH}\n TextFieldsProps={{\n slotProps: {\n htmlInput: NUMERIC_CODE_HTML_INPUT_PROPS,\n },\n }}\n value={verificationCode}\n onChange={setVerificationCode}\n onComplete={onSubmit}\n validateChar={(character: string) => {\n return DIGIT_CHARACTERS.includes(character) || character === ''\n }}\n gap={'2px'}\n sx={{\n mx: 'auto',\n maxWidth: '350px',\n '.MuiInputBase-root': {\n paddingLeft: '5px',\n paddingRight: '5px',\n },\n '.MuiFormControl-root:first-of-type > .MuiInputBase-root': {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n '.MuiFormControl-root:last-of-type > .MuiInputBase-root': {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n },\n '.MuiFormControl-root:not(:first-of-type):not(:last-of-type) > .MuiInputBase-root':\n {\n borderRadius: 0,\n },\n }}\n />\n <Button\n fullWidth\n type=\"submit\"\n color=\"primary\"\n variant=\"contained\"\n sx={{\n height: '50px',\n mt: 4,\n mb: 2,\n }}\n disabled={verificationCode.length !== TOTP_LENGTH || loginIsPending}\n onClick={e => {\n e.preventDefault()\n onSubmit(verificationCode)\n }}\n >\n {loginIsPending ? 'Verifying...' : 'Submit'}\n </Button>\n </Box>\n )\n}\n"],"mappings":";;;;;;AAMA,IAAM,IAAc,GACd,IAAmB;CAAC;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG;AAO1E,SAAwB,EAAS,GAAsB;CACrD,IAAM,EAAE,aAAU,sBAAmB,GAC/B,CAAC,GAAkB,KAAuB,EAAS,EAAE;CAC3D,OACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;EACE,WAAA;EACA,QAAQ;EACR,iBAAiB,EACf,WAAW,EACT,WAAW,EACb,EACF;EACA,OAAO;EACP,UAAU;EACV,YAAY;EACZ,eAAe,MACN,EAAiB,SAAS,CAAS,KAAK,MAAc;EAE/D,KAAK;EACL,IAAI;GACF,IAAI;GACJ,UAAU;GACV,sBAAsB;IACpB,aAAa;IACb,cAAc;GAChB;GACA,2DAA2D;IACzD,sBAAsB;IACtB,yBAAyB;GAC3B;GACA,0DAA0D;IACxD,qBAAqB;IACrB,wBAAwB;GAC1B;GACA,oFACE,EACE,cAAc,EAChB;EACJ;CACD,CAAA,GACD,kBAAC,GAAD;EACE,WAAA;EACA,MAAK;EACL,OAAM;EACN,SAAQ;EACR,IAAI;GACF,QAAQ;GACR,IAAI;GACJ,IAAI;EACN;EACA,UAAU,EAAiB,WAAW,KAAe;EACrD,UAAS,MAAK;GAEZ,AADA,EAAE,eAAe,GACjB,EAAS,CAAgB;EAC3B;YAEC,IAAiB,iBAAiB;CAC7B,CAAA,CACL,EAAA,CAAA;AAET"}
|