@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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
6
|
-
import type { ExtractionClient, ReportMapping, ReportsClient } from "@itwin/insights-client";
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { ExtractionState } from "@itwin/insights-client";
|
|
7
6
|
import { handleError } from "./utils";
|
|
8
7
|
import { ExtractionStates } from "./ExtractionStatus";
|
|
9
8
|
import { STATUS_CHECK_INTERVAL } from "./Constants";
|
|
9
|
+
import type { ExtractionMapping, ExtractionRequestDetails, IExtractionClient, IReportsClient, ReportMapping } from "@itwin/insights-client";
|
|
10
10
|
import type { AccessToken } from "@itwin/core-bentley";
|
|
11
11
|
|
|
12
12
|
export type ReportMappingAndMapping = ReportMapping & {
|
|
@@ -15,13 +15,15 @@ export type ReportMappingAndMapping = ReportMapping & {
|
|
|
15
15
|
iModelName: string;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
18
21
|
export class BulkExtractor {
|
|
19
|
-
private _reportsClientApi:
|
|
20
|
-
private _extractionClientApi:
|
|
22
|
+
private _reportsClientApi: IReportsClient;
|
|
23
|
+
private _extractionClientApi: IExtractionClient;
|
|
21
24
|
private _accessToken: () => Promise<string>;
|
|
22
|
-
|
|
23
25
|
private _reportIModels = new Map<string, string[]>(); // key: reportId, value: iModels
|
|
24
|
-
private _iModelStates = new Map<string,
|
|
26
|
+
private _iModelStates = new Map<string, ExtractionState>(); // key: iModelId, value: state
|
|
25
27
|
private _timeFetched = new Date();
|
|
26
28
|
private _iModelRun = new Map<string, string>(); // key: iModelId, value: runId
|
|
27
29
|
private _iModelToast = new Set<string>();
|
|
@@ -31,8 +33,8 @@ export class BulkExtractor {
|
|
|
31
33
|
private _iModels: string[] = [];
|
|
32
34
|
|
|
33
35
|
constructor(
|
|
34
|
-
reportsClient:
|
|
35
|
-
extractionClient:
|
|
36
|
+
reportsClient: IReportsClient,
|
|
37
|
+
extractionClient: IExtractionClient,
|
|
36
38
|
getAccessToken: () => Promise<AccessToken>,
|
|
37
39
|
successfulExtractionToast: (iModelName: string, odataFeedUrl: string) => void,
|
|
38
40
|
failedExtractionToast: (iModelName: string) => void,
|
|
@@ -47,7 +49,7 @@ export class BulkExtractor {
|
|
|
47
49
|
private async fetchStates(): Promise<void> {
|
|
48
50
|
for (const [iModelId, runId] of this._iModelRun) {
|
|
49
51
|
const state = await this.getState(runId);
|
|
50
|
-
if (state ===
|
|
52
|
+
if (state === ExtractionState.Succeeded || state === ExtractionState.Failed) {
|
|
51
53
|
this._iModelRun.delete(iModelId);
|
|
52
54
|
}
|
|
53
55
|
this._iModelStates.set(iModelId, state);
|
|
@@ -55,14 +57,14 @@ export class BulkExtractor {
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
public async getReportState(reportId: string): Promise<ExtractionStates> {
|
|
58
|
-
if (
|
|
60
|
+
if (new Date().getTime() - this._timeFetched.getTime() > STATUS_CHECK_INTERVAL) {
|
|
59
61
|
this._timeFetched = new Date();
|
|
60
62
|
await this.fetchStates();
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
const iModels = this._reportIModels.get(reportId);
|
|
64
66
|
if (!iModels) return ExtractionStates.None;
|
|
65
|
-
const states:
|
|
67
|
+
const states: ExtractionState[] = [];
|
|
66
68
|
for (const iModelId of iModels) {
|
|
67
69
|
const state = this._iModelStates.get(iModelId);
|
|
68
70
|
if (!state) continue;
|
|
@@ -72,7 +74,7 @@ export class BulkExtractor {
|
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
public async getIModelState(iModelId: string, iModelName: string, odataFeedUrl: string): Promise<ExtractionStates> {
|
|
75
|
-
if (
|
|
77
|
+
if (new Date().getTime() - this._timeFetched.getTime() > STATUS_CHECK_INTERVAL) {
|
|
76
78
|
this._timeFetched = new Date();
|
|
77
79
|
await this.fetchStates();
|
|
78
80
|
}
|
|
@@ -80,11 +82,11 @@ export class BulkExtractor {
|
|
|
80
82
|
const state = this._iModelStates.get(iModelId);
|
|
81
83
|
if (!state) return ExtractionStates.None;
|
|
82
84
|
if (!this._iModelToast.has(iModelId)) {
|
|
83
|
-
if (state ===
|
|
85
|
+
if (state === ExtractionState.Succeeded) {
|
|
84
86
|
this._successfulExtractionToast(iModelName, odataFeedUrl);
|
|
85
87
|
this._iModelToast.add(iModelId);
|
|
86
88
|
this.checkRunning();
|
|
87
|
-
} else if (state ===
|
|
89
|
+
} else if (state === ExtractionState.Failed) {
|
|
88
90
|
this._failedExtractionToast(iModelName);
|
|
89
91
|
this._iModelToast.add(iModelId);
|
|
90
92
|
this.checkRunning();
|
|
@@ -93,23 +95,19 @@ export class BulkExtractor {
|
|
|
93
95
|
return BulkExtractor.getFinalState([state]);
|
|
94
96
|
}
|
|
95
97
|
|
|
96
|
-
private static getFinalState(states:
|
|
97
|
-
if (states.includes(
|
|
98
|
-
return ExtractionStates.Failed;
|
|
98
|
+
private static getFinalState(states: ExtractionState[]): ExtractionStates {
|
|
99
|
+
if (states.includes(ExtractionState.Failed)) return ExtractionStates.Failed;
|
|
99
100
|
|
|
100
|
-
if (states.includes(
|
|
101
|
-
return ExtractionStates.Queued;
|
|
101
|
+
if (states.includes(ExtractionState.Queued)) return ExtractionStates.Queued;
|
|
102
102
|
|
|
103
|
-
if (states.includes(
|
|
104
|
-
return ExtractionStates.Running;
|
|
103
|
+
if (states.includes(ExtractionState.Running)) return ExtractionStates.Running;
|
|
105
104
|
|
|
106
|
-
if (states.includes(
|
|
107
|
-
return ExtractionStates.Succeeded;
|
|
105
|
+
if (states.includes(ExtractionState.Succeeded)) return ExtractionStates.Succeeded;
|
|
108
106
|
|
|
109
107
|
return ExtractionStates.Failed;
|
|
110
108
|
}
|
|
111
109
|
|
|
112
|
-
private async getState(runId: string): Promise<
|
|
110
|
+
private async getState(runId: string): Promise<ExtractionState> {
|
|
113
111
|
try {
|
|
114
112
|
const accessToken = await this._accessToken();
|
|
115
113
|
const response = await this._extractionClientApi.getExtractionStatus(accessToken, runId);
|
|
@@ -117,7 +115,7 @@ export class BulkExtractor {
|
|
|
117
115
|
} catch (error: any) {
|
|
118
116
|
handleError(error.status);
|
|
119
117
|
}
|
|
120
|
-
return
|
|
118
|
+
return ExtractionState.Failed;
|
|
121
119
|
}
|
|
122
120
|
|
|
123
121
|
private checkRunning(): void {
|
|
@@ -125,7 +123,7 @@ export class BulkExtractor {
|
|
|
125
123
|
let allFinished = true;
|
|
126
124
|
this._iModels.forEach((iModelId) => {
|
|
127
125
|
const state = this._iModelStates.get(iModelId);
|
|
128
|
-
if (state ===
|
|
126
|
+
if (state === ExtractionState.Queued || state === ExtractionState.Running) {
|
|
129
127
|
allFinished = false;
|
|
130
128
|
}
|
|
131
129
|
});
|
|
@@ -135,26 +133,31 @@ export class BulkExtractor {
|
|
|
135
133
|
}
|
|
136
134
|
|
|
137
135
|
public async runReportExtractions(reportIds: string[]): Promise<void> {
|
|
138
|
-
const
|
|
136
|
+
const extractionDetailsIModelIdMap = new Map<string, ExtractionMapping[]>();
|
|
139
137
|
for (const reportId of reportIds) {
|
|
140
|
-
const
|
|
141
|
-
|
|
138
|
+
const reportExtractionDetails = await this.fetchReportExtractionRequestDetails(reportId);
|
|
139
|
+
const reportIModels = reportExtractionDetails.map((reportExtractionDetail) => reportExtractionDetail.iModelId);
|
|
142
140
|
this._reportIModels.set(reportId, reportIModels);
|
|
141
|
+
reportExtractionDetails.forEach((extractionDetail) => {
|
|
142
|
+
const existingMappings = extractionDetailsIModelIdMap.get(extractionDetail.iModelId) || [];
|
|
143
|
+
extractionDetailsIModelIdMap.set(extractionDetail.iModelId, [...existingMappings, ...extractionDetail.mappings]);
|
|
144
|
+
});
|
|
143
145
|
}
|
|
144
|
-
const iModels = new Set(Array.from(reportIModelIds.values()).flat());
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
const extractionDetails: ExtractionRequestDetails[] = Array.from(extractionDetailsIModelIdMap.entries()).map(([iModelId, mappings]) => {
|
|
148
|
+
const mappingSetArray: ExtractionMapping[] = Array.from(new Set(mappings.map((m) => m.id))).map((id) => ({ id }));
|
|
149
|
+
return {
|
|
150
|
+
iModelId,
|
|
151
|
+
mappings: mappingSetArray,
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
await this.runIModelExtractions(extractionDetails);
|
|
149
155
|
}
|
|
150
156
|
|
|
151
|
-
private async runExtraction(
|
|
157
|
+
private async runExtraction(extractionRequestDetails: ExtractionRequestDetails): Promise<string | undefined> {
|
|
152
158
|
try {
|
|
153
|
-
const response = await this._extractionClientApi.runExtraction(
|
|
154
|
-
|
|
155
|
-
iModelId
|
|
156
|
-
);
|
|
157
|
-
this._iModelToast.delete(iModelId);
|
|
159
|
+
const response = await this._extractionClientApi.runExtraction(await this._accessToken(), extractionRequestDetails);
|
|
160
|
+
this._iModelToast.delete(extractionRequestDetails.iModelId);
|
|
158
161
|
return response.id;
|
|
159
162
|
} catch (error: any) {
|
|
160
163
|
handleError(error.status);
|
|
@@ -162,8 +165,8 @@ export class BulkExtractor {
|
|
|
162
165
|
return undefined;
|
|
163
166
|
}
|
|
164
167
|
|
|
165
|
-
public async runIModelExtraction(
|
|
166
|
-
return this.runIModelExtractions([
|
|
168
|
+
public async runIModelExtraction(extractionRequestDetails: ExtractionRequestDetails): Promise<void> {
|
|
169
|
+
return this.runIModelExtractions([extractionRequestDetails]);
|
|
167
170
|
}
|
|
168
171
|
|
|
169
172
|
public setHook(setJobRunning: React.Dispatch<React.SetStateAction<boolean>>, iModels: string[]): void {
|
|
@@ -172,22 +175,27 @@ export class BulkExtractor {
|
|
|
172
175
|
this.checkRunning();
|
|
173
176
|
}
|
|
174
177
|
|
|
175
|
-
public async runIModelExtractions(
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
public async runIModelExtractions(extractionRequestsDetails: ExtractionRequestDetails[]): Promise<void> {
|
|
179
|
+
await Promise.all(
|
|
180
|
+
extractionRequestsDetails.map(async (details) => {
|
|
181
|
+
const run = await this.runExtraction(details);
|
|
182
|
+
if (run) {
|
|
183
|
+
this._iModelStates.set(details.iModelId, ExtractionState.Queued);
|
|
184
|
+
this._iModelRun.set(details.iModelId, run);
|
|
185
|
+
}
|
|
186
|
+
}),
|
|
187
|
+
);
|
|
188
|
+
this.checkRunning();
|
|
184
189
|
}
|
|
185
190
|
|
|
186
|
-
private async
|
|
187
|
-
const reportMappings = await this._reportsClientApi.getReportMappings(
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
private async fetchReportExtractionRequestDetails(reportId: string): Promise<ExtractionRequestDetails[]> {
|
|
192
|
+
const reportMappings = await this._reportsClientApi.getReportMappings(await this._accessToken(), reportId);
|
|
193
|
+
const extractionRequestDetails: ExtractionRequestDetails[] = reportMappings.map((reportMapping) => {
|
|
194
|
+
return {
|
|
195
|
+
iModelId: reportMapping.imodelId,
|
|
196
|
+
mappings: [{ id: reportMapping.mappingId }],
|
|
197
|
+
};
|
|
198
|
+
});
|
|
199
|
+
return extractionRequestDetails;
|
|
192
200
|
}
|
|
193
201
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
export const STATUS_CHECK_INTERVAL = 5000;
|
|
6
6
|
export const ANIMATION_DELAY = "5s";
|
|
7
7
|
export const ANIMATION_DURATION = "1s";
|
|
8
8
|
|
|
9
|
-
export const IMODELS_BASE_URL= "https://api.bentley.com/imodels";
|
|
9
|
+
export const IMODELS_BASE_URL = "https://api.bentley.com/imodels";
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
6
|
-
Button,
|
|
7
|
-
MiddleTextTruncation,
|
|
8
|
-
Modal,
|
|
9
|
-
ModalButtonBar,
|
|
10
|
-
ModalContent,
|
|
11
|
-
Text,
|
|
12
|
-
} from "@itwin/itwinui-react";
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import { Button, MiddleTextTruncation, Modal, ModalButtonBar, ModalContent, Text } from "@itwin/itwinui-react";
|
|
13
6
|
import React, { useState } from "react";
|
|
14
7
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
15
8
|
import "./DeleteModal.scss";
|
|
@@ -22,12 +15,7 @@ export interface DeleteModalProps {
|
|
|
22
15
|
refresh: () => Promise<void>;
|
|
23
16
|
}
|
|
24
17
|
|
|
25
|
-
export const DeleteModal = ({
|
|
26
|
-
entityName,
|
|
27
|
-
onClose,
|
|
28
|
-
onDelete,
|
|
29
|
-
refresh,
|
|
30
|
-
}: DeleteModalProps) => {
|
|
18
|
+
export const DeleteModal = ({ entityName, onClose, onDelete, refresh }: DeleteModalProps) => {
|
|
31
19
|
const [isDeleting, setIsDeleting] = useState<boolean>(false);
|
|
32
20
|
|
|
33
21
|
const deleteCallback = async () => {
|
|
@@ -45,20 +33,14 @@ export const DeleteModal = ({
|
|
|
45
33
|
|
|
46
34
|
return (
|
|
47
35
|
<Modal
|
|
48
|
-
title={ReportsConfigWidget.localization.getLocalizedString(
|
|
49
|
-
"ReportsConfigWidget:Confirm"
|
|
50
|
-
)}
|
|
36
|
+
title={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Confirm")}
|
|
51
37
|
isOpen={!!entityName}
|
|
52
38
|
isDismissible={!isDeleting}
|
|
53
39
|
onClose={onClose}
|
|
54
40
|
>
|
|
55
41
|
<ModalContent>
|
|
56
42
|
<div className="rcw-delete-modal-body-text">
|
|
57
|
-
<Text variant=
|
|
58
|
-
{ReportsConfigWidget.localization.getLocalizedString(
|
|
59
|
-
"ReportsConfigWidget:AreYouSureYouWantToDelete"
|
|
60
|
-
)}
|
|
61
|
-
</Text>
|
|
43
|
+
<Text variant="leading">{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:AreYouSureYouWantToDelete")}</Text>
|
|
62
44
|
<strong>{<MiddleTextTruncation text={`${entityName}?`} />}</strong>
|
|
63
45
|
</div>
|
|
64
46
|
</ModalContent>
|
|
@@ -68,23 +50,11 @@ export const DeleteModal = ({
|
|
|
68
50
|
<LoadingSpinner />
|
|
69
51
|
</div>
|
|
70
52
|
)}
|
|
71
|
-
<Button
|
|
72
|
-
|
|
73
|
-
onClick={deleteCallback}
|
|
74
|
-
disabled={isDeleting}
|
|
75
|
-
>
|
|
76
|
-
{ReportsConfigWidget.localization.getLocalizedString(
|
|
77
|
-
"ReportsConfigWidget:Delete"
|
|
78
|
-
)}
|
|
53
|
+
<Button styleType="high-visibility" onClick={deleteCallback} disabled={isDeleting}>
|
|
54
|
+
{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Delete")}
|
|
79
55
|
</Button>
|
|
80
|
-
<Button
|
|
81
|
-
|
|
82
|
-
onClick={onClose}
|
|
83
|
-
disabled={isDeleting}
|
|
84
|
-
>
|
|
85
|
-
{ReportsConfigWidget.localization.getLocalizedString(
|
|
86
|
-
"ReportsConfigWidget:Cancel"
|
|
87
|
-
)}
|
|
56
|
+
<Button styleType="default" onClick={onClose} disabled={isDeleting}>
|
|
57
|
+
{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Cancel")}
|
|
88
58
|
</Button>
|
|
89
59
|
</ModalButtonBar>
|
|
90
60
|
</Modal>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { SvgStatusError } from "@itwin/itwinui-icons-color-react";
|
|
7
7
|
import { ReportsConfigWidget } from "../../../ReportsConfigWidget";
|
|
@@ -13,12 +13,7 @@ interface ExtractionStateProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const FailedExtractionState = ({ animation, onAnimationEnd }: ExtractionStateProps) => (
|
|
16
|
-
<div
|
|
17
|
-
title={ReportsConfigWidget.localization.getLocalizedString(
|
|
18
|
-
"ReportsConfigWidget:Failed"
|
|
19
|
-
)}
|
|
20
|
-
className="rcw-extraction-status"
|
|
21
|
-
>
|
|
16
|
+
<div title={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Failed")} className="rcw-extraction-status">
|
|
22
17
|
<div
|
|
23
18
|
className={`rcw-status-icon`}
|
|
24
19
|
style={{
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { SvgStatusPending } from "@itwin/itwinui-icons-color-react";
|
|
7
7
|
import { ReportsConfigWidget } from "../../../ReportsConfigWidget";
|
|
8
8
|
|
|
9
9
|
export const QueuedExtractionState = () => (
|
|
10
|
-
<div
|
|
11
|
-
title={ReportsConfigWidget.localization.getLocalizedString(
|
|
12
|
-
"ReportsConfigWidget:Queued"
|
|
13
|
-
)}
|
|
14
|
-
className="rcw-extraction-status"
|
|
15
|
-
>
|
|
10
|
+
<div title={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Queued")} className="rcw-extraction-status">
|
|
16
11
|
<div className="rcw-status-icon">
|
|
17
12
|
<SvgStatusPending />
|
|
18
13
|
</div>
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { ProgressRadial } from "@itwin/itwinui-react";
|
|
7
7
|
import { ReportsConfigWidget } from "../../../ReportsConfigWidget";
|
|
8
8
|
|
|
9
9
|
export const RunningExtractionState = () => (
|
|
10
|
-
<div
|
|
11
|
-
title={ReportsConfigWidget.localization.getLocalizedString(
|
|
12
|
-
"ReportsConfigWidget:Running"
|
|
13
|
-
)}
|
|
14
|
-
className="rcw-extraction-status-running"
|
|
15
|
-
>
|
|
10
|
+
<div title={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Running")} className="rcw-extraction-status-running">
|
|
16
11
|
<ProgressRadial size="x-small" indeterminate />
|
|
17
12
|
</div>
|
|
18
13
|
);
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { SvgStatusPendingHollow } from "@itwin/itwinui-icons-color-react";
|
|
7
7
|
import { ReportsConfigWidget } from "../../../ReportsConfigWidget";
|
|
8
8
|
|
|
9
9
|
export const StartingExtractionState = () => (
|
|
10
|
-
<div
|
|
11
|
-
title={
|
|
12
|
-
ReportsConfigWidget.localization.getLocalizedString(
|
|
13
|
-
"ReportsConfigWidget:Starting"
|
|
14
|
-
)
|
|
15
|
-
}
|
|
16
|
-
className="rcw-extraction-status"
|
|
17
|
-
>
|
|
10
|
+
<div title={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Starting")} className="rcw-extraction-status">
|
|
18
11
|
<div className="rcw-status-icon">
|
|
19
12
|
<SvgStatusPendingHollow />
|
|
20
13
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { SvgStatusSuccess } from "@itwin/itwinui-icons-color-react";
|
|
7
7
|
import { ReportsConfigWidget } from "../../../ReportsConfigWidget";
|
|
@@ -13,12 +13,7 @@ interface ExtractionStateProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const SucceededExtractionState = ({ animation, onAnimationEnd }: ExtractionStateProps) => (
|
|
16
|
-
<div
|
|
17
|
-
title={ReportsConfigWidget.localization.getLocalizedString(
|
|
18
|
-
"ReportsConfigWidget:Success"
|
|
19
|
-
)}
|
|
20
|
-
className="rcw-extraction-status"
|
|
21
|
-
>
|
|
16
|
+
<div title={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Success")} className="rcw-extraction-status">
|
|
22
17
|
<div
|
|
23
18
|
className={`rcw-status-icon`}
|
|
24
19
|
data-testid="rcw-success-animation"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
7
7
|
import "./ExtractionStatus.scss";
|
|
@@ -26,10 +26,7 @@ interface ExtractionStatusProps {
|
|
|
26
26
|
clearExtractionState: () => void;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export const ExtractionStatus = ({
|
|
30
|
-
state,
|
|
31
|
-
clearExtractionState,
|
|
32
|
-
}: ExtractionStatusProps) => {
|
|
29
|
+
export const ExtractionStatus = ({ state, clearExtractionState }: ExtractionStatusProps) => {
|
|
33
30
|
const [fadeOut, setFadeOut] = useState<boolean>(false);
|
|
34
31
|
|
|
35
32
|
const onAnimationEnd = () => {
|
|
@@ -49,21 +46,15 @@ export const ExtractionStatus = ({
|
|
|
49
46
|
|
|
50
47
|
switch (state) {
|
|
51
48
|
case ExtractionStates.Starting:
|
|
52
|
-
return
|
|
49
|
+
return <StartingExtractionState />;
|
|
53
50
|
case ExtractionStates.Queued:
|
|
54
|
-
return
|
|
51
|
+
return <QueuedExtractionState />;
|
|
55
52
|
case ExtractionStates.Running:
|
|
56
|
-
return
|
|
53
|
+
return <RunningExtractionState />;
|
|
57
54
|
case ExtractionStates.Succeeded:
|
|
58
|
-
return
|
|
59
|
-
animation={fadeOut}
|
|
60
|
-
onAnimationEnd={onAnimationEnd}
|
|
61
|
-
/>);
|
|
55
|
+
return <SucceededExtractionState animation={fadeOut} onAnimationEnd={onAnimationEnd} />;
|
|
62
56
|
case ExtractionStates.Failed:
|
|
63
|
-
return
|
|
64
|
-
animation={fadeOut}
|
|
65
|
-
onAnimationEnd={onAnimationEnd}
|
|
66
|
-
/>);
|
|
57
|
+
return <FailedExtractionState animation={fadeOut} onAnimationEnd={onAnimationEnd} />;
|
|
67
58
|
default:
|
|
68
59
|
return <></>;
|
|
69
60
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { Text } from "@itwin/itwinui-react";
|
|
7
7
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
@@ -21,11 +21,11 @@ export const SuccessfulExtractionToast = ({ iModelName, odataFeedUrl }: Successf
|
|
|
21
21
|
};
|
|
22
22
|
return (
|
|
23
23
|
<div>
|
|
24
|
-
<Text>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
>
|
|
24
|
+
<Text>
|
|
25
|
+
{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ExtractionSuccess")}
|
|
26
|
+
{iModelName}
|
|
27
|
+
</Text>
|
|
28
|
+
<a href="#" onClick={onClick}>
|
|
29
29
|
{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:CopyODataUrl")}
|
|
30
30
|
</a>
|
|
31
31
|
</div>
|
|
@@ -35,7 +35,10 @@ export const SuccessfulExtractionToast = ({ iModelName, odataFeedUrl }: Successf
|
|
|
35
35
|
export const FailedExtractionToast = ({ iModelName }: ExtractionToastProps) => {
|
|
36
36
|
return (
|
|
37
37
|
<div>
|
|
38
|
-
<Text>
|
|
38
|
+
<Text>
|
|
39
|
+
{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ExtractionFailed")}
|
|
40
|
+
{iModelName}
|
|
41
|
+
</Text>
|
|
39
42
|
</div>
|
|
40
43
|
);
|
|
41
44
|
};
|
|
@@ -40,10 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
&-selected {
|
|
42
42
|
border: 1px solid var(--iui-color-border-accent);
|
|
43
|
-
background: linear-gradient(
|
|
44
|
-
rgba(var(--iui-color-accent-hsl), var(--iui-opacity-6)),
|
|
45
|
-
rgba(var(--iui-color-accent-hsl), var(--iui-opacity-6))
|
|
46
|
-
),
|
|
43
|
+
background: linear-gradient(rgba(var(--iui-color-accent-hsl), var(--iui-opacity-6)), rgba(var(--iui-color-accent-hsl), var(--iui-opacity-6))),
|
|
47
44
|
linear-gradient(var(--iui-color-background), var(--iui-color-background));
|
|
48
45
|
}
|
|
49
46
|
}
|