@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,14 +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
|
import { SvgChevronLeft } from "@itwin/itwinui-icons-react";
|
|
6
|
-
import {
|
|
7
|
-
Icon,
|
|
8
|
-
ProgressRadial,
|
|
9
|
-
Text,
|
|
10
|
-
toaster,
|
|
11
|
-
} from "@itwin/itwinui-react";
|
|
6
|
+
import { Icon, ProgressRadial, Text, toaster } from "@itwin/itwinui-react";
|
|
12
7
|
import "./utils.scss";
|
|
13
8
|
import React from "react";
|
|
14
9
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
@@ -19,11 +14,7 @@ export interface WidgetHeaderProps {
|
|
|
19
14
|
returnFn?: () => void;
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
export const WidgetHeader = ({
|
|
23
|
-
title,
|
|
24
|
-
disabled = false,
|
|
25
|
-
returnFn,
|
|
26
|
-
}: WidgetHeaderProps) => {
|
|
17
|
+
export const WidgetHeader = ({ title, disabled = false, returnFn }: WidgetHeaderProps) => {
|
|
27
18
|
return (
|
|
28
19
|
<div className="rcw-widget-header-container">
|
|
29
20
|
{returnFn && (
|
|
@@ -44,76 +35,46 @@ export const WidgetHeader = ({
|
|
|
44
35
|
};
|
|
45
36
|
|
|
46
37
|
export const handleError = (errorStatus: number) => {
|
|
47
|
-
let errorMessage = `${ReportsConfigWidget.localization.getLocalizedString(
|
|
48
|
-
"ReportsConfigWidget:ErrorMessages.Error"
|
|
49
|
-
)} `;
|
|
38
|
+
let errorMessage = `${ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.Error")} `;
|
|
50
39
|
switch (errorStatus) {
|
|
51
40
|
case 401:
|
|
52
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
53
|
-
"ReportsConfigWidget:ErrorMessages.401"
|
|
54
|
-
);
|
|
41
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.401");
|
|
55
42
|
break;
|
|
56
43
|
case 403:
|
|
57
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
58
|
-
"ReportsConfigWidget:ErrorMessages.403"
|
|
59
|
-
);
|
|
44
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.403");
|
|
60
45
|
break;
|
|
61
46
|
case 404:
|
|
62
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
63
|
-
"ReportsConfigWidget:ErrorMessages.404"
|
|
64
|
-
);
|
|
47
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.404");
|
|
65
48
|
break;
|
|
66
49
|
case 409:
|
|
67
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
68
|
-
"ReportsConfigWidget:ErrorMessages.409"
|
|
69
|
-
);
|
|
50
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.409");
|
|
70
51
|
break;
|
|
71
52
|
case 422:
|
|
72
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
73
|
-
"ReportsConfigWidget:ErrorMessages.422"
|
|
74
|
-
);
|
|
53
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.422");
|
|
75
54
|
break;
|
|
76
55
|
case 429:
|
|
77
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
78
|
-
"ReportsConfigWidget:ErrorMessages.429"
|
|
79
|
-
);
|
|
56
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.429");
|
|
80
57
|
break;
|
|
81
58
|
case 500:
|
|
82
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
83
|
-
"ReportsConfigWidget:ErrorMessages.500"
|
|
84
|
-
);
|
|
59
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.500");
|
|
85
60
|
break;
|
|
86
61
|
case 502:
|
|
87
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
88
|
-
"ReportsConfigWidget:ErrorMessages.502"
|
|
89
|
-
);
|
|
62
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.502");
|
|
90
63
|
break;
|
|
91
64
|
case 503:
|
|
92
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
93
|
-
"ReportsConfigWidget:ErrorMessages.503"
|
|
94
|
-
);
|
|
65
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.503");
|
|
95
66
|
break;
|
|
96
67
|
default:
|
|
97
|
-
errorMessage += ReportsConfigWidget.localization.getLocalizedString(
|
|
98
|
-
"ReportsConfigWidget:ErrorMessages.SomethingWentWrong"
|
|
99
|
-
);
|
|
68
|
+
errorMessage += ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ErrorMessages.SomethingWentWrong");
|
|
100
69
|
}
|
|
101
70
|
toaster.negative(errorMessage);
|
|
102
71
|
};
|
|
103
72
|
|
|
104
73
|
export const LoadingOverlay = () => (
|
|
105
74
|
<div className="rcw-center-overlay">
|
|
106
|
-
<Text>
|
|
107
|
-
{ReportsConfigWidget.localization.getLocalizedString(
|
|
108
|
-
"ReportsConfigWidget:Loading"
|
|
109
|
-
)}
|
|
110
|
-
</Text>
|
|
75
|
+
<Text>{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Loading")}</Text>
|
|
111
76
|
<ProgressRadial indeterminate />
|
|
112
|
-
<Text>
|
|
113
|
-
{ReportsConfigWidget.localization.getLocalizedString(
|
|
114
|
-
"ReportsConfigWidget:PleaseWait"
|
|
115
|
-
)}
|
|
116
|
-
</Text>
|
|
77
|
+
<Text>{ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:PleaseWait")}</Text>
|
|
117
78
|
</div>
|
|
118
79
|
);
|
|
119
80
|
interface EmptyMessageProps {
|
|
@@ -123,11 +84,7 @@ export const EmptyMessage = ({ children }: EmptyMessageProps) => {
|
|
|
123
84
|
return <div className="rcw-center-overlay">{children}</div>;
|
|
124
85
|
};
|
|
125
86
|
|
|
126
|
-
export const handleInputChange = <T,>(
|
|
127
|
-
e: React.ChangeEvent<HTMLInputElement>,
|
|
128
|
-
values: T,
|
|
129
|
-
setValues: React.Dispatch<React.SetStateAction<T>>
|
|
130
|
-
) => {
|
|
87
|
+
export const handleInputChange = <T,>(e: React.ChangeEvent<HTMLInputElement>, values: T, setValues: React.Dispatch<React.SetStateAction<T>>) => {
|
|
131
88
|
const { name, value } = e.target;
|
|
132
89
|
|
|
133
90
|
setValues({
|
|
@@ -138,18 +95,13 @@ export const handleInputChange = <T,>(
|
|
|
138
95
|
|
|
139
96
|
export const LoadingSpinner = () => {
|
|
140
97
|
return (
|
|
141
|
-
<div
|
|
142
|
-
className="rcw-loading-spinner"
|
|
143
|
-
data-testid="rcw-action-loading-spinner"
|
|
144
|
-
>
|
|
98
|
+
<div className="rcw-loading-spinner" data-testid="rcw-action-loading-spinner">
|
|
145
99
|
<ProgressRadial size="small" indeterminate />
|
|
146
100
|
</div>
|
|
147
101
|
);
|
|
148
102
|
};
|
|
149
103
|
|
|
150
|
-
export const SkeletonBlock = () =>
|
|
151
|
-
<div className="rcw-skeleton-block iui-skeleton" />
|
|
152
|
-
);
|
|
104
|
+
export const SkeletonBlock = () => <div className="rcw-skeleton-block iui-skeleton" />;
|
|
153
105
|
|
|
154
106
|
export const generateUrl = (baseUrl: string, newBaseUrl: string) => {
|
|
155
107
|
return baseUrl.replace("https://api.bentley.com", newBaseUrl);
|
|
@@ -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 { AccessToken } from "@itwin/core-bentley";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { createContext } from "react";
|
|
@@ -18,9 +18,7 @@ export const BulkExtractorContext = createContext<BulkExtractorContextProps>({})
|
|
|
18
18
|
export const useBulkExtractor = () => {
|
|
19
19
|
const context = React.useContext(BulkExtractorContext);
|
|
20
20
|
if (!context) {
|
|
21
|
-
throw new Error(
|
|
22
|
-
"useBulkExtractor should be used within a BulkExtractorContext provider"
|
|
23
|
-
);
|
|
21
|
+
throw new Error("useBulkExtractor should be used within a BulkExtractorContext provider");
|
|
24
22
|
}
|
|
25
23
|
return context;
|
|
26
24
|
};
|
|
@@ -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 { AccessToken } from "@itwin/core-bentley";
|
|
6
6
|
import { IModelsClient } from "@itwin/imodels-client-management";
|
|
7
7
|
import { MappingsClient, ReportsClient } from "@itwin/insights-client";
|
|
@@ -31,9 +31,7 @@ export const ReportsConfigApiContext = createContext<ReportsConfigApiProps>({
|
|
|
31
31
|
export const useReportsConfigApi = () => {
|
|
32
32
|
const context = React.useContext(ReportsConfigApiContext);
|
|
33
33
|
if (!context) {
|
|
34
|
-
throw new Error(
|
|
35
|
-
"useReportsConfigApi should be used within a ReportsConfigApiContext provider"
|
|
36
|
-
);
|
|
34
|
+
throw new Error("useReportsConfigApi should be used within a ReportsConfigApiContext provider");
|
|
37
35
|
}
|
|
38
36
|
return context;
|
|
39
37
|
};
|
|
@@ -1,48 +1,36 @@
|
|
|
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 { useState } from "react";
|
|
6
6
|
import SimpleReactValidator from "simple-react-validator";
|
|
7
7
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
8
8
|
|
|
9
|
-
export const NAME_REQUIREMENTS =
|
|
10
|
-
"required|NoDuplicateUnderscore|OnlyBeginsWithLetterOrUnderscore|FollowedByLettersUnderscoresSpacesAndDigits|CharLimit";
|
|
9
|
+
export const NAME_REQUIREMENTS = "required|NoDuplicateUnderscore|OnlyBeginsWithLetterOrUnderscore|FollowedByLettersUnderscoresSpacesAndDigits|CharLimit";
|
|
11
10
|
|
|
12
|
-
const useValidator = (): [
|
|
13
|
-
SimpleReactValidator,
|
|
14
|
-
React.Dispatch<React.SetStateAction<boolean>>
|
|
15
|
-
] => {
|
|
11
|
+
const useValidator = (): [SimpleReactValidator, React.Dispatch<React.SetStateAction<boolean>>] => {
|
|
16
12
|
const [show, setShow] = useState(false);
|
|
17
13
|
const customValidator = {
|
|
18
14
|
NoDuplicateUnderscore: {
|
|
19
|
-
message: ReportsConfigWidget.localization.getLocalizedString(
|
|
20
|
-
"ReportsConfigWidget:Validators.NoDuplicateUnderscore"
|
|
21
|
-
),
|
|
15
|
+
message: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Validators.NoDuplicateUnderscore"),
|
|
22
16
|
rule: (val: string) => {
|
|
23
17
|
return !val.match(/__+/i);
|
|
24
18
|
},
|
|
25
19
|
},
|
|
26
20
|
OnlyBeginsWithLetterOrUnderscore: {
|
|
27
|
-
message: ReportsConfigWidget.localization.getLocalizedString(
|
|
28
|
-
"ReportsConfigWidget:Validators.OnlyBeginsWithLetterOrUnderscore"
|
|
29
|
-
),
|
|
21
|
+
message: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Validators.OnlyBeginsWithLetterOrUnderscore"),
|
|
30
22
|
rule: (val: string) => {
|
|
31
23
|
return !val.match(/^[\W\d]+/i);
|
|
32
24
|
},
|
|
33
25
|
},
|
|
34
26
|
FollowedByLettersUnderscoresSpacesAndDigits: {
|
|
35
|
-
message: ReportsConfigWidget.localization.getLocalizedString(
|
|
36
|
-
"ReportsConfigWidget:Validators.FollowedByLettersUnderscoresSpacesAndDigits"
|
|
37
|
-
),
|
|
27
|
+
message: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Validators.FollowedByLettersUnderscoresSpacesAndDigits"),
|
|
38
28
|
rule: (val: string) => {
|
|
39
29
|
return !val.match(/[^a-zA-Z0-9_\s]+/i);
|
|
40
30
|
},
|
|
41
31
|
},
|
|
42
32
|
CharLimit: {
|
|
43
|
-
message: ReportsConfigWidget.localization.getLocalizedString(
|
|
44
|
-
"ReportsConfigWidget:Validators.CharLimit"
|
|
45
|
-
),
|
|
33
|
+
message: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Validators.CharLimit"),
|
|
46
34
|
rule: (val: string) => {
|
|
47
35
|
return val.length <= 128;
|
|
48
36
|
},
|
|
@@ -50,9 +38,7 @@ const useValidator = (): [
|
|
|
50
38
|
};
|
|
51
39
|
|
|
52
40
|
const customMessages = {
|
|
53
|
-
required: ReportsConfigWidget.localization.getLocalizedString(
|
|
54
|
-
"ReportsConfigWidget:Validators.ThisFieldIsRequired"
|
|
55
|
-
),
|
|
41
|
+
required: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Validators.ThisFieldIsRequired"),
|
|
56
42
|
};
|
|
57
43
|
|
|
58
44
|
const validator = new SimpleReactValidator({
|
package/tsconfig.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./node_modules/@itwin/build-tools/tsconfig-base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"skipLibCheck": true,
|
|
5
|
-
"jsx": "react",
|
|
6
|
-
"preserveSymlinks": true,
|
|
7
|
-
"esModuleInterop": true
|
|
8
|
-
},
|
|
9
|
-
"include": ["./src/**/*.ts*"],
|
|
10
|
-
"exclude": ["lib", "node_modules"]
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./node_modules/@itwin/build-tools/tsconfig-base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"skipLibCheck": true,
|
|
5
|
+
"jsx": "react",
|
|
6
|
+
"preserveSymlinks": true,
|
|
7
|
+
"esModuleInterop": true
|
|
8
|
+
},
|
|
9
|
+
"include": ["./src/**/*.ts*"],
|
|
10
|
+
"exclude": ["lib", "node_modules"]
|
|
11
|
+
}
|