@itwin/reports-config-widget-react 0.2.0 → 0.3.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 +36 -32
- package/.rush/temp/shrinkwrap-deps.json +90 -36
- package/CHANGELOG.json +33 -0
- package/CHANGELOG.md +18 -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 +15 -28
- 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 +13 -78
- package/lib/cjs/test/ReportAction.test.js.map +1 -1
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js +2 -35
- 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 +38 -91
- package/lib/cjs/test/ReportMappings.test.js.map +1 -1
- package/lib/cjs/test/Reports.test.js +19 -72
- package/lib/cjs/test/Reports.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 +8 -33
- package/lib/cjs/test/test-utils.js.map +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/widget/components/ActionPanel.d.ts +1 -1
- 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/AddMappingsModal.d.ts +4 -4
- package/lib/cjs/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.js +23 -22
- package/lib/cjs/widget/components/AddMappingsModal.js.map +1 -1
- 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 +6 -6
- 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 +9 -13
- package/lib/cjs/widget/components/DeleteModal.js.map +1 -1
- package/lib/cjs/widget/components/HorizontalTile.scss +6 -3
- 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 +15 -15
- package/lib/cjs/widget/components/ReportAction.js.map +1 -1
- 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 +27 -12
- 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 +24 -9
- 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 +37 -47
- package/lib/cjs/widget/components/ReportMappings.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.scss +3 -3
- 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 +42 -83
- package/lib/cjs/widget/components/Reports.js.map +1 -1
- 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 +87 -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 +28 -16
- package/lib/cjs/widget/components/ReportsContainer.js.map +1 -1
- 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 +52 -0
- package/lib/cjs/widget/components/ReportsRouter.js.map +1 -0
- package/lib/cjs/widget/components/SearchBar.js +1 -2
- package/lib/cjs/widget/components/SearchBar.js.map +1 -1
- package/lib/cjs/widget/components/SearchBar.scss +1 -1
- 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 +6 -26
- package/lib/cjs/widget/components/SelectIModel.js.map +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.map +1 -1
- 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/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 +16 -29
- 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 +3 -36
- 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 +37 -90
- package/lib/esm/test/ReportMappings.test.js.map +1 -1
- package/lib/esm/test/Reports.test.js +20 -54
- package/lib/esm/test/Reports.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 +7 -31
- package/lib/esm/test/test-utils.js.map +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/widget/components/ActionPanel.d.ts +1 -1
- 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/AddMappingsModal.d.ts +4 -4
- package/lib/esm/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.js +25 -24
- package/lib/esm/widget/components/AddMappingsModal.js.map +1 -1
- 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 +9 -13
- package/lib/esm/widget/components/DeleteModal.js.map +1 -1
- package/lib/esm/widget/components/HorizontalTile.scss +6 -3
- 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 +14 -16
- package/lib/esm/widget/components/ReportAction.js.map +1 -1
- 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 +4 -5
- 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 +1 -2
- 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 +39 -49
- package/lib/esm/widget/components/ReportMappings.js.map +1 -1
- package/lib/esm/widget/components/ReportMappings.scss +3 -3
- 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 +45 -86
- package/lib/esm/widget/components/Reports.js.map +1 -1
- 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 +64 -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 +28 -17
- package/lib/esm/widget/components/ReportsContainer.js.map +1 -1
- 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 +45 -0
- package/lib/esm/widget/components/ReportsRouter.js.map +1 -0
- package/lib/esm/widget/components/SearchBar.js +1 -2
- package/lib/esm/widget/components/SearchBar.js.map +1 -1
- package/lib/esm/widget/components/SearchBar.scss +1 -1
- 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/utils.d.ts +1 -1
- package/lib/esm/widget/components/utils.d.ts.map +1 -1
- package/lib/esm/widget/components/utils.js.map +1 -1
- 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 +2 -1
- package/package.json +4 -4
- package/public/locales/en/ReportsConfigWidget.json +2 -1
- package/reports-config-widget-react.build.error.log +1 -14
- package/reports-config-widget-react.build.log +2 -60
- 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/test-utils.tsx +9 -49
- package/src/widget/components/ActionPanel.tsx +16 -14
- package/src/widget/components/AddMappingsModal.tsx +39 -39
- package/src/widget/components/BulkExtractor.ts +11 -10
- package/src/widget/components/DeleteModal.tsx +14 -20
- package/src/widget/components/HorizontalTile.scss +6 -3
- package/src/widget/components/ReportAction.tsx +15 -30
- package/src/widget/components/ReportHorizontalTile.tsx +10 -11
- package/src/widget/components/ReportMappingHorizontalTile.tsx +2 -3
- package/src/widget/components/ReportMappings.scss +3 -3
- package/src/widget/components/ReportMappings.tsx +66 -69
- package/src/widget/components/Reports.tsx +143 -187
- package/src/widget/components/ReportsConfigContext.tsx +95 -0
- 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 -1
- package/src/widget/components/SearchBar.tsx +2 -2
- package/src/widget/components/SelectIModel.tsx +11 -29
- package/src/widget/components/utils.tsx +1 -1
- package/src/widget/context/{ReportsApiConfigContext.tsx → BulkExtractorContext.tsx} +9 -10
- package/src/widget/context/ReportsConfigApiContext.tsx +39 -0
- package/coverage/clover.xml +0 -838
- package/coverage/coverage-final.json +0 -29
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -206
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/ReportsConfigWidget.ts.html +0 -193
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/test/index.html +0 -116
- package/coverage/lcov-report/src/test/test-utils.tsx.html +0 -316
- package/coverage/lcov-report/src/widget/ReportsConfigUiProvider.tsx.html +0 -286
- package/coverage/lcov-report/src/widget/components/ActionPanel.tsx.html +0 -241
- package/coverage/lcov-report/src/widget/components/AddMappingsModal.tsx.html +0 -604
- package/coverage/lcov-report/src/widget/components/BulkExtractor.ts.html +0 -661
- package/coverage/lcov-report/src/widget/components/Constants.ts.html +0 -106
- package/coverage/lcov-report/src/widget/components/DeleteModal.tsx.html +0 -385
- package/coverage/lcov-report/src/widget/components/ExtractionStates/FailedExtractionState.tsx.html +0 -187
- package/coverage/lcov-report/src/widget/components/ExtractionStates/QueuedExtractionState.tsx.html +0 -145
- package/coverage/lcov-report/src/widget/components/ExtractionStates/RunningExtractionState.tsx.html +0 -139
- package/coverage/lcov-report/src/widget/components/ExtractionStates/StartingExtractionState.tsx.html +0 -151
- package/coverage/lcov-report/src/widget/components/ExtractionStates/SucceededExtractionState.tsx.html +0 -190
- package/coverage/lcov-report/src/widget/components/ExtractionStates/index.html +0 -176
- package/coverage/lcov-report/src/widget/components/ExtractionStatus.tsx.html +0 -295
- package/coverage/lcov-report/src/widget/components/ExtractionToast.tsx.html +0 -208
- package/coverage/lcov-report/src/widget/components/HorizontalTile.tsx.html +0 -289
- package/coverage/lcov-report/src/widget/components/LocalizedTablePaginator.tsx.html +0 -262
- package/coverage/lcov-report/src/widget/components/ReportAction.tsx.html +0 -517
- package/coverage/lcov-report/src/widget/components/ReportHorizontalTile.tsx.html +0 -475
- package/coverage/lcov-report/src/widget/components/ReportMappingHorizontalTile.tsx.html +0 -469
- package/coverage/lcov-report/src/widget/components/ReportMappings.tsx.html +0 -1078
- package/coverage/lcov-report/src/widget/components/Reports.tsx.html +0 -877
- package/coverage/lcov-report/src/widget/components/ReportsContainer.tsx.html +0 -223
- package/coverage/lcov-report/src/widget/components/SearchBar.tsx.html +0 -271
- package/coverage/lcov-report/src/widget/components/SelectIModel.tsx.html +0 -391
- package/coverage/lcov-report/src/widget/components/index.html +0 -371
- package/coverage/lcov-report/src/widget/components/utils.tsx.html +0 -562
- package/coverage/lcov-report/src/widget/context/ReportsApiConfigContext.tsx.html +0 -166
- package/coverage/lcov-report/src/widget/context/index.html +0 -116
- package/coverage/lcov-report/src/widget/hooks/index.html +0 -116
- package/coverage/lcov-report/src/widget/hooks/useValidator.ts.html +0 -295
- package/coverage/lcov-report/src/widget/index.html +0 -116
- package/coverage/lcov.info +0 -1594
- 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,35 +3,32 @@
|
|
|
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";
|
|
19
18
|
|
|
20
19
|
export type MappingType = CreateTypeFromInterface<Mapping>;
|
|
21
20
|
|
|
22
21
|
const fetchMappings = async (
|
|
23
|
-
setMappings:
|
|
22
|
+
setMappings: (mappings: Mapping[]) => void,
|
|
24
23
|
iModelId: string,
|
|
25
|
-
setIsLoading:
|
|
26
|
-
|
|
24
|
+
setIsLoading: (isLoading: boolean) => void,
|
|
25
|
+
mappingsClient: MappingsClient,
|
|
26
|
+
getAccessToken: () => Promise<AccessToken>
|
|
27
27
|
) => {
|
|
28
28
|
try {
|
|
29
29
|
setIsLoading(true);
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
);
|
|
33
|
-
const accessToken = await apiContext.getAccessToken();
|
|
34
|
-
const mappings = await mappingsClientApi.getMappings(
|
|
30
|
+
const accessToken = await getAccessToken();
|
|
31
|
+
const mappings = await mappingsClient.getMappings(
|
|
35
32
|
accessToken,
|
|
36
33
|
iModelId
|
|
37
34
|
);
|
|
@@ -43,24 +40,26 @@ const fetchMappings = async (
|
|
|
43
40
|
}
|
|
44
41
|
};
|
|
45
42
|
|
|
46
|
-
interface AddMappingsModalProps {
|
|
43
|
+
export interface AddMappingsModalProps {
|
|
47
44
|
reportId: string;
|
|
48
45
|
existingMappings: ReportMappingAndMapping[];
|
|
49
46
|
show: boolean;
|
|
50
|
-
|
|
47
|
+
onClose: () => Promise<void>;
|
|
48
|
+
defaultIModelId?: string;
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
export const AddMappingsModal = ({
|
|
54
52
|
reportId,
|
|
55
53
|
existingMappings,
|
|
56
54
|
show,
|
|
57
|
-
|
|
55
|
+
onClose,
|
|
56
|
+
defaultIModelId,
|
|
58
57
|
}: AddMappingsModalProps) => {
|
|
59
58
|
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
60
|
-
const
|
|
61
|
-
const [selectedIModelId, setSelectediModelId] = useState<string>(
|
|
59
|
+
const selectedMappings = useRef<Mapping[]>([]);
|
|
60
|
+
const [selectedIModelId, setSelectediModelId] = useState<string | undefined>(defaultIModelId);
|
|
62
61
|
const [mappings, setMappings] = useState<Mapping[]>([]);
|
|
63
|
-
const
|
|
62
|
+
const { getAccessToken, mappingsClient, reportsClient } = useReportsConfigApi();
|
|
64
63
|
|
|
65
64
|
useEffect(() => {
|
|
66
65
|
if (selectedIModelId) {
|
|
@@ -68,10 +67,11 @@ export const AddMappingsModal = ({
|
|
|
68
67
|
setMappings,
|
|
69
68
|
selectedIModelId,
|
|
70
69
|
setIsLoading,
|
|
71
|
-
|
|
70
|
+
mappingsClient,
|
|
71
|
+
getAccessToken
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
|
-
}, [
|
|
74
|
+
}, [getAccessToken, mappingsClient, selectedIModelId, setIsLoading]);
|
|
75
75
|
|
|
76
76
|
const mappingsColumns = useMemo(
|
|
77
77
|
() => [
|
|
@@ -104,18 +104,15 @@ export const AddMappingsModal = ({
|
|
|
104
104
|
try {
|
|
105
105
|
if (!selectedIModelId) return;
|
|
106
106
|
setIsLoading(true);
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const accessToken = await apiConfig.getAccessToken();
|
|
111
|
-
for (const mapping of selectedMappings) {
|
|
112
|
-
await reportsClientApi.createReportMapping(accessToken, reportId, {
|
|
107
|
+
const accessToken = await getAccessToken();
|
|
108
|
+
for (const mapping of selectedMappings.current) {
|
|
109
|
+
await reportsClient.createReportMapping(accessToken, reportId, {
|
|
113
110
|
imodelId: selectedIModelId,
|
|
114
111
|
mappingId: mapping.id,
|
|
115
112
|
});
|
|
116
113
|
}
|
|
117
114
|
|
|
118
|
-
await
|
|
115
|
+
await onClose();
|
|
119
116
|
} catch (error: any) {
|
|
120
117
|
handleError(error.status);
|
|
121
118
|
} finally {
|
|
@@ -123,6 +120,14 @@ export const AddMappingsModal = ({
|
|
|
123
120
|
}
|
|
124
121
|
};
|
|
125
122
|
|
|
123
|
+
const onSelect = useCallback((selectData: Mapping[] | undefined) => {
|
|
124
|
+
if (selectData) selectedMappings.current = selectData;
|
|
125
|
+
}, []);
|
|
126
|
+
|
|
127
|
+
const tableData = useMemo(() => isLoading ? [] : mappings, [isLoading, mappings]);
|
|
128
|
+
const isRowDisabled = useCallback((rowData: MappingType) =>
|
|
129
|
+
existingMappings.some((v) => v.mappingId === rowData.id), [existingMappings]);
|
|
130
|
+
|
|
126
131
|
return (
|
|
127
132
|
<Modal
|
|
128
133
|
title={ReportsConfigWidget.localization.getLocalizedString(
|
|
@@ -131,7 +136,7 @@ export const AddMappingsModal = ({
|
|
|
131
136
|
isOpen={show}
|
|
132
137
|
isDismissible={!isLoading}
|
|
133
138
|
onClose={async () => {
|
|
134
|
-
await
|
|
139
|
+
await onClose();
|
|
135
140
|
}}
|
|
136
141
|
style={{ display: "flex", flexDirection: "column", maxHeight: "77vh" }}
|
|
137
142
|
>
|
|
@@ -141,7 +146,7 @@ export const AddMappingsModal = ({
|
|
|
141
146
|
setSelectedIModelId={setSelectediModelId}
|
|
142
147
|
/>
|
|
143
148
|
<Table<MappingType>
|
|
144
|
-
data={
|
|
149
|
+
data={tableData}
|
|
145
150
|
columns={mappingsColumns}
|
|
146
151
|
className="rcw-add-mappings-table"
|
|
147
152
|
emptyTableContent={ReportsConfigWidget.localization.getLocalizedString(
|
|
@@ -150,22 +155,17 @@ export const AddMappingsModal = ({
|
|
|
150
155
|
isSortable
|
|
151
156
|
isSelectable
|
|
152
157
|
isLoading={isLoading}
|
|
153
|
-
isRowDisabled={
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
onSelect={(selectData: Mapping[] | undefined) => {
|
|
157
|
-
selectData && setSelectedMappings(selectData);
|
|
158
|
-
}}
|
|
158
|
+
isRowDisabled={isRowDisabled}
|
|
159
|
+
onSelect={onSelect}
|
|
159
160
|
paginatorRenderer={LocalizedTablePaginator}
|
|
160
161
|
/>
|
|
161
162
|
</div>
|
|
163
|
+
{/* 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
164
|
<ActionPanel
|
|
163
165
|
actionLabel={ReportsConfigWidget.localization.getLocalizedString(
|
|
164
166
|
"ReportsConfigWidget:Add"
|
|
165
167
|
)}
|
|
166
168
|
onAction={onSave}
|
|
167
|
-
onCancel={returnFn}
|
|
168
|
-
isSavingDisabled={selectedMappings.length === 0}
|
|
169
169
|
isLoading={isLoading}
|
|
170
170
|
/>
|
|
171
171
|
</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
|
}
|
|
@@ -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,11 +48,9 @@ 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">
|
|
@@ -67,7 +63,7 @@ export const DeleteModal = ({
|
|
|
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"
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
border-radius: 5px;
|
|
13
13
|
background-color: var(--iui-color-background-2);
|
|
14
14
|
height: $iui-baseline * 4;
|
|
15
|
+
min-height: 44px;
|
|
15
16
|
padding: 5.5px $iui-s;
|
|
16
17
|
|
|
17
18
|
.rcw-body-container {
|
|
@@ -44,9 +45,11 @@
|
|
|
44
45
|
&-selected {
|
|
45
46
|
@include themed {
|
|
46
47
|
border: 1px solid t(iui-color-foreground-primary);
|
|
47
|
-
background: linear-gradient(
|
|
48
|
-
rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6))
|
|
48
|
+
background: linear-gradient(
|
|
49
|
+
rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6)),
|
|
50
|
+
rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6))
|
|
51
|
+
),
|
|
49
52
|
linear-gradient(t(iui-color-background-1), t(iui-color-background-1));
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
|
-
}
|
|
55
|
+
}
|
|
@@ -7,25 +7,22 @@ import React, { useState } from "react";
|
|
|
7
7
|
import ActionPanel from "./ActionPanel";
|
|
8
8
|
import useValidator, { NAME_REQUIREMENTS } from "../hooks/useValidator";
|
|
9
9
|
import {
|
|
10
|
-
generateUrl,
|
|
11
10
|
handleError,
|
|
12
11
|
handleInputChange,
|
|
13
|
-
WidgetHeader,
|
|
14
12
|
} from "./utils";
|
|
15
13
|
import "./ReportAction.scss";
|
|
16
14
|
import type { Report } from "@itwin/insights-client";
|
|
17
|
-
import {
|
|
18
|
-
import { useReportsApiConfig } from "../context/ReportsApiConfigContext";
|
|
15
|
+
import { useReportsConfigApi } from "../context/ReportsConfigApiContext";
|
|
19
16
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
20
17
|
|
|
21
|
-
interface ReportActionProps {
|
|
22
|
-
iTwinId: string;
|
|
18
|
+
export interface ReportActionProps {
|
|
23
19
|
report?: Report;
|
|
24
|
-
|
|
20
|
+
onSaveSuccess: () => void;
|
|
21
|
+
onClickCancel?: () => void;
|
|
25
22
|
}
|
|
26
23
|
|
|
27
|
-
const ReportAction = ({
|
|
28
|
-
const
|
|
24
|
+
export const ReportAction = ({ report, onSaveSuccess, onClickCancel }: ReportActionProps) => {
|
|
25
|
+
const { iTwinId, getAccessToken, reportsClient } = useReportsConfigApi();
|
|
29
26
|
const [values, setValues] = useState({
|
|
30
27
|
name: report?.displayName ?? "",
|
|
31
28
|
description: report?.description ?? "",
|
|
@@ -40,21 +37,22 @@ const ReportAction = ({ iTwinId, report, returnFn }: ReportActionProps) => {
|
|
|
40
37
|
return;
|
|
41
38
|
}
|
|
42
39
|
setIsLoading(true);
|
|
43
|
-
const
|
|
44
|
-
generateUrl(REPORTING_BASE_PATH, apiConfig.baseUrl)
|
|
45
|
-
);
|
|
46
|
-
const accessToken = await apiConfig.getAccessToken();
|
|
40
|
+
const accessToken = await getAccessToken();
|
|
47
41
|
report
|
|
48
|
-
? await
|
|
42
|
+
? await reportsClient.updateReport(accessToken, report.id ?? "", {
|
|
49
43
|
displayName: values.name,
|
|
50
44
|
description: values.description,
|
|
51
45
|
})
|
|
52
|
-
: await
|
|
46
|
+
: await reportsClient.createReport(accessToken, {
|
|
53
47
|
displayName: values.name,
|
|
54
48
|
description: values.description,
|
|
55
49
|
projectId: iTwinId,
|
|
56
50
|
});
|
|
57
|
-
|
|
51
|
+
onSaveSuccess();
|
|
52
|
+
setValues({
|
|
53
|
+
name: report?.displayName ?? "",
|
|
54
|
+
description: report?.description ?? "",
|
|
55
|
+
});
|
|
58
56
|
} catch (error: any) {
|
|
59
57
|
handleError(error.status);
|
|
60
58
|
setIsLoading(false);
|
|
@@ -65,18 +63,6 @@ const ReportAction = ({ iTwinId, report, returnFn }: ReportActionProps) => {
|
|
|
65
63
|
|
|
66
64
|
return (
|
|
67
65
|
<>
|
|
68
|
-
<WidgetHeader
|
|
69
|
-
title={
|
|
70
|
-
report
|
|
71
|
-
? ReportsConfigWidget.localization.getLocalizedString(
|
|
72
|
-
"ReportsConfigWidget:ModifyReport"
|
|
73
|
-
)
|
|
74
|
-
: ReportsConfigWidget.localization.getLocalizedString(
|
|
75
|
-
"ReportsConfigWidget:AddReport"
|
|
76
|
-
)
|
|
77
|
-
}
|
|
78
|
-
returnFn={returnFn}
|
|
79
|
-
/>
|
|
80
66
|
<div className="rcw-details-form-container">
|
|
81
67
|
<Fieldset
|
|
82
68
|
legend={ReportsConfigWidget.localization.getLocalizedString(
|
|
@@ -133,7 +119,7 @@ const ReportAction = ({ iTwinId, report, returnFn }: ReportActionProps) => {
|
|
|
133
119
|
"ReportsConfigWidget:Add"
|
|
134
120
|
)}
|
|
135
121
|
onAction={onSave}
|
|
136
|
-
onCancel={
|
|
122
|
+
onCancel={onClickCancel}
|
|
137
123
|
isSavingDisabled={!values.name}
|
|
138
124
|
isLoading={isLoading}
|
|
139
125
|
/>
|
|
@@ -141,4 +127,3 @@ const ReportAction = ({ iTwinId, report, returnFn }: ReportActionProps) => {
|
|
|
141
127
|
);
|
|
142
128
|
};
|
|
143
129
|
|
|
144
|
-
export default ReportAction;
|
|
@@ -2,9 +2,8 @@
|
|
|
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 { useEffect, useRef, useState } from "react";
|
|
6
|
-
import
|
|
7
|
-
import type BulkExtractor from "./BulkExtractor";
|
|
5
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
6
|
+
import type { BulkExtractor } from "./BulkExtractor";
|
|
8
7
|
import { ExtractionStates, ExtractionStatus } from "./ExtractionStatus";
|
|
9
8
|
import type { BeEvent } from "@itwin/core-bentley";
|
|
10
9
|
import { STATUS_CHECK_INTERVAL } from "./Constants";
|
|
@@ -21,16 +20,16 @@ import {
|
|
|
21
20
|
SvgMore,
|
|
22
21
|
} from "@itwin/itwinui-icons-react";
|
|
23
22
|
import { HorizontalTile } from "./HorizontalTile";
|
|
24
|
-
import type { HorizontalTileProps } from "./HorizontalTile";
|
|
25
23
|
|
|
26
|
-
export interface ReportHorizontalTileProps
|
|
24
|
+
export interface ReportHorizontalTileProps {
|
|
27
25
|
selected: boolean;
|
|
28
26
|
onSelectionChange: (reportId: string, controlPressed: boolean) => void;
|
|
29
27
|
bulkExtractor: BulkExtractor;
|
|
30
28
|
jobStartEvent: BeEvent<(reportId: string) => void>;
|
|
31
29
|
report: Report;
|
|
32
30
|
onClickDelete: () => void;
|
|
33
|
-
onClickModify:
|
|
31
|
+
onClickModify?: (report: Report) => void;
|
|
32
|
+
onClickTitle?: (report: Report) => void;
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
export const ReportHorizontalTile = (props: ReportHorizontalTileProps) => {
|
|
@@ -81,7 +80,7 @@ export const ReportHorizontalTile = (props: ReportHorizontalTileProps) => {
|
|
|
81
80
|
subtextToolTip={props.report.description ?? ""}
|
|
82
81
|
titleTooltip={props.report.displayName}
|
|
83
82
|
onClick={onClickTile}
|
|
84
|
-
onClickTitle={props.onClickTitle}
|
|
83
|
+
onClickTitle={() => props.onClickTitle?.(props.report)}
|
|
85
84
|
selected={props.selected}
|
|
86
85
|
actionGroup={extractionState === ExtractionStates.None ? (
|
|
87
86
|
<div
|
|
@@ -89,15 +88,15 @@ export const ReportHorizontalTile = (props: ReportHorizontalTileProps) => {
|
|
|
89
88
|
data-testid="tile-action-button">
|
|
90
89
|
<DropdownMenu
|
|
91
90
|
menuItems={(close: () => void) => [
|
|
92
|
-
<MenuItem
|
|
91
|
+
props.onClickModify ? <MenuItem
|
|
93
92
|
key={0}
|
|
94
|
-
onClick={props.onClickModify}
|
|
93
|
+
onClick={() => props.onClickModify?.(props.report)}
|
|
95
94
|
icon={<SvgEdit />}
|
|
96
95
|
>
|
|
97
96
|
{ReportsConfigWidget.localization.getLocalizedString(
|
|
98
97
|
"ReportsConfigWidget:Modify"
|
|
99
98
|
)}
|
|
100
|
-
</MenuItem
|
|
99
|
+
</MenuItem> : [],
|
|
101
100
|
<MenuItem
|
|
102
101
|
key={1}
|
|
103
102
|
onClick={() => {
|
|
@@ -110,7 +109,7 @@ export const ReportHorizontalTile = (props: ReportHorizontalTileProps) => {
|
|
|
110
109
|
"ReportsConfigWidget:Remove"
|
|
111
110
|
)}
|
|
112
111
|
</MenuItem>,
|
|
113
|
-
]}
|
|
112
|
+
].flat()}
|
|
114
113
|
>
|
|
115
114
|
<IconButton styleType="borderless">
|
|
116
115
|
<SvgMore />
|
|
@@ -2,9 +2,8 @@
|
|
|
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 { useCallback, useEffect, useRef, useState } from "react";
|
|
6
|
-
import
|
|
7
|
-
import type BulkExtractor from "./BulkExtractor";
|
|
5
|
+
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
6
|
+
import type { BulkExtractor } from "./BulkExtractor";
|
|
8
7
|
import { ExtractionStates, ExtractionStatus } from "./ExtractionStatus";
|
|
9
8
|
import type { BeEvent } from "@itwin/core-bentley";
|
|
10
9
|
import { STATUS_CHECK_INTERVAL } from "./Constants";
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: column;
|
|
36
36
|
overflow-y: overlay;
|
|
37
|
-
gap:
|
|
38
|
-
margin-top:
|
|
37
|
+
gap: 8px;
|
|
38
|
+
margin-top: 8px;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.rcw-search-bar-container {
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
flex-shrink: 1;
|
|
44
44
|
flex-grow: 1;
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|