@itwin/reports-config-widget-react 0.6.0 → 0.7.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.
Files changed (116) hide show
  1. package/CHANGELOG.json +30 -1
  2. package/CHANGELOG.md +15 -2
  3. package/api/reports-config-widget-react.api.md +11 -15
  4. package/api/reports-config-widget-react.exports.csv +1 -1
  5. package/api/temp/reports-config-widget-react.api.md +11 -15
  6. package/coverage/clover.xml +133 -134
  7. package/coverage/coverage-final.json +9 -9
  8. package/coverage/lcov-report/index.html +14 -14
  9. package/coverage/lcov-report/src/ReportsConfigWidget.ts.html +2 -2
  10. package/coverage/lcov-report/src/index.html +1 -1
  11. package/coverage/lcov-report/src/test/index.html +1 -1
  12. package/coverage/lcov-report/src/test/test-utils.tsx.html +1 -1
  13. package/coverage/lcov-report/src/widget/ReportsConfigUiProvider.tsx.html +11 -26
  14. package/coverage/lcov-report/src/widget/components/ActionPanel.tsx.html +1 -1
  15. package/coverage/lcov-report/src/widget/components/AddMappingsModal.tsx.html +3 -3
  16. package/coverage/lcov-report/src/widget/components/BulkExtractor.ts.html +7 -10
  17. package/coverage/lcov-report/src/widget/components/Constants.ts.html +1 -1
  18. package/coverage/lcov-report/src/widget/components/DeleteModal.tsx.html +1 -1
  19. package/coverage/lcov-report/src/widget/components/ExtractionStates/FailedExtractionState.tsx.html +1 -1
  20. package/coverage/lcov-report/src/widget/components/ExtractionStates/QueuedExtractionState.tsx.html +1 -1
  21. package/coverage/lcov-report/src/widget/components/ExtractionStates/RunningExtractionState.tsx.html +1 -1
  22. package/coverage/lcov-report/src/widget/components/ExtractionStates/StartingExtractionState.tsx.html +1 -1
  23. package/coverage/lcov-report/src/widget/components/ExtractionStates/SucceededExtractionState.tsx.html +1 -1
  24. package/coverage/lcov-report/src/widget/components/ExtractionStates/index.html +1 -1
  25. package/coverage/lcov-report/src/widget/components/ExtractionStatus.tsx.html +1 -1
  26. package/coverage/lcov-report/src/widget/components/ExtractionToast.tsx.html +1 -1
  27. package/coverage/lcov-report/src/widget/components/HorizontalTile.tsx.html +3 -3
  28. package/coverage/lcov-report/src/widget/components/LocalizedTablePaginator.tsx.html +1 -1
  29. package/coverage/lcov-report/src/widget/components/ReportAction.tsx.html +1 -1
  30. package/coverage/lcov-report/src/widget/components/ReportHorizontalTile.tsx.html +15 -15
  31. package/coverage/lcov-report/src/widget/components/ReportMappingHorizontalTile.tsx.html +1 -1
  32. package/coverage/lcov-report/src/widget/components/ReportMappings.tsx.html +4 -4
  33. package/coverage/lcov-report/src/widget/components/Reports.tsx.html +6 -6
  34. package/coverage/lcov-report/src/widget/components/ReportsConfigContext.tsx.html +112 -13
  35. package/coverage/lcov-report/src/widget/components/ReportsContainer.tsx.html +8 -17
  36. package/coverage/lcov-report/src/widget/components/ReportsHeader.tsx.html +1 -1
  37. package/coverage/lcov-report/src/widget/components/ReportsRouter.tsx.html +1 -1
  38. package/coverage/lcov-report/src/widget/components/SearchBar.tsx.html +1 -1
  39. package/coverage/lcov-report/src/widget/components/SelectIModel.tsx.html +1 -1
  40. package/coverage/lcov-report/src/widget/components/index.html +1 -1
  41. package/coverage/lcov-report/src/widget/components/utils.tsx.html +1 -1
  42. package/coverage/lcov-report/src/widget/context/BulkExtractorContext.tsx.html +1 -1
  43. package/coverage/lcov-report/src/widget/context/ReportsConfigApiContext.tsx.html +7 -4
  44. package/coverage/lcov-report/src/widget/context/index.html +1 -1
  45. package/coverage/lcov-report/src/widget/hooks/index.html +1 -1
  46. package/coverage/lcov-report/src/widget/hooks/useValidator.ts.html +1 -1
  47. package/coverage/lcov-report/src/widget/index.html +13 -13
  48. package/coverage/lcov.info +240 -242
  49. package/lib/cjs/reports-config-widget-react.d.ts +1 -0
  50. package/lib/cjs/reports-config-widget-react.d.ts.map +1 -1
  51. package/lib/cjs/reports-config-widget-react.js +1 -0
  52. package/lib/cjs/reports-config-widget-react.js.map +1 -1
  53. package/lib/cjs/tsconfig.tsbuildinfo +1 -1
  54. package/lib/cjs/widget/ReportsConfigUiProvider.d.ts +3 -4
  55. package/lib/cjs/widget/ReportsConfigUiProvider.d.ts.map +1 -1
  56. package/lib/cjs/widget/ReportsConfigUiProvider.js +3 -4
  57. package/lib/cjs/widget/ReportsConfigUiProvider.js.map +1 -1
  58. package/lib/cjs/widget/components/AddMappingsModal.d.ts.map +1 -1
  59. package/lib/cjs/widget/components/AddMappingsModal.js.map +1 -1
  60. package/lib/cjs/widget/components/BulkExtractor.d.ts +2 -2
  61. package/lib/cjs/widget/components/BulkExtractor.d.ts.map +1 -1
  62. package/lib/cjs/widget/components/BulkExtractor.js.map +1 -1
  63. package/lib/cjs/widget/components/ReportMappings.d.ts.map +1 -1
  64. package/lib/cjs/widget/components/ReportMappings.js.map +1 -1
  65. package/lib/cjs/widget/components/Reports.d.ts.map +1 -1
  66. package/lib/cjs/widget/components/Reports.js.map +1 -1
  67. package/lib/cjs/widget/components/ReportsConfigContext.d.ts +26 -4
  68. package/lib/cjs/widget/components/ReportsConfigContext.d.ts.map +1 -1
  69. package/lib/cjs/widget/components/ReportsConfigContext.js +15 -5
  70. package/lib/cjs/widget/components/ReportsConfigContext.js.map +1 -1
  71. package/lib/cjs/widget/components/ReportsContainer.d.ts +3 -6
  72. package/lib/cjs/widget/components/ReportsContainer.d.ts.map +1 -1
  73. package/lib/cjs/widget/components/ReportsContainer.js +6 -2
  74. package/lib/cjs/widget/components/ReportsContainer.js.map +1 -1
  75. package/lib/cjs/widget/context/ReportsConfigApiContext.d.ts +3 -3
  76. package/lib/cjs/widget/context/ReportsConfigApiContext.d.ts.map +1 -1
  77. package/lib/cjs/widget/context/ReportsConfigApiContext.js.map +1 -1
  78. package/lib/esm/reports-config-widget-react.d.ts +1 -0
  79. package/lib/esm/reports-config-widget-react.d.ts.map +1 -1
  80. package/lib/esm/reports-config-widget-react.js +1 -0
  81. package/lib/esm/reports-config-widget-react.js.map +1 -1
  82. package/lib/esm/tsconfig.tsbuildinfo +1 -1
  83. package/lib/esm/widget/ReportsConfigUiProvider.d.ts +3 -4
  84. package/lib/esm/widget/ReportsConfigUiProvider.d.ts.map +1 -1
  85. package/lib/esm/widget/ReportsConfigUiProvider.js +3 -4
  86. package/lib/esm/widget/ReportsConfigUiProvider.js.map +1 -1
  87. package/lib/esm/widget/components/AddMappingsModal.d.ts.map +1 -1
  88. package/lib/esm/widget/components/AddMappingsModal.js.map +1 -1
  89. package/lib/esm/widget/components/BulkExtractor.d.ts +2 -2
  90. package/lib/esm/widget/components/BulkExtractor.d.ts.map +1 -1
  91. package/lib/esm/widget/components/BulkExtractor.js.map +1 -1
  92. package/lib/esm/widget/components/ReportMappings.d.ts.map +1 -1
  93. package/lib/esm/widget/components/ReportMappings.js.map +1 -1
  94. package/lib/esm/widget/components/Reports.d.ts.map +1 -1
  95. package/lib/esm/widget/components/Reports.js.map +1 -1
  96. package/lib/esm/widget/components/ReportsConfigContext.d.ts +26 -4
  97. package/lib/esm/widget/components/ReportsConfigContext.d.ts.map +1 -1
  98. package/lib/esm/widget/components/ReportsConfigContext.js +15 -5
  99. package/lib/esm/widget/components/ReportsConfigContext.js.map +1 -1
  100. package/lib/esm/widget/components/ReportsContainer.d.ts +3 -6
  101. package/lib/esm/widget/components/ReportsContainer.d.ts.map +1 -1
  102. package/lib/esm/widget/components/ReportsContainer.js +6 -2
  103. package/lib/esm/widget/components/ReportsContainer.js.map +1 -1
  104. package/lib/esm/widget/context/ReportsConfigApiContext.d.ts +3 -3
  105. package/lib/esm/widget/context/ReportsConfigApiContext.d.ts.map +1 -1
  106. package/lib/esm/widget/context/ReportsConfigApiContext.js.map +1 -1
  107. package/package.json +1 -1
  108. package/src/reports-config-widget-react.ts +1 -0
  109. package/src/widget/ReportsConfigUiProvider.tsx +3 -8
  110. package/src/widget/components/AddMappingsModal.tsx +2 -2
  111. package/src/widget/components/BulkExtractor.ts +5 -6
  112. package/src/widget/components/ReportMappings.tsx +3 -3
  113. package/src/widget/components/Reports.tsx +2 -2
  114. package/src/widget/components/ReportsConfigContext.tsx +42 -9
  115. package/src/widget/components/ReportsContainer.tsx +5 -8
  116. package/src/widget/context/ReportsConfigApiContext.tsx +3 -2
@@ -24,6 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.RouteStep = void 0;
27
+ /*---------------------------------------------------------------------------------------------
28
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
29
+ * See LICENSE.md in the project root for license terms and full copyright notice.
30
+ *--------------------------------------------------------------------------------------------*/
27
31
  const react_1 = __importStar(require("react"));
28
32
  require("./ReportsContainer.scss");
29
33
  const appui_react_1 = require("@itwin/appui-react");
@@ -36,7 +40,7 @@ var RouteStep;
36
40
  RouteStep[RouteStep["ReportAction"] = 1] = "ReportAction";
37
41
  RouteStep[RouteStep["ReportMappings"] = 2] = "ReportMappings";
38
42
  })(RouteStep = exports.RouteStep || (exports.RouteStep = {}));
39
- const ReportsContainer = ({ getAccessToken, baseUrl }) => {
43
+ const ReportsContainer = (props) => {
40
44
  const [routingHistory, setRoutingHistory] = (0, react_1.useState)([{ step: RouteStep.ReportsList, title: "iTwin Reports", reportsRoutingFields: {} }]);
41
45
  const currentRoute = routingHistory[routingHistory.length - 1];
42
46
  const iTwinId = (0, appui_react_1.useActiveIModelConnection)()?.iTwinId ?? "";
@@ -48,7 +52,7 @@ const ReportsContainer = ({ getAccessToken, baseUrl }) => {
48
52
  updatedRouting.pop();
49
53
  setRoutingHistory(updatedRouting);
50
54
  }, [routingHistory]);
51
- return (react_1.default.createElement(ReportsConfigContext_1.ReportsConfigContext, { getAccessToken: getAccessToken, baseUrl: baseUrl, iTwinId: iTwinId },
55
+ return (react_1.default.createElement(ReportsConfigContext_1.ReportsConfigContext, { ...props, iTwinId: iTwinId },
52
56
  react_1.default.createElement("div", { className: "rcw-reports-container" },
53
57
  react_1.default.createElement(ReportsHeader_1.ReportsHeader, { goBack: goBack, currentRoute: currentRoute }),
54
58
  react_1.default.createElement(ReportsRouter_1.ReportsRouter, { currentRoute: currentRoute, navigateTo: navigateTo, goBack: goBack }))));
@@ -1 +1 @@
1
- {"version":3,"file":"ReportsContainer.js","sourceRoot":"","sources":["../../../../src/widget/components/ReportsContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,+CAAqD;AACrD,mCAAiC;AAEjC,oDAA+D;AAC/D,mDAAgD;AAChD,mDAAgD;AAChD,iEAA8D;AAO9D,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,uDAAW,CAAA;IACX,yDAAY,CAAA;IACZ,6DAAc,CAAA;AAChB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AAYD,MAAM,gBAAgB,GAAG,CAAC,EAAE,cAAc,EAAE,OAAO,EAAyB,EAAE,EAAE;IAC9E,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAAU,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACnJ,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,IAAA,uCAAyB,GAAE,EAAE,OAAO,IAAI,EAAE,CAAC;IAC3D,MAAM,UAAU,GAAG,IAAA,mBAAW,EAAC,CAAC,OAA2C,EAAE,EAAE;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,IAAA,mBAAW,EAAC,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,8BAAC,2CAAoB,IAAC,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO;QACtF,uCAAK,SAAS,EAAC,uBAAuB;YACpC,8BAAC,6BAAa,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAI;YAC7D,8BAAC,6BAAa,IAAC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAI,CACjF,CACe,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 = ({ getAccessToken, baseUrl }: ReportsContainerProps) => {\n const [routingHistory, setRoutingHistory] = useState<Route[]>([{ step: RouteStep.ReportsList, title: \"iTwin Reports\", reportsRoutingFields: {} }]);\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 goBack={goBack} currentRoute={currentRoute} />\n <ReportsRouter currentRoute={currentRoute} navigateTo={navigateTo} goBack={goBack} />\n </div>\n </ReportsConfigContext>\n );\n};\n\nexport default ReportsContainer;\n"]}
1
+ {"version":3,"file":"ReportsContainer.js","sourceRoot":"","sources":["../../../../src/widget/components/ReportsContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;gGAGgG;AAChG,+CAAqD;AACrD,mCAAiC;AAEjC,oDAA+D;AAC/D,mDAAgD;AAChD,mDAAgD;AAEhD,iEAA6D;AAI7D,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,uDAAW,CAAA;IACX,yDAAY,CAAA;IACZ,6DAAc,CAAA;AAChB,CAAC,EAJW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAIpB;AAYD,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IACxD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAAU,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IACnJ,MAAM,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,IAAA,uCAAyB,GAAE,EAAE,OAAO,IAAI,EAAE,CAAC;IAC3D,MAAM,UAAU,GAAG,IAAA,mBAAW,EAAC,CAAC,OAA2C,EAAE,EAAE;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,IAAA,mBAAW,EAAC,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,8BAAC,2CAAoB,OAAK,KAAK,EAAE,OAAO,EAAE,OAAO;QAC/C,uCAAK,SAAS,EAAC,uBAAuB;YACpC,8BAAC,6BAAa,IAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAI;YAC7D,8BAAC,6BAAa,IAAC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAI,CACjF,CACe,CACxB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,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 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 type { ReportsConfigContextProps } from \"./ReportsConfigContext\";\nimport { ReportsConfigContext } from \"./ReportsConfigContext\"\n\nexport type ReportsContainerProps = Omit<ReportsConfigContextProps, \"iTwinId\" | \"children\">;\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 = (props: ReportsContainerProps) => {\n const [routingHistory, setRoutingHistory] = useState<Route[]>([{ step: RouteStep.ReportsList, title: \"iTwin Reports\", reportsRoutingFields: {} }]);\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 {...props} iTwinId={iTwinId}>\n <div className=\"rcw-reports-container\">\n <ReportsHeader goBack={goBack} currentRoute={currentRoute} />\n <ReportsRouter currentRoute={currentRoute} navigateTo={navigateTo} goBack={goBack} />\n </div>\n </ReportsConfigContext>\n );\n};\n\nexport default ReportsContainer;\n"]}
@@ -1,14 +1,14 @@
1
1
  import type { AccessToken } from "@itwin/core-bentley";
2
2
  import { IModelsClient } from "@itwin/imodels-client-management";
3
- import { MappingsClient, ReportsClient } from "@itwin/insights-client";
3
+ import type { IMappingsClient, IReportsClient } from "@itwin/insights-client";
4
4
  import * as React from "react";
5
5
  export declare type GetAccessTokenFn = () => Promise<AccessToken>;
6
6
  export interface ReportsConfigApiProps {
7
7
  getAccessToken: GetAccessTokenFn;
8
8
  iTwinId: string;
9
9
  baseUrl: string;
10
- reportsClient: ReportsClient;
11
- mappingsClient: MappingsClient;
10
+ reportsClient: IReportsClient;
11
+ mappingsClient: IMappingsClient;
12
12
  iModelsClient: IModelsClient;
13
13
  }
14
14
  export declare const ReportsConfigApiContext: React.Context<ReportsConfigApiProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"ReportsConfigApiContext.d.ts","sourceRoot":"","sources":["../../../../src/widget/context/ReportsConfigApiContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,oBAAY,gBAAgB,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;AAE1D,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,gBAAgB,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,sCAOlC,CAAC;AAEH,eAAO,MAAM,mBAAmB,6BAM/B,CAAC"}
1
+ {"version":3,"file":"ReportsConfigApiContext.d.ts","sourceRoot":"","sources":["../../../../src/widget/context/ReportsConfigApiContext.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE9E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,oBAAY,gBAAgB,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;AAE1D,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,gBAAgB,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,cAAc,CAAC;IAC9B,cAAc,EAAE,eAAe,CAAC;IAChC,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,eAAO,MAAM,uBAAuB,sCAOlC,CAAC;AAEH,eAAO,MAAM,mBAAmB,6BAM/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ReportsConfigApiContext.js","sourceRoot":"","sources":["../../../../src/widget/context/ReportsConfigApiContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,gFAAiE;AACjE,4DAAuE;AACvE,6CAA+B;AAC/B,iCAAsC;AAazB,QAAA,uBAAuB,GAAG,IAAA,qBAAa,EAAwB;IAC1E,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;IAC9B,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,aAAa,EAAE,IAAI,+BAAa,EAAE;IAClC,cAAc,EAAE,IAAI,gCAAc,EAAE;IACpC,aAAa,EAAE,IAAI,yCAAa,EAAE;CACnC,CAAC,CAAC;AAEI,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,+BAAuB,CAAC,CAAC;IAC1D,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;KACjG;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AANW,QAAA,mBAAmB,uBAM9B","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 { IModelsClient } from \"@itwin/imodels-client-management\";\nimport { MappingsClient, ReportsClient } from \"@itwin/insights-client\";\nimport * as React from \"react\";\nimport { createContext } from \"react\";\n\nexport type GetAccessTokenFn = () => Promise<AccessToken>;\n\nexport interface ReportsConfigApiProps {\n getAccessToken: GetAccessTokenFn;\n iTwinId: string;\n baseUrl: string;\n reportsClient: ReportsClient;\n mappingsClient: MappingsClient;\n iModelsClient: IModelsClient;\n}\n\nexport const ReportsConfigApiContext = createContext<ReportsConfigApiProps>({\n getAccessToken: async () => \"\",\n iTwinId: \"\",\n baseUrl: \"\",\n reportsClient: new ReportsClient(),\n mappingsClient: new MappingsClient(),\n iModelsClient: new IModelsClient(),\n});\n\nexport const useReportsConfigApi = () => {\n const context = React.useContext(ReportsConfigApiContext);\n if (!context) {\n throw new Error(\"useReportsConfigApi should be used within a ReportsConfigApiContext provider\");\n }\n return context;\n};\n"]}
1
+ {"version":3,"file":"ReportsConfigApiContext.js","sourceRoot":"","sources":["../../../../src/widget/context/ReportsConfigApiContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,gFAAiE;AAEjE,4DAAuE;AACvE,6CAA+B;AAC/B,iCAAsC;AAazB,QAAA,uBAAuB,GAAG,IAAA,qBAAa,EAAwB;IAC1E,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;IAC9B,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,aAAa,EAAE,IAAI,+BAAa,EAAE;IAClC,cAAc,EAAE,IAAI,gCAAc,EAAE;IACpC,aAAa,EAAE,IAAI,yCAAa,EAAE;CACnC,CAAC,CAAC;AAEI,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,+BAAuB,CAAC,CAAC;IAC1D,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;KACjG;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AANW,QAAA,mBAAmB,uBAM9B","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 { IModelsClient } from \"@itwin/imodels-client-management\";\nimport type { IMappingsClient, IReportsClient } from \"@itwin/insights-client\";\nimport { MappingsClient, ReportsClient } from \"@itwin/insights-client\";\nimport * as React from \"react\";\nimport { createContext } from \"react\";\n\nexport type GetAccessTokenFn = () => Promise<AccessToken>;\n\nexport interface ReportsConfigApiProps {\n getAccessToken: GetAccessTokenFn;\n iTwinId: string;\n baseUrl: string;\n reportsClient: IReportsClient;\n mappingsClient: IMappingsClient;\n iModelsClient: IModelsClient;\n}\n\nexport const ReportsConfigApiContext = createContext<ReportsConfigApiProps>({\n getAccessToken: async () => \"\",\n iTwinId: \"\",\n baseUrl: \"\",\n reportsClient: new ReportsClient(),\n mappingsClient: new MappingsClient(),\n iModelsClient: new IModelsClient(),\n});\n\nexport const useReportsConfigApi = () => {\n const context = React.useContext(ReportsConfigApiContext);\n if (!context) {\n throw new Error(\"useReportsConfigApi should be used within a ReportsConfigApiContext provider\");\n }\n return context;\n};\n"]}
@@ -1,6 +1,7 @@
1
1
  /** UI Provider for iTwin Viewer Applications */
2
2
  export * from "./widget/ReportsConfigUiProvider";
3
3
  export * from "./ReportsConfigWidget";
4
+ export * from "@itwin/insights-client";
4
5
  export { Reports, ReportsProps } from "./widget/components/Reports";
5
6
  export { ReportMappings, ReportMappingsProps } from "./widget/components/ReportMappings";
6
7
  export { ReportsConfigContext, ReportsConfigContextProps } from "./widget/components/ReportsConfigContext";
@@ -1 +1 @@
1
- {"version":3,"file":"reports-config-widget-react.d.ts","sourceRoot":"","sources":["../../src/reports-config-widget-react.ts"],"names":[],"mappings":"AAIA,gDAAgD;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC"}
1
+ {"version":3,"file":"reports-config-widget-react.d.ts","sourceRoot":"","sources":["../../src/reports-config-widget-react.ts"],"names":[],"mappings":"AAIA,gDAAgD;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC"}
@@ -5,6 +5,7 @@
5
5
  /** UI Provider for iTwin Viewer Applications */
6
6
  export * from "./widget/ReportsConfigUiProvider";
7
7
  export * from "./ReportsConfigWidget";
8
+ export * from "@itwin/insights-client";
8
9
  export { Reports } from "./widget/components/Reports";
9
10
  export { ReportMappings } from "./widget/components/ReportMappings";
10
11
  export { ReportsConfigContext } from "./widget/components/ReportsConfigContext";
@@ -1 +1 @@
1
- {"version":3,"file":"reports-config-widget-react.js","sourceRoot":"","sources":["../../src/reports-config-widget-react.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,gDAAgD;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAgB,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAuB,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAA6B,MAAM,0CAA0C,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,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 *--------------------------------------------------------------------------------------------*/\n/** UI Provider for iTwin Viewer Applications */\nexport * from \"./widget/ReportsConfigUiProvider\";\nexport * from \"./ReportsConfigWidget\";\n\nexport { Reports, ReportsProps } from \"./widget/components/Reports\";\nexport { ReportMappings, ReportMappingsProps } from \"./widget/components/ReportMappings\";\nexport { ReportsConfigContext, ReportsConfigContextProps } from \"./widget/components/ReportsConfigContext\";\nexport { ReportAction, ReportActionProps } from \"./widget/components/ReportAction\";\nexport { BulkExtractor } from \"./widget/components/BulkExtractor\";\n"]}
1
+ {"version":3,"file":"reports-config-widget-react.js","sourceRoot":"","sources":["../../src/reports-config-widget-react.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,gDAAgD;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAgB,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAuB,MAAM,oCAAoC,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAA6B,MAAM,0CAA0C,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAqB,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,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 *--------------------------------------------------------------------------------------------*/\n/** UI Provider for iTwin Viewer Applications */\nexport * from \"./widget/ReportsConfigUiProvider\";\nexport * from \"./ReportsConfigWidget\";\nexport * from \"@itwin/insights-client\";\n\nexport { Reports, ReportsProps } from \"./widget/components/Reports\";\nexport { ReportMappings, ReportMappingsProps } from \"./widget/components/ReportMappings\";\nexport { ReportsConfigContext, ReportsConfigContextProps } from \"./widget/components/ReportsConfigContext\";\nexport { ReportAction, ReportActionProps } from \"./widget/components/ReportAction\";\nexport { BulkExtractor } from \"./widget/components/BulkExtractor\";\n"]}