@equinor/subsurface-app-management 1.1.7 → 1.1.8

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.
@@ -0,0 +1 @@
1
+ export * from './queryKeys';
@@ -0,0 +1,4 @@
1
+ export declare const GET_FEATURE_TOGGLES_FOR_APP = "getFeatureToggleFromAppName";
2
+ export declare const GET_TUTORIALS_FOR_APP = "getTutorialsForApp";
3
+ export declare const GET_TUTORIALS_SAS_TOKEN = "getTutorialsSasToken";
4
+ export declare const SAM_QUERIES: string[];
@@ -0,0 +1 @@
1
+ const e="getFeatureToggleFromAppName",o="getTutorialsForApp",t="getTutorialsSasToken",r=[e,o,t];export{e as GET_FEATURE_TOGGLES_FOR_APP,o as GET_TUTORIALS_FOR_APP,t as GET_TUTORIALS_SAS_TOKEN,r as SAM_QUERIES};
package/dist/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './providers';
4
4
  export * from './types';
5
5
  export * from './utils';
6
6
  export * from './api';
7
+ export * from './constants';
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";
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 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as o}from"react";import{useQuery as t}from"@tanstack/react-query";import{FeatureToggleService as i}from"../api/services/FeatureToggleService.js";import*as n from"../utils/environment.js";import{getEnvironmentName as a}from"../utils/environment.js";const{getAppName:m}=n,s=(e,r)=>!!(e&&r&&r.length>0)&&r.map((e=>e.mail.toLowerCase())).includes(e.toLowerCase()),p=r(void 0);function u(){const e=o(p);if(void 0===e)throw new Error("'useFeatureToggleContext' must be used within provider");return e}const c=({children:r,loadingComponent:o,overrideAppName:n,overrideEnvironment:s})=>{const u=n??m(import.meta.env.VITE_NAME),c=s??a(import.meta.env.VITE_ENVIRONMENT_NAME),{data:g,isLoading:v,isError:d}=t({queryKey:["getFeatureToggleFromAppName"],queryFn:async()=>i.getFeatureToggleFromApplicationName(u)});return v&&o?o:e(p.Provider,{value:{features:g?.features,isLoading:v,isError:d,environmentName:c},children:r})};export{c as FeatureToggleProvider,s as isUserInActiveUserArray,u as useFeatureToggleContext};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as r,useContext as o}from"react";import{useQuery as t}from"@tanstack/react-query";import{FeatureToggleService as i}from"../api/services/FeatureToggleService.js";import{GET_FEATURE_TOGGLES_FOR_APP as n}from"../constants/queryKeys.js";import*as m from"../utils/environment.js";import{getEnvironmentName as a}from"../utils/environment.js";const{getAppName:s}=m,p=(e,r)=>!!(e&&r&&r.length>0)&&r.map((e=>e.mail.toLowerCase())).includes(e.toLowerCase()),u=r(void 0);function c(){const e=o(u);if(void 0===e)throw new Error("'useFeatureToggleContext' must be used within provider");return e}const v=({children:r,loadingComponent:o,overrideAppName:m,overrideEnvironment:p})=>{const c=m??s(import.meta.env.VITE_NAME),v=p??a(import.meta.env.VITE_ENVIRONMENT_NAME),{data:d,isLoading:l,isError:g}=t({queryKey:[n],queryFn:async()=>i.getFeatureToggleFromApplicationName(c)});return l&&o?o:e(u.Provider,{value:{features:d?.features,isLoading:l,isError:g,environmentName:v},children:r})};export{v as FeatureToggleProvider,p as isUserInActiveUserArray,c as useFeatureToggleContext};
@@ -3,5 +3,3 @@ export declare const DIALOG_EDGE_MARGIN = 24;
3
3
  export declare const TUTORIAL_SEARCH_PARAM_KEY = "tutorial";
4
4
  export declare const TUTORIAL_LOCALSTORAGE_VALUE_STRING = "hasCompletedTutorial";
5
5
  export declare const TUTORIAL_HIGHLIGHTER_DATATEST_ID = "tutorial-highlighter";
6
- export declare const GET_TUTORIALS_FOR_APP = "getTutorialsForApp";
7
- export declare const GET_TUTORIALS_SAS_TOKEN = "getTutorialsSasToken";
@@ -1 +1 @@
1
- const t=8,o=24,r="tutorial",a="hasCompletedTutorial",e="tutorial-highlighter",i="getTutorialsForApp",l="getTutorialsSasToken";export{o as DIALOG_EDGE_MARGIN,i as GET_TUTORIALS_FOR_APP,l as GET_TUTORIALS_SAS_TOKEN,t as HIGHLIGHT_PADDING,e as TUTORIAL_HIGHLIGHTER_DATATEST_ID,a as TUTORIAL_LOCALSTORAGE_VALUE_STRING,r as TUTORIAL_SEARCH_PARAM_KEY};
1
+ const t=8,o=24,i="tutorial",l="hasCompletedTutorial",r="tutorial-highlighter";export{o as DIALOG_EDGE_MARGIN,t as HIGHLIGHT_PADDING,r as TUTORIAL_HIGHLIGHTER_DATATEST_ID,l as TUTORIAL_LOCALSTORAGE_VALUE_STRING,i as TUTORIAL_SEARCH_PARAM_KEY};
@@ -1 +1 @@
1
- import{useContext as r}from"react";import{useQuery as o}from"@tanstack/react-query";import{GET_TUTORIALS_FOR_APP as t,GET_TUTORIALS_SAS_TOKEN as e}from"./TutorialProvider.const.js";import{TutorialService as i}from"../../api/services/TutorialService.js";import{TutorialContext as u}from"./TutorialProvider.js";const a=r=>o({queryKey:[t,r],queryFn:()=>i.getTutorialsForApplication(r)}),s=()=>o({queryKey:[e],queryFn:()=>i.getTutorialSasToken()}),m=()=>{const o=r(u);if(void 0===o)throw new Error("'useTutorial' must be used within a TutorialProvider");return o};export{s as useGetTutorialSasToken,a as useGetTutorialsForApp,m as useTutorial};
1
+ import{useContext as r}from"react";import{useQuery as o}from"@tanstack/react-query";import{TutorialService as t}from"../../api/services/TutorialService.js";import{GET_TUTORIALS_FOR_APP as e,GET_TUTORIALS_SAS_TOKEN as i}from"../../constants/queryKeys.js";import{TutorialContext as s}from"./TutorialProvider.js";const u=r=>o({queryKey:[e,r],queryFn:()=>t.getTutorialsForApplication(r)}),a=()=>o({queryKey:[i],queryFn:()=>t.getTutorialSasToken()}),n=()=>{const o=r(s);if(void 0===o)throw new Error("'useTutorial' must be used within a TutorialProvider");return o};export{a as useGetTutorialSasToken,u as useGetTutorialsForApp,n as useTutorial};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/subsurface-app-management",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "React Typescript components/hooks to communicate with equinor/sam",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",