@equinor/subsurface-app-management 2.5.1 → 3.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/dist/api/models/ImpersonateUserDto.d.ts +1 -1
- package/dist/api/models/ImpersonateUserUpdateDto.d.ts +1 -0
- package/dist/api/services/ImpersonateUserService.js +1 -1
- package/dist/providers/TutorialProvider/TutorialProvider.d.ts +1 -0
- package/dist/providers/TutorialProvider/TutorialProvider.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{OpenAPI_SAM_Prod as e}from"../core/OpenAPI.js";import{request as r}from"../core/request.js";class t{static getApiV1ImpersonateUser(){return r(e,{method:"GET",url:"/api/v1/ImpersonateUser",errors:{400:"Bad Request",500:"Server Error"}})}static createImpersonateUser(t){return r(e,{method:"POST",url:"/api/v1/ImpersonateUser",body:t,mediaType:"application/json-patch+json",errors:{400:"Bad Request",404:"Not Found",500:"Server Error"}})}static putImpersonateUser(t){return r(e,{method:"PUT",url:"/api/v1/ImpersonateUser",body:t,mediaType:"application/json-patch+json",errors:{400:"Bad Request"}})}static getApiV1ImpersonateUserGetImpersonateUserForApp(t){return r(e,{method:"GET",url:"/api/v1/ImpersonateUser/GetImpersonateUserForApp/{appName}",path:{appName:t},errors:{400:"Bad Request",500:"Server Error"}})}static getAllActiveUsers(){return r(e,{method:"GET",url:"/api/v1/ImpersonateUser/ActiveUsers",errors:{400:"Bad Request",500:"Server Error"}})}static getActiveUser(){return r(e,{method:"GET",url:"/api/v1/ImpersonateUser/ActiveUser",errors:{400:"Bad Request",500:"Server Error"}})}static getImpersonateUserById(t){return r(e,{method:"GET",url:"/api/v1/ImpersonateUser/ImpersonateUser",query:{id:t},errors:{400:"Bad Request",500:"Server Error"}})}static getImpersonateUserByUserName(t){return r(e,{method:"GET",url:"/api/v1/ImpersonateUser/ImpersonateUserByUserName",query:{username:t},errors:{400:"Bad Request",500:"Server Error"}})}static canImpersonate(){return r(e,{method:"GET",url:"/api/v1/ImpersonateUser/CanImpersonate",errors:{400:"Bad Request",404:"Not Found",500:"Server Error"}})}static startImpersonating(t){return r(e,{method:"PUT",url:"/api/v1/ImpersonateUser/StartImpersonating",query:{username:t},errors:{400:"Bad Request",404:"Not Found",500:"Server Error"}})}static stopImpersonating(){return r(e,{method:"PUT",url:"/api/v1/ImpersonateUser/StopImpersonating",errors:{400:"Bad Request",404:"Not Found",500:"Server Error"}})}static deleteImpersonationUser(t){return r(e,{method:"DELETE",url:"/api/v1/ImpersonateUser/DeleteImpersonationUser",query:{impersonationUserId:t},errors:{400:"Bad Request",404:"Not Found",500:"Server Error"}})}}export{t as ImpersonateUserService};
|
|
@@ -4,6 +4,7 @@ interface TutorialContextType {
|
|
|
4
4
|
allTutorials: MyTutorialDto[];
|
|
5
5
|
tutorialsOnThisPage: MyTutorialDto[];
|
|
6
6
|
unseenTutorialsOnThisPage: MyTutorialDto[];
|
|
7
|
+
seenTutorialIDs: string[];
|
|
7
8
|
activeTutorial: MyTutorialDto | undefined;
|
|
8
9
|
startTutorial: (tutorialId: string) => void;
|
|
9
10
|
skipTutorial: (tutorialId: string) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{createContext as o,useContext as t,useState as i,useMemo as e}from"react";import{useLocation as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{createContext as o,useContext as t,useState as i,useMemo as e}from"react";import{useLocation as s,matchPath as n}from"react-router";import{useSeenTutorials as a}from"./useSeenTutorials.js";import"../FeatureToggleProvider.js";import"@tanstack/react-query";import"../../api/core/OpenAPI.js";import{useTutorialsQuery as u}from"../../hooks/useTutorialsQuery.js";import{usePrefetchTutorialStepImages as d}from"./hooks/usePrefetchTutorialStepImages.js";const l=o(void 0);function p(){const r=t(l);if(void 0===r)throw new Error("'useTutorials' must be used within provider");return r}const c=({children:o})=>{const{pathname:t}=s(),{data:p=[]}=u(),[c,v]=i(void 0),[f,m]=i(void 0),[h,T]=a();d();const w=e((()=>p?.filter((r=>null!==n(r.path,t)))),[t,p]),g=e((()=>w?.filter((r=>!h.includes(r.id)&&r.willPopUp))),[h,w]);return r(l.Provider,{value:{allTutorials:p,tutorialsOnThisPage:w,unseenTutorialsOnThisPage:g,activeTutorial:c,activeStep:f,seenTutorialIDs:h,startTutorial:r=>{if(!p?.some((o=>r===o.id)))throw new Error("Tutorial not found");v(p.find((o=>r===o.id))),m(0)},skipTutorial:r=>{c&&c.id===r&&(v(void 0),m(void 0)),T(r)},goToNextStep:()=>{if(!c)throw new Error("No currently active tutorial!");if(void 0===f)throw new Error("activeStep is undefined!");f+1>=c.steps.length?(T(c.id),v(void 0),m(void 0)):m(f+1)},goToPreviousStep:()=>{if(!c)throw new Error("No currently active tutorial!");if(void 0===f)throw new Error("activeStep is undefined!");0===f?(v(void 0),m(void 0)):m(f-1)}},children:o})};export{l as TutorialDataContext,c as TutorialProvider,p as useTutorials};
|