@equinor/amplify-component-lib 8.7.2 → 8.7.4
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/molecules/Dialog/Dialog.d.ts +2 -1
- package/dist/molecules/Dialog/DialogAction.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateButton.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Actions.js +2 -2
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useCreateImpersonation.js +1 -1
- package/package.json +1 -1
|
@@ -13,7 +13,8 @@ export interface DialogAction {
|
|
|
13
13
|
position?: 'left' | 'center' | 'right';
|
|
14
14
|
onClick: () => void;
|
|
15
15
|
text: string;
|
|
16
|
-
variant
|
|
16
|
+
variant?: ButtonProps['variant'];
|
|
17
|
+
color?: ButtonProps['color'];
|
|
17
18
|
icon?: IconData;
|
|
18
19
|
disabled?: boolean | string;
|
|
19
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsx as r,jsxs as o}from"react/jsx-runtime";import{Button as t,Icon as i}from"@equinor/eds-core-react";import"../AnimatedCheckmark/AnimatedCheckmark.styles.js";import"../ApplicationIcon/ApplicationIcon.js";import"../Badge/Badge.styles.js";import"../Banner/Banner.styles.js";import"@equinor/eds-icons";import"../Chip/Chip.js";import"../ContentMenu/ContentMenu.js";import"./Dialog.styles.js";import"../EquinorLogo/EquinorLogo.js";import"react";import"../../atoms/style/colors.js";import"../FileProgress/CompactFileProgress.styles.js";import"../RichTextEditor/custom-extensions/AmplifyKit.js";import"../RichTextEditor/MenuBar/MenuBar.js";import"@tiptap/react";import"../RichTextEditor/RichTextEditor.styles.js";import"../RichTextEditor/RichTextEditor.types.js";import"../../node_modules/lodash/lodash.js";import"@equinor/subsurface-app-management";import"@microsoft/signalr";import"@tanstack/react-query";import"../../atoms/enums/Environment.js";import"../../atoms/utils/auth_environment.js";import"../../organisms/TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/ReleaseNotesProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider/SnackbarProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/ThemeProvider/ThemeProvider.js";import"../../providers/TutorialStepsProvider.js";import"../../atoms/enums/Errors.js";import"../../atoms/enums/Theme.js";import"../../organisms/ErrorPage/illustrations/GlitchAnimation.js";import"../../organisms/ErrorPage/illustrations/QuestioningAnimation.js";import"proj4";import"html2canvas";import"../FileProgress/RegularFileProgress.styles.js";import"../FileUploadArea/FileUploadArea.js";import"../FullPageSpinner/FullPageSpinner.js";import"../InfoElement/InfoElement.js";import{OptionalTooltip as e}from"../OptionalTooltip/OptionalTooltip.js";import"../ProfileAvatar/ProfileAvatar.js";import"../RichTextEditor/MenuBar/MenuBar.styles.js";import"../RichTextEditor/MenuBar/MenuButton.js";import"../Search/Search.js";import"react-router-dom";import"../Sieve/Sieve.styles.js";import"../SingleFilterMenu/SingleFilterMenu.js";import"../Skeleton/SkeletonBase/SkeletonBase.js";import"../Stepper/Stepper.js";import"../OptionDrawer/OptionDrawer.js";import"../Select/Select.styles.js";import"../ListItem/ListItem.js";import"../SelectionControls/Checkbox/Checkbox.js";import"../SelectionControls/Radio/Radio.js";import"../SelectionControls/Switch/Switch.js";const s=({text:s,variant:m,color:n,onClick:p,icon:a,disabled:l})=>r(e,{title:"string"==typeof l?l:"",children:o(t,{variant:m,color:n,onClick:p,disabled:void 0!==l,children:[a&&r(i,{data:a}),s]})});export{s as DialogAction};
|
|
@@ -5,4 +5,4 @@ import{jsx as r,jsxs as o}from"react/jsx-runtime";import{Button as t,DotProgress
|
|
|
5
5
|
svg {
|
|
6
6
|
fill: ${l.interactive.danger__resting.rgba};
|
|
7
7
|
}
|
|
8
|
-
`,h=({onOpenImpersonateMenu:t,onClose:l})=>{const{data:u}=p(),{mutateAsync:v,isPending:h}=d();return u&&h?r(j,{variant:"outlined",color:"danger",children:r(i,{})}):u?o(j,{variant:"outlined",color:"danger",onClick:async()=>{await v(),l()},children:[r(e,{data:n}),"End impersonation"]}):o(c,{onClick:t,children:[r(e,{data:m}),r(s,{variant:"button",group:"navigation",as:"span",children:"Impersonate"}),r(e,{data:a})]})};export{h as ImpersonateButton};
|
|
8
|
+
`,h=({onOpenImpersonateMenu:t,onClose:l})=>{const{data:u}=p(),{mutateAsync:v,isPending:h}=d();return u&&h?r(j,{variant:"outlined",color:"danger",children:r(i,{})}):u?o(j,{variant:"outlined",color:"danger",onClick:async()=>{await v(),l(),location.reload()},children:[r(e,{data:n}),"End impersonation"]}):o(c,{onClick:t,children:[r(e,{data:m}),r(s,{variant:"button",group:"navigation",as:"span",children:"Impersonate"}),r(e,{data:a})]})};export{h as ImpersonateButton};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as
|
|
1
|
+
import{jsxs as e,jsx as o}from"react/jsx-runtime";import{Typography as t,Button as i,DotProgress as n}from"@equinor/eds-core-react";import{useActiveImpersonationUser as r}from"./hooks/useActiveImpersonationUser.js";import{spacings as s}from"../../../../atoms/style/spacings.js";import{useStartImpersonation as a}from"./hooks/useStartImpersonation.js";import l from"styled-components";const c=l.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
padding: ${s.medium};
|
|
@@ -7,4 +7,4 @@ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{Typography as o,Button
|
|
|
7
7
|
display: flex;
|
|
8
8
|
justify-content: flex-end;
|
|
9
9
|
gap: ${s.small};
|
|
10
|
-
`,d=({selectedUniqueName:s,onCancel:l})=>{const{data:d}=r(),{mutateAsync:p,isPending:u}=a();return e(c,{children:[t
|
|
10
|
+
`,d=({selectedUniqueName:s,onCancel:l})=>{const{data:d}=r(),{mutateAsync:p,isPending:u}=a();return e(c,{children:[o(t,{variant:"body_short",children:"By selecting a user to impersonate, you will view the contents of this app as if you would be that user."}),e(m,{children:[o(i,{variant:"outlined",onClick:l,children:"Cancel"}),o(i,u?{children:o(n,{})}:{onClick:async()=>{await p(s),l(),location.reload()},disabled:""===s||s===d?.uniqueName,children:"Impersonate"})]})]})};export{d as Actions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ImpersonateUserService as t}from"@equinor/subsurface-app-management";import{useQueryClient as a,useMutation as e}from"@tanstack/react-query";import{useStartImpersonation as r}from"./useStartImpersonation.js";import{CREATE_IMPERSONATION as n,GET_ALL_IMPERSONATIONS as o}from"../Impersonate.constants.js";function m(){const m=a(),{mutateAsync:s}=r();return e({mutationKey:[n],mutationFn:async a=>{const e=await t.createImpersonateUser(a);return m.setQueryData([o],(t=>[...t,e])),await s(e.uniqueName),e}})}export{m as useCreateImpersonation};
|
|
1
|
+
import{ImpersonateUserService as t}from"@equinor/subsurface-app-management";import{useQueryClient as a,useMutation as e}from"@tanstack/react-query";import{useStartImpersonation as r}from"./useStartImpersonation.js";import{CREATE_IMPERSONATION as n,GET_ALL_IMPERSONATIONS as o}from"../Impersonate.constants.js";function m(){const m=a(),{mutateAsync:s}=r();return e({mutationKey:[n],mutationFn:async a=>{const e=await t.createImpersonateUser(a);return m.setQueryData([o],(t=>[...t,e])),await s(e.uniqueName),location.reload(),e}})}export{m as useCreateImpersonation};
|