@itwin/reports-config-widget-react 0.5.0 → 0.6.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 +47 -1
- package/CHANGELOG.md +14 -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 +130 -0
- package/api/reports-config-widget-react.exports.csv +14 -0
- package/api/temp/reports-config-widget-react.api.md +130 -0
- package/coverage/clover.xml +505 -504
- package/coverage/coverage-final.json +32 -32
- package/coverage/lcov-report/index.html +24 -24
- 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 +22 -64
- package/coverage/lcov-report/src/widget/components/ActionPanel.tsx.html +5 -38
- package/coverage/lcov-report/src/widget/components/AddMappingsModal.tsx.html +23 -119
- package/coverage/lcov-report/src/widget/components/BulkExtractor.ts.html +117 -90
- 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 +86 -299
- package/coverage/lcov-report/src/widget/components/Reports.tsx.html +40 -202
- package/coverage/lcov-report/src/widget/components/ReportsConfigContext.tsx.html +59 -44
- package/coverage/lcov-report/src/widget/components/ReportsContainer.tsx.html +10 -49
- 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 +6 -12
- 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 +1 -1
- package/coverage/lcov.info +917 -893
- 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.js +3 -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 +7 -0
- package/lib/cjs/widget/ReportsConfigUiProvider.d.ts.map +1 -1
- package/lib/cjs/widget/ReportsConfigUiProvider.js +8 -3
- 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 +7 -4
- 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 +8 -0
- package/lib/cjs/widget/components/ReportsConfigContext.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsConfigContext.js +13 -5
- package/lib/cjs/widget/components/ReportsConfigContext.js.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.d.ts +1 -1
- package/lib/cjs/widget/components/ReportsContainer.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.js +2 -4
- 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.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.js +3 -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 +7 -0
- package/lib/esm/widget/ReportsConfigUiProvider.d.ts.map +1 -1
- package/lib/esm/widget/ReportsConfigUiProvider.js +9 -4
- 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 +7 -4
- 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 +8 -0
- package/lib/esm/widget/components/ReportsConfigContext.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsConfigContext.js +14 -6
- package/lib/esm/widget/components/ReportsConfigContext.js.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.d.ts +1 -1
- package/lib/esm/widget/components/ReportsContainer.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.js +2 -4
- 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.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 +3 -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 +16 -30
- package/src/widget/components/ActionPanel.tsx +3 -14
- package/src/widget/components/AddMappingsModal.scss +1 -1
- package/src/widget/components/AddMappingsModal.tsx +19 -51
- package/src/widget/components/BulkExtractor.ts +63 -54
- 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 +59 -130
- package/src/widget/components/Reports.scss +0 -1
- package/src/widget/components/Reports.tsx +28 -82
- package/src/widget/components/ReportsConfigContext.tsx +30 -25
- package/src/widget/components/ReportsContainer.scss +1 -1
- package/src/widget/components/ReportsContainer.tsx +8 -21
- 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 +4 -6
- package/src/widget/hooks/useValidator.ts +10 -24
- package/tsconfig.json +11 -11
|
@@ -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
|
}
|
|
@@ -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 type { ReactNode } from "react";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { Text } from "@itwin/itwinui-react";
|
|
@@ -19,48 +19,27 @@ export interface HorizontalTileProps extends React.ComponentPropsWithoutRef<"div
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export const HorizontalTile = (props: HorizontalTileProps) => {
|
|
22
|
-
const {
|
|
23
|
-
title,
|
|
24
|
-
titleTooltip,
|
|
25
|
-
subText,
|
|
26
|
-
subtextToolTip,
|
|
27
|
-
actionGroup,
|
|
28
|
-
selected,
|
|
29
|
-
className,
|
|
30
|
-
onClickTitle,
|
|
31
|
-
...rest
|
|
32
|
-
} = props;
|
|
22
|
+
const { title, titleTooltip, subText, subtextToolTip, actionGroup, selected, className, onClickTitle, ...rest } = props;
|
|
33
23
|
|
|
34
24
|
return (
|
|
35
25
|
<div
|
|
36
|
-
className={classNames(
|
|
37
|
-
"rcw-horizontal-tile-container",
|
|
38
|
-
{ "rcw-horizontal-tile-selected": selected },
|
|
39
|
-
className
|
|
40
|
-
)}
|
|
26
|
+
className={classNames("rcw-horizontal-tile-container", { "rcw-horizontal-tile-selected": selected }, className)}
|
|
41
27
|
onClick={rest.onClick}
|
|
42
28
|
data-testid="horizontal-tile"
|
|
43
29
|
>
|
|
44
30
|
<div className="rcw-body-container">
|
|
45
31
|
<div className="rcw-body">
|
|
46
|
-
<Text className={classNames("rcw-body-text", { "iui-anchor": !!onClickTitle })}
|
|
47
|
-
|
|
48
|
-
variant="body"
|
|
49
|
-
title={titleTooltip}>{title}
|
|
32
|
+
<Text className={classNames("rcw-body-text", { "iui-anchor": !!onClickTitle })} onClick={onClickTitle} variant="body" title={titleTooltip}>
|
|
33
|
+
{title}
|
|
50
34
|
</Text>
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
isMuted={true}
|
|
55
|
-
title={subtextToolTip}
|
|
56
|
-
variant="small">{subText}
|
|
35
|
+
{subText && (
|
|
36
|
+
<Text className="rcw-body-text" isMuted={true} title={subtextToolTip} variant="small">
|
|
37
|
+
{subText}
|
|
57
38
|
</Text>
|
|
58
|
-
}
|
|
39
|
+
)}
|
|
59
40
|
</div>
|
|
60
41
|
</div>
|
|
61
|
-
<div
|
|
62
|
-
className="rcw-action-button"
|
|
63
|
-
data-testid="tile-action-button">
|
|
42
|
+
<div className="rcw-action-button" data-testid="tile-action-button">
|
|
64
43
|
{actionGroup}
|
|
65
44
|
</div>
|
|
66
45
|
</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 type { TablePaginatorRendererProps } from "@itwin/itwinui-react";
|
|
6
6
|
import { TablePaginator } from "@itwin/itwinui-react";
|
|
7
7
|
import React, { useMemo } from "react";
|
|
@@ -11,49 +11,18 @@ export const LocalizedTablePaginator = (props: TablePaginatorRendererProps) => {
|
|
|
11
11
|
const pageSizeList = useMemo(() => [10, 25, 50], []);
|
|
12
12
|
const paginationLocalization = useMemo(
|
|
13
13
|
() => ({
|
|
14
|
-
pageSizeLabel: (size: number) =>
|
|
15
|
-
|
|
16
|
-
"ReportsConfigWidget:Table.SizePerPage",
|
|
17
|
-
{ size }
|
|
18
|
-
),
|
|
19
|
-
rangeLabel: (
|
|
20
|
-
startIndex: number,
|
|
21
|
-
endIndex: number,
|
|
22
|
-
totalRows: number,
|
|
23
|
-
isLoading: boolean
|
|
24
|
-
) =>
|
|
14
|
+
pageSizeLabel: (size: number) => ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Table.SizePerPage", { size }),
|
|
15
|
+
rangeLabel: (startIndex: number, endIndex: number, totalRows: number, isLoading: boolean) =>
|
|
25
16
|
isLoading
|
|
26
|
-
? ReportsConfigWidget.localization.getLocalizedString(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{ startIndex, endIndex, totalRows }
|
|
33
|
-
),
|
|
34
|
-
previousPage: ReportsConfigWidget.localization.getLocalizedString(
|
|
35
|
-
"ReportsConfigWidget:Table.PreviousPage"
|
|
36
|
-
),
|
|
37
|
-
nextPage: ReportsConfigWidget.localization.getLocalizedString(
|
|
38
|
-
"ReportsConfigWidget:Table.NextPage"
|
|
39
|
-
),
|
|
40
|
-
goToPageLabel: (page: number) =>
|
|
41
|
-
ReportsConfigWidget.localization.getLocalizedString(
|
|
42
|
-
"ReportsConfigWidget:Table.GoToPage",
|
|
43
|
-
{ page }
|
|
44
|
-
),
|
|
45
|
-
rowsPerPageLabel: ReportsConfigWidget.localization.getLocalizedString(
|
|
46
|
-
"ReportsConfigWidget:Table.RowsPerPage"
|
|
47
|
-
),
|
|
17
|
+
? ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Table.StartIndexEndIndex", { startIndex, endIndex })
|
|
18
|
+
: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Table.StartIndexEndIndexOf", { startIndex, endIndex, totalRows }),
|
|
19
|
+
previousPage: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Table.PreviousPage"),
|
|
20
|
+
nextPage: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Table.NextPage"),
|
|
21
|
+
goToPageLabel: (page: number) => ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Table.GoToPage", { page }),
|
|
22
|
+
rowsPerPageLabel: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Table.RowsPerPage"),
|
|
48
23
|
}),
|
|
49
|
-
[]
|
|
24
|
+
[],
|
|
50
25
|
);
|
|
51
26
|
|
|
52
|
-
return
|
|
53
|
-
<TablePaginator
|
|
54
|
-
{...props}
|
|
55
|
-
pageSizeList={pageSizeList}
|
|
56
|
-
localization={paginationLocalization}
|
|
57
|
-
/>
|
|
58
|
-
);
|
|
27
|
+
return <TablePaginator {...props} pageSizeList={pageSizeList} localization={paginationLocalization} />;
|
|
59
28
|
};
|
|
@@ -1,26 +1,31 @@
|
|
|
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 { Fieldset, LabeledInput, Text } from "@itwin/itwinui-react";
|
|
6
6
|
import React, { useState } from "react";
|
|
7
7
|
import ActionPanel from "./ActionPanel";
|
|
8
8
|
import useValidator, { NAME_REQUIREMENTS } from "../hooks/useValidator";
|
|
9
|
-
import {
|
|
10
|
-
handleError,
|
|
11
|
-
handleInputChange,
|
|
12
|
-
} from "./utils";
|
|
9
|
+
import { handleError, handleInputChange } from "./utils";
|
|
13
10
|
import "./ReportAction.scss";
|
|
14
11
|
import type { Report } from "@itwin/insights-client";
|
|
15
12
|
import { useReportsConfigApi } from "../context/ReportsConfigApiContext";
|
|
16
13
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
17
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Props for the {@link ReportAction} component.
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
18
19
|
export interface ReportActionProps {
|
|
19
20
|
report?: Report;
|
|
20
21
|
onSaveSuccess: () => void;
|
|
21
22
|
onClickCancel?: () => void;
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Component to create or update a report.
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
24
29
|
export const ReportAction = ({ report, onSaveSuccess, onClickCancel }: ReportActionProps) => {
|
|
25
30
|
const { iTwinId, getAccessToken, reportsClient } = useReportsConfigApi();
|
|
26
31
|
const [values, setValues] = useState({
|
|
@@ -40,14 +45,14 @@ export const ReportAction = ({ report, onSaveSuccess, onClickCancel }: ReportAct
|
|
|
40
45
|
const accessToken = await getAccessToken();
|
|
41
46
|
report
|
|
42
47
|
? await reportsClient.updateReport(accessToken, report.id ?? "", {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
displayName: values.name,
|
|
49
|
+
description: values.description,
|
|
50
|
+
})
|
|
46
51
|
: await reportsClient.createReport(accessToken, {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
displayName: values.name,
|
|
53
|
+
description: values.description,
|
|
54
|
+
projectId: iTwinId,
|
|
55
|
+
});
|
|
51
56
|
onSaveSuccess();
|
|
52
57
|
setValues({
|
|
53
58
|
name: report?.displayName ?? "",
|
|
@@ -64,22 +69,13 @@ export const ReportAction = ({ report, onSaveSuccess, onClickCancel }: ReportAct
|
|
|
64
69
|
return (
|
|
65
70
|
<>
|
|
66
71
|
<div className="rcw-details-form-container">
|
|
67
|
-
<Fieldset
|
|
68
|
-
legend
|
|
69
|
-
"ReportsConfigWidget:
|
|
70
|
-
)}
|
|
71
|
-
className="rcw-details-form"
|
|
72
|
-
>
|
|
73
|
-
<Text variant='small' className="field-legend">
|
|
74
|
-
{ReportsConfigWidget.localization.getLocalizedString(
|
|
75
|
-
"ReportsConfigWidget:MandatoryFields"
|
|
76
|
-
)}
|
|
72
|
+
<Fieldset legend={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ReportDetails")} className="rcw-details-form">
|
|
73
|
+
<Text variant="small" className="field-legend">
|
|
74
|
+
{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:MandatoryFields")}
|
|
77
75
|
</Text>
|
|
78
76
|
<LabeledInput
|
|
79
77
|
name="name"
|
|
80
|
-
label={ReportsConfigWidget.localization.getLocalizedString(
|
|
81
|
-
"ReportsConfigWidget:Name"
|
|
82
|
-
)}
|
|
78
|
+
label={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Name")}
|
|
83
79
|
value={values.name}
|
|
84
80
|
required
|
|
85
81
|
disabled={isLoading}
|
|
@@ -88,11 +84,7 @@ export const ReportAction = ({ report, onSaveSuccess, onClickCancel }: ReportAct
|
|
|
88
84
|
validator.showMessageFor("name");
|
|
89
85
|
}}
|
|
90
86
|
message={validator.message("name", values.name, NAME_REQUIREMENTS)}
|
|
91
|
-
status={
|
|
92
|
-
validator.message("name", values.name, NAME_REQUIREMENTS)
|
|
93
|
-
? "negative"
|
|
94
|
-
: undefined
|
|
95
|
-
}
|
|
87
|
+
status={validator.message("name", values.name, NAME_REQUIREMENTS) ? "negative" : undefined}
|
|
96
88
|
onBlur={() => {
|
|
97
89
|
validator.showMessageFor("name");
|
|
98
90
|
}}
|
|
@@ -103,9 +95,7 @@ export const ReportAction = ({ report, onSaveSuccess, onClickCancel }: ReportAct
|
|
|
103
95
|
/>
|
|
104
96
|
<LabeledInput
|
|
105
97
|
name="description"
|
|
106
|
-
label={ReportsConfigWidget.localization.getLocalizedString(
|
|
107
|
-
"ReportsConfigWidget:Description"
|
|
108
|
-
)}
|
|
98
|
+
label={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Description")}
|
|
109
99
|
value={values.description}
|
|
110
100
|
onChange={(event) => {
|
|
111
101
|
handleInputChange(event, values, setValues);
|
|
@@ -115,9 +105,7 @@ export const ReportAction = ({ report, onSaveSuccess, onClickCancel }: ReportAct
|
|
|
115
105
|
</Fieldset>
|
|
116
106
|
</div>
|
|
117
107
|
<ActionPanel
|
|
118
|
-
actionLabel={ReportsConfigWidget.localization.getLocalizedString(
|
|
119
|
-
"ReportsConfigWidget:Add"
|
|
120
|
-
)}
|
|
108
|
+
actionLabel={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Add")}
|
|
121
109
|
onAction={onSave}
|
|
122
110
|
onCancel={onClickCancel}
|
|
123
111
|
isSavingDisabled={!values.name}
|
|
@@ -126,4 +114,3 @@ export const ReportAction = ({ report, onSaveSuccess, onClickCancel }: ReportAct
|
|
|
126
114
|
</>
|
|
127
115
|
);
|
|
128
116
|
};
|
|
129
|
-
|
|
@@ -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, { useEffect, useRef, useState } from "react";
|
|
6
6
|
import type { BulkExtractor } from "./BulkExtractor";
|
|
7
7
|
import { ExtractionStates, ExtractionStatus } from "./ExtractionStatus";
|
|
@@ -9,16 +9,8 @@ import type { BeEvent } from "@itwin/core-bentley";
|
|
|
9
9
|
import { STATUS_CHECK_INTERVAL } from "./Constants";
|
|
10
10
|
import type { Report } from "@itwin/insights-client";
|
|
11
11
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
IconButton,
|
|
15
|
-
MenuItem,
|
|
16
|
-
} from "@itwin/itwinui-react";
|
|
17
|
-
import {
|
|
18
|
-
SvgDelete,
|
|
19
|
-
SvgEdit,
|
|
20
|
-
SvgMore,
|
|
21
|
-
} from "@itwin/itwinui-icons-react";
|
|
12
|
+
import { DropdownMenu, IconButton, MenuItem } from "@itwin/itwinui-react";
|
|
13
|
+
import { SvgDelete, SvgEdit, SvgMore } from "@itwin/itwinui-icons-react";
|
|
22
14
|
import { HorizontalTile } from "./HorizontalTile";
|
|
23
15
|
|
|
24
16
|
export interface ReportHorizontalTileProps {
|
|
@@ -82,48 +74,46 @@ export const ReportHorizontalTile = (props: ReportHorizontalTileProps) => {
|
|
|
82
74
|
onClick={onClickTile}
|
|
83
75
|
onClickTitle={() => props.onClickTitle?.(props.report)}
|
|
84
76
|
selected={props.selected}
|
|
85
|
-
actionGroup={
|
|
86
|
-
|
|
87
|
-
className="rcw-action-button"
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
></ExtractionStatus>
|
|
126
|
-
)}
|
|
77
|
+
actionGroup={
|
|
78
|
+
extractionState === ExtractionStates.None ? (
|
|
79
|
+
<div className="rcw-action-button" data-testid="tile-action-button">
|
|
80
|
+
<DropdownMenu
|
|
81
|
+
menuItems={(close: () => void) =>
|
|
82
|
+
[
|
|
83
|
+
props.onClickModify ? (
|
|
84
|
+
<MenuItem key={0} onClick={() => props.onClickModify?.(props.report)} icon={<SvgEdit />}>
|
|
85
|
+
{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Modify")}
|
|
86
|
+
</MenuItem>
|
|
87
|
+
) : (
|
|
88
|
+
[]
|
|
89
|
+
),
|
|
90
|
+
<MenuItem
|
|
91
|
+
key={1}
|
|
92
|
+
onClick={() => {
|
|
93
|
+
props.onClickDelete();
|
|
94
|
+
close();
|
|
95
|
+
}}
|
|
96
|
+
icon={<SvgDelete />}
|
|
97
|
+
>
|
|
98
|
+
{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Remove")}
|
|
99
|
+
</MenuItem>,
|
|
100
|
+
].flat()
|
|
101
|
+
}
|
|
102
|
+
>
|
|
103
|
+
<IconButton styleType="borderless" title={ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ReportOptions")}>
|
|
104
|
+
<SvgMore />
|
|
105
|
+
</IconButton>
|
|
106
|
+
</DropdownMenu>
|
|
107
|
+
</div>
|
|
108
|
+
) : (
|
|
109
|
+
<ExtractionStatus
|
|
110
|
+
state={extractionState}
|
|
111
|
+
clearExtractionState={() => {
|
|
112
|
+
setExtractionState(ExtractionStates.None);
|
|
113
|
+
}}
|
|
114
|
+
></ExtractionStatus>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
127
117
|
></HorizontalTile>
|
|
128
118
|
);
|
|
129
119
|
};
|