@equinor/subsurface-app-management 1.0.2 → 1.0.3
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/dist/api/core/OpenAPI.d.ts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/models/{Feature.d.ts → FeatureAPIType.d.ts} +1 -1
- package/dist/api/models/FeatureToggleDto.d.ts +2 -2
- package/dist/api/models/index.d.ts +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/providers/FeatureToggleProvider.d.ts +2 -2
- package/dist/providers/FeatureToggleProvider.js +1 -1
- package/dist/providers/TutorialProvider/TutorialProvider.hooks.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ApiRequestOptions } from './ApiRequestOptions';
|
|
2
|
-
import { CancelablePromise } from '
|
|
2
|
+
import { CancelablePromise } from './..';
|
|
3
3
|
type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
|
|
4
4
|
type Headers = Record<string, string>;
|
|
5
5
|
export type OpenAPIConfig = {
|
package/dist/api/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|
|
3
3
|
export { OpenAPI } from './core/OpenAPI';
|
|
4
4
|
export { request } from './core/request';
|
|
5
5
|
export type { OpenAPIConfig } from './core/OpenAPI';
|
|
6
|
-
export type {
|
|
6
|
+
export type { FeatureAPIType } from './models/FeatureAPIType';
|
|
7
7
|
export type { CustomTutorialStep } from './models/CustomTutorialStep';
|
|
8
8
|
export type { GenericTutorialStep } from './models/GenericTutorialStep';
|
|
9
9
|
export type { Tutorial } from './models/Tutorial';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type * from './AccessRole';
|
|
2
|
+
export type * from './Applications';
|
|
3
|
+
export type * from './CustomTutorialStep';
|
|
4
|
+
export type * from './FeatureAPIType';
|
|
5
|
+
export type * from './FeatureToggleDto';
|
|
6
|
+
export type * from './GenericTutorialStep';
|
|
7
|
+
export type * from './GraphUser';
|
|
8
|
+
export type * from './ReleaseNote';
|
|
9
|
+
export type * from './ReleaseNotePatch';
|
|
10
|
+
export type * from './ServiceNowIncidentAttachmentResponse';
|
|
11
|
+
export type * from './ServiceNowIncidentResponse';
|
|
12
|
+
export type * from './ServiceNowUrgency';
|
|
13
|
+
export type * from './Tutorial';
|
|
14
|
+
export type * from './TutorialPosition';
|
|
15
|
+
export type * from './TutorialStepBase';
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Feature}from"./components/Feature/Feature.js";export{default as AuthProvider,useAuth}from"./providers/AuthProvider/AuthProvider.js";export{default as ReleaseNotesProvider,useReleaseNotes}from"./providers/ReleaseNotesProvider.js";export{default as TutorialStepsProvider,useTutorialSteps}from"./providers/TutorialStepsProvider.js";export{useFeatureToggling}from"./hooks/useFeatureToggling.js";export{useReleaseNotesQuery}from"./hooks/useReleaseNotesQuery.js";export{useSignalRMessages}from"./hooks/useSignalRMessages.js";export{default as TutorialProvider}from"./providers/TutorialProvider/TutorialProvider.js";export{default as FeatureToggleProvider}from"./providers/FeatureToggleProvider.js";export{EnvironmentType}from"./types/Environment.js";export{RELEASENOTE_TYPES_INFORMATION,ReleaseNoteType}from"./types/ReleaseNotes.js";export{auth,environment}from"./utils/auth_environment.js";
|
|
1
|
+
export{Feature}from"./components/Feature/Feature.js";export{default as AuthProvider,useAuth}from"./providers/AuthProvider/AuthProvider.js";export{default as ReleaseNotesProvider,useReleaseNotes}from"./providers/ReleaseNotesProvider.js";export{default as TutorialStepsProvider,useTutorialSteps}from"./providers/TutorialStepsProvider.js";export{useFeatureToggling}from"./hooks/useFeatureToggling.js";export{useReleaseNotesQuery}from"./hooks/useReleaseNotesQuery.js";export{useSignalRMessages}from"./hooks/useSignalRMessages.js";export{default as TutorialProvider}from"./providers/TutorialProvider/TutorialProvider.js";export{default as FeatureToggleProvider}from"./providers/FeatureToggleProvider.js";export{EnvironmentType}from"./types/Environment.js";export{RELEASENOTE_TYPES_INFORMATION,ReleaseNoteType}from"./types/ReleaseNotes.js";export{auth,environment}from"./utils/auth_environment.js";export{PortalService}from"./api/services/PortalService.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FeatureAPIType, GraphUser } from '../api';
|
|
3
3
|
export declare const isUserInActiveUserArray: (username: string, activeUsers: GraphUser[] | undefined | null) => boolean;
|
|
4
4
|
interface FeatureToggleContextType {
|
|
5
5
|
isLoading: boolean;
|
|
6
6
|
isError: boolean;
|
|
7
|
-
features?:
|
|
7
|
+
features?: FeatureAPIType[] | null;
|
|
8
8
|
}
|
|
9
9
|
export declare function useFeatureToggleContext(): FeatureToggleContextType;
|
|
10
10
|
interface FeatureToggleProviderProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as t}from"react";import{FullPageSpinner as o}from"@equinor/amplify-components";import{useQuery as i}from"@tanstack/react-query";import{
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as t}from"react";import{FullPageSpinner as o}from"@equinor/amplify-components";import{useQuery as i}from"@tanstack/react-query";import{environment as a}from"../utils/auth_environment.js";import{PortalService as n}from"../api/services/PortalService.js";const{getAppName:m}=a,s=(e,r)=>!!(r&&r.length>0)&&r.map((e=>e.mail.toLowerCase())).includes(e.toLowerCase()),u=r(void 0);function p(){const e=t(u);if(void 0===e)throw new Error("'useFeatureToggleContext' must be used within provider");return e}const c=({children:r})=>{const t=m(import.meta.env.VITE_NAME),{data:a,isLoading:s,isError:p}=i({queryKey:["getFeatureToggleFromAppName"],queryFn:async()=>n.getFeatureToggleFromApplicationName(t)});return s?e(o,{variant:"equinor",withoutScrim:!0}):e(u.Provider,{value:{features:a?.features,isLoading:s,isError:p},children:r})};export{c as default,s as isUserInActiveUserArray,p as useFeatureToggleContext};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const useGetTutorialsForApp: () => import("@tanstack/react-query").UseQueryResult<import("
|
|
1
|
+
export declare const useGetTutorialsForApp: () => import("@tanstack/react-query").UseQueryResult<import("../..").Tutorial[], Error>;
|
|
2
2
|
export declare const useGetTutorialSasToken: () => import("@tanstack/react-query").UseQueryResult<string, Error>;
|
|
3
3
|
export declare const useTutorial: () => import("./TutorialProvider").TutorialContextType;
|
package/dist/types/index.d.ts
CHANGED