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,203 @@
|
|
|
1
|
+
import { newQBNodeId as e } from "./queryBuilderId.js";
|
|
2
|
+
import { isQBGroup as t } from "./QueryBuilderTypes.js";
|
|
3
|
+
//#region src/components/QueryBuilder/queryBuilderOperations.ts
|
|
4
|
+
function n(e) {
|
|
5
|
+
if (e == null || e.endsWith("_LIST")) return "is_any_of";
|
|
6
|
+
switch (e) {
|
|
7
|
+
case "INTEGER":
|
|
8
|
+
case "DOUBLE":
|
|
9
|
+
case "DATE":
|
|
10
|
+
case "DATE_TIME": return "between";
|
|
11
|
+
case "BOOLEAN": return "equal";
|
|
12
|
+
case "STRING": return "contains";
|
|
13
|
+
default: return "is_any_of";
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function r(t, r) {
|
|
17
|
+
return {
|
|
18
|
+
kind: "condition",
|
|
19
|
+
id: e(),
|
|
20
|
+
columnName: t,
|
|
21
|
+
columnType: r,
|
|
22
|
+
op: n(r),
|
|
23
|
+
values: [],
|
|
24
|
+
rangeMin: null,
|
|
25
|
+
rangeMax: null,
|
|
26
|
+
text: null
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function i(t = "AND") {
|
|
30
|
+
return {
|
|
31
|
+
kind: "group",
|
|
32
|
+
id: e(),
|
|
33
|
+
combinator: t,
|
|
34
|
+
not: !1,
|
|
35
|
+
children: []
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function a() {
|
|
39
|
+
return {
|
|
40
|
+
...i(),
|
|
41
|
+
children: [r(null, null)]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function o(e, t, n, i) {
|
|
45
|
+
return y(e, t, r(n, i));
|
|
46
|
+
}
|
|
47
|
+
function s(e, t) {
|
|
48
|
+
return y(e, t, i());
|
|
49
|
+
}
|
|
50
|
+
function c(e, t, n, r) {
|
|
51
|
+
return b(e, t, (e) => {
|
|
52
|
+
let t = T(e.children.length, n), i = [
|
|
53
|
+
...e.children.slice(0, t),
|
|
54
|
+
r,
|
|
55
|
+
...e.children.slice(t)
|
|
56
|
+
];
|
|
57
|
+
return {
|
|
58
|
+
...e,
|
|
59
|
+
children: i
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
function l(e, t) {
|
|
64
|
+
return b(e, t, (e) => ({
|
|
65
|
+
...e,
|
|
66
|
+
children: []
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
function u(e, t, n) {
|
|
70
|
+
return x(e, t, (e) => e.kind === "condition" ? {
|
|
71
|
+
...e,
|
|
72
|
+
...n
|
|
73
|
+
} : e);
|
|
74
|
+
}
|
|
75
|
+
function d(e, t, n) {
|
|
76
|
+
return b(e, t, (e) => ({
|
|
77
|
+
...e,
|
|
78
|
+
...n
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
function f(e, t) {
|
|
82
|
+
if (e.id === t) return e;
|
|
83
|
+
let n = S(e, t);
|
|
84
|
+
return n == null ? e : b(e, n.parentId, (e) => ({
|
|
85
|
+
...e,
|
|
86
|
+
children: e.children.filter((e) => e.id !== t)
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
function p(e, t, n, r) {
|
|
90
|
+
if (t === e.id || t === n) return e;
|
|
91
|
+
let i = S(e, t);
|
|
92
|
+
if (i == null) return e;
|
|
93
|
+
let a = C(e, n);
|
|
94
|
+
if (a == null || i.node.kind === "group" && w(i.node, n)) return e;
|
|
95
|
+
let o = i.parentId === n, s = T(o ? a.children.length - 1 : a.children.length, r);
|
|
96
|
+
return o && s === i.index ? e : c(b(e, i.parentId, (e) => ({
|
|
97
|
+
...e,
|
|
98
|
+
children: e.children.filter((e) => e.id !== t)
|
|
99
|
+
})), n, s, i.node);
|
|
100
|
+
}
|
|
101
|
+
function m(e, t, n) {
|
|
102
|
+
return C(e, n) == null ? e : p(e, t, n, 0);
|
|
103
|
+
}
|
|
104
|
+
function h(e, n) {
|
|
105
|
+
let r = [], i = (e) => {
|
|
106
|
+
n(e) && r.push(e), t(e) && e.children.forEach(i);
|
|
107
|
+
};
|
|
108
|
+
return i(e), r;
|
|
109
|
+
}
|
|
110
|
+
function g(e) {
|
|
111
|
+
return h(e, (e) => e.kind === "condition").some((e) => _(e));
|
|
112
|
+
}
|
|
113
|
+
function _(e) {
|
|
114
|
+
if (e.columnName == null) return !1;
|
|
115
|
+
switch (e.op) {
|
|
116
|
+
case "has_value":
|
|
117
|
+
case "no_value": return !0;
|
|
118
|
+
case "is_any_of":
|
|
119
|
+
case "is_all_of":
|
|
120
|
+
case "equal":
|
|
121
|
+
case "not_equal": return e.values.length > 0;
|
|
122
|
+
case "between": return !v(e.rangeMin) && !v(e.rangeMax);
|
|
123
|
+
case "gt":
|
|
124
|
+
case "gte": return !v(e.rangeMin);
|
|
125
|
+
case "lt":
|
|
126
|
+
case "lte": return !v(e.rangeMax);
|
|
127
|
+
case "contains":
|
|
128
|
+
case "starts_with":
|
|
129
|
+
case "ends_with":
|
|
130
|
+
case "is_exactly": return !v(e.text);
|
|
131
|
+
default: return e.op, !1;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function v(e) {
|
|
135
|
+
return e == null || e === "";
|
|
136
|
+
}
|
|
137
|
+
function y(e, t, n) {
|
|
138
|
+
return b(e, t, (e) => ({
|
|
139
|
+
...e,
|
|
140
|
+
children: [n, ...e.children]
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
function b(e, t, n) {
|
|
144
|
+
return x(e, t, (e) => e.kind === "group" ? n(e) : e);
|
|
145
|
+
}
|
|
146
|
+
function x(e, n, r) {
|
|
147
|
+
if (e.id === n) {
|
|
148
|
+
let n = r(e);
|
|
149
|
+
return t(n) ? n : e;
|
|
150
|
+
}
|
|
151
|
+
let i = !1, a = e.children.map((e) => {
|
|
152
|
+
if (e.id === n) {
|
|
153
|
+
let t = r(e);
|
|
154
|
+
return t !== e && (i = !0), t;
|
|
155
|
+
}
|
|
156
|
+
if (t(e)) {
|
|
157
|
+
let t = x(e, n, r);
|
|
158
|
+
return t !== e && (i = !0), t;
|
|
159
|
+
}
|
|
160
|
+
return e;
|
|
161
|
+
});
|
|
162
|
+
return i ? {
|
|
163
|
+
...e,
|
|
164
|
+
children: a
|
|
165
|
+
} : e;
|
|
166
|
+
}
|
|
167
|
+
function S(e, n) {
|
|
168
|
+
let r = (e) => {
|
|
169
|
+
for (let i = 0; i < e.children.length; i++) {
|
|
170
|
+
let a = e.children[i];
|
|
171
|
+
if (a.id === n) return {
|
|
172
|
+
node: a,
|
|
173
|
+
parentId: e.id,
|
|
174
|
+
index: i
|
|
175
|
+
};
|
|
176
|
+
if (t(a)) {
|
|
177
|
+
let e = r(a);
|
|
178
|
+
if (e) return e;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return null;
|
|
182
|
+
};
|
|
183
|
+
return r(e);
|
|
184
|
+
}
|
|
185
|
+
function C(e, n) {
|
|
186
|
+
if (e.id === n) return e;
|
|
187
|
+
for (let r of e.children) if (t(r)) {
|
|
188
|
+
let e = C(r, n);
|
|
189
|
+
if (e) return e;
|
|
190
|
+
}
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
function w(e, n) {
|
|
194
|
+
for (let r of e.children) if (r.id === n || t(r) && w(r, n)) return !0;
|
|
195
|
+
return !1;
|
|
196
|
+
}
|
|
197
|
+
function T(e, t) {
|
|
198
|
+
return !Number.isFinite(t) || t < 0 ? 0 : Math.min(e, Math.trunc(t));
|
|
199
|
+
}
|
|
200
|
+
//#endregion
|
|
201
|
+
export { s as addChildGroup, o as addConditionToGroup, l as clearGroup, n as defaultOpForColumnType, a as defaultQBGroup, h as findNodes, g as hasCompleteCondition, c as insertNodeAt, p as moveNode, m as moveNodeIntoGroup, r as newBlankCondition, i as newEmptyGroup, f as removeNode, u as updateCondition, d as updateGroup };
|
|
202
|
+
|
|
203
|
+
//# sourceMappingURL=queryBuilderOperations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryBuilderOperations.js","names":[],"sources":["../../../src/components/QueryBuilder/queryBuilderOperations.ts"],"sourcesContent":["import { newQBNodeId } from './queryBuilderId'\nimport {\n isQBGroup,\n QBCombinator,\n QBCondition,\n QBConditionOp,\n QBGroup,\n QBNode,\n} from './QueryBuilderTypes'\n\n// -----------------------------------------------------------------------------\n// Factories\n// -----------------------------------------------------------------------------\n\n/**\n * The initial `op` for a brand-new condition. When the user hasn't picked a\n * column yet the choice is arbitrary — the row's operator picker replaces it\n * as soon as the column is chosen — but we still need a valid discriminant\n * so the UI can render. `is_any_of` renders as a pill-based value input, which\n * degrades gracefully for a blank row.\n */\nexport function defaultOpForColumnType(\n columnType: string | null,\n): QBConditionOp {\n if (columnType == null) return 'is_any_of'\n if (columnType.endsWith('_LIST')) return 'is_any_of'\n switch (columnType) {\n case 'INTEGER':\n case 'DOUBLE':\n case 'DATE':\n case 'DATE_TIME':\n return 'between'\n case 'BOOLEAN':\n return 'equal'\n case 'STRING':\n return 'contains'\n default:\n return 'is_any_of'\n }\n}\n\nexport function newBlankCondition(\n columnName: string | null,\n columnType: string | null,\n): QBCondition {\n return {\n kind: 'condition',\n id: newQBNodeId(),\n columnName,\n columnType,\n op: defaultOpForColumnType(columnType),\n values: [],\n rangeMin: null,\n rangeMax: null,\n text: null,\n }\n}\n\nexport function newEmptyGroup(combinator: QBCombinator = 'AND'): QBGroup {\n return {\n kind: 'group',\n id: newQBNodeId(),\n combinator,\n not: false,\n children: [],\n }\n}\n\n/** Root group with a single blank condition — the QB's default startup state. */\nexport function defaultQBGroup(): QBGroup {\n const root = newEmptyGroup()\n return { ...root, children: [newBlankCondition(null, null)] }\n}\n\n// -----------------------------------------------------------------------------\n// Add / clear\n// -----------------------------------------------------------------------------\n\nexport function addConditionToGroup(\n root: QBGroup,\n targetGroupId: string,\n columnName: string | null,\n columnType: string | null,\n): QBGroup {\n const condition = newBlankCondition(columnName, columnType)\n return prependChild(root, targetGroupId, condition)\n}\n\nexport function addChildGroup(root: QBGroup, targetGroupId: string): QBGroup {\n return prependChild(root, targetGroupId, newEmptyGroup())\n}\n\n/**\n * Insert `node` into the group identified by `targetGroupId` at\n * `targetIndex`. Semantics match `Array.prototype.splice(targetIndex, 0, node)`.\n * If the group can't be found, returns the tree unchanged.\n */\nexport function insertNodeAt(\n root: QBGroup,\n targetGroupId: string,\n targetIndex: number,\n node: QBNode,\n): QBGroup {\n return mapGroup(root, targetGroupId, group => {\n const clamped = clampInsertionIndex(group.children.length, targetIndex)\n const nextChildren = [\n ...group.children.slice(0, clamped),\n node,\n ...group.children.slice(clamped),\n ]\n return { ...group, children: nextChildren }\n })\n}\n\n/**\n * Empty the children of the group identified by `nodeId`. If the id doesn't\n * match any group, returns the tree unchanged.\n */\nexport function clearGroup(root: QBGroup, nodeId: string): QBGroup {\n return mapGroup(root, nodeId, group => ({ ...group, children: [] }))\n}\n\n// -----------------------------------------------------------------------------\n// Update\n// -----------------------------------------------------------------------------\n\nexport function updateCondition(\n root: QBGroup,\n nodeId: string,\n patch: Partial<Omit<QBCondition, 'kind' | 'id'>>,\n): QBGroup {\n return mapNode(root, nodeId, node =>\n node.kind === 'condition' ? { ...node, ...patch } : node,\n )\n}\n\nexport function updateGroup(\n root: QBGroup,\n nodeId: string,\n patch: Partial<Omit<QBGroup, 'kind' | 'id' | 'children'>>,\n): QBGroup {\n return mapGroup(root, nodeId, group => ({ ...group, ...patch }))\n}\n\n// -----------------------------------------------------------------------------\n// Remove\n// -----------------------------------------------------------------------------\n\n/**\n * Remove the node identified by `nodeId` from the tree. The root cannot be\n * removed — a request to remove the root returns the tree unchanged.\n */\nexport function removeNode(root: QBGroup, nodeId: string): QBGroup {\n if (root.id === nodeId) return root\n const location = findLocation(root, nodeId)\n if (location == null) return root\n return mapGroup(root, location.parentId, group => ({\n ...group,\n children: group.children.filter(child => child.id !== nodeId),\n }))\n}\n\n// -----------------------------------------------------------------------------\n// Move (DnD)\n// -----------------------------------------------------------------------------\n\n/**\n * Move the node identified by `nodeId` to `targetIndex` of the group\n * identified by `targetGroupId`. `targetIndex` is the insertion index in the\n * target group's children *after* the node has been removed from its current\n * position — same semantics as `Array.prototype.splice(targetIndex, 0, node)`.\n *\n * Returns the tree unchanged if any of the following invariants would be\n * violated:\n * - `nodeId` is the root (root cannot be moved).\n * - `targetGroupId` is `nodeId` (a node can't be dropped into itself).\n * - `targetGroupId` is a descendant of `nodeId` (would create a cycle).\n * - The move is a no-op (target group + index equals current group + index).\n */\nexport function moveNode(\n root: QBGroup,\n nodeId: string,\n targetGroupId: string,\n targetIndex: number,\n): QBGroup {\n if (nodeId === root.id) return root\n if (nodeId === targetGroupId) return root\n\n const source = findLocation(root, nodeId)\n if (source == null) return root\n\n const targetGroup = findGroup(root, targetGroupId)\n if (targetGroup == null) return root\n\n if (\n source.node.kind === 'group' &&\n containsDescendant(source.node, targetGroupId)\n ) {\n return root\n }\n\n const isSameParent = source.parentId === targetGroupId\n const clampedTarget = clampInsertionIndex(\n // When moving within the same parent, the effective target-array length\n // after the node is removed is one shorter.\n isSameParent\n ? targetGroup.children.length - 1\n : targetGroup.children.length,\n targetIndex,\n )\n if (isSameParent && clampedTarget === source.index) return root\n\n const withoutSource = mapGroup(root, source.parentId, group => ({\n ...group,\n children: group.children.filter(child => child.id !== nodeId),\n }))\n return insertNodeAt(withoutSource, targetGroupId, clampedTarget, source.node)\n}\n\n/**\n * Move the node identified by `nodeId` to the front of the group identified\n * by `groupId`.\n *\n * This is the operation behind drag-and-drop: only groups are drop targets,\n * so every drag resolves to \"put this node in that group\". The node always\n * lands first, matching where `addConditionToGroup` puts a new row — within\n * an AND/OR group the order carries no meaning, so there is nothing for a\n * drop position to express. Enforces the same invariants as `moveNode`, and\n * additionally returns the tree unchanged when `groupId` names something that\n * is not a group.\n */\nexport function moveNodeIntoGroup(\n root: QBGroup,\n nodeId: string,\n groupId: string,\n): QBGroup {\n if (findGroup(root, groupId) == null) return root\n return moveNode(root, nodeId, groupId, 0)\n}\n\n// -----------------------------------------------------------------------------\n// Query helpers\n// -----------------------------------------------------------------------------\n\n/**\n * Find every node in the tree matching a predicate. Root is included.\n */\nexport function findNodes(\n root: QBGroup,\n predicate: (node: QBNode) => boolean,\n): QBNode[] {\n const acc: QBNode[] = []\n const visit = (node: QBNode) => {\n if (predicate(node)) acc.push(node)\n if (isQBGroup(node)) node.children.forEach(visit)\n }\n visit(root)\n return acc\n}\n\n/**\n * Whether `root` (or any descendant) contains a condition with a resolvable,\n * complete filter — matches the design's \"at least one complete condition\"\n * requirement for `hasResettableFilters`.\n */\nexport function hasCompleteCondition(root: QBGroup): boolean {\n return findNodes(root, node => node.kind === 'condition').some(condition =>\n isConditionComplete(condition as QBCondition),\n )\n}\n\nfunction isConditionComplete(condition: QBCondition): boolean {\n if (condition.columnName == null) return false\n switch (condition.op) {\n case 'has_value':\n case 'no_value':\n return true\n case 'is_any_of':\n case 'is_all_of':\n case 'equal':\n case 'not_equal':\n return condition.values.length > 0\n case 'between':\n return !isBlank(condition.rangeMin) && !isBlank(condition.rangeMax)\n case 'gt':\n case 'gte':\n return !isBlank(condition.rangeMin)\n case 'lt':\n case 'lte':\n return !isBlank(condition.rangeMax)\n case 'contains':\n case 'starts_with':\n case 'ends_with':\n case 'is_exactly':\n return !isBlank(condition.text)\n default:\n condition.op satisfies never\n return false\n }\n}\n\nfunction isBlank(value: string | null | undefined): boolean {\n return value == null || value === ''\n}\n\n// -----------------------------------------------------------------------------\n// Internal traversal helpers\n// -----------------------------------------------------------------------------\n\nfunction prependChild(root: QBGroup, groupId: string, node: QBNode): QBGroup {\n return mapGroup(root, groupId, group => ({\n ...group,\n children: [node, ...group.children],\n }))\n}\n\n/**\n * Replace the group identified by `targetId` with `transform(group)`. If the\n * id is not found, returns the tree unchanged (by reference).\n */\nfunction mapGroup(\n root: QBGroup,\n targetId: string,\n transform: (group: QBGroup) => QBGroup,\n): QBGroup {\n return mapNode(root, targetId, node =>\n node.kind === 'group' ? transform(node) : node,\n )\n}\n\n/**\n * Replace the node identified by `targetId` with `transform(node)`. If the id\n * matches root, the transformed root is returned. Structural sharing: only\n * the ancestor chain of the changed node is rebuilt; unaffected subtrees are\n * kept by reference.\n */\nfunction mapNode(\n root: QBGroup,\n targetId: string,\n transform: (node: QBNode) => QBNode,\n): QBGroup {\n if (root.id === targetId) {\n const next = transform(root)\n return isQBGroup(next) ? next : root\n }\n let changed = false\n const nextChildren = root.children.map(child => {\n if (child.id === targetId) {\n const replaced = transform(child)\n if (replaced !== child) changed = true\n return replaced\n }\n if (isQBGroup(child)) {\n const replaced = mapNode(child, targetId, transform)\n if (replaced !== child) changed = true\n return replaced\n }\n return child\n })\n return changed ? { ...root, children: nextChildren } : root\n}\n\ntype QBNodeLocation = {\n node: QBNode\n parentId: string\n index: number\n}\n\nfunction findLocation(root: QBGroup, targetId: string): QBNodeLocation | null {\n const visit = (group: QBGroup): QBNodeLocation | null => {\n for (let index = 0; index < group.children.length; index++) {\n const child = group.children[index]\n if (child.id === targetId) {\n return { node: child, parentId: group.id, index }\n }\n if (isQBGroup(child)) {\n const nested = visit(child)\n if (nested) return nested\n }\n }\n return null\n }\n return visit(root)\n}\n\nfunction findGroup(root: QBGroup, targetId: string): QBGroup | null {\n if (root.id === targetId) return root\n for (const child of root.children) {\n if (isQBGroup(child)) {\n const nested = findGroup(child, targetId)\n if (nested) return nested\n }\n }\n return null\n}\n\nfunction containsDescendant(group: QBGroup, targetId: string): boolean {\n for (const child of group.children) {\n if (child.id === targetId) return true\n if (isQBGroup(child) && containsDescendant(child, targetId)) return true\n }\n return false\n}\n\nfunction clampInsertionIndex(length: number, index: number): number {\n if (!Number.isFinite(index) || index < 0) return 0\n return Math.min(length, Math.trunc(index))\n}\n"],"mappings":";;;AAqBA,SAAgB,EACd,GACe;CAEf,IADI,KAAc,QACd,EAAW,SAAS,OAAO,GAAG,OAAO;CACzC,QAAQ,GAAR;EACE,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,aACH,OAAO;EACT,KAAK,WACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,SACE,OAAO;CACX;AACF;AAEA,SAAgB,EACd,GACA,GACa;CACb,OAAO;EACL,MAAM;EACN,IAAI,EAAY;EAChB;EACA;EACA,IAAI,EAAuB,CAAU;EACrC,QAAQ,CAAC;EACT,UAAU;EACV,UAAU;EACV,MAAM;CACR;AACF;AAEA,SAAgB,EAAc,IAA2B,OAAgB;CACvE,OAAO;EACL,MAAM;EACN,IAAI,EAAY;EAChB;EACA,KAAK;EACL,UAAU,CAAC;CACb;AACF;AAGA,SAAgB,IAA0B;CAExC,OAAO;EAAE,GADI,EACD;EAAM,UAAU,CAAC,EAAkB,MAAM,IAAI,CAAC;CAAE;AAC9D;AAMA,SAAgB,EACd,GACA,GACA,GACA,GACS;CAET,OAAO,EAAa,GAAM,GADR,EAAkB,GAAY,CACP,CAAS;AACpD;AAEA,SAAgB,EAAc,GAAe,GAAgC;CAC3E,OAAO,EAAa,GAAM,GAAe,EAAc,CAAC;AAC1D;AAOA,SAAgB,EACd,GACA,GACA,GACA,GACS;CACT,OAAO,EAAS,GAAM,IAAe,MAAS;EAC5C,IAAM,IAAU,EAAoB,EAAM,SAAS,QAAQ,CAAW,GAChE,IAAe;GACnB,GAAG,EAAM,SAAS,MAAM,GAAG,CAAO;GAClC;GACA,GAAG,EAAM,SAAS,MAAM,CAAO;EACjC;EACA,OAAO;GAAE,GAAG;GAAO,UAAU;EAAa;CAC5C,CAAC;AACH;AAMA,SAAgB,EAAW,GAAe,GAAyB;CACjE,OAAO,EAAS,GAAM,IAAQ,OAAU;EAAE,GAAG;EAAO,UAAU,CAAC;CAAE,EAAE;AACrE;AAMA,SAAgB,EACd,GACA,GACA,GACS;CACT,OAAO,EAAQ,GAAM,IAAQ,MAC3B,EAAK,SAAS,cAAc;EAAE,GAAG;EAAM,GAAG;CAAM,IAAI,CACtD;AACF;AAEA,SAAgB,EACd,GACA,GACA,GACS;CACT,OAAO,EAAS,GAAM,IAAQ,OAAU;EAAE,GAAG;EAAO,GAAG;CAAM,EAAE;AACjE;AAUA,SAAgB,EAAW,GAAe,GAAyB;CACjE,IAAI,EAAK,OAAO,GAAQ,OAAO;CAC/B,IAAM,IAAW,EAAa,GAAM,CAAM;CAE1C,OADI,KAAY,OAAa,IACtB,EAAS,GAAM,EAAS,WAAU,OAAU;EACjD,GAAG;EACH,UAAU,EAAM,SAAS,QAAO,MAAS,EAAM,OAAO,CAAM;CAC9D,EAAE;AACJ;AAmBA,SAAgB,EACd,GACA,GACA,GACA,GACS;CAET,IADI,MAAW,EAAK,MAChB,MAAW,GAAe,OAAO;CAErC,IAAM,IAAS,EAAa,GAAM,CAAM;CACxC,IAAI,KAAU,MAAM,OAAO;CAE3B,IAAM,IAAc,EAAU,GAAM,CAAa;CAGjD,IAFI,KAAe,QAGjB,EAAO,KAAK,SAAS,WACrB,EAAmB,EAAO,MAAM,CAAa,GAE7C,OAAO;CAGT,IAAM,IAAe,EAAO,aAAa,GACnC,IAAgB,EAGpB,IACI,EAAY,SAAS,SAAS,IAC9B,EAAY,SAAS,QACzB,CACF;CAOA,OANI,KAAgB,MAAkB,EAAO,QAAc,IAMpD,EAJe,EAAS,GAAM,EAAO,WAAU,OAAU;EAC9D,GAAG;EACH,UAAU,EAAM,SAAS,QAAO,MAAS,EAAM,OAAO,CAAM;CAC9D,EACoB,GAAe,GAAe,GAAe,EAAO,IAAI;AAC9E;AAcA,SAAgB,EACd,GACA,GACA,GACS;CAET,OADI,EAAU,GAAM,CAAO,KAAK,OAAa,IACtC,EAAS,GAAM,GAAQ,GAAS,CAAC;AAC1C;AASA,SAAgB,EACd,GACA,GACU;CACV,IAAM,IAAgB,CAAC,GACjB,KAAS,MAAiB;EAE9B,AADI,EAAU,CAAI,KAAG,EAAI,KAAK,CAAI,GAC9B,EAAU,CAAI,KAAG,EAAK,SAAS,QAAQ,CAAK;CAClD;CAEA,OADA,EAAM,CAAI,GACH;AACT;AAOA,SAAgB,EAAqB,GAAwB;CAC3D,OAAO,EAAU,IAAM,MAAQ,EAAK,SAAS,WAAW,EAAE,MAAK,MAC7D,EAAoB,CAAwB,CAC9C;AACF;AAEA,SAAS,EAAoB,GAAiC;CAC5D,IAAI,EAAU,cAAc,MAAM,OAAO;CACzC,QAAQ,EAAU,IAAlB;EACE,KAAK;EACL,KAAK,YACH,OAAO;EACT,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,aACH,OAAO,EAAU,OAAO,SAAS;EACnC,KAAK,WACH,OAAO,CAAC,EAAQ,EAAU,QAAQ,KAAK,CAAC,EAAQ,EAAU,QAAQ;EACpE,KAAK;EACL,KAAK,OACH,OAAO,CAAC,EAAQ,EAAU,QAAQ;EACpC,KAAK;EACL,KAAK,OACH,OAAO,CAAC,EAAQ,EAAU,QAAQ;EACpC,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,cACH,OAAO,CAAC,EAAQ,EAAU,IAAI;EAChC,SAEE,OADA,EAAU,IACH;CACX;AACF;AAEA,SAAS,EAAQ,GAA2C;CAC1D,OAAO,KAAS,QAAQ,MAAU;AACpC;AAMA,SAAS,EAAa,GAAe,GAAiB,GAAuB;CAC3E,OAAO,EAAS,GAAM,IAAS,OAAU;EACvC,GAAG;EACH,UAAU,CAAC,GAAM,GAAG,EAAM,QAAQ;CACpC,EAAE;AACJ;AAMA,SAAS,EACP,GACA,GACA,GACS;CACT,OAAO,EAAQ,GAAM,IAAU,MAC7B,EAAK,SAAS,UAAU,EAAU,CAAI,IAAI,CAC5C;AACF;AAQA,SAAS,EACP,GACA,GACA,GACS;CACT,IAAI,EAAK,OAAO,GAAU;EACxB,IAAM,IAAO,EAAU,CAAI;EAC3B,OAAO,EAAU,CAAI,IAAI,IAAO;CAClC;CACA,IAAI,IAAU,IACR,IAAe,EAAK,SAAS,KAAI,MAAS;EAC9C,IAAI,EAAM,OAAO,GAAU;GACzB,IAAM,IAAW,EAAU,CAAK;GAEhC,OADI,MAAa,MAAO,IAAU,KAC3B;EACT;EACA,IAAI,EAAU,CAAK,GAAG;GACpB,IAAM,IAAW,EAAQ,GAAO,GAAU,CAAS;GAEnD,OADI,MAAa,MAAO,IAAU,KAC3B;EACT;EACA,OAAO;CACT,CAAC;CACD,OAAO,IAAU;EAAE,GAAG;EAAM,UAAU;CAAa,IAAI;AACzD;AAQA,SAAS,EAAa,GAAe,GAAyC;CAC5E,IAAM,KAAS,MAA0C;EACvD,KAAK,IAAI,IAAQ,GAAG,IAAQ,EAAM,SAAS,QAAQ,KAAS;GAC1D,IAAM,IAAQ,EAAM,SAAS;GAC7B,IAAI,EAAM,OAAO,GACf,OAAO;IAAE,MAAM;IAAO,UAAU,EAAM;IAAI;GAAM;GAElD,IAAI,EAAU,CAAK,GAAG;IACpB,IAAM,IAAS,EAAM,CAAK;IAC1B,IAAI,GAAQ,OAAO;GACrB;EACF;EACA,OAAO;CACT;CACA,OAAO,EAAM,CAAI;AACnB;AAEA,SAAS,EAAU,GAAe,GAAkC;CAClE,IAAI,EAAK,OAAO,GAAU,OAAO;CACjC,KAAK,IAAM,KAAS,EAAK,UACvB,IAAI,EAAU,CAAK,GAAG;EACpB,IAAM,IAAS,EAAU,GAAO,CAAQ;EACxC,IAAI,GAAQ,OAAO;CACrB;CAEF,OAAO;AACT;AAEA,SAAS,EAAmB,GAAgB,GAA2B;CACrE,KAAK,IAAM,KAAS,EAAM,UAExB,IADI,EAAM,OAAO,KACb,EAAU,CAAK,KAAK,EAAmB,GAAO,CAAQ,GAAG,OAAO;CAEtE,OAAO;AACT;AAEA,SAAS,EAAoB,GAAgB,GAAuB;CAElE,OADI,CAAC,OAAO,SAAS,CAAK,KAAK,IAAQ,IAAU,IAC1C,KAAK,IAAI,GAAQ,KAAK,MAAM,CAAK,CAAC;AAC3C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FacetColumnRequest, QueryFilter } from '@sage-bionetworks/synapse-types';
|
|
1
|
+
import { ColumnModel, FacetColumnRequest, QueryFilter } from '@sage-bionetworks/synapse-types';
|
|
2
|
+
import { ReadonlyDeep } from 'type-fest';
|
|
2
3
|
import { QBGroup, QBNode } from './QueryBuilderTypes';
|
|
3
4
|
/** A multi-value list column is one whose column type ends in `_LIST`. */
|
|
4
5
|
export declare function isListColumn(columnType: string | null): boolean;
|
|
@@ -44,5 +45,5 @@ export declare function apiFilterToQBNode(filter: QueryFilter): QBNode | null;
|
|
|
44
45
|
* (as an AND-combined, non-negated group). The reverse direction is not
|
|
45
46
|
* generally possible; a QB → facets switch clears the tree.
|
|
46
47
|
*/
|
|
47
|
-
export declare function selectedFacetsToQBGroup(selectedFacets: FacetColumnRequest[]): QBGroup;
|
|
48
|
+
export declare function selectedFacetsToQBGroup(selectedFacets: ReadonlyDeep<FacetColumnRequest[]>, columnModels?: ReadonlyDeep<ColumnModel[]>): QBGroup;
|
|
48
49
|
//# sourceMappingURL=queryBuilderTranslation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryBuilderTranslation.d.ts","sourceRoot":"","sources":["../../../src/components/QueryBuilder/queryBuilderTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"queryBuilderTranslation.d.ts","sourceRoot":"","sources":["../../../src/components/QueryBuilder/queryBuilderTranslation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAKX,kBAAkB,EAGlB,WAAW,EACZ,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAQxC,OAAO,EAA0B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAY7E,0EAA0E;AAC1E,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAE/D;AAMD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG;IACpD,EAAE,EAAE,UAAU,GAAG,aAAa,GAAG,WAAW,GAAG,YAAY,CAAA;IAC3D,IAAI,EAAE,MAAM,CAAA;CACb,CAUA;AAMD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAelE;AAwLD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAgCpE;AA8DD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,YAAY,CAAC,kBAAkB,EAAE,CAAC,EAClD,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,EAAE,CAAC,GACzC,OAAO,CAkBT"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { isColumnMultiValueFunctionQueryFilter as e, isColumnSingleValueQueryFilter as t, isFacetColumnRangeRequest as n, isFacetColumnValuesRequest as r, isFilterGroup as i } from "../../utils/types/IsType.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { newQBNodeId as a } from "./queryBuilderId.js";
|
|
3
|
+
import { isQBGroup as o } from "./QueryBuilderTypes.js";
|
|
4
|
+
import { ColumnMultiValueFunction as s, ColumnSingleValueFilterOperator as c, FILTER_GROUP_CONCRETE_TYPE_VALUE as l } from "@sage-bionetworks/synapse-types";
|
|
4
5
|
//#region src/components/QueryBuilder/queryBuilderTranslation.ts
|
|
5
|
-
var
|
|
6
|
-
function
|
|
6
|
+
var u = "org.sagebionetworks.repo.model.table.ColumnSingleValueQueryFilter", d = "org.sagebionetworks.repo.model.table.ColumnMultiValueFunctionQueryFilter";
|
|
7
|
+
function f(e) {
|
|
7
8
|
return e?.endsWith("_LIST") ?? !1;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
+
function p(e) {
|
|
10
11
|
return e.replace(/[\\%_]/g, (e) => "\\" + e);
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function m(e) {
|
|
13
14
|
return e.replace(/\\([\\%_])/g, "$1");
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
let t = e.startsWith("%"), n = /(?<!\\)%$/.test(e), r =
|
|
16
|
+
function h(e) {
|
|
17
|
+
let t = e.startsWith("%"), n = /(?<!\\)%$/.test(e), r = m(e.slice(+!!t, n ? -1 : void 0));
|
|
17
18
|
return t && n ? {
|
|
18
19
|
op: "contains",
|
|
19
20
|
text: r
|
|
@@ -28,89 +29,89 @@ function m(e) {
|
|
|
28
29
|
text: r
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
if (
|
|
33
|
-
let t = e.children.map(
|
|
32
|
+
function g(e) {
|
|
33
|
+
if (o(e)) {
|
|
34
|
+
let t = e.children.map(g).filter((e) => e !== null);
|
|
34
35
|
return t.length === 0 ? null : {
|
|
35
|
-
concreteType:
|
|
36
|
+
concreteType: l,
|
|
36
37
|
operator: e.combinator,
|
|
37
38
|
not: e.not || void 0,
|
|
38
39
|
children: t
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
|
-
return
|
|
42
|
+
return _(e);
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
let { columnName: t, columnType: n, op: r, values: i, rangeMin: a, rangeMax: o, text:
|
|
44
|
+
function _(e) {
|
|
45
|
+
let { columnName: t, columnType: n, op: r, values: i, rangeMin: a, rangeMax: o, text: s } = e;
|
|
45
46
|
if (t === null) return null;
|
|
46
47
|
switch (r) {
|
|
47
|
-
case "is_any_of": return
|
|
48
|
-
case "is_all_of": return i.length === 0 ? null :
|
|
49
|
-
case "between": return
|
|
50
|
-
case "gt": return
|
|
51
|
-
case "gte": return
|
|
52
|
-
case "lt": return
|
|
53
|
-
case "lte": return
|
|
54
|
-
case "equal": return
|
|
55
|
-
case "not_equal": return
|
|
56
|
-
case "has_value": return
|
|
57
|
-
case "no_value": return
|
|
58
|
-
case "contains": return
|
|
59
|
-
case "starts_with": return
|
|
60
|
-
case "ends_with": return
|
|
61
|
-
case "is_exactly": return
|
|
48
|
+
case "is_any_of": return y(t, n, i);
|
|
49
|
+
case "is_all_of": return i.length === 0 ? null : w(t, i);
|
|
50
|
+
case "between": return b(t, a, o);
|
|
51
|
+
case "gt": return T(t, a, c.GREATER_THAN);
|
|
52
|
+
case "gte": return T(t, a, c.GREATER_THAN_OR_EQUAL);
|
|
53
|
+
case "lt": return T(t, o, c.LESS_THAN);
|
|
54
|
+
case "lte": return T(t, o, c.LESS_THAN_OR_EQUAL);
|
|
55
|
+
case "equal": return x(t, i, c.EQUAL);
|
|
56
|
+
case "not_equal": return x(t, i, c.NOT_EQUAL);
|
|
57
|
+
case "has_value": return C(t, c.IS_NOT_NULL, []);
|
|
58
|
+
case "no_value": return C(t, c.IS_NULL, []);
|
|
59
|
+
case "contains": return S(t, s, (e) => `%${e}%`);
|
|
60
|
+
case "starts_with": return S(t, s, (e) => `${e}%`);
|
|
61
|
+
case "ends_with": return S(t, s, (e) => `%${e}`);
|
|
62
|
+
case "is_exactly": return v(s) ? null : C(t, c.EQUAL, [s]);
|
|
62
63
|
default: return console.warn(`conditionToApiFilter: unrecognized QB op, skipping condition for column "${t}"`, { op: r }), null;
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function v(e) {
|
|
66
67
|
return e == null || e === "";
|
|
67
68
|
}
|
|
68
|
-
function v(e, t, n) {
|
|
69
|
-
return n.length === 0 ? null : d(t) ? C(e, n) : S(e, s.IN, n);
|
|
70
|
-
}
|
|
71
69
|
function y(e, t, n) {
|
|
72
|
-
return
|
|
70
|
+
return n.length === 0 ? null : f(t) ? w(e, n) : C(e, c.IN, n);
|
|
73
71
|
}
|
|
74
72
|
function b(e, t, n) {
|
|
75
|
-
return t
|
|
73
|
+
return v(t) || v(n) ? null : C(e, c.BETWEEN, [t, n]);
|
|
76
74
|
}
|
|
77
75
|
function x(e, t, n) {
|
|
78
|
-
return
|
|
76
|
+
return t.length === 0 ? null : C(e, n, [t[0]]);
|
|
79
77
|
}
|
|
80
78
|
function S(e, t, n) {
|
|
79
|
+
return v(t) ? null : C(e, c.LIKE, [n(p(t))]);
|
|
80
|
+
}
|
|
81
|
+
function C(e, t, n) {
|
|
81
82
|
return {
|
|
82
|
-
concreteType:
|
|
83
|
+
concreteType: u,
|
|
83
84
|
columnName: e,
|
|
84
85
|
operator: t,
|
|
85
86
|
values: n
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
+
function w(e, t) {
|
|
89
90
|
return {
|
|
90
|
-
concreteType:
|
|
91
|
+
concreteType: d,
|
|
91
92
|
columnName: e,
|
|
92
|
-
function:
|
|
93
|
-
_function:
|
|
93
|
+
function: s.HAS,
|
|
94
|
+
_function: s.HAS,
|
|
94
95
|
values: t
|
|
95
96
|
};
|
|
96
97
|
}
|
|
97
|
-
function
|
|
98
|
-
return t == null || t === "" ? null :
|
|
98
|
+
function T(e, t, n) {
|
|
99
|
+
return t == null || t === "" ? null : C(e, n, [t]);
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
+
function E(n) {
|
|
101
102
|
if (i(n)) {
|
|
102
|
-
let e = (n.children ?? []).map(
|
|
103
|
+
let e = (n.children ?? []).map(E).filter((e) => e !== null);
|
|
103
104
|
return {
|
|
104
105
|
kind: "group",
|
|
105
|
-
id:
|
|
106
|
+
id: a(),
|
|
106
107
|
combinator: n.operator ?? "AND",
|
|
107
108
|
not: n.not ?? !1,
|
|
108
109
|
children: e
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
|
-
return t(n) ?
|
|
112
|
+
return t(n) ? D(n) : e(n) ? {
|
|
112
113
|
kind: "condition",
|
|
113
|
-
id:
|
|
114
|
+
id: a(),
|
|
114
115
|
columnName: n.columnName,
|
|
115
116
|
columnType: null,
|
|
116
117
|
op: "is_any_of",
|
|
@@ -120,10 +121,10 @@ function T(n) {
|
|
|
120
121
|
text: null
|
|
121
122
|
} : null;
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
+
function D(e) {
|
|
124
125
|
let t = {
|
|
125
126
|
kind: "condition",
|
|
126
|
-
id:
|
|
127
|
+
id: a(),
|
|
127
128
|
columnName: e.columnName,
|
|
128
129
|
columnType: null,
|
|
129
130
|
values: [],
|
|
@@ -132,57 +133,57 @@ function E(e) {
|
|
|
132
133
|
text: null
|
|
133
134
|
}, [n] = e.values;
|
|
134
135
|
switch (e.operator) {
|
|
135
|
-
case
|
|
136
|
+
case c.IN: return {
|
|
136
137
|
...t,
|
|
137
138
|
op: "is_any_of",
|
|
138
139
|
values: [...e.values]
|
|
139
140
|
};
|
|
140
|
-
case
|
|
141
|
+
case c.EQUAL: return {
|
|
141
142
|
...t,
|
|
142
143
|
op: "equal",
|
|
143
144
|
values: [...e.values]
|
|
144
145
|
};
|
|
145
|
-
case
|
|
146
|
+
case c.NOT_EQUAL: return {
|
|
146
147
|
...t,
|
|
147
148
|
op: "not_equal",
|
|
148
149
|
values: [...e.values]
|
|
149
150
|
};
|
|
150
|
-
case
|
|
151
|
+
case c.GREATER_THAN: return {
|
|
151
152
|
...t,
|
|
152
153
|
op: "gt",
|
|
153
154
|
rangeMin: n ?? null
|
|
154
155
|
};
|
|
155
|
-
case
|
|
156
|
+
case c.GREATER_THAN_OR_EQUAL: return {
|
|
156
157
|
...t,
|
|
157
158
|
op: "gte",
|
|
158
159
|
rangeMin: n ?? null
|
|
159
160
|
};
|
|
160
|
-
case
|
|
161
|
+
case c.LESS_THAN: return {
|
|
161
162
|
...t,
|
|
162
163
|
op: "lt",
|
|
163
164
|
rangeMax: n ?? null
|
|
164
165
|
};
|
|
165
|
-
case
|
|
166
|
+
case c.LESS_THAN_OR_EQUAL: return {
|
|
166
167
|
...t,
|
|
167
168
|
op: "lte",
|
|
168
169
|
rangeMax: n ?? null
|
|
169
170
|
};
|
|
170
|
-
case
|
|
171
|
+
case c.BETWEEN: return {
|
|
171
172
|
...t,
|
|
172
173
|
op: "between",
|
|
173
174
|
rangeMin: e.values[0] ?? null,
|
|
174
175
|
rangeMax: e.values[1] ?? null
|
|
175
176
|
};
|
|
176
|
-
case
|
|
177
|
+
case c.IS_NULL: return {
|
|
177
178
|
...t,
|
|
178
179
|
op: "no_value"
|
|
179
180
|
};
|
|
180
|
-
case
|
|
181
|
+
case c.IS_NOT_NULL: return {
|
|
181
182
|
...t,
|
|
182
183
|
op: "has_value"
|
|
183
184
|
};
|
|
184
|
-
case
|
|
185
|
-
let e =
|
|
185
|
+
case c.LIKE: {
|
|
186
|
+
let e = h(n ?? "");
|
|
186
187
|
return {
|
|
187
188
|
...t,
|
|
188
189
|
op: e.op,
|
|
@@ -195,21 +196,22 @@ function E(e) {
|
|
|
195
196
|
};
|
|
196
197
|
}
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
+
function O(e, t) {
|
|
200
|
+
let n = new Map((t ?? []).map((e) => [e.name, e.columnType]));
|
|
199
201
|
return {
|
|
200
202
|
kind: "group",
|
|
201
|
-
id:
|
|
203
|
+
id: a(),
|
|
202
204
|
combinator: "AND",
|
|
203
205
|
not: !1,
|
|
204
|
-
children: e.map(
|
|
206
|
+
children: e.map((e) => k(e, n.get(e.columnName) ?? null)).filter((e) => e !== null)
|
|
205
207
|
};
|
|
206
208
|
}
|
|
207
|
-
function
|
|
209
|
+
function k(e, t) {
|
|
208
210
|
if (r(e)) return !e.facetValues || e.facetValues.length === 0 ? null : {
|
|
209
211
|
kind: "condition",
|
|
210
|
-
id:
|
|
212
|
+
id: a(),
|
|
211
213
|
columnName: e.columnName,
|
|
212
|
-
columnType:
|
|
214
|
+
columnType: t,
|
|
213
215
|
op: "is_any_of",
|
|
214
216
|
values: [...e.facetValues],
|
|
215
217
|
rangeMin: null,
|
|
@@ -217,28 +219,28 @@ function O(e) {
|
|
|
217
219
|
text: null
|
|
218
220
|
};
|
|
219
221
|
if (n(e)) {
|
|
220
|
-
let
|
|
221
|
-
if (!
|
|
222
|
-
let
|
|
222
|
+
let n = e.min != null && e.min !== "", r = e.max != null && e.max !== "";
|
|
223
|
+
if (!n && !r) return null;
|
|
224
|
+
let i = {
|
|
223
225
|
kind: "condition",
|
|
224
|
-
id:
|
|
226
|
+
id: a(),
|
|
225
227
|
columnName: e.columnName,
|
|
226
|
-
columnType:
|
|
228
|
+
columnType: t,
|
|
227
229
|
values: [],
|
|
228
230
|
text: null
|
|
229
231
|
};
|
|
230
|
-
return
|
|
231
|
-
...
|
|
232
|
+
return n && r ? {
|
|
233
|
+
...i,
|
|
232
234
|
op: "between",
|
|
233
235
|
rangeMin: e.min,
|
|
234
236
|
rangeMax: e.max
|
|
235
|
-
} :
|
|
236
|
-
...
|
|
237
|
+
} : n ? {
|
|
238
|
+
...i,
|
|
237
239
|
op: "gte",
|
|
238
240
|
rangeMin: e.min,
|
|
239
241
|
rangeMax: null
|
|
240
242
|
} : {
|
|
241
|
-
...
|
|
243
|
+
...i,
|
|
242
244
|
op: "lte",
|
|
243
245
|
rangeMin: null,
|
|
244
246
|
rangeMax: e.max
|
|
@@ -246,11 +248,7 @@ function O(e) {
|
|
|
246
248
|
}
|
|
247
249
|
return null;
|
|
248
250
|
}
|
|
249
|
-
var k = 0;
|
|
250
|
-
function A() {
|
|
251
|
-
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : (k += 1, `qb-${k}`);
|
|
252
|
-
}
|
|
253
251
|
//#endregion
|
|
254
|
-
export {
|
|
252
|
+
export { E as apiFilterToQBNode, h as classifyLikePattern, p as escapeLike, f as isListColumn, g as qbNodeToApiFilter, O as selectedFacetsToQBGroup, m as unescapeLike };
|
|
255
253
|
|
|
256
254
|
//# sourceMappingURL=queryBuilderTranslation.js.map
|