@equinor/amplify-component-lib 9.16.1 → 9.17.0-beta.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 (122) hide show
  1. package/dist/atoms/hooks/useFaqsInApplication.js +1 -1
  2. package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
  3. package/dist/atoms/hooks/usePrefetchRichTextImages.js +1 -1
  4. package/dist/atoms/hooks/useRichTextImage.js +1 -1
  5. package/dist/atoms/hooks/useSelect.d.ts +3 -3
  6. package/dist/atoms/hooks/useSelect.js +1 -1
  7. package/dist/atoms/index.d.ts +0 -1
  8. package/dist/atoms/index.js +1 -1
  9. package/dist/atoms/utils/auth_environment.js +1 -1
  10. package/dist/atoms/utils/date.js +1 -1
  11. package/dist/atoms/utils/map.js +1 -1
  12. package/dist/atoms/utils/size.js +1 -1
  13. package/dist/atoms/utils/url.js +1 -1
  14. package/dist/deprecated/IconToggleButton.js +1 -1
  15. package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
  16. package/dist/index.d.ts +1 -5
  17. package/dist/index.js +1 -1
  18. package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +1 -1
  19. package/dist/molecules/Badge/Badge.styles.js +1 -1
  20. package/dist/molecules/Button/Button.js +1 -1
  21. package/dist/molecules/Chip/Chip.styles.js +1 -1
  22. package/dist/molecules/ContentMenu/ContentMenu.js +1 -1
  23. package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
  24. package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
  25. package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
  26. package/dist/molecules/FileProgress/FileProgress.utils.js +1 -1
  27. package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
  28. package/dist/molecules/IconCell/IconCell.utils.js +1 -1
  29. package/dist/molecules/InfoElement/CopyText.js +1 -1
  30. package/dist/molecules/ListItem/ListItem.d.ts +2 -2
  31. package/dist/molecules/OptionDrawer/OptionDrawer.utils.js +1 -1
  32. package/dist/molecules/ProfileAvatar/ProfileAvatar.js +1 -1
  33. package/dist/molecules/RichTextEditor/MenuBar/AddImageButton.js +1 -1
  34. package/dist/molecules/RichTextEditor/MenuBar/MenuBar.d.ts +5 -5
  35. package/dist/molecules/RichTextEditor/MenuBar/Table/TableColumn.js +1 -1
  36. package/dist/molecules/RichTextEditor/MenuBar/Table/TableMerge.js +1 -1
  37. package/dist/molecules/RichTextEditor/MenuBar/Table/TableRow.js +1 -1
  38. package/dist/molecules/RichTextEditor/MenuBar/Table/ToggleTable.js +1 -1
  39. package/dist/molecules/RichTextEditor/MenuBar/TextColor.js +1 -1
  40. package/dist/molecules/RichTextEditor/custom-extensions/ExtendedImage.js +1 -1
  41. package/dist/molecules/RichTextEditor/index.d.ts +1 -1
  42. package/dist/molecules/Search/Search.d.ts +2 -2
  43. package/dist/molecules/Select/AddTagItem.js +1 -1
  44. package/dist/molecules/Select/Select.styles.d.ts +4 -4
  45. package/dist/molecules/Select/SelectMenuItem.js +1 -1
  46. package/dist/molecules/SelectionControls/Checkbox/Checkbox.d.ts +2 -2
  47. package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
  48. package/dist/molecules/SelectionControls/Switch/Switch.d.ts +2 -2
  49. package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
  50. package/dist/molecules/Stepper/Step/Step.js +1 -1
  51. package/dist/molecules/Stepper/Stepper.js +1 -1
  52. package/dist/molecules/Waves/Waves.js +1 -1
  53. package/dist/molecules/index.d.ts +0 -3
  54. package/dist/molecules/index.js +1 -1
  55. package/dist/organisms/Faq/Category/Category.js +2 -2
  56. package/dist/organisms/Faq/Category/Question.js +1 -1
  57. package/dist/organisms/Faq/Faq.js +1 -1
  58. package/dist/organisms/Faq/Header.js +2 -2
  59. package/dist/organisms/FieldSelector/FieldSelector.js +1 -1
  60. package/dist/organisms/Filter/ButtonWithMenu.js +1 -1
  61. package/dist/organisms/ReleaseNote/ReleaseNote.d.ts +3 -3
  62. package/dist/organisms/ReleaseNote/ReleaseNote.js +1 -1
  63. package/dist/organisms/ReleaseNote/ReleaseNote.utils.js +1 -1
  64. package/dist/organisms/SideBar/MenuItem/BasicMenuItem.js +1 -1
  65. package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +1 -1
  66. package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +1 -1
  67. package/dist/organisms/SideBar/MenuItem/MenuItem.utils.js +1 -1
  68. package/dist/organisms/SideBar/SideBar.d.ts +2 -2
  69. package/dist/organisms/Status/Action.d.ts +2 -2
  70. package/dist/organisms/Status/Description.d.ts +2 -2
  71. package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
  72. package/dist/organisms/Status/Title.d.ts +2 -2
  73. package/dist/organisms/Status/collections/BadRequest.js +2 -2
  74. package/dist/organisms/Status/collections/GenericError.js +1 -1
  75. package/dist/organisms/Status/collections/MissingAccessToApp.js +1 -1
  76. package/dist/organisms/Status/collections/MissingPermissions.js +1 -1
  77. package/dist/organisms/Status/collections/PageNotFound.js +2 -2
  78. package/dist/organisms/Status/collections/ServerError.js +2 -2
  79. package/dist/organisms/TableOfContents/TableOfContents.styles.js +1 -1
  80. package/dist/organisms/Template/Template.d.ts +3 -3
  81. package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
  82. package/dist/organisms/ToggleGroup/ToggleGroup.js +10 -1
  83. package/dist/organisms/ToggleGroup/ToggleGroup.types.d.ts +1 -0
  84. package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
  85. package/dist/organisms/TopBar/Account/ImpersonateButton.js +1 -1
  86. package/dist/organisms/TopBar/Account/ImpersonateMenu/Actions.js +1 -1
  87. package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.js +1 -1
  88. package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.js +1 -1
  89. package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.js +1 -1
  90. package/dist/organisms/TopBar/Actions.d.ts +2 -2
  91. package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
  92. package/dist/organisms/TopBar/Guidelines/Colorbox.d.ts +2 -2
  93. package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
  94. package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +2 -2
  95. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
  96. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +1 -1
  97. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.js +1 -1
  98. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.js +1 -1
  99. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Url.js +1 -1
  100. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +1 -1
  101. package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
  102. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/Header/Header.js +1 -1
  103. package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -1
  104. package/dist/organisms/TopBar/TopBar.styles.js +1 -1
  105. package/dist/organisms/TopBar/Tutorials/TutorialItem.js +1 -1
  106. package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
  107. package/dist/providers/ReleaseNotesProvider.js +1 -1
  108. package/dist/providers/SideBarProvider.js +1 -1
  109. package/dist/providers/StepperProvider.js +1 -1
  110. package/dist/providers/TableOfContentsProvider.js +1 -1
  111. package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
  112. package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +1 -1
  113. package/package.json +5 -9
  114. package/dist/atoms/hooks/useSearchParameter.d.ts +0 -12
  115. package/dist/atoms/hooks/useSearchParameter.js +0 -1
  116. package/dist/molecules/Sieve/Filter.d.ts +0 -10
  117. package/dist/molecules/Sieve/Filter.js +0 -1
  118. package/dist/molecules/Sieve/Sieve.d.ts +0 -7
  119. package/dist/molecules/Sieve/Sieve.js +0 -1
  120. package/dist/molecules/Sieve/Sieve.styles.js +0 -43
  121. package/dist/molecules/Sieve/Sieve.types.d.ts +0 -28
  122. package/dist/molecules/Sieve/Sort.js +0 -1
@@ -10,7 +10,7 @@ import * as styled_components_dist_types1 from "styled-components/dist/types";
10
10
  declare const RichText: {
11
11
  Styling: styled_components_dist_types1.IStyledComponentBase<"web", styled_components_dist_types1.Substitute<react28.DetailedHTMLProps<react28.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, EditorStylingProps>> & string;
12
12
  Provider: react28.FC<EditorProviderProps>;
13
- Content: styled_components_dist_types1.IStyledComponentBase<"web", styled_components_dist_types1.Substitute<Omit<_tiptap_react0.EditorContentProps, "ref"> & react28.RefAttributes<HTMLDivElement>, RichTextContentProps>> & string & Omit<react28.MemoExoticComponent<react28.ForwardRefExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react28.RefAttributes<HTMLDivElement>>>, keyof react28.Component<any, {}, any>>;
13
+ Content: styled_components_dist_types1.IStyledComponentBase<"web", styled_components_dist_types1.Substitute<Omit<_tiptap_react0.EditorContentProps, "ref"> & react28.RefAttributes<HTMLDivElement>, RichTextContentProps>> & string & Omit<react28.NamedExoticComponent<Omit<_tiptap_react0.EditorContentProps, "ref"> & react28.RefAttributes<HTMLDivElement>>, keyof react28.Component<any, {}, any>>;
14
14
  Bar: react28.FC<MenuBarProps>;
15
15
  };
16
16
  //#endregion
@@ -1,7 +1,7 @@
1
- import * as react45 from "react";
1
+ import * as react44 from "react";
2
2
  import { SearchProps } from "@equinor/eds-core-react";
3
3
 
4
4
  //#region src/molecules/Search/Search.d.ts
5
- declare const Search$1: react45.ForwardRefExoticComponent<SearchProps & react45.RefAttributes<HTMLInputElement>>;
5
+ declare const Search$1: react44.ForwardRefExoticComponent<SearchProps & react44.RefAttributes<HTMLInputElement>>;
6
6
  //#endregion
7
7
  export { Search$1 as Search };
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{MenuItemWrapper as t,StyledMenuItem as n}from"./Select.styles.js";import{Icon as r}from"@equinor/eds-core-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{add_box as o}from"@equinor/eds-icons";const s=({itemRefs:s,onItemKeyDown:c,index:l,onAddItem:u,addItemSingularWord:d,children:f})=>{let p=e=>{e.preventDefault(),e.key===`Enter`?u():c(e)};return i(t,{children:a(n,{index:l,ref:e=>{s.current[l]=e},onClick:u,onKeyDownCapture:p,children:[i(r,{data:o,color:e.interactive.primary__resting.rgba}),a(`span`,{children:[`Add "`,f,`" as new `,d]})]})})};export{s as AddTagItem};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{MenuItemWrapper as t,StyledMenuItem as n}from"./Select.styles.js";import{Icon as r}from"@equinor/eds-core-react";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{add_box as o}from"@equinor/eds-icons";const s=({itemRefs:s,onItemKeyDown:c,index:l,onAddItem:u,addItemSingularWord:d,children:f})=>i(t,{children:a(n,{index:l,ref:e=>{s.current[l]=e},onClick:u,onKeyDownCapture:e=>{e.preventDefault(),e.key===`Enter`?u():c(e)},children:[i(r,{data:o,color:e.interactive.primary__resting.rgba}),a(`span`,{children:[`Add "`,f,`" as new `,d]})]})});export{s as AddTagItem};
@@ -1,5 +1,5 @@
1
1
  import { BaseChipProps, ClickableChipProps, DeletableChipProps } from "../Chip/Chip.js";
2
- import * as react49 from "react";
2
+ import * as react48 from "react";
3
3
  import "@equinor/eds-core-react";
4
4
  import "styled-components";
5
5
  import * as styled_components_dist_types10 from "styled-components/dist/types";
@@ -11,12 +11,12 @@ interface ComboBoxChipProps {
11
11
  $lightBackground?: boolean;
12
12
  className: string;
13
13
  }
14
- declare const ComboBoxChip: styled_components_dist_types10.IStyledComponentBase<"web", styled_components_dist_types10.Substitute<((Omit<react49.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
14
+ declare const ComboBoxChip: styled_components_dist_types10.IStyledComponentBase<"web", styled_components_dist_types10.Substitute<((Omit<react48.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
15
15
  onClick?: undefined;
16
16
  onDelete?: undefined;
17
- }) | ClickableChipProps | DeletableChipProps)) & react49.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types10.BaseObject, ComboBoxChipProps>> & string & Omit<react49.ForwardRefExoticComponent<(Omit<react49.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
17
+ }) | ClickableChipProps | DeletableChipProps)) & react48.RefAttributes<HTMLDivElement | HTMLButtonElement>) & styled_components_dist_types10.BaseObject, ComboBoxChipProps>> & string & Omit<react48.ForwardRefExoticComponent<(Omit<react48.HTMLAttributes<HTMLDivElement | HTMLButtonElement>, "onClick"> & ((BaseChipProps & {
18
18
  onClick?: undefined;
19
19
  onDelete?: undefined;
20
- }) | ClickableChipProps | DeletableChipProps)) & react49.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react49.Component<any, {}, any>>;
20
+ }) | ClickableChipProps | DeletableChipProps)) & react48.RefAttributes<HTMLDivElement | HTMLButtonElement>>, keyof react48.Component<any, {}, any>>;
21
21
  //#endregion
22
22
  export { ComboBoxChip };
@@ -1 +1 @@
1
- import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{spacings as t}from"../../atoms/style/spacings.js";import{getChildOffset as n}from"./Select.utils.js";import{MenuItemSpacer as r,MenuItemWrapper as i,SmallButton as a,StyledMenuItem as o}from"./Select.styles.js";import{getParentIcon as s,getParentState as c}from"./SelectMenuItem.utils.js";import{useMemo as l,useRef as u,useState as d}from"react";import{Icon as f}from"@equinor/eds-core-react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import{checkbox as g,checkbox_outline as _,chevron_down as v,chevron_right as y}from"@equinor/eds-icons";const{colors:b}=e,x=e=>{let{index:S,childOffset:C,depth:w=0,item:T,itemRefs:E,onItemKeyDown:D,onItemSelect:O,parentHasNestedItems:k=!1,CustomMenuItemComponent:A}=e,[j,M]=d(!1),N=u(-1),P=u([]),F=`values`in e?e.values.map(({value:e})=>e):[],I=F.includes(T.value),L=l(()=>`value`in e?_:s(T,e.values),[T,e]),R=l(()=>`value`in e?`none`:c(T,e.values),[T,e]),z=l(()=>Array(w).fill(0).map((e,t)=>m(r,{},`spacer-${e+t}`)),[w]),B=e=>{e.preventDefault(),O(T)},V=e=>{e.stopPropagation(),M(e=>!e)},H=e=>{e.key===`ArrowDown`?N.current+=1:e.key===`ArrowUp`&&--N.current,N.current<=-1?(E.current[S]?.focus(),N.current=-1):N.current+C===P.current.length?(N.current=-1,D(e),M(!1)):N.current>=0&&N.current<P.current.length-C&&P.current[N.current+C]?.focus()},U=e=>{!j&&e.key===`ArrowDown`||e.key===`ArrowUp`?D(e):e.key===`ArrowRight`||e.key===`ArrowLeft`?M(e=>!e):j&&e.key===`ArrowDown`&&N.current===-1&&(N.current=0,P.current[N.current+C]?.focus())};return T.children&&T.children.length>0&&`values`in e?h(p,{children:[h(i,{style:{paddingLeft:w===0?t.small:0},children:[z,m(a,{variant:`ghost_icon`,onClick:V,"data-testid":`toggle-button`,children:m(f,{color:b.interactive.primary__resting.rgba,data:j?v:y})}),m(o,{$depth:w,ref:e=>{E.current[S]=e},index:S,closeMenuOnClick:!1,onKeyDownCapture:U,onClick:B,children:A?m(A,{item:T,selectedState:R}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:L}),m(`span`,{children:T.label})]})})]}),j&&T.children.map((t,r)=>m(x,{index:C+r,childOffset:C+n(T.children,r),depth:w+1,item:t,itemRefs:P,values:e.values,onItemKeyDown:H,onItemSelect:O,parentHasNestedItems:!0,CustomMenuItemComponent:A},`child-${r}-${t.value}-${T.value}`))]}):`values`in e?h(i,{children:[z,m(o,{$depth:w,$paddedLeft:k,ref:e=>{E.current[S]=e},index:S,tabIndex:w,closeMenuOnClick:!1,onKeyDownCapture:D,onClick:B,children:A?m(A,{item:T,selectedState:I?`selected`:`none`}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:I?g:_}),m(`span`,{children:T.label})]})})]}):m(i,{children:m(o,{$depth:w,$selected:e.value&&T.value===e.value.value,ref:e=>{E.current[S]=e},index:S,onKeyDownCapture:D,onClick:B,children:A?m(A,{item:T,selectedState:e.value&&T.value===e.value.value?`selected`:`none`}):m(`span`,{children:T.label})})})};export{x as SelectMenuItem};
1
+ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{spacings as t}from"../../atoms/style/spacings.js";import{getChildOffset as n}from"./Select.utils.js";import{MenuItemSpacer as r,MenuItemWrapper as i,SmallButton as a,StyledMenuItem as o}from"./Select.styles.js";import{getParentIcon as s,getParentState as c}from"./SelectMenuItem.utils.js";import{useMemo as l,useRef as u,useState as d}from"react";import{Icon as f}from"@equinor/eds-core-react";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import{checkbox as g,checkbox_outline as _,chevron_down as v,chevron_right as y}from"@equinor/eds-icons";const{colors:b}=e,x=e=>{let{index:S,childOffset:C,depth:w=0,item:T,itemRefs:E,onItemKeyDown:D,onItemSelect:O,parentHasNestedItems:k=!1,CustomMenuItemComponent:A}=e,[j,M]=d(!1),N=u(-1),P=u([]),F=(`values`in e?e.values.map(({value:e})=>e):[]).includes(T.value),I=l(()=>`value`in e?_:s(T,e.values),[T,e]),L=l(()=>`value`in e?`none`:c(T,e.values),[T,e]),R=l(()=>Array(w).fill(0).map((e,t)=>m(r,{},`spacer-${e+t}`)),[w]),z=e=>{e.preventDefault(),O(T)},B=e=>{e.stopPropagation(),M(e=>!e)},V=e=>{e.key===`ArrowDown`?N.current+=1:e.key===`ArrowUp`&&--N.current,N.current<=-1?(E.current[S]?.focus(),N.current=-1):N.current+C===P.current.length?(N.current=-1,D(e),M(!1)):N.current>=0&&N.current<P.current.length-C&&P.current[N.current+C]?.focus()},H=e=>{!j&&e.key===`ArrowDown`||e.key===`ArrowUp`?D(e):e.key===`ArrowRight`||e.key===`ArrowLeft`?M(e=>!e):j&&e.key===`ArrowDown`&&N.current===-1&&(N.current=0,P.current[N.current+C]?.focus())};return T.children&&T.children.length>0&&`values`in e?h(p,{children:[h(i,{style:{paddingLeft:w===0?t.small:0},children:[R,m(a,{variant:`ghost_icon`,onClick:B,"data-testid":`toggle-button`,children:m(f,{color:b.interactive.primary__resting.rgba,data:j?v:y})}),m(o,{$depth:w,ref:e=>{E.current[S]=e},index:S,closeMenuOnClick:!1,onKeyDownCapture:H,onClick:z,children:A?m(A,{item:T,selectedState:L}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:I}),m(`span`,{children:T.label})]})})]}),j&&T.children.map((t,r)=>m(x,{index:C+r,childOffset:C+n(T.children,r),depth:w+1,item:t,itemRefs:P,values:e.values,onItemKeyDown:V,onItemSelect:O,parentHasNestedItems:!0,CustomMenuItemComponent:A},`child-${r}-${t.value}-${T.value}`))]}):`values`in e?h(i,{children:[R,m(o,{$depth:w,$paddedLeft:k,ref:e=>{E.current[S]=e},index:S,tabIndex:w,closeMenuOnClick:!1,onKeyDownCapture:D,onClick:z,children:A?m(A,{item:T,selectedState:F?`selected`:`none`}):h(p,{children:[m(f,{color:b.interactive.primary__resting.rgba,data:F?g:_}),m(`span`,{children:T.label})]})})]}):m(i,{children:m(o,{$depth:w,$selected:e.value&&T.value===e.value.value,ref:e=>{E.current[S]=e},index:S,onKeyDownCapture:D,onClick:z,children:A?m(A,{item:T,selectedState:e.value&&T.value===e.value.value?`selected`:`none`}):m(`span`,{children:T.label})})})};export{x as SelectMenuItem};
@@ -1,4 +1,4 @@
1
- import * as react96 from "react";
1
+ import * as react97 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: react96.ForwardRefExoticComponent<CheckboxProps$1 & react96.RefAttributes<HTMLInputElement>>;
10
+ declare const Checkbox$1: react97.ForwardRefExoticComponent<CheckboxProps$1 & react97.RefAttributes<HTMLInputElement>>;
11
11
  //#endregion
12
12
  export { Checkbox$1 as Checkbox, CheckboxProps$1 as CheckboxProps };
@@ -1,4 +1,4 @@
1
- import * as react100 from "react";
1
+ import * as react99 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: react100.ForwardRefExoticComponent<RadioProps$1 & react100.RefAttributes<HTMLInputElement>>;
10
+ declare const Radio$1: react99.ForwardRefExoticComponent<RadioProps$1 & react99.RefAttributes<HTMLInputElement>>;
11
11
  //#endregion
12
12
  export { Radio$1 as Radio, RadioProps$1 as RadioProps };
@@ -1,10 +1,10 @@
1
- import * as react102 from "react";
1
+ import * as react101 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: react102.ForwardRefExoticComponent<SwitchProps$1 & react102.RefAttributes<HTMLInputElement>>;
8
+ declare const Switch$1: react101.ForwardRefExoticComponent<SwitchProps$1 & react101.RefAttributes<HTMLInputElement>>;
9
9
  //#endregion
10
10
  export { Switch$1 as Switch, SwitchProps$1 as SwitchProps };
@@ -1,4 +1,4 @@
1
- import * as react47 from "react";
1
+ import * as react46 from "react";
2
2
  import * as styled_components_dist_types8 from "styled-components/dist/types";
3
3
  import * as styled_components_dist_models_Keyframes0 from "styled-components/dist/models/Keyframes";
4
4
 
@@ -7,6 +7,6 @@ declare const skeletonBaseloading: styled_components_dist_models_Keyframes0.defa
7
7
  interface SkeletonBaseProps {
8
8
  $offset?: number;
9
9
  }
10
- declare const SkeletonBase: styled_components_dist_types8.IStyledComponentBase<"web", styled_components_dist_types8.Substitute<react47.DetailedHTMLProps<react47.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
10
+ declare const SkeletonBase: styled_components_dist_types8.IStyledComponentBase<"web", styled_components_dist_types8.Substitute<react46.DetailedHTMLProps<react46.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
11
11
  //#endregion
12
12
  export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
@@ -12,4 +12,4 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
12
12
  cursor: pointer;
13
13
  }
14
14
  `}
15
- `,d=({index:t,onlyShowCurrentStepLabel:o=!1,children:s})=>{let{currentStep:d,setCurrentStep:f,isStepAtIndexDisabled:p}=n(),m=p(t),h=i(()=>t<d?`body_short`:`body_short_bold`,[d,t]),g=i(()=>t>d||m?e.interactive.disabled__text.rgba:e.text.static_icons__default.rgba,[d,t,m]),_=()=>{t<d&&!m&&f(t)};return l(u,{"data-testid":`step`,$clickable:t<d,onClick:_,$disabled:m,"aria-disabled":m,role:`button`,children:[c(r,{index:t,disabled:m}),(!o||d===t)&&c(a,{variant:h,color:g,children:s})]})};export{d as default};
15
+ `,d=({index:t,onlyShowCurrentStepLabel:o=!1,children:s})=>{let{currentStep:d,setCurrentStep:f,isStepAtIndexDisabled:p}=n(),m=p(t),h=i(()=>t<d?`body_short`:`body_short_bold`,[d,t]),g=i(()=>t>d||m?e.interactive.disabled__text.rgba:e.text.static_icons__default.rgba,[d,t,m]),_=()=>{t<d&&!m&&f(t)};return l(u,{"data-testid":`step`,$clickable:t<d,onClick:_,$disabled:m,"aria-disabled":m,role:`button`,children:[c(r,{index:t,disabled:m}),(!o||d===t)&&c(a,{variant:h,color:g,children:s})]})};export{d as Step};
@@ -1,4 +1,4 @@
1
- import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}from"../../providers/StepperProvider.js";import n from"./Step/Step.js";import{StepLine as r}from"./StepLine.js";import{SubTitle as i}from"./SubTitle/SubTitle.js";import{useMemo as a}from"react";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.div`
1
+ import{spacings as e}from"../../atoms/style/spacings.js";import{useStepper as t}from"../../providers/StepperProvider.js";import{Step as n}from"./Step/Step.js";import{StepLine as r}from"./StepLine.js";import{SubTitle as i}from"./SubTitle/SubTitle.js";import{useMemo as a}from"react";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${e.xx_large};
@@ -1 +1 @@
1
- import{Container as e}from"./Waves.styles.js";import{WaveStatic as t}from"./WaveStatic.js";import{useEffect as n,useRef as r,useState as i}from"react";import{jsx as a}from"react/jsx-runtime";import{useScroll as o}from"framer-motion";const s=({gradientColors:s})=>{let c=r(null),[l,u]=i(c.current?.clientWidth??0),[d,f]=i(c.current?.clientHeight??0),{scrollY:p}=o({container:{current:document.getElementById(`content`)}}),m=e=>{c.current=e,c.current&&(u(c.current.clientWidth),f(c.current.clientHeight))};return n(()=>{let e=()=>{c.current&&(u(c.current.clientWidth),f(c.current.clientHeight))};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),a(e,{ref:m,style:{top:p},children:a(t,{height:d,width:l,gradientColors:s})})};export{s as Waves};
1
+ import{Container as e}from"./Waves.styles.js";import{WaveStatic as t}from"./WaveStatic.js";import{useEffect as n,useRef as r,useState as i}from"react";import{jsx as a}from"react/jsx-runtime";import{useScroll as o}from"framer-motion";const s=({gradientColors:s})=>{let c=r(null),[l,u]=i(c.current?.clientWidth??0),[d,f]=i(c.current?.clientHeight??0),{scrollY:p}=o({container:{current:document.getElementById(`content`)}});return n(()=>{let e=()=>{c.current&&(u(c.current.clientWidth),f(c.current.clientHeight))};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),a(e,{ref:e=>{c.current=e,c.current&&(u(c.current.clientWidth),f(c.current.clientHeight))},style:{top:p},children:a(t,{height:d,width:l,gradientColors:s})})};export{s as Waves};
@@ -29,9 +29,6 @@ import { Tab } from "./Tabs/Tabs.types.js";
29
29
  import { Tabs, TabsProps } from "./Tabs/Tabs.js";
30
30
  import { TableMenuBar, TextTable } from "./RichTextEditor/MenuBar/Table/TableBar.js";
31
31
  import { Search as Search$1 } from "./Search/Search.js";
32
- import { SieveFilterGroup } from "./Sieve/Filter.js";
33
- import { FilterValues, SieveOption, SieveProps, SieveValue } from "./Sieve/Sieve.types.js";
34
- import { Sieve } from "./Sieve/Sieve.js";
35
32
  import { SingleFilterMenu, SingleFilterMenuProps } from "./SingleFilterMenu/SingleFilterMenu.js";
36
33
  import { SkeletonBase, SkeletonBaseProps, skeletonBaseloading } from "./Skeleton/SkeletonBase/SkeletonBase.js";
37
34
  import { SkeletonGradient, SkeletonGradientProps } from "./Skeleton/SkeletonGradient/SkeletonGradient.js";
@@ -1 +1 @@
1
- import{FullPageSpinner as e}from"./FullPageSpinner/FullPageSpinner.js";import{DEFAULT_FEATURES as t,RichTextEditorFeatures as n}from"./RichTextEditor/RichTextEditor.types.js";import{AmplifyKit as r}from"./RichTextEditor/custom-extensions/AmplifyKit.js";import{AnimatedCheckmark as i}from"./AnimatedCheckmark/AnimatedCheckmark.js";import{ApplicationIcon as a}from"./ApplicationIcon/ApplicationIcon.js";import{Badge as o}from"./Badge/Badge.js";import{Banner as s}from"./Banner/Banner.js";import{Button as c}from"./Button/Button.js";import{Chip as l}from"./Chip/Chip.js";import{SkeletonBase as ee,skeletonBaseloading as te}from"./Skeleton/SkeletonBase/SkeletonBase.js";import{ContentMenu as ne}from"./ContentMenu/ContentMenu.js";import{DatePicker as u}from"./DatePicker/DatePicker.js";import{DateRangePicker as d}from"./DateRangePicker/DateRangePicker.js";import{OptionalTooltip as f}from"./OptionalTooltip/OptionalTooltip.js";import{Dialog as p}from"./Dialog/Dialog.js";import{EquinorLogo as m}from"./EquinorLogo/EquinorLogo.js";import{FileProgress as h}from"./FileProgress/FileProgress.js";import{FileUploadArea as g}from"./FileUploadArea/FileUploadArea.js";import{IconCell as _}from"./IconCell/IconCell.js";import{InfoElement as v}from"./InfoElement/InfoElement.js";import{ProfileAvatar as y}from"./ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as b}from"./RichTextDisplay/RichTextDisplay.js";import{TableMenuBar as x,TextTable as S}from"./RichTextEditor/MenuBar/Table/TableBar.js";import{AmplifyBar as C,EditorMenu as w,EditorText as T}from"./RichTextEditor/MenuBar/MenuBar.js";import{RichTextEditor as E}from"./RichTextEditor/RichTextEditor.js";import{RichText as D}from"./RichTextEditor/index.js";import{Tabs as O}from"./Tabs/Tabs.js";import{Search as re}from"./Search/Search.js";import{Sieve as k}from"./Sieve/Sieve.js";import{SingleFilterMenu as A}from"./SingleFilterMenu/SingleFilterMenu.js";import{SkeletonGradient as j}from"./Skeleton/SkeletonGradient/SkeletonGradient.js";import{Stepper as M}from"./Stepper/Stepper.js";import{OptionDrawer as N}from"./OptionDrawer/OptionDrawer.js";import{ComboBoxChip as P}from"./Select/Select.styles.js";import{ComboBox as F}from"./Select/ComboBox/ComboBox.js";import{SingleSelect as I}from"./Select/SingleSelect/SingleSelect.js";import{FeedBackIcon as L}from"./FeedBackIcon/FeedBackIcon.js";import{ListItem as R}from"./ListItem/ListItem.js";import{Checkbox as z}from"./SelectionControls/Checkbox/Checkbox.js";import{Radio as B}from"./SelectionControls/Radio/Radio.js";import{Switch as V}from"./SelectionControls/Switch/Switch.js";import{Waves as H}from"./Waves/Waves.js";import{Accordion as U,Breadcrumbs as W,CircularProgress as G,Dialog as K,Divider as q,DotProgress as J,Icon as Y,LinearProgress as X,Menu as Z,TextField as Q,Typography as $}from"@equinor/eds-core-react";export{U as Accordion,W as Breadcrumbs,G as CircularProgress,q as Divider,J as DotProgress,K as EDSDialog,Y as Icon,X as LinearProgress,Z as Menu,Q as TextField,$ as Typography};
1
+ import{FullPageSpinner as e}from"./FullPageSpinner/FullPageSpinner.js";import{DEFAULT_FEATURES as t,RichTextEditorFeatures as n}from"./RichTextEditor/RichTextEditor.types.js";import{AmplifyKit as r}from"./RichTextEditor/custom-extensions/AmplifyKit.js";import{AnimatedCheckmark as i}from"./AnimatedCheckmark/AnimatedCheckmark.js";import{ApplicationIcon as a}from"./ApplicationIcon/ApplicationIcon.js";import{Badge as o}from"./Badge/Badge.js";import{Banner as s}from"./Banner/Banner.js";import{Button as c}from"./Button/Button.js";import{Chip as l}from"./Chip/Chip.js";import{SkeletonBase as u,skeletonBaseloading as ee}from"./Skeleton/SkeletonBase/SkeletonBase.js";import{ContentMenu as te}from"./ContentMenu/ContentMenu.js";import{DatePicker as d}from"./DatePicker/DatePicker.js";import{DateRangePicker as f}from"./DateRangePicker/DateRangePicker.js";import{OptionalTooltip as p}from"./OptionalTooltip/OptionalTooltip.js";import{Dialog as m}from"./Dialog/Dialog.js";import{EquinorLogo as h}from"./EquinorLogo/EquinorLogo.js";import{FileProgress as g}from"./FileProgress/FileProgress.js";import{FileUploadArea as _}from"./FileUploadArea/FileUploadArea.js";import{IconCell as v}from"./IconCell/IconCell.js";import{InfoElement as y}from"./InfoElement/InfoElement.js";import{ProfileAvatar as b}from"./ProfileAvatar/ProfileAvatar.js";import{RichTextDisplay as x}from"./RichTextDisplay/RichTextDisplay.js";import{TableMenuBar as S,TextTable as C}from"./RichTextEditor/MenuBar/Table/TableBar.js";import{AmplifyBar as w,EditorMenu as T,EditorText as E}from"./RichTextEditor/MenuBar/MenuBar.js";import{RichTextEditor as D}from"./RichTextEditor/RichTextEditor.js";import{RichText as O}from"./RichTextEditor/index.js";import{Tabs as k}from"./Tabs/Tabs.js";import{Search as ne}from"./Search/Search.js";import{SingleFilterMenu as A}from"./SingleFilterMenu/SingleFilterMenu.js";import{SkeletonGradient as j}from"./Skeleton/SkeletonGradient/SkeletonGradient.js";import{Stepper as M}from"./Stepper/Stepper.js";import{OptionDrawer as N}from"./OptionDrawer/OptionDrawer.js";import{ComboBoxChip as P}from"./Select/Select.styles.js";import{ComboBox as F}from"./Select/ComboBox/ComboBox.js";import{SingleSelect as I}from"./Select/SingleSelect/SingleSelect.js";import{FeedBackIcon as L}from"./FeedBackIcon/FeedBackIcon.js";import{ListItem as R}from"./ListItem/ListItem.js";import{Checkbox as z}from"./SelectionControls/Checkbox/Checkbox.js";import{Radio as B}from"./SelectionControls/Radio/Radio.js";import{Switch as V}from"./SelectionControls/Switch/Switch.js";import{Waves as H}from"./Waves/Waves.js";import{Accordion as U,Breadcrumbs as W,CircularProgress as G,Dialog as K,Divider as q,DotProgress as J,Icon as Y,LinearProgress as X,Menu as Z,TextField as Q,Typography as $}from"@equinor/eds-core-react";export{U as Accordion,W as Breadcrumbs,G as CircularProgress,q as Divider,J as DotProgress,K as EDSDialog,Y as Icon,X as LinearProgress,Z as Menu,Q as TextField,$ as Typography};
@@ -1,4 +1,4 @@
1
- import{spacings as e}from"../../../atoms/style/spacings.js";import{Status as t}from"../../Status/index.js";import{useSearchParameter as n}from"../../../atoms/hooks/useSearchParameter.js";import{Question as r}from"./Question.js";import{useMemo as i}from"react";import{Typography as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.div`
1
+ import{spacings as e}from"../../../atoms/style/spacings.js";import{Status as t}from"../../Status/index.js";import{Question as n}from"./Question.js";import{useMemo as r,useState as i}from"react";import{Typography as a}from"@equinor/eds-core-react";import o from"styled-components";import{jsx as s,jsxs as c}from"react/jsx-runtime";const l=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${e.medium};
@@ -6,4 +6,4 @@ import{spacings as e}from"../../../atoms/style/spacings.js";import{Status as t}f
6
6
  &:has(> div > div > svg) {
7
7
  transform: translateY(50%);
8
8
  }
9
- `,u=({categoryName:e,faqs:o})=>{let[u]=n({key:`search`}),[d]=n({key:`category`}),f=i(()=>o.toSorted((e,t)=>{let n=e.orderBy??0,r=t.orderBy??0;return n-r}),[o]),p=i(()=>u?f.filter(t=>t.question.toLowerCase().includes(u.toLowerCase())||t.answer.toLowerCase().includes(u.toLowerCase())||e.toLowerCase().includes(u.toLowerCase())):f,[e,u,f]);return d!==void 0&&p.length===0?s(l,{children:c(t,{center:!1,children:[s(t.Title,{title:`No Questions Found`}),s(t.Description,{text:`No questions or answers matches your search in this category`})]})}):p.length===0?null:c(l,{children:[s(a,{variant:`h4`,children:e}),p.map(e=>s(r,{...e},e.id))]})};export{u as Category};
9
+ `,u=({categoryName:e,faqs:o,selectedTab:u})=>{let[d]=i(void 0),f=r(()=>o.toSorted((e,t)=>{let n=e.orderBy??0,r=t.orderBy??0;return n-r}),[o]),p=r(()=>d?f.filter(t=>t.question.toLowerCase().includes(d.toLowerCase())||t.answer.toLowerCase().includes(d.toLowerCase())||e.toLowerCase().includes(d.toLowerCase())):f,[e,d,f]);return u!==void 0&&p.length===0?s(l,{children:c(t,{center:!1,children:[s(t.Title,{title:`No Questions Found`}),s(t.Description,{text:`No questions or answers matches your search in this category`})]})}):p.length===0?null:c(l,{children:[s(a,{variant:`h4`,children:e}),p.map(e=>s(n,{...e},e.id))]})};export{u as Category};
@@ -19,4 +19,4 @@ import{animation as e}from"../../../atoms/style/animation.js";import{colors as t
19
19
  background: ${t.interactive.primary__hover_alt.rgba};
20
20
  }
21
21
  }
22
- `,y=({question:e,answer:t,createdDate:n})=>{let[r,u]=s(!1),y=()=>u(e=>!e);return f(v,{onClick:y,children:[d(l,{variant:`h4`,children:e}),d(l,{variant:`caption`,children:i(n)}),d(a,{variant:`ghost_icon`,children:d(c,{data:r?m:p})}),d(h,{children:r&&d(g.div,{style:{overflow:`hidden`},initial:{height:0},animate:{height:`auto`},exit:{height:0},children:d(o,{value:t,onImageRead:_.getFaqImage})})})]})};export{y as Question};
22
+ `,y=({question:e,answer:t,createdDate:n})=>{let[r,u]=s(!1);return f(v,{onClick:()=>u(e=>!e),children:[d(l,{variant:`h4`,children:e}),d(l,{variant:`caption`,children:i(n)}),d(a,{variant:`ghost_icon`,children:d(c,{data:r?m:p})}),d(h,{children:r&&d(g.div,{style:{overflow:`hidden`},initial:{height:0},animate:{height:`auto`},exit:{height:0},children:d(o,{value:t,onImageRead:_.getFaqImage})})})]})};export{y as Question};
@@ -1 +1 @@
1
- import{Status as e}from"../Status/index.js";import{useSearchParameter as t}from"../../atoms/hooks/useSearchParameter.js";import{useFaqsInApplication as n}from"../../atoms/hooks/useFaqsInApplication.js";import{Container as r}from"./Faq.styles.js";import{Header as i}from"./Header.js";import{Category as a}from"./Category/Category.js";import{CategorySkeleton as o}from"./CategorySkeleton.js";import{useMemo as s}from"react";import{Typography as c}from"@equinor/eds-core-react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";const f=()=>{let{data:f,isLoading:p}=n(),[m]=t({key:`category`}),h=s(()=>{if(!f)return;if(!m)return f;let e=f.find(e=>e.id==Number(m));return[e]},[f,m]);return d(r,{children:[u(c,{variant:`h1`,bold:!0,children:`FAQ`}),u(i,{}),h&&h.length>0?h.map(e=>u(a,{...e},e.id)):p?d(l,{children:[u(o,{}),u(o,{}),u(o,{})]}):u(e,{center:!1,children:u(e.Title,{title:`No FAQs available yet`})})]})};export{f as Faq};
1
+ import{Status as e}from"../Status/index.js";import{useFaqsInApplication as t}from"../../atoms/hooks/useFaqsInApplication.js";import{Container as n}from"./Faq.styles.js";import{Header as r}from"./Header.js";import{Category as i}from"./Category/Category.js";import{CategorySkeleton as a}from"./CategorySkeleton.js";import{useMemo as o,useState as s}from"react";import{Typography as c}from"@equinor/eds-core-react";import{Fragment as l,jsx as u,jsxs as d}from"react/jsx-runtime";const f=()=>{let{data:f,isLoading:p}=t(),[m,h]=s(void 0),g=o(()=>{if(f)return m?[f.find(e=>e.id==Number(m))]:f},[f,m]);return d(n,{children:[u(c,{variant:`h1`,bold:!0,children:`FAQ`}),u(r,{selectedTab:m,setSelectedTab:h}),g&&g.length>0?g.map(e=>u(i,{...e,selectedTab:m},e.id)):p?d(l,{children:[u(a,{}),u(a,{}),u(a,{})]}):u(e,{center:!1,children:u(e.Title,{title:`No FAQs available yet`})})]})};export{f as Faq};
@@ -1,4 +1,4 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{useSearchParameter as n}from"../../atoms/hooks/useSearchParameter.js";import{useFaqsInApplication as r}from"../../atoms/hooks/useFaqsInApplication.js";import{Tabs as i}from"../../molecules/Tabs/Tabs.js";import{useMemo as a}from"react";import{Search as o}from"@equinor/eds-core-react";import s from"styled-components";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=s.div`
1
+ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from"../../atoms/style/spacings.js";import{useFaqsInApplication as n}from"../../atoms/hooks/useFaqsInApplication.js";import{Tabs as r}from"../../molecules/Tabs/Tabs.js";import{useMemo as i,useState as a}from"react";import{Search as o}from"@equinor/eds-core-react";import s from"styled-components";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=s.div`
2
2
  position: sticky;
3
3
  top: 0;
4
4
  display: flex;
@@ -11,4 +11,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
11
11
  > div[role='search'] > div {
12
12
  background: ${e.ui.background__default.rgba};
13
13
  }
14
- `,d=()=>{let{data:e}=r(),[t,s]=n({key:`category`}),[d,f]=n({key:`search`}),p=a(()=>e?[{value:`all`,label:`All categories`},...e.map(e=>({value:e.id.toString(),label:e.categoryName}))]:[{value:`all`,label:`All categories`}],[e]),m=e=>{f(e.target.value)},h=e=>{s(e===`all`?void 0:e)};return l(u,{children:[c(i,{style:{maxWidth:`100%`,width:`fit-content`},selected:t??`all`,onChange:h,options:p}),c(o,{value:d,onChange:m,placeholder:`Search for answer by keyword`})]})};export{d as Header};
14
+ `,d=({setSelectedTab:e,selectedTab:t})=>{let{data:s}=n(),[d,f]=a(``),p=i(()=>s?[{value:`all`,label:`All categories`},...s.map(e=>({value:e.id.toString(),label:e.categoryName}))]:[{value:`all`,label:`All categories`}],[s]);return l(u,{children:[c(r,{style:{maxWidth:`100%`,width:`fit-content`},selected:t??`all`,onChange:t=>{e(t===`all`?void 0:t)},options:p}),c(o,{value:d,onChange:e=>{f(e.target.value)},placeholder:`Search for answer by keyword`})]})};export{d as Header};
@@ -11,4 +11,4 @@ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/ind
11
11
  height: calc(100vh - 64px);
12
12
  max-height: calc(100vh - 64px);
13
13
  width: 100vw;
14
- `,m=({setField:e,fields:c,isLoading:d,onChangedField:m,finishedText:h,showAccessITLink:g=!0,itemNameSingular:_=`field`})=>{let[v,y]=s(!1),b=o(``),x=t=>{t.name&&t.uuid&&(e({uuid:t.uuid,name:t.name,country:t.country??``}),b.current=t.name,y(!0))};return v?l(a,{fieldName:b.current,onChangedField:m,finishedText:h}):u(p,{className:`${n.FullWidth} ${n.WithoutScrollGutter}`,children:[l(f,{children:l(t,{})}),d?l(i,{}):l(r,{itemNameSingular:_,availableFields:c,onSelect:x,showAccessITLink:g})]})};export{m as FieldSelector};
14
+ `,m=({setField:e,fields:c,isLoading:d,onChangedField:m,finishedText:h,showAccessITLink:g=!0,itemNameSingular:_=`field`})=>{let[v,y]=s(!1),b=o(``);return v?l(a,{fieldName:b.current,onChangedField:m,finishedText:h}):u(p,{className:`${n.FullWidth} ${n.WithoutScrollGutter}`,children:[l(f,{children:l(t,{})}),d?l(i,{}):l(r,{itemNameSingular:_,availableFields:c,onSelect:t=>{t.name&&t.uuid&&(e({uuid:t.uuid,name:t.name,country:t.country??``}),b.current=t.name,y(!0))},showAccessITLink:g})]})};export{m as FieldSelector};
@@ -1 +1 @@
1
- import{useRef as e,useState as t}from"react";import{Menu as n}from"@equinor/eds-core-react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";const o=({onOpenChange:o,menuItems:s,children:c})=>{let[l,u]=t(!1),d=e(null),f=()=>{u(!l),o?.(!l)},p=()=>{u(!1),o?.(!1)};return a(r,{children:[i(`button`,{ref:d,onClick:f,children:c}),l&&i(n,{open:!0,anchorEl:d.current,onClose:p,children:s})]})};export{o as ButtonWithMenu};
1
+ import{useRef as e,useState as t}from"react";import{Menu as n}from"@equinor/eds-core-react";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";const o=({onOpenChange:o,menuItems:s,children:c})=>{let[l,u]=t(!1),d=e(null);return a(r,{children:[i(`button`,{ref:d,onClick:()=>{u(!l),o?.(!l)},children:c}),l&&i(n,{open:!0,anchorEl:d.current,onClose:()=>{u(!1),o?.(!1)},children:s})]})};export{o as ButtonWithMenu};
@@ -1,4 +1,4 @@
1
- import * as react8 from "react";
1
+ import * as react5 from "react";
2
2
  import { ReactNode } from "react";
3
3
  import { ReleaseNote } from "@equinor/subsurface-app-management";
4
4
 
@@ -7,9 +7,9 @@ type ReleaseNoteProps = {
7
7
  actionMenu?: ReactNode;
8
8
  expanded?: boolean;
9
9
  } & ReleaseNote;
10
- declare const ReleaseNote$1: react8.ForwardRefExoticComponent<{
10
+ declare const ReleaseNote$1: react5.ForwardRefExoticComponent<{
11
11
  actionMenu?: ReactNode;
12
12
  expanded?: boolean;
13
- } & ReleaseNote & react8.RefAttributes<HTMLDivElement>>;
13
+ } & ReleaseNote & react5.RefAttributes<HTMLDivElement>>;
14
14
  //#endregion
15
15
  export { ReleaseNote$1 as ReleaseNote, ReleaseNoteProps };
@@ -24,4 +24,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
24
24
  display: flex;
25
25
  gap: ${t.medium};
26
26
  align-items: center;
27
- `,C=d(({applicationName:n,releaseDate:d,createdDate:h,tags:C,version:w,title:T,body:E,actionMenu:D,expanded:O=!1},k)=>{let A=o({releaseDate:d,createdDate:h}),j=f(O?`auto`:c),[M,N]=p(O),[P,F]=p(i(E).length>0),I=f(new ResizeObserver(e=>{e.at(0)&&e[0].target.scrollHeight>c&&F(!0)})),L=()=>{N(e=>!e)},R=e=>{e&&I.current.observe(e)};return _(b,{ref:k,style:{paddingBottom:M?t.medium:void 0},children:[_(x,{children:[_(S,{children:[g(m,{variant:`caption`,color:e.text.static_icons__secondary.rgba,children:n}),_(m,{variant:`overline`,color:e.text.static_icons__tertiary.rgba,children:[r(A),w?` ・ ${w}`:``,` ・ `,a(E)]})]}),g(u,{tags:C,children:D})]}),g(m,{variant:`h4`,children:T}),g(v.div,{ref:R,initial:{height:j.current},animate:{height:M?`auto`:c},style:{overflow:M?`auto`:void 0},children:g(s,{value:E,onImageRead:y.getReleaseNoteImage,padding:`none`})}),P&&!O&&g(l,{expanded:M,onToggleExpanded:L})]})});C.displayName=`ReleaseNote`;export{C as ReleaseNote};
27
+ `,C=d(({applicationName:n,releaseDate:d,createdDate:h,tags:C,version:w,title:T,body:E,actionMenu:D,expanded:O=!1},k)=>{let A=o({releaseDate:d,createdDate:h}),j=f(O?`auto`:c),[M,N]=p(O),[P,F]=p(i(E).length>0),I=f(new ResizeObserver(e=>{e.at(0)&&e[0].target.scrollHeight>c&&F(!0)}));return _(b,{ref:k,style:{paddingBottom:M?t.medium:void 0},children:[_(x,{children:[_(S,{children:[g(m,{variant:`caption`,color:e.text.static_icons__secondary.rgba,children:n}),_(m,{variant:`overline`,color:e.text.static_icons__tertiary.rgba,children:[r(A),w?` ・ ${w}`:``,` ・ `,a(E)]})]}),g(u,{tags:C,children:D})]}),g(m,{variant:`h4`,children:T}),g(v.div,{ref:e=>{e&&I.current.observe(e)},initial:{height:j.current},animate:{height:M?`auto`:c},style:{overflow:M?`auto`:void 0},children:g(s,{value:E,onImageRead:y.getReleaseNoteImage,padding:`none`})}),P&&!O&&g(l,{expanded:M,onToggleExpanded:()=>{N(e=>!e)}})]})});C.displayName=`ReleaseNote`;export{C as ReleaseNote};
@@ -1 +1 @@
1
- function e(e){let t=e.split(/\s/g).length,n=Math.ceil(t/238);return`${n} min read`}function t(e){return e.releaseDate??e.createdDate}export{e as timeToRead,t as usingReleaseNoteDate};
1
+ function e(e){let t=e.split(/\s/g).length;return`${Math.ceil(t/238)} min read`}function t(e){return e.releaseDate??e.createdDate}export{e as timeToRead,t as usingReleaseNoteDate};
@@ -1 +1 @@
1
- import{useSideBar as e}from"../../../providers/SideBarProvider.js";import{OptionalTooltip as t}from"../../../molecules/OptionalTooltip/OptionalTooltip.js";import{IconContainer as n,ItemText as r,Link as i,MenuItemWrapper as a}from"./MenuItem.styles.js";import{canNavigate as o,isCurrentUrl as s}from"./MenuItem.utils.js";import{useCallback as c,useMemo as l}from"react";import{Icon as u}from"@equinor/eds-core-react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{Feature as p}from"@equinor/subsurface-app-management";import{useLocation as m}from"react-router-dom";const h=({icon:h,link:g,onClick:_,replace:v=!1,name:y,disabled:b=!1,featureUuid:x,...S})=>{let{pathname:C}=m(),w=s({currentUrl:C,link:g}),{isOpen:T}=e(),E=o({currentUrl:C,link:g,replace:v,disabled:b}),D=c(e=>{if(!E){e.preventDefault();return}_&&_()},[E,_]),O=l(()=>d(t,{title:y,placement:`right`,children:d(a,{children:f(i,{to:g,$active:w,"aria-disabled":b,$disabled:b,onClick:D,tabIndex:0,$open:!0,"data-testid":`sidebar-menu-item`,replace:v,...S,children:[d(n,{"data-testid":`icon-container`,children:d(u,{data:h,size:24})}),T&&d(r,{$active:w,$disabled:b,variant:`button`,group:`navigation`,children:y})]})})}),[b,D,h,w,T,g,y,S,v]);return x?d(p,{featureUuid:x,children:O}):O};export{h as BasicMenuItem};
1
+ import{useSideBar as e}from"../../../providers/SideBarProvider.js";import{OptionalTooltip as t}from"../../../molecules/OptionalTooltip/OptionalTooltip.js";import{IconContainer as n,ItemText as r,Link as i,MenuItemWrapper as a}from"./MenuItem.styles.js";import{canNavigate as o,isCurrentUrl as s}from"./MenuItem.utils.js";import{useCallback as c,useMemo as l}from"react";import{Icon as u}from"@equinor/eds-core-react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useLocation as p}from"@tanstack/react-router";import{Feature as m}from"@equinor/subsurface-app-management";const h=({icon:h,link:g,onClick:_,replace:v=!1,name:y,disabled:b=!1,featureUuid:x,...S})=>{let{pathname:C}=p(),w=s({currentUrl:C,link:g}),{isOpen:T}=e(),E=o({currentUrl:C,link:g,replace:v,disabled:b}),D=c(e=>{if(!E){e.preventDefault();return}_&&_()},[E,_]),O=l(()=>d(t,{title:y,placement:`right`,children:d(a,{children:f(i,{to:g,$active:w,"aria-disabled":b,$disabled:b,onClick:D,tabIndex:0,$open:!0,"data-testid":`sidebar-menu-item`,replace:v,...S,children:[d(n,{"data-testid":`icon-container`,children:d(u,{data:h,size:24})}),T&&d(r,{$active:w,$disabled:b,variant:`button`,group:`navigation`,children:y})]})})}),[b,D,h,w,T,g,y,S,v]);return x?d(m,{featureUuid:x,children:O}):O};export{h as BasicMenuItem};
@@ -1,4 +1,4 @@
1
- import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{useSideBar as n}from"../../../providers/SideBarProvider.js";import{usePrevious as r}from"../../../atoms/hooks/usePrevious.js";import{OptionalTooltip as i}from"../../../molecules/OptionalTooltip/OptionalTooltip.js";import{IconContainer as a,ItemText as o,Link as s,MenuItemWrapper as c}from"./MenuItem.styles.js";import{isCurrentUrl as l}from"./MenuItem.utils.js";import{useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import{Icon as m,Menu as h}from"@equinor/eds-core-react";import g,{css as _}from"styled-components";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{chevron_down as x,chevron_up as S}from"@equinor/eds-icons";import{Link as C,useLocation as w}from"react-router-dom";const T=g.button`
1
+ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{useSideBar as n}from"../../../providers/SideBarProvider.js";import{usePrevious as r}from"../../../atoms/hooks/usePrevious.js";import{OptionalTooltip as i}from"../../../molecules/OptionalTooltip/OptionalTooltip.js";import{IconContainer as a,ItemText as o,Link as s,MenuItemWrapper as c}from"./MenuItem.styles.js";import{isCurrentUrl as l}from"./MenuItem.utils.js";import{useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import{Icon as m,Menu as h}from"@equinor/eds-core-react";import g,{css as _}from"styled-components";import{Fragment as v,jsx as y,jsxs as b}from"react/jsx-runtime";import{chevron_down as x,chevron_up as S}from"@equinor/eds-icons";import{Link as C,useLocation as w}from"@tanstack/react-router";const T=g.button`
2
2
  position: relative;
3
3
  width: 100%;
4
4
  display: grid;
@@ -1,4 +1,4 @@
1
- import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{Typography as n}from"@equinor/eds-core-react";import r from"styled-components";import{Link as i}from"react-router-dom";const a=r.span`
1
+ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}from"../../../atoms/style/spacings.js";import{Typography as n}from"@equinor/eds-core-react";import r from"styled-components";import{Link as i}from"@tanstack/react-router";const a=r.span`
2
2
  width: 100%;
3
3
  `,o=r(i)`
4
4
  display: flex;
@@ -1 +1 @@
1
- const e=({currentUrl:e,link:t})=>{let n=e.includes(t);return n&&t!==`/`||t===e},t=({currentUrl:e,link:t})=>{let n=e.split(`?`)[0];return n===t},n=({currentUrl:n,link:r,disabled:i,replace:a})=>{let o=e({currentUrl:n,link:r}),s=t({currentUrl:n,link:r});return!i&&(!o||o&&!s&&a)};export{n as canNavigate,e as isCurrentUrl};
1
+ const e=({currentUrl:e,link:t})=>e.includes(t)&&t!==`/`||t===e,t=({currentUrl:e,link:t})=>e.split(`?`)[0]===t,n=({currentUrl:n,link:r,disabled:i,replace:a})=>{let o=e({currentUrl:n,link:r}),s=t({currentUrl:n,link:r});return!i&&(!o||o&&!s&&a)};export{n as canNavigate,e as isCurrentUrl};
@@ -1,4 +1,4 @@
1
- import * as react135 from "react";
1
+ import * as react115 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: react135.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react135.RefAttributes<HTMLDivElement>>;
19
+ declare const SideBar: react115.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react115.RefAttributes<HTMLDivElement>>;
20
20
  //#endregion
21
21
  export { SideBar };
@@ -1,10 +1,10 @@
1
- import * as react104 from "react";
1
+ import * as react103 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: react104.ForwardRefExoticComponent<ActionProps & react104.RefAttributes<HTMLButtonElement>>;
8
+ declare const Action: react103.ForwardRefExoticComponent<ActionProps & react103.RefAttributes<HTMLButtonElement>>;
9
9
  //#endregion
10
10
  export { Action };
@@ -1,9 +1,9 @@
1
- import * as react106 from "react";
1
+ import * as react105 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: react106.ForwardRefExoticComponent<DescriptionProps & react106.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Description: react105.ForwardRefExoticComponent<DescriptionProps & react105.RefAttributes<HTMLHeadingElement>>;
8
8
  //#endregion
9
9
  export { Description };
@@ -1,4 +1,4 @@
1
- import * as react108 from "react";
1
+ import * as react107 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: react108.ForwardRefExoticComponent<MissingAccessesProps & react108.RefAttributes<HTMLDivElement>>;
12
+ declare const MissingAccesses: react107.ForwardRefExoticComponent<MissingAccessesProps & react107.RefAttributes<HTMLDivElement>>;
13
13
  //#endregion
14
14
  export { MissingAccesses };
@@ -1,9 +1,9 @@
1
- import * as react110 from "react";
1
+ import * as react109 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: react110.ForwardRefExoticComponent<TitleProps & react110.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Title: react109.ForwardRefExoticComponent<TitleProps & react109.RefAttributes<HTMLHeadingElement>>;
8
8
  //#endregion
9
9
  export { Title };
@@ -1,3 +1,3 @@
1
- import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useNavigate as r}from"react-router";const i=()=>{let i=r(),a=()=>{i(-1)};return n(e,{color:`#AB9067`,children:[t(e.Title,{title:`Bad request`}),t(e.Description,{text:`We encountered some confusion regarding your request.
1
+ import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useRouter as r}from"@tanstack/react-router";const i=()=>{let{history:i}=r();return n(e,{color:`#AB9067`,children:[t(e.Title,{title:`Bad request`}),t(e.Description,{text:`We encountered some confusion regarding your request.
2
2
  Please try again later, or if the issue persists, kindly report
3
- it using the feedback form located in the top bar.`}),t(e.Action,{onClick:a})]})};export{i as BadRequest};
3
+ it using the feedback form located in the top bar.`}),t(e.Action,{onClick:()=>{i.go(-1)}})]})};export{i as BadRequest};
@@ -1 +1 @@
1
- import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useNavigate as r}from"react-router";const i=()=>{let i=r(),a=()=>{i(-1)};return n(e,{children:[t(e.Title,{}),t(e.Description,{}),t(e.Action,{onClick:a})]})};export{i as GenericError};
1
+ import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useRouter as r}from"@tanstack/react-router";const i=()=>{let{history:i}=r();return n(e,{children:[t(e.Title,{}),t(e.Description,{}),t(e.Action,{onClick:()=>{i.go(-1)}})]})};export{i as GenericError};
@@ -1 +1 @@
1
- import{environment as e}from"../../../atoms/utils/auth_environment.js";import{Status as t}from"../index.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";const i=()=>{let i=e.getAppName(import.meta.env.VITE_NAME),a=()=>{window.open(`https://accessit.equinor.com/Search/Search?term=${encodeURIComponent(i)}`,`_blank`)};return r(t,{children:[n(t.Title,{title:`You don't have access to ${i}`}),n(t.Description,{text:`You can apply for acces to the app in AccessIT`}),n(t.Action,{onClick:a,buttonText:`Apply for access`})]})};export{i as MissingAccessToApp};
1
+ import{environment as e}from"../../../atoms/utils/auth_environment.js";import{Status as t}from"../index.js";import{jsx as n,jsxs as r}from"react/jsx-runtime";const i=()=>{let i=e.getAppName(import.meta.env.VITE_NAME);return r(t,{children:[n(t.Title,{title:`You don't have access to ${i}`}),n(t.Description,{text:`You can apply for acces to the app in AccessIT`}),n(t.Action,{onClick:()=>{window.open(`https://accessit.equinor.com/Search/Search?term=${encodeURIComponent(i)}`,`_blank`)},buttonText:`Apply for access`})]})};export{i as MissingAccessToApp};
@@ -1 +1 @@
1
- import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useNavigate as r}from"react-router";const i=()=>{let i=r(),a=()=>{i(-1)};return n(e,{children:[t(e.Title,{title:`It looks like you don't have permission to access this page.`}),t(e.Action,{onClick:a})]})};export{i as MissingPermissions};
1
+ import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useRouter as r}from"@tanstack/react-router";const i=()=>{let{history:i}=r();return n(e,{children:[t(e.Title,{title:`It looks like you don't have permission to access this page.`}),t(e.Action,{onClick:()=>{i.go(-1)}})]})};export{i as MissingPermissions};
@@ -1,2 +1,2 @@
1
- import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useNavigate as r}from"react-router";const i=()=>{let i=r(),a=()=>{i(-1)};return n(e,{center:!1,children:[t(e.Title,{title:`Page not found`}),t(e.Description,{text:`It looks like the page you're looking for has gone missing.
2
- Please check the URL and try again.`}),t(e.Action,{onClick:a})]})};export{i as PageNotFound};
1
+ import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useRouter as r}from"@tanstack/react-router";const i=()=>{let{history:i}=r();return n(e,{center:!1,children:[t(e.Title,{title:`Page not found`}),t(e.Description,{text:`It looks like the page you're looking for has gone missing.
2
+ Please check the URL and try again.`}),t(e.Action,{onClick:()=>{i.go(-1)}})]})};export{i as PageNotFound};
@@ -1,3 +1,3 @@
1
- import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useNavigate as r}from"react-router";const i=()=>{let i=r(),a=()=>{i(-1)};return n(e,{color:`#C47E84`,children:[t(e.Title,{title:`Something is wrong on our servers`}),t(e.Description,{text:`Our server encountered an unexpected issue. Please try
1
+ import{Status as e}from"../index.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{useRouter as r}from"@tanstack/react-router";const i=()=>{let{history:i}=r();return n(e,{color:`#C47E84`,children:[t(e.Title,{title:`Something is wrong on our servers`}),t(e.Description,{text:`Our server encountered an unexpected issue. Please try
2
2
  again shortly, or reach out via the feedback form if the problem
3
- continues.`}),t(e.Action,{onClick:a})]})};export{i as ServerError};
3
+ continues.`}),t(e.Action,{onClick:()=>{i.go(-1)}})]})};export{i as ServerError};
@@ -1,4 +1,4 @@
1
- import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{animation as t}from"../../atoms/style/animation.js";import{spacings as n}from"../../atoms/style/spacings.js";import{HEIGHT as r}from"./TableOfContents.constants.js";import i,{css as a}from"styled-components";import{motion as o}from"framer-motion";import{Link as s}from"react-router-dom";const{colors:c,shape:l}=e,u=i.button`
1
+ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{animation as t}from"../../atoms/style/animation.js";import{spacings as n}from"../../atoms/style/spacings.js";import{HEIGHT as r}from"./TableOfContents.constants.js";import i,{css as a}from"styled-components";import{motion as o}from"framer-motion";import{Link as s}from"@tanstack/react-router";const{colors:c,shape:l}=e,u=i.button`
2
2
  &:hover {
3
3
  background: ${c.interactive.primary__hover_alt.rgba};
4
4
  }
@@ -1,4 +1,4 @@
1
- import * as react5 from "react";
1
+ import * as react7 from "react";
2
2
  import * as styled_components0 from "styled-components";
3
3
  import { IStyledComponent } from "styled-components";
4
4
  import * as styled_components_dist_types0 from "styled-components/dist/types";
@@ -7,8 +7,8 @@ import * as styled_components_dist_types0 from "styled-components/dist/types";
7
7
  interface ContentProps {
8
8
  $open: boolean;
9
9
  }
10
- declare const Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<react5.DetailedHTMLProps<react5.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ContentProps>> & string;
11
- declare const GlobalStyles: react5.NamedExoticComponent<styled_components0.ExecutionProps & object>;
10
+ declare const Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components_dist_types0.Substitute<react7.DetailedHTMLProps<react7.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ContentProps>> & string;
11
+ declare const GlobalStyles: react7.NamedExoticComponent<styled_components0.ExecutionProps & object>;
12
12
  type TemplateType = IStyledComponent<'web', any> & {
13
13
  Container: IStyledComponent<'web', any>;
14
14
  Content: typeof Content;
@@ -1,7 +1,7 @@
1
1
  import { ToggleGroup } from "./ToggleGroup.types.js";
2
- import * as react114 from "react";
2
+ import * as react117 from "react";
3
3
 
4
4
  //#region src/organisms/ToggleGroup/ToggleGroup.d.ts
5
- declare const ToggleGroup$1: react114.ForwardRefExoticComponent<ToggleGroup & react114.RefAttributes<HTMLDivElement>>;
5
+ declare const ToggleGroup$1: react117.ForwardRefExoticComponent<ToggleGroup & react117.RefAttributes<HTMLDivElement>>;
6
6
  //#endregion
7
7
  export { ToggleGroup$1 as ToggleGroup };
@@ -26,4 +26,13 @@ import{colors as e}from"../../atoms/style/colors.js";import{shape as t}from"../.
26
26
  ${({$matchParentHeight:e})=>e?o`
27
27
  height: 100%;
28
28
  `:``}
29
- `,l=i(({variant:e=`filled`,matchParentHeight:t=!1,children:i},a)=>s(c,{ref:a,$variant:e,$matchParentHeight:t,children:r.map(i,e=>{if(e.type!=n)throw`Expected child to be ToggleGroupOption!`;return e})}));l.displayName=`ToggleGroup`;export{l as ToggleGroup};
29
+
30
+ ${({$gridTemplateColumns:e})=>e?o`
31
+ display: grid;
32
+ grid-template-columns: ${e};
33
+
34
+ > button {
35
+ justify-content: center;
36
+ }
37
+ `:``}
38
+ `,l=i(({variant:e=`filled`,matchParentHeight:t=!1,matchParentWidth:i=!1,children:a},o)=>s(c,{ref:o,$variant:e,$matchParentHeight:t,$gridTemplateColumns:i?`repeat(${a.length}, minmax(0, 1fr))`:void 0,children:r.map(a,e=>{if(e.type!=n)throw`Expected child to be ToggleGroupOption!`;return e})}));l.displayName=`ToggleGroup`;export{l as ToggleGroup};
@@ -20,6 +20,7 @@ type ToggleGroupOption = {
20
20
  interface ToggleGroup {
21
21
  variant?: 'filled' | 'outlined' | 'ghost';
22
22
  matchParentHeight?: boolean;
23
+ matchParentWidth?: boolean;
23
24
  children: ReactElement<ToggleGroupOption>[];
24
25
  }
25
26
  //#endregion
@@ -1,9 +1,9 @@
1
1
  import { ToggleGroupOption } from "./ToggleGroup.types.js";
2
- import * as react116 from "react";
2
+ import * as react119 from "react";
3
3
  import { HTMLAttributes } from "react";
4
4
 
5
5
  //#region src/organisms/ToggleGroup/ToggleGroupOption.d.ts
6
6
  type ToggleGroupOptionProps = ToggleGroupOption & Omit<HTMLAttributes<HTMLButtonElement>, 'onToggle' | 'disabled'>;
7
- declare const ToggleGroupOption$1: react116.ForwardRefExoticComponent<ToggleGroupOptionProps & react116.RefAttributes<HTMLButtonElement>>;
7
+ declare const ToggleGroupOption$1: react119.ForwardRefExoticComponent<ToggleGroupOptionProps & react119.RefAttributes<HTMLButtonElement>>;
8
8
  //#endregion
9
9
  export { ToggleGroupOption$1 as ToggleGroupOption };
@@ -5,4 +5,4 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
5
5
  svg {
6
6
  fill: ${e.interactive.danger__resting.rgba};
7
7
  }
8
- `,g=({onOpenImpersonateMenu:e,onClose:t})=>{let{data:a}=n(),{mutateAsync:l,isPending:g}=r(),_=async()=>{await l(),t()};return a&&g?u(h,{variant:`outlined`,color:`danger`,children:u(o,{})}):a?d(h,{variant:`outlined`,color:`danger`,onClick:_,children:[u(s,{data:m}),`End impersonation`]}):d(i,{onClick:e,children:[u(s,{data:p}),u(c,{variant:`button`,group:`navigation`,as:`span`,children:`Impersonate`}),u(s,{data:f})]})};export{g as ImpersonateButton};
8
+ `,g=({onOpenImpersonateMenu:e,onClose:t})=>{let{data:a}=n(),{mutateAsync:l,isPending:g}=r();return a&&g?u(h,{variant:`outlined`,color:`danger`,children:u(o,{})}):a?d(h,{variant:`outlined`,color:`danger`,onClick:async()=>{await l(),t()},children:[u(s,{data:m}),`End impersonation`]}):d(i,{onClick:e,children:[u(s,{data:p}),u(c,{variant:`button`,group:`navigation`,as:`span`,children:`Impersonate`}),u(s,{data:f})]})};export{g as ImpersonateButton};
@@ -8,4 +8,4 @@ import{spacings as e}from"../../../../atoms/style/spacings.js";import{useActiveI
8
8
  display: flex;
9
9
  justify-content: flex-end;
10
10
  gap: ${e.small};
11
- `,d=({selectedUniqueName:e,onCancel:o})=>{let{data:d}=t(),{mutateAsync:f,isPending:p}=n(),m=async()=>{await f(e),o()};return c(l,{children:[s(a,{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.`}),c(u,{children:[s(r,{variant:`outlined`,onClick:o,children:`Cancel`}),p?s(r,{children:s(i,{})}):s(r,{onClick:m,disabled:e===``||e===d?.uniqueName,children:`Impersonate`})]})]})};export{d as Actions};
11
+ `,d=({selectedUniqueName:e,onCancel:o})=>{let{data:d}=t(),{mutateAsync:f,isPending:p}=n();return c(l,{children:[s(a,{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.`}),c(u,{children:[s(r,{variant:`outlined`,onClick:o,children:`Cancel`}),p?s(r,{children:s(i,{})}):s(r,{onClick:async()=>{await f(e),o()},disabled:e===``||e===d?.uniqueName,children:`Impersonate`})]})]})};export{d as Actions};
@@ -1 +1 @@
1
- import{environment as e}from"../../../../../atoms/utils/auth_environment.js";import{TextField as t}from"../../../../../molecules/TextField/TextField.js";import{ComboBox as n}from"../../../../../molecules/Select/ComboBox/ComboBox.js";import{SingleSelect as r}from"../../../../../molecules/Select/SingleSelect/SingleSelect.js";import{useAllAppRoles as i}from"../hooks/useAllAppRoles.js";import{useCreateImpersonation as a}from"../hooks/useCreateImpersonation.js";import{useEditImpersonation as o}from"../hooks/useEditImpersonation.js";import{Header as s}from"../Impersonate.styles.js";import{Container as c,Section as l}from"./CreateOrEditUser.styles.js";import{useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import{Button as m,DotProgress as h,Icon as g,Typography as _}from"@equinor/eds-core-react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{arrow_back as b}from"@equinor/eds-icons";const x=({editingUser:x,onBack:S,availableFields:C,availableWells:w})=>{let T=f(!1),[E,D]=p([]),[O,k]=p(``),[A,j]=p(``),[M,N]=p(``),[P,F]=p(void 0),[I,L]=p(void 0),{data:R,isLoading:z}=i();u(()=>{if(x&&R&&!T.current){if(T.current=!0,D(x.roles.map(e=>{let t=R.find(t=>t.value===e);return t?{value:e,label:t.displayName}:{value:e,label:e}})),C){let e=C.find(e=>e.uuid==x.field)?.name??void 0;F(e)}if(w){let e=w.find(e=>e==x.well)??void 0;L(e)}k(x.firstName),j(x.lastName),N(x.email??``)}},[R,x,T,C,w]);let B=d(()=>R?.map(e=>({value:e.value,label:e.displayName}))??[],[R]),V=C?.map(e=>({value:e.uuid??``,label:e.name??``}))??[],H=w?.map(e=>({value:e,label:e}))??[],{mutateAsync:U,isPending:W}=a(),{mutateAsync:G,isPending:K}=o(),q=W||K,J=d(()=>O===``||A===``||E.length===0,[O,A,E.length]),Y=e=>{k(e.target.value)},X=e=>{j(e.target.value)},Z=e=>{N(e.target.value)},Q=e=>{D(e)},$=e=>{F(e?.value)},ee=e=>{L(e?.value)},te=async()=>{x?(await G({id:x.id,firstName:O,lastName:A,fullName:`${O} ${A}`,email:M===``?void 0:M,field:P,well:I,roles:E.map(e=>e.value).sort(),uniqueName:x.uniqueName,appName:x.appName,activeUsers:[]}),S()):(await U({firstName:O,lastName:A,field:P,well:I,email:M===``?void 0:M,roles:E.map(e=>e.value).sort(),uniqueName:`${O}.${A}`.toLowerCase(),appName:e.getAppName(import.meta.env.VITE_NAME),activeUsers:[]}),S())};return y(c,{children:[y(s,{children:[v(m,{variant:`ghost_icon`,onClick:S,children:v(g,{data:b})}),v(_,{variant:`h6`,children:x?`Edit user`:`Create new user`})]}),y(l,{children:[v(t,{id:`first-name`,label:`First name`,placeholder:`Add first name...`,value:O,onChange:Y}),v(t,{id:`last-name`,label:`Last name`,placeholder:`Add last name...`,value:A,onChange:X}),v(t,{id:`email`,label:`E-mail`,placeholder:`Add e-mail...`,meta:`Optional`,value:M,onChange:Z})]}),y(l,{children:[V&&V.length>0&&v(r,{placeholder:`Select field...`,label:`Field`,meta:`Optional (For internal application role purposes)`,value:V.find(e=>e.value===P),onSelect:$,items:V}),H&&H.length>0&&v(r,{label:`Well`,placeholder:`Select well...`,meta:`Optional (For internal application role purposes)`,value:H.find(e=>e.value===I),onSelect:ee,items:H})]}),v(l,{children:v(n,{label:`Roles`,placeholder:`Select roles...`,values:E,onSelect:Q,items:B,loading:z})}),y(l,{children:[v(m,{variant:`outlined`,onClick:S,children:`Cancel`}),q?v(m,{children:v(h,{})}):v(m,{onClick:te,disabled:J,children:x?`Save`:`Create`})]})]})};export{x as CreateOrEditUser};
1
+ import{environment as e}from"../../../../../atoms/utils/auth_environment.js";import{TextField as t}from"../../../../../molecules/TextField/TextField.js";import{ComboBox as n}from"../../../../../molecules/Select/ComboBox/ComboBox.js";import{SingleSelect as r}from"../../../../../molecules/Select/SingleSelect/SingleSelect.js";import{useAllAppRoles as i}from"../hooks/useAllAppRoles.js";import{useCreateImpersonation as a}from"../hooks/useCreateImpersonation.js";import{useEditImpersonation as o}from"../hooks/useEditImpersonation.js";import{Header as s}from"../Impersonate.styles.js";import{Container as c,Section as l}from"./CreateOrEditUser.styles.js";import{useEffect as u,useMemo as d,useRef as f,useState as p}from"react";import{Button as m,DotProgress as h,Icon as g,Typography as _}from"@equinor/eds-core-react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{arrow_back as b}from"@equinor/eds-icons";const x=({editingUser:x,onBack:S,availableFields:C,availableWells:w})=>{let T=f(!1),[E,D]=p([]),[O,k]=p(``),[A,j]=p(``),[M,N]=p(``),[P,F]=p(void 0),[I,L]=p(void 0),{data:R,isLoading:z}=i();u(()=>{if(x&&R&&!T.current){if(T.current=!0,D(x.roles.map(e=>{let t=R.find(t=>t.value===e);return t?{value:e,label:t.displayName}:{value:e,label:e}})),C){let e=C.find(e=>e.uuid==x.field)?.name??void 0;F(e)}if(w){let e=w.find(e=>e==x.well)??void 0;L(e)}k(x.firstName),j(x.lastName),N(x.email??``)}},[R,x,T,C,w]);let B=d(()=>R?.map(e=>({value:e.value,label:e.displayName}))??[],[R]),V=C?.map(e=>({value:e.uuid??``,label:e.name??``}))??[],H=w?.map(e=>({value:e,label:e}))??[],{mutateAsync:U,isPending:W}=a(),{mutateAsync:G,isPending:K}=o(),q=W||K,J=d(()=>O===``||A===``||E.length===0,[O,A,E.length]);return y(c,{children:[y(s,{children:[v(m,{variant:`ghost_icon`,onClick:S,children:v(g,{data:b})}),v(_,{variant:`h6`,children:x?`Edit user`:`Create new user`})]}),y(l,{children:[v(t,{id:`first-name`,label:`First name`,placeholder:`Add first name...`,value:O,onChange:e=>{k(e.target.value)}}),v(t,{id:`last-name`,label:`Last name`,placeholder:`Add last name...`,value:A,onChange:e=>{j(e.target.value)}}),v(t,{id:`email`,label:`E-mail`,placeholder:`Add e-mail...`,meta:`Optional`,value:M,onChange:e=>{N(e.target.value)}})]}),y(l,{children:[V&&V.length>0&&v(r,{placeholder:`Select field...`,label:`Field`,meta:`Optional (For internal application role purposes)`,value:V.find(e=>e.value===P),onSelect:e=>{F(e?.value)},items:V}),H&&H.length>0&&v(r,{label:`Well`,placeholder:`Select well...`,meta:`Optional (For internal application role purposes)`,value:H.find(e=>e.value===I),onSelect:e=>{L(e?.value)},items:H})]}),v(l,{children:v(n,{label:`Roles`,placeholder:`Select roles...`,values:E,onSelect:e=>{D(e)},items:B,loading:z})}),y(l,{children:[v(m,{variant:`outlined`,onClick:S,children:`Cancel`}),q?v(m,{children:v(h,{})}):v(m,{onClick:async()=>{x?(await G({id:x.id,firstName:O,lastName:A,fullName:`${O} ${A}`,email:M===``?void 0:M,field:P,well:I,roles:E.map(e=>e.value).sort(),uniqueName:x.uniqueName,appName:x.appName,activeUsers:[]}),S()):(await U({firstName:O,lastName:A,field:P,well:I,email:M===``?void 0:M,roles:E.map(e=>e.value).sort(),uniqueName:`${O}.${A}`.toLowerCase(),appName:e.getAppName(import.meta.env.VITE_NAME),activeUsers:[]}),S())},disabled:J,children:x?`Save`:`Create`})]})]})};export{x as CreateOrEditUser};
@@ -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{Header as r}from"../Impersonate.styles.js";import{useDeleteImpersonation as i}from"../hooks/useDeleteImpersonation.js";import{Container as a}from"./DeleteUser.styles.js";import{RoleChip as o,RolesContainer as s,TextContent as c}from"../../Account.styles.js";import{ImpersonateAvatar as l}from"../../ImpersonateAvatar.js";import{DotProgress as u,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}=i(),{showSnackbar:x}=t(),S=`${_.firstName} ${_.lastName}`,C=async()=>{await y(_),x(`Deleted user "${S}" successfully`),v()};return m(a,{children:[m(r,{children:[p(n,{variant:`ghost_icon`,onClick:v,children:p(d,{data:h})}),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(l,{size:64,fullName:S}),m(c,{children:[p(f,{variant:`h6`,children:S}),p(f,{children:_.uniqueName})]}),p(s,{children:_.roles.map(e=>p(o,{children:e},e))}),m(`div`,{children:[b?p(n,{variant:`outlined`,color:`danger`,children:p(u,{color:`tertiary`})}):m(n,{variant:`outlined`,color:`danger`,onClick:C,children:[p(d,{data:g}),` Delete user`]}),p(n,{variant:`ghost`,onClick:v,children:`Cancel`})]})]})};export{_ 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{Header as r}from"../Impersonate.styles.js";import{useDeleteImpersonation as i}from"../hooks/useDeleteImpersonation.js";import{Container as a}from"./DeleteUser.styles.js";import{RoleChip as o,RolesContainer as s,TextContent as c}from"../../Account.styles.js";import{ImpersonateAvatar as l}from"../../ImpersonateAvatar.js";import{DotProgress as u,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}=i(),{showSnackbar:x}=t(),S=`${_.firstName} ${_.lastName}`;return m(a,{children:[m(r,{children:[p(n,{variant:`ghost_icon`,onClick:v,children:p(d,{data:h})}),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(l,{size:64,fullName:S}),m(c,{children:[p(f,{variant:`h6`,children:S}),p(f,{children:_.uniqueName})]}),p(s,{children:_.roles.map(e=>p(o,{children:e},e))}),m(`div`,{children:[b?p(n,{variant:`outlined`,color:`danger`,children:p(u,{color:`tertiary`})}):m(n,{variant:`outlined`,color:`danger`,onClick:async()=>{await y(_),x(`Deleted user "${S}" successfully`),v()},children:[p(d,{data:g}),` Delete user`]}),p(n,{variant:`ghost`,onClick:v,children:`Cancel`})]})]})};export{_ as DeleteUser};
@@ -1 +1 @@
1
- import{Search as e}from"../../../../molecules/Search/Search.js";import{useActiveImpersonationUser as t}from"./hooks/useActiveImpersonationUser.js";import{CreateOrEditUser as n}from"./CreateOrEditUser/CreateOrEditUser.js";import{DeleteUser as r}from"./DeleteUser/DeleteUser.js";import{useGetAllImpersonationUsersForApp as i}from"./hooks/useGetAllImpersonationUsersForApp.js";import{Actions as a}from"./Actions.js";import{CreateNewUserButton as o}from"./CreateNewUserButton.js";import{Content as s,Header as c,NoUsersText as l}from"./ImpersonateMenu.styles.js";import{impersonateUserDtoToFullName as u}from"./Impersonate.utils.js";import{UserImpersonation as d}from"./UserImpersonation.js";import{useEffect as f,useState as p}from"react";import{Menu as m,Typography as h}from"@equinor/eds-core-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v=({open:v,onClose:y,anchorEl:b,availableFields:x,availableWells:S})=>{let[C,w]=p(!1),[T,E]=p(void 0),[D,O]=p(void 0),[k,A]=p(``),[j,M]=p(``),{data:N}=i(),{data:P}=t(),F=N?.filter(e=>u(e).toLowerCase().includes(j.toLowerCase()));f(()=>{!v&&P&&k!==P.uniqueName?A(P.uniqueName):!v&&!P&&k!==``&&A(``)},[P,v,k]);let I=()=>{y()},L=()=>w(!0),R=()=>{w(!1),T&&E(void 0)},z=()=>{w(!1),T&&E(void 0),I()},B=e=>{E(N?.find(t=>t.uniqueName===e)),w(!0)},V=e=>{O(N?.find(t=>t.uniqueName===e))},H=()=>{O(void 0)},U=e=>{M(e.target.value)};return v?C?g(m,{open:!0,anchorEl:b,onClose:z,placement:`bottom-end`,style:{width:`400px`},children:g(n,{editingUser:T,onBack:R,availableFields:x,availableWells:S})}):D?g(m,{open:!0,anchorEl:b,onClose:z,placement:`bottom-end`,style:{width:`400px`},children:g(r,{user:D,onBack:H})}):_(m,{open:!0,anchorEl:b,onClose:I,placement:`bottom-end`,style:{width:`400px`},children:[_(c,{children:[g(h,{variant:`h6`,children:`Impersonate`}),g(h,{variant:`caption`,children:`Select a user to impersonate`}),g(e,{placeholder:`Search users`,value:j,onChange:U})]}),g(s,{children:F&&F.length>0?F?.map(e=>g(d,{...e,selected:k===e.uniqueName,onClick:A,onEdit:B,onDelete:V},e.uniqueName)):g(l,{children:`No items found`})}),g(o,{onClick:L}),g(a,{selectedUniqueName:k,onCancel:y})]}):null};export{v as ImpersonateMenu};
1
+ import{Search as e}from"../../../../molecules/Search/Search.js";import{useActiveImpersonationUser as t}from"./hooks/useActiveImpersonationUser.js";import{CreateOrEditUser as n}from"./CreateOrEditUser/CreateOrEditUser.js";import{DeleteUser as r}from"./DeleteUser/DeleteUser.js";import{useGetAllImpersonationUsersForApp as i}from"./hooks/useGetAllImpersonationUsersForApp.js";import{Actions as a}from"./Actions.js";import{CreateNewUserButton as o}from"./CreateNewUserButton.js";import{Content as s,Header as c,NoUsersText as l}from"./ImpersonateMenu.styles.js";import{impersonateUserDtoToFullName as u}from"./Impersonate.utils.js";import{UserImpersonation as d}from"./UserImpersonation.js";import{useEffect as f,useState as p}from"react";import{Menu as m,Typography as h}from"@equinor/eds-core-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";const v=({open:v,onClose:y,anchorEl:b,availableFields:x,availableWells:S})=>{let[C,w]=p(!1),[T,E]=p(void 0),[D,O]=p(void 0),[k,A]=p(``),[j,M]=p(``),{data:N}=i(),{data:P}=t(),F=N?.filter(e=>u(e).toLowerCase().includes(j.toLowerCase()));f(()=>{!v&&P&&k!==P.uniqueName?A(P.uniqueName):!v&&!P&&k!==``&&A(``)},[P,v,k]);let I=()=>{y()},L=()=>w(!0),R=()=>{w(!1),T&&E(void 0)},z=()=>{w(!1),T&&E(void 0),I()},B=e=>{E(N?.find(t=>t.uniqueName===e)),w(!0)},V=e=>{O(N?.find(t=>t.uniqueName===e))};return v?C?g(m,{open:!0,anchorEl:b,onClose:z,placement:`bottom-end`,style:{width:`400px`},children:g(n,{editingUser:T,onBack:R,availableFields:x,availableWells:S})}):D?g(m,{open:!0,anchorEl:b,onClose:z,placement:`bottom-end`,style:{width:`400px`},children:g(r,{user:D,onBack:()=>{O(void 0)}})}):_(m,{open:!0,anchorEl:b,onClose:I,placement:`bottom-end`,style:{width:`400px`},children:[_(c,{children:[g(h,{variant:`h6`,children:`Impersonate`}),g(h,{variant:`caption`,children:`Select a user to impersonate`}),g(e,{placeholder:`Search users`,value:j,onChange:e=>{M(e.target.value)}})]}),g(s,{children:F&&F.length>0?F?.map(e=>g(d,{...e,selected:k===e.uniqueName,onClick:A,onEdit:B,onDelete:V},e.uniqueName)):g(l,{children:`No items found`})}),g(o,{onClick:L}),g(a,{selectedUniqueName:k,onCancel:y})]}):null};export{v as ImpersonateMenu};