@equinor/subsurface-app-management 4.4.3 → 5.1.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/index.d.ts +2 -1
- package/dist/api/models/Faq.d.ts +9 -3
- package/dist/api/models/FaqCategoriesWithFaqDto.d.ts +13 -0
- package/dist/api/models/FaqDto.d.ts +11 -0
- package/dist/api/services/FaqService.d.ts +3 -3
- package/dist/components/FeatureRoute/FeatureRoute.js +1 -1
- package/dist/providers/TutorialProvider/TutorialProvider.js +1 -1
- package/package.json +3 -8
- package/dist/api/models/FaqCategory.d.ts +0 -10
package/dist/api/index.d.ts
CHANGED
|
@@ -23,7 +23,8 @@ export type { StepDto } from './models/StepDto';
|
|
|
23
23
|
export { TutorialPosition } from './models/TutorialPosition';
|
|
24
24
|
export type { MyFeatureDto } from './models/MyFeatureDto';
|
|
25
25
|
export type { Faq } from './models/Faq';
|
|
26
|
-
export type {
|
|
26
|
+
export type { FaqDto } from './models/FaqDto';
|
|
27
|
+
export type { FaqCategoriesWithFaqDto } from './models/FaqCategoriesWithFaqDto';
|
|
27
28
|
export { AmplifyApplicationService } from './services/AmplifyApplicationService';
|
|
28
29
|
export { FeatureToggleService } from './services/FeatureToggleService';
|
|
29
30
|
export { ImpersonateUserService } from './services/ImpersonateUserService';
|
package/dist/api/models/Faq.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
export type Faq = {
|
|
2
|
+
updatedBy?: string | null;
|
|
3
|
+
updatedByName?: string | null;
|
|
4
|
+
updatedDate?: string | null;
|
|
5
|
+
createdBy: string;
|
|
6
|
+
createdByName: string;
|
|
7
|
+
createdDate: string;
|
|
2
8
|
id: number;
|
|
3
9
|
question: string;
|
|
4
10
|
answer: string;
|
|
11
|
+
visible: boolean;
|
|
5
12
|
orderBy?: number | null;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
createdDate?: string | null;
|
|
13
|
+
roles?: Array<string> | null;
|
|
14
|
+
categoryId: number;
|
|
9
15
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FaqDto } from './FaqDto';
|
|
2
|
+
export type FaqCategoriesWithFaqDto = {
|
|
3
|
+
id: number;
|
|
4
|
+
fkParentCategoryId: number;
|
|
5
|
+
categoryName: string;
|
|
6
|
+
orderBy?: number | null;
|
|
7
|
+
visible: boolean;
|
|
8
|
+
applicationId: string;
|
|
9
|
+
faqs?: Array<FaqDto> | null;
|
|
10
|
+
updatedDate?: string | null;
|
|
11
|
+
createdDate?: string | null;
|
|
12
|
+
subCategories?: Array<FaqCategoriesWithFaqDto> | null;
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type FaqDto = {
|
|
2
|
+
id: number;
|
|
3
|
+
question?: string | null;
|
|
4
|
+
answer?: string | null;
|
|
5
|
+
visible?: boolean | null;
|
|
6
|
+
orderBy?: number | null;
|
|
7
|
+
roles?: Array<string> | null;
|
|
8
|
+
categoryId: number;
|
|
9
|
+
updatedDate?: string | null;
|
|
10
|
+
createdDate?: string | null;
|
|
11
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Faq } from '../models/Faq';
|
|
2
|
-
import type { FaqCategory } from '../models/FaqCategory';
|
|
3
2
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
3
|
+
import type { FaqCategoriesWithFaqDto } from '../models/FaqCategoriesWithFaqDto';
|
|
4
4
|
export declare class FaqService {
|
|
5
5
|
/**
|
|
6
6
|
* Get FAQ categories and related FAQs based on application id
|
|
@@ -8,7 +8,7 @@ export declare class FaqService {
|
|
|
8
8
|
* @returns FaqCategory OK
|
|
9
9
|
* @throws ApiError
|
|
10
10
|
*/
|
|
11
|
-
static getCategoriesWithFaqsFromApplicationName(applicationName: string): CancelablePromise<Array<
|
|
11
|
+
static getCategoriesWithFaqsFromApplicationName(applicationName: string): CancelablePromise<Array<FaqCategoriesWithFaqDto>>;
|
|
12
12
|
/**
|
|
13
13
|
* Get FAQ image
|
|
14
14
|
* @param path
|
|
@@ -22,7 +22,7 @@ export declare class FaqService {
|
|
|
22
22
|
* @returns FaqCategory OK
|
|
23
23
|
* @throws ApiError
|
|
24
24
|
*/
|
|
25
|
-
static getFaqCategoriesFromApplicationId(applicationId: string): CancelablePromise<Array<
|
|
25
|
+
static getFaqCategoriesFromApplicationId(applicationId: string): CancelablePromise<Array<FaqCategoriesWithFaqDto>>;
|
|
26
26
|
/**
|
|
27
27
|
* Get FAQs from category id
|
|
28
28
|
* @param categoryId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Navigate as r}from"@tanstack/react-router";import{useFeatureToggling as e}from"../../hooks/useFeatureToggling.js";const o=({element:o,...n})=>{const{showContent:a}=e({...n});if(a)return o;if("fallback"in n)return n.fallback;const c="redirectPath"in n&&n.redirectPath?n.redirectPath:"/";return t(r,{replace:!0,to:c})};export{o as FeatureRoute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{createContext as r,useState as i,useMemo as t,useContext as e}from"react";import{
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{createContext as r,useState as i,useMemo as t,useContext as e}from"react";import{useMatchRoute as s}from"@tanstack/react-router";import{useSeenTutorials as a}from"./useSeenTutorials.js";import"../FeatureToggleProvider.js";import"@tanstack/react-query";import"../../api/core/OpenAPI.js";import{useTutorialsQuery as n}from"../../hooks/useTutorialsQuery.js";import"@microsoft/signalr";import"../../api/models/ApplicationCategory.js";import"../../api/models/ServiceNowUrgency.js";import"../../api/models/TutorialPosition.js";import"../../types/Environment.js";import{usePrefetchTutorialStepImages as u}from"./hooks/usePrefetchTutorialStepImages.js";const p=r(void 0);function d(){const o=e(p);if(void 0===o)throw new Error("'useTutorials' must be used within provider");return o}const l=({children:r})=>{const{data:e=[]}=n(),[d,l]=i(void 0),[c,m]=i(void 0),[v,f]=a();u();const T=s(),h=t((()=>e?.filter((o=>T({to:o.path})))),[T,e]),w=t((()=>h?.filter((o=>!v.includes(o.id)&&o.willPopUp))),[v,h]);return o(p.Provider,{value:{allTutorials:e,tutorialsOnThisPage:h,unseenTutorialsOnThisPage:w,activeTutorial:d,activeStep:c,seenTutorialIDs:v,startTutorial:o=>{if(!e?.some((r=>o===r.id)))throw new Error("Tutorial not found");l(e.find((r=>o===r.id))),m(0)},skipTutorial:o=>{d&&d.id===o&&(l(void 0),m(void 0)),f(o)},goToNextStep:()=>{if(!d)throw new Error("No currently active tutorial!");if(void 0===c)throw new Error("activeStep is undefined!");c+1>=d.steps.length?(f(d.id),l(void 0),m(void 0)):m(c+1)},goToPreviousStep:()=>{if(!d)throw new Error("No currently active tutorial!");if(void 0===c)throw new Error("activeStep is undefined!");0===c?(l(void 0),m(void 0)):m(c-1)}},children:r})};export{p as TutorialDataContext,l as TutorialProvider,d as useTutorials};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/subsurface-app-management",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "React Typescript components/hooks to communicate with equinor/sam",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
"@types/node": "^22.10.2",
|
|
74
74
|
"@types/react": "^19.0.1",
|
|
75
75
|
"@types/react-dom": "^19.0.2",
|
|
76
|
-
"@types/react-router-dom": "^5.3.3",
|
|
77
76
|
"@vitejs/plugin-react": "^4.3.4",
|
|
78
77
|
"@vitest/coverage-v8": "^2.1.8",
|
|
79
78
|
"eslint": "^9.17.0",
|
|
@@ -87,15 +86,12 @@
|
|
|
87
86
|
"prettier": "^3.4.2",
|
|
88
87
|
"react": "^18.3.1",
|
|
89
88
|
"react-dom": "^18.3.1",
|
|
90
|
-
"react-router": "^6.27.0",
|
|
91
|
-
"react-router-dom": "^6.27.0",
|
|
92
89
|
"resolve-tspaths": "^0.8.23",
|
|
93
90
|
"rollup": "^4.28.1",
|
|
94
91
|
"rollup-plugin-delete": "^2.1.0",
|
|
95
92
|
"rollup-plugin-import-css": "^3.5.8",
|
|
96
93
|
"storybook": "^8.4.7",
|
|
97
94
|
"storybook-addon-react-docgen": "^1.2.44",
|
|
98
|
-
"storybook-addon-remix-react-router": "^3.0.2",
|
|
99
95
|
"typescript": "^5.7.2",
|
|
100
96
|
"typescript-eslint": "^8.18.1",
|
|
101
97
|
"vite": "^5.4.10",
|
|
@@ -104,10 +100,9 @@
|
|
|
104
100
|
},
|
|
105
101
|
"peerDependencies": {
|
|
106
102
|
"@tanstack/react-query": "*",
|
|
103
|
+
"@tanstack/react-router": "*",
|
|
107
104
|
"react": "^19.0.0",
|
|
108
|
-
"react-dom": "^19.0.0"
|
|
109
|
-
"react-router": "^6.11.1",
|
|
110
|
-
"react-router-dom": "^6.11.1"
|
|
105
|
+
"react-dom": "^19.0.0"
|
|
111
106
|
},
|
|
112
107
|
"dependencies": {
|
|
113
108
|
"@microsoft/applicationinsights-clickanalytics-js": "^3.3.6",
|