@itwin/reports-config-widget-react 0.2.1 → 0.4.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/.rush/temp/operation/rebuild/all.log +9 -0
- package/.rush/temp/operation/rebuild/state.json +3 -0
- package/.rush/temp/package-deps_rebuild.json +48 -44
- package/.rush/temp/shrinkwrap-deps.json +228 -207
- package/CHANGELOG.json +44 -0
- package/CHANGELOG.md +24 -1
- package/coverage/clover.xml +562 -542
- package/coverage/coverage-final.json +24 -20
- package/coverage/lcov-report/index.html +51 -51
- package/coverage/lcov-report/src/ReportsConfigWidget.ts.html +22 -22
- package/coverage/lcov-report/src/index.html +21 -21
- package/coverage/lcov-report/src/test/index.html +11 -11
- package/coverage/lcov-report/src/test/test-utils.tsx.html +20 -140
- package/coverage/lcov-report/src/widget/ReportsConfigUiProvider.tsx.html +14 -35
- package/coverage/lcov-report/src/widget/components/ActionPanel.tsx.html +26 -20
- package/coverage/lcov-report/src/widget/components/AddMappingsModal.tsx.html +94 -109
- package/coverage/lcov-report/src/widget/components/BulkExtractor.ts.html +55 -52
- package/coverage/lcov-report/src/widget/components/Constants.ts.html +1 -1
- package/coverage/lcov-report/src/widget/components/DeleteModal.tsx.html +28 -46
- package/coverage/lcov-report/src/widget/components/ExtractionStates/FailedExtractionState.tsx.html +1 -1
- package/coverage/lcov-report/src/widget/components/ExtractionStates/QueuedExtractionState.tsx.html +1 -1
- package/coverage/lcov-report/src/widget/components/ExtractionStates/RunningExtractionState.tsx.html +1 -1
- package/coverage/lcov-report/src/widget/components/ExtractionStates/StartingExtractionState.tsx.html +1 -1
- package/coverage/lcov-report/src/widget/components/ExtractionStates/SucceededExtractionState.tsx.html +1 -1
- package/coverage/lcov-report/src/widget/components/ExtractionStates/index.html +1 -1
- package/coverage/lcov-report/src/widget/components/ExtractionStatus.tsx.html +1 -1
- package/coverage/lcov-report/src/widget/components/ExtractionToast.tsx.html +1 -1
- package/coverage/lcov-report/src/widget/components/HorizontalTile.tsx.html +3 -3
- package/coverage/lcov-report/src/widget/components/LocalizedTablePaginator.tsx.html +8 -8
- package/coverage/lcov-report/src/widget/components/ReportAction.tsx.html +36 -81
- package/coverage/lcov-report/src/widget/components/ReportHorizontalTile.tsx.html +38 -41
- package/coverage/lcov-report/src/widget/components/ReportMappingHorizontalTile.tsx.html +46 -46
- package/coverage/lcov-report/src/widget/components/ReportMappings.tsx.html +127 -142
- package/coverage/lcov-report/src/widget/components/Reports.tsx.html +189 -312
- package/coverage/lcov-report/src/widget/components/ReportsConfigContext.tsx.html +370 -0
- package/coverage/lcov-report/src/widget/components/ReportsContainer.tsx.html +111 -33
- package/coverage/lcov-report/src/widget/components/ReportsHeader.tsx.html +166 -0
- package/coverage/lcov-report/src/widget/components/ReportsRouter.tsx.html +274 -0
- package/coverage/lcov-report/src/widget/components/SearchBar.tsx.html +22 -7
- package/coverage/lcov-report/src/widget/components/SelectIModel.tsx.html +40 -94
- package/coverage/lcov-report/src/widget/components/index.html +142 -97
- package/coverage/lcov-report/src/widget/components/utils.tsx.html +22 -19
- package/coverage/lcov-report/src/widget/context/{ReportsApiConfigContext.tsx.html → BulkExtractorContext.tsx.html} +23 -26
- package/coverage/lcov-report/src/widget/context/ReportsConfigApiContext.tsx.html +202 -0
- package/coverage/lcov-report/src/widget/context/index.html +30 -15
- package/coverage/lcov-report/src/widget/hooks/index.html +1 -1
- package/coverage/lcov-report/src/widget/hooks/useValidator.ts.html +11 -11
- package/coverage/lcov-report/src/widget/index.html +13 -13
- package/coverage/lcov.info +1036 -1034
- package/jest.config.js +1 -0
- package/lib/cjs/ReportsConfigWidget.js +1 -1
- package/lib/cjs/ReportsConfigWidget.js.map +1 -1
- package/lib/cjs/reports-config-widget-react.d.ts +5 -0
- package/lib/cjs/reports-config-widget-react.d.ts.map +1 -1
- package/lib/cjs/reports-config-widget-react.js +11 -0
- package/lib/cjs/reports-config-widget-react.js.map +1 -1
- package/lib/cjs/test/AddMappingModal.test.js +20 -34
- package/lib/cjs/test/AddMappingModal.test.js.map +1 -1
- package/lib/cjs/test/BulkExtractor.test.js +13 -19
- package/lib/cjs/test/BulkExtractor.test.js.map +1 -1
- package/lib/cjs/test/DeleteModal.test.d.ts.map +1 -1
- package/lib/cjs/test/DeleteModal.test.js +4 -62
- package/lib/cjs/test/DeleteModal.test.js.map +1 -1
- package/lib/cjs/test/ReportAction.test.js +14 -79
- package/lib/cjs/test/ReportAction.test.js.map +1 -1
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js +20 -54
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js.map +1 -1
- package/lib/cjs/test/ReportMappings.test.d.ts.map +1 -1
- package/lib/cjs/test/ReportMappings.test.js +51 -106
- package/lib/cjs/test/ReportMappings.test.js.map +1 -1
- package/lib/cjs/test/Reports.test.js +41 -96
- package/lib/cjs/test/Reports.test.js.map +1 -1
- package/lib/cjs/test/WidgetHeader.test.js +9 -3
- package/lib/cjs/test/WidgetHeader.test.js.map +1 -1
- package/lib/cjs/test/test-utils.d.ts +3 -8
- package/lib/cjs/test/test-utils.d.ts.map +1 -1
- package/lib/cjs/test/test-utils.js +6 -34
- package/lib/cjs/test/test-utils.js.map +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/widget/ReportsConfigUiProvider.d.ts +3 -3
- package/lib/cjs/widget/ReportsConfigUiProvider.d.ts.map +1 -1
- package/lib/cjs/widget/ReportsConfigUiProvider.js +5 -7
- package/lib/cjs/widget/ReportsConfigUiProvider.js.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.d.ts +3 -3
- package/lib/cjs/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.js +4 -4
- package/lib/cjs/widget/components/ActionPanel.js.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.scss +2 -3
- package/lib/cjs/widget/components/AddMappingsModal.d.ts +4 -4
- package/lib/cjs/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.js +39 -43
- package/lib/cjs/widget/components/AddMappingsModal.js.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.scss +1 -2
- package/lib/cjs/widget/components/BulkExtractor.d.ts +4 -4
- package/lib/cjs/widget/components/BulkExtractor.d.ts.map +1 -1
- package/lib/cjs/widget/components/BulkExtractor.js +8 -8
- package/lib/cjs/widget/components/BulkExtractor.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.d.ts +4 -5
- package/lib/cjs/widget/components/DeleteModal.d.ts.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.js +11 -15
- package/lib/cjs/widget/components/DeleteModal.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.scss +2 -3
- package/lib/cjs/widget/components/ExtractionStatus.js +2 -2
- package/lib/cjs/widget/components/ExtractionStatus.js.map +1 -1
- package/lib/cjs/widget/components/ExtractionStatus.scss +6 -7
- package/lib/cjs/widget/components/HorizontalTile.js +2 -2
- package/lib/cjs/widget/components/HorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.scss +11 -14
- package/lib/cjs/widget/components/LocalizedTablePaginator.js +2 -2
- package/lib/cjs/widget/components/LocalizedTablePaginator.js.map +1 -1
- package/lib/cjs/widget/components/ReportAction.d.ts +4 -5
- package/lib/cjs/widget/components/ReportAction.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportAction.js +24 -26
- package/lib/cjs/widget/components/ReportAction.js.map +1 -1
- package/lib/cjs/widget/components/ReportAction.scss +1 -2
- package/lib/cjs/widget/components/ReportHorizontalTile.d.ts +4 -4
- package/lib/cjs/widget/components/ReportHorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportHorizontalTile.js +33 -20
- package/lib/cjs/widget/components/ReportHorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.d.ts +1 -1
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js +36 -21
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.d.ts +4 -6
- package/lib/cjs/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.js +50 -63
- package/lib/cjs/widget/components/ReportMappings.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.scss +10 -11
- package/lib/cjs/widget/components/Reports.d.ts +6 -1
- package/lib/cjs/widget/components/Reports.d.ts.map +1 -1
- package/lib/cjs/widget/components/Reports.js +53 -94
- package/lib/cjs/widget/components/Reports.js.map +1 -1
- package/lib/cjs/widget/components/Reports.scss +15 -15
- package/lib/cjs/widget/components/ReportsConfigContext.d.ts +18 -0
- package/lib/cjs/widget/components/ReportsConfigContext.d.ts.map +1 -0
- package/lib/cjs/widget/components/ReportsConfigContext.js +79 -0
- package/lib/cjs/widget/components/ReportsConfigContext.js.map +1 -0
- package/lib/cjs/widget/components/ReportsContainer.d.ts +14 -0
- package/lib/cjs/widget/components/ReportsContainer.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.js +27 -16
- package/lib/cjs/widget/components/ReportsContainer.js.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.scss +1 -3
- package/lib/cjs/widget/components/ReportsHeader.d.ts +7 -0
- package/lib/cjs/widget/components/ReportsHeader.d.ts.map +1 -0
- package/lib/cjs/widget/components/ReportsHeader.js +20 -0
- package/lib/cjs/widget/components/ReportsHeader.js.map +1 -0
- package/lib/cjs/widget/components/ReportsRouter.d.ts +8 -0
- package/lib/cjs/widget/components/ReportsRouter.d.ts.map +1 -0
- package/lib/cjs/widget/components/ReportsRouter.js +51 -0
- package/lib/cjs/widget/components/ReportsRouter.js.map +1 -0
- package/lib/cjs/widget/components/SearchBar.d.ts.map +1 -1
- package/lib/cjs/widget/components/SearchBar.js +4 -5
- package/lib/cjs/widget/components/SearchBar.js.map +1 -1
- package/lib/cjs/widget/components/SearchBar.scss +1 -2
- package/lib/cjs/widget/components/SelectIModel.d.ts +3 -3
- package/lib/cjs/widget/components/SelectIModel.d.ts.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.js +10 -30
- package/lib/cjs/widget/components/SelectIModel.js.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.scss +2 -3
- 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 +1 -1
- package/lib/cjs/widget/components/utils.js.map +1 -1
- package/lib/cjs/widget/components/utils.scss +16 -8
- package/lib/cjs/widget/context/BulkExtractorContext.d.ts +10 -0
- package/lib/cjs/widget/context/BulkExtractorContext.d.ts.map +1 -0
- package/lib/cjs/widget/context/{ReportsApiConfigContext.js → BulkExtractorContext.js} +7 -10
- package/lib/cjs/widget/context/BulkExtractorContext.js.map +1 -0
- package/lib/cjs/widget/context/ReportsConfigApiContext.d.ts +16 -0
- package/lib/cjs/widget/context/ReportsConfigApiContext.d.ts.map +1 -0
- package/lib/cjs/widget/context/ReportsConfigApiContext.js +43 -0
- package/lib/cjs/widget/context/ReportsConfigApiContext.js.map +1 -0
- package/lib/cjs/widget/hooks/useValidator.js +1 -1
- package/lib/cjs/widget/hooks/useValidator.js.map +1 -1
- package/lib/esm/ReportsConfigWidget.js +1 -1
- package/lib/esm/ReportsConfigWidget.js.map +1 -1
- package/lib/esm/reports-config-widget-react.d.ts +5 -0
- package/lib/esm/reports-config-widget-react.d.ts.map +1 -1
- package/lib/esm/reports-config-widget-react.js +5 -0
- package/lib/esm/reports-config-widget-react.js.map +1 -1
- package/lib/esm/test/AddMappingModal.test.js +17 -31
- package/lib/esm/test/AddMappingModal.test.js.map +1 -1
- package/lib/esm/test/BulkExtractor.test.js +14 -17
- package/lib/esm/test/BulkExtractor.test.js.map +1 -1
- package/lib/esm/test/DeleteModal.test.d.ts.map +1 -1
- package/lib/esm/test/DeleteModal.test.js +5 -44
- package/lib/esm/test/DeleteModal.test.js.map +1 -1
- package/lib/esm/test/ReportAction.test.js +14 -60
- package/lib/esm/test/ReportAction.test.js.map +1 -1
- package/lib/esm/test/ReportMappingHorizontalTile.test.js +4 -38
- package/lib/esm/test/ReportMappingHorizontalTile.test.js.map +1 -1
- package/lib/esm/test/ReportMappings.test.d.ts.map +1 -1
- package/lib/esm/test/ReportMappings.test.js +43 -98
- package/lib/esm/test/ReportMappings.test.js.map +1 -1
- package/lib/esm/test/Reports.test.js +24 -60
- package/lib/esm/test/Reports.test.js.map +1 -1
- package/lib/esm/test/WidgetHeader.test.js +8 -2
- package/lib/esm/test/WidgetHeader.test.js.map +1 -1
- package/lib/esm/test/test-utils.d.ts +3 -8
- package/lib/esm/test/test-utils.d.ts.map +1 -1
- package/lib/esm/test/test-utils.js +4 -31
- package/lib/esm/test/test-utils.js.map +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/widget/ReportsConfigUiProvider.d.ts +3 -3
- package/lib/esm/widget/ReportsConfigUiProvider.d.ts.map +1 -1
- package/lib/esm/widget/ReportsConfigUiProvider.js +2 -4
- package/lib/esm/widget/ReportsConfigUiProvider.js.map +1 -1
- package/lib/esm/widget/components/ActionPanel.d.ts +3 -3
- package/lib/esm/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/esm/widget/components/ActionPanel.js +4 -4
- package/lib/esm/widget/components/ActionPanel.js.map +1 -1
- package/lib/esm/widget/components/ActionPanel.scss +2 -3
- package/lib/esm/widget/components/AddMappingsModal.d.ts +4 -4
- package/lib/esm/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.js +35 -39
- package/lib/esm/widget/components/AddMappingsModal.js.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.scss +1 -2
- package/lib/esm/widget/components/BulkExtractor.d.ts +4 -4
- package/lib/esm/widget/components/BulkExtractor.d.ts.map +1 -1
- package/lib/esm/widget/components/BulkExtractor.js +7 -8
- package/lib/esm/widget/components/BulkExtractor.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.d.ts +4 -5
- package/lib/esm/widget/components/DeleteModal.d.ts.map +1 -1
- package/lib/esm/widget/components/DeleteModal.js +11 -15
- package/lib/esm/widget/components/DeleteModal.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.scss +2 -3
- package/lib/esm/widget/components/ExtractionStatus.scss +6 -7
- package/lib/esm/widget/components/HorizontalTile.scss +11 -14
- package/lib/esm/widget/components/ReportAction.d.ts +4 -5
- package/lib/esm/widget/components/ReportAction.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportAction.js +17 -21
- package/lib/esm/widget/components/ReportAction.js.map +1 -1
- package/lib/esm/widget/components/ReportAction.scss +1 -2
- package/lib/esm/widget/components/ReportHorizontalTile.d.ts +4 -4
- package/lib/esm/widget/components/ReportHorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportHorizontalTile.js +6 -9
- package/lib/esm/widget/components/ReportHorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/ReportMappingHorizontalTile.d.ts +1 -1
- package/lib/esm/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js +12 -13
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/ReportMappings.d.ts +4 -6
- package/lib/esm/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportMappings.js +43 -56
- package/lib/esm/widget/components/ReportMappings.js.map +1 -1
- package/lib/esm/widget/components/ReportMappings.scss +10 -11
- package/lib/esm/widget/components/Reports.d.ts +6 -1
- package/lib/esm/widget/components/Reports.d.ts.map +1 -1
- package/lib/esm/widget/components/Reports.js +46 -87
- package/lib/esm/widget/components/Reports.js.map +1 -1
- package/lib/esm/widget/components/Reports.scss +15 -15
- package/lib/esm/widget/components/ReportsConfigContext.d.ts +18 -0
- package/lib/esm/widget/components/ReportsConfigContext.d.ts.map +1 -0
- package/lib/esm/widget/components/ReportsConfigContext.js +56 -0
- package/lib/esm/widget/components/ReportsConfigContext.js.map +1 -0
- package/lib/esm/widget/components/ReportsContainer.d.ts +14 -0
- package/lib/esm/widget/components/ReportsContainer.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.js +27 -17
- package/lib/esm/widget/components/ReportsContainer.js.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.scss +1 -3
- package/lib/esm/widget/components/ReportsHeader.d.ts +7 -0
- package/lib/esm/widget/components/ReportsHeader.d.ts.map +1 -0
- package/lib/esm/widget/components/ReportsHeader.js +13 -0
- package/lib/esm/widget/components/ReportsHeader.js.map +1 -0
- package/lib/esm/widget/components/ReportsRouter.d.ts +8 -0
- package/lib/esm/widget/components/ReportsRouter.d.ts.map +1 -0
- package/lib/esm/widget/components/ReportsRouter.js +44 -0
- package/lib/esm/widget/components/ReportsRouter.js.map +1 -0
- package/lib/esm/widget/components/SearchBar.d.ts.map +1 -1
- package/lib/esm/widget/components/SearchBar.js +2 -3
- package/lib/esm/widget/components/SearchBar.js.map +1 -1
- package/lib/esm/widget/components/SearchBar.scss +1 -2
- package/lib/esm/widget/components/SelectIModel.d.ts +3 -3
- package/lib/esm/widget/components/SelectIModel.d.ts.map +1 -1
- package/lib/esm/widget/components/SelectIModel.js +7 -27
- package/lib/esm/widget/components/SelectIModel.js.map +1 -1
- package/lib/esm/widget/components/SelectIModel.scss +2 -3
- 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 +2 -2
- package/lib/esm/widget/components/utils.js.map +1 -1
- package/lib/esm/widget/components/utils.scss +16 -8
- package/lib/esm/widget/context/BulkExtractorContext.d.ts +10 -0
- package/lib/esm/widget/context/BulkExtractorContext.d.ts.map +1 -0
- package/lib/esm/widget/context/BulkExtractorContext.js +11 -0
- package/lib/esm/widget/context/BulkExtractorContext.js.map +1 -0
- package/lib/esm/widget/context/ReportsConfigApiContext.d.ts +16 -0
- package/lib/esm/widget/context/ReportsConfigApiContext.d.ts.map +1 -0
- package/lib/esm/widget/context/ReportsConfigApiContext.js +20 -0
- package/lib/esm/widget/context/ReportsConfigApiContext.js.map +1 -0
- package/lib/public/locales/en/ReportsConfigWidget.json +6 -1
- package/package.json +29 -29
- package/public/locales/en/ReportsConfigWidget.json +6 -1
- package/reports-config-widget-react.build.error.log +6 -6
- package/reports-config-widget-react.build.log +52 -49
- package/src/reports-config-widget-react.ts +6 -0
- package/src/test/AddMappingModal.test.tsx +20 -37
- package/src/test/BulkExtractor.test.ts +15 -17
- package/src/test/DeleteModal.test.tsx +4 -73
- package/src/test/ReportAction.test.tsx +17 -90
- package/src/test/ReportMappingHorizontalTile.test.tsx +3 -54
- package/src/test/ReportMappings.test.tsx +50 -135
- package/src/test/Reports.test.tsx +21 -80
- package/src/test/WidgetHeader.test.tsx +9 -2
- package/src/test/test-utils.tsx +9 -49
- package/src/widget/ReportsConfigUiProvider.tsx +7 -14
- package/src/widget/components/ActionPanel.scss +2 -3
- package/src/widget/components/ActionPanel.tsx +17 -15
- package/src/widget/components/AddMappingsModal.scss +1 -2
- package/src/widget/components/AddMappingsModal.tsx +55 -60
- package/src/widget/components/BulkExtractor.ts +11 -10
- package/src/widget/components/DeleteModal.scss +2 -3
- package/src/widget/components/DeleteModal.tsx +17 -23
- package/src/widget/components/ExtractionStatus.scss +6 -7
- package/src/widget/components/HorizontalTile.scss +11 -14
- package/src/widget/components/ReportAction.scss +1 -2
- package/src/widget/components/ReportAction.tsx +18 -33
- package/src/widget/components/ReportHorizontalTile.tsx +11 -12
- package/src/widget/components/ReportMappingHorizontalTile.tsx +30 -30
- package/src/widget/components/ReportMappings.scss +10 -11
- package/src/widget/components/ReportMappings.tsx +67 -72
- package/src/widget/components/Reports.scss +15 -15
- package/src/widget/components/Reports.tsx +140 -181
- package/src/widget/components/ReportsConfigContext.tsx +95 -0
- package/src/widget/components/ReportsContainer.scss +1 -3
- package/src/widget/components/ReportsContainer.tsx +47 -21
- package/src/widget/components/ReportsHeader.tsx +27 -0
- package/src/widget/components/ReportsRouter.tsx +63 -0
- package/src/widget/components/SearchBar.scss +1 -2
- package/src/widget/components/SearchBar.tsx +7 -2
- package/src/widget/components/SelectIModel.scss +2 -3
- package/src/widget/components/SelectIModel.tsx +11 -29
- package/src/widget/components/utils.scss +16 -8
- package/src/widget/components/utils.tsx +8 -7
- package/src/widget/context/{ReportsApiConfigContext.tsx → BulkExtractorContext.tsx} +9 -10
- package/src/widget/context/ReportsConfigApiContext.tsx +39 -0
- package/lib/cjs/widget/context/ReportsApiConfigContext.d.ts +0 -9
- package/lib/cjs/widget/context/ReportsApiConfigContext.d.ts.map +0 -1
- package/lib/cjs/widget/context/ReportsApiConfigContext.js.map +0 -1
- package/lib/esm/widget/context/ReportsApiConfigContext.d.ts +0 -9
- package/lib/esm/widget/context/ReportsApiConfigContext.d.ts.map +0 -1
- package/lib/esm/widget/context/ReportsApiConfigContext.js +0 -14
- package/lib/esm/widget/context/ReportsApiConfigContext.js.map +0 -1
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import type {
|
|
6
|
-
AbstractWidgetProps,
|
|
7
6
|
UiItemsProvider,
|
|
8
|
-
|
|
7
|
+
Widget,
|
|
8
|
+
} from "@itwin/appui-react";
|
|
9
9
|
import {
|
|
10
10
|
StagePanelLocation,
|
|
11
11
|
StagePanelSection,
|
|
12
12
|
StageUsage,
|
|
13
|
-
} from "@itwin/appui-
|
|
13
|
+
} from "@itwin/appui-react";
|
|
14
14
|
import type { AccessToken } from "@itwin/core-bentley";
|
|
15
15
|
|
|
16
16
|
import * as React from "react";
|
|
@@ -37,26 +37,19 @@ export class ReportsConfigProvider implements UiItemsProvider {
|
|
|
37
37
|
stageUsage: string,
|
|
38
38
|
location: StagePanelLocation,
|
|
39
39
|
section?: StagePanelSection
|
|
40
|
-
): ReadonlyArray<
|
|
41
|
-
const widgets:
|
|
40
|
+
): ReadonlyArray<Widget> {
|
|
41
|
+
const widgets: Widget[] = [];
|
|
42
42
|
if (
|
|
43
43
|
location === StagePanelLocation.Left &&
|
|
44
44
|
section === StagePanelSection.Start &&
|
|
45
45
|
stageUsage === StageUsage.General
|
|
46
46
|
) {
|
|
47
|
-
const ReportsWidget:
|
|
47
|
+
const ReportsWidget: Widget = {
|
|
48
48
|
id: "reports-config-widget",
|
|
49
49
|
label: ReportsConfigWidget.localization.getLocalizedString(
|
|
50
50
|
"ReportsConfigWidget:ReportsConfig"
|
|
51
51
|
),
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<ReportsContainer
|
|
55
|
-
getAccessToken={this._getAccessToken}
|
|
56
|
-
baseUrl={this._baseUrl}
|
|
57
|
-
/>
|
|
58
|
-
);
|
|
59
|
-
},
|
|
52
|
+
content: <ReportsContainer getAccessToken={this._getAccessToken} baseUrl={this._baseUrl} />,
|
|
60
53
|
};
|
|
61
54
|
|
|
62
55
|
widgets.push(ReportsWidget);
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
5
|
|
|
7
6
|
.rcw-action-panel {
|
|
8
7
|
display: flex;
|
|
9
8
|
justify-content: right;
|
|
10
|
-
padding:
|
|
11
|
-
gap:
|
|
9
|
+
padding: calc(var(--iui-size-s) * 2) var(--iui-size-m) var(--iui-size-s);
|
|
10
|
+
gap: var(--iui-size-xs);
|
|
12
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 { Button } from "@itwin/itwinui-react";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
@@ -11,7 +11,7 @@ import { LoadingSpinner } from "./utils";
|
|
|
11
11
|
export interface ActionPanelProps {
|
|
12
12
|
actionLabel: string;
|
|
13
13
|
onAction: () => Promise<void>;
|
|
14
|
-
onCancel
|
|
14
|
+
onCancel?: () => void;
|
|
15
15
|
isCancelDisabled?: boolean;
|
|
16
16
|
isSavingDisabled?: boolean;
|
|
17
17
|
isLoading?: boolean;
|
|
@@ -24,7 +24,7 @@ const ActionPanel = ({
|
|
|
24
24
|
isCancelDisabled = false,
|
|
25
25
|
isSavingDisabled = false,
|
|
26
26
|
isLoading = false,
|
|
27
|
-
}: ActionPanelProps):
|
|
27
|
+
}: ActionPanelProps): React.ReactElement => {
|
|
28
28
|
return (
|
|
29
29
|
<div className="rcw-action-panel">
|
|
30
30
|
{isLoading && <LoadingSpinner />}
|
|
@@ -35,16 +35,18 @@ const ActionPanel = ({
|
|
|
35
35
|
>
|
|
36
36
|
{actionLabel}
|
|
37
37
|
</Button>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
{onCancel && (
|
|
39
|
+
<Button
|
|
40
|
+
styleType="default"
|
|
41
|
+
type="button"
|
|
42
|
+
onClick={onCancel}
|
|
43
|
+
disabled={isCancelDisabled || isLoading}
|
|
44
|
+
>
|
|
45
|
+
{ReportsConfigWidget.localization.getLocalizedString(
|
|
46
|
+
"ReportsConfigWidget:Cancel"
|
|
47
|
+
)}
|
|
48
|
+
</Button>
|
|
49
|
+
)}
|
|
48
50
|
</div>
|
|
49
51
|
);
|
|
50
52
|
};
|
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
5
|
|
|
7
6
|
.rcw-add-mappings-container {
|
|
8
7
|
display: flex;
|
|
9
8
|
flex-direction: column;
|
|
10
|
-
gap:
|
|
9
|
+
gap: var(--iui-size-s);
|
|
11
10
|
width: 45vw;
|
|
12
11
|
min-width: 100%;
|
|
13
12
|
overflow: auto;
|
|
@@ -3,35 +3,33 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { Modal, Table, tableFilters } from "@itwin/itwinui-react";
|
|
6
|
-
import React, { useEffect, useMemo, useState } from "react";
|
|
7
|
-
import type { Mapping } from "@itwin/insights-client";
|
|
8
|
-
import { MappingsClient, REPORTING_BASE_PATH, ReportsClient } from "@itwin/insights-client";
|
|
6
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
7
|
+
import type { Mapping, MappingsClient } from "@itwin/insights-client";
|
|
9
8
|
import ActionPanel from "./ActionPanel";
|
|
10
9
|
import "./AddMappingsModal.scss";
|
|
11
10
|
import { LocalizedTablePaginator } from "./LocalizedTablePaginator";
|
|
12
11
|
import type { ReportMappingAndMapping } from "./ReportMappings";
|
|
13
|
-
import
|
|
14
|
-
import { useReportsApiConfig } from "../context/ReportsApiConfigContext";
|
|
12
|
+
import { useReportsConfigApi } from "../context/ReportsConfigApiContext";
|
|
15
13
|
import { SelectIModel } from "./SelectIModel";
|
|
16
14
|
import type { CreateTypeFromInterface } from "./utils";
|
|
17
|
-
import {
|
|
15
|
+
import { handleError } from "./utils";
|
|
18
16
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
17
|
+
import type { AccessToken } from "@itwin/core-bentley";
|
|
18
|
+
import type { Column } from "react-table";
|
|
19
19
|
|
|
20
20
|
export type MappingType = CreateTypeFromInterface<Mapping>;
|
|
21
21
|
|
|
22
22
|
const fetchMappings = async (
|
|
23
|
-
setMappings:
|
|
23
|
+
setMappings: (mappings: Mapping[]) => void,
|
|
24
24
|
iModelId: string,
|
|
25
|
-
setIsLoading:
|
|
26
|
-
|
|
25
|
+
setIsLoading: (isLoading: boolean) => void,
|
|
26
|
+
mappingsClient: MappingsClient,
|
|
27
|
+
getAccessToken: () => Promise<AccessToken>
|
|
27
28
|
) => {
|
|
28
29
|
try {
|
|
29
30
|
setIsLoading(true);
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
);
|
|
33
|
-
const accessToken = await apiContext.getAccessToken();
|
|
34
|
-
const mappings = await mappingsClientApi.getMappings(
|
|
31
|
+
const accessToken = await getAccessToken();
|
|
32
|
+
const mappings = await mappingsClient.getMappings(
|
|
35
33
|
accessToken,
|
|
36
34
|
iModelId
|
|
37
35
|
);
|
|
@@ -43,24 +41,26 @@ const fetchMappings = async (
|
|
|
43
41
|
}
|
|
44
42
|
};
|
|
45
43
|
|
|
46
|
-
interface AddMappingsModalProps {
|
|
44
|
+
export interface AddMappingsModalProps {
|
|
47
45
|
reportId: string;
|
|
48
46
|
existingMappings: ReportMappingAndMapping[];
|
|
49
47
|
show: boolean;
|
|
50
|
-
|
|
48
|
+
onClose: () => Promise<void>;
|
|
49
|
+
defaultIModelId?: string;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
export const AddMappingsModal = ({
|
|
54
53
|
reportId,
|
|
55
54
|
existingMappings,
|
|
56
55
|
show,
|
|
57
|
-
|
|
56
|
+
onClose,
|
|
57
|
+
defaultIModelId,
|
|
58
58
|
}: AddMappingsModalProps) => {
|
|
59
59
|
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
60
|
-
const
|
|
61
|
-
const [selectedIModelId, setSelectediModelId] = useState<string>(
|
|
60
|
+
const selectedMappings = useRef<Mapping[]>([]);
|
|
61
|
+
const [selectedIModelId, setSelectediModelId] = useState<string | undefined>(defaultIModelId);
|
|
62
62
|
const [mappings, setMappings] = useState<Mapping[]>([]);
|
|
63
|
-
const
|
|
63
|
+
const { getAccessToken, mappingsClient, reportsClient } = useReportsConfigApi();
|
|
64
64
|
|
|
65
65
|
useEffect(() => {
|
|
66
66
|
if (selectedIModelId) {
|
|
@@ -68,35 +68,30 @@ export const AddMappingsModal = ({
|
|
|
68
68
|
setMappings,
|
|
69
69
|
selectedIModelId,
|
|
70
70
|
setIsLoading,
|
|
71
|
-
|
|
71
|
+
mappingsClient,
|
|
72
|
+
getAccessToken
|
|
72
73
|
);
|
|
73
74
|
}
|
|
74
|
-
}, [
|
|
75
|
+
}, [getAccessToken, mappingsClient, selectedIModelId, setIsLoading]);
|
|
75
76
|
|
|
76
77
|
const mappingsColumns = useMemo(
|
|
77
|
-
() => [
|
|
78
|
+
(): Column<CreateTypeFromInterface<Mapping>>[] => [
|
|
78
79
|
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
),
|
|
86
|
-
accessor: "mappingName",
|
|
87
|
-
Filter: tableFilters.TextFilter(),
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: "description",
|
|
91
|
-
Header: ReportsConfigWidget.localization.getLocalizedString(
|
|
92
|
-
"ReportsConfigWidget:Description"
|
|
93
|
-
),
|
|
94
|
-
accessor: "description",
|
|
95
|
-
Filter: tableFilters.TextFilter(),
|
|
96
|
-
},
|
|
97
|
-
],
|
|
80
|
+
id: "mappingName",
|
|
81
|
+
Header: ReportsConfigWidget.localization.getLocalizedString(
|
|
82
|
+
"ReportsConfigWidget:MappingName"
|
|
83
|
+
),
|
|
84
|
+
accessor: "mappingName",
|
|
85
|
+
Filter: tableFilters.TextFilter(),
|
|
98
86
|
},
|
|
99
|
-
|
|
87
|
+
{
|
|
88
|
+
id: "description",
|
|
89
|
+
Header: ReportsConfigWidget.localization.getLocalizedString(
|
|
90
|
+
"ReportsConfigWidget:Description"
|
|
91
|
+
),
|
|
92
|
+
accessor: "description",
|
|
93
|
+
Filter: tableFilters.TextFilter(),
|
|
94
|
+
}],
|
|
100
95
|
[]
|
|
101
96
|
);
|
|
102
97
|
|
|
@@ -104,18 +99,15 @@ export const AddMappingsModal = ({
|
|
|
104
99
|
try {
|
|
105
100
|
if (!selectedIModelId) return;
|
|
106
101
|
setIsLoading(true);
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const accessToken = await apiConfig.getAccessToken();
|
|
111
|
-
for (const mapping of selectedMappings) {
|
|
112
|
-
await reportsClientApi.createReportMapping(accessToken, reportId, {
|
|
102
|
+
const accessToken = await getAccessToken();
|
|
103
|
+
for (const mapping of selectedMappings.current) {
|
|
104
|
+
await reportsClient.createReportMapping(accessToken, reportId, {
|
|
113
105
|
imodelId: selectedIModelId,
|
|
114
106
|
mappingId: mapping.id,
|
|
115
107
|
});
|
|
116
108
|
}
|
|
117
109
|
|
|
118
|
-
await
|
|
110
|
+
await onClose();
|
|
119
111
|
} catch (error: any) {
|
|
120
112
|
handleError(error.status);
|
|
121
113
|
} finally {
|
|
@@ -123,6 +115,14 @@ export const AddMappingsModal = ({
|
|
|
123
115
|
}
|
|
124
116
|
};
|
|
125
117
|
|
|
118
|
+
const onSelect = useCallback((selectData: Mapping[] | undefined) => {
|
|
119
|
+
if (selectData) selectedMappings.current = selectData;
|
|
120
|
+
}, []);
|
|
121
|
+
|
|
122
|
+
const tableData = useMemo(() => isLoading ? [] : mappings, [isLoading, mappings]);
|
|
123
|
+
const isRowDisabled = useCallback((rowData: MappingType) =>
|
|
124
|
+
existingMappings.some((v) => v.mappingId === rowData.id), [existingMappings]);
|
|
125
|
+
|
|
126
126
|
return (
|
|
127
127
|
<Modal
|
|
128
128
|
title={ReportsConfigWidget.localization.getLocalizedString(
|
|
@@ -131,7 +131,7 @@ export const AddMappingsModal = ({
|
|
|
131
131
|
isOpen={show}
|
|
132
132
|
isDismissible={!isLoading}
|
|
133
133
|
onClose={async () => {
|
|
134
|
-
await
|
|
134
|
+
await onClose();
|
|
135
135
|
}}
|
|
136
136
|
style={{ display: "flex", flexDirection: "column", maxHeight: "77vh" }}
|
|
137
137
|
>
|
|
@@ -141,7 +141,7 @@ export const AddMappingsModal = ({
|
|
|
141
141
|
setSelectedIModelId={setSelectediModelId}
|
|
142
142
|
/>
|
|
143
143
|
<Table<MappingType>
|
|
144
|
-
data={
|
|
144
|
+
data={tableData}
|
|
145
145
|
columns={mappingsColumns}
|
|
146
146
|
className="rcw-add-mappings-table"
|
|
147
147
|
emptyTableContent={ReportsConfigWidget.localization.getLocalizedString(
|
|
@@ -150,22 +150,17 @@ export const AddMappingsModal = ({
|
|
|
150
150
|
isSortable
|
|
151
151
|
isSelectable
|
|
152
152
|
isLoading={isLoading}
|
|
153
|
-
isRowDisabled={
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
onSelect={(selectData: Mapping[] | undefined) => {
|
|
157
|
-
selectData && setSelectedMappings(selectData);
|
|
158
|
-
}}
|
|
153
|
+
isRowDisabled={isRowDisabled}
|
|
154
|
+
onSelect={onSelect}
|
|
159
155
|
paginatorRenderer={LocalizedTablePaginator}
|
|
160
156
|
/>
|
|
161
157
|
</div>
|
|
158
|
+
{/* Add button permanently enabled as a workaround to the warning stating that the table and parent component are being rendered at the same time. */}
|
|
162
159
|
<ActionPanel
|
|
163
160
|
actionLabel={ReportsConfigWidget.localization.getLocalizedString(
|
|
164
161
|
"ReportsConfigWidget:Add"
|
|
165
162
|
)}
|
|
166
163
|
onAction={onSave}
|
|
167
|
-
onCancel={returnFn}
|
|
168
|
-
isSavingDisabled={selectedMappings.length === 0}
|
|
169
164
|
isLoading={isLoading}
|
|
170
165
|
/>
|
|
171
166
|
</Modal>
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import {
|
|
6
|
-
import type { ReportMapping } from "@itwin/insights-client";
|
|
7
|
-
import {
|
|
8
|
-
import type { ReportsApiConfig } from "../context/ReportsApiConfigContext";
|
|
5
|
+
import { ExtractorState } from "@itwin/insights-client";
|
|
6
|
+
import type { ExtractionClient, ReportMapping, ReportsClient } from "@itwin/insights-client";
|
|
7
|
+
import { handleError } from "./utils";
|
|
9
8
|
import { ExtractionStates } from "./ExtractionStatus";
|
|
10
9
|
import { STATUS_CHECK_INTERVAL } from "./Constants";
|
|
10
|
+
import type { AccessToken } from "@itwin/core-bentley";
|
|
11
11
|
|
|
12
12
|
export type ReportMappingAndMapping = ReportMapping & {
|
|
13
13
|
mappingName: string;
|
|
@@ -15,7 +15,7 @@ export type ReportMappingAndMapping = ReportMapping & {
|
|
|
15
15
|
iModelName: string;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
export
|
|
18
|
+
export class BulkExtractor {
|
|
19
19
|
private _reportsClientApi: ReportsClient;
|
|
20
20
|
private _extractionClientApi: ExtractionClient;
|
|
21
21
|
private _accessToken: () => Promise<string>;
|
|
@@ -31,14 +31,15 @@ export default class BulkExtractor {
|
|
|
31
31
|
private _iModels: string[] = [];
|
|
32
32
|
|
|
33
33
|
constructor(
|
|
34
|
-
|
|
34
|
+
reportsClient: ReportsClient,
|
|
35
|
+
extractionClient: ExtractionClient,
|
|
36
|
+
getAccessToken: () => Promise<AccessToken>,
|
|
35
37
|
successfulExtractionToast: (iModelName: string, odataFeedUrl: string) => void,
|
|
36
38
|
failedExtractionToast: (iModelName: string) => void,
|
|
37
39
|
) {
|
|
38
|
-
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this._accessToken = apiConfig.getAccessToken;
|
|
40
|
+
this._reportsClientApi = reportsClient;
|
|
41
|
+
this._extractionClientApi = extractionClient;
|
|
42
|
+
this._accessToken = getAccessToken;
|
|
42
43
|
this._successfulExtractionToast = successfulExtractionToast;
|
|
43
44
|
this._failedExtractionToast = failedExtractionToast;
|
|
44
45
|
}
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
5
|
|
|
7
6
|
.rcw-delete-modal-body-text {
|
|
8
7
|
display: flex;
|
|
9
|
-
gap:
|
|
8
|
+
gap: var(--iui-size-2xs);
|
|
10
9
|
flex-wrap: wrap;
|
|
11
10
|
|
|
12
11
|
>strong {
|
|
@@ -15,5 +14,5 @@
|
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
.rcw-loading-delete {
|
|
18
|
-
margin-right:
|
|
17
|
+
margin-right: var(--iui-size-xs);
|
|
19
18
|
}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import {
|
|
6
6
|
Button,
|
|
7
|
-
Leading,
|
|
8
7
|
MiddleTextTruncation,
|
|
9
8
|
Modal,
|
|
10
9
|
ModalButtonBar,
|
|
11
10
|
ModalContent,
|
|
11
|
+
Text,
|
|
12
12
|
} from "@itwin/itwinui-react";
|
|
13
13
|
import React, { useState } from "react";
|
|
14
14
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
@@ -16,32 +16,30 @@ import "./DeleteModal.scss";
|
|
|
16
16
|
import { handleError, LoadingSpinner } from "./utils";
|
|
17
17
|
|
|
18
18
|
export interface DeleteModalProps {
|
|
19
|
-
entityName
|
|
20
|
-
|
|
21
|
-
setShow: React.Dispatch<React.SetStateAction<boolean>>;
|
|
19
|
+
entityName?: string;
|
|
20
|
+
onClose: () => void;
|
|
22
21
|
onDelete: () => Promise<void>;
|
|
23
22
|
refresh: () => Promise<void>;
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
export const DeleteModal = ({
|
|
27
26
|
entityName,
|
|
28
|
-
|
|
29
|
-
setShow,
|
|
27
|
+
onClose,
|
|
30
28
|
onDelete,
|
|
31
29
|
refresh,
|
|
32
30
|
}: DeleteModalProps) => {
|
|
33
|
-
const [
|
|
31
|
+
const [isDeleting, setIsDeleting] = useState<boolean>(false);
|
|
34
32
|
|
|
35
33
|
const deleteCallback = async () => {
|
|
36
34
|
try {
|
|
37
|
-
|
|
35
|
+
setIsDeleting(true);
|
|
38
36
|
await onDelete();
|
|
39
|
-
setShow(false);
|
|
40
37
|
await refresh();
|
|
38
|
+
onClose();
|
|
41
39
|
} catch (error: any) {
|
|
42
40
|
handleError(error.status);
|
|
43
41
|
} finally {
|
|
44
|
-
|
|
42
|
+
setIsDeleting(false);
|
|
45
43
|
}
|
|
46
44
|
};
|
|
47
45
|
|
|
@@ -50,24 +48,22 @@ export const DeleteModal = ({
|
|
|
50
48
|
title={ReportsConfigWidget.localization.getLocalizedString(
|
|
51
49
|
"ReportsConfigWidget:Confirm"
|
|
52
50
|
)}
|
|
53
|
-
isOpen={
|
|
54
|
-
isDismissible={!
|
|
55
|
-
onClose={
|
|
56
|
-
setShow(false);
|
|
57
|
-
}}
|
|
51
|
+
isOpen={!!entityName}
|
|
52
|
+
isDismissible={!isDeleting}
|
|
53
|
+
onClose={onClose}
|
|
58
54
|
>
|
|
59
55
|
<ModalContent>
|
|
60
56
|
<div className="rcw-delete-modal-body-text">
|
|
61
|
-
<
|
|
57
|
+
<Text variant='leading'>
|
|
62
58
|
{ReportsConfigWidget.localization.getLocalizedString(
|
|
63
59
|
"ReportsConfigWidget:AreYouSureYouWantToDelete"
|
|
64
60
|
)}
|
|
65
|
-
</
|
|
61
|
+
</Text>
|
|
66
62
|
<strong>{<MiddleTextTruncation text={`${entityName}?`} />}</strong>
|
|
67
63
|
</div>
|
|
68
64
|
</ModalContent>
|
|
69
65
|
<ModalButtonBar>
|
|
70
|
-
{
|
|
66
|
+
{isDeleting && (
|
|
71
67
|
<div className="rcw-loading-delete" data-testid="rcw-loading-delete">
|
|
72
68
|
<LoadingSpinner />
|
|
73
69
|
</div>
|
|
@@ -75,7 +71,7 @@ export const DeleteModal = ({
|
|
|
75
71
|
<Button
|
|
76
72
|
styleType="high-visibility"
|
|
77
73
|
onClick={deleteCallback}
|
|
78
|
-
disabled={
|
|
74
|
+
disabled={isDeleting}
|
|
79
75
|
>
|
|
80
76
|
{ReportsConfigWidget.localization.getLocalizedString(
|
|
81
77
|
"ReportsConfigWidget:Delete"
|
|
@@ -83,10 +79,8 @@ export const DeleteModal = ({
|
|
|
83
79
|
</Button>
|
|
84
80
|
<Button
|
|
85
81
|
styleType="default"
|
|
86
|
-
onClick={
|
|
87
|
-
|
|
88
|
-
}}
|
|
89
|
-
disabled={isLoading}
|
|
82
|
+
onClick={onClose}
|
|
83
|
+
disabled={isDeleting}
|
|
90
84
|
>
|
|
91
85
|
{ReportsConfigWidget.localization.getLocalizedString(
|
|
92
86
|
"ReportsConfigWidget:Cancel"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
5
|
|
|
7
6
|
.rcw-extraction-status {
|
|
8
7
|
align-items: center;
|
|
@@ -10,10 +9,10 @@
|
|
|
10
9
|
display: flex;
|
|
11
10
|
|
|
12
11
|
.rcw-status-icon {
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
12
|
+
width: var(--iui-size-m);
|
|
13
|
+
height: var(--iui-size-m);
|
|
15
14
|
align-items: center;
|
|
16
|
-
margin: auto
|
|
15
|
+
margin: auto calc(var(--iui-size-2xs) * 3);
|
|
17
16
|
display: flex;
|
|
18
17
|
}
|
|
19
18
|
}
|
|
@@ -22,11 +21,11 @@
|
|
|
22
21
|
align-items: center;
|
|
23
22
|
height: 38px;
|
|
24
23
|
display: flex;
|
|
25
|
-
margin: auto
|
|
24
|
+
margin: auto calc(var(--iui-size-2xs) * 3);
|
|
26
25
|
|
|
27
26
|
.rcw-status-icon {
|
|
28
|
-
width:
|
|
29
|
-
height:
|
|
27
|
+
width: var(--iui-size-m);
|
|
28
|
+
height: var(--iui-size-m);
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
|
|
@@ -2,17 +2,14 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
|
-
@import "~@itwin/itwinui-css/scss/icon/index";
|
|
7
|
-
|
|
8
5
|
.rcw-horizontal-tile {
|
|
9
6
|
&-container {
|
|
10
7
|
display: flex;
|
|
11
8
|
justify-content: space-between;
|
|
12
9
|
border-radius: 5px;
|
|
13
|
-
background-color: var(--iui-color-background-
|
|
14
|
-
height:
|
|
15
|
-
padding: 5.5px
|
|
10
|
+
background-color: var(--iui-color-background-backdrop);
|
|
11
|
+
min-height: calc(var(--iui-size-s) * 5);
|
|
12
|
+
padding: 5.5px var(--iui-size-xs);
|
|
16
13
|
|
|
17
14
|
.rcw-body-container {
|
|
18
15
|
display: flex;
|
|
@@ -37,16 +34,16 @@
|
|
|
37
34
|
align-self: center;
|
|
38
35
|
min-width: 36px;
|
|
39
36
|
flex-shrink: 0;
|
|
40
|
-
|
|
37
|
+
margin-right: var(--iui-size-2xs);
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
&-selected {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
+
),
|
|
47
|
+
linear-gradient(var(--iui-color-background), var(--iui-color-background));
|
|
51
48
|
}
|
|
52
|
-
}
|
|
49
|
+
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
5
|
|
|
7
6
|
.rcw-details-form-container {
|
|
8
7
|
overflow-x: auto;
|
|
@@ -11,6 +10,6 @@
|
|
|
11
10
|
.rcw-details-form {
|
|
12
11
|
display: flex;
|
|
13
12
|
flex-direction: column;
|
|
14
|
-
gap:
|
|
13
|
+
gap: var(--iui-size-);
|
|
15
14
|
}
|
|
16
15
|
}
|