@itwin/reports-config-widget-react 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +41 -0
- package/CHANGELOG.md +25 -2
- package/coverage/clover.xml +867 -0
- package/coverage/coverage-final.json +33 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +206 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/ReportsConfigWidget.ts.html +193 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/src/test/index.html +116 -0
- package/coverage/lcov-report/src/test/test-utils.tsx.html +379 -0
- package/coverage/lcov-report/src/widget/ReportsConfigUiProvider.tsx.html +265 -0
- package/coverage/lcov-report/src/widget/components/ActionPanel.tsx.html +247 -0
- package/coverage/lcov-report/src/widget/components/AddMappingsModal.tsx.html +589 -0
- package/coverage/lcov-report/src/widget/components/BulkExtractor.ts.html +664 -0
- package/coverage/lcov-report/src/widget/components/Constants.ts.html +112 -0
- package/coverage/lcov-report/src/widget/components/DeleteModal.tsx.html +367 -0
- 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 +289 -0
- package/coverage/lcov-report/src/widget/components/LocalizedTablePaginator.tsx.html +262 -0
- package/coverage/lcov-report/src/widget/components/ReportAction.tsx.html +472 -0
- package/coverage/lcov-report/src/widget/components/ReportHorizontalTile.tsx.html +472 -0
- package/coverage/lcov-report/src/widget/components/ReportMappingHorizontalTile.tsx.html +469 -0
- package/coverage/lcov-report/src/widget/components/ReportMappings.tsx.html +1063 -0
- package/coverage/lcov-report/src/widget/components/Reports.tsx.html +754 -0
- package/coverage/lcov-report/src/widget/components/ReportsConfigContext.tsx.html +373 -0
- package/coverage/lcov-report/src/widget/components/ReportsContainer.tsx.html +301 -0
- 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 +286 -0
- package/coverage/lcov-report/src/widget/components/SelectIModel.tsx.html +337 -0
- package/coverage/lcov-report/src/widget/components/index.html +416 -0
- package/coverage/lcov-report/src/widget/components/utils.tsx.html +565 -0
- package/coverage/lcov-report/src/widget/context/BulkExtractorContext.tsx.html +163 -0
- package/coverage/lcov-report/src/widget/context/ReportsConfigApiContext.tsx.html +202 -0
- package/coverage/lcov-report/src/widget/context/index.html +131 -0
- package/coverage/lcov-report/src/widget/hooks/index.html +116 -0
- package/coverage/lcov-report/src/widget/hooks/useValidator.ts.html +295 -0
- package/coverage/lcov-report/src/widget/index.html +116 -0
- package/coverage/lcov.info +1609 -0
- 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.js +5 -1
- package/lib/cjs/reports-config-widget-react.js.map +1 -1
- package/lib/cjs/test/AddMappingModal.test.js +20 -70
- package/lib/cjs/test/AddMappingModal.test.js.map +1 -1
- package/lib/cjs/test/BulkExtractor.test.js +5 -1
- package/lib/cjs/test/BulkExtractor.test.js.map +1 -1
- package/lib/cjs/test/DeleteModal.test.js +2 -2
- package/lib/cjs/test/DeleteModal.test.js.map +1 -1
- package/lib/cjs/test/ReportAction.test.js +7 -7
- package/lib/cjs/test/ReportAction.test.js.map +1 -1
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js +31 -81
- package/lib/cjs/test/ReportMappingHorizontalTile.test.js.map +1 -1
- package/lib/cjs/test/ReportMappings.test.js +38 -88
- package/lib/cjs/test/ReportMappings.test.js.map +1 -1
- package/lib/cjs/test/Reports.test.js +68 -66
- 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 +30 -0
- package/lib/cjs/test/test-utils.d.ts.map +1 -1
- package/lib/cjs/test/test-utils.js +66 -7
- 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 +10 -8
- package/lib/cjs/widget/ReportsConfigUiProvider.js.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.d.ts +2 -2
- package/lib/cjs/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/cjs/widget/components/ActionPanel.js +5 -1
- 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.map +1 -1
- package/lib/cjs/widget/components/AddMappingsModal.js +27 -28
- 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.js +2 -2
- package/lib/cjs/widget/components/BulkExtractor.js.map +1 -1
- package/lib/cjs/widget/components/Constants.d.ts +1 -0
- package/lib/cjs/widget/components/Constants.d.ts.map +1 -1
- package/lib/cjs/widget/components/Constants.js +2 -1
- package/lib/cjs/widget/components/Constants.js.map +1 -1
- package/lib/cjs/widget/components/DeleteModal.js +8 -4
- 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 +7 -3
- 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 +10 -16
- package/lib/cjs/widget/components/LocalizedTablePaginator.js +7 -3
- package/lib/cjs/widget/components/LocalizedTablePaginator.js.map +1 -1
- package/lib/cjs/widget/components/ReportAction.js +19 -17
- 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.js +14 -12
- package/lib/cjs/widget/components/ReportHorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js +22 -18
- package/lib/cjs/widget/components/ReportMappingHorizontalTile.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.js +28 -27
- package/lib/cjs/widget/components/ReportMappings.js.map +1 -1
- package/lib/cjs/widget/components/ReportMappings.scss +9 -10
- package/lib/cjs/widget/components/Reports.d.ts.map +1 -1
- package/lib/cjs/widget/components/Reports.js +26 -22
- 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.map +1 -1
- package/lib/cjs/widget/components/ReportsConfigContext.js +29 -32
- package/lib/cjs/widget/components/ReportsConfigContext.js.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.js +9 -6
- package/lib/cjs/widget/components/ReportsContainer.js.map +1 -1
- package/lib/cjs/widget/components/ReportsContainer.scss +1 -3
- package/lib/cjs/widget/components/ReportsRouter.js +1 -2
- package/lib/cjs/widget/components/ReportsRouter.js.map +1 -1
- package/lib/cjs/widget/components/SearchBar.d.ts.map +1 -1
- package/lib/cjs/widget/components/SearchBar.js +9 -5
- package/lib/cjs/widget/components/SearchBar.js.map +1 -1
- package/lib/cjs/widget/components/SearchBar.scss +0 -1
- package/lib/cjs/widget/components/SelectIModel.js +11 -7
- 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.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.js +6 -2
- package/lib/cjs/widget/context/BulkExtractorContext.js.map +1 -1
- package/lib/cjs/widget/context/ReportsConfigApiContext.js +6 -2
- package/lib/cjs/widget/context/ReportsConfigApiContext.js.map +1 -1
- 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/test/AddMappingModal.test.js +2 -56
- package/lib/esm/test/AddMappingModal.test.js.map +1 -1
- package/lib/esm/test/ReportMappingHorizontalTile.test.js +3 -57
- package/lib/esm/test/ReportMappingHorizontalTile.test.js.map +1 -1
- package/lib/esm/test/ReportMappings.test.js +8 -62
- package/lib/esm/test/ReportMappings.test.js.map +1 -1
- package/lib/esm/test/Reports.test.js +32 -53
- 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 +30 -0
- package/lib/esm/test/test-utils.d.ts.map +1 -1
- package/lib/esm/test/test-utils.js +59 -4
- 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 +2 -2
- package/lib/esm/widget/components/ActionPanel.d.ts.map +1 -1
- package/lib/esm/widget/components/ActionPanel.js.map +1 -1
- package/lib/esm/widget/components/ActionPanel.scss +2 -3
- package/lib/esm/widget/components/AddMappingsModal.d.ts.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.js +10 -15
- package/lib/esm/widget/components/AddMappingsModal.js.map +1 -1
- package/lib/esm/widget/components/AddMappingsModal.scss +1 -2
- package/lib/esm/widget/components/Constants.d.ts +1 -0
- package/lib/esm/widget/components/Constants.d.ts.map +1 -1
- package/lib/esm/widget/components/Constants.js +1 -0
- package/lib/esm/widget/components/Constants.js.map +1 -1
- package/lib/esm/widget/components/DeleteModal.js +2 -2
- 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 +10 -16
- package/lib/esm/widget/components/ReportAction.js +7 -9
- 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.js +4 -6
- package/lib/esm/widget/components/ReportHorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/ReportMappingHorizontalTile.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js +11 -11
- package/lib/esm/widget/components/ReportMappingHorizontalTile.js.map +1 -1
- package/lib/esm/widget/components/ReportMappings.d.ts.map +1 -1
- package/lib/esm/widget/components/ReportMappings.js +7 -10
- package/lib/esm/widget/components/ReportMappings.js.map +1 -1
- package/lib/esm/widget/components/ReportMappings.scss +9 -10
- package/lib/esm/widget/components/Reports.d.ts.map +1 -1
- package/lib/esm/widget/components/Reports.js +9 -9
- 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.map +1 -1
- package/lib/esm/widget/components/ReportsConfigContext.js +21 -28
- package/lib/esm/widget/components/ReportsConfigContext.js.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.js +1 -2
- package/lib/esm/widget/components/ReportsContainer.js.map +1 -1
- package/lib/esm/widget/components/ReportsContainer.scss +1 -3
- package/lib/esm/widget/components/ReportsRouter.js +1 -2
- package/lib/esm/widget/components/ReportsRouter.js.map +1 -1
- package/lib/esm/widget/components/SearchBar.d.ts.map +1 -1
- package/lib/esm/widget/components/SearchBar.js +2 -2
- package/lib/esm/widget/components/SearchBar.js.map +1 -1
- package/lib/esm/widget/components/SearchBar.scss +0 -1
- package/lib/esm/widget/components/SelectIModel.js +1 -1
- 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.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/public/locales/en/ReportsConfigWidget.json +4 -0
- package/package.json +56 -55
- package/public/locales/en/ReportsConfigWidget.json +4 -0
- package/src/test/AddMappingModal.test.tsx +7 -57
- package/src/test/ReportMappingHorizontalTile.test.tsx +6 -58
- package/src/test/ReportMappings.test.tsx +7 -58
- package/src/test/Reports.test.tsx +32 -110
- package/src/test/WidgetHeader.test.tsx +9 -2
- package/src/test/test-utils.tsx +62 -1
- package/src/widget/ReportsConfigUiProvider.tsx +7 -14
- package/src/widget/components/ActionPanel.scss +2 -3
- package/src/widget/components/ActionPanel.tsx +1 -1
- package/src/widget/components/AddMappingsModal.scss +1 -2
- package/src/widget/components/AddMappingsModal.tsx +16 -21
- package/src/widget/components/Constants.ts +2 -0
- package/src/widget/components/DeleteModal.scss +2 -3
- package/src/widget/components/DeleteModal.tsx +3 -3
- package/src/widget/components/ExtractionStatus.scss +6 -7
- package/src/widget/components/HorizontalTile.scss +10 -16
- package/src/widget/components/ReportAction.scss +1 -2
- package/src/widget/components/ReportAction.tsx +3 -3
- package/src/widget/components/ReportHorizontalTile.tsx +1 -1
- package/src/widget/components/ReportMappingHorizontalTile.tsx +28 -27
- package/src/widget/components/ReportMappings.scss +9 -10
- package/src/widget/components/ReportMappings.tsx +2 -4
- package/src/widget/components/Reports.scss +15 -15
- package/src/widget/components/Reports.tsx +25 -22
- package/src/widget/components/ReportsConfigContext.tsx +3 -2
- package/src/widget/components/ReportsContainer.scss +1 -3
- package/src/widget/components/SearchBar.scss +0 -1
- package/src/widget/components/SearchBar.tsx +6 -1
- package/src/widget/components/SelectIModel.scss +2 -3
- package/src/widget/components/SelectIModel.tsx +1 -1
- package/src/widget/components/utils.scss +16 -8
- package/src/widget/components/utils.tsx +7 -6
- package/.rush/temp/operation/rebuild/all.log +0 -9
- package/.rush/temp/operation/rebuild/state.json +0 -3
- package/.rush/temp/package-deps_rebuild.json +0 -68
- package/.rush/temp/shrinkwrap-deps.json +0 -931
- package/reports-config-widget-react.build.error.log +0 -1
- package/reports-config-widget-react.build.log +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportsConfigContext.js","sourceRoot":"","sources":["../../../../src/widget/components/ReportsConfigContext.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OA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,CACL,oBAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,SAAS;QAChD,oBAAC,oBAAoB,CAAC,QAAQ,IAAC,KAAK,EAAE,aAAa,IAChD,KAAK,CAAC,QAAQ,CACe,CACC,CACpC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { IModelsClientOptions } from \"@itwin/imodels-client-management\";\nimport { IModelsClient } from \"@itwin/imodels-client-management\";\nimport { ExtractionClient, MappingsClient, REPORTING_BASE_PATH, ReportsClient } from \"@itwin/insights-client\";\nimport { toaster } from \"@itwin/itwinui-react\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport { BulkExtractorContext } from \"../context/BulkExtractorContext\";\nimport type {\n GetAccessTokenFn,\n ReportsConfigApiProps,\n} from \"../context/ReportsConfigApiContext\";\nimport { ReportsConfigApiContext } from \"../context/ReportsConfigApiContext\";\nimport { REPORTS_CONFIG_BASE_URL } from \"../ReportsConfigUiProvider\";\nimport { BulkExtractor } from \"./BulkExtractor\";\nimport { IMODELS_BASE_URL } from \"./Constants\";\nimport { FailedExtractionToast, SuccessfulExtractionToast } from \"./ExtractionToast\";\nimport { generateUrl } from \"./utils\";\n\nexport interface ReportsConfigContextProps {\n getAccessToken?: GetAccessTokenFn;\n baseUrl?: string;\n iTwinId: string;\n bulkExtractor?: BulkExtractor;\n reportsClient?: ReportsClient;\n mappingsClient?: MappingsClient;\n extractionClient?: ExtractionClient;\n iModelsClient?: IModelsClient;\n children?: React.ReactNode;\n}\n\nconst authorizationClientGetAccessToken = async () =>\n (await IModelApp.authorizationClient?.getAccessToken()) ?? \"\";\n\nexport const ReportsConfigContext = (props: ReportsConfigContextProps) => {\n const reportsBaseUrl = useCallback(() => generateUrl(\n REPORTING_BASE_PATH,\n props.baseUrl || REPORTS_CONFIG_BASE_URL\n ), [props.baseUrl]);\n const iModelClientOptions: IModelsClientOptions = useMemo(() => ({\n api: { baseUrl: generateUrl(IMODELS_BASE_URL, props.baseUrl ?? REPORTS_CONFIG_BASE_URL) },\n }), [props.baseUrl]);\n const [extractionClient, setExtractionClient] = useState<ExtractionClient>(\n props.extractionClient ?? new ExtractionClient(reportsBaseUrl())\n );\n\n const [apiConfig, setApiConfig] = useState<ReportsConfigApiProps>({\n getAccessToken: props.getAccessToken ?? authorizationClientGetAccessToken,\n baseUrl: reportsBaseUrl(),\n iTwinId: props.iTwinId,\n reportsClient: props.reportsClient ?? new ReportsClient(reportsBaseUrl()),\n mappingsClient: props.mappingsClient ?? new MappingsClient(reportsBaseUrl()),\n iModelsClient: props.iModelsClient ?? new IModelsClient(iModelClientOptions),\n });\n\n useEffect(() => {\n if (!props.extractionClient) {\n setExtractionClient(props.extractionClient ?? new ExtractionClient(reportsBaseUrl()));\n }\n }, [props.extractionClient, reportsBaseUrl]);\n\n const successfulExtractionToast = (iModelName: string, odataFeedUrl: string) => {\n toaster.positive(<SuccessfulExtractionToast iModelName={iModelName} odataFeedUrl={odataFeedUrl} />);\n };\n\n const failedExtractionToast = (iModelName: string) => {\n toaster.negative(<FailedExtractionToast iModelName={iModelName} />);\n };\n\n const bulkExtractor = useMemo(\n () => ({ bulkExtractor: props.bulkExtractor ?? new BulkExtractor(apiConfig.reportsClient, extractionClient, apiConfig.getAccessToken, successfulExtractionToast, failedExtractionToast) }),\n [apiConfig.getAccessToken, apiConfig.reportsClient, extractionClient, props.bulkExtractor]\n );\n\n useEffect(() => {\n setApiConfig(() => ({\n getAccessToken: props.getAccessToken ?? authorizationClientGetAccessToken,\n baseUrl: props.baseUrl || REPORTS_CONFIG_BASE_URL,\n iTwinId: props.iTwinId,\n reportsClient: props.reportsClient ?? new ReportsClient(reportsBaseUrl()),\n mappingsClient: props.mappingsClient ?? new MappingsClient(reportsBaseUrl()),\n iModelsClient: props.iModelsClient ?? new IModelsClient(iModelClientOptions),\n }));\n }, [props.getAccessToken, props.baseUrl, props.iTwinId, props.reportsClient, props.mappingsClient, props.iModelsClient, reportsBaseUrl, iModelClientOptions]);\n\n return (\n <ReportsConfigApiContext.Provider value={apiConfig}>\n <BulkExtractorContext.Provider value={bulkExtractor}>\n {props.children}\n </BulkExtractorContext.Provider>\n </ReportsConfigApiContext.Provider>\n );\n};\n"]}
|
|
@@ -11,12 +11,11 @@ export var RouteStep;
|
|
|
11
11
|
RouteStep[RouteStep["ReportMappings"] = 2] = "ReportMappings";
|
|
12
12
|
})(RouteStep || (RouteStep = {}));
|
|
13
13
|
const ReportsContainer = ({ getAccessToken, baseUrl, }) => {
|
|
14
|
-
var _a, _b;
|
|
15
14
|
const [routingHistory, setRoutingHistory] = useState([
|
|
16
15
|
{ step: RouteStep.ReportsList, title: "iTwin Reports", reportsRoutingFields: {} },
|
|
17
16
|
]);
|
|
18
17
|
const currentRoute = routingHistory[routingHistory.length - 1];
|
|
19
|
-
const iTwinId =
|
|
18
|
+
const iTwinId = useActiveIModelConnection()?.iTwinId ?? "";
|
|
20
19
|
const navigateTo = useCallback((toRoute) => {
|
|
21
20
|
setRoutingHistory((r) => [...r, toRoute(r[r.length - 1])]);
|
|
22
21
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportsContainer.js","sourceRoot":"","sources":["../../../../src/widget/components/ReportsContainer.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AA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AE;QAC7E,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,EAAE;QAC9B,MAAM,cAAc,GAAG,CAAC,GAAG,cAAc,CAAC,CAAC;QAC3C,cAAc,CAAC,GAAG,EAAE,CAAC;QACrB,iBAAiB,CAAC,cAAc,CAAC,CAAC;IACpC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC;IAErB,OAAO,CACL,oBAAC,oBAAoB,IAAC,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;QACtF,6BAAK,SAAS,EAAC,uBAAuB;YACpC,oBAAC,aAAa,IACZ,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,YAAY,GAC1B;YACF,oBAAC,aAAa,IACZ,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,GACd,CACE,CACe,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { AccessToken } from \"@itwin/core-bentley\";\nimport React, { useCallback, useState } from \"react\";\nimport \"./ReportsContainer.scss\";\nimport type { Report } from \"@itwin/insights-client\";\nimport { useActiveIModelConnection } from \"@itwin/appui-react\";\nimport { ReportsHeader } from \"./ReportsHeader\";\nimport { ReportsRouter } from \"./ReportsRouter\";\nimport { ReportsConfigContext } from \"./ReportsConfigContext\";\n\ninterface ReportsContainerProps {\n getAccessToken?: () => Promise<AccessToken>;\n baseUrl: string;\n}\n\nexport enum RouteStep {\n ReportsList,\n ReportAction,\n ReportMappings\n}\n\nexport interface ReportsRouteFields {\n report?: Report;\n}\n\nexport interface Route {\n step: RouteStep;\n title: string;\n reportsRoutingFields: ReportsRouteFields;\n}\n\nconst ReportsContainer = ({\n getAccessToken,\n baseUrl,\n}: ReportsContainerProps) => {\n\n const [routingHistory, setRoutingHistory] = useState<Route[]>([\n { step: RouteStep.ReportsList, title: \"iTwin Reports\", reportsRoutingFields: {} },\n ]);\n const currentRoute = routingHistory[routingHistory.length - 1];\n const iTwinId = useActiveIModelConnection()?.iTwinId ?? \"\";\n const navigateTo = useCallback((toRoute: (prev: Route | undefined) => Route) => {\n setRoutingHistory((r) => [...r, toRoute(r[r.length - 1])]);\n }, []);\n\n const goBack = useCallback(() => {\n const updatedRouting = [...routingHistory];\n updatedRouting.pop();\n setRoutingHistory(updatedRouting);\n }, [routingHistory]);\n\n return (\n <ReportsConfigContext getAccessToken={getAccessToken} baseUrl={baseUrl} iTwinId={iTwinId}>\n <div className=\"rcw-reports-container\">\n <ReportsHeader\n goBack={goBack}\n currentRoute={currentRoute}\n />\n <ReportsRouter\n currentRoute={currentRoute}\n navigateTo={navigateTo}\n goBack={goBack}\n />\n </div>\n </ReportsConfigContext>\n );\n};\n\nexport default ReportsContainer;\n"]}
|
|
@@ -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-reports-container {
|
|
8
7
|
position: absolute;
|
|
@@ -10,9 +9,8 @@
|
|
|
10
9
|
left: 0;
|
|
11
10
|
display: flex;
|
|
12
11
|
flex-direction: column;
|
|
13
|
-
padding:
|
|
12
|
+
padding: var(--iui-size-s) var(--iui-size-m);
|
|
14
13
|
box-sizing: border-box;
|
|
15
14
|
height: 100%;
|
|
16
15
|
overflow: auto;
|
|
17
|
-
gap: $iui-baseline;
|
|
18
16
|
}
|
|
@@ -10,9 +10,8 @@ import { ReportMappings } from "./ReportMappings";
|
|
|
10
10
|
import { Reports } from "./Reports";
|
|
11
11
|
import { RouteStep } from "./ReportsContainer";
|
|
12
12
|
export const ReportsRouter = ({ currentRoute, navigateTo, goBack, }) => {
|
|
13
|
-
var _a, _b;
|
|
14
13
|
const { report } = currentRoute.reportsRoutingFields;
|
|
15
|
-
const iModelId =
|
|
14
|
+
const iModelId = useActiveIModelConnection()?.iModelId ?? "";
|
|
16
15
|
switch (currentRoute.step) {
|
|
17
16
|
case RouteStep.ReportsList:
|
|
18
17
|
return (React.createElement(Reports, { onClickAddReport: () => navigateTo(() => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportsRouter.js","sourceRoot":"","sources":["../../../../src/widget/components/ReportsRouter.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,YAAY,EACZ,UAAU,EACV,MAAM,GAKP,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"ReportsRouter.js","sourceRoot":"","sources":["../../../../src/widget/components/ReportsRouter.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;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BAC5B,oBAAoB,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE;wBACnC,KAAK,EAAE,CAAC,CAAC,WAAW;qBACrB,CAAC,CAAC,CAAC;gBACN,CAAC,GACD,CACH,CAAC;QAEJ,KAAK,SAAS,CAAC,YAAY;YACzB,OAAO,oBAAC,YAAY,IAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAI,CAAC;QACxF,KAAK,SAAS,CAAC,cAAc;YAC3B,IAAI,CAAC,MAAM;gBAAE,OAAO,IAAI,CAAC;YACzB,OAAO,oBAAC,cAAc,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,QAAQ,GAAI,CAAC;QAC7F;YACE,OAAO,IAAI,CAAC;KACf;AACH,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { useActiveIModelConnection } from \"@itwin/appui-react\";\nimport React from \"react\";\nimport { ReportsConfigWidget } from \"../../ReportsConfigWidget\";\nimport { ReportAction } from \"./ReportAction\";\nimport { ReportMappings } from \"./ReportMappings\";\nimport { Reports } from \"./Reports\";\nimport type { Route } from \"./ReportsContainer\";\nimport { RouteStep } from \"./ReportsContainer\";\n\nexport const ReportsRouter = ({\n currentRoute,\n navigateTo,\n goBack,\n}: {\n currentRoute: Route;\n navigateTo: (toRoute: (prev: Route | undefined) => Route) => void;\n goBack: () => void;\n}) => {\n const { report } = currentRoute.reportsRoutingFields;\n const iModelId = useActiveIModelConnection()?.iModelId ?? \"\";\n switch (currentRoute.step) {\n case RouteStep.ReportsList:\n return (\n <Reports\n onClickAddReport={() =>\n navigateTo(() => ({\n step: RouteStep.ReportAction,\n title: ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ITwinReports\"\n ),\n reportsRoutingFields: {},\n }))\n }\n onClickReportTitle={(r) => {\n navigateTo(() => ({\n step: RouteStep.ReportMappings,\n reportsRoutingFields: { report: r },\n title: r.displayName,\n }));\n }}\n onClickReportModify={(r) => {\n navigateTo(() => ({\n step: RouteStep.ReportAction,\n reportsRoutingFields: { report: r },\n title: r.displayName,\n }));\n }}\n />\n );\n\n case RouteStep.ReportAction:\n return <ReportAction report={report} onClickCancel={goBack} onSaveSuccess={goBack} />;\n case RouteStep.ReportMappings:\n if (!report) return null;\n return <ReportMappings report={report} onClickClose={goBack} defaultIModelId={iModelId} />;\n default:\n return null;\n }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../src/widget/components/SearchBar.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,kBAAkB,CAAC;AAE1B,UAAU,cAAc;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,+CAInB,cAAc,
|
|
1
|
+
{"version":3,"file":"SearchBar.d.ts","sourceRoot":"","sources":["../../../../src/widget/components/SearchBar.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,kBAAkB,CAAC;AAE1B,UAAU,cAAc;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,SAAS,+CAInB,cAAc,gBA8ChB,CAAC"}
|
|
@@ -19,8 +19,8 @@ export const SearchBar = ({ searchValue, setSearchValue, disabled, }) => {
|
|
|
19
19
|
setSearchValue("");
|
|
20
20
|
}
|
|
21
21
|
} },
|
|
22
|
-
React.createElement(LabeledInput, { "aria-label": "search-textbox", placeholder: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Search"), svgIcon: React.createElement(IconButton, { onClick: () => setSearchBarClosing(true), styleType: "borderless" },
|
|
23
|
-
React.createElement(SvgCloseSmall, null)), iconDisplayStyle: "inline", value: searchValue, onChange: (e) => setSearchValue(e.target.value), disabled: disabled }))) : (React.createElement(IconButton, { styleType: "borderless", "data-testid": "rcw-search-button", onClick: () => setSearchBarOpened(true) },
|
|
22
|
+
React.createElement(LabeledInput, { "aria-label": "search-textbox", placeholder: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Search"), svgIcon: React.createElement(IconButton, { onClick: () => setSearchBarClosing(true), styleType: "borderless", title: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:ClearSearch") },
|
|
23
|
+
React.createElement(SvgCloseSmall, null)), iconDisplayStyle: "inline", value: searchValue, onChange: (e) => setSearchValue(e.target.value), disabled: disabled }))) : (React.createElement(IconButton, { styleType: "borderless", "data-testid": "rcw-search-button", title: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:SearchReport"), onClick: () => setSearchBarOpened(true) },
|
|
24
24
|
React.createElement(SvgSearch, null)));
|
|
25
25
|
};
|
|
26
26
|
//# sourceMappingURL=SearchBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../../src/widget/components/SearchBar.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,mBAAmB,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AAC,CACF,oBAAC,UAAU,IACT,SAAS,EAAC,YAAY,iBACV,mBAAmB,EAC/B,KAAK,EAAE,mBAAmB,CAAC,YAAY,CAAC,kBAAkB,CAAC,kCAAkC,CAAC,EAC9F,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,IAAI,CAAC;QACvC,oBAAC,SAAS,OAAG,CACF,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { SvgCloseSmall, SvgSearch } from \"@itwin/itwinui-icons-react\";\nimport { IconButton, LabeledInput } from \"@itwin/itwinui-react\";\nimport React, { useState } from \"react\";\nimport { ReportsConfigWidget } from \"../../ReportsConfigWidget\";\nimport \"./SearchBar.scss\";\n\ninterface SearchBarProps {\n searchValue: string;\n setSearchValue: React.Dispatch<React.SetStateAction<string>>;\n disabled?: boolean;\n}\n\nexport const SearchBar = ({\n searchValue,\n setSearchValue,\n disabled,\n}: SearchBarProps) => {\n const [searchBarOpen, setSearchBarOpened] = useState<boolean>(false);\n const [searchBarClosing, setSearchBarClosing] = useState<boolean>(false);\n\n return searchBarOpen || searchValue ? (\n <div className=\"rcw-search-button\"\n style={{\n animation: searchBarClosing ? \"rcw-shrink .5s\" : \"rcw-expand .5s\",\n }}\n onAnimationEnd={() => {\n if (searchBarClosing) {\n setSearchBarClosing(false);\n setSearchBarOpened(false);\n setSearchValue(\"\");\n }\n }}\n >\n <LabeledInput\n aria-label=\"search-textbox\"\n placeholder={ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:Search\"\n )}\n svgIcon={\n <IconButton\n onClick={() => setSearchBarClosing(true)}\n styleType=\"borderless\"\n title={ReportsConfigWidget.localization.getLocalizedString(\"ReportsConfigWidget:ClearSearch\")}\n >\n <SvgCloseSmall />\n </IconButton>\n }\n iconDisplayStyle=\"inline\"\n value={searchValue}\n onChange={(e) => setSearchValue(e.target.value)}\n disabled={disabled}\n />\n </div>\n ) : (\n <IconButton\n styleType=\"borderless\"\n data-testid=\"rcw-search-button\"\n title={ReportsConfigWidget.localization.getLocalizedString(\"ReportsConfigWidget:SearchReport\")}\n onClick={() => setSearchBarOpened(true)}>\n <SvgSearch />\n </IconButton>\n );\n};\n"]}
|
|
@@ -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
|
@keyframes rcw-expand {
|
|
8
7
|
0% {
|
|
@@ -9,7 +9,7 @@ const fetchIModels = async (setiModels, iTwinId, iModelsClient, getAccessToken)
|
|
|
9
9
|
const accessToken = await getAccessToken();
|
|
10
10
|
const authorization = AccessTokenAdapter.toAuthorizationCallback(accessToken);
|
|
11
11
|
const getiModelListParams = {
|
|
12
|
-
urlParams: {
|
|
12
|
+
urlParams: { iTwinId },
|
|
13
13
|
authorization,
|
|
14
14
|
};
|
|
15
15
|
const iModels = await toArray(iModelsClient.iModels.getMinimalList(getiModelListParams));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectIModel.js","sourceRoot":"","sources":["../../../../src/widget/components/SelectIModel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAMpE,OAAO,EACL,OAAO,GACR,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OA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,GACzC,CACE,CACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport type { AccessToken } from \"@itwin/core-bentley\";\nimport { AccessTokenAdapter } from \"@itwin/imodels-access-frontend\";\nimport type {\n GetIModelListParams,\n IModelsClient,\n MinimalIModel,\n} from \"@itwin/imodels-client-management\";\nimport {\n toArray,\n} from \"@itwin/imodels-client-management\";\nimport { ComboBox, Label } from \"@itwin/itwinui-react\";\nimport React, { useEffect, useMemo, useState } from \"react\";\nimport { ReportsConfigWidget } from \"../../ReportsConfigWidget\";\nimport { useReportsConfigApi } from \"../context/ReportsConfigApiContext\";\nimport \"./SelectIModel.scss\";\n\nconst fetchIModels = async (\n setiModels: React.Dispatch<React.SetStateAction<MinimalIModel[]>>,\n iTwinId: string,\n iModelsClient: IModelsClient,\n getAccessToken: () => Promise<AccessToken>\n) => {\n const accessToken = await getAccessToken();\n const authorization = AccessTokenAdapter.toAuthorizationCallback(accessToken);\n const getiModelListParams: GetIModelListParams = {\n urlParams: { iTwinId },\n authorization,\n };\n const iModels = await toArray(\n iModelsClient.iModels.getMinimalList(getiModelListParams)\n );\n setiModels(iModels);\n};\n\ninterface SelectedIModelProps {\n selectedIModelId?: string;\n setSelectedIModelId: (iModelId: string) => void;\n}\n\nexport const SelectIModel = ({\n selectedIModelId,\n setSelectedIModelId,\n}: SelectedIModelProps) => {\n const { iTwinId, getAccessToken, iModelsClient } = useReportsConfigApi();\n const [iModels, setIModels] = useState<MinimalIModel[]>([]);\n\n useEffect(() => {\n void fetchIModels(setIModels, iTwinId, iModelsClient, getAccessToken);\n }, [getAccessToken, iModelsClient, iTwinId, setIModels]);\n\n const iModelOptions = useMemo(() => {\n return iModels.map((iModel) => ({\n label: iModel.displayName,\n value: iModel.id,\n }));\n }, [iModels]);\n\n return (\n <div className=\"rcw-select-imodel\">\n <Label htmlFor=\"combo-input\">\n {ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:SelectIModel\"\n )}\n </Label>\n <div className=\"rcw-combobox\">\n <ComboBox<string>\n options={iModelOptions}\n value={selectedIModelId}\n onChange={(value) => {\n setSelectedIModelId(value);\n }}\n inputProps={{\n id: \"combo-input\",\n }}\n style={{ flexGrow: 1, maxWidth: \"395px\" }}\n />\n </div>\n </div>\n );\n};\n"]}
|
|
@@ -2,15 +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
5
|
|
|
7
6
|
.rcw-select-imodel {
|
|
8
7
|
position: relative;
|
|
9
|
-
margin-bottom:
|
|
8
|
+
margin-bottom: calc(var(--iui-size-s) * 2);
|
|
10
9
|
|
|
11
10
|
.rcw-combobox {
|
|
12
11
|
display: flex;
|
|
13
|
-
gap:
|
|
12
|
+
gap: var(--iui-size-xs);
|
|
14
13
|
width: 100%;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/widget/components/utils.tsx"],"names":[],"mappings":"AAWA,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,mCAItB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/widget/components/utils.tsx"],"names":[],"mappings":"AAWA,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,mCAItB,iBAAiB,gBAkBnB,CAAC;AAEF,eAAO,MAAM,WAAW,gBAAiB,MAAM,SAwD9C,CAAC;AAEF,eAAO,MAAM,cAAc,mBAc1B,CAAC;AACF,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AACD,eAAO,MAAM,YAAY,iBAAkB,iBAAiB,gBAE3D,CAAC;AAEF,eAAO,MAAM,iBAAiB,SACzB,MAAM,WAAW,CAAC,gBAAgB,CAAC,wEAUvC,CAAC;AAEF,eAAO,MAAM,cAAc,mBAS1B,CAAC;AAEF,eAAO,MAAM,aAAa,mBAEzB,CAAC;AAEF,eAAO,MAAM,WAAW,YAAa,MAAM,cAAc,MAAM,WAE9D,CAAC;AAEF,oBAAY,uBAAuB,CAAC,SAAS,IAAI;KAC9C,QAAQ,IAAI,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC;CACnD,CAAC"}
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import { SvgChevronLeft } from "@itwin/itwinui-icons-react";
|
|
6
|
-
import {
|
|
6
|
+
import { Icon, ProgressRadial, Text, toaster, } from "@itwin/itwinui-react";
|
|
7
7
|
import "./utils.scss";
|
|
8
8
|
import React from "react";
|
|
9
9
|
import { ReportsConfigWidget } from "../../ReportsConfigWidget";
|
|
10
10
|
export const WidgetHeader = ({ title, disabled = false, returnFn, }) => {
|
|
11
11
|
return (React.createElement("div", { className: "rcw-widget-header-container" },
|
|
12
|
-
returnFn && (React.createElement(
|
|
12
|
+
returnFn && (React.createElement(Icon, { className: `${disabled ? "rcw-chevron-disabled" : "rcw-chevron"}`, onClick: disabled ? undefined : returnFn, size: "large", title: ReportsConfigWidget.localization.getLocalizedString("ReportsConfigWidget:Back") },
|
|
13
13
|
React.createElement(SvgChevronLeft, null))),
|
|
14
14
|
React.createElement(Text, { className: "rcw-title", variant: "title" }, title)));
|
|
15
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/widget/components/utils.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/widget/components/utils.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EACL,IAAI,EACJ,cAAc,EACd,IAAI,EACJ,OAAO,GACR,MAAM,sBAAsB,CAAC;AAC9B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAQhE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,QAAQ,GAAG,KAAK,EAChB,QAAQ,GACU,EAAE,EAAE;IACtB,OAAO,CACL,6BAAK,SAAS,EAAC,6BAA6B;QACzC,QAAQ,IAAI,CACX,oBAAC,IAAI,IACH,SAAS,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,aAAa,EAAE,EACjE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EACxC,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,mBAAmB,CAAC,YAAY,CAAC,kBAAkB,CAAC,0BAA0B,CAAC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CAAiC,GAAG,CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAe,EAAE,UAAkB,EAAE,EAAE;IACjE,OAAO,OAAO,CAAC,OAAO,CAAC,yBAAyB,EAAE,UAAU,CAAC,CAAC;AAChE,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nimport { SvgChevronLeft } from \"@itwin/itwinui-icons-react\";\nimport {\n Icon,\n ProgressRadial,\n Text,\n toaster,\n} from \"@itwin/itwinui-react\";\nimport \"./utils.scss\";\nimport React from \"react\";\nimport { ReportsConfigWidget } from \"../../ReportsConfigWidget\";\n\nexport interface WidgetHeaderProps {\n title: string;\n disabled?: boolean;\n returnFn?: () => void;\n}\n\nexport const WidgetHeader = ({\n title,\n disabled = false,\n returnFn,\n}: WidgetHeaderProps) => {\n return (\n <div className=\"rcw-widget-header-container\">\n {returnFn && (\n <Icon\n className={`${disabled ? \"rcw-chevron-disabled\" : \"rcw-chevron\"}`}\n onClick={disabled ? undefined : returnFn}\n size=\"large\"\n title={ReportsConfigWidget.localization.getLocalizedString(\"ReportsConfigWidget:Back\")}\n >\n <SvgChevronLeft />\n </Icon>\n )}\n <Text className=\"rcw-title\" variant=\"title\">\n {title}\n </Text>\n </div>\n );\n};\n\nexport const handleError = (errorStatus: number) => {\n let errorMessage = `${ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.Error\"\n )} `;\n switch (errorStatus) {\n case 401:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.401\"\n );\n break;\n case 403:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.403\"\n );\n break;\n case 404:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.404\"\n );\n break;\n case 409:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.409\"\n );\n break;\n case 422:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.422\"\n );\n break;\n case 429:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.429\"\n );\n break;\n case 500:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.500\"\n );\n break;\n case 502:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.502\"\n );\n break;\n case 503:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.503\"\n );\n break;\n default:\n errorMessage += ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:ErrorMessages.SomethingWentWrong\"\n );\n }\n toaster.negative(errorMessage);\n};\n\nexport const LoadingOverlay = () => (\n <div className=\"rcw-center-overlay\">\n <Text>\n {ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:Loading\"\n )}\n </Text>\n <ProgressRadial indeterminate />\n <Text>\n {ReportsConfigWidget.localization.getLocalizedString(\n \"ReportsConfigWidget:PleaseWait\"\n )}\n </Text>\n </div>\n);\ninterface EmptyMessageProps {\n children?: React.ReactNode;\n}\nexport const EmptyMessage = ({ children }: EmptyMessageProps) => {\n return <div className=\"rcw-center-overlay\">{children}</div>;\n};\n\nexport const handleInputChange = <T,>(\n e: React.ChangeEvent<HTMLInputElement>,\n values: T,\n setValues: React.Dispatch<React.SetStateAction<T>>\n) => {\n const { name, value } = e.target;\n\n setValues({\n ...values,\n [name]: value,\n });\n};\n\nexport const LoadingSpinner = () => {\n return (\n <div\n className=\"rcw-loading-spinner\"\n data-testid=\"rcw-action-loading-spinner\"\n >\n <ProgressRadial size=\"small\" indeterminate />\n </div>\n );\n};\n\nexport const SkeletonBlock = () => (\n <div className=\"rcw-skeleton-block iui-skeleton\" />\n);\n\nexport const generateUrl = (baseUrl: string, newBaseUrl: string) => {\n return baseUrl.replace(\"https://api.bentley.com\", newBaseUrl);\n};\n\nexport type CreateTypeFromInterface<Interface> = {\n [Property in keyof Interface]: Interface[Property];\n};\n"]}
|
|
@@ -2,20 +2,28 @@
|
|
|
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
|
-
@import "~@itwin/itwinui-css/scss/button/index";
|
|
8
5
|
|
|
9
6
|
.rcw-widget-header-container {
|
|
10
7
|
display: flex;
|
|
11
|
-
margin-bottom:
|
|
12
|
-
|
|
8
|
+
margin-bottom: calc(var(--iui-size-s) * 2);
|
|
9
|
+
|
|
10
|
+
.rcw-chevron {
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
align-self: center;
|
|
13
|
+
margin-right: var(--iui-size-xs);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.rcw-chevron-disabled {
|
|
17
|
+
fill: var(--iui-color-icon-muted);
|
|
18
|
+
cursor: not-allowed;
|
|
19
|
+
align-self: center;
|
|
20
|
+
margin-right: var(--iui-size-xs);
|
|
21
|
+
}
|
|
13
22
|
|
|
14
23
|
.rcw-title {
|
|
15
24
|
overflow: hidden;
|
|
16
25
|
white-space: nowrap;
|
|
17
26
|
text-overflow: ellipsis;
|
|
18
|
-
margin-bottom: 3px;
|
|
19
27
|
}
|
|
20
28
|
}
|
|
21
29
|
|
|
@@ -29,11 +37,11 @@
|
|
|
29
37
|
justify-content: center;
|
|
30
38
|
align-items: center;
|
|
31
39
|
flex-direction: column;
|
|
32
|
-
gap:
|
|
40
|
+
gap: var(--iui-size-s);
|
|
33
41
|
height: 100%;
|
|
34
42
|
}
|
|
35
43
|
|
|
36
44
|
.rcw-skeleton-block {
|
|
37
|
-
height:
|
|
45
|
+
height: calc(var(--iui-size-s) * 3);
|
|
38
46
|
width: 100%;
|
|
39
47
|
}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
"AddMappings": "Add Mappings",
|
|
5
5
|
"AddReport": "Add Report",
|
|
6
6
|
"AreYouSureYouWantToDelete": "Are you sure you want to delete",
|
|
7
|
+
"Back": "Back",
|
|
7
8
|
"Cancel": "Cancel",
|
|
9
|
+
"ClearSearch": "Clear Search",
|
|
8
10
|
"Close": "Close",
|
|
9
11
|
"Checking": "Checking",
|
|
10
12
|
"Confirm": "Confirm",
|
|
@@ -51,9 +53,11 @@
|
|
|
51
53
|
"ReportDetails": "Report Details",
|
|
52
54
|
"ReportName": "Report Name",
|
|
53
55
|
"ReportsConfig": "Reports Config",
|
|
56
|
+
"ReportOptions": "Report Options",
|
|
54
57
|
"RunExtraction": "Run Extraction",
|
|
55
58
|
"Running": "Running",
|
|
56
59
|
"Search": "Search...",
|
|
60
|
+
"SearchReport": "Search",
|
|
57
61
|
"SelectIModel": "Select an iModel",
|
|
58
62
|
"Starting": "Starting",
|
|
59
63
|
"Success": "Success",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/reports-config-widget-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "An iTwin.js 3D Viewer Widget that interfaces with the iTwin Reporting Platform.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Bentley",
|
|
@@ -22,6 +22,24 @@
|
|
|
22
22
|
"main": "lib/cjs/reports-config-widget-react.js",
|
|
23
23
|
"module": "lib/esm/reports-config-widget-react.js",
|
|
24
24
|
"typings": "lib/cjs/reports-config-widget-react",
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "npm run -s dual-build && npm run -s copy:assets",
|
|
27
|
+
"build:cjs": "tsc 1>&2 --outDir lib/cjs",
|
|
28
|
+
"build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm",
|
|
29
|
+
"clean": "rimraf lib",
|
|
30
|
+
"copy:assets": "npm run -s copy:public && npm run -s copy:cjs && npm run -s copy:esm",
|
|
31
|
+
"copy:cjs": "cpx \"./src/**/*.scss\" ./lib/cjs",
|
|
32
|
+
"copy:esm": "cpx \"./src/**/*.scss\" ./lib/esm",
|
|
33
|
+
"copy:public": "cpx \"./public/**/*\" ./lib/public",
|
|
34
|
+
"cover": "npm test -- --coverage",
|
|
35
|
+
"dual-build": "npm run -s build:cjs && npm run -s build:esm",
|
|
36
|
+
"lint": "eslint -f visualstudio \"./src/**/*.{ts,tsx}\" 1>&2",
|
|
37
|
+
"lint:fix": "npm run lint -- --fix",
|
|
38
|
+
"pseudolocalize": "betools pseudolocalize --englishDir ./public/locales/en --out ./public/locales/en-PSEUDO",
|
|
39
|
+
"rebuild": "npm run clean && npm run build",
|
|
40
|
+
"test": "jest",
|
|
41
|
+
"test:watch": "jest --watch "
|
|
42
|
+
},
|
|
25
43
|
"eslintConfig": {
|
|
26
44
|
"plugins": [
|
|
27
45
|
"@itwin"
|
|
@@ -30,42 +48,45 @@
|
|
|
30
48
|
"rules": {
|
|
31
49
|
"no-duplicate-imports": "off",
|
|
32
50
|
"@typescript-eslint/consistent-type-imports": "error",
|
|
33
|
-
"deprecation/deprecation": "
|
|
51
|
+
"deprecation/deprecation": "error",
|
|
34
52
|
"jsx-a11y/no-static-element-interactions": "off",
|
|
35
53
|
"jsx-a11y/click-events-have-key-events": "off",
|
|
36
54
|
"jsx-a11y/anchor-is-valid": "off"
|
|
37
55
|
}
|
|
38
56
|
},
|
|
39
57
|
"dependencies": {
|
|
40
|
-
"@itwin/imodels-access-
|
|
41
|
-
"@itwin/imodels-
|
|
58
|
+
"@itwin/imodels-access-common": "^4.1.4",
|
|
59
|
+
"@itwin/imodels-access-frontend": "^4.1.4",
|
|
60
|
+
"@itwin/imodels-client-management": "^4.2.3",
|
|
42
61
|
"@itwin/insights-client": "^0.4.0",
|
|
43
|
-
"@itwin/itwinui-icons-color-react": "^1.0
|
|
44
|
-
"@itwin/itwinui-icons-react": "^
|
|
45
|
-
"@itwin/itwinui-react": "^
|
|
62
|
+
"@itwin/itwinui-icons-color-react": "^2.1.0",
|
|
63
|
+
"@itwin/itwinui-icons-react": "^2.4.0",
|
|
64
|
+
"@itwin/itwinui-react": "^2.11.0",
|
|
46
65
|
"classnames": "^2.3.1",
|
|
47
66
|
"simple-react-validator": "^1.6.1"
|
|
48
67
|
},
|
|
49
68
|
"devDependencies": {
|
|
50
69
|
"@faker-js/faker": "6.2.0",
|
|
51
|
-
"@itwin/appui-abstract": "^
|
|
52
|
-
"@itwin/appui-layout-react": "^
|
|
53
|
-
"@itwin/appui-react": "^
|
|
54
|
-
"@itwin/build-tools": "^
|
|
55
|
-
"@itwin/components-react": "^
|
|
56
|
-
"@itwin/core-bentley": "^
|
|
57
|
-
"@itwin/core-common": "^
|
|
58
|
-
"@itwin/core-frontend": "^
|
|
59
|
-
"@itwin/core-geometry": "^
|
|
60
|
-
"@itwin/core-markup": "^
|
|
61
|
-
"@itwin/core-orbitgt": "^
|
|
62
|
-
"@itwin/core-quantity": "^
|
|
63
|
-
"@itwin/core-react": "^
|
|
64
|
-
"@itwin/
|
|
65
|
-
"@itwin/
|
|
66
|
-
"@itwin/
|
|
67
|
-
"@itwin/
|
|
68
|
-
"@itwin/
|
|
70
|
+
"@itwin/appui-abstract": "^4.0.0",
|
|
71
|
+
"@itwin/appui-layout-react": "^4.0.0",
|
|
72
|
+
"@itwin/appui-react": "^4.0.0",
|
|
73
|
+
"@itwin/build-tools": "^4.0.0",
|
|
74
|
+
"@itwin/components-react": "^4.0.0",
|
|
75
|
+
"@itwin/core-bentley": "^4.0.0",
|
|
76
|
+
"@itwin/core-common": "^4.0.0",
|
|
77
|
+
"@itwin/core-frontend": "^4.0.0",
|
|
78
|
+
"@itwin/core-geometry": "^4.0.0",
|
|
79
|
+
"@itwin/core-markup": "^4.0.0",
|
|
80
|
+
"@itwin/core-orbitgt": "^4.0.0",
|
|
81
|
+
"@itwin/core-quantity": "^4.0.0",
|
|
82
|
+
"@itwin/core-react": "^4.0.0",
|
|
83
|
+
"@itwin/core-telemetry": "^4.0.0",
|
|
84
|
+
"@itwin/eslint-plugin": "^3.7.8",
|
|
85
|
+
"@itwin/ecschema-metadata": "^4.0.0",
|
|
86
|
+
"@itwin/imodel-components-react": "^4.0.0",
|
|
87
|
+
"@itwin/presentation-common": "^4.0.0",
|
|
88
|
+
"@itwin/presentation-frontend": "^4.0.0",
|
|
89
|
+
"@itwin/webgl-compatibility": "^4.0.0",
|
|
69
90
|
"@testing-library/dom": "^8.12.0",
|
|
70
91
|
"@testing-library/jest-dom": "^5.16.3",
|
|
71
92
|
"@testing-library/react": "^12.1.4",
|
|
@@ -84,48 +105,28 @@
|
|
|
84
105
|
"cpx2": "^3.0.0",
|
|
85
106
|
"eslint": "^7.32.0",
|
|
86
107
|
"eslint-plugin-node": "^11.1.0",
|
|
87
|
-
"eslint-plugin-react": "^7.
|
|
108
|
+
"eslint-plugin-react": "^7.33.2",
|
|
88
109
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
89
110
|
"jest": "^27.5.1",
|
|
90
111
|
"jest-cli": "^27.5.1",
|
|
91
112
|
"jest-transform-stub": "^2.0.0",
|
|
92
|
-
"msw": "^0.39.2",
|
|
93
113
|
"react": "^17.0.2",
|
|
94
114
|
"react-dom": "^17.0.2",
|
|
95
|
-
"react-redux": "^7.2.
|
|
96
|
-
"redux": "^4.0
|
|
115
|
+
"react-redux": "^7.2.2",
|
|
116
|
+
"redux": "^4.1.0",
|
|
97
117
|
"rimraf": "^3.0.2",
|
|
98
118
|
"ts-jest": "^27.1.3",
|
|
99
119
|
"typemoq": "^2.1.0",
|
|
100
|
-
"typescript": "~4.
|
|
120
|
+
"typescript": "~4.6.0",
|
|
101
121
|
"xmlhttprequest": "^1.8.0"
|
|
102
122
|
},
|
|
103
123
|
"peerDependencies": {
|
|
104
|
-
"@itwin/appui-abstract": "^
|
|
105
|
-
"@itwin/appui-react": "^
|
|
106
|
-
"@itwin/core-bentley": "^
|
|
107
|
-
"@itwin/core-frontend": "^
|
|
124
|
+
"@itwin/appui-abstract": "^4.0.0",
|
|
125
|
+
"@itwin/appui-react": "^4.0.0",
|
|
126
|
+
"@itwin/core-bentley": "^4.0.0",
|
|
127
|
+
"@itwin/core-frontend": "^4.0.0",
|
|
108
128
|
"react": "^17.0.2",
|
|
109
129
|
"react-dom": "^17.0.2",
|
|
110
130
|
"react-redux": "^7.2.0"
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
"build": "npm run -s dual-build && npm run -s copy:assets",
|
|
114
|
-
"build:cjs": "tsc 1>&2 --outDir lib/cjs",
|
|
115
|
-
"build:esm": "tsc 1>&2 --module ES2020 --outDir lib/esm",
|
|
116
|
-
"clean": "rimraf lib",
|
|
117
|
-
"copy:assets": "npm run -s copy:public && npm run -s copy:cjs && npm run -s copy:esm",
|
|
118
|
-
"copy:cjs": "cpx \"./src/**/*.scss\" ./lib/cjs",
|
|
119
|
-
"copy:esm": "cpx \"./src/**/*.scss\" ./lib/esm",
|
|
120
|
-
"copy:public": "cpx \"./public/**/*\" ./lib/public",
|
|
121
|
-
"//cover": "npm test -- --coverage",
|
|
122
|
-
"dual-build": "npm run -s build:cjs && npm run -s build:esm",
|
|
123
|
-
"lint": "eslint -f visualstudio \"./src/**/*.{ts,tsx}\" 1>&2",
|
|
124
|
-
"lint:fix": "npm run lint -- --fix",
|
|
125
|
-
"pseudolocalize": "betools pseudolocalize --englishDir ./public/locales/en --out ./public/locales/en-PSEUDO",
|
|
126
|
-
"rebuild": "npm run clean && npm run build",
|
|
127
|
-
"test": "jest",
|
|
128
|
-
"test:watch": "jest --watch "
|
|
129
|
-
},
|
|
130
|
-
"readme": "# @itwin/reports-config-widget-react\r\n\r\nCopyright © Bentley Systems, Incorporated. All rights reserved.\r\nThe Reports Config widget is a UI component for iTwin Viewer applications that simplifies how users (and developers) interface with the [Reporting Platform APIs](https://developer.bentley.com/apis/insights/overview/). This widget is one piece of the Reporting story that focuses on the configuration of Reports and the extraction thereof. It complements the [Grouping & Mapping Widget](https://www.npmjs.com/package/@itwin/grouping-mapping-widget).\r\nThe reports-config-widget-react package provides a UiProvider class - `ReportsConfigProvider` - which can be passed into the `uiProviders` prop of the iTwin Viewer's `<Viewer />` component.\r\n\r\n## Getting Started\r\n\r\nThis is not a standalone UI and requires a parent iTwin Viewer application to work as intended.\r\nA guide on how to create a basic iTwin Viewer application can be found here: <https://www.itwinjs.org/learning/tutorials/develop-web-viewer/>.\r\nThis package provides a viewer 'widget'. Documentation on how to add a widget to your application can be found here: <https://developer.bentley.com/tutorials/itwin-viewer-hello-world/#2-your-first-ui-widget>.\r\n\r\n## Permissions and Scopes\r\n\r\nThe SPA client used by your iTwin viewer must have these additional scopes:\r\n\r\n- `insights:read`\r\n- `insights:modify`\r\n- `projects:read`\r\n\r\nIn addition, users must have the `imodels_read` and `imodels_write` [permissions](https://developer.bentley.com/apis/insights/operations/create-mapping/#authorization) assigned at either the Project or iModel level. Further instruction on how to create roles and assign permissions can be found in the [iTwin Platform Projects API documentation](https://developer.bentley.com/apis/projects/tutorials/).\r\n\r\n## Sample usage\r\n\r\n### Call ReportsConfigWidget.initialize() **_before_** making use of the provider\r\n\r\n```ts\r\nimport { ReportsConfigProvider, ReportsConfigWidget } from '@itwin/reports-config-widget-react'\r\n\r\n...\r\n\r\nawait ReportsConfigWidget.initialize(IModelApp.localization);\r\n\r\n<Viewer\r\n ...\r\n uiProviders={[new ReportsConfigProvider()]}\r\n/>\r\n```\r\n"
|
|
131
|
-
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
"AddMappings": "Add Mappings",
|
|
5
5
|
"AddReport": "Add Report",
|
|
6
6
|
"AreYouSureYouWantToDelete": "Are you sure you want to delete",
|
|
7
|
+
"Back": "Back",
|
|
7
8
|
"Cancel": "Cancel",
|
|
9
|
+
"ClearSearch": "Clear Search",
|
|
8
10
|
"Close": "Close",
|
|
9
11
|
"Checking": "Checking",
|
|
10
12
|
"Confirm": "Confirm",
|
|
@@ -51,9 +53,11 @@
|
|
|
51
53
|
"ReportDetails": "Report Details",
|
|
52
54
|
"ReportName": "Report Name",
|
|
53
55
|
"ReportsConfig": "Reports Config",
|
|
56
|
+
"ReportOptions": "Report Options",
|
|
54
57
|
"RunExtraction": "Run Extraction",
|
|
55
58
|
"Running": "Running",
|
|
56
59
|
"Search": "Search...",
|
|
60
|
+
"SearchReport": "Search",
|
|
57
61
|
"SelectIModel": "Select an iModel",
|
|
58
62
|
"Starting": "Starting",
|
|
59
63
|
"Success": "Success",
|