quidproquo-web-admin 0.0.262 → 0.1.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/README.md +53 -41
- package/lib/commonjs/App/App.d.ts +2 -0
- package/lib/commonjs/App/App.js +3 -2
- package/lib/commonjs/Auth/Auth.d.ts +1 -1
- package/lib/commonjs/Auth/Auth.js +12 -4
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.d.ts +6 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +50 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/index.d.ts +1 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/index.js +17 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/authActionCreator.d.ts +3 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/authActionCreator.js +15 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/authChallengeReducer.d.ts +3 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/authChallengeReducer.js +19 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/authChallengeTypes.d.ts +25 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/authChallengeTypes.js +8 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/index.d.ts +4 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/index.js +20 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/runtime/askAuthChallengeAssociateSoftwareToken.d.ts +2 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/runtime/askAuthChallengeAssociateSoftwareToken.js +18 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/runtime/askAuthChallengeSendMfaSetupCode.d.ts +2 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/runtime/askAuthChallengeSendMfaSetupCode.js +24 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/runtime/authChallengeLogic.d.ts +8 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/runtime/authChallengeLogic.js +11 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/runtime/index.d.ts +1 -0
- package/lib/commonjs/Auth/AuthChallengeMfaSetup/logic/runtime/index.js +17 -0
- package/lib/commonjs/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.d.ts +1 -1
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.d.ts +6 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +36 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/index.d.ts +1 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/index.js +17 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/authActionCreator.d.ts +2 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/authActionCreator.js +8 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/authChallengeReducer.d.ts +3 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/authChallengeReducer.js +13 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/authChallengeTypes.d.ts +15 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/authChallengeTypes.js +7 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/index.d.ts +4 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/index.js +20 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/askAuthChallengeSendMfaCode.d.ts +2 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/askAuthChallengeSendMfaCode.js +22 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/authChallengeLogic.d.ts +6 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/authChallengeLogic.js +9 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/index.d.ts +1 -0
- package/lib/commonjs/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/index.js +17 -0
- package/lib/commonjs/Auth/Login.d.ts +1 -1
- package/lib/commonjs/Config/Config.d.ts +2 -1
- package/lib/commonjs/FederatedAddon.d.ts +6 -0
- package/lib/commonjs/FederatedAddonProvider.d.ts +8 -0
- package/lib/commonjs/FederatedAddonProvider.js +21 -0
- package/lib/commonjs/LogViewer/ActionHistoryItem.d.ts +1 -1
- package/lib/commonjs/LogViewer/ActionHistoryItemTimeStamp.d.ts +1 -1
- package/lib/commonjs/LogViewer/ActionRender/ActionRender.d.ts +2 -2
- package/lib/commonjs/LogViewer/AdminLogs/AdminLogGrid/AdminLogGrid.d.ts +1 -1
- package/lib/commonjs/LogViewer/AdminLogs/AdminLogSearchBar/AdminLogSearchBar.d.ts +1 -1
- package/lib/commonjs/LogViewer/AdminLogs/AdminLogs.d.ts +1 -1
- package/lib/commonjs/LogViewer/ConsoleLogViewer.d.ts +2 -2
- package/lib/commonjs/LogViewer/LogCorrelationTree.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogCorrelationTree.js +9 -1
- package/lib/commonjs/LogViewer/LogCorrelations.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogDetails.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogDialog/LogDialog.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogMetadataGrid.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogRawJson.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogSearch.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogSummary.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogSummaryDetails.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogSummaryDetails.js +8 -1
- package/lib/commonjs/LogViewer/LogSummaryReturn.d.ts +1 -1
- package/lib/commonjs/LogViewer/LogSummaryReturn.js +8 -1
- package/lib/commonjs/LogViewer/TopSection.d.ts +1 -1
- package/lib/commonjs/LogViewer/TruncatedText.d.ts +1 -1
- package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.d.ts +8 -8
- package/lib/commonjs/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.js +47 -9
- package/lib/commonjs/LogViewer/charts/CostPerService.d.ts +1 -1
- package/lib/commonjs/LogViewer/charts/ErrorsByType.d.ts +1 -1
- package/lib/commonjs/LogViewer/charts/ErrorsOverTime.d.ts +1 -1
- package/lib/commonjs/LogViewer/charts/RequestsByService.d.ts +1 -1
- package/lib/commonjs/LogViewer/logic/index.d.ts +0 -1
- package/lib/commonjs/LogViewer/logic/index.js +0 -1
- package/lib/commonjs/components/AdminDialog.d.ts +1 -1
- package/lib/commonjs/components/AsyncButton.d.ts +2 -2
- package/lib/commonjs/components/DataGrid.d.ts +1 -1
- package/lib/commonjs/components/DataGridPagination/DataGridPagination.d.ts +1 -1
- package/lib/commonjs/components/LastSeen/LastSeen.d.ts +1 -1
- package/lib/commonjs/components/LoadingBox/LoadingBox.d.ts +1 -1
- package/lib/commonjs/components/MainLayout/MainLayout.d.ts +1 -1
- package/lib/commonjs/index.d.ts +2 -0
- package/lib/commonjs/index.js +2 -0
- package/lib/commonjs/logic/platform/apiRequest.js +29 -19
- package/lib/commonjs/useFederatedAddon.js +4 -33
- package/lib/esm/App/App.d.ts +2 -0
- package/lib/esm/App/App.js +3 -2
- package/lib/esm/Auth/Auth.d.ts +1 -1
- package/lib/esm/Auth/Auth.js +8 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.d.ts +6 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/AuthChallengeMfaSetup.js +43 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/index.d.ts +1 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/index.js +1 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/authActionCreator.d.ts +3 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/authActionCreator.js +11 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/authChallengeReducer.d.ts +3 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/authChallengeReducer.js +16 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/authChallengeTypes.d.ts +25 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/authChallengeTypes.js +5 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/index.d.ts +4 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/index.js +4 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/runtime/askAuthChallengeAssociateSoftwareToken.d.ts +2 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/runtime/askAuthChallengeAssociateSoftwareToken.js +15 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/runtime/askAuthChallengeSendMfaSetupCode.d.ts +2 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/runtime/askAuthChallengeSendMfaSetupCode.js +21 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/runtime/authChallengeLogic.d.ts +8 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/runtime/authChallengeLogic.js +8 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/runtime/index.d.ts +1 -0
- package/lib/esm/Auth/AuthChallengeMfaSetup/logic/runtime/index.js +1 -0
- package/lib/esm/Auth/AuthChallengeNewPasswordRequired/AuthChallengeNewPasswordRequired.d.ts +1 -1
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.d.ts +6 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/AuthChallengeSoftwareTokenMfa.js +27 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/index.d.ts +1 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/index.js +1 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/authActionCreator.d.ts +2 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/authActionCreator.js +5 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/authChallengeReducer.d.ts +3 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/authChallengeReducer.js +10 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/authChallengeTypes.d.ts +15 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/authChallengeTypes.js +4 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/index.d.ts +4 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/index.js +4 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/askAuthChallengeSendMfaCode.d.ts +2 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/askAuthChallengeSendMfaCode.js +19 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/authChallengeLogic.d.ts +6 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/authChallengeLogic.js +6 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/index.d.ts +1 -0
- package/lib/esm/Auth/AuthChallengeSoftwareTokenMfa/logic/runtime/index.js +1 -0
- package/lib/esm/Auth/Login.d.ts +1 -1
- package/lib/esm/Config/Config.d.ts +2 -1
- package/lib/esm/FederatedAddon.d.ts +6 -0
- package/lib/esm/FederatedAddonProvider.d.ts +8 -0
- package/lib/esm/FederatedAddonProvider.js +7 -0
- package/lib/esm/LogViewer/ActionHistoryItem.d.ts +1 -1
- package/lib/esm/LogViewer/ActionHistoryItemTimeStamp.d.ts +1 -1
- package/lib/esm/LogViewer/ActionRender/ActionRender.d.ts +2 -2
- package/lib/esm/LogViewer/AdminLogs/AdminLogGrid/AdminLogGrid.d.ts +1 -1
- package/lib/esm/LogViewer/AdminLogs/AdminLogSearchBar/AdminLogSearchBar.d.ts +1 -1
- package/lib/esm/LogViewer/AdminLogs/AdminLogs.d.ts +1 -1
- package/lib/esm/LogViewer/ConsoleLogViewer.d.ts +2 -2
- package/lib/esm/LogViewer/LogCorrelationTree.d.ts +1 -1
- package/lib/esm/LogViewer/LogCorrelationTree.js +9 -1
- package/lib/esm/LogViewer/LogCorrelations.d.ts +1 -1
- package/lib/esm/LogViewer/LogDetails.d.ts +1 -1
- package/lib/esm/LogViewer/LogDialog/LogDialog.d.ts +1 -1
- package/lib/esm/LogViewer/LogMetadataGrid.d.ts +1 -1
- package/lib/esm/LogViewer/LogRawJson.d.ts +1 -1
- package/lib/esm/LogViewer/LogSearch.d.ts +1 -1
- package/lib/esm/LogViewer/LogSummary.d.ts +1 -1
- package/lib/esm/LogViewer/LogSummaryDetails.d.ts +1 -1
- package/lib/esm/LogViewer/LogSummaryDetails.js +6 -2
- package/lib/esm/LogViewer/LogSummaryReturn.d.ts +1 -1
- package/lib/esm/LogViewer/LogSummaryReturn.js +6 -2
- package/lib/esm/LogViewer/TopSection.d.ts +1 -1
- package/lib/esm/LogViewer/TruncatedText.d.ts +1 -1
- package/lib/esm/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.d.ts +8 -8
- package/lib/esm/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.js +47 -9
- package/lib/esm/LogViewer/charts/CostPerService.d.ts +1 -1
- package/lib/esm/LogViewer/charts/ErrorsByType.d.ts +1 -1
- package/lib/esm/LogViewer/charts/ErrorsOverTime.d.ts +1 -1
- package/lib/esm/LogViewer/charts/RequestsByService.d.ts +1 -1
- package/lib/esm/LogViewer/logic/index.d.ts +0 -1
- package/lib/esm/LogViewer/logic/index.js +0 -1
- package/lib/esm/components/AdminDialog.d.ts +1 -1
- package/lib/esm/components/AsyncButton.d.ts +2 -2
- package/lib/esm/components/DataGrid.d.ts +1 -1
- package/lib/esm/components/DataGridPagination/DataGridPagination.d.ts +1 -1
- package/lib/esm/components/LastSeen/LastSeen.d.ts +1 -1
- package/lib/esm/components/LoadingBox/LoadingBox.d.ts +1 -1
- package/lib/esm/components/MainLayout/MainLayout.d.ts +1 -1
- package/lib/esm/index.d.ts +2 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/logic/platform/apiRequest.js +29 -16
- package/lib/esm/useFederatedAddon.js +4 -33
- package/package.json +11 -23
- package/lib/commonjs/LogViewer/logic/getFederationManifestUrl.d.ts +0 -3
- package/lib/commonjs/LogViewer/logic/getFederationManifestUrl.js +0 -19
- package/lib/esm/LogViewer/logic/getFederationManifestUrl.d.ts +0 -3
- package/lib/esm/LogViewer/logic/getFederationManifestUrl.js +0 -5
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
|
+
// Default: no host loader provided, so there are no addons.
|
|
4
|
+
const noopLoadAddons = async () => [];
|
|
5
|
+
const FederatedAddonContext = createContext(noopLoadAddons);
|
|
6
|
+
export const FederatedAddonProvider = ({ loadAddons, children }) => (_jsx(FederatedAddonContext.Provider, { value: loadAddons ?? noopLoadAddons, children: children }));
|
|
7
|
+
export const useLoadFederatedAddons = () => useContext(FederatedAddonContext);
|
|
@@ -4,5 +4,5 @@ interface ActionHistoryItemProps {
|
|
|
4
4
|
result: any;
|
|
5
5
|
expanded: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare const ActionHistoryItem: ({ action, result, expanded }: ActionHistoryItemProps) => import("react
|
|
7
|
+
export declare const ActionHistoryItem: ({ action, result, expanded }: ActionHistoryItemProps) => import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -2,5 +2,5 @@ interface ActionHistoryItemTimeStampProps {
|
|
|
2
2
|
startedAt: string;
|
|
3
3
|
finishedAt: string;
|
|
4
4
|
}
|
|
5
|
-
export declare const ActionHistoryItemTimeStamp: ({ startedAt, finishedAt }: ActionHistoryItemTimeStampProps) => import("react
|
|
5
|
+
export declare const ActionHistoryItemTimeStamp: ({ startedAt, finishedAt }: ActionHistoryItemTimeStampProps) => import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -12,6 +12,6 @@ interface ActionRenderProps {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const CoreBatchCustomAction: ActionComponent<SystemBatchActionPayload, any[]>;
|
|
14
14
|
export declare const AnyCustomAction: ActionComponent;
|
|
15
|
-
export declare const ActionRender: ({ action, result, isLegacy, expanded }: ActionRenderProps) => import("react
|
|
16
|
-
export declare const AnyActionHistoryItem: ({ action, result }: AnyActionHistoryItemProps) => import("react
|
|
15
|
+
export declare const ActionRender: ({ action, result, isLegacy, expanded }: ActionRenderProps) => import("react").JSX.Element;
|
|
16
|
+
export declare const AnyActionHistoryItem: ({ action, result }: AnyActionHistoryItemProps) => import("react").JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -4,5 +4,5 @@ type AdminLogGridProps = {
|
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
searchProgress: number;
|
|
6
6
|
};
|
|
7
|
-
export declare const AdminLogGrid: ({ logs, isLoading, searchProgress }: AdminLogGridProps) => import("react
|
|
7
|
+
export declare const AdminLogGrid: ({ logs, isLoading, searchProgress }: AdminLogGridProps) => import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export interface AdminLogSearchBarProps {
|
|
2
2
|
onSearch: () => Promise<any>;
|
|
3
3
|
}
|
|
4
|
-
export declare function AdminLogSearchBar({ onSearch }: AdminLogSearchBarProps): import("react
|
|
4
|
+
export declare function AdminLogSearchBar({ onSearch }: AdminLogSearchBarProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AdminLogs: () => import("react
|
|
1
|
+
export declare const AdminLogs: () => import("react").JSX.Element;
|
|
@@ -2,6 +2,6 @@ import { StoryResult } from 'quidproquo-core';
|
|
|
2
2
|
interface ConsoleLogViewerProps {
|
|
3
3
|
logs: StoryResult<any>['logs'];
|
|
4
4
|
}
|
|
5
|
-
export declare const ConsoleLogViewer: ({ logs }: ConsoleLogViewerProps) => import("react
|
|
6
|
-
declare const _default: import("react").MemoExoticComponent<({ logs }: ConsoleLogViewerProps) => import("react
|
|
5
|
+
export declare const ConsoleLogViewer: ({ logs }: ConsoleLogViewerProps) => import("react").JSX.Element | null;
|
|
6
|
+
declare const _default: import("react").MemoExoticComponent<({ logs }: ConsoleLogViewerProps) => import("react").JSX.Element | null>;
|
|
7
7
|
export default _default;
|
|
@@ -6,5 +6,5 @@ interface LogCorrelationTreeProps {
|
|
|
6
6
|
isVisible: boolean;
|
|
7
7
|
treeApi: TreeApi;
|
|
8
8
|
}
|
|
9
|
-
export declare const LogCorrelationTree: import("react").MemoExoticComponent<({ correlationId, highlightCorrelationId, setSelectedLogCorrelation, isVisible, treeApi, }: LogCorrelationTreeProps) => import("react
|
|
9
|
+
export declare const LogCorrelationTree: import("react").MemoExoticComponent<({ correlationId, highlightCorrelationId, setSelectedLogCorrelation, isVisible, treeApi, }: LogCorrelationTreeProps) => import("react").JSX.Element>;
|
|
10
10
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { QpqRuntimeType } from 'quidproquo-core';
|
|
2
3
|
import { Fragment, memo, useEffect, useRef, useState } from 'react';
|
|
3
4
|
import { Tree } from 'react-d3-tree';
|
|
4
5
|
import { Box, CircularProgress } from '@mui/material';
|
|
@@ -14,7 +15,14 @@ const renderRectSvgNode = (setSelectedLogCorrelation, highlightCorrelationId) =>
|
|
|
14
15
|
: nodeDatum.error
|
|
15
16
|
? 'red'
|
|
16
17
|
: 'white'; // Bright red for non-selected errors, white for non-selected non-errors
|
|
17
|
-
|
|
18
|
+
// For story runtime types, collapse the runtimeType line away so the generic
|
|
19
|
+
// info takes its place — other runtime types keep their full label stack.
|
|
20
|
+
const isStoryRuntimeType = nodeDatum.runtimeType === QpqRuntimeType.EXECUTE_STORY || nodeDatum.runtimeType === QpqRuntimeType.EXECUTE_IMPLEMENTATION_STORY;
|
|
21
|
+
const displayText = (nodeDatum.generic || '').split('::').pop();
|
|
22
|
+
const textLines = isStoryRuntimeType
|
|
23
|
+
? [nodeDatum.moduleName, displayText, nodeDatum.error || '']
|
|
24
|
+
: [nodeDatum.moduleName, nodeDatum.runtimeType, displayText, nodeDatum.error || ''];
|
|
25
|
+
return (_jsxs("g", { children: [_jsx("circle", { r: 10, fill: color, x: "10", y: "10", onClick: () => setSelectedLogCorrelation(nodeDatum.correlation) }), textLines
|
|
18
26
|
.filter((t) => !!t)
|
|
19
27
|
.map((text, i) => {
|
|
20
28
|
const x = 0;
|
|
@@ -5,5 +5,5 @@ interface LogCorrelationsProps {
|
|
|
5
5
|
isVisible: boolean;
|
|
6
6
|
treeApi: TreeApi;
|
|
7
7
|
}
|
|
8
|
-
export declare const LogCorrelations: ({ logCorrelation, setSelectedLogCorrelation, isVisible, treeApi }: LogCorrelationsProps) => import("react
|
|
8
|
+
export declare const LogCorrelations: ({ logCorrelation, setSelectedLogCorrelation, isVisible, treeApi }: LogCorrelationsProps) => import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -4,5 +4,5 @@ interface LogDetailsProps {
|
|
|
4
4
|
hideFastActions: boolean;
|
|
5
5
|
orderByDuration: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare const LogDetails: ({ log, hideFastActions, orderByDuration, }: LogDetailsProps) => import("react
|
|
7
|
+
export declare const LogDetails: ({ log, hideFastActions, orderByDuration, }: LogDetailsProps) => import("react").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -5,5 +5,5 @@ interface LogDialogProps {
|
|
|
5
5
|
storyResultMetadatas: any[];
|
|
6
6
|
setSelectedLogCorrelation: (logCorrelation: string) => void;
|
|
7
7
|
}
|
|
8
|
-
export declare const LogDialog: ({ logCorrelation, open, handleClose, setSelectedLogCorrelation }: LogDialogProps) => import("react
|
|
8
|
+
export declare const LogDialog: ({ logCorrelation, open, handleClose, setSelectedLogCorrelation }: LogDialogProps) => import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -3,5 +3,5 @@ type LogMetadataGridProps = {
|
|
|
3
3
|
logs: LogMetadata[];
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
};
|
|
6
|
-
export declare const LogMetadataGrid: ({ logs, isLoading }: LogMetadataGridProps) => import("react
|
|
6
|
+
export declare const LogMetadataGrid: ({ logs, isLoading }: LogMetadataGridProps) => import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -2,5 +2,5 @@ import { StoryResult } from 'quidproquo-core';
|
|
|
2
2
|
interface LogRawJsonProps {
|
|
3
3
|
log: StoryResult<any>;
|
|
4
4
|
}
|
|
5
|
-
export declare const LogRawJson: ({ log }: LogRawJsonProps) => import("react
|
|
5
|
+
export declare const LogRawJson: ({ log }: LogRawJsonProps) => import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LogSearch: () => import("react
|
|
1
|
+
export declare const LogSearch: () => import("react").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { StoryResult } from 'quidproquo-core';
|
|
|
2
2
|
interface LogSummaryProps {
|
|
3
3
|
log: StoryResult<any>;
|
|
4
4
|
}
|
|
5
|
-
export declare const LogSummary: ({ log }: LogSummaryProps) => import("react
|
|
5
|
+
export declare const LogSummary: ({ log }: LogSummaryProps) => import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -2,5 +2,5 @@ import { StoryResult } from 'quidproquo-core';
|
|
|
2
2
|
interface LogSummaryDetailsProps {
|
|
3
3
|
log: StoryResult<any>;
|
|
4
4
|
}
|
|
5
|
-
export declare const LogSummaryDetails: ({ log }: LogSummaryDetailsProps) => import("react
|
|
5
|
+
export declare const LogSummaryDetails: ({ log }: LogSummaryDetailsProps) => import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { getUniqueKeyFromQpqFunctionRuntime } from 'quidproquo-core';
|
|
3
|
-
import {
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
|
|
5
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
6
|
+
import { Box, IconButton, Tooltip, Typography } from '@mui/material';
|
|
4
7
|
import { GenericFunctionRenderer, genericFunctionRendererStyles } from './actionComponents/genericActionRenderer/AnyVariableView';
|
|
5
8
|
export const LogSummaryDetails = ({ log }) => {
|
|
9
|
+
const [expanded, setExpanded] = useState(false);
|
|
6
10
|
const totalRuntime = new Date(log.finishedAt).getTime() - new Date(log.startedAt).getTime();
|
|
7
11
|
const functionKey = log.qpqFunctionRuntimeInfo ? getUniqueKeyFromQpqFunctionRuntime(log.qpqFunctionRuntimeInfo) : 'unknownMahLord';
|
|
8
|
-
return (_jsxs(_Fragment, { children: [
|
|
12
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Box, { display: "flex", alignItems: "center", children: [_jsxs(Typography, { variant: "h5", gutterBottom: true, children: [log.runtimeType, " - ", log.moduleName] }), _jsx(Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: _jsx(IconButton, { size: "small", onClick: () => setExpanded(!expanded), children: expanded ? _jsx(ExpandLessIcon, {}) : _jsx(ExpandMoreIcon, {}) }) })] }), _jsx("div", { children: _jsxs("pre", { style: genericFunctionRendererStyles.pre, children: [_jsxs("div", { style: genericFunctionRendererStyles.commentBlock, children: [_jsx("div", { children: "// //////////////////////////////////////////////////////" }), _jsxs("div", { children: ["// src: ", functionKey] }), log.fromCorrelation && _jsxs("div", { children: ["// Caller: ", log.fromCorrelation] }), _jsxs("div", { children: ["// Total Runtime: ", _jsxs("span", { style: genericFunctionRendererStyles.highlightComment, children: [totalRuntime, " ms"] })] }), _jsx("div", { children: "// //////////////////////////////////////////////////////" })] }), _jsx(GenericFunctionRenderer, { functionName: functionKey.split('::').pop() || 'unknown', args: log.input, expanded: expanded })] }) })] }));
|
|
9
13
|
};
|
|
@@ -2,5 +2,5 @@ import { StoryResult } from 'quidproquo-core';
|
|
|
2
2
|
interface LogSummaryReturnProps {
|
|
3
3
|
log: StoryResult<any>;
|
|
4
4
|
}
|
|
5
|
-
export declare const LogSummaryReturn: ({ log }: LogSummaryReturnProps) => import("react
|
|
5
|
+
export declare const LogSummaryReturn: ({ log }: LogSummaryReturnProps) => import("react").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
|
|
4
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
5
|
+
import { Box, IconButton, Tooltip, Typography } from '@mui/material';
|
|
3
6
|
import { AnyVariableView, genericFunctionRendererStyles } from './actionComponents';
|
|
4
7
|
export const LogSummaryReturn = ({ log }) => {
|
|
5
|
-
|
|
8
|
+
const [expanded, setExpanded] = useState(false);
|
|
9
|
+
return (_jsxs("div", { children: [_jsxs(Box, { display: "flex", alignItems: "center", children: [_jsx(Typography, { variant: "h6", gutterBottom: true, children: log.error ? 'Thrown Error' : 'Returned' }), _jsx(Tooltip, { title: expanded ? 'Collapse' : 'Expand', children: _jsx(IconButton, { size: "small", onClick: () => setExpanded(!expanded), children: expanded ? _jsx(ExpandLessIcon, {}) : _jsx(ExpandMoreIcon, {}) }) })] }), _jsx("pre", { style: { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }, children: _jsx("pre", { style: genericFunctionRendererStyles.pre, children: log.error ? _jsx(AnyVariableView, { value: log.error, expanded: expanded }) : _jsx(AnyVariableView, { value: log.result, expanded: expanded }) }) })] }));
|
|
6
10
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export interface TopSectionProps {
|
|
2
2
|
onSearch: () => Promise<any>;
|
|
3
3
|
}
|
|
4
|
-
export declare function TopSection({ onSearch }: TopSectionProps): import("react
|
|
4
|
+
export declare function TopSection({ onSearch }: TopSectionProps): import("react").JSX.Element;
|
|
@@ -45,14 +45,14 @@ type VariableViewProps = {
|
|
|
45
45
|
expanded: boolean;
|
|
46
46
|
hideStringQuotes?: boolean;
|
|
47
47
|
};
|
|
48
|
-
export declare const StringVariableView: ({ value, expanded, hideStringQuotes }: VariableViewProps) =>
|
|
49
|
-
export declare const ArrayVariableView: ({ value, expanded }: VariableViewProps) =>
|
|
50
|
-
export declare const KvsQueryConditionVariableView: ({ value, expanded }: VariableViewProps) =>
|
|
51
|
-
export declare const KvsLogicalOperatorVariableView: ({ value, expanded }: VariableViewProps) =>
|
|
52
|
-
export declare const EmptyObjectVariableView: ({ value, expanded }: VariableViewProps) =>
|
|
53
|
-
export declare const QpqBinaryDataVariableView: ({ value, expanded }: VariableViewProps) =>
|
|
54
|
-
export declare const ObjectVariableView: ({ value, expanded }: VariableViewProps) =>
|
|
55
|
-
export declare const AnyVariableView: ({ value, expanded, hideStringQuotes }: VariableViewProps) =>
|
|
48
|
+
export declare const StringVariableView: ({ value, expanded, hideStringQuotes }: VariableViewProps) => React.JSX.Element;
|
|
49
|
+
export declare const ArrayVariableView: ({ value, expanded }: VariableViewProps) => React.JSX.Element;
|
|
50
|
+
export declare const KvsQueryConditionVariableView: ({ value, expanded }: VariableViewProps) => React.JSX.Element;
|
|
51
|
+
export declare const KvsLogicalOperatorVariableView: ({ value, expanded }: VariableViewProps) => React.JSX.Element;
|
|
52
|
+
export declare const EmptyObjectVariableView: ({ value, expanded }: VariableViewProps) => React.JSX.Element;
|
|
53
|
+
export declare const QpqBinaryDataVariableView: ({ value, expanded }: VariableViewProps) => React.JSX.Element;
|
|
54
|
+
export declare const ObjectVariableView: ({ value, expanded }: VariableViewProps) => React.JSX.Element;
|
|
55
|
+
export declare const AnyVariableView: ({ value, expanded, hideStringQuotes }: VariableViewProps) => React.JSX.Element;
|
|
56
56
|
interface GenericFunctionRendererProps {
|
|
57
57
|
functionName: string;
|
|
58
58
|
args: {
|
package/lib/esm/LogViewer/actionComponents/genericActionRenderer/AnyVariableView/AnyVariableView.js
CHANGED
|
@@ -21,21 +21,59 @@ export const genericFunctionRendererStyles = {
|
|
|
21
21
|
highlightComment: { color: 'white' }, // Number value color
|
|
22
22
|
jsonComment: { color: '#5E993E' }, // Number value color
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
// Try to parse a string as JSON. We reject bare numbers so that plain numeric
|
|
25
|
+
// strings (which JSON.parse happily accepts) keep rendering as strings.
|
|
26
|
+
const tryParseJson = (text) => {
|
|
25
27
|
try {
|
|
26
|
-
const
|
|
27
|
-
if (typeof
|
|
28
|
-
|
|
28
|
+
const value = JSON.parse(text);
|
|
29
|
+
if (typeof value === 'number') {
|
|
30
|
+
return { ok: false };
|
|
29
31
|
}
|
|
30
|
-
return
|
|
32
|
+
return { ok: true, value };
|
|
31
33
|
}
|
|
32
34
|
catch {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
return { ok: false };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
// base64 decoding succeeds on plenty of random strings, so the JSON parse below
|
|
39
|
+
// is what actually makes this specific - it only matches if the string is BOTH
|
|
40
|
+
// valid base64 AND decodes to valid JSON.
|
|
41
|
+
const base64Pattern = /^[A-Za-z0-9+/]+={0,2}$/;
|
|
42
|
+
const tryDecodeBase64 = (text) => {
|
|
43
|
+
// Cheap structural gate: canonical base64 uses only this charset and its length
|
|
44
|
+
// is a multiple of 4. This also skips obvious non-base64 (anything with {, ", spaces).
|
|
45
|
+
if (text.length === 0 || text.length % 4 !== 0 || !base64Pattern.test(text)) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const decoded = atob(text);
|
|
50
|
+
// Round-trip to reject non-canonical base64 that atob would otherwise accept.
|
|
51
|
+
if (btoa(decoded) !== text) {
|
|
52
|
+
return undefined;
|
|
36
53
|
}
|
|
37
|
-
return
|
|
54
|
+
return decoded;
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
export const StringVariableView = ({ value, expanded, hideStringQuotes }) => {
|
|
61
|
+
const asJson = tryParseJson(value);
|
|
62
|
+
if (asJson.ok) {
|
|
63
|
+
return (_jsxs(_Fragment, { children: [_jsxs("span", { style: genericFunctionRendererStyles.jsonComment, children: ['<', "json", '>'] }), _jsx(AnyVariableView, { value: asJson.value, expanded: expanded })] }));
|
|
64
|
+
}
|
|
65
|
+
const decoded = tryDecodeBase64(value);
|
|
66
|
+
if (decoded !== undefined) {
|
|
67
|
+
const asBase64Json = tryParseJson(decoded);
|
|
68
|
+
if (asBase64Json.ok) {
|
|
69
|
+
return (_jsxs(_Fragment, { children: [_jsxs("span", { style: genericFunctionRendererStyles.jsonComment, children: ['<', "base64-json", '>'] }), _jsx(AnyVariableView, { value: asBase64Json.value, expanded: expanded })] }));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const trimmedValue = value.length > 25 && !expanded ? `${value.slice(0, 25)}...` : value;
|
|
73
|
+
if (hideStringQuotes) {
|
|
74
|
+
return _jsx("span", { style: genericFunctionRendererStyles.stringValue, children: trimmedValue });
|
|
38
75
|
}
|
|
76
|
+
return _jsxs("span", { style: genericFunctionRendererStyles.stringValue, children: ["\"", trimmedValue, "\""] });
|
|
39
77
|
};
|
|
40
78
|
export const ArrayVariableView = ({ value, expanded }) => {
|
|
41
79
|
if (value.length == 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface CostPerServiceProps {
|
|
2
2
|
logs: any[];
|
|
3
3
|
}
|
|
4
|
-
export declare const CostPerService: ({ logs }: CostPerServiceProps) => import("react
|
|
4
|
+
export declare const CostPerService: ({ logs }: CostPerServiceProps) => import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface ErrorsByTypeProps {
|
|
2
2
|
logs: any[];
|
|
3
3
|
}
|
|
4
|
-
export declare const ErrorsByType: ({ logs }: ErrorsByTypeProps) => import("react
|
|
4
|
+
export declare const ErrorsByType: ({ logs }: ErrorsByTypeProps) => import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -3,5 +3,5 @@ interface ErrorsOverTimeProps {
|
|
|
3
3
|
logs: any[];
|
|
4
4
|
searchParams: SearchParams;
|
|
5
5
|
}
|
|
6
|
-
export declare const ErrorsOverTime: ({ logs, searchParams }: ErrorsOverTimeProps) => import("react
|
|
6
|
+
export declare const ErrorsOverTime: ({ logs, searchParams }: ErrorsOverTimeProps) => import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -3,5 +3,5 @@ interface RequestsByServiceProps {
|
|
|
3
3
|
logs: any[];
|
|
4
4
|
searchParams: SearchParams;
|
|
5
5
|
}
|
|
6
|
-
export declare const RequestsByService: ({ logs, searchParams }: RequestsByServiceProps) => import("react
|
|
6
|
+
export declare const RequestsByService: ({ logs, searchParams }: RequestsByServiceProps) => import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -2,7 +2,6 @@ export * from './createHierarchy';
|
|
|
2
2
|
export * from './filterLogs';
|
|
3
3
|
export * from './findLogDirectChildren';
|
|
4
4
|
export * from './findRootLog';
|
|
5
|
-
export * from './getFederationManifestUrl';
|
|
6
5
|
export * from './getLogHierarchy';
|
|
7
6
|
export * from './getLogs';
|
|
8
7
|
export * from './getLogUrl';
|
|
@@ -2,7 +2,6 @@ export * from './createHierarchy';
|
|
|
2
2
|
export * from './filterLogs';
|
|
3
3
|
export * from './findLogDirectChildren';
|
|
4
4
|
export * from './findRootLog';
|
|
5
|
-
export * from './getFederationManifestUrl';
|
|
6
5
|
export * from './getLogHierarchy';
|
|
7
6
|
export * from './getLogs';
|
|
8
7
|
export * from './getLogUrl';
|
|
@@ -20,5 +20,5 @@ interface AdminDialogProps {
|
|
|
20
20
|
}[];
|
|
21
21
|
children: React.ReactNode;
|
|
22
22
|
}
|
|
23
|
-
export declare const AdminDialog: ({ open, handleClose, title, selectedTab, onSelectTab, tabs, buttons, children }: AdminDialogProps) => import("react
|
|
23
|
+
export declare const AdminDialog: ({ open, handleClose, title, selectedTab, onSelectTab, tabs, buttons, children }: AdminDialogProps) => import("react").JSX.Element;
|
|
24
24
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
interface AsyncButtonProps {
|
|
3
3
|
onClick: (event: any) => Promise<void>;
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
type?: 'button' | 'submit' | 'reset';
|
|
7
7
|
}
|
|
8
|
-
export declare function AsyncButton({ onClick, children, disabled, type }: AsyncButtonProps):
|
|
8
|
+
export declare function AsyncButton({ onClick, children, disabled, type }: AsyncButtonProps): React.JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -13,4 +13,4 @@ export interface DataGridProps<T extends object> {
|
|
|
13
13
|
columns: DataGridColumDefinitions<T>[];
|
|
14
14
|
onRowClick?: (row: T) => void;
|
|
15
15
|
}
|
|
16
|
-
export declare const DataGrid: <T extends object>({ items, columns, onRowClick }: DataGridProps<T>) => import("react
|
|
16
|
+
export declare const DataGrid: <T extends object>({ items, columns, onRowClick }: DataGridProps<T>) => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function DataGridPagination(): import("react
|
|
1
|
+
export declare function DataGridPagination(): import("react").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("react").MemoExoticComponent<(props: any) => import("react
|
|
1
|
+
declare const _default: import("react").MemoExoticComponent<(props: any) => import("react").JSX.Element>;
|
|
2
2
|
export default _default;
|
|
@@ -4,5 +4,5 @@ interface LoadingBoxProps<T> {
|
|
|
4
4
|
renderItem: (item: T) => React.ReactNode;
|
|
5
5
|
renderLoading?: () => React.ReactNode;
|
|
6
6
|
}
|
|
7
|
-
export declare const LoadingBox: <T>({ path, renderItem, renderLoading }: LoadingBoxProps<T>) =>
|
|
7
|
+
export declare const LoadingBox: <T>({ path, renderItem, renderLoading }: LoadingBoxProps<T>) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function MainLayout(): import("react
|
|
1
|
+
export declare function MainLayout(): import("react").JSX.Element;
|
package/lib/esm/index.d.ts
CHANGED
package/lib/esm/index.js
CHANGED
|
@@ -1,28 +1,41 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { preformNetworkRequest } from 'quidproquo-webserver';
|
|
2
2
|
const getHeaders = (accessToken) => ({
|
|
3
3
|
'Content-Type': 'application/json',
|
|
4
4
|
...(accessToken ? { Authorization: `Bearer ${accessToken}` } : {}),
|
|
5
5
|
});
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return instance;
|
|
6
|
+
const unwrap = (response) => {
|
|
7
|
+
if (response.status < 200 || response.status >= 300) {
|
|
8
|
+
throw new Error(`Request failed with status ${response.status}`);
|
|
9
|
+
}
|
|
10
|
+
return response.data;
|
|
12
11
|
};
|
|
13
12
|
export const apiRequestPost = async (path, body, apiBaseUrl, accessToken) => {
|
|
14
|
-
const
|
|
15
|
-
|
|
13
|
+
const response = await preformNetworkRequest({
|
|
14
|
+
method: 'POST',
|
|
15
|
+
url: path,
|
|
16
|
+
basePath: apiBaseUrl,
|
|
17
|
+
headers: getHeaders(accessToken),
|
|
18
|
+
body,
|
|
19
|
+
responseType: 'json',
|
|
20
|
+
});
|
|
21
|
+
return unwrap(response);
|
|
16
22
|
};
|
|
17
23
|
export const apiRequestGet = async (path, apiBaseUrl, accessToken) => {
|
|
18
|
-
const
|
|
19
|
-
|
|
24
|
+
const response = await preformNetworkRequest({
|
|
25
|
+
method: 'GET',
|
|
26
|
+
url: path,
|
|
27
|
+
basePath: apiBaseUrl,
|
|
28
|
+
headers: getHeaders(accessToken),
|
|
29
|
+
responseType: 'json',
|
|
30
|
+
});
|
|
31
|
+
return unwrap(response);
|
|
20
32
|
};
|
|
21
33
|
export const externalRequestGet = async (path) => {
|
|
22
|
-
const
|
|
23
|
-
|
|
34
|
+
const response = await preformNetworkRequest({
|
|
35
|
+
method: 'GET',
|
|
36
|
+
url: path,
|
|
24
37
|
headers: getHeaders(),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return
|
|
38
|
+
responseType: 'json',
|
|
39
|
+
});
|
|
40
|
+
return unwrap(response);
|
|
28
41
|
};
|
|
@@ -1,46 +1,17 @@
|
|
|
1
1
|
import { useAuthAccessToken, useBaseUrlResolvers } from 'quidproquo-web-react';
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { getFederationManifest } from './LogViewer/logic';
|
|
3
|
+
import { useLoadFederatedAddons } from './FederatedAddonProvider';
|
|
5
4
|
export function useFederatedAddon() {
|
|
6
5
|
const [federatedAddons, setFederatedAddons] = useState([]);
|
|
7
6
|
const [loading, setLoading] = useState(false);
|
|
8
7
|
const accessToken = useAuthAccessToken();
|
|
9
8
|
const baseUrlResolvers = useBaseUrlResolvers();
|
|
9
|
+
const loadAddons = useLoadFederatedAddons();
|
|
10
10
|
useEffect(() => {
|
|
11
11
|
const doAsyncWork = async () => {
|
|
12
12
|
setLoading(true);
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
if (!manifestUrl) {
|
|
16
|
-
console.log(`Missing manifest Url`);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
console.log(`Reading manifest: [${manifestUrl}]`);
|
|
20
|
-
const manifest = await getFederationManifest(baseUrlResolvers.getApiUrl(), manifestUrl);
|
|
21
|
-
if (!manifest.id) {
|
|
22
|
-
console.log(`Manifest missing id`);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
// Update the remote
|
|
26
|
-
console.log(`Updating remote: [${manifest.id}]`);
|
|
27
|
-
registerRemotes([
|
|
28
|
-
{
|
|
29
|
-
name: manifest.id,
|
|
30
|
-
entry: manifestUrl,
|
|
31
|
-
},
|
|
32
|
-
], { force: true });
|
|
33
|
-
// Load the remote
|
|
34
|
-
console.log(`Loading remote: [${manifest.id}]`);
|
|
35
|
-
const remote = await loadRemote(`${manifest.id}/shared`, {
|
|
36
|
-
from: 'runtime',
|
|
37
|
-
});
|
|
38
|
-
if (remote && typeof remote === 'object') {
|
|
39
|
-
const allAddons = Object.values(remote)
|
|
40
|
-
.filter((possibleAddon) => typeof possibleAddon === 'object')
|
|
41
|
-
.filter((possibleAddon) => possibleAddon.isQpqAdminFederatedAddon);
|
|
42
|
-
setFederatedAddons(allAddons);
|
|
43
|
-
}
|
|
13
|
+
const addons = await loadAddons({ baseUrlResolvers, accessToken });
|
|
14
|
+
setFederatedAddons(addons);
|
|
44
15
|
};
|
|
45
16
|
doAsyncWork()
|
|
46
17
|
.catch((e) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quidproquo-web-admin",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@emotion/react": "^11.10.8",
|
|
36
36
|
"@emotion/styled": "^11.10.8",
|
|
37
|
-
"@module-federation/enhanced": "^0.22.0",
|
|
38
37
|
"@mui/icons-material": "^5.11.16",
|
|
39
38
|
"@mui/lab": "^5.0.0-alpha.128",
|
|
40
39
|
"@mui/material": "^5.12.2",
|
|
@@ -45,13 +44,13 @@
|
|
|
45
44
|
"date-fns": "^2.30.0",
|
|
46
45
|
"dayjs": "^1.11.7",
|
|
47
46
|
"javascript-time-ago": "^2.5.9",
|
|
48
|
-
"quidproquo-core": "0.0
|
|
49
|
-
"quidproquo-tsconfig": "0.0
|
|
50
|
-
"quidproquo-web": "0.0
|
|
51
|
-
"quidproquo-web-react": "0.0
|
|
52
|
-
"quidproquo-webserver": "0.0
|
|
47
|
+
"quidproquo-core": "0.1.0",
|
|
48
|
+
"quidproquo-tsconfig": "0.1.0",
|
|
49
|
+
"quidproquo-web": "0.1.0",
|
|
50
|
+
"quidproquo-web-react": "0.1.0",
|
|
51
|
+
"quidproquo-webserver": "0.1.0",
|
|
53
52
|
"react": ">=18.3.1",
|
|
54
|
-
"react-d3-tree": "^3.6.
|
|
53
|
+
"react-d3-tree": "^3.6.6",
|
|
55
54
|
"react-dom": "18.3.1",
|
|
56
55
|
"react-icons": "^4.8.0",
|
|
57
56
|
"react-inspector": "^6.0.2",
|
|
@@ -61,25 +60,14 @@
|
|
|
61
60
|
"recharts": "^2.12.3"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@babel/preset-env": "^7.21.5",
|
|
67
|
-
"@babel/preset-react": "^7.18.6",
|
|
68
|
-
"@babel/preset-typescript": "^7.21.5",
|
|
63
|
+
"@testing-library/dom": "^10.4.1",
|
|
64
|
+
"@testing-library/react": "^16.3.2",
|
|
69
65
|
"@types/node": "^22.13.13",
|
|
70
66
|
"@types/react-dom": "^18.3.0",
|
|
71
|
-
"@types/webpack": "^5.28.5",
|
|
72
|
-
"@types/webpack-dev-server": "^4.7.2",
|
|
73
|
-
"babel-loader": "^9.1.2",
|
|
74
|
-
"html-webpack-plugin": "^5.5.1",
|
|
75
|
-
"path-browserify": "^1.0.1",
|
|
76
67
|
"tsconfig-paths": "^4.2.0",
|
|
77
|
-
"typescript": "^5.8.2"
|
|
78
|
-
"webpack": "^5.98.0",
|
|
79
|
-
"webpack-cli": "^5.0.2",
|
|
80
|
-
"webpack-dev-server": "^5.2.2"
|
|
68
|
+
"typescript": "^5.8.2"
|
|
81
69
|
},
|
|
82
70
|
"peerDependencies": {
|
|
83
71
|
"react": ">=18.3.1"
|
|
84
72
|
}
|
|
85
|
-
}
|
|
73
|
+
}
|