@equinor/amplify-component-lib 12.0.5 → 12.0.6
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/atoms/hooks/useAmplifyKit.js +1 -1
- package/dist/atoms/hooks/useSelect.d.ts +3 -3
- package/dist/atoms/utils/auth_environment.js +1 -1
- package/dist/atoms/utils/richtext.js +2 -2
- package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/molecules/Dialog/Dialog.d.ts +2 -2
- package/dist/molecules/EquinorLogo/EquinorLogo.d.ts +2 -2
- package/dist/molecules/IconCell/IconCell.js +1 -1
- package/dist/molecules/IconCell/IconCell.utils.js +2 -2
- package/dist/molecules/ListItem/ListItem.d.ts +2 -2
- package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
- package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
- package/dist/molecules/RichTextEditor/MenuBar/AddImageButton.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/Table/Table.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextAlignment.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextClearFormatting.js +3 -3
- package/dist/molecules/RichTextEditor/MenuBar/TextCode.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextColor.js +14 -14
- package/dist/molecules/RichTextEditor/MenuBar/TextFormatting.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextHeaders.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextHighlight.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextHistory.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextLinks.js +4 -4
- package/dist/molecules/RichTextEditor/MenuBar/TextLists.js +1 -1
- package/dist/molecules/RichTextEditor/RichTextEditor.types.js +1 -1
- package/dist/molecules/RichTextEditor/index.d.ts +5 -5
- package/dist/molecules/Search/Search.d.ts +2 -2
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +2 -2
- package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
- package/dist/molecules/SelectionControls/Switch/Switch.d.ts +2 -2
- package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
- package/dist/molecules/TableHeader/TableHeader.js +1 -1
- package/dist/organisms/SideBar/SideBar.d.ts +2 -2
- package/dist/organisms/Status/collections/BadRequest.d.ts +2 -2
- package/dist/organisms/Status/collections/GenericError.d.ts +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
- package/dist/organisms/TopBar/Account/Account.js +1 -1
- package/dist/organisms/TopBar/Actions.d.ts +2 -2
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
- package/dist/organisms/TopBar/Notifications/FilterOptions.js +17 -17
- package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsInner.js +3 -3
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/DefaultNotification.js +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/ReadyToReportNotification.js +6 -6
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/RequestReviewOrca.js +4 -4
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.const.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.types.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +5 -5
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Description.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +4 -4
- package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
- package/dist/organisms/TopBar/Resources/Resources.js +3 -3
- package/dist/organisms/TopBar/Settings.js +4 -4
- package/dist/organisms/TopBar/TopBar.js +1 -1
- package/dist/organisms/TopBar/TopBar.styles.js +25 -25
- package/dist/providers/SurveyProvider/SurveyDialog/SurveyDialog.js +1 -1
- package/dist/providers/SurveyProvider/SurveyProvider.js +1 -1
- package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
- package/package.json +3 -3
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/Notifications.types.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../molecules/RichTextEditor/RichTextEditor.types.js";import{AmplifyKit as e}from"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import{useMemo as t}from"react";const n=({features:n,placeholder:r,onImageUpload:i,onImageRead:a})=>t(()=>e.configure({placeholder:r?{placeholder:r}:void 0,link:n?.includes(`links`)?{}:!1,table:n?.includes(`table`)?{}:!1,textAlign:n?.includes(`alignment`)?{}:!1,bulletList:n?.includes(`lists`)?{}:!1,orderedList:n?.includes(`lists`)?{}:!1,codeBlockLowlight:n?.includes(`code`)?{}:!1,image:n?.includes(`images`)?{onImageUpload:i,onImageRead:a}:!1,heading:n?.includes(`headers`)?{}:!1}),[r,n,i,a]);export{n as useAmplifyKit};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SelectOption, SelectOptionRequired } from "../../molecules/Select/Select.types.js";
|
|
2
2
|
import { SelectComponentProps } from "../../molecules/Select/Select.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react212 from "react";
|
|
4
4
|
import { ChangeEvent, KeyboardEvent } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/atoms/hooks/useSelect.d.ts
|
|
@@ -16,8 +16,8 @@ declare const useSelect: <T extends SelectOptionRequired>(props: SelectComponent
|
|
|
16
16
|
handleOnOpen: () => void;
|
|
17
17
|
handleOnRemoveItem: (item: SelectOption<T>) => void;
|
|
18
18
|
search: string;
|
|
19
|
-
searchRef:
|
|
20
|
-
itemRefs:
|
|
19
|
+
searchRef: react212.RefObject<HTMLInputElement | null>;
|
|
20
|
+
itemRefs: react212.RefObject<(HTMLButtonElement | null)[]>;
|
|
21
21
|
selectedValues: T[];
|
|
22
22
|
open: boolean;
|
|
23
23
|
tryingToRemoveItem: T | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../enums/Environment.js";import{PublicClientApplication as e}from"@azure/msal-browser";const t=[`IS_MOCK`,`ALLOWED_PARENT_DOMAINS`,`SERVICE_NOW_CONFIGURATION_ITEM`,`API_CLIENT_ID`],n=e=>{if(!window._env_)return``;if(window._env_[e]===void 0&&!t.includes(e))throw Error(`Missing required environment variable: `+e);return window._env_[e]},r=e=>e||n(`NAME`),i=e=>e||n(`CLIENT_ID`),a=e=>e||n(`API_URL`),o=e=>e||n(`API_SCOPE`),s=e=>e||n(`API_CLIENT_ID`),c=e=>e||n(`ENVIRONMENT_NAME`),l=e=>e||n(`SERVICE_NOW_CONFIGURATION_ITEM`),u=e=>e===void 0?!1:e===`true`,d=e=>e===void 0?[`admin`]:JSON.parse(e),f=e=>e?e.split(`;`):n(`ALLOWED_PARENT_DOMAINS`)?.split(`;`)||[],p=e=>{if(e!==void 0)return`https://avatars.githubusercontent.com/u/97165289`};function m(){let e=import.meta.env.VITE_ENVIRONMENT_NAME;return e||=n(`ENVIRONMENT_NAME`),e===`production`?`https://jsembark.equinor.com`:`https://client-amplify-portal-${e===`localhost`?`development`:e}.radix.equinor.com`}const h=m(),g={PHOTO:`https://graph.microsoft.com/v1.0/me/photos/96x96/$value`},_=(e,t)=>fetch(e,{headers:{Authorization:`Bearer ${t}`}}),v={OPENID:`openid`,PROFILE:`profile`,USER_READ:`User.Read`},y={scopes:[v.OPENID,v.PROFILE,v.USER_READ]},b={scopes:[v.USER_READ]},x=e=>({scopes:[e]}),S=()=>window.self!==window.top,C=new e({auth:{clientId:i(import.meta.env.VITE_CLIENT_ID),authority:`https://login.microsoftonline.com/StatoilSRM.onmicrosoft.com/`,redirectUri:window.location.origin},cache:{cacheLocation:`localStorage`}}),w=f(import.meta.env.ALLOWED_PARENT_DOMAINS);window.addEventListener(`message`,async e=>{if(w.includes(e.origin)){let t=e.data;if(t){await C.initialize();try{await C.ssoSilent({sid:t}),console.log(`postMessage successfully logged in user!`)}catch(e){console.error(`Something went wrong with postMessage`),console.error(e)}}}});const T={fetchMsGraph:_,GRAPH_SCOPES:v,GRAPH_REQUESTS_LOGIN:y,GRAPH_REQUESTS_PHOTO:b,GRAPH_REQUESTS_BACKEND:x,GRAPH_ENDPOINTS:g,msalApp:C,getToken:async()=>{if(u(import.meta.env.VITE_IS_MOCK))return``;let e=C.getActiveAccount(),t=C.getAllAccounts();return!e&&t.length===0?``:(await C.acquireTokenSilent(x(o(import.meta.env.VITE_API_SCOPE)))).accessToken},isReaderOnly:e=>e?!e.some(e=>e.includes(`WRITE`)):!0,isInIframe:S},E={getConfig:n,getAppName:r,getClientId:i,getApiUrl:a,getApiScope:o,getApiClientId:s,getEnvironmentName:c,getIsMock:u,getMockUserPhoto:p,getMockRoles:d,getServiceNowConfigurationItem:l,PORTAL_URL_WITHOUT_LOCALHOST:h};export{T as auth,E as environment};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_FEATURES as e
|
|
2
|
-
Either add the onImageUpload function or remove RichTextEditorFeatures.IMAGES from the features array`);return
|
|
1
|
+
import{DEFAULT_FEATURES as e}from"../../molecules/RichTextEditor/RichTextEditor.types.js";function t({features:t,extendFeatures:n,removeFeatures:r,onImageUpload:i}){let a=t??e,o=n??[],s=[...a,...o].filter(e=>!r?.includes(e)).filter((e,t,n)=>t===n.indexOf(e));if(s.includes(`images`)&&i===void 0)throw Error(`onImageUpload cannot be undefined when features include images!
|
|
2
|
+
Either add the onImageUpload function or remove RichTextEditorFeatures.IMAGES from the features array`);return s}const n=/(<img src=".*?" alt="(.*?)">)/g,r=/(<img alt="(.*?)" \/>)/g;function i(e){if(!e)return[];let t=[],n=e.matchAll(r);for(let e of n)t.push(e[2]);return t}function a(e){return new Promise((t,n)=>{let r=new FileReader;r.readAsDataURL(e),r.onload=()=>{typeof r.result==`string`&&t(r.result)},r.onerror=n})}function o(e){return e.replaceAll(n,`<img alt="$2" />`)}function s(e){let t=[],n=e.matchAll(/(<img src="(.*?)" alt=".*?">)/g);for(let e of n)t.push(e[2]);return t}export{r as IMG_WITH_ALT,n as IMG_WITH_SRC_AND_ALT,o as cleanRichTextValue,i as extractImageUrls,t as getFeatures,s as getImagesFromRichText,a as imageToB64};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Variants } from "../../atoms/types/variants.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react8 from "react";
|
|
3
3
|
import { DateRangePickerProps } from "@equinor/eds-core-react";
|
|
4
4
|
|
|
5
5
|
//#region src/molecules/DateRangePicker/DateRangePicker.d.ts
|
|
@@ -8,10 +8,10 @@ type DateRangePickerProps$1 = Omit<DateRangePickerProps, 'variant'> & {
|
|
|
8
8
|
meta?: string;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare const DateRangePicker$1:
|
|
11
|
+
declare const DateRangePicker$1: react8.ForwardRefExoticComponent<Omit<DateRangePickerProps, "variant"> & {
|
|
12
12
|
variant?: Variants;
|
|
13
13
|
meta?: string;
|
|
14
14
|
loading?: boolean;
|
|
15
|
-
} &
|
|
15
|
+
} & react8.RefAttributes<HTMLDivElement>>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { DateRangePicker$1 as DateRangePicker, DateRangePickerProps$1 as DateRangePickerProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react14 from "react";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ButtonProps, DialogProps } from "@equinor/eds-core-react";
|
|
4
4
|
import { IconData } from "@equinor/eds-icons";
|
|
@@ -51,6 +51,6 @@ interface DialogProps$1 extends Omit<DialogProps, 'title'> {
|
|
|
51
51
|
* @param additionalInfo - Defaults to empty, and won't show the additional info button
|
|
52
52
|
* Also inherits props from EDS dialog
|
|
53
53
|
*/
|
|
54
|
-
declare const Dialog$1:
|
|
54
|
+
declare const Dialog$1: react14.ForwardRefExoticComponent<DialogProps$1 & react14.RefAttributes<HTMLDivElement>>;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { Dialog$1 as Dialog, DialogAction, DialogProps$1 as DialogProps };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SizeIconProps } from "../../atoms/types/Icon.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react12 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/EquinorLogo/EquinorLogo.d.ts
|
|
5
5
|
interface EquinorLogoProps extends Partial<SizeIconProps> {
|
|
6
6
|
large?: boolean;
|
|
7
7
|
color?: 'red' | 'white' | 'black';
|
|
8
8
|
}
|
|
9
|
-
declare const EquinorLogo:
|
|
9
|
+
declare const EquinorLogo: react12.ForwardRefExoticComponent<EquinorLogoProps & react12.RefAttributes<SVGSVGElement>>;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { EquinorLogo, EquinorLogoProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../atoms/enums/Theme.js";import{ThemeProviderContext as e}from"../../providers/ThemeProvider/ThemeProvider.js";import{IconCellColors as t,IconCellStates as n,IconCellVariants as r}from"./IconCell.types.js";import{getIconCellColor as i,renderContent as a}from"./IconCell.utils.js";import{Button as o,Container as s,HelperIconContainer as c,IconContainer as l,Label as u}from"./IconCell.styles.js";import{forwardRef as d,useContext as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";const h=d(function(d,h){let g=f(e);if(d.variant===r.SCRIBBLED_OUT){let{className:e,as:t=`td`,noBottomBorder:n=!1}=d;return p(s,{className:e,as:t,children:p(o,{ref:h,$variant:r.SCRIBBLED_OUT,$noBottomBorder:n,$clickable:!1})})}let{icon:_,onClick:v,className:y,disabled:b=!1,selected:x=!1,color:S=t.DEFAULT,state:C=n.DEFAULT,label:w,variant:T=r.DEFAULT,helperIcon:E,noBottomBorder:D=!1,as:O=`td`,...k}=d,{backgroundColor:A,iconColor:j}=i(S,g?.theme??`light`);return p(s,{className:y,as:O,children:m(o,{ref:h,...k,$selected:x,disabled:b,onClick:v,$backgroundColor:A,$state:C,$variant:T,$noBottomBorder:D,$clickable:!!v&&!b,children:[p(l,{children:a(_,j)}),p(u,{children:p(`span`,{children:w})}),p(c,{children:E&&a(E,j)})]})})});h.displayName=`IconCell`;export{h as IconCell};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{colors as e}from"../../atoms/style/colors.js";import
|
|
1
|
+
import{colors as e}from"../../atoms/style/colors.js";import"../../atoms/enums/Theme.js";import{IconCellColors as t,IconCellStates as n,IconCellVariants as r}from"./IconCell.types.js";import{Icon as i}from"@equinor/eds-core-react";import{jsx as a}from"react/jsx-runtime";const o=(e,t)=>e&&typeof e==`object`&&`prefix`in e?a(i,{data:e,color:t}):e,s=(n,r)=>{switch(n){case t.GREEN:case t.SUCCESS:return r===`light`?{backgroundColor:e.interactive.success__highlight.rgba,iconColor:e.dataviz.darkgreen.default}:{backgroundColor:e.dataviz.darkgreen.default,iconColor:e.dataviz.lightgreen.lighter};case t.RED:case t.ERROR:return r===`light`?{backgroundColor:e.interactive.danger__highlight.rgba,iconColor:e.interactive.danger__text.rgba}:{backgroundColor:e.ui.background__danger.rgba,iconColor:e.text.static_icons__default.rgba};case t.ORANGE:case t.WARNING:return r===`light`?{backgroundColor:e.interactive.warning__highlight.rgba,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.ui.background__warning.rgba,iconColor:e.text.static_icons__default.rgba};case t.BLUE:return r===`light`?{backgroundColor:e.dataviz.lightblue.lighter,iconColor:e.dataviz.primary.darker}:{backgroundColor:e.dataviz.darkblue.default,iconColor:e.dataviz.lightblue.lighter};case t.LIGHTGREY:return r===`light`?{backgroundColor:e.ui.background__light.rgba,iconColor:e.dataviz.lightgray.darker}:{backgroundColor:e.ui.background__heavy.rgba,iconColor:e.text.static_icons__secondary.rgba};case t.PINK:return r===`light`?{backgroundColor:e.dataviz.darkpink.lighter,iconColor:e.dataviz.darkpink.darker}:{backgroundColor:e.dataviz.darkpink.darker,iconColor:e.dataviz.darkpink.lighter};case t.YELLOW:return r===`light`?{backgroundColor:e.dataviz.lightyellow.lighter,iconColor:e.dataviz.darkyellow.darker}:{backgroundColor:e.dataviz.darkyellow.darker,iconColor:e.dataviz.lightyellow.lighter};case t.PURPLE:return r===`light`?{backgroundColor:e.dataviz.lightpurple.lighter,iconColor:e.dataviz.darkpurple.darker}:{backgroundColor:e.dataviz.darkpurple.darker,iconColor:e.dataviz.lightpurple.lighter};default:return r===`light`?{backgroundColor:e.ui.background__medium.rgba,iconColor:e.text.static_icons__default.rgba}:{backgroundColor:e.ui.background__light.rgba,iconColor:e.text.static_icons__default.rgba}}},c={[n.ERROR]:e.interactive.danger__resting.rgba,[n.WARNING]:e.interactive.warning__resting.rgba},l={[n.ERROR]:e.ui.background__danger.rgba,[n.WARNING]:e.ui.background__warning.rgba},u=(e,t)=>(t?c[t]:void 0)??e,d=({$noBottomBorder:t,$state:n,$backgroundColor:r})=>`1px solid ${t?r:u(e.ui.background__medium.rgba,n)}`,f=t=>u(e.text.static_icons__default.rgba,t),p=({$variant:t,$state:i,$backgroundColor:a=e.ui.background__default.rgba})=>t===r.SCRIBBLED_OUT?`repeating-linear-gradient(
|
|
2
2
|
20deg,
|
|
3
3
|
${e.ui.background__light_medium.rgba} 0px,
|
|
4
4
|
${e.ui.background__default.rgba} 1px,
|
|
5
5
|
${e.ui.background__default.rgba} 10px,
|
|
6
6
|
${e.ui.background__light_medium.rgba} 11px,
|
|
7
7
|
${e.ui.background__light_medium.rgba} 12px
|
|
8
|
-
)`:t===
|
|
8
|
+
)`:t===r.COLOURED?i===n.ERROR?l[n.ERROR]:i===n.WARNING?l[n.WARNING]:a:`transparent`;export{p as getBackground,d as getBorderBottom,s as getIconCellColor,f as getSelectedBorder,o as renderContent,l as stateBGColor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react157 from "react";
|
|
2
2
|
import { FocusEventHandler, HTMLAttributes, MouseEventHandler, ReactNode } from "react";
|
|
3
3
|
import { IconData } from "@equinor/eds-icons";
|
|
4
4
|
|
|
@@ -15,6 +15,6 @@ interface ListItemProps extends HTMLAttributes<HTMLButtonElement> {
|
|
|
15
15
|
isChild?: boolean;
|
|
16
16
|
borderBottom?: boolean;
|
|
17
17
|
}
|
|
18
|
-
declare const ListItem:
|
|
18
|
+
declare const ListItem: react157.ForwardRefExoticComponent<ListItemProps & react157.RefAttributes<HTMLButtonElement>>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { ListItem, ListItemProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react20 from "react";
|
|
2
2
|
import { TooltipProps } from "@equinor/eds-core-react";
|
|
3
3
|
import * as _floating_ui_utils0 from "@floating-ui/utils";
|
|
4
4
|
|
|
@@ -6,14 +6,14 @@ import * as _floating_ui_utils0 from "@floating-ui/utils";
|
|
|
6
6
|
type OptionalTooltipProps = {
|
|
7
7
|
textTransform?: string;
|
|
8
8
|
} & TooltipProps;
|
|
9
|
-
declare const OptionalTooltip:
|
|
9
|
+
declare const OptionalTooltip: react20.ForwardRefExoticComponent<{
|
|
10
10
|
textTransform?: string;
|
|
11
11
|
} & {
|
|
12
12
|
placement?: _floating_ui_utils0.Placement;
|
|
13
|
-
title?:
|
|
13
|
+
title?: react20.ReactNode;
|
|
14
14
|
children: React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
15
15
|
enterDelay?: number;
|
|
16
16
|
portalContainer?: HTMLElement;
|
|
17
|
-
} & Omit<
|
|
17
|
+
} & Omit<react20.HTMLAttributes<HTMLDivElement>, "title"> & react20.RefAttributes<HTMLDivElement>>;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { OptionalTooltip, OptionalTooltipProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react18 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/molecules/ProfileAvatar/ProfileAvatar.d.ts
|
|
4
4
|
interface ProfileAvatarProps {
|
|
@@ -7,6 +7,6 @@ interface ProfileAvatarProps {
|
|
|
7
7
|
size?: 'small' | 'small-medium' | 'medium' | 'large' | 'x-large' | number;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const ProfileAvatar:
|
|
10
|
+
declare const ProfileAvatar: react18.ForwardRefExoticComponent<ProfileAvatarProps & react18.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ProfileAvatar, ProfileAvatarProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{useRef as t}from"react";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{camera_add_photo as a}from"@equinor/eds-icons";const o=({onImageUpload:o,editor:s,features:c})=>{let l=t(null);return c&&!c.includes(`images`)?null:i(n,{children:[r(`input`,{ref:l,type:`file`,id:`img-input`,multiple:!1,onChange:async e=>{let t=e.target.files;if(!t?.[0]){console.error(`Files undefined`);return}let n=await o?.(t[0]);n&&s?.chain().focus().setImage({src:n.src,alt:n.alt}).run()},style:{display:`none`},accept:`image/*, video/*`}),r(e.Button,{"data-testid":`add-image-button`,icon:a,onClick:()=>{l.current&&l.current.click()},tooltip:`Add Image`})]})};export{o as AddImageButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../RichTextEditor.types.js";import{MenuButton as e}from"../MenuButton.js";import{jsx as t}from"react/jsx-runtime";import{table_chart as n}from"@equinor/eds-icons";const r=({editor:r,features:i})=>{if(!(i&&!i.includes(`table`))&&!r.isActive(`table`))return t(e,{"data-testid":`add-table-button`,icon:n,onClick:()=>{r.chain().focus().insertTable({rows:1,cols:3,withHeaderRow:!1}).run()},tooltip:`Add Table`})};export{r as TextTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{format_align_center as r,format_align_left as i,format_align_right as a}from"@equinor/eds-icons";const o=({editor:o,features:s})=>{let c=()=>o.chain().focus().setTextAlign(`left`).run(),l=()=>o.chain().focus().setTextAlign(`center`).run(),u=()=>o.chain().focus().setTextAlign(`right`).run();if(!(s&&!s.includes(`alignment`)))return n(e.Section,{children:[t(e.Button,{active:o.isActive({textAlign:`left`}),"data-testid":`align-left-button`,icon:i,onClick:c,tooltip:`Align Left`}),t(e.Button,{active:o.isActive({textAlign:`center`}),"data-testid":`align-center-button`,icon:r,onClick:l,tooltip:`Align Center`}),t(e.Button,{active:o.isActive({textAlign:`right`}),"data-testid":`align-right-button`,icon:a,onClick:u,tooltip:`Align Right`})]})};export{o as TextAlignment};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import
|
|
1
|
+
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../RichTextEditor.types.js";import{EditorMenu as t}from"./MenuBar.js";import n from"styled-components";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import{format_clear as o}from"@equinor/eds-icons";const{colors:s}=e,c=n.hr`
|
|
2
2
|
width: 1px;
|
|
3
|
-
background: ${
|
|
4
|
-
`,
|
|
3
|
+
background: ${s.ui.background__medium.rgba};
|
|
4
|
+
`,l=({editor:e,features:n})=>{let s=()=>e.chain().focus().clearNodes().unsetAllMarks().run();if(!(n&&!n.includes(`clear-formatting`)))return a(r,{children:[i(c,{}),i(t.Button,{icon:o,onClick:s,"data-testid":`clear-formatting`,tooltip:`Clear Formatting`})]})};export{l as TextClearFormatting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t}from"react/jsx-runtime";import{code as n}from"@equinor/eds-icons";const r=({editor:r,features:i})=>{let a=()=>r.chain().focus().toggleCodeBlock().run();if(!(i&&!i.includes(`code`)))return t(e.Button,{active:r.isActive(`codeBlock`),icon:n,onClick:a,"data-testid":`code-button`,tooltip:`Code Block`})};export{r as TextCode};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import
|
|
1
|
+
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../RichTextEditor.types.js";import{OptionalTooltip as t}from"../../OptionalTooltip/OptionalTooltip.js";import{Icon as n}from"@equinor/eds-core-react";import r from"styled-components";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{format_color_text as o}from"@equinor/eds-icons";const{colors:s,spacings:c,shape:l}=e,u=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
|
-
gap: ${
|
|
4
|
+
gap: ${c.comfortable.medium};
|
|
5
5
|
position: relative;
|
|
6
|
-
background: ${
|
|
7
|
-
border-radius: ${
|
|
6
|
+
background: ${s.ui.background__light.rgba};
|
|
7
|
+
border-radius: ${l.button.borderRadius};
|
|
8
8
|
transition: 200ms background;
|
|
9
9
|
> input {
|
|
10
|
-
border-radius: ${
|
|
11
|
-
width: calc(24px + (${
|
|
12
|
-
height: calc(24px + (${
|
|
10
|
+
border-radius: ${l.button.borderRadius};
|
|
11
|
+
width: calc(24px + (${c.comfortable.x_small}) * 2);
|
|
12
|
+
height: calc(24px + (${c.comfortable.x_small}) * 2);
|
|
13
13
|
opacity: 0;
|
|
14
14
|
&:hover {
|
|
15
15
|
cursor: pointer;
|
|
@@ -19,27 +19,27 @@ import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
svg {
|
|
22
|
-
fill: ${
|
|
22
|
+
fill: ${s.interactive.primary__resting.rgba};
|
|
23
23
|
transition: 200ms fill;
|
|
24
24
|
}
|
|
25
25
|
&:hover {
|
|
26
|
-
background: ${
|
|
26
|
+
background: ${s.interactive.primary__hover_alt.rgba};
|
|
27
27
|
|
|
28
28
|
svg {
|
|
29
|
-
fill: ${
|
|
29
|
+
fill: ${s.interactive.primary__hover.rgba};
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,d=r.span`
|
|
33
33
|
position: absolute;
|
|
34
34
|
left: 50%;
|
|
35
|
-
top: calc(50% + ${
|
|
35
|
+
top: calc(50% + ${c.comfortable.x_small} / 2);
|
|
36
36
|
transform: translate(-50%, -50%);
|
|
37
37
|
pointer-events: none;
|
|
38
|
-
`,
|
|
38
|
+
`,f=r.span`
|
|
39
39
|
position: absolute;
|
|
40
40
|
left: 50%;
|
|
41
41
|
transform: translateX(-50%);
|
|
42
42
|
bottom: 5px;
|
|
43
43
|
height: 4px;
|
|
44
44
|
width: 24px;
|
|
45
|
-
`,
|
|
45
|
+
`,p=({editor:e,features:r})=>r&&!r.includes(`text-color`)?null:i(t,{title:`Text Color`,enterDelay:300,children:a(u,{children:[i(`input`,{type:`color`,onChange:t=>{e.chain().focus().setColor(t.target.value).run()},"data-testid":`text-color-input`,value:e.getAttributes(`textStyle`)?.color||s.text.static_icons__default.hex}),i(d,{children:i(n,{data:o})}),i(f,{style:{background:e.getAttributes(`textStyle`)?.color||s.text.static_icons__default.hex}})]})});export{p as TextColor};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{format_bold as r,format_italics as i}from"@equinor/eds-icons";const a=({editor:a,features:o})=>{let s=()=>a.chain().focus().toggleBold().run(),c=()=>a.chain().focus().toggleItalic().run();if(!(o&&!o.includes(`formatting`)))return n(e.Section,{children:[t(e.Button,{active:a.isActive(`bold`),"data-testid":`bold-button`,icon:r,onClick:s,tooltip:`Bold`}),t(e.Button,{active:a.isActive(`italic`),"data-testid":`italic-button`,icon:i,onClick:c,tooltip:`Italic`})]})};export{a as TextFormatting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{amplify_h2 as e,amplify_h3 as t}from"../../../atoms/icons/wysiwyg.js";import{EditorMenu as n}from"./MenuBar.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";const a=({editor:a,features:o})=>{let s=()=>a.chain().focus().toggleHeading({level:2}).run(),c=()=>a.chain().focus().toggleHeading({level:3}).run();if(!(o&&!o.includes(`headers`)))return i(n.Section,{children:[r(n.Button,{"data-testid":`h2-button`,active:a.isActive(`heading`,{level:2}),icon:e,onClick:s,tooltip:`Heading 2`}),r(n.Button,{"data-testid":`h3-button`,active:a.isActive(`heading`,{level:3}),icon:t,onClick:c,tooltip:`Heading 3`})]})};export{a as TextHeaders};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t}from"react/jsx-runtime";import{format_color_fill as n}from"@equinor/eds-icons";const r=({editor:r,features:i})=>i&&!i.includes(`highlight`)?null:t(e.Button,{"data-testid":`highlight-button`,active:r.isActive(`highlight`),icon:n,onClick:()=>r.chain().focus().toggleHighlight().run(),tooltip:`Highlight`});export{r as TextHighlight};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{redo as r,undo as i}from"@equinor/eds-icons";const a=({editor:a,features:o})=>{let s=()=>a.chain().focus().undo().run(),c=()=>a.chain().focus().redo().run();if(!(o&&!o.includes(`undoRedo`)))return n(e.Section,{children:[t(e.Button,{icon:i,onClick:s,"data-testid":`undo-button`,disabled:!a.can().undo(),tooltip:`Undo`}),t(e.Button,{icon:r,onClick:c,"data-testid":`redo-button`,disabled:!a.can().redo(),tooltip:`Redo`})]})};export{a as TextHistory};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import
|
|
1
|
+
import{tokens as e}from"../../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../RichTextEditor.types.js";import{isValidUrl as t}from"../../../atoms/utils/url.js";import{TextField as n}from"../../TextField/TextField.js";import{EditorMenu as r}from"./MenuBar.js";import{useRef as i,useState as a}from"react";import{Button as o,Icon as s,Popover as c}from"@equinor/eds-core-react";import l from"styled-components";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{link as p,link_off as m}from"@equinor/eds-icons";const{spacings:h}=e,g=l.div`
|
|
2
2
|
display: flex;
|
|
3
|
-
gap: ${
|
|
4
|
-
padding: ${
|
|
3
|
+
gap: ${h.comfortable.medium};
|
|
4
|
+
padding: ${h.comfortable.small};
|
|
5
5
|
width: 15rem;
|
|
6
|
-
`,
|
|
6
|
+
`,_=({editor:e,features:l})=>{let[h,_]=a(!1),v=i(null),y=i(``),[b,x]=a(!1),S=()=>{_(e=>!e),e.chain().focus().setHighlight({color:`#accef7`}).run()},C=()=>{_(!1),y.current=``,e.chain().focus().unsetHighlight().run()},w=e=>{y.current=e.target.value},T=e=>{e.key===`Enter`&&E()},E=()=>{if(!t(y.current)){x(!0);return}y.current.includes(`http`)||(y.current=`https://${y.current}`),e.chain().focus().extendMarkRange(`link`).setLink({href:y.current}).run(),C(),b&&x(!1)},D=()=>e?.chain().focus().unsetLink().run();if(!(l&&!l.includes(`links`)))return f(u,{children:[f(r.Section,{children:[d(r.Button,{active:h,ref:v,icon:p,onClick:S,disabled:e.state.selection.empty,"data-testid":`link-button`,tooltip:`Link`}),d(r.Button,{icon:m,onClick:D,disabled:!e.isActive(`link`),"data-testid":`unsetlink-button`,tooltip:`Remove Link`})]}),h&&d(c,{open:!0,anchorEl:v.current,onClose:C,children:f(g,{children:[d(n,{id:`link`,placeholder:`Insert link`,autoComplete:`off`,autoFocus:!0,inputIcon:d(s,{data:p}),onChange:w,onKeyDown:T,variant:b?`error`:void 0}),d(o,{variant:`outlined`,onClick:E,children:`Save`})]})})]})};export{_ as TextLinks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../RichTextEditor.types.js";import{EditorMenu as e}from"./MenuBar.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{format_list_bulleted as r,format_list_numbered as i}from"@equinor/eds-icons";const a=({editor:a,features:o})=>{let s=()=>a.chain().focus().toggleBulletList().run(),c=()=>a.chain().focus().toggleOrderedList().run();if(!(o&&!o.includes(`lists`)))return n(e.Section,{children:[t(e.Button,{active:a.isActive(`bulletList`),icon:r,onClick:s,"data-testid":`bullet-list-button`,tooltip:`Bullet List`}),t(e.Button,{active:a.isActive(`orderedList`),icon:i,onClick:c,"data-testid":`ordered-list-button`,tooltip:`Ordered List`})]})};export{a as TextLists};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=function(e){return e.UNDO_REDO=`undoRedo`,e.FORMATTING=`formatting`,e.HEADERS=`headers`,e.LISTS=`lists`,e.TEXT_COLOR=`text-color`,e.CODE=`code`,e.ALIGNMENT=`alignment`,e.LINKS=`links`,e.IMAGES=`images`,e.CLEAR_FORMATTING=`clear-formatting`,e.TABLE=`table`,e.HIGHLIGHT=`highlight`,e}({});const t=[
|
|
1
|
+
let e=function(e){return e.UNDO_REDO=`undoRedo`,e.FORMATTING=`formatting`,e.HEADERS=`headers`,e.LISTS=`lists`,e.TEXT_COLOR=`text-color`,e.CODE=`code`,e.ALIGNMENT=`alignment`,e.LINKS=`links`,e.IMAGES=`images`,e.CLEAR_FORMATTING=`clear-formatting`,e.TABLE=`table`,e.HIGHLIGHT=`highlight`,e}({});const t=[`undoRedo`,`formatting`,`headers`,`lists`,`text-color`,`code`,`alignment`,`links`,`images`,`table`,`clear-formatting`];export{t as DEFAULT_FEATURES,e as RichTextEditorFeatures};
|
|
@@ -2,17 +2,17 @@ import { EditorStylingProps, RichTextContentProps } from "./RichTextEditor.style
|
|
|
2
2
|
import { EditorProviderProps } from "./EditorProvider.js";
|
|
3
3
|
import { MenuBarProps } from "./MenuBar/MenuBar.js";
|
|
4
4
|
import { RichTextEditor } from "./RichTextEditor.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react24 from "react";
|
|
6
6
|
import * as styled_components0 from "styled-components";
|
|
7
7
|
import * as _tiptap_react0 from "@tiptap/react";
|
|
8
8
|
import * as styled_components_dist_types0 from "styled-components/dist/types";
|
|
9
9
|
|
|
10
10
|
//#region src/molecules/RichTextEditor/index.d.ts
|
|
11
11
|
declare const RichText: {
|
|
12
|
-
Styling: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<
|
|
13
|
-
Provider:
|
|
14
|
-
Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> &
|
|
15
|
-
Bar:
|
|
12
|
+
Styling: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<react24.DetailedHTMLProps<react24.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never> & Partial<Pick<styled_components0.FastOmit<react24.DetailedHTMLProps<react24.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never>>> & string;
|
|
13
|
+
Provider: react24.FC<EditorProviderProps>;
|
|
14
|
+
Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react24.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never> & Partial<Pick<styled_components0.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react24.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never>>> & string & Omit<react24.NamedExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react24.RefAttributes<HTMLDivElement>>, keyof react24.Component<any, {}, any>>;
|
|
15
|
+
Bar: react24.FC<MenuBarProps>;
|
|
16
16
|
};
|
|
17
17
|
//#endregion
|
|
18
18
|
export { RichText };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react53 from "react";
|
|
2
2
|
import { SearchProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/Search/Search.d.ts
|
|
5
5
|
interface SearchProps$1 extends SearchProps {
|
|
6
6
|
lightBackground?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const Search$1:
|
|
8
|
+
declare const Search$1: react53.ForwardRefExoticComponent<SearchProps$1 & react53.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Search$1 as Search };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react153 from "react";
|
|
2
2
|
import { CheckboxProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Checkbox/Checkbox.d.ts
|
|
@@ -7,6 +7,6 @@ interface CheckboxProps$1 extends CheckboxProps {
|
|
|
7
7
|
outlined?: boolean;
|
|
8
8
|
error?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const Checkbox$1:
|
|
10
|
+
declare const Checkbox$1: react153.ForwardRefExoticComponent<CheckboxProps$1 & react153.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Checkbox$1 as Checkbox, CheckboxProps$1 as CheckboxProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react155 from "react";
|
|
2
2
|
import { RadioProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Radio/Radio.d.ts
|
|
@@ -7,6 +7,6 @@ interface RadioProps$1 extends RadioProps {
|
|
|
7
7
|
outlined?: boolean;
|
|
8
8
|
error?: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const Radio$1:
|
|
10
|
+
declare const Radio$1: react155.ForwardRefExoticComponent<RadioProps$1 & react155.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { Radio$1 as Radio, RadioProps$1 as RadioProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react159 from "react";
|
|
2
2
|
import { SwitchProps } from "@equinor/eds-core-react";
|
|
3
3
|
|
|
4
4
|
//#region src/molecules/SelectionControls/Switch/Switch.d.ts
|
|
5
5
|
interface SwitchProps$1 extends SwitchProps {
|
|
6
6
|
outlined?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare const Switch$1:
|
|
8
|
+
declare const Switch$1: react159.ForwardRefExoticComponent<SwitchProps$1 & react159.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Switch$1 as Switch, SwitchProps$1 as SwitchProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react49 from "react";
|
|
2
2
|
import * as styled_components8 from "styled-components";
|
|
3
3
|
import * as styled_components_dist_types4 from "styled-components/dist/types";
|
|
4
4
|
import * as styled_components_dist_models_Keyframes0 from "styled-components/dist/models/Keyframes";
|
|
@@ -8,6 +8,6 @@ declare const skeletonBaseloading: styled_components_dist_models_Keyframes0.defa
|
|
|
8
8
|
interface SkeletonBaseProps {
|
|
9
9
|
$offset?: number;
|
|
10
10
|
}
|
|
11
|
-
declare const SkeletonBase: styled_components_dist_types4.IStyledComponentBase<"web", styled_components8.FastOmit<styled_components8.FastOmit<
|
|
11
|
+
declare const SkeletonBase: styled_components_dist_types4.IStyledComponentBase<"web", styled_components8.FastOmit<styled_components8.FastOmit<react49.DetailedHTMLProps<react49.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never> & Partial<Pick<styled_components8.FastOmit<react49.DetailedHTMLProps<react49.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never>>> & string;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Button as e}from"../Button/Button.js";import
|
|
1
|
+
import{Button as e}from"../Button/Button.js";import"../../atoms/enums/SpacingsMode.js";import{getActionIconColor as t,getLeadingIcon as n,getLeadingIconColor as r,getSortingIcon as i,getTextColor as a}from"./TableHeader.utils.js";import{ActionsWrapper as o,Container as s,Wrapper as c}from"./TableHeader.styles.js";import{Icon as l,Typography as u}from"@equinor/eds-core-react";import{jsx as d,jsxs as f}from"react/jsx-runtime";const p=({as:p=`th`,variant:m,onClick:h,sorting:g,leadingIcon:_,trailingAction:v,children:y})=>{let b=n({variant:m,leadingIcon:_});return d(c,{as:p,children:f(s,{$hasOnClick:!!h,$hasOnSort:!!g,$variant:m,onClick:e=>{h?h(e):g?.onSortClick?.(e)},children:[b&&d(l,{data:b,color:r({variant:m,onClick:h})}),d(u,{variant:`cell_header`,group:`table`,color:a({variant:m,onClick:h}),children:y}),(!!v||!!g)&&f(o,{children:[v&&d(e,{"data-spacings-mode":`compact`,variant:`ghost_icon`,onClick:v.onClick,children:d(l,{data:v.icon,color:t({variant:m})})}),g?.isSorting&&d(e,{className:`sort-button`,onClick:h?g.onSortClick:void 0,"data-spacings-mode":`compact`,variant:`ghost_icon`,children:d(l,{data:i(g.isSorting),color:t({variant:m})})})]})]})})};export{p as TableHeader};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react191 from "react";
|
|
2
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/SideBar/SideBar.d.ts
|
|
@@ -16,6 +16,6 @@ interface SideBarWithCreate extends SideBarProps {
|
|
|
16
16
|
createDisabled?: boolean;
|
|
17
17
|
createActive?: boolean;
|
|
18
18
|
}
|
|
19
|
-
declare const SideBar:
|
|
19
|
+
declare const SideBar: react191.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react191.RefAttributes<HTMLDivElement>>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { SideBar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime9 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/BadRequest.d.ts
|
|
4
4
|
interface BadRequestProps {
|
|
@@ -12,6 +12,6 @@ declare const BadRequest: ({
|
|
|
12
12
|
redirectFallbackUrl,
|
|
13
13
|
onBackClick,
|
|
14
14
|
hideBackButton
|
|
15
|
-
}: BadRequestProps) =>
|
|
15
|
+
}: BadRequestProps) => react_jsx_runtime9.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { BadRequest };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime8 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/GenericError.d.ts
|
|
4
4
|
interface GenericErrorProps {
|
|
@@ -14,6 +14,6 @@ declare const GenericError: ({
|
|
|
14
14
|
redirectFallbackUrl,
|
|
15
15
|
onBackClick,
|
|
16
16
|
hideBackButton
|
|
17
|
-
}: GenericErrorProps) =>
|
|
17
|
+
}: GenericErrorProps) => react_jsx_runtime8.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { GenericError };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToggleGroup as ToggleGroup$1 } from "./ToggleGroup.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react205 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/ToggleGroup/ToggleGroup.d.ts
|
|
5
|
-
declare const ToggleGroup:
|
|
5
|
+
declare const ToggleGroup: react205.ForwardRefExoticComponent<ToggleGroup$1 & react205.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ToggleGroup };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ToggleGroupOption as ToggleGroupOption$1 } from "./ToggleGroup.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react207 from "react";
|
|
3
3
|
import { HTMLAttributes } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/organisms/ToggleGroup/ToggleGroupOption.d.ts
|
|
6
6
|
type ToggleGroupOptionProps = ToggleGroupOption$1 & Omit<HTMLAttributes<HTMLButtonElement>, 'onToggle' | 'disabled'>;
|
|
7
|
-
declare const ToggleGroupOption:
|
|
7
|
+
declare const ToggleGroupOption: react207.ForwardRefExoticComponent<ToggleGroupOptionProps & react207.RefAttributes<HTMLButtonElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { ToggleGroupOption };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"../../../atoms/enums/Environment.js";import{environment as e}from"../../../atoms/utils/auth_environment.js";import{useAuth as t}from"../../../providers/AuthProvider/AuthProvider.js";import{useLocalStorage as n}from"../../../atoms/hooks/useLocalStorage.js";import{Button as r}from"../../../molecules/Button/Button.js";import{TopBarMenu as i}from"../TopBarMenu.js";import{useActiveImpersonationUser as a}from"./ImpersonateMenu/hooks/useActiveImpersonationUser.js";import{useCanImpersonate as o}from"./ImpersonateMenu/hooks/useCanImpersonate.js";import{useMappedRoles as s}from"./ImpersonateMenu/hooks/useMappedRoles.js";import{useStopImpersonation as c}from"./ImpersonateMenu/hooks/useStopImpersonation.js";import{ButtonWrapper as ee,Container as l,EnvironmentToggleWrapper as te,TextContent as u}from"./Account.styles.js";import{impersonateUserDtoToFullName as d}from"./ImpersonateMenu/Impersonate.utils.js";import{ImpersonateMenu as f}from"./ImpersonateMenu/ImpersonateMenu.js";import{AccountAvatar as ne}from"./AccountAvatar.js";import{AccountButton as p}from"./AccountButton.js";import{ActiveUserImpersonationButton as m}from"./ActiveUserImpersonationButton.js";import{ImpersonateButton as h}from"./ImpersonateButton.js";import{RoleList as g}from"./RoleList.js";import{EnvironmentToggle as re}from"./EnvironmentToggle.js";import{StatusChips as _}from"./StatusChips.js";import{useCallback as ie,useEffect as ae,useMemo as v,useRef as y,useState as b}from"react";import{Icon as x,Typography as S}from"@equinor/eds-core-react";import{Fragment as C,jsx as w,jsxs as T}from"react/jsx-runtime";import{log_out as E}from"@equinor/eds-icons";import{ENVIRONMENT_TOGGLE_KEY as D}from"@equinor/subsurface-app-management";const O=({renderCustomButton:O,hideRoles:k=!1,useDisplayNameForRole:A=!1,children:j,enableEnvironmentToggle:M=!1,onImpersonateChange:N})=>{let P=e.getEnvironmentName(import.meta.env.VITE_ENVIRONMENT_NAME),F=e.getApiClientId(import.meta.env.VITE_API_CLIENT_ID),I=e.getAppName(import.meta.env.VITE_NAME),{account:L,roles:R,logout:z}=t(),[B,V]=b(!1),[H,U]=b(!1),[W,G]=n(D,[]),K=y(null),{data:q=!0}=o(),{data:J}=a(),{mutate:Y}=c(),X=s(J?J.roles:R??[],A),oe=J?d(J):L?.name,se=J?J.uniqueName:L?.username,Z=()=>V(!1),Q=ie(()=>{V(e=>!e),U(!1)},[]),$=()=>{U(!0),V(!1)};return ae(()=>{J&&J.appName!=null&&J.appName.toUpperCase()!=I.toUpperCase()&&Y()},[J,I,Y]),T(C,{children:[v(()=>O?O(K,Q):null,[O,Q])||w(p,{ref:K,onClick:Q,environmentToggle:W}),T(i,{open:B,title:`Account`,onClose:Z,anchorEl:K.current,children:[T(l,{children:[J&&w(m,{onClick:$}),w(ne,{environmentToggle:W}),T(u,{children:[w(S,{variant:`h6`,children:oe}),w(S,{children:se})]}),W.length>0&&w(_,{statuses:W}),X&&!k&&w(C,{children:X.length<=3?w(_,{statuses:X}):w(g,{roles:X})}),j,q&&P!==`production`&&F&&w(h,{onOpenImpersonateMenu:$,onClose:Z,onImpersonateChange:N})]}),M&&P!==`production`&&w(te,{children:w(re,{setEnvironmentToggle:G,environmentToggle:W})}),w(ee,{children:T(r,{variant:`ghost`,onClick:z,children:[w(x,{data:E}),`Log out`]})})]}),w(f,{open:H,onClose:()=>U(!1),anchorEl:K.current,onImpersonateChange:N})]})};O.displayName=`TopBar.Account`;export{O as Account};
|