@equinor/amplify-component-lib 13.0.0 → 13.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.
Files changed (79) hide show
  1. package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
  2. package/dist/atoms/hooks/useSelect.d.ts +3 -3
  3. package/dist/atoms/icons/other.d.ts +2 -1
  4. package/dist/atoms/icons/other.js +1 -1
  5. package/dist/atoms/index.d.ts +1 -1
  6. package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
  7. package/dist/deprecated/IconToggleButton.d.ts +2 -2
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.js +1 -1
  10. package/dist/molecules/Badge/Badge.d.ts +1 -1
  11. package/dist/molecules/Button/Button.d.ts +8 -10
  12. package/dist/molecules/Button/Button.js +1 -1
  13. package/dist/molecules/Button/Button.styles.js +35 -23
  14. package/dist/molecules/Button/IconButton/IconButton.d.ts +8 -7
  15. package/dist/molecules/Button/IconButton/IconButton.js +1 -1
  16. package/dist/molecules/Button/types.d.ts +2 -2
  17. package/dist/molecules/Chip/Chip.d.ts +2 -2
  18. package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
  19. package/dist/molecules/Dialog/Dialog.js +1 -1
  20. package/dist/molecules/Dialog/DialogAction.js +1 -1
  21. package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -1
  22. package/dist/molecules/IconCell/IconCell.d.ts +2 -2
  23. package/dist/molecules/ListItem/ListItem.d.ts +2 -2
  24. package/dist/molecules/OptionalTooltip/OptionalTooltip.d.ts +4 -4
  25. package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
  26. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +5 -5
  27. package/dist/molecules/RichTextEditor/index.d.ts +5 -5
  28. package/dist/molecules/Search/Search.d.ts +2 -2
  29. package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
  30. package/dist/molecules/Select/PersistentComboBox/PersistentComboBox.d.ts +2 -2
  31. package/dist/molecules/Select/Select.styles.d.ts +5 -5
  32. package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
  33. package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +2 -2
  34. package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
  35. package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
  36. package/dist/molecules/Tabs/Tabs.types.d.ts +1 -1
  37. package/dist/molecules/Tag/Tag.d.ts +2 -0
  38. package/dist/molecules/Tag/Tag.js +3 -3
  39. package/dist/molecules/Toast/Toast.js +1 -1
  40. package/dist/organisms/Filter/Filter.d.ts +2 -2
  41. package/dist/organisms/Filter/QuickFilter.d.ts +2 -2
  42. package/dist/organisms/Filter/SortMenu.d.ts +2 -2
  43. package/dist/organisms/ReleaseNote/ToggleExpanded.js +2 -2
  44. package/dist/organisms/SideBar/SideBar.d.ts +2 -2
  45. package/dist/organisms/Status/Action.d.ts +2 -2
  46. package/dist/organisms/Status/Description.d.ts +2 -2
  47. package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
  48. package/dist/organisms/Status/Title.d.ts +2 -2
  49. package/dist/organisms/Status/collections/BadRequest.d.ts +2 -2
  50. package/dist/organisms/Status/collections/GenericError.d.ts +2 -2
  51. package/dist/organisms/Status/collections/MissingPermissions.d.ts +2 -2
  52. package/dist/organisms/Status/collections/PageNotFound.d.ts +2 -2
  53. package/dist/organisms/Status/collections/ServerError.d.ts +2 -2
  54. package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
  55. package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
  56. package/dist/organisms/TopBar/Account/Account.js +1 -1
  57. package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.js +1 -1
  58. package/dist/organisms/TopBar/Actions.d.ts +2 -2
  59. package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
  60. package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
  61. package/dist/organisms/TopBar/Resources/Feedback/Feedback.const.js +1 -1
  62. package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +5 -5
  63. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Description.js +3 -3
  64. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
  65. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +2 -2
  66. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +1 -1
  67. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.js +3 -3
  68. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
  69. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +4 -4
  70. package/dist/organisms/TopBar/Resources/Feedback/hooks/useCreateWorkItemWithAttachment.js +1 -0
  71. package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
  72. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -1
  73. package/dist/organisms/TopBar/Resources/Resources.js +3 -3
  74. package/dist/providers/TableOfContentsProvider.d.ts +1 -1
  75. package/package.json +1 -1
  76. package/dist/organisms/TopBar/Resources/Feedback/Feedback.types.js +0 -1
  77. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/FullSlackResponse.js +0 -4
  78. package/dist/organisms/TopBar/Resources/Feedback/hooks/useSlackFileUpload.js +0 -1
  79. package/dist/organisms/TopBar/Resources/Feedback/hooks/useSlackPostMessage.js +0 -1
@@ -1,4 +1,4 @@
1
- import * as react22 from "react";
1
+ import * as react47 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: react22.ForwardRefExoticComponent<ProfileAvatarProps & react22.RefAttributes<HTMLDivElement>>;
10
+ declare const ProfileAvatar: react47.ForwardRefExoticComponent<ProfileAvatarProps & react47.RefAttributes<HTMLDivElement>>;
11
11
  //#endregion
12
12
  export { ProfileAvatar, ProfileAvatarProps };
@@ -1,7 +1,7 @@
1
1
  import { EditorPanel, ImageExtensionFnProps, RichTextEditorFeatures } from "../RichTextEditor.types.js";
2
2
  import { MenuButtonProps } from "./MenuButton.js";
3
3
  import { AddImageProps } from "./AddImageButton.js";
4
- import * as react35 from "react";
4
+ import * as react29 from "react";
5
5
  import { FC } from "react";
6
6
  import * as styled_components5 from "styled-components";
7
7
  import { Editor } from "@tiptap/react";
@@ -14,10 +14,10 @@ interface MenuBarProps extends Pick<ImageExtensionFnProps, 'onImageUpload'> {
14
14
  }
15
15
  declare const AmplifyBar: FC<MenuBarProps>;
16
16
  declare const EditorMenu: {
17
- Bar: styled_components_dist_types1.IStyledComponentBase<"web", styled_components5.FastOmit<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
18
- Bars: styled_components_dist_types1.IStyledComponentBase<"web", styled_components5.FastOmit<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
19
- Button: react35.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react35.RefAttributes<HTMLButtonElement>>;
20
- Section: styled_components_dist_types1.IStyledComponentBase<"web", styled_components5.FastOmit<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<react35.DetailedHTMLProps<react35.HTMLAttributes<HTMLElement>, HTMLElement>, never>>> & string;
17
+ Bar: styled_components_dist_types1.IStyledComponentBase<"web", styled_components5.FastOmit<react29.DetailedHTMLProps<react29.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react29.DetailedHTMLProps<react29.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
18
+ Bars: styled_components_dist_types1.IStyledComponentBase<"web", styled_components5.FastOmit<react29.DetailedHTMLProps<react29.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<react29.DetailedHTMLProps<react29.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
19
+ Button: react29.ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & react29.RefAttributes<HTMLButtonElement>>;
20
+ Section: styled_components_dist_types1.IStyledComponentBase<"web", styled_components5.FastOmit<react29.DetailedHTMLProps<react29.HTMLAttributes<HTMLElement>, HTMLElement>, never> & Partial<Pick<react29.DetailedHTMLProps<react29.HTMLAttributes<HTMLElement>, HTMLElement>, never>>> & string;
21
21
  AddImageButton: FC<AddImageProps>;
22
22
  };
23
23
  declare const EditorText: {
@@ -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 react24 from "react";
5
+ import * as react18 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<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>;
12
+ Styling: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<react18.DetailedHTMLProps<react18.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never> & Partial<Pick<styled_components0.FastOmit<react18.DetailedHTMLProps<react18.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof EditorStylingProps> & EditorStylingProps, never>>> & string;
13
+ Provider: react18.FC<EditorProviderProps>;
14
+ Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react18.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never> & Partial<Pick<styled_components0.FastOmit<Omit<_tiptap_react0.EditorContentProps, "ref"> & react18.RefAttributes<HTMLDivElement>, keyof RichTextContentProps> & RichTextContentProps, never>>> & string & Omit<react18.NamedExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react18.RefAttributes<HTMLDivElement>>, keyof react18.Component<any, {}, any>>;
15
+ Bar: react18.FC<MenuBarProps>;
16
16
  };
17
17
  //#endregion
18
18
  export { RichText };
@@ -1,10 +1,10 @@
1
- import * as react49 from "react";
1
+ import * as react51 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: react49.ForwardRefExoticComponent<SearchProps$1 & react49.RefAttributes<HTMLInputElement>>;
8
+ declare const Search$1: react51.ForwardRefExoticComponent<SearchProps$1 & react51.RefAttributes<HTMLInputElement>>;
9
9
  //#endregion
10
10
  export { Search$1 as Search };
@@ -1,5 +1,5 @@
1
1
  import { CommonSelectProps, GroupedSelectProps, ListSelectProps, MultiSelectCommon, SelectOptionRequired } from "../Select.types.js";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/molecules/Select/ComboBox/ComboBox.d.ts
5
5
  type ComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & MultiSelectCommon<T> & (ListSelectProps<T> | GroupedSelectProps<T>);
@@ -17,6 +17,6 @@ type ComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & Mult
17
17
  * @param showSelectedAsText - If values should be shown as "5/10 Selected", defaults to false
18
18
  * @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
19
19
  */
20
- declare function ComboBox<T extends SelectOptionRequired>(props: ComboBoxProps<T>): react_jsx_runtime2.JSX.Element;
20
+ declare function ComboBox<T extends SelectOptionRequired>(props: ComboBoxProps<T>): react_jsx_runtime1.JSX.Element;
21
21
  //#endregion
22
22
  export { ComboBox, ComboBoxProps };
@@ -1,5 +1,5 @@
1
1
  import { CommonSelectProps, GroupedSelectProps, ListSelectProps, MultiSelectCommon, PersistentSelectProps, SelectOptionRequired } from "../Select.types.js";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/molecules/Select/PersistentComboBox/PersistentComboBox.d.ts
5
5
  type PersistentComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & MultiSelectCommon<T> & PersistentSelectProps & (GroupedSelectProps<T> | ListSelectProps<T>);
@@ -18,6 +18,6 @@ type PersistentComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps
18
18
  * @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
19
19
  * @param maxHeight - Max height of the persistent wrapper below the search field, optional
20
20
  */
21
- declare function PersistentComboBox<T extends SelectOptionRequired>(props: PersistentComboBoxProps<T>): react_jsx_runtime3.JSX.Element;
21
+ declare function PersistentComboBox<T extends SelectOptionRequired>(props: PersistentComboBoxProps<T>): react_jsx_runtime2.JSX.Element;
22
22
  //#endregion
23
23
  export { PersistentComboBox, PersistentComboBoxProps };
@@ -1,5 +1,5 @@
1
1
  import { BaseChipProps, ClickableChipProps, DeletableChipProps } from "../Chip/Chip.js";
2
- import * as react55 from "react";
2
+ import * as react61 from "react";
3
3
  import "@equinor/eds-core-react";
4
4
  import * as styled_components11 from "styled-components";
5
5
  import * as styled_components_dist_types5 from "styled-components/dist/types";
@@ -11,15 +11,15 @@ interface ComboBoxChipProps {
11
11
  $lightBackground?: boolean;
12
12
  className: string;
13
13
  }
14
- declare const ComboBoxChip: styled_components_dist_types5.IStyledComponentBase<"web", styled_components11.FastOmit<styled_components11.FastOmit<((Omit<react55.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
14
+ declare const ComboBoxChip: styled_components_dist_types5.IStyledComponentBase<"web", styled_components11.FastOmit<styled_components11.FastOmit<((Omit<react61.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
15
15
  onClick?: undefined;
16
16
  onDelete?: undefined;
17
- }) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never> & Partial<Pick<styled_components11.FastOmit<((Omit<react55.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
17
+ }) | ClickableChipProps | DeletableChipProps)) & react61.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never> & Partial<Pick<styled_components11.FastOmit<((Omit<react61.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
18
18
  onClick?: undefined;
19
19
  onDelete?: undefined;
20
- }) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never>>> & string & Omit<react55.ForwardRefExoticComponent<(Omit<react55.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
20
+ }) | ClickableChipProps | DeletableChipProps)) & react61.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types5.BaseObject, keyof ComboBoxChipProps> & ComboBoxChipProps, never>>> & string & Omit<react61.ForwardRefExoticComponent<(Omit<react61.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
21
21
  onClick?: undefined;
22
22
  onDelete?: undefined;
23
- }) | ClickableChipProps | DeletableChipProps)) & react55.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react55.Component<any, {}, any>>;
23
+ }) | ClickableChipProps | DeletableChipProps)) & react61.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react61.Component<any, {}, any>>;
24
24
  //#endregion
25
25
  export { ComboBoxChip };
@@ -1,5 +1,5 @@
1
1
  import { CommonSelectProps, GroupedSelectProps, ListSelectProps, SelectOptionRequired, SingleSelectCommon } from "../Select.types.js";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/molecules/Select/SingleSelect/SingleSelect.d.ts
5
5
  type SingleSelectProps<T extends SelectOptionRequired> = CommonSelectProps<T> & SingleSelectCommon<T> & (ListSelectProps<T> | GroupedSelectProps<T>);
@@ -15,6 +15,6 @@ type SingleSelectProps<T extends SelectOptionRequired> = CommonSelectProps<T> &
15
15
  * @param onSearchFilter - Custom filter function for search, default is "item.label.match(new RegExp(searchValue, 'i'))"
16
16
  * @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
17
17
  */
18
- declare function SingleSelect<T extends SelectOptionRequired>(props: SingleSelectProps<T>): react_jsx_runtime1.JSX.Element;
18
+ declare function SingleSelect<T extends SelectOptionRequired>(props: SingleSelectProps<T>): react_jsx_runtime3.JSX.Element;
19
19
  //#endregion
20
20
  export { SingleSelect, SingleSelectProps };
@@ -1,4 +1,4 @@
1
- import * as react155 from "react";
1
+ import * as react59 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: react155.ForwardRefExoticComponent<CheckboxProps$1 & react155.RefAttributes<HTMLInputElement>>;
10
+ declare const Checkbox$1: react59.ForwardRefExoticComponent<CheckboxProps$1 & react59.RefAttributes<HTMLInputElement>>;
11
11
  //#endregion
12
12
  export { Checkbox$1 as Checkbox, CheckboxProps$1 as CheckboxProps };
@@ -1,4 +1,4 @@
1
- import * as react157 from "react";
1
+ import * as react49 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: react157.ForwardRefExoticComponent<RadioProps$1 & react157.RefAttributes<HTMLInputElement>>;
10
+ declare const Radio$1: react49.ForwardRefExoticComponent<RadioProps$1 & react49.RefAttributes<HTMLInputElement>>;
11
11
  //#endregion
12
12
  export { Radio$1 as Radio, RadioProps$1 as RadioProps };
@@ -1,4 +1,4 @@
1
- import * as react51 from "react";
1
+ import * as react53 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<react51.DetailedHTMLProps<react51.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never> & Partial<Pick<styled_components8.FastOmit<react51.DetailedHTMLProps<react51.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never>>> & string;
11
+ declare const SkeletonBase: styled_components_dist_types4.IStyledComponentBase<"web", styled_components8.FastOmit<styled_components8.FastOmit<react53.DetailedHTMLProps<react53.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never> & Partial<Pick<styled_components8.FastOmit<react53.DetailedHTMLProps<react53.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$offset"> & SkeletonBaseProps, never>>> & string;
12
12
  //#endregion
13
13
  export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
@@ -5,7 +5,7 @@ import { IconData } from "@equinor/eds-icons";
5
5
  interface Tab<T> {
6
6
  value: T;
7
7
  label: string;
8
- count?: number;
8
+ count?: number | string;
9
9
  leadingIcon?: IconData;
10
10
  trailingIcon?: IconData;
11
11
  variant?: Extract<Variants, 'warning' | 'error'>;
@@ -6,6 +6,8 @@ interface TagProps {
6
6
  color?: 'blue' | 'green' | 'purple' | 'orange' | 'yellow' | 'dark pink' | 'pink' | 'grey';
7
7
  leadingIcon?: IconData;
8
8
  trailingIcon?: IconData;
9
+ iconColor?: string;
10
+ textColor?: string;
9
11
  children: string;
10
12
  }
11
13
  declare const Tag: FC<TagProps>;
@@ -7,10 +7,10 @@ import{spacings as e}from"../../atoms/style/spacings.js";import{shape as t}from"
7
7
  background: ${({$color:e})=>n[e].background};
8
8
  min-height: 24px;
9
9
  > span {
10
- color: ${({$color:e})=>n[e].text};
10
+ color: ${({$color:e,$textColor:t})=>t??n[e].text};
11
11
  line-height: normal;
12
12
  }
13
13
  > svg {
14
- fill: ${({$color:e})=>n[e].text};
14
+ fill: ${({$color:e,$iconColor:t})=>t??n[e].text};
15
15
  }
16
- `,l=({children:e,color:t=`blue`,leadingIcon:n,trailingIcon:a})=>s(c,{$color:t,children:[n&&o(r,{data:n,size:16}),o(i,{variant:`cell_text`,group:`table`,as:`span`,children:e}),a&&o(r,{data:a,size:16})]});export{l as Tag};
16
+ `,l=({children:e,color:t=`blue`,leadingIcon:n,trailingIcon:a,textColor:l,iconColor:u})=>s(c,{$color:t,$iconColor:u,$textColor:l,children:[n&&o(r,{data:n,size:16}),o(i,{variant:`cell_text`,group:`table`,as:`span`,children:e}),a&&o(r,{data:a,size:16})]});export{l as Tag};
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{Button as t}from"../Button/Button.js";import{IconButton as n}from"../Button/IconButton/IconButton.js";import{getHeaderIcon as r}from"./Toast.utils.js";import{Container as i,DurationBar as a,Header as o}from"./Toast.styles.js";import{useEffect as s}from"react";import{Icon as c,Typography as l}from"@equinor/eds-core-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{close as f}from"@equinor/eds-icons";const p=({title:p,icon:m,onClose:h,variant:g,description:_,action:v,duration:y,ref:b})=>{if(y!==void 0&&y<=0)throw Error(`Duration must be a positive number`);s(()=>{if(!y)return;let e=setTimeout(()=>{h()},y*1e3);return()=>clearTimeout(e)},[y,h]);let x=()=>{v?.onClick(),h()},S=r({icon:m,variant:g});return d(i,{ref:b,$variant:g,children:[d(o,{children:[S&&u(c,{data:S}),u(l,{variant:`h6`,color:e.text.static_icons__default.rgba,children:p}),u(n,{icon:f,variant:`ghost`,onClick:h})]}),_&&u(l,{variant:`body_long`,color:e.text.static_icons__secondary.rgba,children:_}),v&&u(t,{label:v.text,variant:`outlined`,onClick:x}),y&&u(a,{role:`progressbar`,$variant:g,$duration:y})]})};export{p as Toast};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{Button as t}from"../Button/Button.js";import{IconButton as n}from"../Button/IconButton/IconButton.js";import{getHeaderIcon as r}from"./Toast.utils.js";import{Container as i,DurationBar as a,Header as o}from"./Toast.styles.js";import{useEffect as s}from"react";import{Icon as c,Typography as l}from"@equinor/eds-core-react";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{close as f}from"@equinor/eds-icons";const p=({title:p,icon:m,onClose:h,variant:g,description:_,action:v,duration:y,ref:b})=>{if(y!==void 0&&y<=0)throw Error(`Duration must be a positive number`);s(()=>{if(!y)return;let e=setTimeout(()=>{h()},y*1e3);return()=>clearTimeout(e)},[y,h]);let x=()=>{v?.onClick(),h()},S=r({icon:m,variant:g});return d(i,{ref:b,$variant:g,children:[d(o,{children:[S&&u(c,{data:S}),u(l,{variant:`h6`,color:e.text.static_icons__default.rgba,children:p}),u(n,{icon:f,variant:`ghost`,onClick:h})]}),_&&u(l,{variant:`body_long`,color:e.text.static_icons__secondary.rgba,children:_}),v&&u(t,{variant:`outlined`,onClick:x,children:v.text}),y&&u(a,{role:`progressbar`,$variant:g,$duration:y})]})};export{p as Toast};
@@ -1,5 +1,5 @@
1
1
  import { FilterProps } from "./Filter.types.js";
2
- import * as react_jsx_runtime6 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/organisms/Filter/Filter.d.ts
5
5
 
@@ -32,6 +32,6 @@ declare function Filter<T extends string>({
32
32
  id,
33
33
  openOnFocus,
34
34
  ...rest
35
- }: FilterProps<T>): react_jsx_runtime6.JSX.Element;
35
+ }: FilterProps<T>): react_jsx_runtime11.JSX.Element;
36
36
  //#endregion
37
37
  export { Filter };
@@ -1,6 +1,6 @@
1
1
  import { SelectOptionRequired } from "../../molecules/Select/Select.types.js";
2
2
  import { FilterProps } from "./Filter.types.js";
3
- import * as react_jsx_runtime7 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime12 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/organisms/Filter/QuickFilter.d.ts
6
6
  interface QuickFilterProps<T extends string> {
@@ -14,6 +14,6 @@ declare function QuickFilter<T extends string>({
14
14
  items,
15
15
  onQuickFilter,
16
16
  label
17
- }: QuickFilterProps<T>): react_jsx_runtime7.JSX.Element;
17
+ }: QuickFilterProps<T>): react_jsx_runtime12.JSX.Element;
18
18
  //#endregion
19
19
  export { QuickFilter };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime10 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/organisms/Filter/SortMenu.d.ts
4
4
  interface SortMenuProps<S> {
@@ -13,6 +13,6 @@ declare function SortMenu<S>({
13
13
  value,
14
14
  onChange,
15
15
  items
16
- }: SortMenuProps<S>): react_jsx_runtime5.JSX.Element;
16
+ }: SortMenuProps<S>): react_jsx_runtime10.JSX.Element;
17
17
  //#endregion
18
18
  export { SortMenu };
@@ -1,4 +1,4 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{Button as n}from"../../molecules/Button/Button.js";import r from"styled-components";import{jsx as i}from"react/jsx-runtime";import{arrow_drop_down as a,arrow_drop_up as o}from"@equinor/eds-icons";const s=r.div`
1
+ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{Button as n}from"../../molecules/Button/Button.js";import{Icon as r}from"@equinor/eds-core-react";import i from"styled-components";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{arrow_drop_down as s,arrow_drop_up as c}from"@equinor/eds-icons";const l=i.div`
2
2
  position: absolute;
3
3
  bottom: 0;
4
4
  left: 0;
@@ -10,4 +10,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
10
10
  ${e.ui.background__default.rgba} 15%
11
11
  );
12
12
  width: 100%;
13
- `,c=({expanded:e,onToggleExpanded:t})=>i(s,{children:i(n,{label:`Show ${e?`less`:`more`}`,trailingIcon:e?o:a,variant:`ghost`,onClick:t})});export{c as ToggleExpanded};
13
+ `,u=({expanded:e,onToggleExpanded:t})=>a(l,{children:o(n,{variant:`ghost`,onClick:t,trailingContent:a(r,{data:e?c:s}),children:[`Show `,e?`less`:`more`]})});export{u as ToggleExpanded};
@@ -1,4 +1,4 @@
1
- import * as react200 from "react";
1
+ import * as react195 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: react200.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react200.RefAttributes<HTMLDivElement>>;
19
+ declare const SideBar: react195.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react195.RefAttributes<HTMLDivElement>>;
20
20
  //#endregion
21
21
  export { SideBar };
@@ -1,10 +1,10 @@
1
- import * as react204 from "react";
1
+ import * as react199 from "react";
2
2
 
3
3
  //#region src/organisms/Status/Action.d.ts
4
4
  interface ActionProps {
5
5
  onClick: () => void;
6
6
  buttonText?: string;
7
7
  }
8
- declare const Action: react204.ForwardRefExoticComponent<ActionProps & react204.RefAttributes<HTMLButtonElement>>;
8
+ declare const Action: react199.ForwardRefExoticComponent<ActionProps & react199.RefAttributes<HTMLButtonElement>>;
9
9
  //#endregion
10
10
  export { Action };
@@ -1,9 +1,9 @@
1
- import * as react206 from "react";
1
+ import * as react203 from "react";
2
2
 
3
3
  //#region src/organisms/Status/Description.d.ts
4
4
  interface DescriptionProps {
5
5
  text?: string;
6
6
  }
7
- declare const Description: react206.ForwardRefExoticComponent<DescriptionProps & react206.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Description: react203.ForwardRefExoticComponent<DescriptionProps & react203.RefAttributes<HTMLHeadingElement>>;
8
8
  //#endregion
9
9
  export { Description };
@@ -1,4 +1,4 @@
1
- import * as react208 from "react";
1
+ import * as react201 from "react";
2
2
 
3
3
  //#region src/organisms/Status/MissingAccesses.d.ts
4
4
  interface AccessType {
@@ -9,6 +9,6 @@ interface MissingAccessesProps {
9
9
  accesses?: AccessType[];
10
10
  text?: string;
11
11
  }
12
- declare const MissingAccesses: react208.ForwardRefExoticComponent<MissingAccessesProps & react208.RefAttributes<HTMLDivElement>>;
12
+ declare const MissingAccesses: react201.ForwardRefExoticComponent<MissingAccessesProps & react201.RefAttributes<HTMLDivElement>>;
13
13
  //#endregion
14
14
  export { MissingAccesses };
@@ -1,9 +1,9 @@
1
- import * as react202 from "react";
1
+ import * as react197 from "react";
2
2
 
3
3
  //#region src/organisms/Status/Title.d.ts
4
4
  interface TitleProps {
5
5
  title?: string;
6
6
  }
7
- declare const Title: react202.ForwardRefExoticComponent<TitleProps & react202.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Title: react197.ForwardRefExoticComponent<TitleProps & react197.RefAttributes<HTMLHeadingElement>>;
8
8
  //#endregion
9
9
  export { Title };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 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) => react_jsx_runtime11.JSX.Element;
15
+ }: BadRequestProps) => react_jsx_runtime5.JSX.Element;
16
16
  //#endregion
17
17
  export { BadRequest };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime12 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 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) => react_jsx_runtime12.JSX.Element;
17
+ }: GenericErrorProps) => react_jsx_runtime6.JSX.Element;
18
18
  //#endregion
19
19
  export { GenericError };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime8 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime7 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/organisms/Status/collections/MissingPermissions.d.ts
4
4
  interface MissingPermissionsProps {
@@ -14,6 +14,6 @@ declare const MissingPermissions: ({
14
14
  redirectFallbackUrl,
15
15
  onBackClick,
16
16
  hideBackButton
17
- }: MissingPermissionsProps) => react_jsx_runtime8.JSX.Element;
17
+ }: MissingPermissionsProps) => react_jsx_runtime7.JSX.Element;
18
18
  //#endregion
19
19
  export { MissingPermissions };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/organisms/Status/collections/PageNotFound.d.ts
4
4
  interface PageNotFoundProps {
@@ -12,6 +12,6 @@ declare const PageNotFound: ({
12
12
  redirectFallbackUrl,
13
13
  onBackClick,
14
14
  hideBackButton
15
- }: PageNotFoundProps) => react_jsx_runtime9.JSX.Element;
15
+ }: PageNotFoundProps) => react_jsx_runtime8.JSX.Element;
16
16
  //#endregion
17
17
  export { PageNotFound };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime10 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/organisms/Status/collections/ServerError.d.ts
4
4
  interface ServerErrorProps {
@@ -12,6 +12,6 @@ declare const ServerError: ({
12
12
  redirectFallbackUrl,
13
13
  onBackClick,
14
14
  hideBackButton
15
- }: ServerErrorProps) => react_jsx_runtime10.JSX.Element;
15
+ }: ServerErrorProps) => react_jsx_runtime9.JSX.Element;
16
16
  //#endregion
17
17
  export { ServerError };
@@ -1,7 +1,7 @@
1
1
  import { ToggleGroup as ToggleGroup$1 } from "./ToggleGroup.types.js";
2
- import * as react212 from "react";
2
+ import * as react207 from "react";
3
3
 
4
4
  //#region src/organisms/ToggleGroup/ToggleGroup.d.ts
5
- declare const ToggleGroup: react212.ForwardRefExoticComponent<ToggleGroup$1 & react212.RefAttributes<HTMLDivElement>>;
5
+ declare const ToggleGroup: react207.ForwardRefExoticComponent<ToggleGroup$1 & react207.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 react210 from "react";
2
+ import * as react205 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: react210.ForwardRefExoticComponent<ToggleGroupOptionProps & react210.RefAttributes<HTMLButtonElement>>;
7
+ declare const ToggleGroupOption: react205.ForwardRefExoticComponent<ToggleGroupOptionProps & react205.RefAttributes<HTMLButtonElement>>;
8
8
  //#endregion
9
9
  export { ToggleGroupOption };
@@ -1 +1 @@
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 ee}from"./ImpersonateMenu/hooks/useMappedRoles.js";import{useStopImpersonation as s}from"./ImpersonateMenu/hooks/useStopImpersonation.js";import{ButtonWrapper as c,Container as l,EnvironmentToggleWrapper as u,TextContent as d}from"./Account.styles.js";import{impersonateUserDtoToFullName as te}from"./ImpersonateMenu/Impersonate.utils.js";import{ImpersonateMenu as f}from"./ImpersonateMenu/ImpersonateMenu.js";import{AccountAvatar as p}from"./AccountAvatar.js";import{AccountButton as m}from"./AccountButton.js";import{ActiveUserImpersonationButton as h}from"./ActiveUserImpersonationButton.js";import{ImpersonateButton as g}from"./ImpersonateButton.js";import{RoleList as _}from"./RoleList.js";import{EnvironmentToggle as ne}from"./EnvironmentToggle.js";import{StatusChips as v}from"./StatusChips.js";import{useCallback as re,useEffect as ie,useMemo as y,useRef as b,useState as x}from"react";import{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]=x(!1),[H,U]=x(!1),[W,G]=n(D,[]),K=b(null),{data:q=!0}=o(),{data:J}=a(),{mutate:Y}=s(),X=ee(J?J.roles:R??[],A),ae=J?te(J):L?.name,oe=J?J.uniqueName:L?.username,Z=()=>V(!1),Q=re(()=>{V(e=>!e),U(!1)},[]),$=()=>{U(!0),V(!1)};return ie(()=>{J&&J.appName!=null&&J.appName.toUpperCase()!=I.toUpperCase()&&Y()},[J,I,Y]),T(C,{children:[y(()=>O?O(K,Q):null,[O,Q])||w(m,{ref:K,onClick:Q,environmentToggle:W}),T(i,{open:B,title:`Account`,onClose:Z,anchorEl:K.current,children:[T(l,{children:[J&&w(h,{onClick:$}),w(p,{environmentToggle:W}),T(d,{children:[w(S,{variant:`h6`,children:ae}),w(S,{children:oe})]}),W.length>0&&w(v,{statuses:W}),X&&!k&&w(C,{children:X.length<=3?w(v,{statuses:X}):w(_,{roles:X})}),j,q&&P!==`production`&&F&&w(g,{onOpenImpersonateMenu:$,onClose:Z,onImpersonateChange:N})]}),M&&P!==`production`&&w(u,{children:w(ne,{setEnvironmentToggle:G,environmentToggle:W})}),w(c,{children:w(r,{label:`Log out`,leadingIcon:E,variant:`ghost`,onClick:z})})]}),w(f,{open:H,onClose:()=>U(!1),anchorEl:K.current,onImpersonateChange:N})]})};O.displayName=`TopBar.Account`;export{O as Account};
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:w(r,{variant:`ghost`,onClick:z,leadingContent:w(x,{data:E}),children:`Log out`})})]}),w(f,{open:H,onClose:()=>U(!1),anchorEl:K.current,onImpersonateChange:N})]})};O.displayName=`TopBar.Account`;export{O as Account};
@@ -1 +1 @@
1
- import{colors as e}from"../../../../../atoms/style/colors.js";import{useSnackbar as t}from"../../../../../providers/SnackbarProvider/SnackbarProvider.js";import{Button as n}from"../../../../../molecules/Button/Button.js";import{IconButton as r}from"../../../../../molecules/Button/IconButton/IconButton.js";import{Header as i}from"../Impersonate.styles.js";import{useDeleteImpersonation as a}from"../hooks/useDeleteImpersonation.js";import{Container as o}from"./DeleteUser.styles.js";import{RoleChip as s,RolesContainer as c,TextContent as l}from"../../Account.styles.js";import{StatusAvatar as u}from"../../StatusAvatar.js";import{Typography as d}from"@equinor/eds-core-react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{arrow_back as m,delete_to_trash as h}from"@equinor/eds-icons";const g=({user:g,onBack:_})=>{let{mutateAsync:v,isPending:y}=a(),{showSnackbar:b}=t(),x=`${g.firstName} ${g.lastName}`;return p(o,{children:[p(i,{children:[f(r,{icon:m,variant:`ghost`,onClick:_}),f(d,{variant:`h6`,children:`Delete user`})]}),p(`section`,{children:[f(d,{variant:`h4`,children:`You are deleting a user`}),p(d,{variant:`caption`,color:e.text.static_icons__tertiary.rgba,children:[`Are you sure you want to delete user "`,x,`"?`]})]}),f(u,{size:64,name:x,variant:`impersonate`}),p(l,{children:[f(d,{variant:`h6`,children:x}),f(d,{children:g.uniqueName})]}),f(c,{children:g.roles.map(e=>f(s,{children:e},e))}),p(`div`,{children:[f(n,{loading:y,leadingIcon:h,variant:`outlined`,color:`danger`,label:`Delete user`,onClick:async()=>{await v(g),b(`Deleted user "${x}" successfully`),_()}}),f(n,{label:`Cancel`,variant:`ghost`,onClick:_})]})]})};export{g as DeleteUser};
1
+ import{colors as e}from"../../../../../atoms/style/colors.js";import{useSnackbar as t}from"../../../../../providers/SnackbarProvider/SnackbarProvider.js";import{Button as n}from"../../../../../molecules/Button/Button.js";import{IconButton as r}from"../../../../../molecules/Button/IconButton/IconButton.js";import{Header as i}from"../Impersonate.styles.js";import{useDeleteImpersonation as a}from"../hooks/useDeleteImpersonation.js";import{Container as o}from"./DeleteUser.styles.js";import{RoleChip as s,RolesContainer as c,TextContent as l}from"../../Account.styles.js";import{StatusAvatar as u}from"../../StatusAvatar.js";import{Icon as d,Typography as f}from"@equinor/eds-core-react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{arrow_back as h,delete_to_trash as g}from"@equinor/eds-icons";const _=({user:_,onBack:v})=>{let{mutateAsync:y,isPending:b}=a(),{showSnackbar:x}=t(),S=`${_.firstName} ${_.lastName}`;return m(o,{children:[m(i,{children:[p(r,{icon:h,variant:`ghost`,onClick:v}),p(f,{variant:`h6`,children:`Delete user`})]}),m(`section`,{children:[p(f,{variant:`h4`,children:`You are deleting a user`}),m(f,{variant:`caption`,color:e.text.static_icons__tertiary.rgba,children:[`Are you sure you want to delete user "`,S,`"?`]})]}),p(u,{size:64,name:S,variant:`impersonate`}),m(l,{children:[p(f,{variant:`h6`,children:S}),p(f,{children:_.uniqueName})]}),p(c,{children:_.roles.map(e=>p(s,{children:e},e))}),m(`div`,{children:[p(n,{loading:b,variant:`outlined`,color:`danger`,onClick:async()=>{await y(_),x(`Deleted user "${S}" successfully`),v()},leadingContent:p(d,{data:g}),children:`Delete user`}),p(n,{variant:`ghost`,onClick:v,children:`Cancel`})]})]})};export{_ as DeleteUser};
@@ -1,7 +1,7 @@
1
- import * as react198 from "react";
1
+ import * as react193 from "react";
2
2
  import { HTMLAttributes } from "react";
3
3
 
4
4
  //#region src/organisms/TopBar/Actions.d.ts
5
- declare const Actions: react198.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react198.RefAttributes<HTMLDivElement>>;
5
+ declare const Actions: react193.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react193.RefAttributes<HTMLDivElement>>;
6
6
  //#endregion
7
7
  export { Actions };
@@ -1,5 +1,5 @@
1
1
  import { Field } from "../../../atoms/types/Field.js";
2
- import * as react196 from "react";
2
+ import * as react191 from "react";
3
3
 
4
4
  //#region src/organisms/TopBar/FieldMenu/FieldMenu.d.ts
5
5
  interface FieldMenuProps {
@@ -8,6 +8,6 @@ interface FieldMenuProps {
8
8
  itemNameSingular?: string;
9
9
  showAccessITLink?: boolean;
10
10
  }
11
- declare const FieldMenu: react196.ForwardRefExoticComponent<FieldMenuProps & react196.RefAttributes<HTMLDivElement>>;
11
+ declare const FieldMenu: react191.ForwardRefExoticComponent<FieldMenuProps & react191.RefAttributes<HTMLDivElement>>;
12
12
  //#endregion
13
13
  export { FieldMenu };
@@ -1,4 +1,4 @@
1
- import * as react195 from "react";
1
+ import * as react213 from "react";
2
2
  import { Dispatch, FC, ReactNode, SetStateAction } from "react";
3
3
 
4
4
  //#region src/organisms/TopBar/Notifications/NotificationProvider.d.ts
@@ -6,7 +6,7 @@ interface NotificationContext {
6
6
  setIsOpen: Dispatch<SetStateAction<boolean>>;
7
7
  isOpen: boolean;
8
8
  }
9
- declare const NotificationContext: react195.Context<NotificationContext | undefined>;
9
+ declare const NotificationContext: react213.Context<NotificationContext | undefined>;
10
10
  declare const useNotification: () => NotificationContext;
11
11
  //#endregion
12
12
  export { useNotification };
@@ -1 +1 @@
1
- const e=1048575,t=`serviceNowIncident`,n=`slackPostMessage`,r=`slackFileUpload`,i=`.equinor.com`,a=`There was an error with the request`,o=1e3*60*60,s={feedbackContent:{title:``,description:``,url:``,urgency:``},serviceNowRequestResponse:{status:`idle`}};export{s as DEFAULT_FEEDBACK_LOCAL_STORAGE,a as DEFAULT_REQUEST_ERROR_MESSAGE,i as EQUINOR_EMAIL_SUFFIX,e as MAX_FILE_SIZE_BYTES,o as ONE_HOUR_IN_MS,t as SERVICE_NOW_QUERY_KEY,r as SLACK_FILE_QUERY_KEY,n as SLACK_POST_QUERY_KEY};
1
+ import{BugSeverity as e}from"@equinor/subsurface-app-management";const t=1048575,n=`serviceNowIncident`,r=`createWorkItem`,i=`.equinor.com`,a=`There was an error with the request`,o=1e3*60*60,s=[e.DOES_NOT_AFFECT_ME,e.IMPEDES_MY_PROGRESS,e.UNABLE_TO_WORK],c=Object.values(e).sort((e,t)=>s.indexOf(e)-s.indexOf(t)),l={feedbackContent:{title:``,description:``,url:``},serviceNowRequestResponse:{status:`idle`}};export{r as CREATE_WORK_ITEM_QUERY_KEY,l as DEFAULT_FEEDBACK_LOCAL_STORAGE,a as DEFAULT_REQUEST_ERROR_MESSAGE,i as EQUINOR_EMAIL_SUFFIX,t as MAX_FILE_SIZE_BYTES,o as ONE_HOUR_IN_MS,n as SERVICE_NOW_QUERY_KEY,c as SORTED_BUG_SEVERITY_OPTIONS};
@@ -1,8 +1,8 @@
1
- import"../../../../atoms/enums/Environment.js";import{environment as e}from"../../../../atoms/utils/auth_environment.js";import{formatDate as t}from"../../../../atoms/utils/date.js";import{capitalize as n}from"../../../../atoms/utils/string.js";import"./Feedback.types.js";import{ServiceNowUrgency as r}from"@equinor/subsurface-app-management";const{getAppName:i,getEnvironmentName:a}=e,o=e=>e.urgency===`I am not impacted`?`:large_yellow_circle:`:e.urgency===`It impedes my progress`?`:large_orange_circle:`:`:red_circle:`,s=e=>{let t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new DOMException(`Problem parsing input file.`))},t.onload=()=>{n(t.result)},t.readAsDataURL(e)})},c=e=>{switch(e){case`I am unable to work`:return r.NORMAL;case`It impedes my progress`:return r.NORMAL;case`I am not impacted`:return r.NORMAL}},l=(e,t)=>{let r=`Url location of bug: ${e.url} \n`,i=`Severity of bug: ${e.urgency} \n`,a=`Field: ${n(t??``)} \n`,o=`Browser: ${p()} \n`;return`${e.url?r:``}
1
+ import"../../../../atoms/enums/Environment.js";import{environment as e}from"../../../../atoms/utils/auth_environment.js";import{formatDate as t}from"../../../../atoms/utils/date.js";import{capitalize as n}from"../../../../atoms/utils/string.js";import{BugSeverity as r,ServiceNowUrgency as i,WorkItemType as a}from"@equinor/subsurface-app-management";const{getAppName:o,getEnvironmentName:s}=e,c=e=>e.urgency===r.DOES_NOT_AFFECT_ME?`:large_yellow_circle:`:e.urgency===r.IMPEDES_MY_PROGRESS?`:large_orange_circle:`:`:red_circle:`,l=e=>{let t=new FileReader;return new Promise((n,r)=>{t.onerror=()=>{t.abort(),r(new DOMException(`Problem parsing input file.`))},t.onload=()=>{n(t.result)},t.readAsDataURL(e)})},u=e=>{switch(e){case r.UNABLE_TO_WORK:case r.IMPEDES_MY_PROGRESS:case r.DOES_NOT_AFFECT_ME:default:return i.NORMAL}},d=e=>{switch(e){case r.UNABLE_TO_WORK:return`I am unable to work`;case r.IMPEDES_MY_PROGRESS:return`It impedes my progress`;case r.DOES_NOT_AFFECT_ME:return`It does not affect me`;default:return`Not found`}},f=(e,t)=>{let r=`Url location of bug: ${e.url} \n`,i=`Severity of bug: ${e.urgency?d(e.urgency):`Not found`} \n`,a=`Field: ${n(t??``)} \n`,o=`Browser: ${g()} \n`;return`${e.url?r:``}
2
2
  ${e.urgency?i:``}
3
3
  ${t?a:``}
4
4
  ${o}
5
- ${e.description} \n \n User agent string: ${navigator.userAgent}`},u=(e,t)=>{let n=t?`selfservice?id=ticket&table=incident&sys_id=`:`now/nav/ui/classic/params/target/incident.do%3Fsys_id%3D`;return`https://equinor${a(import.meta.env.VITE_ENVIRONMENT_NAME)===`production`?``:`test`}.service-now.com/${n}${e}`},d=()=>{if(navigator.userAgent.includes(`Edg`))return`Edge`;if(navigator.userAgent.includes(`Chrome`))return`Chrome`;if(navigator.userAgent.includes(`Safari`))return`Safari`;if(navigator.userAgent.includes(`Firefox`))return`Firefox`},f=e=>{let t=e;e===`Edge`&&(t=`Edg`);let n=RegExp(`${t}/(\\d+(?:\\.\\d+)+)`);return navigator.userAgent.match(n)?.[1]},p=()=>{let e=d();return e?`${e} (${f(e)})`:`Not found`},m=(e,r,a,s,c)=>{let l=a===`bug`?`:bug: Bug report`:`:bulb: Suggestion`,d=[],f=[];f.push({type:`mrkdwn`,text:`*Title* \n ${e.title}`}),d.push({type:`mrkdwn`,text:` ${t(new Date,{format:`DD. month YYYY`})}`}),e.url&&d.push({type:`mrkdwn`,text:`*<${e.url}|Error URL>*`}),e.urgency&&f.push({type:`mrkdwn`,text:`*Severity* \n ${o(e)} ${e.urgency}`});let m=[{type:`header`,text:{type:`plain_text`,text:l,emoji:!0}},{type:`section`,fields:d},{type:`section`,fields:f},{type:`section`,fields:[{type:`mrkdwn`,text:`*Application*
6
- `+i(import.meta.env.VITE_NAME)},{type:`mrkdwn`,text:`*User* \n ${s}`}]},{type:`section`,fields:[{type:`mrkdwn`,text:`*Browser*
7
- `+p()},{type:`mrkdwn`,text:`*Field* \n ${n(r??`Not found`)}`}]},{type:`section`,text:{type:`mrkdwn`,text:`*Description*
8
- `+e.description}}];return c&&m.push({type:`section`,text:{type:`mrkdwn`,text:`*<${u(c)}|:link: Click to open the ticket in Service Now>*`}}),m.push({type:`divider`}),JSON.stringify(m)};export{l as createServiceNowDescription,u as createServiceNowUrl,m as createSlackMessage,c as getUrgencyNumber,s as readUploadedFileAsText};
5
+ ${e.description} \n \n User agent string: ${navigator.userAgent}`},p=(e,t)=>{let n=t?`selfservice?id=ticket&table=incident&sys_id=`:`now/nav/ui/classic/params/target/incident.do%3Fsys_id%3D`;return`https://equinor${s(import.meta.env.VITE_ENVIRONMENT_NAME)===`production`?``:`test`}.service-now.com/${n}${e}`},m=()=>{if(navigator.userAgent.includes(`Edg`))return`Edge`;if(navigator.userAgent.includes(`Chrome`))return`Chrome`;if(navigator.userAgent.includes(`Safari`))return`Safari`;if(navigator.userAgent.includes(`Firefox`))return`Firefox`},h=e=>{let t=e;e===`Edge`&&(t=`Edg`);let n=RegExp(`${t}/(\\d+(?:\\.\\d+)+)`);return navigator.userAgent.match(n)?.[1]},g=()=>{let e=m();return e?`${e} (${h(e)})`:`Not found`},_=(e,r,i,s,l)=>{let u=i===a.BUG?`:bug: Bug report`:`:bulb: Suggestion`,f=[],m=[];m.push({type:`mrkdwn`,text:`*Title* \n ${e.title}`}),f.push({type:`mrkdwn`,text:` ${t(new Date,{format:`DD. month YYYY`})}`}),e.url&&f.push({type:`mrkdwn`,text:`*<${e.url}|Error URL>*`}),e.urgency&&m.push({type:`mrkdwn`,text:`*Severity* \n ${c(e)} ${d(e.urgency)}`});let h=[{type:`header`,text:{type:`plain_text`,text:u,emoji:!0}},{type:`section`,fields:f},{type:`section`,fields:m},{type:`section`,fields:[{type:`mrkdwn`,text:`*Application*
6
+ `+o(import.meta.env.VITE_NAME)},{type:`mrkdwn`,text:`*User* \n ${s}`}]},{type:`section`,fields:[{type:`mrkdwn`,text:`*Browser*
7
+ `+g()},{type:`mrkdwn`,text:`*Field* \n ${n(r??`Not found`)}`}]},{type:`section`,text:{type:`mrkdwn`,text:`*Description*
8
+ `+e.description}}];return l&&h.push({type:`section`,text:{type:`mrkdwn`,text:`*<${p(l)}|:link: Click to open the ticket in Service Now>*`}}),h.push({type:`divider`}),JSON.stringify(h)};export{f as createServiceNowDescription,p as createServiceNowUrl,_ as createSlackMessage,g as getBrowserInfo,u as getServiceNowUrgencyNumber,d as getUrgencyDisplayText,l as readUploadedFileAsText};