synapse-react-client 4.0.38 → 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/aridhia-queries/useAridhiaQuery.d.ts +6 -2
- package/dist/aridhia-queries/useAridhiaQuery.d.ts.map +1 -1
- package/dist/aridhia-queries/useAridhiaQuery.js +3 -0
- package/dist/aridhia-queries/useAridhiaQuery.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 +2 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.d.ts.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.js +57 -31
- package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
- package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts +12 -0
- package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts.map +1 -0
- package/dist/components/Aridhia/AridhiaDarStatusPopover.js +56 -0
- package/dist/components/Aridhia/AridhiaDarStatusPopover.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.d.ts.map +1 -1
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js +38 -30
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js.map +1 -1
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js +15 -14
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js.map +1 -1
- package/dist/components/Aridhia/RdcaDapEligibilityDialog.d.ts +11 -0
- package/dist/components/Aridhia/RdcaDapEligibilityDialog.d.ts.map +1 -0
- package/dist/components/Aridhia/RdcaDapEligibilityDialog.js +37 -0
- package/dist/components/Aridhia/RdcaDapEligibilityDialog.js.map +1 -0
- package/dist/components/Aridhia/aridhiaAccessStatusUtils.js +2 -2
- package/dist/components/Aridhia/aridhiaAccessStatusUtils.js.map +1 -1
- package/dist/components/Aridhia/aridhiaFairPortalUrls.d.ts +10 -0
- package/dist/components/Aridhia/aridhiaFairPortalUrls.d.ts.map +1 -0
- package/dist/components/Aridhia/aridhiaFairPortalUrls.js +11 -0
- package/dist/components/Aridhia/aridhiaFairPortalUrls.js.map +1 -0
- package/dist/components/Aridhia/rdcaDapConstants.d.ts +3 -0
- package/dist/components/Aridhia/rdcaDapConstants.d.ts.map +1 -0
- package/dist/components/Aridhia/rdcaDapConstants.js +6 -0
- package/dist/components/Aridhia/rdcaDapConstants.js.map +1 -0
- 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/DataExplorer/DataExplorer.css +1 -1
- package/dist/components/DataExplorer/DataExplorer.d.ts.map +1 -1
- package/dist/components/DataExplorer/DataExplorer.js +50 -50
- package/dist/components/DataExplorer/DataExplorer.js.map +1 -1
- package/dist/components/DataExplorer/DataExplorer.module.js +16 -16
- package/dist/components/DataExplorer/DataExplorer.module.js.map +1 -1
- package/dist/components/DataExplorer/DataExplorer.module.scss +29 -6
- package/dist/components/DataGrid/columns/DateTimeColumn.d.ts +16 -7
- package/dist/components/DataGrid/columns/DateTimeColumn.d.ts.map +1 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.js +79 -57
- package/dist/components/DataGrid/columns/DateTimeColumn.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/DataGrid/utils/columnFactory.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.js +11 -8
- package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +10 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.js +18 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/EntityCitation/EntityCitation.d.ts.map +1 -1
- package/dist/components/EntityCitation/EntityCitation.js +8 -5
- package/dist/components/EntityCitation/EntityCitation.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/HasAccess/AccessIcon.d.ts +3 -1
- package/dist/components/HasAccess/AccessIcon.d.ts.map +1 -1
- package/dist/components/HasAccess/AccessIcon.js +11 -1
- package/dist/components/HasAccess/AccessIcon.js.map +1 -1
- 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/PortalHomePageHeader/PortalHomePageHeader.d.ts +2 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts.map +1 -1
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js +81 -53
- package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js.map +1 -1
- package/dist/components/ProjectInfo/ProjectInfo.d.ts.map +1 -1
- package/dist/components/ProjectInfo/ProjectInfo.js +3 -2
- package/dist/components/ProjectInfo/ProjectInfo.js.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.css +1 -0
- package/dist/components/QueryBuilder/FilterConditionRow.d.ts +8 -0
- package/dist/components/QueryBuilder/FilterConditionRow.d.ts.map +1 -0
- package/dist/components/QueryBuilder/FilterConditionRow.js +260 -0
- package/dist/components/QueryBuilder/FilterConditionRow.js.map +1 -0
- package/dist/components/QueryBuilder/FilterConditionRow.module.js +16 -0
- package/dist/components/QueryBuilder/FilterConditionRow.module.js.map +1 -0
- package/dist/components/QueryBuilder/FilterConditionRow.module.scss +101 -0
- package/dist/components/QueryBuilder/FilterGroupNode.css +1 -0
- package/dist/components/QueryBuilder/FilterGroupNode.d.ts +11 -0
- package/dist/components/QueryBuilder/FilterGroupNode.d.ts.map +1 -0
- package/dist/components/QueryBuilder/FilterGroupNode.js +134 -0
- package/dist/components/QueryBuilder/FilterGroupNode.js.map +1 -0
- package/dist/components/QueryBuilder/FilterGroupNode.module.js +16 -0
- package/dist/components/QueryBuilder/FilterGroupNode.module.js.map +1 -0
- package/dist/components/QueryBuilder/FilterGroupNode.module.scss +92 -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.css +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.d.ts +21 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.d.ts.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.js +143 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.js.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.module.js +17 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.module.js.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.module.scss +79 -0
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts +39 -0
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.js +19 -0
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.js.map +1 -0
- package/dist/components/QueryBuilder/qbTreeToReadable.d.ts +14 -0
- package/dist/components/QueryBuilder/qbTreeToReadable.d.ts.map +1 -0
- package/dist/components/QueryBuilder/qbTreeToReadable.js +89 -0
- package/dist/components/QueryBuilder/qbTreeToReadable.js.map +1 -0
- 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/queryBuilderId.d.ts +2 -0
- package/dist/components/QueryBuilder/queryBuilderId.d.ts.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderId.js +9 -0
- package/dist/components/QueryBuilder/queryBuilderId.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts +24 -0
- package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderMetadata.js +91 -0
- package/dist/components/QueryBuilder/queryBuilderMetadata.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.d.ts +71 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.d.ts.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.js +203 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts +3 -2
- package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts.map +1 -1
- package/dist/components/QueryBuilder/queryBuilderTranslation.js +82 -84
- package/dist/components/QueryBuilder/queryBuilderTranslation.js.map +1 -1
- package/dist/components/QueryBuilder/useQBCombinedSql.d.ts +11 -0
- package/dist/components/QueryBuilder/useQBCombinedSql.d.ts.map +1 -0
- package/dist/components/QueryBuilder/useQBCombinedSql.js +29 -0
- package/dist/components/QueryBuilder/useQBCombinedSql.js.map +1 -0
- package/dist/components/QueryBuilder/useQBFacetSourceMetadata.d.ts +18 -0
- package/dist/components/QueryBuilder/useQBFacetSourceMetadata.d.ts.map +1 -0
- package/dist/components/QueryBuilder/useQBFacetSourceMetadata.js +27 -0
- package/dist/components/QueryBuilder/useQBFacetSourceMetadata.js.map +1 -0
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +14 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +183 -119
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/RssFeedCards/RssFeedCards.d.ts +1 -0
- package/dist/components/RssFeedCards/RssFeedCards.d.ts.map +1 -1
- package/dist/components/RssFeedCards/RssFeedCards.js +11 -11
- package/dist/components/RssFeedCards/RssFeedCards.js.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts +7 -1
- package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapseChat.js +76 -71
- package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
- package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts +3 -1
- package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts.map +1 -1
- package/dist/components/SynapseChat/SynapsePortalChatDialog.js +24 -13
- package/dist/components/SynapseChat/SynapsePortalChatDialog.js.map +1 -1
- package/dist/components/SynapseChat/portalChatSessionStorage.d.ts +23 -0
- package/dist/components/SynapseChat/portalChatSessionStorage.d.ts.map +1 -0
- package/dist/components/SynapseChat/portalChatSessionStorage.js +29 -0
- package/dist/components/SynapseChat/portalChatSessionStorage.js.map +1 -0
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts +6 -0
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts.map +1 -1
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js +92 -79
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts +3 -4
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +2 -2
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.js +9 -2
- package/dist/components/entity/page/action_menu/EntityActionMenu.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 +36 -37
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.js.map +1 -1
- package/dist/components/menu/ComplexMenu.js +1 -1
- package/dist/components/menu/ComplexMenu.js.map +1 -1
- package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/menu/DropdownMenu.js +4 -0
- package/dist/components/menu/DropdownMenu.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/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.d.ts +10 -0
- package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.d.ts.map +1 -0
- package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.js +20 -0
- package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.js.map +1 -0
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js +29 -20
- package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js.map +1 -1
- package/dist/mocks/accessRequirement/mockFormTemplates.d.ts +16 -0
- package/dist/mocks/accessRequirement/mockFormTemplates.d.ts.map +1 -0
- package/dist/mocks/accessRequirement/mockFormTemplates.js +63 -0
- package/dist/mocks/accessRequirement/mockFormTemplates.js.map +1 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts +7 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts.map +1 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js +47 -0
- package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js.map +1 -0
- package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts +27 -0
- package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts.map +1 -0
- package/dist/mocks/accessRequirement/mockJsonSchemas.js +83 -0
- package/dist/mocks/accessRequirement/mockJsonSchemas.js.map +1 -0
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts +18 -1
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/aridhiaHandlers.js +39 -33
- package/dist/mocks/msw/handlers/aridhiaHandlers.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/formTemplateHandlers.d.ts +5 -0
- package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/formTemplateHandlers.js +65 -0
- package/dist/mocks/msw/handlers/formTemplateHandlers.js.map +1 -0
- 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/mocks/msw/handlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers.js +49 -47
- package/dist/mocks/msw/handlers.js.map +1 -1
- package/dist/style/abstracts/_cssVariables.scss +7 -0
- package/dist/style/components/_query-wrapper-plot-nav.scss +9 -0
- package/dist/style/main.css +1 -1
- package/dist/synapse-queries/KeyFactory.d.ts +5 -1
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +14 -2
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/chat/useChat.d.ts.map +1 -1
- package/dist/synapse-queries/chat/useChat.js +2 -4
- package/dist/synapse-queries/chat/useChat.js.map +1 -1
- package/dist/synapse-queries/dataaccess/index.d.ts +1 -0
- package/dist/synapse-queries/dataaccess/index.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/index.js +4 -3
- package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts +41 -0
- package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts.map +1 -0
- package/dist/synapse-queries/dataaccess/useFormTemplate.js +63 -0
- package/dist/synapse-queries/dataaccess/useFormTemplate.js.map +1 -0
- package/dist/synapse-queries/index.js +186 -180
- 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/ReactQueryMockUtils.js.map +1 -1
- 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/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/getType.d.ts.map +1 -1
- package/dist/utils/jsonschema/getType.js +4 -1
- package/dist/utils/jsonschema/getType.js.map +1 -1
- 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 +10 -8
- 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
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/**
|
|
3
|
+
* The set of property shapes the simple editor knows how to author. Anything
|
|
4
|
+
* outside this set surfaces in the UI as "advanced" and must be edited via the
|
|
5
|
+
* raw JSON Schema view.
|
|
6
|
+
*/
|
|
7
|
+
export type SimpleFieldType = 'text' | 'number' | 'boolean' | 'choice' | 'file';
|
|
8
|
+
export declare const FIELD_TYPE_OPTIONS: {
|
|
9
|
+
value: SimpleFieldType;
|
|
10
|
+
label: string;
|
|
11
|
+
}[];
|
|
12
|
+
export declare function detectFieldType(prop: RJSFSchema | undefined): SimpleFieldType | null;
|
|
13
|
+
export declare function fieldTypeLabel(type: SimpleFieldType | null): string;
|
|
14
|
+
/** Build a fresh schema body for the given simple type, preserving label and help text. */
|
|
15
|
+
export declare function applyFieldType(prev: RJSFSchema, type: SimpleFieldType): RJSFSchema;
|
|
16
|
+
/** Derive a unique camelCase JSON property key from a display title. */
|
|
17
|
+
export declare function generatePropertyKey(title: string, existingKeys: Set<string>): string;
|
|
18
|
+
/**
|
|
19
|
+
* Sanitize a manually-typed property key: strip characters that aren't
|
|
20
|
+
* valid in a JSON Schema property key used as a JS identifier, preserving
|
|
21
|
+
* the editor's casing (unlike `generatePropertyKey`, which derives a
|
|
22
|
+
* camelCase key from a display title).
|
|
23
|
+
*/
|
|
24
|
+
export declare function sanitizePropertyKey(raw: string): string;
|
|
25
|
+
//# sourceMappingURL=schemaFieldUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaFieldUtils.d.ts","sourceRoot":"","sources":["../../../src/components/FormTemplateEditor/schemaFieldUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE/E,eAAO,MAAM,kBAAkB,EAAE;IAAE,KAAK,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAMzE,CAAA;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,GAAG,SAAS,GAC3B,eAAe,GAAG,IAAI,CAQxB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,MAAM,CAGnE;AAED,2FAA2F;AAC3F,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,eAAe,GACpB,UAAU,CA4BZ;AAED,wEAAwE;AACxE,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GACxB,MAAM,CAiBR;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGvD"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
//#region src/components/FormTemplateEditor/schemaFieldUtils.ts
|
|
2
|
+
var e = [
|
|
3
|
+
{
|
|
4
|
+
value: "text",
|
|
5
|
+
label: "Text"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
value: "number",
|
|
9
|
+
label: "Number"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
value: "boolean",
|
|
13
|
+
label: "Yes / No"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
value: "choice",
|
|
17
|
+
label: "Multiple choice"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
value: "file",
|
|
21
|
+
label: "File upload"
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
function t(e) {
|
|
25
|
+
return !e || typeof e != "object" ? null : e.format === "synapse-filehandle-id" ? "file" : e.type === "string" && Array.isArray(e.enum) ? "choice" : e.type === "string" && !e.format ? "text" : e.type === "number" || e.type === "integer" ? "number" : e.type === "boolean" ? "boolean" : null;
|
|
26
|
+
}
|
|
27
|
+
function n(t) {
|
|
28
|
+
return t === null ? "Advanced" : e.find((e) => e.value === t)?.label ?? "Advanced";
|
|
29
|
+
}
|
|
30
|
+
function r(e, t) {
|
|
31
|
+
let n = {
|
|
32
|
+
title: e.title,
|
|
33
|
+
description: e.description
|
|
34
|
+
};
|
|
35
|
+
switch (t) {
|
|
36
|
+
case "text":
|
|
37
|
+
n.type = "string";
|
|
38
|
+
break;
|
|
39
|
+
case "number":
|
|
40
|
+
n.type = "number";
|
|
41
|
+
break;
|
|
42
|
+
case "boolean":
|
|
43
|
+
n.type = "boolean";
|
|
44
|
+
break;
|
|
45
|
+
case "choice":
|
|
46
|
+
n.type = "string", n.enum = Array.isArray(e.enum) && e.enum.length > 0 ? e.enum : ["Option 1"];
|
|
47
|
+
break;
|
|
48
|
+
case "file":
|
|
49
|
+
n.type = "number", n.format = "synapse-filehandle-id";
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
return n;
|
|
53
|
+
}
|
|
54
|
+
function i(e, t) {
|
|
55
|
+
let n = e.toLowerCase().replace(/[^a-z0-9\s]/g, "").trim().split(/\s+/).filter(Boolean).map((e, t) => t === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1)).join("") || "field", r = n, i = 1;
|
|
56
|
+
for (; t.has(r);) i += 1, r = `${n}${i}`;
|
|
57
|
+
return r;
|
|
58
|
+
}
|
|
59
|
+
function a(e) {
|
|
60
|
+
let t = e.replace(/[^A-Za-z0-9_]/g, "");
|
|
61
|
+
return /^[0-9]/.test(t) ? `_${t}` : t;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { e as FIELD_TYPE_OPTIONS, r as applyFieldType, t as detectFieldType, n as fieldTypeLabel, i as generatePropertyKey, a as sanitizePropertyKey };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=schemaFieldUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaFieldUtils.js","names":[],"sources":["../../../src/components/FormTemplateEditor/schemaFieldUtils.ts"],"sourcesContent":["import { RJSFSchema } from '@rjsf/utils'\n\n/**\n * The set of property shapes the simple editor knows how to author. Anything\n * outside this set surfaces in the UI as \"advanced\" and must be edited via the\n * raw JSON Schema view.\n */\nexport type SimpleFieldType = 'text' | 'number' | 'boolean' | 'choice' | 'file'\n\nexport const FIELD_TYPE_OPTIONS: { value: SimpleFieldType; label: string }[] = [\n { value: 'text', label: 'Text' },\n { value: 'number', label: 'Number' },\n { value: 'boolean', label: 'Yes / No' },\n { value: 'choice', label: 'Multiple choice' },\n { value: 'file', label: 'File upload' },\n]\n\nexport function detectFieldType(\n prop: RJSFSchema | undefined,\n): SimpleFieldType | null {\n if (!prop || typeof prop !== 'object') return null\n if (prop.format === 'synapse-filehandle-id') return 'file'\n if (prop.type === 'string' && Array.isArray(prop.enum)) return 'choice'\n if (prop.type === 'string' && !prop.format) return 'text'\n if (prop.type === 'number' || prop.type === 'integer') return 'number'\n if (prop.type === 'boolean') return 'boolean'\n return null\n}\n\nexport function fieldTypeLabel(type: SimpleFieldType | null): string {\n if (type === null) return 'Advanced'\n return FIELD_TYPE_OPTIONS.find(opt => opt.value === type)?.label ?? 'Advanced'\n}\n\n/** Build a fresh schema body for the given simple type, preserving label and help text. */\nexport function applyFieldType(\n prev: RJSFSchema,\n type: SimpleFieldType,\n): RJSFSchema {\n const next: RJSFSchema = {\n title: prev.title,\n description: prev.description,\n }\n switch (type) {\n case 'text':\n next.type = 'string'\n break\n case 'number':\n next.type = 'number'\n break\n case 'boolean':\n next.type = 'boolean'\n break\n case 'choice':\n next.type = 'string'\n next.enum =\n Array.isArray(prev.enum) && prev.enum.length > 0\n ? prev.enum\n : ['Option 1']\n break\n case 'file':\n next.type = 'number'\n next.format = 'synapse-filehandle-id'\n break\n }\n return next\n}\n\n/** Derive a unique camelCase JSON property key from a display title. */\nexport function generatePropertyKey(\n title: string,\n existingKeys: Set<string>,\n): string {\n const base =\n title\n .toLowerCase()\n .replace(/[^a-z0-9\\s]/g, '')\n .trim()\n .split(/\\s+/)\n .filter(Boolean)\n .map((w, i) => (i === 0 ? w : w.charAt(0).toUpperCase() + w.slice(1)))\n .join('') || 'field'\n let key = base\n let i = 1\n while (existingKeys.has(key)) {\n i += 1\n key = `${base}${i}`\n }\n return key\n}\n\n/**\n * Sanitize a manually-typed property key: strip characters that aren't\n * valid in a JSON Schema property key used as a JS identifier, preserving\n * the editor's casing (unlike `generatePropertyKey`, which derives a\n * camelCase key from a display title).\n */\nexport function sanitizePropertyKey(raw: string): string {\n const stripped = raw.replace(/[^A-Za-z0-9_]/g, '')\n return /^[0-9]/.test(stripped) ? `_${stripped}` : stripped\n}\n"],"mappings":";AASA,IAAa,IAAkE;CAC7E;EAAE,OAAO;EAAQ,OAAO;CAAO;CAC/B;EAAE,OAAO;EAAU,OAAO;CAAS;CACnC;EAAE,OAAO;EAAW,OAAO;CAAW;CACtC;EAAE,OAAO;EAAU,OAAO;CAAkB;CAC5C;EAAE,OAAO;EAAQ,OAAO;CAAc;AACxC;AAEA,SAAgB,EACd,GACwB;CAOxB,OANI,CAAC,KAAQ,OAAO,KAAS,WAAiB,OAC1C,EAAK,WAAW,0BAAgC,SAChD,EAAK,SAAS,YAAY,MAAM,QAAQ,EAAK,IAAI,IAAU,WAC3D,EAAK,SAAS,YAAY,CAAC,EAAK,SAAe,SAC/C,EAAK,SAAS,YAAY,EAAK,SAAS,YAAkB,WAC1D,EAAK,SAAS,YAAkB,YAC7B;AACT;AAEA,SAAgB,EAAe,GAAsC;CAEnE,OADI,MAAS,OAAa,aACnB,EAAmB,MAAK,MAAO,EAAI,UAAU,CAAI,GAAG,SAAS;AACtE;AAGA,SAAgB,EACd,GACA,GACY;CACZ,IAAM,IAAmB;EACvB,OAAO,EAAK;EACZ,aAAa,EAAK;CACpB;CACA,QAAQ,GAAR;EACE,KAAK;GACH,EAAK,OAAO;GACZ;EACF,KAAK;GACH,EAAK,OAAO;GACZ;EACF,KAAK;GACH,EAAK,OAAO;GACZ;EACF,KAAK;GAEH,AADA,EAAK,OAAO,UACZ,EAAK,OACH,MAAM,QAAQ,EAAK,IAAI,KAAK,EAAK,KAAK,SAAS,IAC3C,EAAK,OACL,CAAC,UAAU;GACjB;EACF,KAAK;GAEH,AADA,EAAK,OAAO,UACZ,EAAK,SAAS;GACd;CACJ;CACA,OAAO;AACT;AAGA,SAAgB,EACd,GACA,GACQ;CACR,IAAM,IACJ,EACG,YAAY,EACZ,QAAQ,gBAAgB,EAAE,EAC1B,KAAK,EACL,MAAM,KAAK,EACX,OAAO,OAAO,EACd,KAAK,GAAG,MAAO,MAAM,IAAI,IAAI,EAAE,OAAO,CAAC,EAAE,YAAY,IAAI,EAAE,MAAM,CAAC,CAAE,EACpE,KAAK,EAAE,KAAK,SACb,IAAM,GACN,IAAI;CACR,OAAO,EAAa,IAAI,CAAG,IAEzB,AADA,KAAK,GACL,IAAM,GAAG,IAAO;CAElB,OAAO;AACT;AAQA,SAAgB,EAAoB,GAAqB;CACvD,IAAM,IAAW,EAAI,QAAQ,kBAAkB,EAAE;CACjD,OAAO,SAAS,KAAK,CAAQ,IAAI,IAAI,MAAa;AACpD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FormTemplate } from '@sage-bionetworks/synapse-client';
|
|
2
|
+
import { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError';
|
|
3
|
+
import { RJSFSchema } from '@rjsf/utils';
|
|
4
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
5
|
+
import { EditableFormTemplateStep } from './utils';
|
|
6
|
+
import { FormTemplateFieldValidationError } from './formTemplateValidation';
|
|
7
|
+
export type SaveFormTemplateDraftParams = {
|
|
8
|
+
initialTemplate?: FormTemplate;
|
|
9
|
+
initialJsonSchema?: RJSFSchema;
|
|
10
|
+
name: string;
|
|
11
|
+
jsonSchema: RJSFSchema;
|
|
12
|
+
steps: EditableFormTemplateStep[];
|
|
13
|
+
};
|
|
14
|
+
export type SaveFormTemplateDraftResult = {
|
|
15
|
+
ok: true;
|
|
16
|
+
template: FormTemplate;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
validationErrors: FormTemplateFieldValidationError[];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Owns the create-schema, create-template, and update-template mutations, and sequences them
|
|
23
|
+
* into a single save mutation. A validation failure resolves as `{ ok: false, validationErrors }`
|
|
24
|
+
* rather than rejecting; a network failure (including a 412 conflict from a concurrent edit)
|
|
25
|
+
* rejects normally, surfaced via the returned mutation's `error`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useSaveFormTemplate(options?: Omit<UseMutationOptions<SaveFormTemplateDraftResult, SynapseClientError, SaveFormTemplateDraftParams>, 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SaveFormTemplateDraftResult, SynapseClientError, SaveFormTemplateDraftParams, unknown>;
|
|
28
|
+
//# sourceMappingURL=useSaveFormTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSaveFormTemplate.d.ts","sourceRoot":"","sources":["../../../src/components/FormTemplateEditor/useSaveFormTemplate.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAc,MAAM,kCAAkC,CAAA;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0DAA0D,CAAA;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,OAAO,EAAe,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AACvE,OAAO,EAAE,wBAAwB,EAAuB,MAAM,SAAS,CAAA;AACvE,OAAO,EACL,gCAAgC,EAEjC,MAAM,0BAA0B,CAAA;AAEjC,MAAM,MAAM,2BAA2B,GAAG;IACxC,eAAe,CAAC,EAAE,YAAY,CAAA;IAC9B,iBAAiB,CAAC,EAAE,UAAU,CAAA;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,wBAAwB,EAAE,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,2BAA2B,GACnC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,YAAY,CAAA;CAAE,GACpC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,gBAAgB,EAAE,gCAAgC,EAAE,CAAA;CAAE,CAAA;AAEvE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,CAAC,EAAE,IAAI,CACZ,kBAAkB,CAChB,2BAA2B,EAC3B,kBAAkB,EAClB,2BAA2B,CAC5B,EACD,YAAY,CACb,4IAuDF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useCreateFormTemplate as e, useUpdateFormTemplate as t } from "../../synapse-queries/dataaccess/useFormTemplate.js";
|
|
2
|
+
import { useCreateJsonSchema as n } from "../../synapse-queries/jsonschema/useCreateJsonSchema.js";
|
|
3
|
+
import { validateFormTemplateFields as r } from "./formTemplateValidation.js";
|
|
4
|
+
import { toFormTemplateSteps as i } from "./utils.js";
|
|
5
|
+
import { useMutation as a } from "@tanstack/react-query";
|
|
6
|
+
import o from "lodash-es/isEqual";
|
|
7
|
+
//#region src/components/FormTemplateEditor/useSaveFormTemplate.ts
|
|
8
|
+
function s(s) {
|
|
9
|
+
let c = n(), l = e(), u = t();
|
|
10
|
+
return a({
|
|
11
|
+
...s,
|
|
12
|
+
mutationFn: async (e) => {
|
|
13
|
+
let t = i(e.steps), n = r(t, e.jsonSchema);
|
|
14
|
+
if (n.length > 0) return {
|
|
15
|
+
ok: !1,
|
|
16
|
+
validationErrors: n
|
|
17
|
+
};
|
|
18
|
+
let a = e.initialTemplate?.schema$id ?? "";
|
|
19
|
+
(!o(e.jsonSchema, e.initialJsonSchema) || !a) && (a = (await c.mutateAsync(e.jsonSchema)).newVersionInfo.$id);
|
|
20
|
+
let s = {
|
|
21
|
+
...e.initialTemplate,
|
|
22
|
+
name: e.name,
|
|
23
|
+
schema$id: a,
|
|
24
|
+
steps: t
|
|
25
|
+
};
|
|
26
|
+
return {
|
|
27
|
+
ok: !0,
|
|
28
|
+
template: e.initialTemplate?.id ? await u.mutateAsync({
|
|
29
|
+
templateId: e.initialTemplate.id,
|
|
30
|
+
formTemplate: s
|
|
31
|
+
}) : await l.mutateAsync(s)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { s as useSaveFormTemplate };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=useSaveFormTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSaveFormTemplate.js","names":[],"sources":["../../../src/components/FormTemplateEditor/useSaveFormTemplate.ts"],"sourcesContent":["/*\n * Network orchestration for saving a FormTemplate draft: pre-flight client-side validation\n * (mirroring the server's per-field rules, since the server only returns a flat message),\n * registering a new JSON Schema version when the schema body changed, and creating or updating\n * the FormTemplate against that schema version.\n */\nimport { useCreateJsonSchema } from '@/synapse-queries/jsonschema/useCreateJsonSchema'\nimport {\n useCreateFormTemplate,\n useUpdateFormTemplate,\n} from '@/synapse-queries/dataaccess/useFormTemplate'\nimport { FormTemplate, JsonSchema } from '@sage-bionetworks/synapse-client'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport { RJSFSchema } from '@rjsf/utils'\nimport isEqual from 'lodash-es/isEqual'\nimport { useMutation, UseMutationOptions } from '@tanstack/react-query'\nimport { EditableFormTemplateStep, toFormTemplateSteps } from './utils'\nimport {\n FormTemplateFieldValidationError,\n validateFormTemplateFields,\n} from './formTemplateValidation'\n\nexport type SaveFormTemplateDraftParams = {\n initialTemplate?: FormTemplate\n initialJsonSchema?: RJSFSchema\n name: string\n jsonSchema: RJSFSchema\n steps: EditableFormTemplateStep[]\n}\n\nexport type SaveFormTemplateDraftResult =\n | { ok: true; template: FormTemplate }\n | { ok: false; validationErrors: FormTemplateFieldValidationError[] }\n\n/**\n * Owns the create-schema, create-template, and update-template mutations, and sequences them\n * into a single save mutation. A validation failure resolves as `{ ok: false, validationErrors }`\n * rather than rejecting; a network failure (including a 412 conflict from a concurrent edit)\n * rejects normally, surfaced via the returned mutation's `error`.\n */\nexport function useSaveFormTemplate(\n options?: Omit<\n UseMutationOptions<\n SaveFormTemplateDraftResult,\n SynapseClientError,\n SaveFormTemplateDraftParams\n >,\n 'mutationFn'\n >,\n) {\n const createSchema = useCreateJsonSchema()\n const createTemplate = useCreateFormTemplate()\n const updateTemplate = useUpdateFormTemplate()\n\n return useMutation<\n SaveFormTemplateDraftResult,\n SynapseClientError,\n SaveFormTemplateDraftParams\n >({\n ...options,\n mutationFn: async params => {\n const formTemplateSteps = toFormTemplateSteps(params.steps)\n\n const validationErrors = validateFormTemplateFields(\n formTemplateSteps,\n params.jsonSchema,\n )\n if (validationErrors.length > 0) {\n return { ok: false, validationErrors }\n }\n\n // The schema registry has no update operation — every save that changed the schema body\n // registers a fresh, immutable version. Re-registering an unchanged body would still create\n // an unnecessary version, so skip it when the draft's schema matches what was last resolved.\n let schema$id = params.initialTemplate?.schema$id ?? ''\n const schemaChanged = !isEqual(\n params.jsonSchema,\n params.initialJsonSchema,\n )\n if (schemaChanged || !schema$id) {\n const response = await createSchema.mutateAsync(\n params.jsonSchema as JsonSchema,\n )\n schema$id = response.newVersionInfo!.$id!\n }\n\n const formTemplate: FormTemplate = {\n ...params.initialTemplate,\n name: params.name,\n schema$id,\n steps: formTemplateSteps,\n }\n\n const template = params.initialTemplate?.id\n ? await updateTemplate.mutateAsync({\n templateId: params.initialTemplate.id,\n formTemplate,\n })\n : await createTemplate.mutateAsync(formTemplate)\n\n return { ok: true, template }\n },\n })\n}\n"],"mappings":";;;;;;;AAwCA,SAAgB,EACd,GAQA;CACA,IAAM,IAAe,EAAoB,GACnC,IAAiB,EAAsB,GACvC,IAAiB,EAAsB;CAE7C,OAAO,EAIL;EACA,GAAG;EACH,YAAY,OAAM,MAAU;GAC1B,IAAM,IAAoB,EAAoB,EAAO,KAAK,GAEpD,IAAmB,EACvB,GACA,EAAO,UACT;GACA,IAAI,EAAiB,SAAS,GAC5B,OAAO;IAAE,IAAI;IAAO;GAAiB;GAMvC,IAAI,IAAY,EAAO,iBAAiB,aAAa;GAKrD,CAAI,CAJmB,EACrB,EAAO,YACP,EAAO,iBACT,KACqB,CAAC,OAIpB,KAAY,MAHW,EAAa,YAClC,EAAO,UACT,GACqB,eAAgB;GAGvC,IAAM,IAA6B;IACjC,GAAG,EAAO;IACV,MAAM,EAAO;IACb;IACA,OAAO;GACT;GASA,OAAO;IAAE,IAAI;IAAM,UAPF,EAAO,iBAAiB,KACrC,MAAM,EAAe,YAAY;KAC/B,YAAY,EAAO,gBAAgB;KACnC;IACF,CAAC,IACD,MAAM,EAAe,YAAY,CAAY;GAErB;EAC9B;CACF,CAAC;AACH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormTemplateStep } from '@sage-bionetworks/synapse-client';
|
|
2
|
+
export { moveItem } from '@/utils/functions/ArrayUtils';
|
|
3
|
+
/**
|
|
4
|
+
* A `FormTemplateStep` with a client-only stable identity, used as a React
|
|
5
|
+
* key and drag-and-drop sortable id. Steps have no natural unique field
|
|
6
|
+
* (unlike fields, whose identity is their `schemaPath`), so the editor
|
|
7
|
+
* tracks one here. `uiKey` never leaves this component tree — strip it with
|
|
8
|
+
* `toFormTemplateSteps` before handing steps back to a caller.
|
|
9
|
+
*/
|
|
10
|
+
export type EditableFormTemplateStep = FormTemplateStep & {
|
|
11
|
+
uiKey: string;
|
|
12
|
+
};
|
|
13
|
+
/** Create a new empty step with a fresh identity. */
|
|
14
|
+
export declare function createEditableStep(): EditableFormTemplateStep;
|
|
15
|
+
/** Attach a fresh identity to each step loaded from outside the editor. */
|
|
16
|
+
export declare function toEditableSteps(steps: FormTemplateStep[]): EditableFormTemplateStep[];
|
|
17
|
+
/** Strip the client-only identity before handing steps back to a caller. */
|
|
18
|
+
export declare function toFormTemplateSteps(steps: EditableFormTemplateStep[]): FormTemplateStep[];
|
|
19
|
+
/** Normalize a JSON pointer (ensure leading slash). */
|
|
20
|
+
export declare function normalizePointer(p: string): string;
|
|
21
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/FormTemplateEditor/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAIvD;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3E,qDAAqD;AACrD,wBAAgB,kBAAkB,IAAI,wBAAwB,CAO7D;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAC7B,KAAK,EAAE,gBAAgB,EAAE,GACxB,wBAAwB,EAAE,CAE5B;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,wBAAwB,EAAE,GAChC,gBAAgB,EAAE,CAEpB;AAED,uDAAuD;AACvD,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { moveItem as e } from "../../utils/functions/ArrayUtils.js";
|
|
2
|
+
//#region src/components/FormTemplateEditor/utils.ts
|
|
3
|
+
var t = 0;
|
|
4
|
+
function n() {
|
|
5
|
+
return {
|
|
6
|
+
title: "New Step",
|
|
7
|
+
description: "",
|
|
8
|
+
fields: [],
|
|
9
|
+
uiKey: `step-${t++}`
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function r(e) {
|
|
13
|
+
return e.map((e) => ({
|
|
14
|
+
...e,
|
|
15
|
+
uiKey: `step-${t++}`
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
function i(e) {
|
|
19
|
+
return e.map(({ uiKey: e, ...t }) => t);
|
|
20
|
+
}
|
|
21
|
+
function a(e) {
|
|
22
|
+
return e && (e.startsWith("/") ? e : `/${e}`);
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { n as createEditableStep, e as moveItem, a as normalizePointer, r as toEditableSteps, i as toFormTemplateSteps };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/FormTemplateEditor/utils.ts"],"sourcesContent":["import { FormTemplateStep } from '@sage-bionetworks/synapse-client'\n\nexport { moveItem } from '@/utils/functions/ArrayUtils'\n\nlet nextUiKeySeq = 0\n\n/**\n * A `FormTemplateStep` with a client-only stable identity, used as a React\n * key and drag-and-drop sortable id. Steps have no natural unique field\n * (unlike fields, whose identity is their `schemaPath`), so the editor\n * tracks one here. `uiKey` never leaves this component tree — strip it with\n * `toFormTemplateSteps` before handing steps back to a caller.\n */\nexport type EditableFormTemplateStep = FormTemplateStep & { uiKey: string }\n\n/** Create a new empty step with a fresh identity. */\nexport function createEditableStep(): EditableFormTemplateStep {\n return {\n title: 'New Step',\n description: '',\n fields: [],\n uiKey: `step-${nextUiKeySeq++}`,\n }\n}\n\n/** Attach a fresh identity to each step loaded from outside the editor. */\nexport function toEditableSteps(\n steps: FormTemplateStep[],\n): EditableFormTemplateStep[] {\n return steps.map(step => ({ ...step, uiKey: `step-${nextUiKeySeq++}` }))\n}\n\n/** Strip the client-only identity before handing steps back to a caller. */\nexport function toFormTemplateSteps(\n steps: EditableFormTemplateStep[],\n): FormTemplateStep[] {\n return steps.map(({ uiKey: _uiKey, ...rest }) => rest)\n}\n\n/** Normalize a JSON pointer (ensure leading slash). */\nexport function normalizePointer(p: string): string {\n if (!p) return p\n return p.startsWith('/') ? p : `/${p}`\n}\n"],"mappings":";;AAIA,IAAI,IAAe;AAYnB,SAAgB,IAA+C;CAC7D,OAAO;EACL,OAAO;EACP,aAAa;EACb,QAAQ,CAAC;EACT,OAAO,QAAQ;CACjB;AACF;AAGA,SAAgB,EACd,GAC4B;CAC5B,OAAO,EAAM,KAAI,OAAS;EAAE,GAAG;EAAM,OAAO,QAAQ;CAAiB,EAAE;AACzE;AAGA,SAAgB,EACd,GACoB;CACpB,OAAO,EAAM,KAAK,EAAE,OAAO,GAAQ,GAAG,QAAW,CAAI;AACvD;AAGA,SAAgB,EAAiB,GAAmB;CAElD,OADK,MACE,EAAE,WAAW,GAAG,IAAI,IAAI,IAAI;AACrC"}
|
|
@@ -9,7 +9,9 @@ export declare enum RestrictionUiType {
|
|
|
9
9
|
AccessBlockedByRestrictionWithRejectedRDCADAPRequest = "AccessBlockedByRestrictionWithRejectedRDCADAPRequest",
|
|
10
10
|
AccessBlockedByACL = "AccessBlockedByACL",
|
|
11
11
|
AccessBlockedToAnonymous = "AccessBlockedToAnonymous",
|
|
12
|
-
AccessibleExternalFileHandle = "AccessibleExternalFileHandle"
|
|
12
|
+
AccessibleExternalFileHandle = "AccessibleExternalFileHandle",
|
|
13
|
+
AccessibleOnRDCADAP = "AccessibleOnRDCADAP",
|
|
14
|
+
AccessBlockedByRDCADAPAccountNotLinked = "AccessBlockedByRDCADAPAccountNotLinked"
|
|
13
15
|
}
|
|
14
16
|
declare function AccessIcon(props: {
|
|
15
17
|
restrictionUiType: RestrictionUiType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessIcon.d.ts","sourceRoot":"","sources":["../../../src/components/HasAccess/AccessIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAY,MAAM,eAAe,CAAA;AAGxD,oBAAY,iBAAiB;IAC3B,UAAU,eAAe;IACzB,mBAAmB,wBAAwB;IAC3C,0BAA0B,+BAA+B;IACzD,4CAA4C,iDAAiD;IAC7F,oDAAoD,yDAAyD;IAC7G,mDAAmD,wDAAwD;IAC3G,oDAAoD,yDAAyD;IAC7G,kBAAkB,uBAAuB;IACzC,wBAAwB,6BAA6B;IACrD,4BAA4B,iCAAiC;
|
|
1
|
+
{"version":3,"file":"AccessIcon.d.ts","sourceRoot":"","sources":["../../../src/components/HasAccess/AccessIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAY,MAAM,eAAe,CAAA;AAGxD,oBAAY,iBAAiB;IAC3B,UAAU,eAAe;IACzB,mBAAmB,wBAAwB;IAC3C,0BAA0B,+BAA+B;IACzD,4CAA4C,iDAAiD;IAC7F,oDAAoD,yDAAyD;IAC7G,mDAAmD,wDAAwD;IAC3G,oDAAoD,yDAAyD;IAC7G,kBAAkB,uBAAuB;IACzC,wBAAwB,6BAA6B;IACrD,4BAA4B,iCAAiC;IAC7D,mBAAmB,wBAAwB;IAC3C,sCAAsC,2CAA2C;CAClF;AAqED,iBAAS,UAAU,CAAC,KAAK,EAAE;IACzB,iBAAiB,EAAE,iBAAiB,CAAA;IACpC,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;CACpB,2CAqBA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { useTheme as t } from "@mui/material";
|
|
|
3
3
|
import { Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/HasAccess/AccessIcon.tsx
|
|
5
5
|
var i = /* @__PURE__ */ function(e) {
|
|
6
|
-
return e.Accessible = "Accessible", e.AccessibleWithTerms = "AccessibleWithTerms", e.AccessBlockedByRestriction = "AccessBlockedByRestriction", e.AccessBlockedByRestrictionWithPendingRequest = "AccessBlockedByRestrictionWithPendingRequest", e.AccessBlockedByRestrictionWithPendingExternalRequest = "AccessBlockedByRestrictionWithPendingExternalRequest", e.AccessBlockedByRestrictionWithPendingRDCADAPRequest = "AccessBlockedByRestrictionWithPendingRDCADAPRequest", e.AccessBlockedByRestrictionWithRejectedRDCADAPRequest = "AccessBlockedByRestrictionWithRejectedRDCADAPRequest", e.AccessBlockedByACL = "AccessBlockedByACL", e.AccessBlockedToAnonymous = "AccessBlockedToAnonymous", e.AccessibleExternalFileHandle = "AccessibleExternalFileHandle", e;
|
|
6
|
+
return e.Accessible = "Accessible", e.AccessibleWithTerms = "AccessibleWithTerms", e.AccessBlockedByRestriction = "AccessBlockedByRestriction", e.AccessBlockedByRestrictionWithPendingRequest = "AccessBlockedByRestrictionWithPendingRequest", e.AccessBlockedByRestrictionWithPendingExternalRequest = "AccessBlockedByRestrictionWithPendingExternalRequest", e.AccessBlockedByRestrictionWithPendingRDCADAPRequest = "AccessBlockedByRestrictionWithPendingRDCADAPRequest", e.AccessBlockedByRestrictionWithRejectedRDCADAPRequest = "AccessBlockedByRestrictionWithRejectedRDCADAPRequest", e.AccessBlockedByACL = "AccessBlockedByACL", e.AccessBlockedToAnonymous = "AccessBlockedToAnonymous", e.AccessibleExternalFileHandle = "AccessibleExternalFileHandle", e.AccessibleOnRDCADAP = "AccessibleOnRDCADAP", e.AccessBlockedByRDCADAPAccountNotLinked = "AccessBlockedByRDCADAPAccountNotLinked", e;
|
|
7
7
|
}({}), a = {
|
|
8
8
|
AccessBlockedToAnonymous: {
|
|
9
9
|
icon: "accessClosed",
|
|
@@ -35,6 +35,11 @@ var i = /* @__PURE__ */ function(e) {
|
|
|
35
35
|
color: (e) => e.palette.warning.main,
|
|
36
36
|
tooltipText: "Your access request has been denied by RDCA-DAP."
|
|
37
37
|
},
|
|
38
|
+
AccessBlockedByRDCADAPAccountNotLinked: {
|
|
39
|
+
icon: "linkOff",
|
|
40
|
+
color: (e) => e.palette.warning.main,
|
|
41
|
+
tooltipText: "Link your RDCA-DAP account to request access to this item."
|
|
42
|
+
},
|
|
38
43
|
AccessBlockedByACL: {
|
|
39
44
|
icon: "accessClosed",
|
|
40
45
|
color: (e) => e.palette.warning.main,
|
|
@@ -50,6 +55,11 @@ var i = /* @__PURE__ */ function(e) {
|
|
|
50
55
|
color: (e) => e.palette.success.main,
|
|
51
56
|
tooltipText: "You have access to this item."
|
|
52
57
|
},
|
|
58
|
+
AccessibleOnRDCADAP: {
|
|
59
|
+
icon: "accessOpen",
|
|
60
|
+
color: (e) => e.palette.success.main,
|
|
61
|
+
tooltipText: "You have access to this item on RDCA-DAP."
|
|
62
|
+
},
|
|
53
63
|
AccessibleExternalFileHandle: {
|
|
54
64
|
icon: "linkOff",
|
|
55
65
|
color: (e) => e.palette.grey[700],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessIcon.js","names":[],"sources":["../../../src/components/HasAccess/AccessIcon.tsx"],"sourcesContent":["import { SxProps, Theme, useTheme } from '@mui/material'\nimport IconSvg, { IconName } from '../IconSvg/IconSvg'\n\nexport enum RestrictionUiType {\n Accessible = 'Accessible',\n AccessibleWithTerms = 'AccessibleWithTerms',\n AccessBlockedByRestriction = 'AccessBlockedByRestriction',\n AccessBlockedByRestrictionWithPendingRequest = 'AccessBlockedByRestrictionWithPendingRequest',\n AccessBlockedByRestrictionWithPendingExternalRequest = 'AccessBlockedByRestrictionWithPendingExternalRequest',\n AccessBlockedByRestrictionWithPendingRDCADAPRequest = 'AccessBlockedByRestrictionWithPendingRDCADAPRequest',\n AccessBlockedByRestrictionWithRejectedRDCADAPRequest = 'AccessBlockedByRestrictionWithRejectedRDCADAPRequest',\n AccessBlockedByACL = 'AccessBlockedByACL',\n AccessBlockedToAnonymous = 'AccessBlockedToAnonymous',\n AccessibleExternalFileHandle = 'AccessibleExternalFileHandle',\n}\n\nconst iconConfiguration: Record<\n RestrictionUiType,\n { icon: IconName; color: (theme: Theme) => string; tooltipText: string }\n> = {\n [RestrictionUiType.AccessBlockedToAnonymous]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You must sign in to access this item.',\n },\n [RestrictionUiType.AccessBlockedByRestriction]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You must request access to this restricted item.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingRequest]: {\n icon: 'accessPending',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request is pending approval.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingExternalRequest]: {\n icon: 'accessPendingCloud',\n color: theme => theme.palette.warning.main,\n tooltipText:\n 'Your access request is pending approval from an external system.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingRDCADAPRequest]: {\n icon: 'accessPendingCloud',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request is pending approval by RDCA-DAP.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithRejectedRDCADAPRequest]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request has been denied by RDCA-DAP.',\n },\n [RestrictionUiType.AccessBlockedByACL]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You do not have download access for this item.',\n },\n [RestrictionUiType.AccessibleWithTerms]: {\n icon: 'accessOpen',\n color: theme => theme.palette.success.main,\n tooltipText: 'View Terms',\n },\n [RestrictionUiType.Accessible]: {\n icon: 'accessOpen',\n color: theme => theme.palette.success.main,\n tooltipText: 'You have access to this item.',\n },\n [RestrictionUiType.AccessibleExternalFileHandle]: {\n icon: 'linkOff',\n color: theme => theme.palette.grey[700],\n tooltipText: 'Access may be controlled by an external system.',\n },\n}\n\nfunction AccessIcon(props: {\n restrictionUiType: RestrictionUiType\n wrap?: boolean\n sx?: SxProps<Theme>\n}) {\n const { restrictionUiType, wrap = true, sx } = props\n const theme = useTheme()\n if (restrictionUiType) {\n const configuration = iconConfiguration[restrictionUiType]\n return (\n <IconSvg\n icon={configuration.icon}\n label={configuration.tooltipText}\n wrap={wrap}\n sx={{\n color: configuration.color(theme),\n height: '16px',\n verticalAlign: 'text-top',\n ...sx,\n }}\n />\n )\n }\n // nothing is rendered until downloadType is determined\n return <></>\n}\n\nexport default AccessIcon\n"],"mappings":";;;;AAGA,IAAY,IAAL,yBAAA,GAAA;QACL,EAAA,aAAA,cACA,EAAA,sBAAA,uBACA,EAAA,6BAAA,8BACA,EAAA,+CAAA,gDACA,EAAA,uDAAA,wDACA,EAAA,sDAAA,uDACA,EAAA,uDAAA,wDACA,EAAA,qBAAA,sBACA,EAAA,2BAAA,4BACA,EAAA,+BAAA;AACF,EAAA,CAAA,CAAA,GAEM,IAGF;2BAC4C;EAC5C,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;6BACgD;EAC9C,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;+CACkE;EAChE,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;uDAC0E;EACxE,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aACE;CACJ;sDACyE;EACvE,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;uDAC0E;EACxE,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;qBACwC;EACtC,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;sBACyC;EACvC,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;aACgC;EAC9B,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;+BACkD;EAChD,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,KAAK;EACnC,aAAa;CACf;AACF;AAEA,SAAS,EAAW,GAIjB;CACD,IAAM,EAAE,sBAAmB,UAAO,IAAM,UAAO,GACzC,IAAQ,EAAS;CACvB,IAAI,GAAmB;EACrB,IAAM,IAAgB,EAAkB;EACxC,OACE,kBAAC,GAAD;GACE,MAAM,EAAc;GACpB,OAAO,EAAc;GACf;GACN,IAAI;IACF,OAAO,EAAc,MAAM,CAAK;IAChC,QAAQ;IACR,eAAe;IACf,GAAG;GACL;EACD,CAAA;CAEL;CAEA,OAAO,kBAAA,GAAA,CAAI,CAAA;AACb"}
|
|
1
|
+
{"version":3,"file":"AccessIcon.js","names":[],"sources":["../../../src/components/HasAccess/AccessIcon.tsx"],"sourcesContent":["import { SxProps, Theme, useTheme } from '@mui/material'\nimport IconSvg, { IconName } from '../IconSvg/IconSvg'\n\nexport enum RestrictionUiType {\n Accessible = 'Accessible',\n AccessibleWithTerms = 'AccessibleWithTerms',\n AccessBlockedByRestriction = 'AccessBlockedByRestriction',\n AccessBlockedByRestrictionWithPendingRequest = 'AccessBlockedByRestrictionWithPendingRequest',\n AccessBlockedByRestrictionWithPendingExternalRequest = 'AccessBlockedByRestrictionWithPendingExternalRequest',\n AccessBlockedByRestrictionWithPendingRDCADAPRequest = 'AccessBlockedByRestrictionWithPendingRDCADAPRequest',\n AccessBlockedByRestrictionWithRejectedRDCADAPRequest = 'AccessBlockedByRestrictionWithRejectedRDCADAPRequest',\n AccessBlockedByACL = 'AccessBlockedByACL',\n AccessBlockedToAnonymous = 'AccessBlockedToAnonymous',\n AccessibleExternalFileHandle = 'AccessibleExternalFileHandle',\n AccessibleOnRDCADAP = 'AccessibleOnRDCADAP',\n AccessBlockedByRDCADAPAccountNotLinked = 'AccessBlockedByRDCADAPAccountNotLinked',\n}\n\nconst iconConfiguration: Record<\n RestrictionUiType,\n { icon: IconName; color: (theme: Theme) => string; tooltipText: string }\n> = {\n [RestrictionUiType.AccessBlockedToAnonymous]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You must sign in to access this item.',\n },\n [RestrictionUiType.AccessBlockedByRestriction]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You must request access to this restricted item.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingRequest]: {\n icon: 'accessPending',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request is pending approval.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingExternalRequest]: {\n icon: 'accessPendingCloud',\n color: theme => theme.palette.warning.main,\n tooltipText:\n 'Your access request is pending approval from an external system.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingRDCADAPRequest]: {\n icon: 'accessPendingCloud',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request is pending approval by RDCA-DAP.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithRejectedRDCADAPRequest]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request has been denied by RDCA-DAP.',\n },\n [RestrictionUiType.AccessBlockedByRDCADAPAccountNotLinked]: {\n icon: 'linkOff',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Link your RDCA-DAP account to request access to this item.',\n },\n [RestrictionUiType.AccessBlockedByACL]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You do not have download access for this item.',\n },\n [RestrictionUiType.AccessibleWithTerms]: {\n icon: 'accessOpen',\n color: theme => theme.palette.success.main,\n tooltipText: 'View Terms',\n },\n [RestrictionUiType.Accessible]: {\n icon: 'accessOpen',\n color: theme => theme.palette.success.main,\n tooltipText: 'You have access to this item.',\n },\n [RestrictionUiType.AccessibleOnRDCADAP]: {\n icon: 'accessOpen',\n color: theme => theme.palette.success.main,\n tooltipText: 'You have access to this item on RDCA-DAP.',\n },\n [RestrictionUiType.AccessibleExternalFileHandle]: {\n icon: 'linkOff',\n color: theme => theme.palette.grey[700],\n tooltipText: 'Access may be controlled by an external system.',\n },\n}\n\nfunction AccessIcon(props: {\n restrictionUiType: RestrictionUiType\n wrap?: boolean\n sx?: SxProps<Theme>\n}) {\n const { restrictionUiType, wrap = true, sx } = props\n const theme = useTheme()\n if (restrictionUiType) {\n const configuration = iconConfiguration[restrictionUiType]\n return (\n <IconSvg\n icon={configuration.icon}\n label={configuration.tooltipText}\n wrap={wrap}\n sx={{\n color: configuration.color(theme),\n height: '16px',\n verticalAlign: 'text-top',\n ...sx,\n }}\n />\n )\n }\n // nothing is rendered until downloadType is determined\n return <></>\n}\n\nexport default AccessIcon\n"],"mappings":";;;;AAGA,IAAY,IAAL,yBAAA,GAAA;QACL,EAAA,aAAA,cACA,EAAA,sBAAA,uBACA,EAAA,6BAAA,8BACA,EAAA,+CAAA,gDACA,EAAA,uDAAA,wDACA,EAAA,sDAAA,uDACA,EAAA,uDAAA,wDACA,EAAA,qBAAA,sBACA,EAAA,2BAAA,4BACA,EAAA,+BAAA,gCACA,EAAA,sBAAA,uBACA,EAAA,yCAAA;AACF,EAAA,CAAA,CAAA,GAEM,IAGF;2BAC4C;EAC5C,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;6BACgD;EAC9C,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;+CACkE;EAChE,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;uDAC0E;EACxE,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aACE;CACJ;sDACyE;EACvE,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;uDAC0E;EACxE,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;yCAC4D;EAC1D,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;qBACwC;EACtC,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;sBACyC;EACvC,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;aACgC;EAC9B,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;sBACyC;EACvC,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,QAAQ;EACtC,aAAa;CACf;+BACkD;EAChD,MAAM;EACN,QAAO,MAAS,EAAM,QAAQ,KAAK;EACnC,aAAa;CACf;AACF;AAEA,SAAS,EAAW,GAIjB;CACD,IAAM,EAAE,sBAAmB,UAAO,IAAM,UAAO,GACzC,IAAQ,EAAS;CACvB,IAAI,GAAmB;EACrB,IAAM,IAAgB,EAAkB;EACxC,OACE,kBAAC,GAAD;GACE,MAAM,EAAc;GACpB,OAAO,EAAc;GACf;GACN,IAAI;IACF,OAAO,EAAc,MAAM,CAAK;IAChC,QAAQ;IACR,eAAe;IACf,GAAG;GACL;EACD,CAAA;CAEL;CAEA,OAAO,kBAAA,GAAA,CAAI,CAAA;AACb"}
|
|
@@ -13,7 +13,7 @@ export interface CustomFormContext extends FormContextType {
|
|
|
13
13
|
/**
|
|
14
14
|
* Allows varying the appearance of descriptions in the UI as either a popover or an expand/collapse control
|
|
15
15
|
*/
|
|
16
|
-
descriptionVariant?: 'popover' | 'expand';
|
|
16
|
+
descriptionVariant?: 'popover' | 'expand' | 'inline';
|
|
17
17
|
/**
|
|
18
18
|
* Allows varying the format of the description in the UI. If 'table', then the description and type are both shown
|
|
19
19
|
* in a table format. If 'string', then the description is shown as a string.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomFormContext.d.ts","sourceRoot":"","sources":["../../../src/components/JsonSchemaForm/CustomFormContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD;;;;;;;;OAQG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAA;IAEtC;;OAEG;IACH,kBAAkB,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"CustomFormContext.d.ts","sourceRoot":"","sources":["../../../src/components/JsonSchemaForm/CustomFormContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE7C,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD;;;;;;;;OAQG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAA;IAEtC;;OAEG;IACH,kBAAkB,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;IAEpD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAEtC;;OAEG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAA;IAE1C;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAE3B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,aAAa,GAAG,UAAU,CAAA;CAC3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._jsonSchemaForm_zdhfc_1{grid-template-rows:auto auto auto auto auto;margin-bottom:15px;display:grid}._jsonSchemaForm_zdhfc_1 .react-select-container>.form-control{height:53.33px}._jsonSchemaForm_zdhfc_1 .form-group.rjsf-field-array{margin-bottom:0}._jsonSchemaForm_zdhfc_1 .form-control{height:unset}._jsonSchemaForm_zdhfc_1 .MuiTextField-root:not(.datetime-picker){display:flex}._jsonSchemaForm_zdhfc_1 .rjsf-array-item .LabelContainer{display:none!important}._jsonSchemaForm_zdhfc_1>.form-group{grid-row-start:1}._jsonSchemaForm_zdhfc_1>hr{grid-row-start:4;width:100%}._jsonSchemaForm_zdhfc_1 .row{padding:0 10px}._jsonSchemaForm_zdhfc_1 .field-description-inline{margin-bottom:8px}._jsonSchemaForm_zdhfc_1 .rjsf-field-array>.field-description{margin-top:0;margin-bottom:8px}._jsonSchemaForm_zdhfc_1 .rjsf-array-item .field-description,._jsonSchemaForm_zdhfc_1 .rjsf-array-item .field-description-inline,._jsonSchemaForm_zdhfc_1 .rjsf-array-item .HelpButton{display:none}._jsonSchemaForm_zdhfc_1 .rjsf-array-item .form-control,._jsonSchemaForm_zdhfc_1 .rjsf-array-item .react-select-container{grid-row-start:widget}._jsonSchemaForm_zdhfc_1 .rjsf-array-item div{grid-row-start:errors}._jsonSchemaForm_zdhfc_1 .LabelContainer{display:flex}._jsonSchemaForm_zdhfc_1 .LabelContainer label{flex-grow:1}._jsonSchemaForm_zdhfc_1 .LabelContainer label span.required{color:var(--synapse-red-required);margin-left:2px}._jsonSchemaForm_zdhfc_1 select{background-color:var(--synapse-gray-light)}._jsonSchemaForm_zdhfc_1 .rjsf-field-array>.rjsf-array-item>label.form-label{display:none}._jsonSchemaForm_zdhfc_1 .HelpButton{float:right;cursor:pointer;margin:0 0 .5rem}._jsonSchemaForm_zdhfc_1 table.FieldDescriptionTable tr th,._jsonSchemaForm_zdhfc_1 table.FieldDescriptionTable tr td{vertical-align:middle;padding:3px 0}._jsonSchemaForm_zdhfc_1 table.FieldDescriptionTable tr th .field-description,._jsonSchemaForm_zdhfc_1 table.FieldDescriptionTable tr td .field-description{margin-bottom:0}._jsonSchemaForm_zdhfc_1 table.FieldDescriptionTable tr th{color:var(--synapse-text-color-disabled);padding-right:25px;font-weight:400}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonSchemaForm.module.js","names":[],"sources":["../../../src/components/JsonSchemaForm/JsonSchemaForm.module.scss"],"sourcesContent":[".jsonSchemaForm {\n display: grid;\n // We can't rearrange the order of the HTML elements, so we use grid rows to reorder them.\n grid-template-rows: auto auto auto auto auto;\n margin-bottom: 15px;\n\n :global(.react-select-container) > :global(.form-control) {\n height: 53.33px;\n }\n\n :global(.form-group.rjsf-field-array) {\n margin-bottom: 0px;\n }\n\n :global(.form-control) {\n height: unset;\n }\n\n :global(.MuiTextField-root):not(:global(.datetime-picker)) {\n display: flex;\n }\n\n :global(.rjsf-array-item) :global(.LabelContainer) {\n display: none !important;\n }\n\n > :global(.form-group) {\n grid-row-start: 1;\n }\n\n > hr {\n grid-row-start: 4;\n width: 100%;\n }\n\n :global(.row) {\n padding: 0px 10px;\n }\n\n :global(.rjsf-field-array) > :global(.field-description) {\n margin-top: 0px;\n margin-bottom: 8px;\n }\n\n :global(.rjsf-array-item) {\n :global(.field-description) {\n display: none;\n }\n\n :global(.HelpButton) {\n display: none;\n }\n\n :global(.form-control),\n :global(.react-select-container) {\n grid-row-start: widget;\n }\n\n div {\n grid-row-start: errors;\n }\n }\n\n :global(.LabelContainer) {\n display: flex;\n label {\n flex-grow: 1;\n span:global(.required) {\n color: var(--synapse-red-required);\n margin-left: 2px;\n }\n }\n }\n\n select {\n background-color: var(--synapse-gray-light);\n }\n\n :global(.rjsf-field-array)\n > :global(.rjsf-array-item)\n > label:global(.form-label) {\n display: none;\n }\n\n :global(.HelpButton) {\n float: right;\n margin: 0 0 0.5rem;\n cursor: pointer;\n }\n\n table:global(.FieldDescriptionTable) {\n tr {\n th,\n td {\n padding: 3px 0px;\n vertical-align: middle;\n\n :global(.field-description) {\n margin-bottom: 0;\n }\n }\n th {\n padding-right: 25px;\n font-weight: 400;\n color: var(--synapse-text-color-disabled);\n }\n }\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"JsonSchemaForm.module.js","names":[],"sources":["../../../src/components/JsonSchemaForm/JsonSchemaForm.module.scss"],"sourcesContent":[".jsonSchemaForm {\n display: grid;\n // We can't rearrange the order of the HTML elements, so we use grid rows to reorder them.\n grid-template-rows: auto auto auto auto auto;\n margin-bottom: 15px;\n\n :global(.react-select-container) > :global(.form-control) {\n height: 53.33px;\n }\n\n :global(.form-group.rjsf-field-array) {\n margin-bottom: 0px;\n }\n\n :global(.form-control) {\n height: unset;\n }\n\n :global(.MuiTextField-root):not(:global(.datetime-picker)) {\n display: flex;\n }\n\n :global(.rjsf-array-item) :global(.LabelContainer) {\n display: none !important;\n }\n\n > :global(.form-group) {\n grid-row-start: 1;\n }\n\n > hr {\n grid-row-start: 4;\n width: 100%;\n }\n\n :global(.row) {\n padding: 0px 10px;\n }\n\n :global(.field-description-inline) {\n margin-bottom: 8px;\n }\n\n :global(.rjsf-field-array) > :global(.field-description) {\n margin-top: 0px;\n margin-bottom: 8px;\n }\n\n :global(.rjsf-array-item) {\n :global(.field-description),\n :global(.field-description-inline) {\n display: none;\n }\n\n :global(.HelpButton) {\n display: none;\n }\n\n :global(.form-control),\n :global(.react-select-container) {\n grid-row-start: widget;\n }\n\n div {\n grid-row-start: errors;\n }\n }\n\n :global(.LabelContainer) {\n display: flex;\n label {\n flex-grow: 1;\n span:global(.required) {\n color: var(--synapse-red-required);\n margin-left: 2px;\n }\n }\n }\n\n select {\n background-color: var(--synapse-gray-light);\n }\n\n :global(.rjsf-field-array)\n > :global(.rjsf-array-item)\n > label:global(.form-label) {\n display: none;\n }\n\n :global(.HelpButton) {\n float: right;\n margin: 0 0 0.5rem;\n cursor: pointer;\n }\n\n table:global(.FieldDescriptionTable) {\n tr {\n th,\n td {\n padding: 3px 0px;\n vertical-align: middle;\n\n :global(.field-description) {\n margin-bottom: 0;\n }\n }\n th {\n padding-right: 25px;\n font-weight: 400;\n color: var(--synapse-text-color-disabled);\n }\n }\n }\n}\n"],"mappings":""}
|
|
@@ -37,13 +37,18 @@
|
|
|
37
37
|
padding: 0px 10px;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
:global(.field-description-inline) {
|
|
41
|
+
margin-bottom: 8px;
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
:global(.rjsf-field-array) > :global(.field-description) {
|
|
41
45
|
margin-top: 0px;
|
|
42
46
|
margin-bottom: 8px;
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
:global(.rjsf-array-item) {
|
|
46
|
-
:global(.field-description)
|
|
50
|
+
:global(.field-description),
|
|
51
|
+
:global(.field-description-inline) {
|
|
47
52
|
display: none;
|
|
48
53
|
}
|
|
49
54
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RJSFInputLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/JsonSchemaForm/templates/RJSFInputLabel.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EACf,QAAQ,EACR,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAA;AAEnD,KAAK,mBAAmB,CACtB,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,IAC7B,iBAAiB,CAAC;IACpB;wBACoB;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,sCAAsC;IACtC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,4CAA4C;IAC5C,WAAW,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,4BAA4B;IAC5B,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAC5B,CAAC,CAAA;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"RJSFInputLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/JsonSchemaForm/templates/RJSFInputLabel.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,eAAe,EACf,QAAQ,EACR,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAA;AAEnD,KAAK,mBAAmB,CACtB,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,IAC7B,iBAAiB,CAAC;IACpB;wBACoB;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,sCAAsC;IACtC,UAAU,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,4CAA4C;IAC5C,WAAW,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,4BAA4B;IAC5B,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAC5B,CAAC,CAAA;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAsDpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RJSFInputLabel.js","names":[],"sources":["../../../../src/components/JsonSchemaForm/templates/RJSFInputLabel.tsx"],"sourcesContent":["import { StyledPopover } from '@/components/styled/StyledPopover'\nimport { HelpOutline, HelpTwoTone } from '@mui/icons-material'\nimport { Collapse, IconButton, Tooltip } from '@mui/material'\nimport {\n FormContextType,\n Registry,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils'\nimport { PropsWithChildren, useState } from 'react'\n\ntype RJSFInputLabelProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> = PropsWithChildren<{\n /** If true, the label will not be shown\n * @default false */\n hideLabel?: boolean\n /** The rendered label of the field */\n fieldLabel: React.ReactNode\n /** The rendered description of the field */\n description: React.ReactNode\n /** The `registry` object */\n registry: Registry<T, S, F>\n}>\n\n/**\n * Component that handles rendering our custom input label and description fields for RJSF.\n */\nexport function RJSFInputLabelWrapper<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: RJSFInputLabelProps<T, S, F>) {\n const {\n hideLabel = false,\n fieldLabel,\n description,\n registry,\n children,\n } = props\n const descriptionVariant =\n registry.formContext.descriptionVariant || 'popover'\n\n const [showDetails, setShowDetails] = useState(false)\n\n const expandButton = (\n <Tooltip title={'More Info'}>\n <IconButton\n onClick={e => {\n e.preventDefault()\n setShowDetails(!showDetails)\n }}\n aria-expanded={showDetails}\n size={'small'}\n >\n <HelpOutline color={'primary'} sx={{ width: '16px', height: '16px' }} />\n </IconButton>\n </Tooltip>\n )\n\n const popoverButton = (\n <StyledPopover popoverContent={description} maxWidth=\"350px\">\n <HelpTwoTone className={`HelpButton`} />\n </StyledPopover>\n )\n\n return (\n <>\n {!hideLabel && (\n <div className=\"LabelContainer\">\n {fieldLabel}\n {description && descriptionVariant === 'popover' && popoverButton}\n {description && descriptionVariant === 'expand' && expandButton}\n </div>\n )}\n {children}\n {!hideLabel && descriptionVariant === 'expand' && (\n <Collapse className=\"field-description\" in={showDetails}>\n {description}\n </Collapse>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;AA8BA,SAAgB,EAId,GAAqC;CACrC,IAAM,EACJ,eAAY,IACZ,eACA,gBACA,aACA,gBACE,GACE,IACJ,EAAS,YAAY,sBAAsB,WAEvC,CAAC,GAAa,KAAkB,EAAS,EAAK;CAuBpD,OACE,kBAAA,GAAA,EAAA,UAAA;EACG,CAAC,KACA,kBAAC,OAAD;GAAK,WAAU;aAAf;IACG;IACA,KAAe,MAAuB,aAV7C,kBAAC,GAAD;KAAe,gBAAgB;KAAa,UAAS;eACnD,kBAAC,GAAD,EAAa,WAAW,aAAe,CAAA;IAC1B,CAQ2C;IACnD,KAAe,MAAuB,YA1B7C,kBAAC,GAAD;KAAS,OAAO;eACd,kBAAC,GAAD;MACE,UAAS,MAAK;OAEZ,AADA,EAAE,eAAe,GACjB,EAAe,CAAC,CAAW;MAC7B;MACA,iBAAe;MACf,MAAM;gBAEN,kBAAC,GAAD;OAAa,OAAO;OAAW,IAAI;QAAE,OAAO;QAAQ,QAAQ;OAAO;MAAI,CAAA;KAC7D,CAAA;IACL,CAegD;GAChD;;EAEN;EACA,CAAC,KAAa,MAAuB,YACpC,kBAAC,GAAD;GAAU,WAAU;GAAoB,IAAI;aACzC;EACO,CAAA;CAEZ,EAAA,CAAA;AAEN"}
|
|
1
|
+
{"version":3,"file":"RJSFInputLabel.js","names":[],"sources":["../../../../src/components/JsonSchemaForm/templates/RJSFInputLabel.tsx"],"sourcesContent":["import { StyledPopover } from '@/components/styled/StyledPopover'\nimport { HelpOutline, HelpTwoTone } from '@mui/icons-material'\nimport { Collapse, IconButton, Tooltip } from '@mui/material'\nimport {\n FormContextType,\n Registry,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils'\nimport { PropsWithChildren, useState } from 'react'\n\ntype RJSFInputLabelProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> = PropsWithChildren<{\n /** If true, the label will not be shown\n * @default false */\n hideLabel?: boolean\n /** The rendered label of the field */\n fieldLabel: React.ReactNode\n /** The rendered description of the field */\n description: React.ReactNode\n /** The `registry` object */\n registry: Registry<T, S, F>\n}>\n\n/**\n * Component that handles rendering our custom input label and description fields for RJSF.\n */\nexport function RJSFInputLabelWrapper<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: RJSFInputLabelProps<T, S, F>) {\n const {\n hideLabel = false,\n fieldLabel,\n description,\n registry,\n children,\n } = props\n const descriptionVariant =\n registry.formContext.descriptionVariant || 'popover'\n\n const [showDetails, setShowDetails] = useState(false)\n\n const expandButton = (\n <Tooltip title={'More Info'}>\n <IconButton\n onClick={e => {\n e.preventDefault()\n setShowDetails(!showDetails)\n }}\n aria-expanded={showDetails}\n size={'small'}\n >\n <HelpOutline color={'primary'} sx={{ width: '16px', height: '16px' }} />\n </IconButton>\n </Tooltip>\n )\n\n const popoverButton = (\n <StyledPopover popoverContent={description} maxWidth=\"350px\">\n <HelpTwoTone className={`HelpButton`} />\n </StyledPopover>\n )\n\n return (\n <>\n {!hideLabel && (\n <div className=\"LabelContainer\">\n {fieldLabel}\n {description && descriptionVariant === 'popover' && popoverButton}\n {description && descriptionVariant === 'expand' && expandButton}\n </div>\n )}\n {!hideLabel && descriptionVariant === 'inline' && description && (\n <div className=\"field-description-inline\">{description}</div>\n )}\n {children}\n {!hideLabel && descriptionVariant === 'expand' && (\n <Collapse className=\"field-description\" in={showDetails}>\n {description}\n </Collapse>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;AA8BA,SAAgB,EAId,GAAqC;CACrC,IAAM,EACJ,eAAY,IACZ,eACA,gBACA,aACA,gBACE,GACE,IACJ,EAAS,YAAY,sBAAsB,WAEvC,CAAC,GAAa,KAAkB,EAAS,EAAK;CAuBpD,OACE,kBAAA,GAAA,EAAA,UAAA;EACG,CAAC,KACA,kBAAC,OAAD;GAAK,WAAU;aAAf;IACG;IACA,KAAe,MAAuB,aAV7C,kBAAC,GAAD;KAAe,gBAAgB;KAAa,UAAS;eACnD,kBAAC,GAAD,EAAa,WAAW,aAAe,CAAA;IAC1B,CAQ2C;IACnD,KAAe,MAAuB,YA1B7C,kBAAC,GAAD;KAAS,OAAO;eACd,kBAAC,GAAD;MACE,UAAS,MAAK;OAEZ,AADA,EAAE,eAAe,GACjB,EAAe,CAAC,CAAW;MAC7B;MACA,iBAAe;MACf,MAAM;gBAEN,kBAAC,GAAD;OAAa,OAAO;OAAW,IAAI;QAAE,OAAO;QAAQ,QAAQ;OAAO;MAAI,CAAA;KAC7D,CAAA;IACL,CAegD;GAChD;;EAEN,CAAC,KAAa,MAAuB,YAAY,KAChD,kBAAC,OAAD;GAAK,WAAU;aAA4B;EAAiB,CAAA;EAE7D;EACA,CAAC,KAAa,MAAuB,YACpC,kBAAC,GAAD;GAAU,WAAU;GAAoB,IAAI;aACzC;EACO,CAAA;CAEZ,EAAA,CAAA;AAEN"}
|
|
@@ -8,7 +8,8 @@ export type PortalHomePageHeaderProps = {
|
|
|
8
8
|
backgroundMp4?: string;
|
|
9
9
|
backgroundMp4Css?: string;
|
|
10
10
|
textAreaWidth?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
11
12
|
};
|
|
12
|
-
declare const PortalHomePageHeader: ({ backgroundCss, buttonLink, title, subTitle, description, backgroundMp4, backgroundMp4Css, textAreaWidth, }: PortalHomePageHeaderProps) => React.ReactNode;
|
|
13
|
+
declare const PortalHomePageHeader: ({ backgroundCss, buttonLink, title, subTitle, description, backgroundMp4, backgroundMp4Css, textAreaWidth, children, }: PortalHomePageHeaderProps) => React.ReactNode;
|
|
13
14
|
export default PortalHomePageHeader;
|
|
14
15
|
//# sourceMappingURL=PortalHomePageHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalHomePageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/PortalHomePageHeader/PortalHomePageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,MAAM,yBAAyB,GAAG;IACtC,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"PortalHomePageHeader.d.ts","sourceRoot":"","sources":["../../../src/components/PortalHomePageHeader/PortalHomePageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,MAAM,yBAAyB,GAAG;IACtC,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,WAAW,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,CAAA;AAED,QAAA,MAAM,oBAAoB,GAAI,wHAU3B,yBAAyB,KAAG,KAAK,CAAC,SA4HpC,CAAA;AAED,eAAe,oBAAoB,CAAA"}
|