@equinor/roma-framework 1.0.1 → 2.0.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/cypress.mjs +806 -0
- package/dev-portal/index.d.ts +17 -0
- package/dev-portal/lib/api/fetcher.d.ts +21 -0
- package/dev-portal/lib/api/ms-graph/api/group/find-group-members.d.ts +2 -0
- package/dev-portal/lib/api/ms-graph/api/user/find-user-by-shortname.d.ts +1 -0
- package/dev-portal/lib/api/ms-graph/api/user/find-users-by-mail.d.ts +4 -0
- package/dev-portal/lib/api/ms-graph/index.d.ts +10 -0
- package/dev-portal/lib/api/ms-graph/model/azure-response.d.ts +7 -0
- package/dev-portal/lib/api/ms-graph/model/error.d.ts +11 -0
- package/dev-portal/lib/api/roma/api/app-controller/app-controller.d.ts +121 -0
- package/dev-portal/lib/api/roma/api/category-controller/category-controller.d.ts +93 -0
- package/dev-portal/lib/api/roma/api/environment-controller/environment-controller.d.ts +26 -0
- package/dev-portal/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +50 -0
- package/dev-portal/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +161 -0
- package/dev-portal/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +20 -0
- package/dev-portal/lib/api/roma/api/service-controller/service-controller.d.ts +93 -0
- package/dev-portal/lib/api/roma/api/setting-controller/setting-controller.d.ts +260 -0
- package/dev-portal/lib/api/roma/index.d.ts +9 -0
- package/dev-portal/lib/api/roma/model/appDto.d.ts +19 -0
- package/dev-portal/lib/api/roma/model/categoryDto.d.ts +13 -0
- package/dev-portal/lib/api/roma/model/environmentDto.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/feedbackDetailsDto.d.ts +13 -0
- package/dev-portal/lib/api/roma/model/feedbackDto.d.ts +6 -0
- package/dev-portal/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +13 -0
- package/dev-portal/lib/api/roma/model/feedbackExpandedResponseDto.d.ts +4 -0
- package/dev-portal/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +6 -0
- package/dev-portal/lib/api/roma/model/feedbackFeedbackDto.d.ts +13 -0
- package/dev-portal/lib/api/roma/model/feedbackPage.d.ts +19 -0
- package/dev-portal/lib/api/roma/model/feedbackResponseDto.d.ts +4 -0
- package/dev-portal/lib/api/roma/model/feedbackResponseIssueDto.d.ts +11 -0
- package/dev-portal/lib/api/roma/model/feedbackSolutionDto.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/getAllApps200.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/getAllCategories200.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +11 -0
- package/dev-portal/lib/api/roma/model/getAllServices200.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/getSettingsByAppShortName200.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/getSettingsByUserId200.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/index.d.ts +38 -0
- package/dev-portal/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +17 -0
- package/dev-portal/lib/api/roma/model/pageableObject.d.ts +9 -0
- package/dev-portal/lib/api/roma/model/romaConfigurationDto.d.ts +7 -0
- package/dev-portal/lib/api/roma/model/romaConfigurationDtoValue.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +8 -0
- package/dev-portal/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/serviceDto.d.ts +16 -0
- package/dev-portal/lib/api/roma/model/settingDto.d.ts +9 -0
- package/dev-portal/lib/api/roma/model/settingDtoValue.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/sortObject.d.ts +12 -0
- package/dev-portal/lib/api/roma/model/uploadBundleBody.d.ts +10 -0
- package/dev-portal/lib/api/roma/model/versionDto.d.ts +12 -0
- package/dev-portal/lib/api/roma/use-client.d.ts +34 -0
- package/dev-portal/lib/api/util.d.ts +1 -0
- package/dev-portal/lib/app-provider.d.ts +28 -0
- package/dev-portal/lib/dev-portal/AppLoader.d.ts +14 -0
- package/dev-portal/lib/dev-portal/AppViewer.d.ts +6 -0
- package/dev-portal/lib/dev-portal/EquinorLoader.d.ts +12 -0
- package/dev-portal/lib/dev-portal/ErrorViewer.d.ts +20 -0
- package/dev-portal/lib/dev-portal/Header.d.ts +2 -0
- package/dev-portal/lib/dev-portal/HeaderMenu.d.ts +4 -0
- package/dev-portal/lib/dev-portal/HttpErrorViewer.d.ts +13 -0
- package/dev-portal/lib/dev-portal/Navigation.d.ts +5 -0
- package/dev-portal/lib/dev-portal/PortalStyles.d.ts +1111 -0
- package/dev-portal/lib/dev-portal/PortalTypes.d.ts +13 -0
- package/dev-portal/lib/dev-portal/Root.d.ts +5 -0
- package/dev-portal/lib/dev-portal/SideSheets.d.ts +6 -0
- package/dev-portal/lib/dev-portal/config/AppClient.d.ts +19 -0
- package/dev-portal/lib/dev-portal/config/ServiceDiscoveryClient.d.ts +7 -0
- package/dev-portal/lib/dev-portal/config/config.d.ts +3 -0
- package/dev-portal/lib/dev-portal/config.d.ts +3 -0
- package/dev-portal/lib/dev-portal/index.d.ts +13 -0
- package/dev-portal/lib/dev-portal/logo.d.ts +2 -0
- package/dev-portal/lib/eds-event-provider.d.ts +6 -0
- package/dev-portal/lib/error-handlers/fallback-http-errors.d.ts +1 -0
- package/dev-portal/lib/error-handlers/http-error-handler.d.ts +11 -0
- package/dev-portal/lib/hooks/use-get-api-roles.d.ts +11 -0
- package/dev-portal/lib/hooks/use-has-api-role.d.ts +7 -0
- package/dev-portal/lib/hooks/use-manage-watch-list.d.ts +7 -0
- package/dev-portal/lib/hooks/use-watch-defaults.d.ts +100 -0
- package/dev-portal/lib/make-component.d.ts +12 -0
- package/dev-portal/lib/query/persister.d.ts +6 -0
- package/dev-portal/lib/style-provider.d.ts +7 -0
- package/dev-portal/lib/test-utils/modules.d.ts +113 -0
- package/dev-portal/lib/test-utils/roma-cypress-wrapper.d.ts +10 -0
- package/dev-portal/package.json +6 -1
- package/dev-portal/roma-framework.umd.js +19697 -12990
- package/index.d.ts +4 -0
- package/lib/api/ms-graph/api/group/find-group-members.d.ts +2 -2
- package/lib/api/ms-graph/api/user/find-user-by-shortname.d.ts +1 -1
- package/lib/api/ms-graph/api/user/find-users-by-mail.d.ts +4 -2
- package/lib/api/ms-graph/index.d.ts +1 -2
- package/lib/api/ms-graph/model/azure-response.d.ts +7 -0
- package/lib/api/roma/api/feedback-controller/feedback-controller.d.ts +22 -2
- package/lib/api/roma/model/feedbackExpandedResponseDetailsDto.d.ts +13 -0
- package/lib/api/roma/model/feedbackExpandedResponseDto.d.ts +4 -0
- package/lib/api/roma/model/feedbackExpandedResponseIssueDto.d.ts +6 -0
- package/lib/api/roma/model/feedbackPage.d.ts +19 -0
- package/lib/api/roma/model/index.d.ts +7 -0
- package/lib/api/roma/model/listFeedbacksByCurrentUserParams.d.ts +17 -0
- package/lib/api/roma/model/pageableObject.d.ts +9 -0
- package/lib/api/roma/model/sortObject.d.ts +12 -0
- package/lib/app-provider.d.ts +7 -11
- package/lib/dev-portal/HeaderMenu.d.ts +4 -0
- package/lib/dev-portal/PortalStyles.d.ts +1111 -0
- package/lib/dev-portal/PortalTypes.d.ts +13 -0
- package/lib/dev-portal/SideSheets.d.ts +6 -0
- package/lib/dev-portal/config/AppClient.d.ts +19 -0
- package/lib/dev-portal/config/ServiceDiscoveryClient.d.ts +7 -0
- package/lib/dev-portal/config/config.d.ts +3 -0
- package/lib/dev-portal/index.d.ts +1 -1
- package/lib/dev-portal/logo.d.ts +2 -0
- package/lib/error-handlers/fallback-http-errors.d.ts +1 -0
- package/lib/error-handlers/http-error-handler.d.ts +11 -0
- package/lib/hooks/use-get-api-roles.d.ts +3 -6
- package/lib/hooks/use-manage-watch-list.d.ts +7 -0
- package/lib/hooks/use-watch-defaults.d.ts +100 -0
- package/lib/test-utils/modules.d.ts +113 -0
- package/lib/test-utils/roma-cypress-wrapper.d.ts +10 -0
- package/package.json +6 -1
- package/roma-framework.mjs +4030 -5014
- package/router-CD1QGwNJ.mjs +5907 -0
- package/lib/api/ms-graph/model/group-membership.d.ts +0 -8
- package/lib/api/ms-graph/model/user.d.ts +0 -18
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SideSheetType = {
|
|
2
|
+
sideSheetKey: string;
|
|
3
|
+
sideSheetOpenName: boolean;
|
|
4
|
+
sideSheetOpenFunction: React.Dispatch<React.SetStateAction<boolean>>;
|
|
5
|
+
};
|
|
6
|
+
export type HeaderMenus = {
|
|
7
|
+
a11yOpen: boolean;
|
|
8
|
+
setA11yOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
|
+
userMenuOpen: boolean;
|
|
10
|
+
setUserMenuOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
11
|
+
activityLogOpen: boolean;
|
|
12
|
+
setActivityLogOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AppManifest } from '@equinor/fusion-framework-module-app';
|
|
2
|
+
import { HeaderMenus } from './PortalTypes';
|
|
3
|
+
export declare const SideSheets: ({ apps, menuState, }: {
|
|
4
|
+
apps: Array<AppManifest>;
|
|
5
|
+
menuState: HeaderMenus;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AppConfig, AppManifest, IAppClient } from '@equinor/fusion-framework-module-app';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { IHttpClient } from '@equinor/fusion-framework-module-http';
|
|
4
|
+
import { FetchRequest } from '@equinor/fusion-framework-module-http/client';
|
|
5
|
+
export declare class CustomAppClient implements IAppClient {
|
|
6
|
+
#private;
|
|
7
|
+
private client;
|
|
8
|
+
getAppConfig({}: {
|
|
9
|
+
appKey: string;
|
|
10
|
+
tag?: string;
|
|
11
|
+
}): Observable<AppConfig<any>>;
|
|
12
|
+
getAppManifest({ appKey }: {
|
|
13
|
+
appKey: string;
|
|
14
|
+
}): Observable<AppManifest>;
|
|
15
|
+
getAppManifests(): Observable<never[] | AppManifest[]>;
|
|
16
|
+
getAppSettings(): Observable<{}>;
|
|
17
|
+
updateAppSettings(): Observable<{}>;
|
|
18
|
+
constructor(client: IHttpClient<FetchRequest, Response>);
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Service } from '@equinor/fusion-framework-module-service-discovery';
|
|
2
|
+
export declare class ServiceDiscoveryClient {
|
|
3
|
+
private cache;
|
|
4
|
+
private cacheTime;
|
|
5
|
+
resolveService(key: string, allow_cache?: boolean): Promise<Service>;
|
|
6
|
+
resolveServices(allow_cache?: boolean): Promise<Array<Service>>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev portal routes
|
|
3
|
+
*/
|
|
4
|
+
export declare const routes: {
|
|
5
|
+
path: string;
|
|
6
|
+
element: import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
children: {
|
|
8
|
+
path: string;
|
|
9
|
+
element: import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
}[];
|
|
11
|
+
}[];
|
|
12
|
+
export declare function App(): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default App;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export declare const EdsEventProvider: ({ event, children }: {
|
|
4
|
+
event: IEventModuleProvider;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const httpFallbackStatusMessages: Record<number, string>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type ErrorCause = {
|
|
2
|
+
message: string;
|
|
3
|
+
status: number;
|
|
4
|
+
statusText: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class HttpError extends Error {
|
|
7
|
+
message: string;
|
|
8
|
+
cause: ErrorCause;
|
|
9
|
+
constructor(message: string, cause: ErrorCause);
|
|
10
|
+
}
|
|
11
|
+
export declare function handleError<TRes>(req: Response): Promise<TRes>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parses a JWT token and returns an object with the roles contained in the token.
|
|
3
|
+
* @param token The JWT token to parse.
|
|
4
|
+
* @returns An object with the roles contained in the token.
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseJwt(token: string): {
|
|
7
|
+
roles: Array<string>;
|
|
8
|
+
};
|
|
9
|
+
export declare function useGetApiRoles(api: string, defaultEmptyArray: true): Array<string>;
|
|
10
|
+
export declare function useGetApiRoles(api: string, defaultEmptyArray: false): Array<string> | null;
|
|
11
|
+
export declare function useGetApiRoles(api: string): Array<string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks if the current user has a specified role associated with a specified API using the `useGetApiRoles` hook.
|
|
3
|
+
* @param api The name of the API to check for the specified role.
|
|
4
|
+
* @param role The name of the role to check for.
|
|
5
|
+
* @returns True if the current user has the specified role associated with the specified API, false otherwise.
|
|
6
|
+
*/
|
|
7
|
+
export declare const useHasApiRole: (api: string, role: string) => boolean;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export declare const useWatchDefaults: {
|
|
2
|
+
notificationSettings: {
|
|
3
|
+
cargo: {
|
|
4
|
+
fields: {
|
|
5
|
+
contractual: {
|
|
6
|
+
product: {
|
|
7
|
+
fieldName: string;
|
|
8
|
+
fieldLabel: string;
|
|
9
|
+
fieldEnabled: boolean;
|
|
10
|
+
};
|
|
11
|
+
quality: {
|
|
12
|
+
fieldName: string;
|
|
13
|
+
fieldLabel: string;
|
|
14
|
+
fieldEnabled: boolean;
|
|
15
|
+
};
|
|
16
|
+
contrquantity: {
|
|
17
|
+
fieldName: string;
|
|
18
|
+
fieldLabel: string;
|
|
19
|
+
fieldEnabled: boolean;
|
|
20
|
+
};
|
|
21
|
+
buyer: {
|
|
22
|
+
fieldName: string;
|
|
23
|
+
fieldLabel: string;
|
|
24
|
+
fieldEnabled: boolean;
|
|
25
|
+
};
|
|
26
|
+
seller: {
|
|
27
|
+
fieldName: string;
|
|
28
|
+
fieldLabel: string;
|
|
29
|
+
fieldEnabled: boolean;
|
|
30
|
+
};
|
|
31
|
+
incoterm: {
|
|
32
|
+
fieldName: string;
|
|
33
|
+
fieldLabel: string;
|
|
34
|
+
fieldEnabled: boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
operational: {
|
|
38
|
+
status: {
|
|
39
|
+
fieldName: string;
|
|
40
|
+
fieldLabel: string;
|
|
41
|
+
fieldEnabled: boolean;
|
|
42
|
+
};
|
|
43
|
+
loadingrange: {
|
|
44
|
+
fieldName: string;
|
|
45
|
+
fieldLabel: string;
|
|
46
|
+
fieldEnabled: boolean;
|
|
47
|
+
};
|
|
48
|
+
dischargerange: {
|
|
49
|
+
fieldName: string;
|
|
50
|
+
fieldLabel: string;
|
|
51
|
+
fieldEnabled: boolean;
|
|
52
|
+
};
|
|
53
|
+
loadport: {
|
|
54
|
+
fieldName: string;
|
|
55
|
+
fieldLabel: string;
|
|
56
|
+
fieldEnabled: boolean;
|
|
57
|
+
};
|
|
58
|
+
dischargeport: {
|
|
59
|
+
fieldName: string;
|
|
60
|
+
fieldLabel: string;
|
|
61
|
+
fieldEnabled: boolean;
|
|
62
|
+
};
|
|
63
|
+
qty: {
|
|
64
|
+
fieldName: string;
|
|
65
|
+
fieldLabel: string;
|
|
66
|
+
fieldEnabled: boolean;
|
|
67
|
+
};
|
|
68
|
+
remarks: {
|
|
69
|
+
fieldName: string;
|
|
70
|
+
fieldLabel: string;
|
|
71
|
+
fieldEnabled: boolean;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
vessel: {
|
|
75
|
+
vesselname: {
|
|
76
|
+
fieldName: string;
|
|
77
|
+
fieldLabel: string;
|
|
78
|
+
fieldEnabled: boolean;
|
|
79
|
+
};
|
|
80
|
+
eta: {
|
|
81
|
+
fieldName: string;
|
|
82
|
+
fieldLabel: string;
|
|
83
|
+
fieldEnabled: boolean;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
settings: {
|
|
88
|
+
autowatch: {
|
|
89
|
+
opsResponsible: boolean;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
watchListSettings: {
|
|
95
|
+
cargo: {
|
|
96
|
+
watched: never[];
|
|
97
|
+
unwatched: never[];
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AnyModule } from '@equinor/fusion-framework-module';
|
|
2
|
+
import { Fusion } from '@equinor/fusion-framework-react';
|
|
3
|
+
import { AppEnv, AppModuleInitiator } from '@equinor/fusion-framework-app';
|
|
4
|
+
import { default as React, ReactNode } from 'react';
|
|
5
|
+
import { ComponentRenderArgs as FusionComponentRenderArgs } from '@equinor/fusion-framework-react-app';
|
|
6
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
7
|
+
export type RomaComponentRenderArgs = FusionComponentRenderArgs & {
|
|
8
|
+
query?: QueryClient;
|
|
9
|
+
};
|
|
10
|
+
export type RomaAppModuleInitiator<TModules extends Array<AnyModule> | unknown = unknown, TRef extends Fusion = Fusion, TEnv = AppEnv> = AppModuleInitiator<TModules, TRef, TEnv>;
|
|
11
|
+
export declare const makeComponent: <TModules extends Array<AnyModule>, TRef extends Fusion = Fusion<unknown>, TEnv extends AppEnv = AppEnv>(Component: React.ReactNode, args: RomaComponentRenderArgs, configure?: RomaAppModuleInitiator<TModules, TRef, TEnv>) => React.LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
12
|
+
export declare const withStyleIsolation: (children: ReactNode, args: RomaComponentRenderArgs) => React.LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
2
|
+
import { Path } from '@equinor/fusion-framework-module-navigation';
|
|
3
|
+
import { NavigationType } from 'react-router-dom';
|
|
4
|
+
import { Action } from '@remix-run/router/history';
|
|
5
|
+
import { AccountInfo } from '@equinor/fusion-framework-module-msal';
|
|
6
|
+
import { AuthClient, AuthRequest } from '@equinor/fusion-framework-module-msal/client';
|
|
7
|
+
import { Service } from '@equinor/fusion-framework-module-service-discovery';
|
|
8
|
+
import { ServerSentEvent, SseConnection } from '../../../../modules/sse/src/index.ts';
|
|
9
|
+
export declare class RomaMockedServiceDiscovery {
|
|
10
|
+
readonly environment: {
|
|
11
|
+
type: string;
|
|
12
|
+
clientId: string;
|
|
13
|
+
services: never[];
|
|
14
|
+
};
|
|
15
|
+
configureClient: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
16
|
+
createClient: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
17
|
+
resolveService(key: string): Promise<Service>;
|
|
18
|
+
resolveServices(): Promise<Array<Service>>;
|
|
19
|
+
}
|
|
20
|
+
export declare class RomaMockedAuthModule {
|
|
21
|
+
readonly defaultAccount: AccountInfo;
|
|
22
|
+
readonly defaultClient: AuthClient;
|
|
23
|
+
readonly defaultConfig: {
|
|
24
|
+
tenantId: string;
|
|
25
|
+
clientId: string;
|
|
26
|
+
redirectUri: string;
|
|
27
|
+
config: {};
|
|
28
|
+
};
|
|
29
|
+
acquireAccessToken(req: AuthRequest): Promise<string | undefined>;
|
|
30
|
+
acquireToken(req: AuthRequest): ReturnType<AuthClient['acquireToken']>;
|
|
31
|
+
createClient(name?: string): AuthClient;
|
|
32
|
+
getClient(name: string): AuthClient;
|
|
33
|
+
handleRedirect(): ReturnType<AuthClient['handleRedirectPromise']>;
|
|
34
|
+
login(): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
declare class Navigator {
|
|
37
|
+
basename: string;
|
|
38
|
+
origin: string;
|
|
39
|
+
value: {
|
|
40
|
+
action: Action;
|
|
41
|
+
location: null;
|
|
42
|
+
delta: null;
|
|
43
|
+
};
|
|
44
|
+
location: null;
|
|
45
|
+
action: NavigationType;
|
|
46
|
+
createHref: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
47
|
+
createURL: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
48
|
+
encodeLocation: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
49
|
+
push: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
50
|
+
replace: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
51
|
+
go: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
52
|
+
listen: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
53
|
+
}
|
|
54
|
+
export declare class RomaMockedNavigationModule {
|
|
55
|
+
dispose: Cypress.Agent<import('cypress/types/sinon').SinonStub<any[], any>>;
|
|
56
|
+
readonly navigator: Navigator;
|
|
57
|
+
readonly path: {
|
|
58
|
+
pathname: string;
|
|
59
|
+
search: string;
|
|
60
|
+
hash: string;
|
|
61
|
+
};
|
|
62
|
+
readonly state$: Observable<{
|
|
63
|
+
action: Action;
|
|
64
|
+
location: Path;
|
|
65
|
+
}>;
|
|
66
|
+
createHref: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
67
|
+
createRouter: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
68
|
+
createURL: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
69
|
+
push: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
70
|
+
replace: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
71
|
+
}
|
|
72
|
+
export declare class RomaMockedHttpClient {
|
|
73
|
+
hasClient(): boolean;
|
|
74
|
+
createClient(): {
|
|
75
|
+
fetch: (url: string, options?: RequestInit) => Promise<Response>;
|
|
76
|
+
fetch$(path: string, init: any): Observable<Response>;
|
|
77
|
+
fetchAsync(path: string, args: any): Promise<Response>;
|
|
78
|
+
blob(path: string, args: any): Promise<Blob>;
|
|
79
|
+
blob$(path: string, args: any): Observable<Blob>;
|
|
80
|
+
json(path: string, init: any): Promise<any>;
|
|
81
|
+
json$(path: string, init: any): Observable<any>;
|
|
82
|
+
jsonAsync<T>(path: string, args: any): Promise<T>;
|
|
83
|
+
uri: string;
|
|
84
|
+
};
|
|
85
|
+
createCustomClient(): {
|
|
86
|
+
fetch: (url: string, options?: RequestInit) => Promise<Response>;
|
|
87
|
+
fetch$(path: string, init: any): Observable<Response>;
|
|
88
|
+
fetchAsync(path: string, args: any): Promise<Response>;
|
|
89
|
+
blob(path: string, args: any): Promise<Blob>;
|
|
90
|
+
blob$(path: string, args: any): Observable<Blob>;
|
|
91
|
+
json(path: string, init: any): Promise<any>;
|
|
92
|
+
json$(path: string, init: any): Observable<any>;
|
|
93
|
+
jsonAsync<T>(path: string, args: any): Promise<T>;
|
|
94
|
+
uri: string;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
declare class Connection implements SseConnection {
|
|
98
|
+
abort: AbortController;
|
|
99
|
+
messageList: BehaviorSubject<Array<ServerSentEvent>>;
|
|
100
|
+
private interval$;
|
|
101
|
+
messageList$: any;
|
|
102
|
+
setAllRead(): Promise<void>;
|
|
103
|
+
setReadState: Cypress.Omit<import('cypress/types/sinon').SinonStub<any[], any>, "withArgs"> & Cypress.SinonSpyAgent<import('cypress/types/sinon').SinonStub<any[], any>> & import('cypress/types/sinon').SinonStub<any[], any>;
|
|
104
|
+
constructor(messages?: Array<ServerSentEvent>);
|
|
105
|
+
}
|
|
106
|
+
export declare class RomaMockedSseModule {
|
|
107
|
+
messageList: Array<ServerSentEvent>;
|
|
108
|
+
connections: Record<string, any>;
|
|
109
|
+
connect(name: string): Connection;
|
|
110
|
+
private createConnection;
|
|
111
|
+
constructor(messageList?: Array<ServerSentEvent>);
|
|
112
|
+
}
|
|
113
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { MountOptions } from 'cypress/react18';
|
|
3
|
+
import { ServerSentEvent } from '../../../../modules/sse/src/index.ts';
|
|
4
|
+
type RomaMountOptions = MountOptions & {
|
|
5
|
+
moduleConfig?: {
|
|
6
|
+
events?: Array<ServerSentEvent>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export declare const mount: (component: ReactNode, options?: RomaMountOptions) => Cypress.Chainable<import('cypress/react18').MountReturn>;
|
|
10
|
+
export {};
|
package/dev-portal/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/roma-framework",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"repository": "https://github.com/equinor/tops-roma",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"private": false,
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
".": {
|
|
12
12
|
"import": "./roma-framework.mjs",
|
|
13
13
|
"require": "./roma-framework.js"
|
|
14
|
+
},
|
|
15
|
+
"./cypress": {
|
|
16
|
+
"import": "./cypress.mjs",
|
|
17
|
+
"require": "./cypress.js",
|
|
18
|
+
"types": "./lib/test-utils/roma-cypress-wrapper.d.ts"
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
}
|