@equinor/roma-framework 0.0.12 → 1.0.0-BETA.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 (39) hide show
  1. package/dev-portal/package.json +1 -1
  2. package/dev-portal/roma-framework.umd.js +8277 -7225
  3. package/package.json +1 -1
  4. package/roma-framework.mjs +135 -8
  5. package/index.d.ts +0 -12
  6. package/lib/api/roma/api/app-controller/app-controller.d.ts +0 -94
  7. package/lib/api/roma/api/category-controller/category-controller.d.ts +0 -94
  8. package/lib/api/roma/api/environment-controller/environment-controller.d.ts +0 -27
  9. package/lib/api/roma/api/roma-configuration-controller/roma-configuration-controller.d.ts +0 -162
  10. package/lib/api/roma/api/server-side-event-controller/server-side-event-controller.d.ts +0 -21
  11. package/lib/api/roma/api/service-controller/service-controller.d.ts +0 -94
  12. package/lib/api/roma/api/setting-controller/setting-controller.d.ts +0 -261
  13. package/lib/api/roma/index.d.ts +0 -8
  14. package/lib/api/roma/model/appDto.d.ts +0 -20
  15. package/lib/api/roma/model/categoryDto.d.ts +0 -13
  16. package/lib/api/roma/model/environmentDto.d.ts +0 -10
  17. package/lib/api/roma/model/getAllRomaConfigurationTypes200Item.d.ts +0 -11
  18. package/lib/api/roma/model/index.d.ts +0 -19
  19. package/lib/api/roma/model/romaConfigurationDto.d.ts +0 -8
  20. package/lib/api/roma/model/romaConfigurationDtoValue.d.ts +0 -8
  21. package/lib/api/roma/model/serverSentEventActivityLogDto.d.ts +0 -8
  22. package/lib/api/roma/model/serverSentEventStandardEventDto.d.ts +0 -8
  23. package/lib/api/roma/model/serviceDto.d.ts +0 -16
  24. package/lib/api/roma/model/settingDto.d.ts +0 -10
  25. package/lib/api/roma/model/settingDtoValue.d.ts +0 -8
  26. package/lib/api/roma/model/versionDto.d.ts +0 -12
  27. package/lib/api/roma/use-client.d.ts +0 -34
  28. package/lib/app-provider.d.ts +0 -33
  29. package/lib/dev-portal/AppLoader.d.ts +0 -15
  30. package/lib/dev-portal/AppViewer.d.ts +0 -6
  31. package/lib/dev-portal/EquinorLoader.d.ts +0 -13
  32. package/lib/dev-portal/ErrorViewer.d.ts +0 -21
  33. package/lib/dev-portal/HttpErrorViewer.d.ts +0 -14
  34. package/lib/eds-event-provider.d.ts +0 -7
  35. package/lib/hooks/use-get-api-roles.d.ts +0 -14
  36. package/lib/hooks/use-has-api-role.d.ts +0 -7
  37. package/lib/make-component.d.ts +0 -13
  38. package/lib/query/persister.d.ts +0 -7
  39. package/lib/style-provider.d.ts +0 -8
@@ -1,21 +0,0 @@
1
- import { ReactElement, CSSProperties } from 'react';
2
-
3
- /**
4
- * Simple error display component.
5
- * Does not create a pretty error, and should most likely be recreated for various error types (e.g. lack of access etc.)
6
- * Reasonable to assume this will be a part of e.g. @equinor/roma-components in the future.
7
- *
8
- * @param error
9
- * @constructor
10
- */
11
- export declare const ErrorViewer: ({ error }: {
12
- readonly error: Error;
13
- }) => import("react/jsx-runtime").JSX.Element;
14
- type ErrorProps = {
15
- title?: string;
16
- message: string;
17
- style?: CSSProperties;
18
- actions?: ReactElement;
19
- };
20
- export declare const RomaErrorViewer: ({ style, title, message, actions, }: ErrorProps) => import("react/jsx-runtime").JSX.Element;
21
- export default ErrorViewer;
@@ -1,14 +0,0 @@
1
- import { HttpError } from '../api/fetcher';
2
-
3
- /**
4
- * Simple error display component.
5
- * Does not create a pretty error, and should most likely be recreated for various error types (e.g. lack of access etc.)
6
- * Reasonable to assume this will be a part of e.g. @equinor/roma-components in the future.
7
- *
8
- * @param error
9
- * @constructor
10
- */
11
- export declare const HttpErrorViewer: ({ error }: {
12
- readonly error: HttpError;
13
- }) => import("react/jsx-runtime").JSX.Element;
14
- export default HttpErrorViewer;
@@ -1,7 +0,0 @@
1
- import { IEventModuleProvider } from '@equinor/fusion-framework-module-event';
2
- import { ReactNode } from 'react';
3
-
4
- export declare const EdsEventProvider: ({ event, children }: {
5
- event: IEventModuleProvider;
6
- children: ReactNode;
7
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
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
- /**
10
- * Retrieves the roles associated with a specified API from fusion's service discovery module.
11
- * @param api The name of the API to retrieve roles for.
12
- * @returns An array of roles associated with the specified API.
13
- */
14
- export declare const useGetApiRoles: (api: string) => string[];
@@ -1,7 +0,0 @@
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;
@@ -1,13 +0,0 @@
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
-
8
- export type RomaComponentRenderArgs<TRef extends Fusion = Fusion, TEnv = AppEnv> = FusionComponentRenderArgs<TRef, TEnv> & {
9
- query?: QueryClient;
10
- };
11
- export type RomaAppModuleInitiator<TModules extends Array<AnyModule> | unknown = unknown, TRef extends Fusion = Fusion, TEnv = AppEnv> = AppModuleInitiator<TModules, TRef, TEnv>;
12
- export declare const makeComponent: <TModules extends AnyModule[], TRef extends Fusion<unknown> = Fusion<unknown>, TEnv extends AppEnv = AppEnv>(Component: React.ReactNode, args: RomaComponentRenderArgs<TRef, TEnv>, configure?: RomaAppModuleInitiator<TModules, TRef, TEnv> | undefined) => React.LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
13
- export declare const withStyleIsolation: (children: ReactNode, args: RomaComponentRenderArgs) => React.LazyExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -1,7 +0,0 @@
1
- import { Persister } from '@tanstack/react-query-persist-client';
2
-
3
- /**
4
- * Creates an Indexed DB persister
5
- * @see https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
6
- */
7
- export declare function createIDBPersister(idbValidKey?: IDBValidKey): Persister;
@@ -1,8 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- type Props = {
4
- scope: string;
5
- children: ReactNode;
6
- };
7
- export declare const StyleProvider: ({ scope, children }: Props) => import("react/jsx-runtime").JSX.Element;
8
- export {};