@equinor/subsurface-app-management 1.1.1 → 1.1.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.
@@ -4,6 +4,9 @@ export { OpenAPI_SAM, getPortalToken } from './core/OpenAPI';
4
4
  export { request } from './core/request';
5
5
  export type { OpenAPIConfig } from './core/OpenAPI';
6
6
  export type { AmplifyApplication } from './models/AmplifyApplication';
7
+ export { ApplicationCategory } from './models/ApplicationCategory';
8
+ export type { ContentTab } from './models/ContentTab';
9
+ export type { AccessRoles } from './models/AccessRoles';
7
10
  export type { FeatureAPIType } from './models/FeatureAPIType';
8
11
  export type { FeatureToggleDto } from './models/FeatureToggleDto';
9
12
  export type { GraphUser } from './models/GraphUser';
@@ -0,0 +1 @@
1
+ var n;!function(n){n.JSDigitalFrontrunner="JS Digital Frontrunner",n.Upscaling="Upscaling",n.Toolbox="Toolbox",n.External="External"}(n||(n={}));export{n as ApplicationCategory};
@@ -6,22 +6,12 @@ export declare class SlackService {
6
6
  * @returns any Success
7
7
  * @throws ApiError
8
8
  */
9
- static fileUpload(formData?: {
10
- ContentType?: string;
11
- ContentDisposition?: string;
12
- Headers?: Record<string, Array<string>>;
13
- Length?: number;
14
- Name?: string;
15
- FileName?: string;
16
- comment?: string;
17
- }): CancelablePromise<any>;
9
+ static fileUpload(formData?: FormData): CancelablePromise<unknown>;
18
10
  /**
19
- * Creates a message in the slack channel defined in config
11
+ * Posts a slack message to channel defined in config
20
12
  * @param formData
21
13
  * @returns any Success
22
14
  * @throws ApiError
23
15
  */
24
- static postMessage(formData?: {
25
- comment?: string;
26
- }): CancelablePromise<any>;
16
+ static postmessage(formData?: FormData): CancelablePromise<unknown>;
27
17
  }
@@ -1 +1 @@
1
- import{OpenAPI_Portal as a}from"../core/OpenAPI.js";import{request as t}from"../core/request.js";class e{static fileUpload(e){return t(a,{method:"POST",url:"/api/v1/Slack/fileUpload",formData:e,mediaType:"multipart/form-data"})}static postMessage(e){return t(a,{method:"POST",url:"/api/v1/Slack/postmessage",formData:e,mediaType:"multipart/form-data"})}}export{e as SlackService};
1
+ import{OpenAPI_Portal as e}from"../core/OpenAPI.js";import{request as o}from"../core/request.js";class r{static fileUpload(r){return o(e,{method:"POST",url:"/api/v1/Slack/fileUpload",body:r})}static postmessage(r){return o(e,{method:"POST",url:"/api/v1/Slack/postmessage",body:r})}}export{r as SlackService};
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{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";
@@ -1 +1 @@
1
- import{jsxs as t,Fragment as r,jsx as e}from"react/jsx-runtime";import{useMemo as i}from"react";import{Typography as o,Button as n}from"@equinor/eds-core-react";import{DIALOG_EDGE_MARGIN as a,TUTORIAL_LOCALSTORAGE_VALUE_STRING as l}from"./TutorialProvider.const.js";import{useGetTutorialSasToken as s,useTutorial as m}from"./TutorialProvider.hooks.js";import{DialogImage as c,DialogWrapper as p,StyledTutorialDialog as d,DialogContent as u,DialogActions as g,NavigateSteps as T}from"./TutorialProvider.styles.js";import{getBestPositionWithoutOverlap as h}from"./TutorialProvider.utils.js";import f from"./TutorialStepIndicator.js";import"../../api/core/OpenAPI.js";import"../../api/models/ServiceNowUrgency.js";import{TutorialPosition as v}from"../../api/models/TutorialPosition.js";const P=()=>{const{data:P}=s(),{activeTutorial:x,currentStep:S,setCurrentStep:j,setActiveTutorial:k,dialogRef:y,allElementsToHighlight:O,customStepComponents:$,isLastStep:R,currentStepObject:C,setAllElementsToHighlight:B,shortNameFromParams:E,viewportWidth:I,clearSearchParam:w}=m(),H=i((()=>{if(C)return C.key&&$?$.find((t=>t.key===C.key))?.element:void 0===C.key||null===C.key?t(r,{children:[e(o,{children:C.title}),e(o,{children:C.body}),C.imgUrl&&P&&e(c,{"data-testid":"tutorial-image",alt:"tutorial-image",src:`${C.imgUrl}?${P}`})]}):void 0}),[C,$,P]),L=i((()=>{if(x&&I&&O&&y.current)return x.steps[S].position?x.steps[S].position:x.dynamicPositioning?h(O[S].getBoundingClientRect(),y.current.getBoundingClientRect()):v.BOTTOM_RIGHT}),[x,I,O,y,S]),N=i((()=>{if(L&&L!==v.CENTER)switch(L){case v.TOP_LEFT:return{marginTop:`${a}px`,marginLeft:`${a}px`};case v.TOP_RIGHT:return{marginTop:`${a}px`,marginRight:`${a}px`};case v.BOTTOM_LEFT:return{marginBottom:`${a}px`,marginLeft:`${a}px`};case v.BOTTOM_RIGHT:default:return{marginBottom:`${a}px`,marginRight:`${a}px`}}}),[L]),_=()=>{E&&w(),x&&(window.localStorage.setItem(x?.shortName,l),k(void 0),y.current?.close(),j(0),B(void 0))};return e(p,{children:e(d,{"data-testid":"tutorial-dialog",ref:y,style:N??void 0,children:t(u,{children:[H,e(f,{steps:x?.steps??[],currentStep:S}),t(g,{children:[e(n,{variant:"ghost",onClick:()=>{_()},children:"Skip"}),t(T,{children:[S&&0!==S?e(n,{variant:"ghost",onClick:()=>{j((t=>t-1))},children:"Previous"}):null,e(n,{variant:"outlined",onClick:()=>{R?_():j((t=>t+1))},children:R?"Done":"Next"})]})]})]})})})};export{P as default};
1
+ import{jsxs as t,Fragment as r,jsx as e}from"react/jsx-runtime";import{useMemo as i}from"react";import{Typography as o,Button as n}from"@equinor/eds-core-react";import{DIALOG_EDGE_MARGIN as a,TUTORIAL_LOCALSTORAGE_VALUE_STRING as l}from"./TutorialProvider.const.js";import{useGetTutorialSasToken as s,useTutorial as m}from"./TutorialProvider.hooks.js";import{DialogImage as c,DialogWrapper as p,StyledTutorialDialog as d,DialogContent as u,DialogActions as g,NavigateSteps as T}from"./TutorialProvider.styles.js";import{getBestPositionWithoutOverlap as h}from"./TutorialProvider.utils.js";import f from"./TutorialStepIndicator.js";import"../../api/core/OpenAPI.js";import"../../api/models/ApplicationCategory.js";import"../../api/models/ServiceNowUrgency.js";import{TutorialPosition as v}from"../../api/models/TutorialPosition.js";const P=()=>{const{data:P}=s(),{activeTutorial:j,currentStep:x,setCurrentStep:y,setActiveTutorial:S,dialogRef:k,allElementsToHighlight:O,customStepComponents:$,isLastStep:C,currentStepObject:R,setAllElementsToHighlight:B,shortNameFromParams:E,viewportWidth:I,clearSearchParam:w}=m(),H=i((()=>{if(R)return R.key&&$?$.find((t=>t.key===R.key))?.element:void 0===R.key||null===R.key?t(r,{children:[e(o,{children:R.title}),e(o,{children:R.body}),R.imgUrl&&P&&e(c,{"data-testid":"tutorial-image",alt:"tutorial-image",src:`${R.imgUrl}?${P}`})]}):void 0}),[R,$,P]),L=i((()=>{if(j&&I&&O&&k.current)return j.steps[x].position?j.steps[x].position:j.dynamicPositioning?h(O[x].getBoundingClientRect(),k.current.getBoundingClientRect()):v.BOTTOM_RIGHT}),[j,I,O,k,x]),N=i((()=>{if(L&&L!==v.CENTER)switch(L){case v.TOP_LEFT:return{marginTop:`${a}px`,marginLeft:`${a}px`};case v.TOP_RIGHT:return{marginTop:`${a}px`,marginRight:`${a}px`};case v.BOTTOM_LEFT:return{marginBottom:`${a}px`,marginLeft:`${a}px`};case v.BOTTOM_RIGHT:default:return{marginBottom:`${a}px`,marginRight:`${a}px`}}}),[L]),_=()=>{E&&w(),j&&(window.localStorage.setItem(j?.shortName,l),S(void 0),k.current?.close(),y(0),B(void 0))};return e(p,{children:e(d,{"data-testid":"tutorial-dialog",ref:k,style:N??void 0,children:t(u,{children:[H,e(f,{steps:j?.steps??[],currentStep:x}),t(g,{children:[e(n,{variant:"ghost",onClick:()=>{_()},children:"Skip"}),t(T,{children:[x&&0!==x?e(n,{variant:"ghost",onClick:()=>{y((t=>t-1))},children:"Previous"}):null,e(n,{variant:"outlined",onClick:()=>{C?_():y((t=>t+1))},children:C?"Done":"Next"})]})]})]})})})};export{P as default};
@@ -1 +1 @@
1
- import{DIALOG_EDGE_MARGIN as T}from"./TutorialProvider.const.js";import"../../api/core/OpenAPI.js";import"../../api/models/ServiceNowUrgency.js";import{TutorialPosition as t}from"../../api/models/TutorialPosition.js";const o=(T,t)=>!(T.top>t.bottom||T.bottom<t.top||T.right<t.left||T.left>t.right),e=(o,e)=>{const i=e===t.BOTTOM_RIGHT||e===t.BOTTOM_LEFT,O=e===t.TOP_RIGHT||e===t.BOTTOM_RIGHT,r=innerWidth-T-o.width,m=innerHeight-T-o.height;return new DOMRect(O?r:T,i?m:T,o.width,o.height)},i=(T,i)=>o(T,e(i,t.BOTTOM_RIGHT))?o(T,e(i,t.BOTTOM_LEFT))?o(T,e(i,t.TOP_RIGHT))?o(T,e(i,t.TOP_LEFT))?t.BOTTOM_RIGHT:t.TOP_LEFT:t.TOP_RIGHT:t.BOTTOM_LEFT:t.BOTTOM_RIGHT,O=T=>T.steps.map(((t,o)=>document.getElementById(`${T.shortName}-${o}`)));export{O as getAllElementsToHighlight,i as getBestPositionWithoutOverlap};
1
+ import{DIALOG_EDGE_MARGIN as t}from"./TutorialProvider.const.js";import"../../api/core/OpenAPI.js";import"../../api/models/ApplicationCategory.js";import"../../api/models/ServiceNowUrgency.js";import{TutorialPosition as T}from"../../api/models/TutorialPosition.js";const o=(t,T)=>!(t.top>T.bottom||t.bottom<T.top||t.right<T.left||t.left>T.right),e=(o,e)=>{const i=e===T.BOTTOM_RIGHT||e===T.BOTTOM_LEFT,r=e===T.TOP_RIGHT||e===T.BOTTOM_RIGHT,O=innerWidth-t-o.width,p=innerHeight-t-o.height;return new DOMRect(r?O:t,i?p:t,o.width,o.height)},i=(t,i)=>o(t,e(i,T.BOTTOM_RIGHT))?o(t,e(i,T.BOTTOM_LEFT))?o(t,e(i,T.TOP_RIGHT))?o(t,e(i,T.TOP_LEFT))?T.BOTTOM_RIGHT:T.TOP_LEFT:T.TOP_RIGHT:T.BOTTOM_LEFT:T.BOTTOM_RIGHT,r=t=>t.steps.map(((T,o)=>document.getElementById(`${t.shortName}-${o}`)));export{r as getAllElementsToHighlight,i as getBestPositionWithoutOverlap};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/subsurface-app-management",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "React Typescript components/hooks to communicate with equinor/sam",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",