@equinor/amplify-component-lib 9.1.0 → 9.1.1
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.
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { IconData } from '@equinor/eds-icons';
|
|
3
|
-
interface IconItem {
|
|
3
|
+
export interface IconItem {
|
|
4
4
|
title: string;
|
|
5
5
|
icon: IconData;
|
|
6
6
|
color: string;
|
|
7
7
|
colorBox?: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
interface ElementItem {
|
|
9
|
+
export interface ElementItem {
|
|
10
10
|
title: string;
|
|
11
11
|
element: ReactNode;
|
|
12
12
|
}
|
|
13
|
-
export type GuidelineItem = IconItem | ElementItem;
|
|
14
|
-
export {};
|
|
13
|
+
export type GuidelineItem = IconItem | ElementItem | ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ImpersonateUserService as t,ApiError as
|
|
1
|
+
import{ImpersonateUserService as t,ApiError as e}from"@equinor/subsurface-app-management";import{useQuery as n}from"@tanstack/react-query";import{ACTIVE_USERIMPERSONATION as r}from"../Impersonate.constants.js";import{environment as o}from"../../../../../atoms/utils/auth_environment.js";function a(){return n({queryKey:[r],queryFn:async()=>{try{const e=await t.getActiveUser();return void 0===e?null:e}catch(t){if(t instanceof e&&(204===t.status||404===t.status))return null}},enabled:"production"!==o.getEnvironmentName(import.meta.env.VITE_ENVIRONMENT_NAME)})}export{a as useActiveImpersonationUser};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as o,Fragment as t,jsx as e}from"react/jsx-runtime";import{useState as r,useRef as i}from"react";import{Icon as
|
|
1
|
+
import{jsxs as o,Fragment as t,jsx as e}from"react/jsx-runtime";import{useState as r,useRef as i,isValidElement as n}from"react";import{Icon as c}from"@equinor/eds-core-react";import{info_circle as l}from"@equinor/eds-icons";import{TopBarButton as m}from"../TopBar.styles.js";import{TopBarMenu as s}from"../TopBarMenu.js";import{Colorbox as a}from"./Colorbox.js";import{Item as p}from"./Item.js";import{Section as d}from"./Section.js";const f=({sections:f})=>{const[h,u]=r(!1),$=i(null);return o(t,{children:[e(m,{variant:"ghost_icon",ref:$,onClick:()=>{u(!h)},"data-testid":"show-hide-button",children:e(c,{data:l})},"topbar-notifications"),e(s,{open:h,anchorEl:$.current,onClose:()=>{u(!1)},withGap:!0,children:f.map(((t,r)=>e(d,{title:t.sectionName,children:t.items.map(((t,i)=>n(t)?t:"element"in t?e(p,{title:t.title,children:t.element},`${i}-${r}`):o(p,{title:t.title,children:[t.colorBox&&e(a,{"data-testid":`color-box-${t.title}`,$color:t.color}),e(c,{data:t.icon,color:t.color,size:24})]},`${i}-${r}`)))},`section-${t.sectionName}`)))})]})};f.displayName="TopBar.Guidelines";export{f as Guidelines};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/amplify-component-lib",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"description": "Frontend Typescript components for the Amplify team",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@azure/msal-browser": "
|
|
52
|
-
"@azure/msal-react": "
|
|
51
|
+
"@azure/msal-browser": "3.28.0",
|
|
52
|
+
"@azure/msal-react": "2.2.0",
|
|
53
53
|
"@equinor/eds-core-react": "0.42.5",
|
|
54
54
|
"@equinor/eds-data-grid-react": "^0.7.4",
|
|
55
55
|
"@microsoft/signalr": "^8.0.7",
|