synapse-react-client 4.0.40 → 4.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SWC.index.d.ts +1 -0
- package/dist/SWC.index.d.ts.map +1 -1
- package/dist/SWC.index.js +2 -1
- package/dist/SWC.index.js.map +1 -1
- package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.d.ts +1 -0
- package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.d.ts.map +1 -1
- package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.js +12 -12
- package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.d.ts +7 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js +30 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js +138 -244
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.d.ts +13 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.js +60 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts +8 -2
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +179 -63
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.d.ts +2 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.js +13 -13
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItemView.d.ts +3 -2
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItemView.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItemView.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts +3 -2
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.d.ts +12 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.js +50 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js +112 -143
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts +4 -2
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js +8 -7
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts +3 -2
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js +79 -47
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.d.ts +12 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.js +51 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.d.ts +12 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.js +24 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.js.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts +11 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.js +0 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.d.ts +22 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.d.ts.map +1 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.js +32 -0
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.js.map +1 -0
- package/dist/components/AclEditor/AclEditor.js +20 -20
- package/dist/components/Aridhia/AridhiaAccessStatus.d.ts.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.js +51 -48
- package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
- package/dist/components/Authentication/Constants.d.ts +4 -0
- package/dist/components/Authentication/Constants.d.ts.map +1 -1
- package/dist/components/Authentication/Constants.js +5 -2
- package/dist/components/Authentication/Constants.js.map +1 -1
- package/dist/components/Authentication/RecoveryCodeGrid.d.ts.map +1 -1
- package/dist/components/Authentication/RecoveryCodeGrid.js +8 -1
- package/dist/components/Authentication/RecoveryCodeGrid.js.map +1 -1
- package/dist/components/Authentication/RegenerateBackupCodesWarning.js +4 -1
- package/dist/components/Authentication/RegenerateBackupCodesWarning.js.map +1 -1
- package/dist/components/Authentication/TOTPForm.d.ts.map +1 -1
- package/dist/components/Authentication/TOTPForm.js +20 -18
- package/dist/components/Authentication/TOTPForm.js.map +1 -1
- package/dist/components/Authentication/TwoFactorBackupCodes.d.ts.map +1 -1
- package/dist/components/Authentication/TwoFactorBackupCodes.js +41 -12
- package/dist/components/Authentication/TwoFactorBackupCodes.js.map +1 -1
- package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
- package/dist/components/Authentication/TwoFactorEnrollmentForm.js +90 -77
- package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.js +244 -246
- package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
- package/dist/components/DataGrid/components/GridLoadingState.d.ts +23 -0
- package/dist/components/DataGrid/components/GridLoadingState.d.ts.map +1 -0
- package/dist/components/DataGrid/components/GridLoadingState.js +64 -0
- package/dist/components/DataGrid/components/GridLoadingState.js.map +1 -0
- package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js +52 -54
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.d.ts +60 -6
- package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.js +71 -60
- package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
- package/dist/components/DataGrid/utils/getNamedColumnIndices.d.ts +11 -0
- package/dist/components/DataGrid/utils/getNamedColumnIndices.d.ts.map +1 -0
- package/dist/components/DataGrid/utils/getNamedColumnIndices.js +8 -0
- package/dist/components/DataGrid/utils/getNamedColumnIndices.js.map +1 -0
- package/dist/components/FilePreview/FileHandleContentRenderer.d.ts +6 -2
- package/dist/components/FilePreview/FileHandleContentRenderer.d.ts.map +1 -1
- package/dist/components/FilePreview/FileHandleContentRenderer.js +27 -14
- package/dist/components/FilePreview/FileHandleContentRenderer.js.map +1 -1
- package/dist/components/FilePreview/PdfPreview.d.ts +1 -1
- package/dist/components/FilePreview/PdfPreview.d.ts.map +1 -1
- package/dist/components/FilePreview/PdfPreview.js +15 -16
- package/dist/components/FilePreview/PdfPreview.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 +190 -0
- package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js.map +1 -0
- package/dist/components/FormTemplateEditor/FieldLibrary.css +1 -0
- package/dist/components/FormTemplateEditor/FieldLibrary.d.ts +17 -0
- package/dist/components/FormTemplateEditor/FieldLibrary.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/FieldLibrary.js +88 -0
- package/dist/components/FormTemplateEditor/FieldLibrary.js.map +1 -0
- package/dist/components/FormTemplateEditor/FieldLibrary.module.js +5 -0
- package/dist/components/FormTemplateEditor/FieldLibrary.module.js.map +1 -0
- package/dist/components/FormTemplateEditor/FieldLibrary.module.scss +12 -0
- package/dist/components/FormTemplateEditor/FieldLibraryRow.d.ts +19 -0
- package/dist/components/FormTemplateEditor/FieldLibraryRow.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/FieldLibraryRow.js +115 -0
- package/dist/components/FormTemplateEditor/FieldLibraryRow.js.map +1 -0
- package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.css +1 -0
- package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.d.ts +9 -0
- package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.js +18 -0
- package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.js.map +1 -0
- package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.module.js +5 -0
- package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.module.js.map +1 -0
- package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.module.scss +4 -0
- package/dist/components/FormTemplateEditor/FormStructurePanel.d.ts +21 -0
- package/dist/components/FormTemplateEditor/FormStructurePanel.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/FormStructurePanel.js +108 -0
- package/dist/components/FormTemplateEditor/FormStructurePanel.js.map +1 -0
- package/dist/components/FormTemplateEditor/FormTemplateEditor.d.ts +10 -0
- package/dist/components/FormTemplateEditor/FormTemplateEditor.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/FormTemplateEditor.js +31 -0
- package/dist/components/FormTemplateEditor/FormTemplateEditor.js.map +1 -0
- package/dist/components/FormTemplateEditor/FormTemplateEditorForm.d.ts +15 -0
- package/dist/components/FormTemplateEditor/FormTemplateEditorForm.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/FormTemplateEditorForm.js +234 -0
- package/dist/components/FormTemplateEditor/FormTemplateEditorForm.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 +72 -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/StepCard.d.ts +25 -0
- package/dist/components/FormTemplateEditor/StepCard.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/StepCard.js +203 -0
- package/dist/components/FormTemplateEditor/StepCard.js.map +1 -0
- package/dist/components/FormTemplateEditor/StepFieldRow.d.ts +34 -0
- package/dist/components/FormTemplateEditor/StepFieldRow.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/StepFieldRow.js +128 -0
- package/dist/components/FormTemplateEditor/StepFieldRow.js.map +1 -0
- package/dist/components/FormTemplateEditor/TemplateFileHandleField.d.ts +19 -0
- package/dist/components/FormTemplateEditor/TemplateFileHandleField.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/TemplateFileHandleField.js +78 -0
- package/dist/components/FormTemplateEditor/TemplateFileHandleField.js.map +1 -0
- package/dist/components/FormTemplateEditor/dragHandle.css +1 -0
- package/dist/components/FormTemplateEditor/dragHandle.module.js +8 -0
- package/dist/components/FormTemplateEditor/dragHandle.module.js.map +1 -0
- package/dist/components/FormTemplateEditor/dragHandle.module.scss +22 -0
- package/dist/components/FormTemplateEditor/dropTarget.css +1 -0
- package/dist/components/FormTemplateEditor/dropTarget.module.js +5 -0
- package/dist/components/FormTemplateEditor/dropTarget.module.js.map +1 -0
- package/dist/components/FormTemplateEditor/dropTarget.module.scss +14 -0
- package/dist/components/FormTemplateEditor/formTemplateDraftState.d.ts +48 -0
- package/dist/components/FormTemplateEditor/formTemplateDraftState.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/formTemplateDraftState.js +126 -0
- package/dist/components/FormTemplateEditor/formTemplateDraftState.js.map +1 -0
- package/dist/components/FormTemplateEditor/formTemplateSchema.d.ts +35 -0
- package/dist/components/FormTemplateEditor/formTemplateSchema.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/formTemplateSchema.js +35 -0
- package/dist/components/FormTemplateEditor/formTemplateSchema.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 +27 -0
- package/dist/components/FormTemplateEditor/schemaFieldUtils.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/schemaFieldUtils.js +84 -0
- package/dist/components/FormTemplateEditor/schemaFieldUtils.js.map +1 -0
- package/dist/components/FormTemplateEditor/sortableIds.d.ts +23 -0
- package/dist/components/FormTemplateEditor/sortableIds.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/sortableIds.js +24 -0
- package/dist/components/FormTemplateEditor/sortableIds.js.map +1 -0
- package/dist/components/FormTemplateEditor/useFormTemplateDraft.d.ts +33 -0
- package/dist/components/FormTemplateEditor/useFormTemplateDraft.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/useFormTemplateDraft.js +59 -0
- package/dist/components/FormTemplateEditor/useFormTemplateDraft.js.map +1 -0
- package/dist/components/FormTemplateEditor/useFormTemplateDrag.d.ts +9 -0
- package/dist/components/FormTemplateEditor/useFormTemplateDrag.d.ts.map +1 -0
- package/dist/components/FormTemplateEditor/useFormTemplateDrag.js +66 -0
- package/dist/components/FormTemplateEditor/useFormTemplateDrag.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 +54 -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 +24 -0
- package/dist/components/FormTemplateEditor/utils.js.map +1 -0
- package/dist/components/JsonSchemaForm/CustomFormContext.d.ts +1 -1
- package/dist/components/JsonSchemaForm/CustomFormContext.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.css +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.module.scss +6 -1
- package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js +4 -0
- package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js.map +1 -1
- package/dist/components/JsonSchemaForm/widgets/SelectWidget.d.ts +11 -0
- package/dist/components/JsonSchemaForm/widgets/SelectWidget.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/widgets/SelectWidget.js +28 -19
- package/dist/components/JsonSchemaForm/widgets/SelectWidget.js.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.css +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.d.ts +3 -0
- package/dist/components/QueryBuilder/FilterConditionRow.d.ts.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.js +123 -123
- package/dist/components/QueryBuilder/FilterConditionRow.js.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.module.js +10 -11
- package/dist/components/QueryBuilder/FilterConditionRow.module.js.map +1 -1
- package/dist/components/QueryBuilder/FilterConditionRow.module.scss +0 -5
- package/dist/components/QueryBuilder/FilterGroupNode.css +1 -1
- package/dist/components/QueryBuilder/FilterGroupNode.d.ts +4 -0
- package/dist/components/QueryBuilder/FilterGroupNode.d.ts.map +1 -1
- package/dist/components/QueryBuilder/FilterGroupNode.js +85 -51
- package/dist/components/QueryBuilder/FilterGroupNode.js.map +1 -1
- package/dist/components/QueryBuilder/FilterGroupNode.module.js +10 -9
- package/dist/components/QueryBuilder/FilterGroupNode.module.js.map +1 -1
- package/dist/components/QueryBuilder/FilterGroupNode.module.scss +9 -0
- package/dist/components/QueryBuilder/QBDragHandle.d.ts +10 -0
- package/dist/components/QueryBuilder/QBDragHandle.d.ts.map +1 -0
- package/dist/components/QueryBuilder/QBDragHandle.js +22 -0
- package/dist/components/QueryBuilder/QBDragHandle.js.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderControls.d.ts.map +1 -1
- package/dist/components/QueryBuilder/QueryBuilderControls.js +120 -108
- package/dist/components/QueryBuilder/QueryBuilderControls.js.map +1 -1
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts +7 -0
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts.map +1 -1
- package/dist/components/QueryBuilder/QueryBuilderInternalContext.js.map +1 -1
- package/dist/components/QueryBuilder/qbTreeToReadable.d.ts +2 -1
- package/dist/components/QueryBuilder/qbTreeToReadable.d.ts.map +1 -1
- package/dist/components/QueryBuilder/qbTreeToReadable.js +25 -21
- package/dist/components/QueryBuilder/qbTreeToReadable.js.map +1 -1
- 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/queryBuilderMetadata.d.ts +16 -0
- package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts.map +1 -1
- package/dist/components/QueryBuilder/queryBuilderMetadata.js +13 -5
- package/dist/components/QueryBuilder/queryBuilderMetadata.js.map +1 -1
- package/dist/components/QueryBuilder/queryBuilderOperations.d.ts +13 -0
- package/dist/components/QueryBuilder/queryBuilderOperations.d.ts.map +1 -1
- package/dist/components/QueryBuilder/queryBuilderOperations.js +39 -36
- package/dist/components/QueryBuilder/queryBuilderOperations.js.map +1 -1
- package/dist/components/QueryBuilder/useQBValueDisplayName.d.ts +18 -0
- package/dist/components/QueryBuilder/useQBValueDisplayName.d.ts.map +1 -0
- package/dist/components/QueryBuilder/useQBValueDisplayName.js +64 -0
- package/dist/components/QueryBuilder/useQBValueDisplayName.js.map +1 -0
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +46 -47
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js +6 -6
- package/dist/components/SynapseTable/RowSelection/RowSelectionUI.d.ts +1 -0
- package/dist/components/SynapseTable/RowSelection/RowSelectionUI.d.ts.map +1 -1
- package/dist/components/SynapseTable/RowSelection/RowSelectionUI.js +13 -11
- package/dist/components/SynapseTable/RowSelection/RowSelectionUI.js.map +1 -1
- package/dist/components/SynapseTable/SearchV2.js +4 -4
- package/dist/components/ToastMessage/ToastMessage.d.ts.map +1 -1
- package/dist/components/ToastMessage/ToastMessage.js +25 -22
- package/dist/components/ToastMessage/ToastMessage.js.map +1 -1
- package/dist/components/dataaccess/FormTemplateEditorRoute.d.ts +7 -0
- package/dist/components/dataaccess/FormTemplateEditorRoute.d.ts.map +1 -0
- package/dist/components/dataaccess/FormTemplateEditorRoute.js +26 -0
- package/dist/components/dataaccess/FormTemplateEditorRoute.js.map +1 -0
- package/dist/components/dataaccess/FormTemplateTable.d.ts +10 -0
- package/dist/components/dataaccess/FormTemplateTable.d.ts.map +1 -0
- package/dist/components/dataaccess/FormTemplateTable.js +124 -0
- package/dist/components/dataaccess/FormTemplateTable.js.map +1 -0
- package/dist/components/dataaccess/ReviewerDashboard.d.ts.map +1 -1
- package/dist/components/dataaccess/ReviewerDashboard.js +80 -50
- package/dist/components/dataaccess/ReviewerDashboard.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +2 -0
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts +0 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts.map +1 -1
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.js +35 -36
- package/dist/components/entity/page/title_bar/EntityPageTitleBar.js.map +1 -1
- package/dist/components/styled/LeftRightPanel.d.ts.map +1 -1
- package/dist/components/styled/LeftRightPanel.js +19 -2
- package/dist/components/styled/LeftRightPanel.js.map +1 -1
- package/dist/components/widgets/FileHandleLink.d.ts +12 -2
- package/dist/components/widgets/FileHandleLink.d.ts.map +1 -1
- package/dist/components/widgets/FileHandleLink.js +25 -29
- package/dist/components/widgets/FileHandleLink.js.map +1 -1
- package/dist/mocks/accessRequirement/mockFormTemplates.d.ts +4 -2
- package/dist/mocks/accessRequirement/mockFormTemplates.d.ts.map +1 -1
- package/dist/mocks/accessRequirement/mockFormTemplates.js +13 -14
- package/dist/mocks/accessRequirement/mockFormTemplates.js.map +1 -1
- package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts +4 -1
- package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts.map +1 -1
- package/dist/mocks/accessRequirement/mockJsonSchemas.js +24 -17
- package/dist/mocks/accessRequirement/mockJsonSchemas.js.map +1 -1
- package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts +41 -14
- package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/asyncJobHandlers.js +53 -44
- package/dist/mocks/msw/handlers/asyncJobHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/authHandlers.d.ts +1 -0
- package/dist/mocks/msw/handlers/authHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/authHandlers.js +6 -2
- package/dist/mocks/msw/handlers/authHandlers.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/dataAccessRequestHandlers.d.ts +2 -0
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +52 -46
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/fileHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/fileHandlers.js +25 -21
- package/dist/mocks/msw/handlers/fileHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts +2 -1
- package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/formTemplateHandlers.js +18 -18
- package/dist/mocks/msw/handlers/formTemplateHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/schemaHandlers.d.ts +10 -1
- package/dist/mocks/msw/handlers/schemaHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/schemaHandlers.js +30 -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/twoFactorEnrollmentHandlers.d.ts +8 -0
- package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.js +19 -0
- package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.js.map +1 -0
- package/dist/style/abstracts/_cssVariables.scss +13 -0
- package/dist/style/components/_toasts.scss +10 -1
- package/dist/style/main.css +1 -1
- package/dist/synapse-queries/KeyFactory.d.ts +9 -3
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +17 -7
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/auth/index.d.ts +1 -0
- package/dist/synapse-queries/auth/index.d.ts.map +1 -1
- package/dist/synapse-queries/auth/index.js +2 -1
- package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.d.ts +11 -0
- package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.d.ts.map +1 -0
- package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js +19 -0
- package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js.map +1 -0
- package/dist/synapse-queries/dataaccess/index.d.ts +0 -1
- package/dist/synapse-queries/dataaccess/index.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/index.js +3 -4
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts +18 -0
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useEDuc.js +33 -1
- package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
- package/dist/synapse-queries/file/useDirectUploadToS3.js +6 -6
- package/dist/synapse-queries/file/useFileHandle.d.ts +8 -0
- package/dist/synapse-queries/file/useFileHandle.d.ts.map +1 -1
- package/dist/synapse-queries/file/useFileHandle.js +15 -6
- package/dist/synapse-queries/file/useFileHandle.js.map +1 -1
- package/dist/synapse-queries/index.js +260 -257
- package/dist/synapse-queries/jsonschema/index.js +2 -2
- 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/synapse-queries/jsonschema/useSchema.d.ts +5 -0
- package/dist/synapse-queries/jsonschema/useSchema.d.ts.map +1 -1
- package/dist/synapse-queries/jsonschema/useSchema.js +9 -1
- package/dist/synapse-queries/jsonschema/useSchema.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 +2 -0
- package/dist/utils/APIConstants.d.ts.map +1 -1
- package/dist/utils/APIConstants.js +2 -2
- package/dist/utils/APIConstants.js.map +1 -1
- package/dist/utils/appendFinalQueryParamKey.d.ts.map +1 -1
- package/dist/utils/appendFinalQueryParamKey.js +4 -1
- package/dist/utils/appendFinalQueryParamKey.js.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts +2 -0
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.js +1 -1
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
- package/dist/utils/functions/ArrayUtils.d.ts +3 -0
- package/dist/utils/functions/ArrayUtils.d.ts.map +1 -1
- package/dist/utils/functions/ArrayUtils.js +7 -1
- package/dist/utils/functions/ArrayUtils.js.map +1 -1
- package/dist/utils/functions/toPascalCase.d.ts +6 -0
- package/dist/utils/functions/toPascalCase.d.ts.map +1 -0
- package/dist/utils/functions/toPascalCase.js +8 -0
- package/dist/utils/functions/toPascalCase.js.map +1 -0
- package/dist/utils/jsonschema/generateDataAccessSchema.d.ts +26 -0
- package/dist/utils/jsonschema/generateDataAccessSchema.d.ts.map +1 -0
- package/dist/utils/jsonschema/generateDataAccessSchema.js +28 -0
- package/dist/utils/jsonschema/generateDataAccessSchema.js.map +1 -0
- package/dist/utils/jsonschema/submissionContext.d.ts +91 -0
- package/dist/utils/jsonschema/submissionContext.d.ts.map +1 -0
- package/dist/utils/jsonschema/submissionContext.js +178 -0
- package/dist/utils/jsonschema/submissionContext.js.map +1 -0
- package/package.json +13 -10
- package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.d.ts +0 -6
- package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.d.ts.map +0 -1
- package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.js +0 -32
- package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.js.map +0 -1
- package/dist/components/entity/page/title_bar/TitleBarProperties.d.ts +0 -9
- package/dist/components/entity/page/title_bar/TitleBarProperties.d.ts.map +0 -1
- package/dist/components/entity/page/title_bar/TitleBarProperties.js +0 -24
- package/dist/components/entity/page/title_bar/TitleBarProperties.js.map +0 -1
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.d.ts +0 -21
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.d.ts.map +0 -1
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.js +0 -34
- package/dist/synapse-queries/dataaccess/useGenerateDataAccessSchema.js.map +0 -1
|
@@ -3,22 +3,25 @@ import { useQueryContext as t } from "../QueryContext/QueryContext.js";
|
|
|
3
3
|
import "../QueryContext/index.js";
|
|
4
4
|
import { useQueryVisualizationContext as n } from "../QueryVisualizationWrapper/QueryVisualizationContext.js";
|
|
5
5
|
import "../QueryVisualizationWrapper/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import m from "./
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
6
|
+
import { addChildGroup as r, addConditionToGroup as i, clearGroup as a, defaultQBGroup as o, removeNode as s, updateCondition as c, updateGroup as l } from "./queryBuilderOperations.js";
|
|
7
|
+
import { qbNodeToApiFilter as u } from "./queryBuilderTranslation.js";
|
|
8
|
+
import { useQueryBuilderDrag as d } from "./queryBuilderDnd.js";
|
|
9
|
+
import { useQBCombinedSql as f } from "./useQBCombinedSql.js";
|
|
10
|
+
import { useQBFacetSourceMetadata as p } from "./useQBFacetSourceMetadata.js";
|
|
11
|
+
import { useQBValueDisplayName as m } from "./useQBValueDisplayName.js";
|
|
12
|
+
import { QueryBuilderInternalContextProvider as h } from "./QueryBuilderInternalContext.js";
|
|
13
|
+
import { FilterGroupNode as g } from "./FilterGroupNode.js";
|
|
14
|
+
import { qbTreeToReadable as _ } from "./qbTreeToReadable.js";
|
|
15
|
+
import v from "./QueryBuilderControls.module.js";
|
|
16
|
+
import { useCallback as y, useMemo as b, useState as x } from "react";
|
|
17
|
+
import { Button as S, ToggleButton as C, ToggleButtonGroup as w } from "@mui/material";
|
|
18
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
19
|
+
import { DragDropProvider as D } from "@dnd-kit/react";
|
|
17
20
|
//#region src/components/QueryBuilder/QueryBuilderControls.tsx
|
|
18
|
-
function
|
|
19
|
-
let { tree:
|
|
20
|
-
let t =
|
|
21
|
-
|
|
21
|
+
function O(O) {
|
|
22
|
+
let { tree: k, onTreeChange: A, onlyFacetedColumns: j = !1 } = O, { columnModels: M, facetResults: N } = p(), { executeQueryRequest: P } = t(), F = k ?? o(), I = y(() => {
|
|
23
|
+
let t = u(F);
|
|
24
|
+
P((n) => {
|
|
22
25
|
let r = (n.query.additionalFilters ?? []).filter((t) => !e(t)), i = t ? [...r, t] : r;
|
|
23
26
|
return {
|
|
24
27
|
...n,
|
|
@@ -28,111 +31,120 @@ function T(T) {
|
|
|
28
31
|
}
|
|
29
32
|
};
|
|
30
33
|
});
|
|
31
|
-
}, [
|
|
32
|
-
|
|
33
|
-
}, [
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
|
|
39
|
-
}, [
|
|
40
|
-
|
|
41
|
-
}, [
|
|
42
|
-
|
|
43
|
-
}, [
|
|
44
|
-
|
|
45
|
-
}, [
|
|
46
|
-
columnModels:
|
|
47
|
-
facetResults:
|
|
48
|
-
onlyFacetedColumns:
|
|
49
|
-
getColumnDisplayName:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
34
|
+
}, [F, P]), { getColumnDisplayName: L } = n(), R = m(M, N), [z, B] = x("plain-english"), V = y((e) => {
|
|
35
|
+
A(i(F, e, null, null));
|
|
36
|
+
}, [F, A]), H = y((e) => {
|
|
37
|
+
A(r(F, e));
|
|
38
|
+
}, [F, A]), U = y((e) => {
|
|
39
|
+
A(a(F, e));
|
|
40
|
+
}, [F, A]), W = y((e, t) => {
|
|
41
|
+
A(l(F, e, t));
|
|
42
|
+
}, [F, A]), G = y((e) => {
|
|
43
|
+
A(s(F, e));
|
|
44
|
+
}, [F, A]), K = y((e, t) => {
|
|
45
|
+
A(c(F, e, t));
|
|
46
|
+
}, [F, A]), q = y((e) => {
|
|
47
|
+
A(s(F, e));
|
|
48
|
+
}, [F, A]), J = d(F, A), Y = b(() => ({
|
|
49
|
+
columnModels: M,
|
|
50
|
+
facetResults: N,
|
|
51
|
+
onlyFacetedColumns: j,
|
|
52
|
+
getColumnDisplayName: L,
|
|
53
|
+
getValueDisplayName: R,
|
|
54
|
+
addConditionAt: V,
|
|
55
|
+
addChildGroupAt: H,
|
|
56
|
+
clearGroupAt: U,
|
|
57
|
+
updateGroupAt: W,
|
|
58
|
+
removeGroupAt: G,
|
|
59
|
+
updateConditionAt: K,
|
|
60
|
+
removeConditionAt: q
|
|
57
61
|
}), [
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
P,
|
|
62
|
+
M,
|
|
63
|
+
N,
|
|
64
|
+
j,
|
|
62
65
|
L,
|
|
63
66
|
R,
|
|
64
|
-
z,
|
|
65
|
-
B,
|
|
66
67
|
V,
|
|
67
68
|
H,
|
|
68
|
-
U
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
value:
|
|
97
|
-
|
|
98
|
-
|
|
69
|
+
U,
|
|
70
|
+
W,
|
|
71
|
+
G,
|
|
72
|
+
K,
|
|
73
|
+
q
|
|
74
|
+
]), X = b(() => _(F, L, R), [
|
|
75
|
+
F,
|
|
76
|
+
L,
|
|
77
|
+
R
|
|
78
|
+
]), { data: Z, isPending: Q, error: $ } = f(z === "sql" ? F : null);
|
|
79
|
+
return /* @__PURE__ */ T(h, {
|
|
80
|
+
value: Y,
|
|
81
|
+
children: /* @__PURE__ */ T(D, {
|
|
82
|
+
...J,
|
|
83
|
+
children: /* @__PURE__ */ E("div", {
|
|
84
|
+
className: v.root,
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ E("div", {
|
|
87
|
+
className: v.summaryBar,
|
|
88
|
+
children: [/* @__PURE__ */ E("div", {
|
|
89
|
+
className: v.summaryHeader,
|
|
90
|
+
children: [/* @__PURE__ */ T("span", {
|
|
91
|
+
className: v.summaryLabel,
|
|
92
|
+
children: "Query Summary"
|
|
93
|
+
}), /* @__PURE__ */ E(w, {
|
|
94
|
+
className: v.summaryModeToggle,
|
|
95
|
+
size: "small",
|
|
96
|
+
exclusive: !0,
|
|
97
|
+
value: z,
|
|
98
|
+
onChange: (e, t) => {
|
|
99
|
+
t != null && B(t);
|
|
100
|
+
},
|
|
101
|
+
"aria-label": "Query summary display mode",
|
|
102
|
+
children: [/* @__PURE__ */ T(C, {
|
|
103
|
+
value: "plain-english",
|
|
104
|
+
"aria-label": "Show summary",
|
|
105
|
+
children: "Summary"
|
|
106
|
+
}), /* @__PURE__ */ T(C, {
|
|
107
|
+
value: "sql",
|
|
108
|
+
"aria-label": "Show SQL",
|
|
109
|
+
children: "SQL"
|
|
110
|
+
})]
|
|
99
111
|
})]
|
|
112
|
+
}), /* @__PURE__ */ T("div", {
|
|
113
|
+
className: v.summaryContent,
|
|
114
|
+
"aria-live": "polite",
|
|
115
|
+
"aria-atomic": "true",
|
|
116
|
+
children: z === "plain-english" ? X : $ ? /* @__PURE__ */ E("span", {
|
|
117
|
+
className: v.sqlError,
|
|
118
|
+
children: ["Could not load SQL preview: ", $.message]
|
|
119
|
+
}) : Q ? /* @__PURE__ */ T("span", {
|
|
120
|
+
className: v.sqlPlaceholder,
|
|
121
|
+
children: "Loading SQL…"
|
|
122
|
+
}) : /* @__PURE__ */ T("code", {
|
|
123
|
+
className: v.sqlText,
|
|
124
|
+
children: Z
|
|
125
|
+
})
|
|
100
126
|
})]
|
|
101
|
-
}),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
className:
|
|
113
|
-
children:
|
|
127
|
+
}),
|
|
128
|
+
/* @__PURE__ */ T(g, {
|
|
129
|
+
group: F,
|
|
130
|
+
isRoot: !0
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ T("div", {
|
|
133
|
+
className: v.applyRow,
|
|
134
|
+
children: /* @__PURE__ */ T(S, {
|
|
135
|
+
variant: "contained",
|
|
136
|
+
color: "primary",
|
|
137
|
+
onClick: I,
|
|
138
|
+
className: v.applyButton,
|
|
139
|
+
children: "Update Results"
|
|
114
140
|
})
|
|
115
|
-
})]
|
|
116
|
-
}),
|
|
117
|
-
/* @__PURE__ */ C(d, {
|
|
118
|
-
group: M,
|
|
119
|
-
isRoot: !0
|
|
120
|
-
}),
|
|
121
|
-
/* @__PURE__ */ C("div", {
|
|
122
|
-
className: m.applyRow,
|
|
123
|
-
children: /* @__PURE__ */ C(b, {
|
|
124
|
-
variant: "contained",
|
|
125
|
-
color: "primary",
|
|
126
|
-
onClick: N,
|
|
127
|
-
className: m.applyButton,
|
|
128
|
-
children: "Update Results"
|
|
129
141
|
})
|
|
130
|
-
|
|
131
|
-
|
|
142
|
+
]
|
|
143
|
+
})
|
|
132
144
|
})
|
|
133
145
|
});
|
|
134
146
|
}
|
|
135
147
|
//#endregion
|
|
136
|
-
export {
|
|
148
|
+
export { O as QueryBuilderControls };
|
|
137
149
|
|
|
138
150
|
//# sourceMappingURL=QueryBuilderControls.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryBuilderControls.js","names":[],"sources":["../../../src/components/QueryBuilder/QueryBuilderControls.tsx"],"sourcesContent":["import { Button, ToggleButton, ToggleButtonGroup } from '@mui/material'\nimport { useCallback, useMemo, useState } from 'react'\nimport { isFilterGroup } from '../../utils/types/IsType'\nimport { useQueryContext } from '../QueryContext'\nimport { useQueryVisualizationContext } from '../QueryVisualizationWrapper'\nimport { FilterGroupNode } from './FilterGroupNode'\nimport { qbNodeToApiFilter } from './queryBuilderTranslation'\nimport { qbTreeToReadable } from './qbTreeToReadable'\nimport { QueryBuilderInternalContextProvider } from './QueryBuilderInternalContext'\nimport styles from './QueryBuilderControls.module.scss'\nimport {\n addChildGroup,\n addConditionToGroup,\n clearGroup,\n defaultQBGroup,\n removeNode,\n updateCondition,\n updateGroup,\n} from './queryBuilderOperations'\nimport { QBCondition, QBGroup } from './QueryBuilderTypes'\nimport { useQBCombinedSql } from './useQBCombinedSql'\nimport { useQBFacetSourceMetadata } from './useQBFacetSourceMetadata'\n\nexport type QueryBuilderControlsProps = {\n /** The QB tree. When null, an empty default tree is rendered. */\n tree: QBGroup | null\n /** Called with the next tree after any dispatched edit. */\n onTreeChange: (next: QBGroup) => void\n /**\n * When true, the property picker only offers columns that have facet\n * metadata (Cohort Builder mode). Defaults to false.\n */\n onlyFacetedColumns?: boolean\n}\n\ntype SummaryMode = 'plain-english' | 'sql'\n\n/**\n * Top-level Query Builder panel. Uses `useQBFacetSourceMetadata()` — must be\n * rendered inside the Suspense boundary that already wraps\n * `QueryVisualizationWrapper` in `QueryWrapperPlotNav`. Facet metadata is\n * pulled from a companion query that strips the QB's own `FilterGroup` out\n * of `additionalFilters` so pill values remain stable while the user builds.\n */\nexport function QueryBuilderControls(props: QueryBuilderControlsProps) {\n const { tree, onTreeChange, onlyFacetedColumns = false } = props\n const { columnModels, facetResults } = useQBFacetSourceMetadata()\n const { executeQueryRequest } = useQueryContext()\n\n const activeTree = tree ?? defaultQBGroup()\n\n const onApply = useCallback(() => {\n const filterGroup = qbNodeToApiFilter(activeTree)\n executeQueryRequest(prev => {\n // Preserve any non-QB additionalFilters (e.g. lockedColumn constraints\n // introduced by portal detail pages) — Update Results only owns the\n // FilterGroup slot.\n const preserved = (prev.query.additionalFilters ?? []).filter(\n f => !isFilterGroup(f),\n )\n const next = filterGroup ? [...preserved, filterGroup] : preserved\n return {\n ...prev,\n query: {\n ...prev.query,\n additionalFilters: next.length > 0 ? next : undefined,\n },\n }\n })\n }, [activeTree, executeQueryRequest])\n\n const { getColumnDisplayName } = useQueryVisualizationContext()\n\n const [summaryMode, setSummaryMode] = useState<SummaryMode>('plain-english')\n\n const addConditionAt = useCallback(\n (groupId: string) => {\n onTreeChange(addConditionToGroup(activeTree, groupId, null, null))\n },\n [activeTree, onTreeChange],\n )\n const addChildGroupAt = useCallback(\n (groupId: string) => {\n onTreeChange(addChildGroup(activeTree, groupId))\n },\n [activeTree, onTreeChange],\n )\n const clearGroupAt = useCallback(\n (groupId: string) => {\n onTreeChange(clearGroup(activeTree, groupId))\n },\n [activeTree, onTreeChange],\n )\n const updateGroupAt = useCallback(\n (\n groupId: string,\n patch: Partial<Omit<QBGroup, 'kind' | 'id' | 'children'>>,\n ) => {\n onTreeChange(updateGroup(activeTree, groupId, patch))\n },\n [activeTree, onTreeChange],\n )\n const removeGroupAt = useCallback(\n (groupId: string) => {\n onTreeChange(removeNode(activeTree, groupId))\n },\n [activeTree, onTreeChange],\n )\n const updateConditionAt = useCallback(\n (conditionId: string, patch: Partial<Omit<QBCondition, 'kind' | 'id'>>) => {\n onTreeChange(updateCondition(activeTree, conditionId, patch))\n },\n [activeTree, onTreeChange],\n )\n const removeConditionAt = useCallback(\n (conditionId: string) => {\n onTreeChange(removeNode(activeTree, conditionId))\n },\n [activeTree, onTreeChange],\n )\n\n const contextValue = useMemo(\n () => ({\n columnModels,\n facetResults,\n onlyFacetedColumns,\n getColumnDisplayName,\n addConditionAt,\n addChildGroupAt,\n clearGroupAt,\n updateGroupAt,\n removeGroupAt,\n updateConditionAt,\n removeConditionAt,\n }),\n [\n columnModels,\n facetResults,\n onlyFacetedColumns,\n getColumnDisplayName,\n addConditionAt,\n addChildGroupAt,\n clearGroupAt,\n updateGroupAt,\n removeGroupAt,\n updateConditionAt,\n removeConditionAt,\n ],\n )\n\n const readable = useMemo(\n () => qbTreeToReadable(activeTree, getColumnDisplayName),\n [activeTree, getColumnDisplayName],\n )\n\n const {\n data: combinedSql,\n isPending: isSqlPending,\n error: sqlError,\n } = useQBCombinedSql(summaryMode === 'sql' ? activeTree : null)\n\n return (\n <QueryBuilderInternalContextProvider value={contextValue}>\n <div className={styles.root}>\n <div className={styles.summaryBar}>\n <div className={styles.summaryHeader}>\n <span className={styles.summaryLabel}>Query Summary</span>\n <ToggleButtonGroup\n className={styles.summaryModeToggle}\n size=\"small\"\n exclusive\n value={summaryMode}\n onChange={(_event, next: SummaryMode | null) => {\n if (next != null) setSummaryMode(next)\n }}\n aria-label=\"Query summary display mode\"\n >\n <ToggleButton value=\"plain-english\" aria-label=\"Show summary\">\n Summary\n </ToggleButton>\n <ToggleButton value=\"sql\" aria-label=\"Show SQL\">\n SQL\n </ToggleButton>\n </ToggleButtonGroup>\n </div>\n <div\n className={styles.summaryContent}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {summaryMode === 'plain-english' ? (\n readable\n ) : sqlError ? (\n <span className={styles.sqlError}>\n Could not load SQL preview: {sqlError.message}\n </span>\n ) : isSqlPending ? (\n <span className={styles.sqlPlaceholder}>Loading SQL…</span>\n ) : (\n <code className={styles.sqlText}>{combinedSql}</code>\n )}\n </div>\n </div>\n\n <FilterGroupNode group={activeTree} isRoot />\n\n <div className={styles.applyRow}>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={onApply}\n className={styles.applyButton}\n >\n Update Results\n </Button>\n </div>\n </div>\n </QueryBuilderInternalContextProvider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA4CA,SAAgB,EAAqB,GAAkC;CACrE,IAAM,EAAE,SAAM,iBAAc,wBAAqB,OAAU,GACrD,EAAE,iBAAc,oBAAiB,EAAyB,GAC1D,EAAE,2BAAwB,EAAgB,GAE1C,IAAa,KAAQ,EAAe,GAEpC,IAAU,QAAkB;EAChC,IAAM,IAAc,EAAkB,CAAU;EAChD,GAAoB,MAAQ;GAI1B,IAAM,KAAa,EAAK,MAAM,qBAAqB,CAAC,GAAG,QACrD,MAAK,CAAC,EAAc,CAAC,CACvB,GACM,IAAO,IAAc,CAAC,GAAG,GAAW,CAAW,IAAI;GACzD,OAAO;IACL,GAAG;IACH,OAAO;KACL,GAAG,EAAK;KACR,mBAAmB,EAAK,SAAS,IAAI,IAAO,KAAA;IAC9C;GACF;EACF,CAAC;CACH,GAAG,CAAC,GAAY,CAAmB,CAAC,GAE9B,EAAE,4BAAyB,EAA6B,GAExD,CAAC,GAAa,KAAkB,EAAsB,eAAe,GAErE,IAAiB,GACpB,MAAoB;EACnB,EAAa,EAAo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OAClB,MAAK;OACL,WAAA;OACA,OAAO;OACP,WAAW,GAAQ,MAA6B;QAC9C,AAAI,KAAQ,QAAM,EAAe,CAAI;OACvC;OACA,cAAW;iBARb,CAUE,kBAAC,GAAD;QAAc,OAAM;QAAgB,cAAW;kBAAe;OAEhD,CAAA,GACd,kBAAC,GAAD;QAAc,OAAM;QAAM,cAAW;kBAAW;OAElC,CAAA,CACG;QAChB;SACL,kBAAC,OAAD;MACE,WAAW,EAAO;MAClB,aAAU;MACV,eAAY;gBAEX,MAAgB,kBACf,IACE,IACF,kBAAC,QAAD;OAAM,WAAW,EAAO;iBAAxB,CAAkC,gCACH,EAAS,OAClC;WACJ,IACF,kBAAC,QAAD;OAAM,WAAW,EAAO;iBAAgB;MAAkB,CAAA,IAE1D,kBAAC,QAAD;OAAM,WAAW,EAAO;iBAAU;MAAkB,CAAA;KAEnD,CAAA,CACF;;IAEL,kBAAC,GAAD;KAAiB,OAAO;KAAY,QAAA;IAAQ,CAAA;IAE5C,kBAAC,OAAD;KAAK,WAAW,EAAO;eACrB,kBAAC,GAAD;MACE,SAAQ;MACR,OAAM;MACN,SAAS;MACT,WAAW,EAAO;gBACnB;KAEO,CAAA;IACL,CAAA;GACF;;CAC8B,CAAA;AAEzC"}
|
|
1
|
+
{"version":3,"file":"QueryBuilderControls.js","names":[],"sources":["../../../src/components/QueryBuilder/QueryBuilderControls.tsx"],"sourcesContent":["import { Button, ToggleButton, ToggleButtonGroup } from '@mui/material'\nimport { DragDropProvider } from '@dnd-kit/react'\nimport { useCallback, useMemo, useState } from 'react'\nimport { isFilterGroup } from '../../utils/types/IsType'\nimport { useQueryContext } from '../QueryContext'\nimport { useQueryVisualizationContext } from '../QueryVisualizationWrapper'\nimport { FilterGroupNode } from './FilterGroupNode'\nimport { useQueryBuilderDrag } from './queryBuilderDnd'\nimport { qbNodeToApiFilter } from './queryBuilderTranslation'\nimport { qbTreeToReadable } from './qbTreeToReadable'\nimport { QueryBuilderInternalContextProvider } from './QueryBuilderInternalContext'\nimport styles from './QueryBuilderControls.module.scss'\nimport {\n addChildGroup,\n addConditionToGroup,\n clearGroup,\n defaultQBGroup,\n removeNode,\n updateCondition,\n updateGroup,\n} from './queryBuilderOperations'\nimport { QBCondition, QBGroup } from './QueryBuilderTypes'\nimport { useQBCombinedSql } from './useQBCombinedSql'\nimport { useQBFacetSourceMetadata } from './useQBFacetSourceMetadata'\nimport { useQBValueDisplayName } from './useQBValueDisplayName'\n\nexport type QueryBuilderControlsProps = {\n /** The QB tree. When null, an empty default tree is rendered. */\n tree: QBGroup | null\n /** Called with the next tree after any dispatched edit. */\n onTreeChange: (next: QBGroup) => void\n /**\n * When true, the property picker only offers columns that have facet\n * metadata (Cohort Builder mode). Defaults to false.\n */\n onlyFacetedColumns?: boolean\n}\n\ntype SummaryMode = 'plain-english' | 'sql'\n\n/**\n * Top-level Query Builder panel. Uses `useQBFacetSourceMetadata()` — must be\n * rendered inside the Suspense boundary that already wraps\n * `QueryVisualizationWrapper` in `QueryWrapperPlotNav`. Facet metadata is\n * pulled from a companion query that strips the QB's own `FilterGroup` out\n * of `additionalFilters` so pill values remain stable while the user builds.\n */\nexport function QueryBuilderControls(props: QueryBuilderControlsProps) {\n const { tree, onTreeChange, onlyFacetedColumns = false } = props\n const { columnModels, facetResults } = useQBFacetSourceMetadata()\n const { executeQueryRequest } = useQueryContext()\n\n const activeTree = tree ?? defaultQBGroup()\n\n const onApply = useCallback(() => {\n const filterGroup = qbNodeToApiFilter(activeTree)\n executeQueryRequest(prev => {\n // Preserve any non-QB additionalFilters (e.g. lockedColumn constraints\n // introduced by portal detail pages) — Update Results only owns the\n // FilterGroup slot.\n const preserved = (prev.query.additionalFilters ?? []).filter(\n f => !isFilterGroup(f),\n )\n const next = filterGroup ? [...preserved, filterGroup] : preserved\n return {\n ...prev,\n query: {\n ...prev.query,\n additionalFilters: next.length > 0 ? next : undefined,\n },\n }\n })\n }, [activeTree, executeQueryRequest])\n\n const { getColumnDisplayName } = useQueryVisualizationContext()\n const getValueDisplayName = useQBValueDisplayName(columnModels, facetResults)\n\n const [summaryMode, setSummaryMode] = useState<SummaryMode>('plain-english')\n\n const addConditionAt = useCallback(\n (groupId: string) => {\n onTreeChange(addConditionToGroup(activeTree, groupId, null, null))\n },\n [activeTree, onTreeChange],\n )\n const addChildGroupAt = useCallback(\n (groupId: string) => {\n onTreeChange(addChildGroup(activeTree, groupId))\n },\n [activeTree, onTreeChange],\n )\n const clearGroupAt = useCallback(\n (groupId: string) => {\n onTreeChange(clearGroup(activeTree, groupId))\n },\n [activeTree, onTreeChange],\n )\n const updateGroupAt = useCallback(\n (\n groupId: string,\n patch: Partial<Omit<QBGroup, 'kind' | 'id' | 'children'>>,\n ) => {\n onTreeChange(updateGroup(activeTree, groupId, patch))\n },\n [activeTree, onTreeChange],\n )\n const removeGroupAt = useCallback(\n (groupId: string) => {\n onTreeChange(removeNode(activeTree, groupId))\n },\n [activeTree, onTreeChange],\n )\n const updateConditionAt = useCallback(\n (conditionId: string, patch: Partial<Omit<QBCondition, 'kind' | 'id'>>) => {\n onTreeChange(updateCondition(activeTree, conditionId, patch))\n },\n [activeTree, onTreeChange],\n )\n const removeConditionAt = useCallback(\n (conditionId: string) => {\n onTreeChange(removeNode(activeTree, conditionId))\n },\n [activeTree, onTreeChange],\n )\n const dragHandlers = useQueryBuilderDrag(activeTree, onTreeChange)\n\n const contextValue = useMemo(\n () => ({\n columnModels,\n facetResults,\n onlyFacetedColumns,\n getColumnDisplayName,\n getValueDisplayName,\n addConditionAt,\n addChildGroupAt,\n clearGroupAt,\n updateGroupAt,\n removeGroupAt,\n updateConditionAt,\n removeConditionAt,\n }),\n [\n columnModels,\n facetResults,\n onlyFacetedColumns,\n getColumnDisplayName,\n getValueDisplayName,\n addConditionAt,\n addChildGroupAt,\n clearGroupAt,\n updateGroupAt,\n removeGroupAt,\n updateConditionAt,\n removeConditionAt,\n ],\n )\n\n const readable = useMemo(\n () =>\n qbTreeToReadable(activeTree, getColumnDisplayName, getValueDisplayName),\n [activeTree, getColumnDisplayName, getValueDisplayName],\n )\n\n const {\n data: combinedSql,\n isPending: isSqlPending,\n error: sqlError,\n } = useQBCombinedSql(summaryMode === 'sql' ? activeTree : null)\n\n return (\n <QueryBuilderInternalContextProvider value={contextValue}>\n <DragDropProvider {...dragHandlers}>\n <div className={styles.root}>\n <div className={styles.summaryBar}>\n <div className={styles.summaryHeader}>\n <span className={styles.summaryLabel}>Query Summary</span>\n <ToggleButtonGroup\n className={styles.summaryModeToggle}\n size=\"small\"\n exclusive\n value={summaryMode}\n onChange={(_event, next: SummaryMode | null) => {\n if (next != null) setSummaryMode(next)\n }}\n aria-label=\"Query summary display mode\"\n >\n <ToggleButton value=\"plain-english\" aria-label=\"Show summary\">\n Summary\n </ToggleButton>\n <ToggleButton value=\"sql\" aria-label=\"Show SQL\">\n SQL\n </ToggleButton>\n </ToggleButtonGroup>\n </div>\n <div\n className={styles.summaryContent}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n >\n {summaryMode === 'plain-english' ? (\n readable\n ) : sqlError ? (\n <span className={styles.sqlError}>\n Could not load SQL preview: {sqlError.message}\n </span>\n ) : isSqlPending ? (\n <span className={styles.sqlPlaceholder}>Loading SQL…</span>\n ) : (\n <code className={styles.sqlText}>{combinedSql}</code>\n )}\n </div>\n </div>\n\n <FilterGroupNode group={activeTree} isRoot />\n\n <div className={styles.applyRow}>\n <Button\n variant=\"contained\"\n color=\"primary\"\n onClick={onApply}\n className={styles.applyButton}\n >\n Update Results\n </Button>\n </div>\n </div>\n </DragDropProvider>\n </QueryBuilderInternalContextProvider>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA+CA,SAAgB,EAAqB,GAAkC;CACrE,IAAM,EAAE,SAAM,iBAAc,wBAAqB,OAAU,GACrD,EAAE,iBAAc,oBAAiB,EAAyB,GAC1D,EAAE,2BAAwB,EAAgB,GAE1C,IAAa,KAAQ,EAAe,GAEpC,IAAU,QAAkB;EAChC,IAAM,IAAc,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AQ;OACR,OAAM;OACN,SAAS;OACT,WAAW,EAAO;iBACnB;MAEO,CAAA;KACL,CAAA;IACF;;EACW,CAAA;CACiB,CAAA;AAEzC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ColumnModel, FacetColumnResult } from '@sage-bionetworks/synapse-types';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { QBCondition, QBGroup } from './QueryBuilderTypes';
|
|
4
|
+
import { QBValueDisplayNameFn } from './useQBValueDisplayName';
|
|
4
5
|
/**
|
|
5
6
|
* Internal-only context shared between `QueryBuilderControls`,
|
|
6
7
|
* `FilterGroupNode`, and `FilterConditionRow`. Exposes the dispatch surface
|
|
@@ -23,6 +24,12 @@ export type QueryBuilderInternalContextType = {
|
|
|
23
24
|
* `QueryVisualizationContext.getColumnDisplayName` when available.
|
|
24
25
|
*/
|
|
25
26
|
getColumnDisplayName: (columnName: string) => string;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the user-facing label for a value of the given column — resolves
|
|
29
|
+
* Synapse IDs to entity/user/evaluation names, and the backend's
|
|
30
|
+
* `VALUE_NOT_SET` sentinel to `Not Assigned`.
|
|
31
|
+
*/
|
|
32
|
+
getValueDisplayName: QBValueDisplayNameFn;
|
|
26
33
|
addConditionAt: (groupId: string) => void;
|
|
27
34
|
addChildGroupAt: (groupId: string) => void;
|
|
28
35
|
clearGroupAt: (groupId: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryBuilderInternalContext.d.ts","sourceRoot":"","sources":["../../../src/components/QueryBuilder/QueryBuilderInternalContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAChF,OAAO,EAAiB,iBAAiB,EAAc,MAAM,OAAO,CAAA;AACpE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"QueryBuilderIntern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MAAM,KAAK,IAAI,CAAA;CACjD,CAAA;AAKD,MAAM,MAAM,wCAAwC,GAAG,iBAAiB,CAAC;IACvE,KAAK,EAAE,+BAA+B,CAAA;CACvC,CAAC,CAAA;AAEF,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,wCAAwC,2CAOhD;AAED,wBAAgB,8BAA8B,IAAI,+BAA+B,CAQhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryBuilderInternalContext.js","names":[],"sources":["../../../src/components/QueryBuilder/QueryBuilderInternalContext.tsx"],"sourcesContent":["import { ColumnModel, FacetColumnResult } from '@sage-bionetworks/synapse-types'\nimport { createContext, PropsWithChildren, useContext } from 'react'\nimport { QBCondition, QBGroup } from './QueryBuilderTypes'\n\n/**\n * Internal-only context shared between `QueryBuilderControls`,\n * `FilterGroupNode`, and `FilterConditionRow`. Exposes the dispatch surface\n * for tree edits + the query metadata each row needs (column models, facet\n * results, and the Cohort Builder `onlyFacetedColumns` toggle).\n */\nexport type QueryBuilderInternalContextType = {\n /** All columns available in the query (unfiltered by faceting). */\n columnModels: ColumnModel[]\n /** Facet results keyed by column name (used to populate pill choices). */\n facetResults: readonly FacetColumnResult[]\n /**\n * When true, the property picker only offers columns that have facet\n * metadata. Cohort Builder sets this true.\n */\n onlyFacetedColumns: boolean\n /**\n * Returns the user-facing label for a column — resolves `columnAliases`\n * first, then falls back to `unCamelCase(name)`. Wired from\n * `QueryVisualizationContext.getColumnDisplayName` when available.\n */\n getColumnDisplayName: (columnName: string) => string\n\n // -- Group operations --\n addConditionAt: (groupId: string) => void\n addChildGroupAt: (groupId: string) => void\n clearGroupAt: (groupId: string) => void\n updateGroupAt: (\n groupId: string,\n patch: Partial<Omit<QBGroup, 'kind' | 'id' | 'children'>>,\n ) => void\n removeGroupAt: (groupId: string) => void\n\n // -- Condition operations --\n updateConditionAt: (\n conditionId: string,\n patch: Partial<Omit<QBCondition, 'kind' | 'id'>>,\n ) => void\n removeConditionAt: (conditionId: string) => void\n}\n\nconst QueryBuilderInternalContext =\n createContext<QueryBuilderInternalContextType | null>(null)\n\nexport type QueryBuilderInternalContextProviderProps = PropsWithChildren<{\n value: QueryBuilderInternalContextType\n}>\n\nexport function QueryBuilderInternalContextProvider(\n props: QueryBuilderInternalContextProviderProps,\n) {\n return (\n <QueryBuilderInternalContext.Provider value={props.value}>\n {props.children}\n </QueryBuilderInternalContext.Provider>\n )\n}\n\nexport function useQueryBuilderInternalContext(): QueryBuilderInternalContextType {\n const context = useContext(QueryBuilderInternalContext)\n if (context == null) {\n throw new Error(\n 'QueryBuilderInternalContext missing — must be rendered inside QueryBuilderControls',\n )\n }\n return context\n}\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"QueryBuilderInternalContext.js","names":[],"sources":["../../../src/components/QueryBuilder/QueryBuilderInternalContext.tsx"],"sourcesContent":["import { ColumnModel, FacetColumnResult } from '@sage-bionetworks/synapse-types'\nimport { createContext, PropsWithChildren, useContext } from 'react'\nimport { QBCondition, QBGroup } from './QueryBuilderTypes'\nimport { QBValueDisplayNameFn } from './useQBValueDisplayName'\n\n/**\n * Internal-only context shared between `QueryBuilderControls`,\n * `FilterGroupNode`, and `FilterConditionRow`. Exposes the dispatch surface\n * for tree edits + the query metadata each row needs (column models, facet\n * results, and the Cohort Builder `onlyFacetedColumns` toggle).\n */\nexport type QueryBuilderInternalContextType = {\n /** All columns available in the query (unfiltered by faceting). */\n columnModels: ColumnModel[]\n /** Facet results keyed by column name (used to populate pill choices). */\n facetResults: readonly FacetColumnResult[]\n /**\n * When true, the property picker only offers columns that have facet\n * metadata. Cohort Builder sets this true.\n */\n onlyFacetedColumns: boolean\n /**\n * Returns the user-facing label for a column — resolves `columnAliases`\n * first, then falls back to `unCamelCase(name)`. Wired from\n * `QueryVisualizationContext.getColumnDisplayName` when available.\n */\n getColumnDisplayName: (columnName: string) => string\n /**\n * Returns the user-facing label for a value of the given column — resolves\n * Synapse IDs to entity/user/evaluation names, and the backend's\n * `VALUE_NOT_SET` sentinel to `Not Assigned`.\n */\n getValueDisplayName: QBValueDisplayNameFn\n\n // -- Group operations --\n addConditionAt: (groupId: string) => void\n addChildGroupAt: (groupId: string) => void\n clearGroupAt: (groupId: string) => void\n updateGroupAt: (\n groupId: string,\n patch: Partial<Omit<QBGroup, 'kind' | 'id' | 'children'>>,\n ) => void\n removeGroupAt: (groupId: string) => void\n\n // -- Condition operations --\n updateConditionAt: (\n conditionId: string,\n patch: Partial<Omit<QBCondition, 'kind' | 'id'>>,\n ) => void\n removeConditionAt: (conditionId: string) => void\n}\n\nconst QueryBuilderInternalContext =\n createContext<QueryBuilderInternalContextType | null>(null)\n\nexport type QueryBuilderInternalContextProviderProps = PropsWithChildren<{\n value: QueryBuilderInternalContextType\n}>\n\nexport function QueryBuilderInternalContextProvider(\n props: QueryBuilderInternalContextProviderProps,\n) {\n return (\n <QueryBuilderInternalContext.Provider value={props.value}>\n {props.children}\n </QueryBuilderInternalContext.Provider>\n )\n}\n\nexport function useQueryBuilderInternalContext(): QueryBuilderInternalContextType {\n const context = useContext(QueryBuilderInternalContext)\n if (context == null) {\n throw new Error(\n 'QueryBuilderInternalContext missing — must be rendered inside QueryBuilderControls',\n )\n }\n return context\n}\n"],"mappings":";;;AAoDA,IAAM,IACJ,EAAsD,IAAI;AAM5D,SAAgB,EACd,GACA;CACA,OACE,kBAAC,EAA4B,UAA7B;EAAsC,OAAO,EAAM;YAChD,EAAM;CAC6B,CAAA;AAE1C;AAEA,SAAgB,IAAkE;CAChF,IAAM,IAAU,EAAW,CAA2B;CACtD,IAAI,KAAW,MACb,MAAU,MACR,oFACF;CAEF,OAAO;AACT"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { QBGroup } from './QueryBuilderTypes';
|
|
3
|
+
import { QBValueDisplayNameFn } from './useQBValueDisplayName';
|
|
3
4
|
/**
|
|
4
5
|
* Render a QB tree as a plain-English React node with the AND / OR / NOT
|
|
5
6
|
* connectives styled inline. Used by the QB's Reads-As summary bar.
|
|
@@ -10,5 +11,5 @@ import { QBGroup } from './QueryBuilderTypes';
|
|
|
10
11
|
* - Excluded (NOT) groups are always parenthesized and prefixed with NOT.
|
|
11
12
|
* - Incomplete conditions render as `(unset)`.
|
|
12
13
|
*/
|
|
13
|
-
export declare function qbTreeToReadable(root: QBGroup, getColumnDisplayName?: (columnName: string) => string): ReactNode;
|
|
14
|
+
export declare function qbTreeToReadable(root: QBGroup, getColumnDisplayName?: (columnName: string) => string, getValueDisplayName?: QBValueDisplayNameFn): ReactNode;
|
|
14
15
|
//# sourceMappingURL=qbTreeToReadable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qbTreeToReadable.d.ts","sourceRoot":"","sources":["../../../src/components/QueryBuilder/qbTreeToReadable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAA0B,OAAO,EAAU,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"qbTreeToReadable.d.ts","sourceRoot":"","sources":["../../../src/components/QueryBuilder/qbTreeToReadable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAA0B,OAAO,EAAU,MAAM,qBAAqB,CAAA;AAE7E,OAAO,EACL,oBAAoB,EAErB,MAAM,yBAAyB,CAAA;AAEhC;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,EACb,oBAAoB,GAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAqB,EACnE,mBAAmB,GAAE,oBAA4C,GAChE,SAAS,CAKX"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { isQBGroup as e } from "./QueryBuilderTypes.js";
|
|
2
|
+
import { labelForOp as t } from "./queryBuilderMetadata.js";
|
|
3
|
+
import { rawQBValueDisplayName as n } from "./useQBValueDisplayName.js";
|
|
3
4
|
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
5
|
//#region src/components/QueryBuilder/qbTreeToReadable.tsx
|
|
5
|
-
function o(e, t = (e) => e) {
|
|
6
|
-
return s(e, !0,
|
|
6
|
+
function o(e, t = (e) => e, r = n) {
|
|
7
|
+
return s(e, !0, {
|
|
8
|
+
getColumnDisplayName: t,
|
|
9
|
+
getValueDisplayName: r
|
|
10
|
+
}) ?? /* @__PURE__ */ i("span", { children: "(no filters)" });
|
|
7
11
|
}
|
|
8
|
-
function s(
|
|
9
|
-
return
|
|
12
|
+
function s(t, n, r) {
|
|
13
|
+
return e(t) ? c(t, n, r) : l(t, r);
|
|
10
14
|
}
|
|
11
15
|
function c(e, t, n) {
|
|
12
16
|
let o = e.children.map((e, t) => ({
|
|
@@ -32,35 +36,35 @@ function c(e, t, n) {
|
|
|
32
36
|
] });
|
|
33
37
|
}
|
|
34
38
|
function l(e, n) {
|
|
35
|
-
let r = u(e);
|
|
36
|
-
if (e.columnName == null &&
|
|
37
|
-
let
|
|
38
|
-
return
|
|
39
|
-
/* @__PURE__ */ i("strong", { children:
|
|
39
|
+
let { getColumnDisplayName: r, getValueDisplayName: o } = n, s = u(e, o);
|
|
40
|
+
if (e.columnName == null && s == null) return null;
|
|
41
|
+
let c = e.columnName ? r(e.columnName) : "(unset)";
|
|
42
|
+
return s == null ? /* @__PURE__ */ a("span", { children: [/* @__PURE__ */ i("strong", { children: c }), " (unset)"] }) : /* @__PURE__ */ a("span", { children: [
|
|
43
|
+
/* @__PURE__ */ i("strong", { children: c }),
|
|
40
44
|
" ",
|
|
41
45
|
t(e.op),
|
|
42
46
|
" ",
|
|
43
|
-
|
|
47
|
+
s
|
|
44
48
|
] });
|
|
45
49
|
}
|
|
46
|
-
function u(t) {
|
|
47
|
-
let {
|
|
48
|
-
switch (
|
|
50
|
+
function u(e, t) {
|
|
51
|
+
let { columnName: n, op: r, values: i, rangeMin: a, rangeMax: o, text: s } = e, c = (e) => t(n, e);
|
|
52
|
+
switch (r) {
|
|
49
53
|
case "has_value":
|
|
50
54
|
case "no_value": return "";
|
|
51
55
|
case "is_any_of":
|
|
52
|
-
case "is_all_of": return
|
|
56
|
+
case "is_all_of": return i.length === 0 ? null : i.map(c).join(", ");
|
|
53
57
|
case "equal":
|
|
54
|
-
case "not_equal": return
|
|
55
|
-
case "between": return !
|
|
58
|
+
case "not_equal": return i.length === 0 ? null : c(i[0]);
|
|
59
|
+
case "between": return !a || !o ? null : `${a} and ${o}`;
|
|
56
60
|
case "gt":
|
|
57
|
-
case "gte": return
|
|
61
|
+
case "gte": return a || null;
|
|
58
62
|
case "lt":
|
|
59
|
-
case "lte": return
|
|
63
|
+
case "lte": return o || null;
|
|
60
64
|
case "contains":
|
|
61
65
|
case "starts_with":
|
|
62
66
|
case "ends_with":
|
|
63
|
-
case "is_exactly": return
|
|
67
|
+
case "is_exactly": return s ? `"${s}"` : null;
|
|
64
68
|
default: return null;
|
|
65
69
|
}
|
|
66
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qbTreeToReadable.js","names":[],"sources":["../../../src/components/QueryBuilder/qbTreeToReadable.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { isQBGroup, QBCondition, QBGroup, QBNode } from './QueryBuilderTypes'\nimport {
|
|
1
|
+
{"version":3,"file":"qbTreeToReadable.js","names":[],"sources":["../../../src/components/QueryBuilder/qbTreeToReadable.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { isQBGroup, QBCondition, QBGroup, QBNode } from './QueryBuilderTypes'\nimport { labelForOp } from './queryBuilderMetadata'\nimport {\n QBValueDisplayNameFn,\n rawQBValueDisplayName,\n} from './useQBValueDisplayName'\n\n/**\n * Render a QB tree as a plain-English React node with the AND / OR / NOT\n * connectives styled inline. Used by the QB's Reads-As summary bar.\n *\n * Rules (per the design's plain-English summary spec):\n * - The root group reads without outer parentheses.\n * - Nested groups retain parentheses.\n * - Excluded (NOT) groups are always parenthesized and prefixed with NOT.\n * - Incomplete conditions render as `(unset)`.\n */\nexport function qbTreeToReadable(\n root: QBGroup,\n getColumnDisplayName: (columnName: string) => string = name => name,\n getValueDisplayName: QBValueDisplayNameFn = rawQBValueDisplayName,\n): ReactNode {\n const displayNames = { getColumnDisplayName, getValueDisplayName }\n const rendered = renderNode(root, true, displayNames)\n if (rendered == null) return <span>(no filters)</span>\n return rendered\n}\n\ntype DisplayNames = {\n getColumnDisplayName: (columnName: string) => string\n getValueDisplayName: QBValueDisplayNameFn\n}\n\nfunction renderNode(\n node: QBNode,\n isRoot: boolean,\n displayNames: DisplayNames,\n): ReactNode | null {\n if (isQBGroup(node)) return renderGroup(node, isRoot, displayNames)\n return renderCondition(node, displayNames)\n}\n\nfunction renderGroup(\n group: QBGroup,\n isRoot: boolean,\n displayNames: DisplayNames,\n): ReactNode | null {\n const parts = group.children\n .map((child, index) => ({\n key: child.id,\n node: renderNode(child, false, displayNames),\n index,\n }))\n .filter(part => part.node != null)\n\n if (parts.length === 0) return null\n\n const combinator = group.combinator\n const inner = parts.map((part, index) => (\n <span key={part.key}>\n {index > 0 && (\n <>\n {' '}\n <ConnectiveSpan combinator={combinator} />{' '}\n </>\n )}\n {part.node}\n </span>\n ))\n\n const body = <span>{inner}</span>\n\n if (group.not) {\n return (\n <span>\n <NotSpan /> ({body})\n </span>\n )\n }\n if (isRoot) return body\n return <span>({body})</span>\n}\n\nfunction renderCondition(\n condition: QBCondition,\n displayNames: DisplayNames,\n): ReactNode | null {\n const { getColumnDisplayName, getValueDisplayName } = displayNames\n const valueSummary = summarizeConditionValue(condition, getValueDisplayName)\n // Skip fully-blank rows so they don't clutter the summary bar. A row is\n // fully blank when the user hasn't picked a column AND hasn't entered any\n // value yet — that's an in-progress row we don't want to narrate.\n if (condition.columnName == null && valueSummary == null) return null\n const columnName = condition.columnName\n ? getColumnDisplayName(condition.columnName)\n : '(unset)'\n if (valueSummary == null) {\n return (\n <span>\n <strong>{columnName}</strong> (unset)\n </span>\n )\n }\n return (\n <span>\n <strong>{columnName}</strong> {labelForOp(condition.op)} {valueSummary}\n </span>\n )\n}\n\nfunction summarizeConditionValue(\n condition: QBCondition,\n getValueDisplayName: QBValueDisplayNameFn,\n): string | null {\n const { columnName, op, values, rangeMin, rangeMax, text } = condition\n const labelForValue = (value: string) =>\n getValueDisplayName(columnName, value)\n switch (op) {\n case 'has_value':\n case 'no_value':\n return ''\n case 'is_any_of':\n case 'is_all_of':\n return values.length === 0 ? null : values.map(labelForValue).join(', ')\n case 'equal':\n case 'not_equal':\n return values.length === 0 ? null : labelForValue(values[0])\n case 'between':\n if (!rangeMin || !rangeMax) return null\n return `${rangeMin} and ${rangeMax}`\n case 'gt':\n case 'gte':\n return rangeMin ? rangeMin : null\n case 'lt':\n case 'lte':\n return rangeMax ? rangeMax : null\n case 'contains':\n case 'starts_with':\n case 'ends_with':\n case 'is_exactly':\n return text ? `\"${text}\"` : null\n default:\n op satisfies never\n return null\n }\n}\n\nfunction ConnectiveSpan({ combinator }: { combinator: 'AND' | 'OR' }) {\n const color =\n combinator === 'OR'\n ? 'var(--synapse-warning)'\n : 'var(--synapse-primary-action-color)'\n return (\n <span style={{ color, fontWeight: 700 }} aria-hidden=\"false\">\n {combinator}\n </span>\n )\n}\n\nfunction NotSpan() {\n return (\n <span style={{ color: 'var(--synapse-error)', fontWeight: 700 }}>NOT</span>\n )\n}\n"],"mappings":";;;;;AAkBA,SAAgB,EACd,GACA,KAAuD,MAAQ,GAC/D,IAA4C,GACjC;CAIX,OAFiB,EAAW,GAAM,IAAM;EADjB;EAAsB;CACL,CACpC,KAAyB,kBAAC,QAAD,EAAA,UAAM,eAAkB,CAAA;AAEvD;AAOA,SAAS,EACP,GACA,GACA,GACkB;CAElB,OADI,EAAU,CAAI,IAAU,EAAY,GAAM,GAAQ,CAAY,IAC3D,EAAgB,GAAM,CAAY;AAC3C;AAEA,SAAS,EACP,GACA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GACvD,KAAiB,MACrB,EAAoB,GAAY,CAAK;CACvC,QAAQ,GAAR;EACE,KAAK;EACL,KAAK,YACH,OAAO;EACT,KAAK;EACL,KAAK,aACH,OAAO,EAAO,WAAW,IAAI,OAAO,EAAO,IAAI,CAAa,EAAE,KAAK,IAAI;EACzE,KAAK;EACL,KAAK,aACH,OAAO,EAAO,WAAW,IAAI,OAAO,EAAc,EAAO,EAAE;EAC7D,KAAK,WAEH,OADI,CAAC,KAAY,CAAC,IAAiB,OAC5B,GAAG,EAAS,OAAO;EAC5B,KAAK;EACL,KAAK,OACH,OAAO,KAAsB;EAC/B,KAAK;EACL,KAAK,OACH,OAAO,KAAsB;EAC/B,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,cACH,OAAO,IAAO,IAAI,EAAK,KAAK;EAC9B,SAEE,OAAO;CACX;AACF;AAEA,SAAS,EAAe,EAAE,iBAA4C;CAKpE,OACE,kBAAC,QAAD;EAAM,OAAO;GAAE,OAJf,MAAe,OACX,2BACA;GAEkB,YAAY;EAAI;EAAG,eAAY;YAClD;CACG,CAAA;AAEV;AAEA,SAAS,IAAU;CACjB,OACE,kBAAC,QAAD;EAAM,OAAO;GAAE,OAAO;GAAwB,YAAY;EAAI;YAAG;CAAS,CAAA;AAE9E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DragEndEvent, DragOverEvent } from '@dnd-kit/react';
|
|
2
|
+
import { QBGroup } from './QueryBuilderTypes';
|
|
3
|
+
/** Droppable id for a group's drop zone, kept distinct from the group's own id. */
|
|
4
|
+
export declare function groupDropZoneId(groupId: string): string;
|
|
5
|
+
/** `data` a group's drop zone carries so a drop can name its destination. */
|
|
6
|
+
export declare function groupDropZoneData(groupId: string): {
|
|
7
|
+
groupId: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The group a drop zone belongs to, or null when the drop landed on a
|
|
11
|
+
* droppable that is not one — nothing else in the tree registers a zone, so
|
|
12
|
+
* that is the signal to leave the tree alone.
|
|
13
|
+
*/
|
|
14
|
+
export declare function readGroupDropZoneTarget(data: unknown): string | null;
|
|
15
|
+
export type QueryBuilderDragHandlers = {
|
|
16
|
+
onDragStart: () => void;
|
|
17
|
+
onDragOver: (event: DragOverEvent) => void;
|
|
18
|
+
onDragEnd: (event: DragEndEvent) => void;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Drag-and-drop for the Query Builder tree, as handlers for `DragDropProvider`.
|
|
22
|
+
*
|
|
23
|
+
* Every drag means "put this node in that group": groups register the only
|
|
24
|
+
* drop zones, and a dropped node joins the group it was released over.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useQueryBuilderDrag(tree: QBGroup, onTreeChange: (next: QBGroup) => void): QueryBuilderDragHandlers;
|
|
27
|
+
//# sourceMappingURL=queryBuilderDnd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryBuilderDnd.d.ts","sourceRoot":"","sources":["../../../src/components/QueryBuilder/queryBuilderDnd.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAG5D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAE7C,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD;AAID,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM;;EAEhD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAIpE;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,UAAU,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAC1C,SAAS,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAA;CACzC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,OAAO,EACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GACpC,wBAAwB,CA+C1B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { moveNodeIntoGroup as e } from "./queryBuilderOperations.js";
|
|
2
|
+
import { useCallback as t, useMemo as n, useRef as r } from "react";
|
|
3
|
+
//#region src/components/QueryBuilder/queryBuilderDnd.ts
|
|
4
|
+
function i(e) {
|
|
5
|
+
return `${e}::dropzone`;
|
|
6
|
+
}
|
|
7
|
+
var a = "groupId";
|
|
8
|
+
function o(e) {
|
|
9
|
+
return { [a]: e };
|
|
10
|
+
}
|
|
11
|
+
function s(e) {
|
|
12
|
+
if (typeof e != "object" || !e) return null;
|
|
13
|
+
let t = e[a];
|
|
14
|
+
return typeof t == "string" ? t : null;
|
|
15
|
+
}
|
|
16
|
+
function c(i, a) {
|
|
17
|
+
let o = t((t) => {
|
|
18
|
+
let { source: n, target: r } = t;
|
|
19
|
+
if (n == null || r == null) return;
|
|
20
|
+
let o = s(r.data);
|
|
21
|
+
o != null && a(e(i, String(n.id), o));
|
|
22
|
+
}, [i, a]), c = r(null), l = t(() => {
|
|
23
|
+
c.current = i;
|
|
24
|
+
}, [i]), u = t((e) => o(e.operation), [o]), d = t((e) => {
|
|
25
|
+
let t = c.current;
|
|
26
|
+
c.current = null, e.operation.canceled && t != null && a(t);
|
|
27
|
+
}, [a]);
|
|
28
|
+
return n(() => ({
|
|
29
|
+
onDragStart: l,
|
|
30
|
+
onDragOver: u,
|
|
31
|
+
onDragEnd: d
|
|
32
|
+
}), [
|
|
33
|
+
l,
|
|
34
|
+
u,
|
|
35
|
+
d
|
|
36
|
+
]);
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { o as groupDropZoneData, i as groupDropZoneId, s as readGroupDropZoneTarget, c as useQueryBuilderDrag };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=queryBuilderDnd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryBuilderDnd.js","names":[],"sources":["../../../src/components/QueryBuilder/queryBuilderDnd.ts"],"sourcesContent":["import { DragEndEvent, DragOverEvent } from '@dnd-kit/react'\nimport { useCallback, useMemo, useRef } from 'react'\nimport { moveNodeIntoGroup } from './queryBuilderOperations'\nimport { QBGroup } from './QueryBuilderTypes'\n\n/** Droppable id for a group's drop zone, kept distinct from the group's own id. */\nexport function groupDropZoneId(groupId: string): string {\n return `${groupId}::dropzone`\n}\n\nconst GROUP_ID_KEY = 'groupId'\n\n/** `data` a group's drop zone carries so a drop can name its destination. */\nexport function groupDropZoneData(groupId: string) {\n return { [GROUP_ID_KEY]: groupId }\n}\n\n/**\n * The group a drop zone belongs to, or null when the drop landed on a\n * droppable that is not one — nothing else in the tree registers a zone, so\n * that is the signal to leave the tree alone.\n */\nexport function readGroupDropZoneTarget(data: unknown): string | null {\n if (data == null || typeof data !== 'object') return null\n const groupId: unknown = (data as Record<string, unknown>)[GROUP_ID_KEY]\n return typeof groupId === 'string' ? groupId : null\n}\n\nexport type QueryBuilderDragHandlers = {\n onDragStart: () => void\n onDragOver: (event: DragOverEvent) => void\n onDragEnd: (event: DragEndEvent) => void\n}\n\n/**\n * Drag-and-drop for the Query Builder tree, as handlers for `DragDropProvider`.\n *\n * Every drag means \"put this node in that group\": groups register the only\n * drop zones, and a dropped node joins the group it was released over.\n */\nexport function useQueryBuilderDrag(\n tree: QBGroup,\n onTreeChange: (next: QBGroup) => void,\n): QueryBuilderDragHandlers {\n const dropIntoHoveredGroup = useCallback(\n (operation: DragOverEvent['operation']) => {\n const { source, target } = operation\n if (source == null || target == null) return\n const groupId = readGroupDropZoneTarget(target.data)\n if (groupId == null) return\n onTreeChange(moveNodeIntoGroup(tree, String(source.id), groupId))\n },\n [tree, onTreeChange],\n )\n\n // The tree as it stood before the in-flight drag. `onDragOver` rewrites the\n // tree as the pointer moves, so this snapshot is the only way back if the\n // gesture is canceled — dnd-kit reverts its own state, never ours.\n const treeBeforeDrag = useRef<QBGroup | null>(null)\n\n const onDragStart = useCallback(() => {\n treeBeforeDrag.current = tree\n }, [tree])\n\n // Moving the node as the pointer crosses into a group is what keeps React\n // state and the DOM in step within the gesture, which is the contract\n // dnd-kit's sortables expect: rows animate to their new positions, and any\n // optimistic sorting stands down on seeing the indices already updated\n // rather than reordering the DOM behind React's back.\n const onDragOver = useCallback(\n (event: DragOverEvent) => dropIntoHoveredGroup(event.operation),\n [dropIntoHoveredGroup],\n )\n\n // The destination depends only on which group is under the pointer, and\n // `dragover` already fired for that group, so a release has nothing left to\n // apply — the tree already shows the result.\n const onDragEnd = useCallback(\n (event: DragEndEvent) => {\n const snapshot = treeBeforeDrag.current\n treeBeforeDrag.current = null\n if (event.operation.canceled && snapshot != null) onTreeChange(snapshot)\n },\n [onTreeChange],\n )\n\n return useMemo(\n () => ({ onDragStart, onDragOver, onDragEnd }),\n [onDragStart, onDragOver, onDragEnd],\n )\n}\n"],"mappings":";;;AAMA,SAAgB,EAAgB,GAAyB;CACvD,OAAO,GAAG,EAAQ;AACpB;AAEA,IAAM,IAAe;AAGrB,SAAgB,EAAkB,GAAiB;CACjD,OAAO,GAAG,IAAe,EAAQ;AACnC;AAOA,SAAgB,EAAwB,GAA8B;CACpE,IAAoB,OAAO,KAAS,aAAhC,GAA0C,OAAO;CACrD,IAAM,IAAoB,EAAiC;CAC3D,OAAO,OAAO,KAAY,WAAW,IAAU;AACjD;AAcA,SAAgB,EACd,GACA,GAC0B;CAC1B,IAAM,IAAuB,GAC1B,MAA0C;EACzC,IAAM,EAAE,WAAQ,cAAW;EAC3B,IAAI,KAAU,QAAQ,KAAU,MAAM;EACtC,IAAM,IAAU,EAAwB,EAAO,IAAI;EAC/C,KAAW,QACf,EAAa,EAAkB,GAAM,OAAO,EAAO,EAAE,GAAG,CAAO,CAAC;CAClE,GACA,CAAC,GAAM,CAAY,CACrB,GAKM,IAAiB,EAAuB,IAAI,GAE5C,IAAc,QAAkB;EACpC,EAAe,UAAU;CAC3B,GAAG,CAAC,CAAI,CAAC,GAOH,IAAa,GAChB,MAAyB,EAAqB,EAAM,SAAS,GAC9D,CAAC,CAAoB,CACvB,GAKM,IAAY,GACf,MAAwB;EACvB,IAAM,IAAW,EAAe;EAEhC,AADA,EAAe,UAAU,MACrB,EAAM,UAAU,YAAY,KAAY,QAAM,EAAa,CAAQ;CACzE,GACA,CAAC,CAAY,CACf;CAEA,OAAO,SACE;EAAE;EAAa;EAAY;CAAU,IAC5C;EAAC;EAAa;EAAY;CAAS,CACrC;AACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._dragHandle_p23fj_1{cursor:grab;color:var(--synapse-gray-deemphasized)}._dragSource_p23fj_6{opacity:var(--synapse-drag-source-opacity)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryBuilderDrag.module.js","names":[],"sources":["../../../src/components/QueryBuilder/queryBuilderDrag.module.scss"],"sourcesContent":["// Styles shared by both draggable node types in the tree.\n\n.dragHandle {\n cursor: grab;\n color: var(--synapse-gray-deemphasized);\n}\n\n// The node the pointer is carrying. It stays in the tree and moves between\n// groups as the drag goes, so it is dimmed to read as in-flight.\n.dragSource {\n opacity: var(--synapse-drag-source-opacity);\n}\n"],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Styles shared by both draggable node types in the tree.
|
|
2
|
+
|
|
3
|
+
.dragHandle {
|
|
4
|
+
cursor: grab;
|
|
5
|
+
color: var(--synapse-gray-deemphasized);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// The node the pointer is carrying. It stays in the tree and moves between
|
|
9
|
+
// groups as the drag goes, so it is dimmed to read as in-flight.
|
|
10
|
+
.dragSource {
|
|
11
|
+
opacity: var(--synapse-drag-source-opacity);
|
|
12
|
+
}
|