@itwin/reports-config-widget-react 0.5.0 → 0.7.0
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/CHANGELOG.json +76 -1
- package/CHANGELOG.md +27 -2
- package/LICENSE.md +9 -9
- package/README.md +38 -38
- package/__mocks__/fileMock.js +4 -4
- package/api/reports-config-widget-react.api.md +126 -0
- package/api/reports-config-widget-react.exports.csv +14 -0
- package/api/temp/reports-config-widget-react.api.md +126 -0
- package/coverage/clover.xml +521 -521
- package/coverage/coverage-final.json +32 -32
- package/coverage/lcov-report/index.html +31 -31
- package/coverage/lcov-report/src/ReportsConfigWidget.ts.html +15 -15
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/test/index.html +11 -11
- package/coverage/lcov-report/src/test/test-utils.tsx.html +46 -16
- package/coverage/lcov-report/src/widget/ReportsConfigUiProvider.tsx.html +29 -86
- package/coverage/lcov-report/src/widget/components/ActionPanel.tsx.html +5 -38
- package/coverage/lcov-report/src/widget/components/AddMappingsModal.tsx.html +25 -121
- package/coverage/lcov-report/src/widget/components/BulkExtractor.ts.html +120 -96
- package/coverage/lcov-report/src/widget/components/Constants.ts.html +5 -5
- package/coverage/lcov-report/src/widget/components/DeleteModal.tsx.html +13 -103
- package/coverage/lcov-report/src/widget/components/ExtractionStates/FailedExtractionState.tsx.html +6 -21
- package/coverage/lcov-report/src/widget/components/ExtractionStates/QueuedExtractionState.tsx.html +6 -21
- package/coverage/lcov-report/src/widget/components/ExtractionStates/RunningExtractionState.tsx.html +7 -22
- package/coverage/lcov-report/src/widget/components/ExtractionStates/StartingExtractionState.tsx.html +7 -28
- package/coverage/lcov-report/src/widget/components/ExtractionStates/SucceededExtractionState.tsx.html +6 -21
- package/coverage/lcov-report/src/widget/components/ExtractionStates/index.html +1 -1
- package/coverage/lcov-report/src/widget/components/ExtractionStatus.tsx.html +20 -47
- package/coverage/lcov-report/src/widget/components/ExtractionToast.tsx.html +20 -11
- package/coverage/lcov-report/src/widget/components/HorizontalTile.tsx.html +16 -79
- package/coverage/lcov-report/src/widget/components/LocalizedTablePaginator.tsx.html +15 -108
- package/coverage/lcov-report/src/widget/components/ReportAction.tsx.html +36 -75
- package/coverage/lcov-report/src/widget/components/ReportHorizontalTile.tsx.html +62 -92
- package/coverage/lcov-report/src/widget/components/ReportMappingHorizontalTile.tsx.html +104 -128
- package/coverage/lcov-report/src/widget/components/ReportMappings.tsx.html +88 -301
- package/coverage/lcov-report/src/widget/components/Reports.tsx.html +42 -204
- package/coverage/lcov-report/src/widget/components/ReportsConfigContext.tsx.html +164 -50
- package/coverage/lcov-report/src/widget/components/ReportsContainer.tsx.html +15 -63
- package/coverage/lcov-report/src/widget/components/ReportsHeader.tsx.html +8 -47
- package/coverage/lcov-report/src/widget/components/ReportsRouter.tsx.html +6 -12
- package/coverage/lcov-report/src/widget/components/SearchBar.tsx.html +13 -25
- package/coverage/lcov-report/src/widget/components/SelectIModel.tsx.html +11 -56
- package/coverage/lcov-report/src/widget/components/index.html +50 -50
- package/coverage/lcov-report/src/widget/components/utils.tsx.html +25 -169
- package/coverage/lcov-report/src/widget/context/BulkExtractorContext.tsx.html +6 -12
- package/coverage/lcov-report/src/widget/context/ReportsConfigApiContext.tsx.html +10 -13
- package/coverage/lcov-report/src/widget/context/index.html +1 -1
- package/coverage/lcov-report/src/widget/hooks/index.html +1 -1
- package/coverage/lcov-report/src/widget/hooks/useValidator.ts.html +12 -54
- package/coverage/lcov-report/src/widget/index.html +13 -13
- package/coverage/lcov.info +941 -919
- package/jest.config.js +14 -17
- package/lib/cjs/ReportsConfigWidget.d.ts +4 -0
- package/lib/cjs/ReportsConfigWidget.d.ts.map +1 -1
- package/lib/cjs/ReportsConfigWidget.js +4 -0
- package/lib/cjs/ReportsConfigWidget.js.map +1 -1
- package/lib/cjs/reports-config-widget-react.d.ts +1 -0
- package/lib/cjs/reports-config-widget-react.d.ts.map +1 -1
- package/lib/cjs/reports-config-widget-react.js +4 -3
- package/lib/cjs/reports-config-widget-react.js.map +1 -1
- package/lib/cjs/test/AddMappingModal.test.js +11 -10
- package/lib/cjs/test/AddMappingModal.test.js.map +1 -1
- package/lib/cjs/test/BulkExtractor.test.js +68 -43
- package/lib/cjs/test/BulkExtractor.test.js.map +1 -1
- package/lib/cjs/test/DeleteModal.test.js +3 -3
- package/lib/cjs/test/DeleteModal.test.js.map +1 -1
- package/lib/cjs/test/ReportAction.test.js +6 -4
- package/lib/cjs/test/ReportAction.test.js.map +1 -1
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js +64 -25
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js.map +1 -1
- package/lib/cjs/test/ReportMappings.test.js +39 -18
- package/lib/cjs/test/ReportMappings.test.js.map +1 -1
- package/lib/cjs/test/Reports.test.js +3 -3
- package/lib/cjs/test/Reports.test.js.map +1 -1
- package/lib/cjs/test/WidgetHeader.test.js +3 -3
- package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
- package/lib/cjs/test/test-utils.d.ts +8 -0
- package/lib/cjs/test/test-utils.d.ts.map +1 -1
- package/lib/cjs/test/test-utils.js +16 -4
- package/lib/cjs/test/test-utils.js.map +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/widget/ReportsConfigUiProvider.d.ts +10 -4
- package/lib/cjs/widget/ReportsConfigUiProvider.d.ts.map +1 -1
- package/lib/cjs/widget/ReportsConfigUiProvider.js +11 -7
- package/lib/cjs/widget/ReportsConfigUiProvider.js.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.js.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.d.ts +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.js +7 -7
- package/lib/cjs/widget/components/AddMappingsModal.js.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.scss +1 -1
- package/lib/cjs/widget/components/BulkExtractor.d.ts +8 -5
- package/lib/cjs/widget/components/BulkExtractor.d.ts.map +1 -1
- package/lib/cjs/widget/components/BulkExtractor.js +52 -35
- package/lib/cjs/widget/components/BulkExtractor.js.map +1 -1
- package/lib/cjs/widget/components/Constants.d.ts.map +1 -1
- package/lib/cjs/widget/components/Constants.js +3 -3
- package/lib/cjs/widget/components/Constants.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.d.ts +1 -1
- package/lib/cjs/widget/components/DeleteModal.d.ts.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.js +5 -5
- package/lib/cjs/widget/components/DeleteModal.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.scss +2 -2
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.js +3 -3
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStatus.d.ts +1 -1
- package/lib/cjs/widget/components/ExtractionStatus.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionStatus.js +9 -9
- package/lib/cjs/widget/components/ExtractionStatus.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStatus.scss +1 -1
- package/lib/cjs/widget/components/ExtractionToast.d.ts.map +1 -1
- package/lib/cjs/widget/components/ExtractionToast.js +3 -3
- package/lib/cjs/widget/components/ExtractionToast.js.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.js +1 -2
- package/lib/cjs/widget/components/HorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.scss +1 -4
- package/lib/cjs/widget/components/LocalizedTablePaginator.d.ts.map +1 -1
- package/lib/cjs/widget/components/LocalizedTablePaginator.js +1 -1
- package/lib/cjs/widget/components/LocalizedTablePaginator.js.map +1 -1
- package/lib/cjs/widget/components/ReportAction.d.ts +8 -0
- package/lib/cjs/widget/components/ReportAction.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportAction.js +9 -7
- package/lib/cjs/widget/components/ReportAction.js.map +1 -1
- package/lib/cjs/widget/components/ReportAction.scss +1 -1
- package/lib/cjs/widget/components/ReportHorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportHorizontalTile.js +4 -4
- package/lib/cjs/widget/components/ReportHorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js +46 -45
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.d.ts +8 -0
- package/lib/cjs/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.js +25 -11
- package/lib/cjs/widget/components/ReportMappings.js.map +1 -1
- package/lib/cjs/widget/components/Reports.d.ts +9 -1
- package/lib/cjs/widget/components/Reports.d.ts.map +1 -1
- package/lib/cjs/widget/components/Reports.js +7 -8
- package/lib/cjs/widget/components/Reports.js.map +1 -1
- package/lib/cjs/widget/components/Reports.scss +0 -1
- package/lib/cjs/widget/components/ReportsConfigContext.d.ts +34 -4
- package/lib/cjs/widget/components/ReportsConfigContext.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsConfigContext.js +27 -9
- package/lib/cjs/widget/components/ReportsConfigContext.js.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.d.ts +3 -6
- package/lib/cjs/widget/components/ReportsContainer.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.js +7 -5
- package/lib/cjs/widget/components/ReportsContainer.js.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.scss +1 -1
- package/lib/cjs/widget/components/ReportsHeader.d.ts +1 -1
- package/lib/cjs/widget/components/ReportsHeader.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsHeader.js +6 -7
- package/lib/cjs/widget/components/ReportsHeader.js.map +1 -1
- package/lib/cjs/widget/components/ReportsRouter.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsRouter.js +3 -3
- package/lib/cjs/widget/components/ReportsRouter.js.map +1 -1
- package/lib/cjs/widget/components/SearchBar.d.ts +1 -1
- package/lib/cjs/widget/components/SearchBar.d.ts.map +1 -1
- package/lib/cjs/widget/components/SearchBar.js +4 -4
- package/lib/cjs/widget/components/SearchBar.js.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.d.ts +1 -1
- package/lib/cjs/widget/components/SelectIModel.d.ts.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.js +1 -1
- package/lib/cjs/widget/components/SelectIModel.js.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.scss +1 -1
- package/lib/cjs/widget/components/utils.d.ts +1 -1
- package/lib/cjs/widget/components/utils.d.ts.map +1 -1
- package/lib/cjs/widget/components/utils.js +5 -5
- package/lib/cjs/widget/components/utils.js.map +1 -1
- package/lib/cjs/widget/components/utils.scss +1 -1
- package/lib/cjs/widget/context/BulkExtractorContext.d.ts.map +1 -1
- package/lib/cjs/widget/context/BulkExtractorContext.js.map +1 -1
- package/lib/cjs/widget/context/ReportsConfigApiContext.d.ts +3 -3
- package/lib/cjs/widget/context/ReportsConfigApiContext.d.ts.map +1 -1
- package/lib/cjs/widget/context/ReportsConfigApiContext.js.map +1 -1
- package/lib/cjs/widget/hooks/useValidator.d.ts +1 -4
- package/lib/cjs/widget/hooks/useValidator.d.ts.map +1 -1
- package/lib/cjs/widget/hooks/useValidator.js +3 -3
- package/lib/cjs/widget/hooks/useValidator.js.map +1 -1
- package/lib/esm/ReportsConfigWidget.d.ts +4 -0
- package/lib/esm/ReportsConfigWidget.d.ts.map +1 -1
- package/lib/esm/ReportsConfigWidget.js +4 -0
- package/lib/esm/ReportsConfigWidget.js.map +1 -1
- package/lib/esm/reports-config-widget-react.d.ts +1 -0
- package/lib/esm/reports-config-widget-react.d.ts.map +1 -1
- package/lib/esm/reports-config-widget-react.js +4 -3
- package/lib/esm/reports-config-widget-react.js.map +1 -1
- package/lib/esm/test/AddMappingModal.test.js +12 -11
- package/lib/esm/test/AddMappingModal.test.js.map +1 -1
- package/lib/esm/test/BulkExtractor.test.js +69 -44
- package/lib/esm/test/BulkExtractor.test.js.map +1 -1
- package/lib/esm/test/DeleteModal.test.js +4 -4
- package/lib/esm/test/DeleteModal.test.js.map +1 -1
- package/lib/esm/test/ReportAction.test.js +7 -5
- package/lib/esm/test/ReportAction.test.js.map +1 -1
- package/lib/esm/test/ReportMappingHorizontalTile.test.js +65 -26
- package/lib/esm/test/ReportMappingHorizontalTile.test.js.map +1 -1
- package/lib/esm/test/ReportMappings.test.js +41 -20
- package/lib/esm/test/ReportMappings.test.js.map +1 -1
- package/lib/esm/test/Reports.test.js +4 -4
- package/lib/esm/test/Reports.test.js.map +1 -1
- package/lib/esm/test/WidgetHeader.test.js +3 -3
- package/lib/esm/test/WidgetHeader.test.js.map +1 -1
- package/lib/esm/test/test-utils.d.ts +8 -0
- package/lib/esm/test/test-utils.d.ts.map +1 -1
- package/lib/esm/test/test-utils.js +15 -3
- package/lib/esm/test/test-utils.js.map +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/widget/ReportsConfigUiProvider.d.ts +10 -4
- package/lib/esm/widget/ReportsConfigUiProvider.d.ts.map +1 -1
- package/lib/esm/widget/ReportsConfigUiProvider.js +12 -8
- package/lib/esm/widget/ReportsConfigUiProvider.js.map +1 -1
- package/lib/esm/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/esm/widget/components/ActionPanel.js.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.d.ts +1 -1
- package/lib/esm/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.js +7 -7
- package/lib/esm/widget/components/AddMappingsModal.js.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.scss +1 -1
- package/lib/esm/widget/components/BulkExtractor.d.ts +8 -5
- package/lib/esm/widget/components/BulkExtractor.d.ts.map +1 -1
- package/lib/esm/widget/components/BulkExtractor.js +53 -36
- package/lib/esm/widget/components/BulkExtractor.js.map +1 -1
- package/lib/esm/widget/components/Constants.d.ts.map +1 -1
- package/lib/esm/widget/components/Constants.js +3 -3
- package/lib/esm/widget/components/Constants.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.d.ts +1 -1
- package/lib/esm/widget/components/DeleteModal.d.ts.map +1 -1
- package/lib/esm/widget/components/DeleteModal.js +6 -6
- package/lib/esm/widget/components/DeleteModal.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.scss +2 -2
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.js +3 -3
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStatus.d.ts +1 -1
- package/lib/esm/widget/components/ExtractionStatus.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionStatus.js +9 -9
- package/lib/esm/widget/components/ExtractionStatus.js.map +1 -1
- package/lib/esm/widget/components/ExtractionStatus.scss +1 -1
- package/lib/esm/widget/components/ExtractionToast.d.ts.map +1 -1
- package/lib/esm/widget/components/ExtractionToast.js +3 -3
- package/lib/esm/widget/components/ExtractionToast.js.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.js +1 -2
- package/lib/esm/widget/components/HorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.scss +1 -4
- package/lib/esm/widget/components/LocalizedTablePaginator.d.ts.map +1 -1
- package/lib/esm/widget/components/LocalizedTablePaginator.js +1 -1
- package/lib/esm/widget/components/LocalizedTablePaginator.js.map +1 -1
- package/lib/esm/widget/components/ReportAction.d.ts +8 -0
- package/lib/esm/widget/components/ReportAction.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportAction.js +10 -8
- package/lib/esm/widget/components/ReportAction.js.map +1 -1
- package/lib/esm/widget/components/ReportAction.scss +1 -1
- package/lib/esm/widget/components/ReportHorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportHorizontalTile.js +6 -6
- package/lib/esm/widget/components/ReportHorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js +47 -46
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/ReportMappings.d.ts +8 -0
- package/lib/esm/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportMappings.js +28 -14
- package/lib/esm/widget/components/ReportMappings.js.map +1 -1
- package/lib/esm/widget/components/Reports.d.ts +9 -1
- package/lib/esm/widget/components/Reports.d.ts.map +1 -1
- package/lib/esm/widget/components/Reports.js +8 -9
- package/lib/esm/widget/components/Reports.js.map +1 -1
- package/lib/esm/widget/components/Reports.scss +0 -1
- package/lib/esm/widget/components/ReportsConfigContext.d.ts +34 -4
- package/lib/esm/widget/components/ReportsConfigContext.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsConfigContext.js +28 -10
- package/lib/esm/widget/components/ReportsConfigContext.js.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.d.ts +3 -6
- package/lib/esm/widget/components/ReportsContainer.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.js +7 -5
- package/lib/esm/widget/components/ReportsContainer.js.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.scss +1 -1
- package/lib/esm/widget/components/ReportsHeader.d.ts +1 -1
- package/lib/esm/widget/components/ReportsHeader.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsHeader.js +6 -7
- package/lib/esm/widget/components/ReportsHeader.js.map +1 -1
- package/lib/esm/widget/components/ReportsRouter.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsRouter.js +3 -3
- package/lib/esm/widget/components/ReportsRouter.js.map +1 -1
- package/lib/esm/widget/components/SearchBar.d.ts +1 -1
- package/lib/esm/widget/components/SearchBar.d.ts.map +1 -1
- package/lib/esm/widget/components/SearchBar.js +4 -4
- package/lib/esm/widget/components/SearchBar.js.map +1 -1
- package/lib/esm/widget/components/SelectIModel.d.ts +1 -1
- package/lib/esm/widget/components/SelectIModel.d.ts.map +1 -1
- package/lib/esm/widget/components/SelectIModel.js +2 -2
- package/lib/esm/widget/components/SelectIModel.js.map +1 -1
- package/lib/esm/widget/components/SelectIModel.scss +1 -1
- package/lib/esm/widget/components/utils.d.ts +1 -1
- package/lib/esm/widget/components/utils.d.ts.map +1 -1
- package/lib/esm/widget/components/utils.js +6 -6
- package/lib/esm/widget/components/utils.js.map +1 -1
- package/lib/esm/widget/components/utils.scss +1 -1
- package/lib/esm/widget/context/BulkExtractorContext.d.ts.map +1 -1
- package/lib/esm/widget/context/BulkExtractorContext.js.map +1 -1
- package/lib/esm/widget/context/ReportsConfigApiContext.d.ts +3 -3
- package/lib/esm/widget/context/ReportsConfigApiContext.d.ts.map +1 -1
- package/lib/esm/widget/context/ReportsConfigApiContext.js.map +1 -1
- package/lib/esm/widget/hooks/useValidator.d.ts +1 -4
- package/lib/esm/widget/hooks/useValidator.d.ts.map +1 -1
- package/lib/esm/widget/hooks/useValidator.js +3 -3
- package/lib/esm/widget/hooks/useValidator.js.map +1 -1
- package/package.json +9 -4
- package/src/ReportsConfigWidget.ts +9 -9
- package/src/reports-config-widget-react.ts +4 -3
- package/src/test/AddMappingModal.test.tsx +45 -70
- package/src/test/BulkExtractor.test.ts +73 -118
- package/src/test/DeleteModal.test.tsx +6 -23
- package/src/test/ReportAction.test.tsx +20 -38
- package/src/test/ReportMappingHorizontalTile.test.tsx +137 -106
- package/src/test/ReportMappings.test.tsx +73 -88
- package/src/test/Reports.test.tsx +30 -64
- package/src/test/WidgetHeader.test.tsx +3 -3
- package/src/test/test-utils.tsx +18 -8
- package/src/widget/ReportsConfigUiProvider.tsx +18 -37
- package/src/widget/components/ActionPanel.tsx +3 -14
- package/src/widget/components/AddMappingsModal.scss +1 -1
- package/src/widget/components/AddMappingsModal.tsx +21 -53
- package/src/widget/components/BulkExtractor.ts +67 -59
- package/src/widget/components/Constants.ts +4 -4
- package/src/widget/components/DeleteModal.scss +2 -2
- package/src/widget/components/DeleteModal.tsx +11 -41
- package/src/widget/components/ExtractionStates/FailedExtractionState.tsx +4 -9
- package/src/widget/components/ExtractionStates/QueuedExtractionState.tsx +4 -9
- package/src/widget/components/ExtractionStates/RunningExtractionState.tsx +4 -9
- package/src/widget/components/ExtractionStates/StartingExtractionState.tsx +4 -11
- package/src/widget/components/ExtractionStates/SucceededExtractionState.tsx +4 -9
- package/src/widget/components/ExtractionStatus.scss +1 -1
- package/src/widget/components/ExtractionStatus.tsx +9 -18
- package/src/widget/components/ExtractionToast.tsx +12 -9
- package/src/widget/components/HorizontalTile.scss +1 -4
- package/src/widget/components/HorizontalTile.tsx +12 -33
- package/src/widget/components/LocalizedTablePaginator.tsx +13 -44
- package/src/widget/components/ReportAction.scss +1 -1
- package/src/widget/components/ReportAction.tsx +26 -39
- package/src/widget/components/ReportHorizontalTile.tsx +45 -55
- package/src/widget/components/ReportMappingHorizontalTile.tsx +70 -78
- package/src/widget/components/ReportMappings.tsx +61 -132
- package/src/widget/components/Reports.scss +0 -1
- package/src/widget/components/Reports.tsx +30 -84
- package/src/widget/components/ReportsConfigContext.tsx +70 -32
- package/src/widget/components/ReportsContainer.scss +1 -1
- package/src/widget/components/ReportsContainer.tsx +12 -28
- package/src/widget/components/ReportsHeader.tsx +6 -19
- package/src/widget/components/ReportsRouter.tsx +4 -6
- package/src/widget/components/SearchBar.tsx +9 -13
- package/src/widget/components/SelectIModel.scss +1 -1
- package/src/widget/components/SelectIModel.tsx +9 -24
- package/src/widget/components/utils.scss +1 -1
- package/src/widget/components/utils.tsx +21 -69
- package/src/widget/context/BulkExtractorContext.tsx +4 -6
- package/src/widget/context/ReportsConfigApiContext.tsx +7 -8
- package/src/widget/hooks/useValidator.ts +10 -24
- package/tsconfig.json +11 -11
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">93.45% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>100/107</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">91.3% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>21/23</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>21/21</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">93.
|
|
47
|
+
<span class="strong">93.81% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>91/97</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -256,12 +256,19 @@
|
|
|
256
256
|
<a name='L191'></a><a href='#L191'>191</a>
|
|
257
257
|
<a name='L192'></a><a href='#L192'>192</a>
|
|
258
258
|
<a name='L193'></a><a href='#L193'>193</a>
|
|
259
|
-
<a name='L194'></a><a href='#L194'>194</a
|
|
259
|
+
<a name='L194'></a><a href='#L194'>194</a>
|
|
260
|
+
<a name='L195'></a><a href='#L195'>195</a>
|
|
261
|
+
<a name='L196'></a><a href='#L196'>196</a>
|
|
262
|
+
<a name='L197'></a><a href='#L197'>197</a>
|
|
263
|
+
<a name='L198'></a><a href='#L198'>198</a>
|
|
264
|
+
<a name='L199'></a><a href='#L199'>199</a>
|
|
265
|
+
<a name='L200'></a><a href='#L200'>200</a>
|
|
266
|
+
<a name='L201'></a><a href='#L201'>201</a>
|
|
267
|
+
<a name='L202'></a><a href='#L202'>202</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
260
268
|
<span class="cline-any cline-neutral"> </span>
|
|
261
269
|
<span class="cline-any cline-neutral"> </span>
|
|
262
270
|
<span class="cline-any cline-neutral"> </span>
|
|
263
271
|
<span class="cline-any cline-yes">8x</span>
|
|
264
|
-
<span class="cline-any cline-neutral"> </span>
|
|
265
272
|
<span class="cline-any cline-yes">8x</span>
|
|
266
273
|
<span class="cline-any cline-yes">8x</span>
|
|
267
274
|
<span class="cline-any cline-yes">8x</span>
|
|
@@ -273,11 +280,14 @@
|
|
|
273
280
|
<span class="cline-any cline-neutral"> </span>
|
|
274
281
|
<span class="cline-any cline-neutral"> </span>
|
|
275
282
|
<span class="cline-any cline-neutral"> </span>
|
|
276
|
-
<span class="cline-any cline-yes">8x</span>
|
|
277
283
|
<span class="cline-any cline-neutral"> </span>
|
|
278
284
|
<span class="cline-any cline-neutral"> </span>
|
|
279
285
|
<span class="cline-any cline-neutral"> </span>
|
|
280
286
|
<span class="cline-any cline-neutral"> </span>
|
|
287
|
+
<span class="cline-any cline-yes">8x</span>
|
|
288
|
+
<span class="cline-any cline-neutral"> </span>
|
|
289
|
+
<span class="cline-any cline-neutral"> </span>
|
|
290
|
+
<span class="cline-any cline-neutral"> </span>
|
|
281
291
|
<span class="cline-any cline-yes">68x</span>
|
|
282
292
|
<span class="cline-any cline-yes">68x</span>
|
|
283
293
|
<span class="cline-any cline-yes">68x</span>
|
|
@@ -304,11 +314,11 @@
|
|
|
304
314
|
<span class="cline-any cline-neutral"> </span>
|
|
305
315
|
<span class="cline-any cline-neutral"> </span>
|
|
306
316
|
<span class="cline-any cline-yes">17x</span>
|
|
307
|
-
<span class="cline-any cline-yes">
|
|
308
|
-
<span class="cline-any cline-yes">
|
|
309
|
-
<span class="cline-any cline-yes">
|
|
317
|
+
<span class="cline-any cline-yes">21x</span>
|
|
318
|
+
<span class="cline-any cline-yes">21x</span>
|
|
319
|
+
<span class="cline-any cline-yes">5x</span>
|
|
310
320
|
<span class="cline-any cline-neutral"> </span>
|
|
311
|
-
<span class="cline-any cline-yes">
|
|
321
|
+
<span class="cline-any cline-yes">21x</span>
|
|
312
322
|
<span class="cline-any cline-neutral"> </span>
|
|
313
323
|
<span class="cline-any cline-neutral"> </span>
|
|
314
324
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -353,25 +363,21 @@
|
|
|
353
363
|
<span class="cline-any cline-neutral"> </span>
|
|
354
364
|
<span class="cline-any cline-neutral"> </span>
|
|
355
365
|
<span class="cline-any cline-yes">15x</span>
|
|
356
|
-
<span class="cline-any cline-yes">2x</span>
|
|
357
366
|
<span class="cline-any cline-neutral"> </span>
|
|
358
367
|
<span class="cline-any cline-yes">13x</span>
|
|
359
|
-
<span class="cline-any cline-yes">5x</span>
|
|
360
368
|
<span class="cline-any cline-neutral"> </span>
|
|
361
369
|
<span class="cline-any cline-yes">8x</span>
|
|
362
|
-
<span class="cline-any cline-yes">6x</span>
|
|
363
370
|
<span class="cline-any cline-neutral"> </span>
|
|
364
371
|
<span class="cline-any cline-yes">2x</span>
|
|
365
|
-
<span class="cline-any cline-yes">2x</span>
|
|
366
372
|
<span class="cline-any cline-neutral"> </span>
|
|
367
373
|
<span class="cline-any cline-no"> </span>
|
|
368
374
|
<span class="cline-any cline-neutral"> </span>
|
|
369
375
|
<span class="cline-any cline-neutral"> </span>
|
|
370
376
|
<span class="cline-any cline-neutral"> </span>
|
|
371
|
-
<span class="cline-any cline-yes">
|
|
372
|
-
<span class="cline-any cline-yes">
|
|
373
|
-
<span class="cline-any cline-yes">
|
|
374
|
-
<span class="cline-any cline-yes">
|
|
377
|
+
<span class="cline-any cline-yes">21x</span>
|
|
378
|
+
<span class="cline-any cline-yes">21x</span>
|
|
379
|
+
<span class="cline-any cline-yes">21x</span>
|
|
380
|
+
<span class="cline-any cline-yes">21x</span>
|
|
375
381
|
<span class="cline-any cline-neutral"> </span>
|
|
376
382
|
<span class="cline-any cline-no"> </span>
|
|
377
383
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -379,7 +385,7 @@
|
|
|
379
385
|
<span class="cline-any cline-neutral"> </span>
|
|
380
386
|
<span class="cline-any cline-neutral"> </span>
|
|
381
387
|
<span class="cline-any cline-neutral"> </span>
|
|
382
|
-
<span class="cline-any cline-yes">
|
|
388
|
+
<span class="cline-any cline-yes">24x</span>
|
|
383
389
|
<span class="cline-any cline-yes">13x</span>
|
|
384
390
|
<span class="cline-any cline-yes">13x</span>
|
|
385
391
|
<span class="cline-any cline-yes">8x</span>
|
|
@@ -396,24 +402,29 @@
|
|
|
396
402
|
<span class="cline-any cline-yes">5x</span>
|
|
397
403
|
<span class="cline-any cline-yes">5x</span>
|
|
398
404
|
<span class="cline-any cline-yes">5x</span>
|
|
405
|
+
<span class="cline-any cline-yes">8x</span>
|
|
399
406
|
<span class="cline-any cline-yes">5x</span>
|
|
400
407
|
<span class="cline-any cline-yes">5x</span>
|
|
408
|
+
<span class="cline-any cline-yes">8x</span>
|
|
409
|
+
<span class="cline-any cline-yes">8x</span>
|
|
410
|
+
<span class="cline-any cline-neutral"> </span>
|
|
401
411
|
<span class="cline-any cline-neutral"> </span>
|
|
402
|
-
<span class="cline-any cline-yes">5x</span>
|
|
403
412
|
<span class="cline-any cline-neutral"> </span>
|
|
404
413
|
<span class="cline-any cline-yes">5x</span>
|
|
405
|
-
<span class="cline-any cline-yes">
|
|
414
|
+
<span class="cline-any cline-yes">8x</span>
|
|
415
|
+
<span class="cline-any cline-yes">8x</span>
|
|
406
416
|
<span class="cline-any cline-neutral"> </span>
|
|
407
417
|
<span class="cline-any cline-neutral"> </span>
|
|
408
418
|
<span class="cline-any cline-neutral"> </span>
|
|
409
419
|
<span class="cline-any cline-neutral"> </span>
|
|
410
|
-
<span class="cline-any cline-yes">
|
|
411
|
-
<span class="cline-any cline-yes">12x</span>
|
|
420
|
+
<span class="cline-any cline-yes">5x</span>
|
|
412
421
|
<span class="cline-any cline-neutral"> </span>
|
|
413
422
|
<span class="cline-any cline-neutral"> </span>
|
|
414
423
|
<span class="cline-any cline-neutral"> </span>
|
|
415
|
-
<span class="cline-any cline-yes">
|
|
416
|
-
<span class="cline-any cline-yes">
|
|
424
|
+
<span class="cline-any cline-yes">13x</span>
|
|
425
|
+
<span class="cline-any cline-yes">13x</span>
|
|
426
|
+
<span class="cline-any cline-yes">13x</span>
|
|
427
|
+
<span class="cline-any cline-yes">13x</span>
|
|
417
428
|
<span class="cline-any cline-neutral"> </span>
|
|
418
429
|
<span class="cline-any cline-no"> </span>
|
|
419
430
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -431,33 +442,38 @@
|
|
|
431
442
|
<span class="cline-any cline-neutral"> </span>
|
|
432
443
|
<span class="cline-any cline-neutral"> </span>
|
|
433
444
|
<span class="cline-any cline-neutral"> </span>
|
|
434
|
-
<span class="cline-any cline-yes">
|
|
435
|
-
<span class="cline-any cline-
|
|
436
|
-
<span class="cline-any cline-yes">
|
|
437
|
-
<span class="cline-any cline-yes">
|
|
438
|
-
<span class="cline-any cline-yes">
|
|
445
|
+
<span class="cline-any cline-yes">9x</span>
|
|
446
|
+
<span class="cline-any cline-neutral"> </span>
|
|
447
|
+
<span class="cline-any cline-yes">13x</span>
|
|
448
|
+
<span class="cline-any cline-yes">13x</span>
|
|
449
|
+
<span class="cline-any cline-yes">13x</span>
|
|
450
|
+
<span class="cline-any cline-yes">13x</span>
|
|
439
451
|
<span class="cline-any cline-neutral"> </span>
|
|
440
|
-
<span class="cline-any cline-yes">12x</span>
|
|
441
452
|
<span class="cline-any cline-neutral"> </span>
|
|
442
453
|
<span class="cline-any cline-neutral"> </span>
|
|
454
|
+
<span class="cline-any cline-yes">9x</span>
|
|
455
|
+
<span class="cline-any cline-neutral"> </span>
|
|
443
456
|
<span class="cline-any cline-neutral"> </span>
|
|
444
457
|
<span class="cline-any cline-neutral"> </span>
|
|
445
458
|
<span class="cline-any cline-yes">5x</span>
|
|
459
|
+
<span class="cline-any cline-yes">5x</span>
|
|
460
|
+
<span class="cline-any cline-yes">8x</span>
|
|
446
461
|
<span class="cline-any cline-neutral"> </span>
|
|
447
462
|
<span class="cline-any cline-neutral"> </span>
|
|
448
463
|
<span class="cline-any cline-neutral"> </span>
|
|
449
|
-
<span class="cline-any cline-
|
|
464
|
+
<span class="cline-any cline-neutral"> </span>
|
|
465
|
+
<span class="cline-any cline-yes">5x</span>
|
|
450
466
|
<span class="cline-any cline-neutral"> </span>
|
|
451
467
|
<span class="cline-any cline-neutral"> </span>
|
|
452
468
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/*---------------------------------------------------------------------------------------------
|
|
453
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
454
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
455
|
-
*--------------------------------------------------------------------------------------------*/
|
|
456
|
-
import {
|
|
457
|
-
import type { ExtractionClient, ReportMapping, ReportsClient } from "@itwin/insights-client";
|
|
469
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
470
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
471
|
+
*--------------------------------------------------------------------------------------------*/
|
|
472
|
+
import { ExtractionState } from "@itwin/insights-client";
|
|
458
473
|
import { handleError } from "./utils";
|
|
459
474
|
import { ExtractionStates } from "./ExtractionStatus";
|
|
460
475
|
import { STATUS_CHECK_INTERVAL } from "./Constants";
|
|
476
|
+
import type { ExtractionMapping, ExtractionRequestDetails, IExtractionClient, IReportsClient, ReportMapping } from "@itwin/insights-client";
|
|
461
477
|
import type { AccessToken } from "@itwin/core-bentley";
|
|
462
478
|
|
|
463
479
|
export type ReportMappingAndMapping = ReportMapping & {
|
|
@@ -466,13 +482,15 @@ export type ReportMappingAndMapping = ReportMapping & {
|
|
|
466
482
|
iModelName: string;
|
|
467
483
|
};
|
|
468
484
|
|
|
485
|
+
/**
|
|
486
|
+
* @public
|
|
487
|
+
*/
|
|
469
488
|
export class BulkExtractor {
|
|
470
|
-
private _reportsClientApi:
|
|
471
|
-
private _extractionClientApi:
|
|
489
|
+
private _reportsClientApi: IReportsClient;
|
|
490
|
+
private _extractionClientApi: IExtractionClient;
|
|
472
491
|
private _accessToken: () => Promise<string>;
|
|
473
|
-
|
|
474
492
|
private _reportIModels = new Map<string, string[]>(); // key: reportId, value: iModels
|
|
475
|
-
private _iModelStates = new Map<string,
|
|
493
|
+
private _iModelStates = new Map<string, ExtractionState>(); // key: iModelId, value: state
|
|
476
494
|
private _timeFetched = new Date();
|
|
477
495
|
private _iModelRun = new Map<string, string>(); // key: iModelId, value: runId
|
|
478
496
|
private _iModelToast = new Set<string>();
|
|
@@ -482,8 +500,8 @@ export class BulkExtractor {
|
|
|
482
500
|
private _iModels: string[] = [];
|
|
483
501
|
|
|
484
502
|
constructor(
|
|
485
|
-
reportsClient:
|
|
486
|
-
extractionClient:
|
|
503
|
+
reportsClient: IReportsClient,
|
|
504
|
+
extractionClient: IExtractionClient,
|
|
487
505
|
getAccessToken: () => Promise<AccessToken>,
|
|
488
506
|
successfulExtractionToast: (iModelName: string, odataFeedUrl: string) => void,
|
|
489
507
|
failedExtractionToast: (iModelName: string) => void,
|
|
@@ -498,7 +516,7 @@ export class BulkExtractor {
|
|
|
498
516
|
private async fetchStates(): Promise<void> {
|
|
499
517
|
for (const [iModelId, runId] of this._iModelRun) {
|
|
500
518
|
const state = await this.getState(runId);
|
|
501
|
-
if (state ===
|
|
519
|
+
if (state === ExtractionState.Succeeded || state === ExtractionState.Failed) {
|
|
502
520
|
this._iModelRun.delete(iModelId);
|
|
503
521
|
}
|
|
504
522
|
this._iModelStates.set(iModelId, state);
|
|
@@ -506,14 +524,14 @@ export class BulkExtractor {
|
|
|
506
524
|
}
|
|
507
525
|
|
|
508
526
|
public async getReportState(reportId: string): Promise<ExtractionStates> {
|
|
509
|
-
if (
|
|
527
|
+
if (new Date().getTime() - this._timeFetched.getTime() > STATUS_CHECK_INTERVAL) {
|
|
510
528
|
this._timeFetched = new Date();
|
|
511
529
|
await this.fetchStates();
|
|
512
530
|
}
|
|
513
531
|
|
|
514
532
|
const iModels = this._reportIModels.get(reportId);
|
|
515
533
|
if (!iModels) return ExtractionStates.None;
|
|
516
|
-
const states:
|
|
534
|
+
const states: ExtractionState[] = [];
|
|
517
535
|
for (const iModelId of iModels) {
|
|
518
536
|
const state = this._iModelStates.get(iModelId);
|
|
519
537
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (!state) <span class="cstat-no" title="statement not covered" >continue;</span>
|
|
@@ -523,7 +541,7 @@ export class BulkExtractor {
|
|
|
523
541
|
}
|
|
524
542
|
|
|
525
543
|
public async getIModelState(iModelId: string, iModelName: string, odataFeedUrl: string): Promise<ExtractionStates> {
|
|
526
|
-
if (
|
|
544
|
+
if (new Date().getTime() - this._timeFetched.getTime() > STATUS_CHECK_INTERVAL) {
|
|
527
545
|
this._timeFetched = new Date();
|
|
528
546
|
await this.fetchStates();
|
|
529
547
|
}
|
|
@@ -531,11 +549,11 @@ export class BulkExtractor {
|
|
|
531
549
|
const state = this._iModelStates.get(iModelId);
|
|
532
550
|
if (!state) return ExtractionStates.None;
|
|
533
551
|
if (!this._iModelToast.has(iModelId)) {
|
|
534
|
-
if (state ===
|
|
552
|
+
if (state === ExtractionState.Succeeded) {
|
|
535
553
|
this._successfulExtractionToast(iModelName, odataFeedUrl);
|
|
536
554
|
this._iModelToast.add(iModelId);
|
|
537
555
|
this.checkRunning();
|
|
538
|
-
} else if (state ===
|
|
556
|
+
} else if (state === ExtractionState.Failed) {
|
|
539
557
|
this._failedExtractionToast(iModelName);
|
|
540
558
|
this._iModelToast.add(iModelId);
|
|
541
559
|
this.checkRunning();
|
|
@@ -544,23 +562,19 @@ export class BulkExtractor {
|
|
|
544
562
|
return BulkExtractor.getFinalState([state]);
|
|
545
563
|
}
|
|
546
564
|
|
|
547
|
-
private static getFinalState(states:
|
|
548
|
-
if (states.includes(
|
|
549
|
-
return ExtractionStates.Failed;
|
|
565
|
+
private static getFinalState(states: ExtractionState[]): ExtractionStates {
|
|
566
|
+
if (states.includes(ExtractionState.Failed)) return ExtractionStates.Failed;
|
|
550
567
|
|
|
551
|
-
if (states.includes(
|
|
552
|
-
return ExtractionStates.Queued;
|
|
568
|
+
if (states.includes(ExtractionState.Queued)) return ExtractionStates.Queued;
|
|
553
569
|
|
|
554
|
-
if (states.includes(
|
|
555
|
-
return ExtractionStates.Running;
|
|
570
|
+
if (states.includes(ExtractionState.Running)) return ExtractionStates.Running;
|
|
556
571
|
|
|
557
|
-
if (states.includes(
|
|
558
|
-
return ExtractionStates.Succeeded;
|
|
572
|
+
if (states.includes(ExtractionState.Succeeded)) return ExtractionStates.Succeeded;
|
|
559
573
|
|
|
560
574
|
<span class="cstat-no" title="statement not covered" > return ExtractionStates.Failed;</span>
|
|
561
575
|
}
|
|
562
576
|
|
|
563
|
-
private async getState(runId: string): Promise<
|
|
577
|
+
private async getState(runId: string): Promise<ExtractionState> {
|
|
564
578
|
try {
|
|
565
579
|
const accessToken = await this._accessToken();
|
|
566
580
|
const response = await this._extractionClientApi.getExtractionStatus(accessToken, runId);
|
|
@@ -568,7 +582,7 @@ export class BulkExtractor {
|
|
|
568
582
|
} catch (error: any) {
|
|
569
583
|
<span class="cstat-no" title="statement not covered" > handleError(error.status);</span>
|
|
570
584
|
}
|
|
571
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
585
|
+
<span class="cstat-no" title="statement not covered" > return ExtractionState.Failed;</span>
|
|
572
586
|
}
|
|
573
587
|
|
|
574
588
|
private checkRunning(): void {
|
|
@@ -576,7 +590,7 @@ export class BulkExtractor {
|
|
|
576
590
|
let allFinished = true;
|
|
577
591
|
this._iModels.forEach((iModelId) => {
|
|
578
592
|
const state = this._iModelStates.get(iModelId);
|
|
579
|
-
<span class="missing-if-branch" title="if path not taken" >I</span>if (state ===
|
|
593
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (state === ExtractionState.Queued || state === ExtractionState.Running) {
|
|
580
594
|
<span class="cstat-no" title="statement not covered" > allFinished = false;</span>
|
|
581
595
|
}
|
|
582
596
|
});
|
|
@@ -586,26 +600,31 @@ export class BulkExtractor {
|
|
|
586
600
|
}
|
|
587
601
|
|
|
588
602
|
public async runReportExtractions(reportIds: string[]): Promise<void> {
|
|
589
|
-
const
|
|
603
|
+
const extractionDetailsIModelIdMap = new Map<string, ExtractionMapping[]>();
|
|
590
604
|
for (const reportId of reportIds) {
|
|
591
|
-
const
|
|
592
|
-
|
|
605
|
+
const reportExtractionDetails = await this.fetchReportExtractionRequestDetails(reportId);
|
|
606
|
+
const reportIModels = reportExtractionDetails.map((reportExtractionDetail) => reportExtractionDetail.iModelId);
|
|
593
607
|
this._reportIModels.set(reportId, reportIModels);
|
|
608
|
+
reportExtractionDetails.forEach((extractionDetail) => {
|
|
609
|
+
const existingMappings = extractionDetailsIModelIdMap.get(extractionDetail.iModelId) || [];
|
|
610
|
+
extractionDetailsIModelIdMap.set(extractionDetail.iModelId, [...existingMappings, ...extractionDetail.mappings]);
|
|
611
|
+
});
|
|
594
612
|
}
|
|
595
|
-
const iModels = new Set(Array.from(reportIModelIds.values()).flat());
|
|
596
613
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
614
|
+
const extractionDetails: ExtractionRequestDetails[] = Array.from(extractionDetailsIModelIdMap.entries()).map(([iModelId, mappings]) => {
|
|
615
|
+
const mappingSetArray: ExtractionMapping[] = Array.from(new Set(mappings.map((m) => m.id))).map((id) => ({ id }));
|
|
616
|
+
return {
|
|
617
|
+
iModelId,
|
|
618
|
+
mappings: mappingSetArray,
|
|
619
|
+
};
|
|
620
|
+
});
|
|
621
|
+
await this.runIModelExtractions(extractionDetails);
|
|
600
622
|
}
|
|
601
623
|
|
|
602
|
-
private async runExtraction(
|
|
624
|
+
private async runExtraction(extractionRequestDetails: ExtractionRequestDetails): Promise<string | undefined> {
|
|
603
625
|
try {
|
|
604
|
-
const response = await this._extractionClientApi.runExtraction(
|
|
605
|
-
|
|
606
|
-
iModelId
|
|
607
|
-
);
|
|
608
|
-
this._iModelToast.delete(iModelId);
|
|
626
|
+
const response = await this._extractionClientApi.runExtraction(await this._accessToken(), extractionRequestDetails);
|
|
627
|
+
this._iModelToast.delete(extractionRequestDetails.iModelId);
|
|
609
628
|
return response.id;
|
|
610
629
|
} catch (error: any) {
|
|
611
630
|
<span class="cstat-no" title="statement not covered" > handleError(error.status);</span>
|
|
@@ -613,8 +632,8 @@ export class BulkExtractor {
|
|
|
613
632
|
<span class="cstat-no" title="statement not covered" > return undefined;</span>
|
|
614
633
|
}
|
|
615
634
|
|
|
616
|
-
public async runIModelExtraction(
|
|
617
|
-
return this.runIModelExtractions([
|
|
635
|
+
public async runIModelExtraction(extractionRequestDetails: ExtractionRequestDetails): Promise<void> {
|
|
636
|
+
return this.runIModelExtractions([extractionRequestDetails]);
|
|
618
637
|
}
|
|
619
638
|
|
|
620
639
|
public setHook(setJobRunning: React.Dispatch<React.SetStateAction<boolean>>, iModels: string[]): void {
|
|
@@ -623,23 +642,28 @@ export class BulkExtractor {
|
|
|
623
642
|
this.checkRunning();
|
|
624
643
|
}
|
|
625
644
|
|
|
626
|
-
public async runIModelExtractions(
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
645
|
+
public async runIModelExtractions(extractionRequestsDetails: ExtractionRequestDetails[]): Promise<void> {
|
|
646
|
+
await Promise.all(
|
|
647
|
+
extractionRequestsDetails.map(async (details) => {
|
|
648
|
+
const run = await this.runExtraction(details);
|
|
649
|
+
if (run) {
|
|
650
|
+
this._iModelStates.set(details.iModelId, ExtractionState.Queued);
|
|
651
|
+
this._iModelRun.set(details.iModelId, run);
|
|
652
|
+
}
|
|
653
|
+
}),
|
|
654
|
+
);
|
|
655
|
+
this.checkRunning();
|
|
635
656
|
}
|
|
636
657
|
|
|
637
|
-
private async
|
|
638
|
-
const reportMappings = await this._reportsClientApi.getReportMappings(
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
658
|
+
private async fetchReportExtractionRequestDetails(reportId: string): Promise<ExtractionRequestDetails[]> {
|
|
659
|
+
const reportMappings = await this._reportsClientApi.getReportMappings(await this._accessToken(), reportId);
|
|
660
|
+
const extractionRequestDetails: ExtractionRequestDetails[] = reportMappings.map((reportMapping) => {
|
|
661
|
+
return {
|
|
662
|
+
iModelId: reportMapping.imodelId,
|
|
663
|
+
mappings: [{ id: reportMapping.mappingId }],
|
|
664
|
+
};
|
|
665
|
+
});
|
|
666
|
+
return extractionRequestDetails;
|
|
643
667
|
}
|
|
644
668
|
}
|
|
645
669
|
</pre></td></tr></table></pre>
|
|
@@ -649,7 +673,7 @@ export class BulkExtractor {
|
|
|
649
673
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
650
674
|
Code coverage generated by
|
|
651
675
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
652
|
-
at 2024-
|
|
676
|
+
at 2024-06-11T15:49:29.425Z
|
|
653
677
|
</div>
|
|
654
678
|
<script src="../../../prettify.js"></script>
|
|
655
679
|
<script>
|
|
@@ -82,14 +82,14 @@
|
|
|
82
82
|
<span class="cline-any cline-neutral"> </span>
|
|
83
83
|
<span class="cline-any cline-yes">7x</span>
|
|
84
84
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">/*---------------------------------------------------------------------------------------------
|
|
85
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
86
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
87
|
-
*--------------------------------------------------------------------------------------------*/
|
|
85
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
86
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
87
|
+
*--------------------------------------------------------------------------------------------*/
|
|
88
88
|
export const STATUS_CHECK_INTERVAL = 5000;
|
|
89
89
|
export const ANIMATION_DELAY = "5s";
|
|
90
90
|
export const ANIMATION_DURATION = "1s";
|
|
91
91
|
|
|
92
|
-
export const IMODELS_BASE_URL= "https://api.bentley.com/imodels";
|
|
92
|
+
export const IMODELS_BASE_URL = "https://api.bentley.com/imodels";
|
|
93
93
|
</pre></td></tr></table></pre>
|
|
94
94
|
|
|
95
95
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -97,7 +97,7 @@ export const IMODELS_BASE_URL= "https://api.bentley.com/imodels";
|
|
|
97
97
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
98
98
|
Code coverage generated by
|
|
99
99
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
100
|
-
at 2024-
|
|
100
|
+
at 2024-06-11T15:49:29.425Z
|
|
101
101
|
</div>
|
|
102
102
|
<script src="../../../prettify.js"></script>
|
|
103
103
|
<script>
|