@itwin/reports-config-widget-react 0.0.8 → 0.2.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/package-deps_rebuild.json +46 -32
- package/.rush/temp/shrinkwrap-deps.json +14 -6
- package/CHANGELOG.json +27 -0
- package/CHANGELOG.md +16 -1
- package/coverage/clover.xml +648 -427
- package/coverage/coverage-final.json +28 -18
- package/coverage/lcov-report/index.html +34 -19
- package/coverage/lcov-report/src/ReportsConfigWidget.ts.html +10 -10
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/test/index.html +1 -1
- package/coverage/lcov-report/src/test/test-utils.tsx.html +22 -22
- package/coverage/lcov-report/src/widget/ReportsConfigUiProvider.tsx.html +7 -7
- package/coverage/lcov-report/src/widget/components/ActionPanel.tsx.html +29 -41
- package/coverage/lcov-report/src/widget/components/AddMappingsModal.tsx.html +31 -37
- package/coverage/lcov-report/src/widget/components/BulkExtractor.ts.html +661 -0
- package/coverage/lcov-report/src/widget/components/Constants.ts.html +106 -0
- package/coverage/lcov-report/src/widget/components/DeleteModal.tsx.html +21 -21
- package/coverage/lcov-report/src/widget/components/ExtractionStates/FailedExtractionState.tsx.html +187 -0
- package/coverage/lcov-report/src/widget/components/ExtractionStates/QueuedExtractionState.tsx.html +145 -0
- package/coverage/lcov-report/src/widget/components/ExtractionStates/RunningExtractionState.tsx.html +139 -0
- package/coverage/lcov-report/src/widget/components/ExtractionStates/StartingExtractionState.tsx.html +151 -0
- package/coverage/lcov-report/src/widget/components/ExtractionStates/SucceededExtractionState.tsx.html +190 -0
- package/coverage/lcov-report/src/widget/components/ExtractionStates/index.html +176 -0
- package/coverage/lcov-report/src/widget/components/ExtractionStatus.tsx.html +295 -0
- package/coverage/lcov-report/src/widget/components/ExtractionToast.tsx.html +208 -0
- package/coverage/lcov-report/src/widget/components/HorizontalTile.tsx.html +77 -44
- package/coverage/lcov-report/src/widget/components/LocalizedTablePaginator.tsx.html +8 -8
- package/coverage/lcov-report/src/widget/components/ReportAction.tsx.html +14 -20
- package/coverage/lcov-report/src/widget/components/ReportHorizontalTile.tsx.html +475 -0
- package/coverage/lcov-report/src/widget/components/ReportMappingHorizontalTile.tsx.html +469 -0
- package/coverage/lcov-report/src/widget/components/ReportMappings.tsx.html +184 -250
- package/coverage/lcov-report/src/widget/components/Reports.tsx.html +180 -132
- package/coverage/lcov-report/src/widget/components/ReportsContainer.tsx.html +10 -10
- package/coverage/lcov-report/src/widget/components/SearchBar.tsx.html +11 -11
- package/coverage/lcov-report/src/widget/components/SelectIModel.tsx.html +31 -31
- package/coverage/lcov-report/src/widget/components/index.html +134 -59
- package/coverage/lcov-report/src/widget/components/utils.tsx.html +32 -32
- package/coverage/lcov-report/src/widget/context/ReportsApiConfigContext.tsx.html +8 -8
- 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 +7 -7
- package/coverage/lcov-report/src/widget/index.html +1 -1
- package/coverage/lcov.info +1137 -738
- package/jest.config.js +7 -0
- package/lib/cjs/test/AddMappingModal.test.d.ts +2 -0
- package/lib/cjs/test/AddMappingModal.test.d.ts.map +1 -0
- package/lib/cjs/test/AddMappingModal.test.js +277 -0
- package/lib/cjs/test/AddMappingModal.test.js.map +1 -0
- package/lib/cjs/test/BulkExtractor.test.d.ts +2 -0
- package/lib/cjs/test/BulkExtractor.test.d.ts.map +1 -0
- package/lib/cjs/test/BulkExtractor.test.js +182 -0
- package/lib/cjs/test/BulkExtractor.test.js.map +1 -0
- package/lib/cjs/test/DeleteModal.test.d.ts +2 -0
- package/lib/cjs/test/DeleteModal.test.d.ts.map +1 -0
- package/lib/cjs/test/DeleteModal.test.js +93 -0
- package/lib/cjs/test/DeleteModal.test.js.map +1 -0
- package/lib/cjs/test/ReportAction.test.js +2 -3
- package/lib/cjs/test/ReportAction.test.js.map +1 -1
- package/lib/cjs/test/ReportMappingHorizontalTile.test.d.ts +2 -0
- package/lib/cjs/test/ReportMappingHorizontalTile.test.d.ts.map +1 -0
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js +340 -0
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js.map +1 -0
- package/lib/cjs/test/ReportMappings.test.js +115 -267
- package/lib/cjs/test/ReportMappings.test.js.map +1 -1
- package/lib/cjs/test/Reports.test.js +1 -1
- package/lib/cjs/test/Reports.test.js.map +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.js +4 -5
- package/lib/cjs/widget/components/ActionPanel.js.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.d.ts +2 -2
- package/lib/cjs/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.js +5 -4
- package/lib/cjs/widget/components/AddMappingsModal.js.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.scss +4 -3
- package/lib/cjs/widget/components/BulkExtractor.d.ts +37 -0
- package/lib/cjs/widget/components/BulkExtractor.d.ts.map +1 -0
- package/lib/cjs/widget/components/BulkExtractor.js +155 -0
- package/lib/cjs/widget/components/BulkExtractor.js.map +1 -0
- package/lib/cjs/widget/components/Constants.d.ts +4 -0
- package/lib/cjs/widget/components/Constants.d.ts.map +1 -0
- package/lib/cjs/widget/components/Constants.js +11 -0
- package/lib/cjs/widget/components/Constants.js.map +1 -0
- package/lib/cjs/widget/components/DeleteModal.js +1 -1
- package/lib/cjs/widget/components/DeleteModal.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.scss +4 -3
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.d.ts +8 -0
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.d.ts.map +1 -0
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.js +23 -0
- package/lib/cjs/widget/components/ExtractionStates/FailedExtractionState.js.map +1 -0
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.d.ts +3 -0
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.d.ts.map +1 -0
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.js +18 -0
- package/lib/cjs/widget/components/ExtractionStates/QueuedExtractionState.js.map +1 -0
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.d.ts +3 -0
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.d.ts.map +1 -0
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.js +17 -0
- package/lib/cjs/widget/components/ExtractionStates/RunningExtractionState.js.map +1 -0
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.d.ts +3 -0
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.d.ts.map +1 -0
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.js +18 -0
- package/lib/cjs/widget/components/ExtractionStates/StartingExtractionState.js.map +1 -0
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.d.ts +8 -0
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.d.ts.map +1 -0
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.js +23 -0
- package/lib/cjs/widget/components/ExtractionStates/SucceededExtractionState.js.map +1 -0
- package/lib/cjs/widget/components/ExtractionStatus.d.ts +17 -0
- package/lib/cjs/widget/components/ExtractionStatus.d.ts.map +1 -0
- package/lib/cjs/widget/components/ExtractionStatus.js +76 -0
- package/lib/cjs/widget/components/ExtractionStatus.js.map +1 -0
- package/lib/cjs/widget/components/{Extraction.scss → ExtractionStatus.scss} +17 -15
- package/lib/cjs/widget/components/ExtractionToast.d.ts +11 -0
- package/lib/cjs/widget/components/ExtractionToast.d.ts.map +1 -0
- package/lib/cjs/widget/components/ExtractionToast.js +33 -0
- package/lib/cjs/widget/components/ExtractionToast.js.map +1 -0
- package/lib/cjs/widget/components/HorizontalTile.d.ts +8 -7
- package/lib/cjs/widget/components/HorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.js +10 -6
- package/lib/cjs/widget/components/HorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.scss +42 -22
- package/lib/cjs/widget/components/ReportAction.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportAction.js +3 -3
- package/lib/cjs/widget/components/ReportAction.js.map +1 -1
- package/lib/cjs/widget/components/ReportAction.scss +2 -2
- package/lib/cjs/widget/components/ReportHorizontalTile.d.ts +16 -0
- package/lib/cjs/widget/components/ReportHorizontalTile.d.ts.map +1 -0
- package/lib/cjs/widget/components/ReportHorizontalTile.js +71 -0
- package/lib/cjs/widget/components/ReportHorizontalTile.js.map +1 -0
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.d.ts +13 -0
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -0
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js +82 -0
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js.map +1 -0
- package/lib/cjs/widget/components/ReportMappings.d.ts +3 -1
- package/lib/cjs/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.js +39 -40
- package/lib/cjs/widget/components/ReportMappings.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.scss +7 -7
- package/lib/cjs/widget/components/Reports.d.ts.map +1 -1
- package/lib/cjs/widget/components/Reports.js +43 -28
- package/lib/cjs/widget/components/Reports.js.map +1 -1
- package/lib/cjs/widget/components/Reports.scss +8 -4
- package/lib/cjs/widget/components/ReportsContainer.js +1 -1
- package/lib/cjs/widget/components/ReportsContainer.js.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.scss +2 -2
- package/lib/cjs/widget/components/SearchBar.js +1 -1
- package/lib/cjs/widget/components/SearchBar.js.map +1 -1
- package/lib/cjs/widget/components/SearchBar.scss +6 -0
- package/lib/cjs/widget/components/SelectIModel.js +2 -2
- package/lib/cjs/widget/components/SelectIModel.js.map +1 -1
- package/lib/cjs/widget/components/SelectIModel.scss +4 -3
- 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 +2 -2
- package/lib/esm/test/AddMappingModal.test.d.ts +2 -0
- package/lib/esm/test/AddMappingModal.test.d.ts.map +1 -0
- package/lib/esm/test/AddMappingModal.test.js +253 -0
- package/lib/esm/test/AddMappingModal.test.js.map +1 -0
- package/lib/esm/test/BulkExtractor.test.d.ts +2 -0
- package/lib/esm/test/BulkExtractor.test.d.ts.map +1 -0
- package/lib/esm/test/BulkExtractor.test.js +158 -0
- package/lib/esm/test/BulkExtractor.test.js.map +1 -0
- package/lib/esm/test/DeleteModal.test.d.ts +2 -0
- package/lib/esm/test/DeleteModal.test.d.ts.map +1 -0
- package/lib/esm/test/DeleteModal.test.js +69 -0
- package/lib/esm/test/DeleteModal.test.js.map +1 -0
- package/lib/esm/test/ReportAction.test.js +2 -3
- package/lib/esm/test/ReportAction.test.js.map +1 -1
- package/lib/esm/test/ReportMappingHorizontalTile.test.d.ts +2 -0
- package/lib/esm/test/ReportMappingHorizontalTile.test.d.ts.map +1 -0
- package/lib/esm/test/ReportMappingHorizontalTile.test.js +316 -0
- package/lib/esm/test/ReportMappingHorizontalTile.test.js.map +1 -0
- package/lib/esm/test/ReportMappings.test.js +117 -269
- package/lib/esm/test/ReportMappings.test.js.map +1 -1
- package/lib/esm/test/Reports.test.js +1 -1
- package/lib/esm/test/Reports.test.js.map +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/esm/widget/components/ActionPanel.js +4 -5
- package/lib/esm/widget/components/ActionPanel.js.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.d.ts +2 -2
- package/lib/esm/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.js +4 -5
- package/lib/esm/widget/components/AddMappingsModal.js.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.scss +4 -3
- package/lib/esm/widget/components/BulkExtractor.d.ts +37 -0
- package/lib/esm/widget/components/BulkExtractor.d.ts.map +1 -0
- package/lib/esm/widget/components/BulkExtractor.js +152 -0
- package/lib/esm/widget/components/BulkExtractor.js.map +1 -0
- package/lib/esm/widget/components/Constants.d.ts +4 -0
- package/lib/esm/widget/components/Constants.d.ts.map +1 -0
- package/lib/esm/widget/components/Constants.js +8 -0
- package/lib/esm/widget/components/Constants.js.map +1 -0
- package/lib/esm/widget/components/DeleteModal.js +1 -1
- package/lib/esm/widget/components/DeleteModal.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.scss +4 -3
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.d.ts +8 -0
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.d.ts.map +1 -0
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.js +16 -0
- package/lib/esm/widget/components/ExtractionStates/FailedExtractionState.js.map +1 -0
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.d.ts +3 -0
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.d.ts.map +1 -0
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.js +11 -0
- package/lib/esm/widget/components/ExtractionStates/QueuedExtractionState.js.map +1 -0
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.d.ts +3 -0
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.d.ts.map +1 -0
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.js +10 -0
- package/lib/esm/widget/components/ExtractionStates/RunningExtractionState.js.map +1 -0
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.d.ts +3 -0
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.d.ts.map +1 -0
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.js +11 -0
- package/lib/esm/widget/components/ExtractionStates/StartingExtractionState.js.map +1 -0
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.d.ts +8 -0
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.d.ts.map +1 -0
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.js +16 -0
- package/lib/esm/widget/components/ExtractionStates/SucceededExtractionState.js.map +1 -0
- package/lib/esm/widget/components/ExtractionStatus.d.ts +17 -0
- package/lib/esm/widget/components/ExtractionStatus.d.ts.map +1 -0
- package/lib/esm/widget/components/ExtractionStatus.js +53 -0
- package/lib/esm/widget/components/ExtractionStatus.js.map +1 -0
- package/{src/widget/components/Extraction.scss → lib/esm/widget/components/ExtractionStatus.scss} +17 -15
- package/lib/esm/widget/components/ExtractionToast.d.ts +11 -0
- package/lib/esm/widget/components/ExtractionToast.d.ts.map +1 -0
- package/lib/esm/widget/components/ExtractionToast.js +25 -0
- package/lib/esm/widget/components/ExtractionToast.js.map +1 -0
- package/lib/esm/widget/components/HorizontalTile.d.ts +8 -7
- package/lib/esm/widget/components/HorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.js +10 -6
- package/lib/esm/widget/components/HorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.scss +42 -22
- package/lib/esm/widget/components/ReportAction.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportAction.js +3 -3
- package/lib/esm/widget/components/ReportAction.js.map +1 -1
- package/lib/esm/widget/components/ReportAction.scss +2 -2
- package/lib/esm/widget/components/ReportHorizontalTile.d.ts +16 -0
- package/lib/esm/widget/components/ReportHorizontalTile.d.ts.map +1 -0
- package/lib/esm/widget/components/ReportHorizontalTile.js +64 -0
- package/lib/esm/widget/components/ReportHorizontalTile.js.map +1 -0
- package/lib/esm/widget/components/ReportMappingHorizontalTile.d.ts +13 -0
- package/lib/esm/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -0
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js +75 -0
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js.map +1 -0
- package/lib/esm/widget/components/ReportMappings.d.ts +3 -1
- package/lib/esm/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportMappings.js +40 -41
- package/lib/esm/widget/components/ReportMappings.js.map +1 -1
- package/lib/esm/widget/components/ReportMappings.scss +7 -7
- package/lib/esm/widget/components/Reports.d.ts.map +1 -1
- package/lib/esm/widget/components/Reports.js +45 -30
- package/lib/esm/widget/components/Reports.js.map +1 -1
- package/lib/esm/widget/components/Reports.scss +8 -4
- package/lib/esm/widget/components/ReportsContainer.js +1 -1
- package/lib/esm/widget/components/ReportsContainer.js.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.scss +2 -2
- package/lib/esm/widget/components/SearchBar.js +1 -1
- package/lib/esm/widget/components/SearchBar.js.map +1 -1
- package/lib/esm/widget/components/SearchBar.scss +6 -0
- 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 +4 -3
- package/lib/esm/widget/components/utils.js +1 -1
- package/lib/esm/widget/components/utils.js.map +1 -1
- package/lib/esm/widget/components/utils.scss +2 -2
- package/lib/public/locales/en/ReportsConfigWidget.json +7 -1
- package/package.json +9 -3
- package/public/locales/en/ReportsConfigWidget.json +7 -1
- package/reports-config-widget-react.build.error.log +10 -6
- package/reports-config-widget-react.build.log +51 -36
- package/src/test/AddMappingModal.test.tsx +315 -0
- package/src/test/BulkExtractor.test.ts +301 -0
- package/src/test/DeleteModal.test.tsx +118 -0
- package/src/test/ReportAction.test.tsx +2 -4
- package/src/test/ReportMappingHorizontalTile.test.tsx +451 -0
- package/src/test/ReportMappings.test.tsx +154 -549
- package/src/test/Reports.test.tsx +1 -1
- package/src/widget/components/ActionPanel.tsx +19 -23
- package/src/widget/components/AddMappingsModal.scss +4 -3
- package/src/widget/components/AddMappingsModal.tsx +4 -6
- package/src/widget/components/BulkExtractor.ts +192 -0
- package/src/widget/components/Constants.ts +7 -0
- package/src/widget/components/DeleteModal.scss +4 -3
- package/src/widget/components/DeleteModal.tsx +1 -1
- package/src/widget/components/ExtractionStates/FailedExtractionState.tsx +34 -0
- package/src/widget/components/ExtractionStates/QueuedExtractionState.tsx +20 -0
- package/src/widget/components/ExtractionStates/RunningExtractionState.tsx +18 -0
- package/src/widget/components/ExtractionStates/StartingExtractionState.tsx +22 -0
- package/src/widget/components/ExtractionStates/SucceededExtractionState.tsx +35 -0
- package/{lib/esm/widget/components/Extraction.scss → src/widget/components/ExtractionStatus.scss} +17 -15
- package/src/widget/components/ExtractionStatus.tsx +70 -0
- package/src/widget/components/ExtractionToast.tsx +41 -0
- package/src/widget/components/HorizontalTile.scss +42 -22
- package/src/widget/components/HorizontalTile.tsx +45 -34
- package/src/widget/components/ReportAction.scss +2 -2
- package/src/widget/components/ReportAction.tsx +1 -3
- package/src/widget/components/ReportHorizontalTile.tsx +130 -0
- package/src/widget/components/ReportMappingHorizontalTile.tsx +128 -0
- package/src/widget/components/ReportMappings.scss +7 -7
- package/src/widget/components/ReportMappings.tsx +91 -113
- package/src/widget/components/Reports.scss +8 -4
- package/src/widget/components/Reports.tsx +78 -62
- package/src/widget/components/ReportsContainer.scss +2 -2
- package/src/widget/components/ReportsContainer.tsx +1 -1
- package/src/widget/components/SearchBar.scss +6 -0
- package/src/widget/components/SearchBar.tsx +1 -1
- package/src/widget/components/SelectIModel.scss +4 -3
- package/src/widget/components/SelectIModel.tsx +2 -2
- package/src/widget/components/utils.scss +2 -2
- package/src/widget/components/utils.tsx +1 -1
- package/coverage/lcov-report/src/widget/components/Extraction.tsx.html +0 -1030
- package/lib/cjs/widget/components/Extraction.d.ts +0 -28
- package/lib/cjs/widget/components/Extraction.d.ts.map +0 -1
- package/lib/cjs/widget/components/Extraction.js +0 -190
- package/lib/cjs/widget/components/Extraction.js.map +0 -1
- package/lib/esm/widget/components/Extraction.d.ts +0 -28
- package/lib/esm/widget/components/Extraction.d.ts.map +0 -1
- package/lib/esm/widget/components/Extraction.js +0 -166
- package/lib/esm/widget/components/Extraction.js.map +0 -1
- package/src/widget/components/Extraction.tsx +0 -315
|
@@ -5,15 +5,11 @@
|
|
|
5
5
|
import {
|
|
6
6
|
SvgAdd,
|
|
7
7
|
SvgCopy,
|
|
8
|
-
SvgDelete,
|
|
9
|
-
SvgMore,
|
|
10
8
|
} from "@itwin/itwinui-icons-react";
|
|
11
9
|
import {
|
|
12
10
|
Button,
|
|
13
|
-
DropdownMenu,
|
|
14
11
|
IconButton,
|
|
15
12
|
LabeledInput,
|
|
16
|
-
MenuItem,
|
|
17
13
|
Surface,
|
|
18
14
|
Text,
|
|
19
15
|
toaster,
|
|
@@ -31,19 +27,21 @@ import "./ReportMappings.scss";
|
|
|
31
27
|
import DeleteModal from "./DeleteModal";
|
|
32
28
|
import type { Report, ReportMapping } from "@itwin/insights-client";
|
|
33
29
|
import { MappingsClient, REPORTING_BASE_PATH, ReportsClient } from "@itwin/insights-client";
|
|
34
|
-
import AddMappingsModal from "./AddMappingsModal";
|
|
30
|
+
import { AddMappingsModal } from "./AddMappingsModal";
|
|
35
31
|
import type {
|
|
36
32
|
GetSingleIModelParams,
|
|
37
33
|
IModelsClientOptions,
|
|
38
34
|
} from "@itwin/imodels-client-management";
|
|
39
35
|
import { Constants, IModelsClient } from "@itwin/imodels-client-management";
|
|
40
36
|
import { AccessTokenAdapter } from "@itwin/imodels-access-frontend";
|
|
41
|
-
import { HorizontalTile } from "./HorizontalTile";
|
|
42
|
-
import { Extraction, ExtractionStates, ExtractionStatus } from "./Extraction";
|
|
43
37
|
import { SearchBar } from "./SearchBar";
|
|
44
38
|
import type { ReportsApiConfig } from "../context/ReportsApiConfigContext";
|
|
45
39
|
import { useReportsApiConfig } from "../context/ReportsApiConfigContext";
|
|
46
40
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
41
|
+
import { ReportMappingHorizontalTile } from "./ReportMappingHorizontalTile";
|
|
42
|
+
import type BulkExtractor from "./BulkExtractor";
|
|
43
|
+
import { BeEvent } from "@itwin/core-bentley";
|
|
44
|
+
import { LoadingSpinner } from "./utils";
|
|
47
45
|
|
|
48
46
|
export type ReportMappingType = CreateTypeFromInterface<ReportMapping>;
|
|
49
47
|
|
|
@@ -59,9 +57,7 @@ enum ReportMappingsView {
|
|
|
59
57
|
}
|
|
60
58
|
|
|
61
59
|
const fetchReportMappings = async (
|
|
62
|
-
setReportMappings:
|
|
63
|
-
React.SetStateAction<ReportMappingAndMapping[]>
|
|
64
|
-
>,
|
|
60
|
+
setReportMappings: (mappings: ReportMappingAndMapping[]) => void,
|
|
65
61
|
reportId: string,
|
|
66
62
|
setIsLoading: React.Dispatch<React.SetStateAction<boolean>>,
|
|
67
63
|
apiContext: ReportsApiConfig
|
|
@@ -87,37 +83,37 @@ const fetchReportMappings = async (
|
|
|
87
83
|
const authorization =
|
|
88
84
|
AccessTokenAdapter.toAuthorizationCallback(accessToken);
|
|
89
85
|
const iModelNames = new Map<string, string>();
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
86
|
+
|
|
87
|
+
const reportMappingsAndMappings = [];
|
|
88
|
+
for (const reportMapping of reportMappings) {
|
|
89
|
+
const iModelId = reportMapping.imodelId;
|
|
90
|
+
let iModelName = "";
|
|
91
|
+
const mapping = await mappingsClientApi.getMapping(
|
|
92
|
+
accessToken,
|
|
93
|
+
iModelId,
|
|
94
|
+
reportMapping.mappingId
|
|
95
|
+
);
|
|
96
|
+
if (iModelNames.has(iModelId)) {
|
|
97
|
+
iModelName = iModelNames.get(iModelId) ?? "";
|
|
98
|
+
} else {
|
|
99
|
+
const getSingleParams: GetSingleIModelParams = {
|
|
100
|
+
authorization,
|
|
96
101
|
iModelId,
|
|
97
|
-
reportMapping.mappingId
|
|
98
|
-
);
|
|
99
|
-
if (iModelNames.has(iModelId)) {
|
|
100
|
-
iModelName = iModelNames.get(iModelId) ?? "";
|
|
101
|
-
} else {
|
|
102
|
-
const getSingleParams: GetSingleIModelParams = {
|
|
103
|
-
authorization,
|
|
104
|
-
iModelId,
|
|
105
|
-
};
|
|
106
|
-
const iModel = await iModelsClient.iModels.getSingle(getSingleParams);
|
|
107
|
-
iModelName = iModel.displayName;
|
|
108
|
-
iModelNames.set(iModelId, iModelName);
|
|
109
|
-
}
|
|
110
|
-
const reportMappingAndMapping: ReportMappingAndMapping = {
|
|
111
|
-
...reportMapping,
|
|
112
|
-
iModelName,
|
|
113
|
-
mappingName: mapping.mappingName,
|
|
114
|
-
mappingDescription: mapping.description ?? "",
|
|
115
102
|
};
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
103
|
+
const iModel = await iModelsClient.iModels.getSingle(getSingleParams);
|
|
104
|
+
iModelName = iModel.displayName;
|
|
105
|
+
iModelNames.set(iModelId, iModelName);
|
|
106
|
+
}
|
|
107
|
+
const reportMappingAndMapping: ReportMappingAndMapping = {
|
|
108
|
+
...reportMapping,
|
|
109
|
+
iModelName,
|
|
110
|
+
mappingName: mapping.mappingName,
|
|
111
|
+
mappingDescription: mapping.description ?? "",
|
|
112
|
+
};
|
|
113
|
+
reportMappingsAndMappings.push(reportMappingAndMapping);
|
|
114
|
+
}
|
|
119
115
|
|
|
120
|
-
setReportMappings(
|
|
116
|
+
setReportMappings(reportMappingsAndMappings);
|
|
121
117
|
} catch (error: any) {
|
|
122
118
|
handleError(error.status);
|
|
123
119
|
} finally {
|
|
@@ -127,27 +123,25 @@ const fetchReportMappings = async (
|
|
|
127
123
|
|
|
128
124
|
interface ReportMappingsProps {
|
|
129
125
|
report: Report;
|
|
126
|
+
bulkExtractor: BulkExtractor;
|
|
130
127
|
goBack: () => Promise<void>;
|
|
131
128
|
}
|
|
132
129
|
|
|
133
|
-
export const ReportMappings = ({ report, goBack }: ReportMappingsProps) => {
|
|
130
|
+
export const ReportMappings = ({ report, bulkExtractor, goBack }: ReportMappingsProps) => {
|
|
134
131
|
const apiConfig = useReportsApiConfig();
|
|
135
132
|
const [reportMappingsView, setReportMappingsView] =
|
|
136
133
|
useState<ReportMappingsView>(ReportMappingsView.REPORTMAPPINGS);
|
|
137
|
-
const [selectedReportMapping, setSelectedReportMapping] = useState<
|
|
138
|
-
ReportMappingAndMapping | undefined
|
|
139
|
-
>(undefined);
|
|
134
|
+
const [selectedReportMapping, setSelectedReportMapping] = useState<ReportMappingAndMapping | undefined>(undefined);
|
|
140
135
|
const [showDeleteModal, setShowDeleteModal] = useState<boolean>(false);
|
|
141
136
|
const [isLoading, setIsLoading] = useState<boolean>(true);
|
|
137
|
+
const [searchValue, setSearchValue] = useState<string>("");
|
|
138
|
+
const [reportMappings, setReportMappings] = useState<ReportMappingAndMapping[]>([]);
|
|
139
|
+
const [jobRunning, setJobRunning] = useState<boolean>(false);
|
|
142
140
|
|
|
143
|
-
const
|
|
144
|
-
|
|
141
|
+
const jobStartEvent = useMemo(
|
|
142
|
+
() => new BeEvent<(iModelId: string) => void>(),
|
|
143
|
+
[]
|
|
145
144
|
);
|
|
146
|
-
const [runningIModelId, setRunningIModelId] = useState<string>("");
|
|
147
|
-
const [searchValue, setSearchValue] = useState<string>("");
|
|
148
|
-
const [reportMappings, setReportMappings] = useState<
|
|
149
|
-
ReportMappingAndMapping[]
|
|
150
|
-
>([]);
|
|
151
145
|
|
|
152
146
|
useEffect(() => {
|
|
153
147
|
void fetchReportMappings(
|
|
@@ -158,6 +152,10 @@ export const ReportMappings = ({ report, goBack }: ReportMappingsProps) => {
|
|
|
158
152
|
);
|
|
159
153
|
}, [apiConfig, report.id, setIsLoading]);
|
|
160
154
|
|
|
155
|
+
useEffect(() => {
|
|
156
|
+
bulkExtractor.setHook(setJobRunning, reportMappings.map((x) => x.imodelId));
|
|
157
|
+
}, [bulkExtractor, reportMappings]);
|
|
158
|
+
|
|
161
159
|
const refresh = useCallback(async () => {
|
|
162
160
|
setReportMappingsView(ReportMappingsView.REPORTMAPPINGS);
|
|
163
161
|
await fetchReportMappings(
|
|
@@ -172,17 +170,6 @@ export const ReportMappings = ({ report, goBack }: ReportMappingsProps) => {
|
|
|
172
170
|
setReportMappingsView(ReportMappingsView.ADDING);
|
|
173
171
|
};
|
|
174
172
|
|
|
175
|
-
const uniqueIModels = useMemo(
|
|
176
|
-
() =>
|
|
177
|
-
new Map(
|
|
178
|
-
reportMappings.map((mapping) => [
|
|
179
|
-
mapping.imodelId,
|
|
180
|
-
mapping.iModelName,
|
|
181
|
-
])
|
|
182
|
-
),
|
|
183
|
-
[reportMappings]
|
|
184
|
-
);
|
|
185
|
-
|
|
186
173
|
const odataFeedUrl = `${generateUrl(
|
|
187
174
|
REPORTING_BASE_PATH,
|
|
188
175
|
apiConfig.baseUrl
|
|
@@ -202,12 +189,12 @@ export const ReportMappings = ({ report, goBack }: ReportMappingsProps) => {
|
|
|
202
189
|
return (
|
|
203
190
|
<>
|
|
204
191
|
<WidgetHeader title={report.displayName} returnFn={goBack} />
|
|
205
|
-
<div className="report-mapping-misc">
|
|
192
|
+
<div className="rcw-report-mapping-misc">
|
|
206
193
|
<LabeledInput
|
|
207
194
|
label={ReportsConfigWidget.localization.getLocalizedString(
|
|
208
195
|
"ReportsConfigWidget:ODataFeedURL"
|
|
209
196
|
)}
|
|
210
|
-
className="odata-url-input"
|
|
197
|
+
className="rcw-odata-url-input"
|
|
211
198
|
readOnly={true}
|
|
212
199
|
value={odataFeedUrl}
|
|
213
200
|
svgIcon={
|
|
@@ -230,16 +217,9 @@ export const ReportMappings = ({ report, goBack }: ReportMappingsProps) => {
|
|
|
230
217
|
}
|
|
231
218
|
iconDisplayStyle="inline"
|
|
232
219
|
/>
|
|
233
|
-
<Extraction
|
|
234
|
-
iModels={uniqueIModels}
|
|
235
|
-
extractionState={extractionState}
|
|
236
|
-
setExtractionState={setExtractionState}
|
|
237
|
-
setExtractingIModelId={setRunningIModelId}
|
|
238
|
-
isLoading={isLoading}
|
|
239
|
-
/>
|
|
240
220
|
</div>
|
|
241
|
-
<Surface className="report-mappings-container">
|
|
242
|
-
<div className="toolbar">
|
|
221
|
+
<Surface className="rcw-report-mappings-container">
|
|
222
|
+
<div className="rcw-toolbar">
|
|
243
223
|
<Button
|
|
244
224
|
startIcon={<SvgAdd />}
|
|
245
225
|
onClick={() => addMapping()}
|
|
@@ -249,7 +229,7 @@ export const ReportMappings = ({ report, goBack }: ReportMappingsProps) => {
|
|
|
249
229
|
"ReportsConfigWidget:AddMapping"
|
|
250
230
|
)}
|
|
251
231
|
</Button>
|
|
252
|
-
<div className="search-bar-container" data-testid="search-bar">
|
|
232
|
+
<div className="rcw-search-bar-container" data-testid="rcw-search-bar">
|
|
253
233
|
<SearchBar
|
|
254
234
|
searchValue={searchValue}
|
|
255
235
|
setSearchValue={setSearchValue}
|
|
@@ -277,49 +257,18 @@ export const ReportMappings = ({ report, goBack }: ReportMappingsProps) => {
|
|
|
277
257
|
</>
|
|
278
258
|
</EmptyMessage>
|
|
279
259
|
) : (
|
|
280
|
-
<div className="mapping-list">
|
|
260
|
+
<div className="rcw-mapping-list">
|
|
281
261
|
{filteredReportMappings.map((mapping) => (
|
|
282
|
-
<
|
|
262
|
+
<ReportMappingHorizontalTile
|
|
283
263
|
key={mapping.mappingId}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
: ExtractionStates.None
|
|
293
|
-
}
|
|
294
|
-
>
|
|
295
|
-
<DropdownMenu
|
|
296
|
-
menuItems={(close: () => void) => [
|
|
297
|
-
<MenuItem
|
|
298
|
-
key={0}
|
|
299
|
-
onClick={() => {
|
|
300
|
-
setSelectedReportMapping(mapping);
|
|
301
|
-
setShowDeleteModal(true);
|
|
302
|
-
close();
|
|
303
|
-
}}
|
|
304
|
-
icon={<SvgDelete />}
|
|
305
|
-
>
|
|
306
|
-
{ReportsConfigWidget.localization.getLocalizedString(
|
|
307
|
-
"ReportsConfigWidget:Remove"
|
|
308
|
-
)}
|
|
309
|
-
</MenuItem>,
|
|
310
|
-
]}
|
|
311
|
-
>
|
|
312
|
-
<IconButton styleType="borderless">
|
|
313
|
-
<SvgMore
|
|
314
|
-
style={{
|
|
315
|
-
width: "16px",
|
|
316
|
-
height: "16px",
|
|
317
|
-
}}
|
|
318
|
-
/>
|
|
319
|
-
</IconButton>
|
|
320
|
-
</DropdownMenu>
|
|
321
|
-
</ExtractionStatus>
|
|
322
|
-
}
|
|
264
|
+
bulkExtractor={bulkExtractor}
|
|
265
|
+
mapping={mapping}
|
|
266
|
+
onClickDelete={() => {
|
|
267
|
+
setSelectedReportMapping(mapping);
|
|
268
|
+
setShowDeleteModal(true);
|
|
269
|
+
}}
|
|
270
|
+
odataFeedUrl={odataFeedUrl}
|
|
271
|
+
jobStartEvent={jobStartEvent}
|
|
323
272
|
/>
|
|
324
273
|
))}
|
|
325
274
|
</div>
|
|
@@ -348,6 +297,35 @@ export const ReportMappings = ({ report, goBack }: ReportMappingsProps) => {
|
|
|
348
297
|
}}
|
|
349
298
|
refresh={refresh}
|
|
350
299
|
/>
|
|
300
|
+
<div className="rcw-action-panel">
|
|
301
|
+
{isLoading && <LoadingSpinner />}
|
|
302
|
+
<Button
|
|
303
|
+
disabled={isLoading || jobRunning || reportMappings.length === 0}
|
|
304
|
+
styleType="high-visibility"
|
|
305
|
+
onClick={async () => {
|
|
306
|
+
setJobRunning(true);
|
|
307
|
+
const uniqueIModels = Array.from(new Set(reportMappings.map((x) => x.imodelId)));
|
|
308
|
+
await bulkExtractor.runIModelExtractions(uniqueIModels);
|
|
309
|
+
reportMappings.forEach((reportMapping) => {
|
|
310
|
+
jobStartEvent.raiseEvent(reportMapping.imodelId);
|
|
311
|
+
});
|
|
312
|
+
}}
|
|
313
|
+
>
|
|
314
|
+
{ReportsConfigWidget.localization.getLocalizedString(
|
|
315
|
+
"ReportsConfigWidget:UpdateAllDatasets"
|
|
316
|
+
)}
|
|
317
|
+
</Button>
|
|
318
|
+
<Button
|
|
319
|
+
styleType="default"
|
|
320
|
+
type="button"
|
|
321
|
+
onClick={goBack}
|
|
322
|
+
disabled={isLoading}
|
|
323
|
+
>
|
|
324
|
+
{ReportsConfigWidget.localization.getLocalizedString(
|
|
325
|
+
"ReportsConfigWidget:Close"
|
|
326
|
+
)}
|
|
327
|
+
</Button>
|
|
328
|
+
</div>
|
|
351
329
|
</>
|
|
352
330
|
);
|
|
353
331
|
};
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
6
|
|
|
7
|
-
.reports-list-container {
|
|
7
|
+
.rcw-reports-list-container {
|
|
8
8
|
display: flex;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
flex-grow: 1;
|
|
11
11
|
padding: $iui-baseline $iui-m;
|
|
12
12
|
min-height: 0;
|
|
13
13
|
|
|
14
|
-
.toolbar {
|
|
14
|
+
.rcw-toolbar {
|
|
15
15
|
display: flex;
|
|
16
16
|
justify-content: space-between;
|
|
17
17
|
gap: $iui-s;
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
flex-wrap: wrap;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.search-bar-container {
|
|
23
|
+
.rcw-search-bar-container {
|
|
24
24
|
flex-basis: $iui-3xl;
|
|
25
25
|
flex-shrink: 1;
|
|
26
26
|
flex-grow: 1;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.reports-list {
|
|
29
|
+
.rcw-reports-list {
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
overflow-y: overlay;
|
|
@@ -34,3 +34,7 @@
|
|
|
34
34
|
margin-top: 7.5px;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
.rcw-button-container {
|
|
39
|
+
display: flex;
|
|
40
|
+
}
|
|
@@ -4,16 +4,13 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import {
|
|
6
6
|
SvgAdd,
|
|
7
|
-
|
|
8
|
-
SvgEdit,
|
|
9
|
-
SvgMore,
|
|
7
|
+
SvgPlay,
|
|
10
8
|
} from "@itwin/itwinui-icons-react";
|
|
11
9
|
import {
|
|
12
10
|
Button,
|
|
13
|
-
DropdownMenu,
|
|
14
11
|
IconButton,
|
|
15
|
-
MenuItem,
|
|
16
12
|
Surface,
|
|
13
|
+
toaster,
|
|
17
14
|
} from "@itwin/itwinui-react";
|
|
18
15
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
19
16
|
import type { CreateTypeFromInterface } from "./utils";
|
|
@@ -30,12 +27,15 @@ import type { Report } from "@itwin/insights-client";
|
|
|
30
27
|
import { REPORTING_BASE_PATH, ReportsClient } from "@itwin/insights-client";
|
|
31
28
|
import ReportAction from "./ReportAction";
|
|
32
29
|
import { ReportMappings } from "./ReportMappings";
|
|
33
|
-
import {
|
|
30
|
+
import { ReportHorizontalTile } from "./ReportHorizontalTile";
|
|
34
31
|
import { SearchBar } from "./SearchBar";
|
|
35
32
|
import type { ReportsApiConfig } from "../context/ReportsApiConfigContext";
|
|
36
33
|
import { useReportsApiConfig } from "../context/ReportsApiConfigContext";
|
|
37
34
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
38
35
|
import { useActiveIModelConnection } from "@itwin/appui-react";
|
|
36
|
+
import BulkExtractor from "./BulkExtractor";
|
|
37
|
+
import { BeEvent } from "@itwin/core-bentley";
|
|
38
|
+
import { FailedExtractionToast, SuccessfulExtractionToast } from "./ExtractionToast";
|
|
39
39
|
|
|
40
40
|
export type ReportType = CreateTypeFromInterface<Report>;
|
|
41
41
|
|
|
@@ -69,8 +69,17 @@ const fetchReports = async (
|
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
export const Reports = () => {
|
|
72
|
+
const successfulExtractionToast = (iModelName: string, odataFeedUrl: string) => {
|
|
73
|
+
toaster.positive(<SuccessfulExtractionToast iModelName={iModelName} odataFeedUrl={odataFeedUrl} />);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const failedExtractionToast = (iModelName: string) => {
|
|
77
|
+
toaster.negative(<FailedExtractionToast iModelName={iModelName} />);
|
|
78
|
+
};
|
|
79
|
+
|
|
72
80
|
const iTwinId = useActiveIModelConnection()?.iTwinId ?? "";
|
|
73
81
|
const apiConfig = useReportsApiConfig();
|
|
82
|
+
const [selectedReportIds, setSelectedReportIds] = useState<string[]>([]);
|
|
74
83
|
const [showDeleteModal, setShowDeleteModal] = useState<boolean>(false);
|
|
75
84
|
const [reportsView, setReportsView] = useState<ReportsView>(
|
|
76
85
|
ReportsView.REPORTS
|
|
@@ -81,6 +90,14 @@ export const Reports = () => {
|
|
|
81
90
|
const [isLoading, setIsLoading] = useState<boolean>(true);
|
|
82
91
|
const [searchValue, setSearchValue] = useState<string>("");
|
|
83
92
|
const [reports, setReports] = useState<Report[]>([]);
|
|
93
|
+
const bulkExtractor = useMemo(
|
|
94
|
+
() => new BulkExtractor(apiConfig, successfulExtractionToast, failedExtractionToast),
|
|
95
|
+
[apiConfig]
|
|
96
|
+
);
|
|
97
|
+
const jobStartEvent = useMemo(
|
|
98
|
+
() => new BeEvent<(reportId: string) => void>(),
|
|
99
|
+
[]
|
|
100
|
+
);
|
|
84
101
|
|
|
85
102
|
useEffect(() => {
|
|
86
103
|
void fetchReports(setReports, iTwinId, setIsLoading, apiConfig);
|
|
@@ -107,6 +124,25 @@ export const Reports = () => {
|
|
|
107
124
|
[reports, searchValue]
|
|
108
125
|
);
|
|
109
126
|
|
|
127
|
+
const onSelectionChange = (reportId: string, control: boolean) => {
|
|
128
|
+
if (!control)
|
|
129
|
+
setSelectedReportIds([]);
|
|
130
|
+
|
|
131
|
+
setSelectedReportIds((sr) =>
|
|
132
|
+
sr.some((r) => reportId === r)
|
|
133
|
+
? sr.filter(
|
|
134
|
+
(r) => reportId !== r
|
|
135
|
+
)
|
|
136
|
+
: [...sr, reportId]
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const updateDatasets = useCallback(async () => {
|
|
141
|
+
await bulkExtractor.runReportExtractions(selectedReportIds);
|
|
142
|
+
selectedReportIds.map((reportId) => jobStartEvent.raiseEvent(reportId));
|
|
143
|
+
setSelectedReportIds([]);
|
|
144
|
+
}, [selectedReportIds, jobStartEvent, bulkExtractor]);
|
|
145
|
+
|
|
110
146
|
switch (reportsView) {
|
|
111
147
|
case ReportsView.ADDING:
|
|
112
148
|
return iTwinId ? (
|
|
@@ -122,7 +158,7 @@ export const Reports = () => {
|
|
|
122
158
|
) : null;
|
|
123
159
|
case ReportsView.REPORTSMAPPING:
|
|
124
160
|
return selectedReport ? (
|
|
125
|
-
<ReportMappings report={selectedReport} goBack={refresh} />
|
|
161
|
+
<ReportMappings report={selectedReport} bulkExtractor={bulkExtractor} goBack={refresh} />
|
|
126
162
|
) : null;
|
|
127
163
|
default:
|
|
128
164
|
return (
|
|
@@ -132,8 +168,8 @@ export const Reports = () => {
|
|
|
132
168
|
"ReportsConfigWidget:ITwinReports"
|
|
133
169
|
)}
|
|
134
170
|
/>
|
|
135
|
-
<Surface className="reports-list-container">
|
|
136
|
-
<div className="toolbar">
|
|
171
|
+
<Surface className="rcw-reports-list-container">
|
|
172
|
+
<div className="rcw-toolbar">
|
|
137
173
|
<Button
|
|
138
174
|
startIcon={<SvgAdd />}
|
|
139
175
|
onClick={() => addReport()}
|
|
@@ -143,12 +179,23 @@ export const Reports = () => {
|
|
|
143
179
|
"ReportsConfigWidget:New"
|
|
144
180
|
)}
|
|
145
181
|
</Button>
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
182
|
+
<IconButton
|
|
183
|
+
title={ReportsConfigWidget.localization.getLocalizedString(
|
|
184
|
+
"ReportsConfigWidget:UpdateDatasets"
|
|
185
|
+
)}
|
|
186
|
+
onClick={updateDatasets}
|
|
187
|
+
disabled={selectedReportIds.length === 0}
|
|
188
|
+
>
|
|
189
|
+
<SvgPlay />
|
|
190
|
+
</IconButton>
|
|
191
|
+
<div className="rcw-search-bar-container" data-testid="rcw-search-bar">
|
|
192
|
+
<div className="rcw-search-button">
|
|
193
|
+
<SearchBar
|
|
194
|
+
searchValue={searchValue}
|
|
195
|
+
setSearchValue={setSearchValue}
|
|
196
|
+
disabled={isLoading}
|
|
197
|
+
/>
|
|
198
|
+
</div>
|
|
152
199
|
</div>
|
|
153
200
|
</div>
|
|
154
201
|
{isLoading ? (
|
|
@@ -160,7 +207,7 @@ export const Reports = () => {
|
|
|
160
207
|
"ReportsConfigWidget:NoReports"
|
|
161
208
|
)}
|
|
162
209
|
<div>
|
|
163
|
-
<Button onClick={
|
|
210
|
+
<Button onClick={addReport} styleType="cta">
|
|
164
211
|
{ReportsConfigWidget.localization.getLocalizedString(
|
|
165
212
|
"ReportsConfigWidget:CreateOneReportCTA"
|
|
166
213
|
)}
|
|
@@ -169,58 +216,27 @@ export const Reports = () => {
|
|
|
169
216
|
</>
|
|
170
217
|
</EmptyMessage>
|
|
171
218
|
) : (
|
|
172
|
-
<div className="reports-list">
|
|
219
|
+
<div className="rcw-reports-list">
|
|
173
220
|
{filteredReports.map((report) => (
|
|
174
|
-
<
|
|
221
|
+
<ReportHorizontalTile
|
|
175
222
|
key={report.id}
|
|
176
|
-
|
|
177
|
-
subText={report.description ?? ""}
|
|
178
|
-
subtextToolTip={report.description ?? ""}
|
|
179
|
-
titleTooltip={report.displayName}
|
|
223
|
+
report={report}
|
|
180
224
|
onClickTitle={() => {
|
|
181
225
|
setSelectedReport(report);
|
|
182
226
|
setReportsView(ReportsView.REPORTSMAPPING);
|
|
183
227
|
}}
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
"ReportsConfigWidget:Modify"
|
|
197
|
-
)}
|
|
198
|
-
</MenuItem>,
|
|
199
|
-
<MenuItem
|
|
200
|
-
key={1}
|
|
201
|
-
onClick={() => {
|
|
202
|
-
setSelectedReport(report);
|
|
203
|
-
setShowDeleteModal(true);
|
|
204
|
-
close();
|
|
205
|
-
}}
|
|
206
|
-
icon={<SvgDelete />}
|
|
207
|
-
>
|
|
208
|
-
{ReportsConfigWidget.localization.getLocalizedString(
|
|
209
|
-
"ReportsConfigWidget:Remove"
|
|
210
|
-
)}
|
|
211
|
-
</MenuItem>,
|
|
212
|
-
]}
|
|
213
|
-
>
|
|
214
|
-
<IconButton styleType="borderless">
|
|
215
|
-
<SvgMore
|
|
216
|
-
style={{
|
|
217
|
-
width: "16px",
|
|
218
|
-
height: "16px",
|
|
219
|
-
}}
|
|
220
|
-
/>
|
|
221
|
-
</IconButton>
|
|
222
|
-
</DropdownMenu>
|
|
223
|
-
}
|
|
228
|
+
jobStartEvent={jobStartEvent}
|
|
229
|
+
bulkExtractor={bulkExtractor}
|
|
230
|
+
onClickDelete={() => {
|
|
231
|
+
setSelectedReport(report);
|
|
232
|
+
setShowDeleteModal(true);
|
|
233
|
+
}}
|
|
234
|
+
onClickModify={() => {
|
|
235
|
+
setSelectedReport(report);
|
|
236
|
+
setReportsView(ReportsView.MODIFYING);
|
|
237
|
+
}}
|
|
238
|
+
onSelectionChange={onSelectionChange}
|
|
239
|
+
selected={selectedReportIds.some((reportId) => report.id === reportId)}
|
|
224
240
|
/>
|
|
225
241
|
))}
|
|
226
242
|
</div>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
6
|
|
|
7
|
-
.reports-container {
|
|
7
|
+
.rcw-reports-container {
|
|
8
8
|
position: absolute;
|
|
9
9
|
right: 0;
|
|
10
10
|
left: 0;
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
height: 100%;
|
|
16
16
|
overflow: auto;
|
|
17
17
|
gap: $iui-baseline;
|
|
18
|
-
}
|
|
18
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
opacity: 0;
|
|
10
10
|
width: 20%;
|
|
11
11
|
}
|
|
12
|
+
|
|
12
13
|
100% {
|
|
13
14
|
opacity: 1;
|
|
14
15
|
width: 100%;
|
|
@@ -20,8 +21,13 @@
|
|
|
20
21
|
opacity: 0;
|
|
21
22
|
width: 20%;
|
|
22
23
|
}
|
|
24
|
+
|
|
23
25
|
0% {
|
|
24
26
|
opacity: 1;
|
|
25
27
|
width: 100%;
|
|
26
28
|
}
|
|
27
29
|
}
|
|
30
|
+
|
|
31
|
+
.rcw-search-button {
|
|
32
|
+
float: right;
|
|
33
|
+
}
|
|
@@ -23,7 +23,7 @@ export const SearchBar = ({
|
|
|
23
23
|
const [searchBarClosing, setSearchBarClosing] = useState<boolean>(false);
|
|
24
24
|
|
|
25
25
|
return searchBarOpen || searchValue ? (
|
|
26
|
-
<div
|
|
26
|
+
<div className="rcw-search-button"
|
|
27
27
|
style={{
|
|
28
28
|
animation: searchBarClosing ? "rcw-shrink .5s" : "rcw-expand .5s",
|
|
29
29
|
}}
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
@import "~@itwin/itwinui-css/scss/variables";
|
|
6
6
|
|
|
7
|
-
.
|
|
7
|
+
.rcw-select-imodel {
|
|
8
8
|
position: relative;
|
|
9
9
|
margin-bottom: $iui-baseline * 2;
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
.rcw-combobox {
|
|
11
12
|
display: flex;
|
|
12
13
|
gap: $iui-s;
|
|
13
14
|
width: 100%;
|
|
14
15
|
}
|
|
15
|
-
}
|
|
16
|
+
}
|
|
@@ -78,13 +78,13 @@ export const SelectIModel = ({
|
|
|
78
78
|
}, [iModels]);
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
|
-
<div className="
|
|
81
|
+
<div className="rcw-select-imodel">
|
|
82
82
|
<Label htmlFor="combo-input">
|
|
83
83
|
{ReportsConfigWidget.localization.getLocalizedString(
|
|
84
84
|
"ReportsConfigWidget:SelectIModel"
|
|
85
85
|
)}
|
|
86
86
|
</Label>
|
|
87
|
-
<div className="combobox">
|
|
87
|
+
<div className="rcw-combobox">
|
|
88
88
|
<ComboBox<string>
|
|
89
89
|
options={iModelOptions}
|
|
90
90
|
value={selectedIModelId}
|