@equinor/subsurface-app-management 1.1.19 → 1.1.20

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/index.js CHANGED
@@ -1 +1 @@
1
- export{Feature}from"./components/Feature/Feature.js";export{FeatureToggleProvider,useFeatureToggleContext}from"./providers/FeatureToggleProvider.js";export{useFeatureToggling}from"./hooks/useFeatureToggling.js";export{useReleaseNotesQuery}from"./hooks/useReleaseNotesQuery.js";export{TutorialProvider}from"./providers/TutorialProvider/TutorialProvider.js";export{EnvironmentType}from"./types/Environment.js";export{RELEASENOTE_TYPES_INFORMATION,ReleaseNoteType}from"./types/ReleaseNotes.js";import*as e from"./utils/environment.js";export{e as environment};export{ApiError}from"./api/core/ApiError.js";export{CancelError,CancelablePromise}from"./api/core/CancelablePromise.js";export{OpenAPI_SAM,getPortalToken}from"./api/core/OpenAPI.js";export{request}from"./api/core/request.js";export{ApplicationCategory}from"./api/models/ApplicationCategory.js";export{ServiceNowUrgency}from"./api/models/ServiceNowUrgency.js";export{TutorialPosition}from"./api/models/TutorialPosition.js";export{AmplifyApplicationService}from"./api/services/AmplifyApplicationService.js";export{FeatureToggleService}from"./api/services/FeatureToggleService.js";export{ImpersonateUserService}from"./api/services/ImpersonateUserService.js";export{ReleaseNotesService}from"./api/services/ReleaseNotesService.js";export{ServiceNowService}from"./api/services/ServiceNowService.js";export{SlackService}from"./api/services/SlackService.js";export{TutorialService}from"./api/services/TutorialService.js";export{GET_FEATURE_TOGGLES_FOR_APP,GET_TUTORIALS_FOR_APP,GET_TUTORIALS_SAS_TOKEN,SAM_QUERIES}from"./constants/queryKeys.js";
1
+ export{Feature}from"./components/Feature/Feature.js";export{FeatureToggleProvider,useFeatureToggleContext}from"./providers/FeatureToggleProvider.js";export{useFeatureToggling}from"./hooks/useFeatureToggling.js";export{useReleaseNotesQuery}from"./hooks/useReleaseNotesQuery.js";export{TutorialProvider}from"./providers/TutorialProvider/TutorialProvider.js";export{useTutorial}from"./providers/TutorialProvider/TutorialProvider.hooks.js";export{EnvironmentType}from"./types/Environment.js";export{RELEASENOTE_TYPES_INFORMATION,ReleaseNoteType}from"./types/ReleaseNotes.js";import*as e from"./utils/environment.js";export{e as environment};export{ApiError}from"./api/core/ApiError.js";export{CancelError,CancelablePromise}from"./api/core/CancelablePromise.js";export{OpenAPI_SAM,getPortalToken}from"./api/core/OpenAPI.js";export{request}from"./api/core/request.js";export{ApplicationCategory}from"./api/models/ApplicationCategory.js";export{ServiceNowUrgency}from"./api/models/ServiceNowUrgency.js";export{TutorialPosition}from"./api/models/TutorialPosition.js";export{AmplifyApplicationService}from"./api/services/AmplifyApplicationService.js";export{FeatureToggleService}from"./api/services/FeatureToggleService.js";export{ImpersonateUserService}from"./api/services/ImpersonateUserService.js";export{ReleaseNotesService}from"./api/services/ReleaseNotesService.js";export{ServiceNowService}from"./api/services/ServiceNowService.js";export{SlackService}from"./api/services/SlackService.js";export{TutorialService}from"./api/services/TutorialService.js";export{GET_FEATURE_TOGGLES_FOR_APP,GET_TUTORIALS_FOR_APP,GET_TUTORIALS_SAS_TOKEN,SAM_QUERIES}from"./constants/queryKeys.js";
@@ -1,5 +1,8 @@
1
1
  import { Query } from '@tanstack/react-query';
2
2
  export declare const useGetTutorialsForApp: (appName: string) => import("@tanstack/react-query").UseQueryResult<import("../..").Tutorial[], Error>;
3
3
  export declare const useGetTutorialSasToken: () => import("@tanstack/react-query").UseQueryResult<string, Error>;
4
+ /**
5
+ * Use with caution. There has not been much testing of how using this hook in an app affects the tutorial logic
6
+ */
4
7
  export declare const useTutorial: () => import("./TutorialProvider").TutorialContextType;
5
8
  export declare const useIsFetchingWithTimeout: (predicateFn: (query: Query) => boolean) => boolean;
@@ -1 +1 @@
1
- import{useState as r,useEffect as t,useContext as e}from"react";import{useIsFetching as o,useQuery as i}from"@tanstack/react-query";import{TutorialService as u}from"../../api/services/TutorialService.js";import{GET_TUTORIALS_FOR_APP as s,GET_TUTORIALS_SAS_TOKEN as a}from"../../constants/queryKeys.js";import{TutorialContext as n}from"./TutorialProvider.js";const c=r=>i({queryKey:[s,r],queryFn:()=>u.getTutorialsForApplication(r)}),m=()=>i({queryKey:[a],queryFn:()=>u.getTutorialSasToken()}),p=()=>{const r=e(n);if(void 0===r)throw new Error("'useTutorial' must be used within a TutorialProvider");return r},y=e=>{const[i,u]=r(!0),s=o({predicate:e})>0;return t((()=>{const r=setTimeout((()=>{u(s)}),100);return()=>clearTimeout(r)}),[s]),i||i!==s};export{m as useGetTutorialSasToken,c as useGetTutorialsForApp,y as useIsFetchingWithTimeout,p as useTutorial};
1
+ import{useContext as r,useState as t,useEffect as e}from"react";import{useIsFetching as o,useQuery as i}from"@tanstack/react-query";import{TutorialService as u}from"../../api/services/TutorialService.js";import{GET_TUTORIALS_FOR_APP as s,GET_TUTORIALS_SAS_TOKEN as a}from"../../constants/queryKeys.js";import{TutorialContext as n}from"./TutorialProvider.js";const c=r=>i({queryKey:[s,r],queryFn:()=>u.getTutorialsForApplication(r)}),m=()=>i({queryKey:[a],queryFn:()=>u.getTutorialSasToken()}),p=()=>{const t=r(n);if(void 0===t)throw new Error("'useTutorial' must be used within a TutorialProvider");return t},y=r=>{const[i,u]=t(!0),s=o({predicate:r})>0;return e((()=>{const r=setTimeout((()=>{u(s)}),100);return()=>clearTimeout(r)}),[s]),i||i!==s};export{m as useGetTutorialSasToken,c as useGetTutorialsForApp,y as useIsFetchingWithTimeout,p as useTutorial};
@@ -1,2 +1,3 @@
1
1
  export { TutorialProvider } from './TutorialProvider/TutorialProvider';
2
2
  export { FeatureToggleProvider } from './FeatureToggleProvider';
3
+ export { useTutorial } from './TutorialProvider/TutorialProvider.hooks';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/subsurface-app-management",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "description": "React Typescript components/hooks to communicate with equinor/sam",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",