@equinor/amplify-component-lib 10.0.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/_virtual/rolldown_runtime.js +1 -1
  2. package/dist/atoms/hooks/useFaqsInApplication.js +1 -1
  3. package/dist/atoms/hooks/useLocalStorage.d.ts +2 -2
  4. package/dist/atoms/hooks/useSelect.d.ts +3 -3
  5. package/dist/atoms/hooks/useSelect.js +1 -1
  6. package/dist/atoms/style/index.d.ts +0 -3
  7. package/dist/atoms/style/index.js +1 -1
  8. package/dist/atoms/utils/size.js +1 -1
  9. package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +2 -2
  10. package/dist/deprecated/IconToggleButton.d.ts +2 -2
  11. package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
  12. package/dist/molecules/Chip/Chip.d.ts +2 -2
  13. package/dist/molecules/DatePicker/DatePicker.d.ts +3 -3
  14. package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
  15. package/dist/molecules/Dialog/Dialog.d.ts +2 -2
  16. package/dist/molecules/EquinorLogo/EquinorLogo.d.ts +2 -2
  17. package/dist/molecules/FeedBackIcon/FeedBackIcon.js +1 -1
  18. package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
  19. package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
  20. package/dist/molecules/IconCell/IconCell.d.ts +2 -2
  21. package/dist/molecules/IconCell/IconCell.styles.js +3 -3
  22. package/dist/molecules/OptionDrawer/OptionDrawer.d.ts +2 -2
  23. package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
  24. package/dist/molecules/RichTextEditor/EditorProvider.js +1 -1
  25. package/dist/molecules/Search/Search.d.ts +2 -2
  26. package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
  27. package/dist/molecules/Select/GroupedSelectMenu.js +1 -1
  28. package/dist/molecules/Select/Select.js +1 -1
  29. package/dist/molecules/Select/Select.utils.js +1 -1
  30. package/dist/molecules/Select/SelectMenuItem.utils.js +1 -1
  31. package/dist/molecules/Skeleton/SkeletonBase/SkeletonBase.d.ts +2 -2
  32. package/dist/molecules/Stepper/StepLine.js +1 -1
  33. package/dist/molecules/Waves/Waves.js +1 -1
  34. package/dist/organisms/Faq/Category/Category.js +1 -1
  35. package/dist/organisms/Filter/Filter.d.ts +2 -2
  36. package/dist/organisms/Filter/QuickFilter.d.ts +2 -2
  37. package/dist/organisms/Filter/SortMenu.d.ts +2 -2
  38. package/dist/organisms/ReleaseNotesPage/ReleaseNotesPage.js +1 -1
  39. package/dist/organisms/ReleaseNotesPage/hooks/useFilteredReleaseNotes.js +1 -1
  40. package/dist/organisms/ReleaseNotesPage/hooks/useReleaseNotesFilters.js +1 -1
  41. package/dist/organisms/SideBar/SideBar.d.ts +2 -2
  42. package/dist/organisms/Status/Action.d.ts +2 -2
  43. package/dist/organisms/Status/Description.d.ts +2 -2
  44. package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
  45. package/dist/organisms/Status/Title.d.ts +2 -2
  46. package/dist/organisms/ToggleGroup/ToggleGroup.d.ts +2 -2
  47. package/dist/organisms/ToggleGroup/ToggleGroupOption.d.ts +2 -2
  48. package/dist/organisms/TopBar/Account/Account.js +1 -1
  49. package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.js +1 -1
  50. package/dist/organisms/TopBar/Actions.d.ts +2 -2
  51. package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
  52. package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +2 -2
  53. package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
  54. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/LockedInputTooltip.js +2 -2
  55. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +1 -1
  56. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.js +1 -1
  57. package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.js +1 -1
  58. package/dist/organisms/TopBar/Tutorials/TutorialItem.js +1 -1
  59. package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
  60. package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +1 -1
  61. package/package.json +5 -5
@@ -1 +1 @@
1
- var e=Object.defineProperty,t=(t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})};export{t as __export};
1
+ var e=Object.defineProperty,t=t=>{let n={};for(var r in t)e(n,r,{get:t[r],enumerable:!0});return n};export{t as __export};
@@ -1 +1 @@
1
- import{environment as e}from"../utils/auth_environment.js";import{FaqService as t}from"@equinor/subsurface-app-management";import{useQuery as n}from"@tanstack/react-query";function r(){return n({queryKey:[`GET_FAQ_IN_APP`],queryFn:async()=>(await t.getCategoriesWithFaqsFromApplicationName(e.getAppName(import.meta.env.VITE_NAME))).toSorted((e,t)=>{let n=e.orderBy??0,r=t.orderBy??0;return n-r}),staleTime:1e3*60*5})}export{r as useFaqsInApplication};
1
+ import{environment as e}from"../utils/auth_environment.js";import{FaqService as t}from"@equinor/subsurface-app-management";import{useQuery as n}from"@tanstack/react-query";function r(){return n({queryKey:[`GET_FAQ_IN_APP`],queryFn:async()=>(await t.getCategoriesWithFaqsFromApplicationName(e.getAppName(import.meta.env.VITE_NAME))).toSorted((e,t)=>(e.orderBy??0)-(t.orderBy??0)),staleTime:1e3*60*5})}export{r as useFaqsInApplication};
@@ -1,6 +1,6 @@
1
- import * as react117 from "react";
1
+ import * as react135 from "react";
2
2
 
3
3
  //#region src/atoms/hooks/useLocalStorage.d.ts
4
- declare const useLocalStorage: <T>(key: string, defaultState: T, keepAliveMs?: number) => readonly [T, react117.Dispatch<react117.SetStateAction<T>>, () => void];
4
+ declare const useLocalStorage: <T>(key: string, defaultState: T, keepAliveMs?: number) => readonly [T, react135.Dispatch<react135.SetStateAction<T>>, () => void];
5
5
  //#endregion
6
6
  export { useLocalStorage };
@@ -1,6 +1,6 @@
1
1
  import { SelectOption, SelectOptionRequired } from "../../molecules/Select/Select.types.js";
2
2
  import { SelectComponentProps } from "../../molecules/Select/Select.js";
3
- import * as react119 from "react";
3
+ import * as react137 from "react";
4
4
  import { ChangeEvent, KeyboardEvent } from "react";
5
5
 
6
6
  //#region src/atoms/hooks/useSelect.d.ts
@@ -16,8 +16,8 @@ declare const useSelect: <T extends SelectOptionRequired>(props: SelectComponent
16
16
  handleOnOpen: () => void;
17
17
  handleOnRemoveItem: (item: SelectOption<T>) => void;
18
18
  search: string;
19
- searchRef: react119.RefObject<HTMLInputElement | null>;
20
- itemRefs: react119.RefObject<(HTMLButtonElement | null)[]>;
19
+ searchRef: react137.RefObject<HTMLInputElement | null>;
20
+ itemRefs: react137.RefObject<(HTMLButtonElement | null)[]>;
21
21
  selectedValues: T[];
22
22
  open: boolean;
23
23
  tryingToRemoveItem: T | undefined;
@@ -1 +1 @@
1
- import{flattenOptions as e}from"../../molecules/Select/Select.utils.js";import{useEffect as t,useMemo as n,useRef as r,useState as i}from"react";const a=a=>{let{loading:o,disabled:s,sortValues:c,onSearchChange:l,onOpenCallback:u}=a,[d,f]=i(!1),[p,m]=i(``),h=r(null),g=r([]),_=r(-1),[v,y]=i(void 0),b=r(!1),x=r(0),S=n(()=>{let e=[];if(`values`in a?e=a.values:a.value&&(e=[a.value]),!c)return e;let t=`groups`in a&&a.groups?a.groups.flatMap(e=>e.items):a.items.flatMap(e=>[{...e},...e.children||[]]);return e.sort((e,n)=>{let r=t.findIndex(t=>t.value===e.value),i=t.findIndex(e=>e.value===n.value);return r-i})},[a,c]);t(()=>{u!==void 0&&u(d)},[u,d]),t(()=>{b.current&&x.current!==S.length&&(x.current=S.length,b.current=!1,h.current?.focus())},[S.length]);let C=()=>{!d&&!s&&!o&&(h.current?.focus(),f(!0))},w=()=>{f(!1),m(``),_.current=0},T=()=>{s||o||(d?w():C())},E=e=>{e.target.value===` `||o||s||(m(e.target.value),l?.(e.target.value),d||f(!0))},D=(t,n)=>{let r=structuredClone(t);return r.some(e=>e.value===n.value)?r.filter(e=>e.value!==n.value):`values`in a&&a.syncParentChildSelection!==void 0&&!a.syncParentChildSelection?[n,...r]:[n,...r.filter(t=>(n.children===void 0||n.children.length>0)&&e([n]).some(e=>e.value===t.value)?!1:t.children===void 0||t.children.length===0?!0:e([t]).every(e=>e.value!==n.value))]},O=e=>{`value`in a?a.value?.value===e.value?a.onSelect(void 0):a.onSelect(e):a.onSelect(D(a.values,e),e),p!==``&&m(``),b.current=!0},k=e=>{`values`in a&&!o&&!s&&a.onSelect(a.values.filter(t=>t.value!==e.value),e)};return{handleOnAddItem:()=>{`onAddItem`in a&&a.onAddItem&&(a.onAddItem(p),m(``))},handleOnItemSelect:O,handleOnItemKeyDown:e=>{e.key===`ArrowDown`&&_.current<g.current.length-1?(_.current+=1,g.current.at(_.current)?.focus()):e.key===`ArrowUp`&&_.current>0?(--_.current,g.current.at(_.current)?.focus()):e.key===`ArrowUp`&&_.current===0&&(_.current=-1,h.current?.focus())},handleOnSearchKeyDown:e=>{e.key===`Enter`&&p!==``&&`onAddItem`in a&&a.onAddItem?(e.preventDefault(),a.onAddItem(p),m(``)):e.key===`Space`||e.key===`Enter`?C():e.key===`Escape`?(h.current?.blur(),w()):(e.key===`ArrowDown`||e.key===`ArrowUp`)&&g.current.at(0)?(g.current[0]?.focus(),_.current=0):e.key===`Backspace`&&v===void 0&&`values`in a&&p===``?(y(S?.at(-1)),setTimeout(()=>{h.current?.focus()})):e.key===`Backspace`&&v&&(k(v),y(void 0),setTimeout(()=>{h.current?.focus()}))},handleOnClear:()=>{`value`in a?a.onSelect(void 0):a.onSelect([])},handleOnSearchChange:E,handleToggleOpen:T,handleOnClose:w,handleOnOpen:C,handleOnRemoveItem:k,search:p,searchRef:h,itemRefs:g,selectedValues:S,open:d,tryingToRemoveItem:v}};export{a as useSelect};
1
+ import{flattenOptions as e}from"../../molecules/Select/Select.utils.js";import{useEffect as t,useMemo as n,useRef as r,useState as i}from"react";const a=a=>{let{loading:o,disabled:s,sortValues:c,onSearchChange:l,onOpenCallback:u}=a,[d,f]=i(!1),[p,m]=i(``),h=r(null),g=r([]),_=r(-1),[v,y]=i(void 0),b=r(!1),x=r(0),S=n(()=>{let e=[];if(`values`in a?e=a.values:a.value&&(e=[a.value]),!c)return e;let t;return t=`groups`in a&&a.groups?a.groups.flatMap(e=>e.items):a.items.flatMap(e=>[{...e},...e.children||[]]),e.sort((e,n)=>t.findIndex(t=>t.value===e.value)-t.findIndex(e=>e.value===n.value))},[a,c]);t(()=>{u!==void 0&&u(d)},[u,d]),t(()=>{b.current&&x.current!==S.length&&(x.current=S.length,b.current=!1,h.current?.focus())},[S.length]);let C=()=>{!d&&!s&&!o&&(h.current?.focus(),f(!0))},w=()=>{f(!1),m(``),_.current=0},T=()=>{s||o||(d?w():C())},E=e=>{e.target.value===` `||o||s||(m(e.target.value),l?.(e.target.value),d||f(!0))},D=(t,n)=>{let r=structuredClone(t);return r.some(e=>e.value===n.value)?r.filter(e=>e.value!==n.value):`values`in a&&a.syncParentChildSelection!==void 0&&!a.syncParentChildSelection?[n,...r]:[n,...r.filter(t=>(n.children===void 0||n.children.length>0)&&e([n]).some(e=>e.value===t.value)?!1:t.children===void 0||t.children.length===0?!0:e([t]).every(e=>e.value!==n.value))]},O=e=>{`value`in a?a.value?.value===e.value?a.onSelect(void 0):a.onSelect(e):a.onSelect(D(a.values,e),e),p!==``&&m(``),b.current=!0},k=e=>{`values`in a&&!o&&!s&&a.onSelect(a.values.filter(t=>t.value!==e.value),e)};return{handleOnAddItem:()=>{`onAddItem`in a&&a.onAddItem&&(a.onAddItem(p),m(``))},handleOnItemSelect:O,handleOnItemKeyDown:e=>{e.key===`ArrowDown`&&_.current<g.current.length-1?(_.current+=1,g.current.at(_.current)?.focus()):e.key===`ArrowUp`&&_.current>0?(--_.current,g.current.at(_.current)?.focus()):e.key===`ArrowUp`&&_.current===0&&(_.current=-1,h.current?.focus())},handleOnSearchKeyDown:e=>{e.key===`Enter`&&p!==``&&`onAddItem`in a&&a.onAddItem?(e.preventDefault(),a.onAddItem(p),m(``)):e.key===`Space`||e.key===`Enter`?C():e.key===`Escape`?(h.current?.blur(),w()):(e.key===`ArrowDown`||e.key===`ArrowUp`)&&g.current.at(0)?(g.current[0]?.focus(),_.current=0):e.key===`Backspace`&&v===void 0&&`values`in a&&p===``?(y(S?.at(-1)),setTimeout(()=>{h.current?.focus()})):e.key===`Backspace`&&v&&(k(v),y(void 0),setTimeout(()=>{h.current?.focus()}))},handleOnClear:()=>{`value`in a?a.onSelect(void 0):a.onSelect([])},handleOnSearchChange:E,handleToggleOpen:T,handleOnClose:w,handleOnOpen:C,handleOnRemoveItem:k,search:p,searchRef:h,itemRefs:g,selectedValues:S,open:d,tryingToRemoveItem:v}};export{a as useSelect};
@@ -3,9 +3,6 @@ import { colors } from "./colors.js";
3
3
  import { spacings } from "./spacings.js";
4
4
 
5
5
  //#region src/atoms/style/index.d.ts
6
- declare namespace index_d_exports {
7
- export { animation, colors, elevation, shape, spacings, typography };
8
- }
9
6
  declare const shape: {
10
7
  _modes: {
11
8
  compact: {
@@ -1 +1 @@
1
- import{__export as e}from"../../_virtual/rolldown_runtime.js";import{tokens as t}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{animation as n}from"./animation.js";import{colors as r}from"./colors.js";import{spacings as i}from"./spacings.js";var a={};e(a,{animation:()=>n,colors:()=>r,elevation:()=>s,shape:()=>o,spacings:()=>i,typography:()=>c});const{shape:o,elevation:s,typography:c}=t;export{s as elevation,o as shape,a as style_exports,c as typography};
1
+ import{__export as e}from"../../_virtual/rolldown_runtime.js";import{tokens as t}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{animation as n}from"./animation.js";import{colors as r}from"./colors.js";import{spacings as i}from"./spacings.js";var a=e({animation:()=>n,colors:()=>r,elevation:()=>s,shape:()=>o,spacings:()=>i,typography:()=>c});const{shape:o,elevation:s,typography:c}=t;export{s as elevation,o as shape,a as style_exports,c as typography};
@@ -1 +1 @@
1
- const e=1024,t=(t,n=2)=>{if(t<0||t===0)return`0 Bytes`;if(t===1)return`1 Byte`;let r=n<0?0:n,i=[`Bytes`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],a=Math.floor(Math.log(t)/Math.log(e));return parseFloat((t/e**+a).toFixed(r))+` `+i[a]},n=(n,r=2)=>t(n*e,r),r=[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`];function i({size:e,decimals:t=2,inputFormat:n=`KiB`}){if(e<0)throw Error(`Invalid size, must be a positive integer`);if(t<0)throw Error(`Invalid decimals, must be a positive integer`);if(e===0)return`${e} ${n}`;let i=r.indexOf(n),a=e*1024**i,o=Math.floor(Math.log(a)/Math.log(1024));return`${parseFloat((a/1024**o).toFixed(t))} ${r[o]}`}export{t as formatBytes,i as formatDataSize,n as formatKiloBytes};
1
+ const e=1024,t=(t,n=2)=>{if(t<0||t===0)return`0 Bytes`;if(t===1)return`1 Byte`;let r=n<0?0:n,i=[`Bytes`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],a=Math.floor(Math.log(t)/Math.log(e));return parseFloat((t/e**+a).toFixed(r))+` `+i[a]},n=(n,r=2)=>t(n*e,r),r=[`B`,`KiB`,`MiB`,`GiB`,`TiB`,`PiB`,`EiB`,`ZiB`,`YiB`];function i({size:e,decimals:t=2,inputFormat:n=`KiB`}){if(e<0)throw Error(`Invalid size, must be a positive integer`);if(t<0)throw Error(`Invalid decimals, must be a positive integer`);if(e===0)return`${e} ${n}`;let i=e*1024**r.indexOf(n),a=Math.floor(Math.log(i)/Math.log(1024));return`${parseFloat((i/1024**a).toFixed(t))} ${r[a]}`}export{t as formatBytes,i as formatDataSize,n as formatKiloBytes};
@@ -1,4 +1,4 @@
1
- import * as react2 from "react";
1
+ import * as react1 from "react";
2
2
  import { IconData } from "@equinor/eds-icons";
3
3
 
4
4
  //#region src/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts
@@ -12,6 +12,6 @@ interface ExpandingIconButtonProps {
12
12
  /**
13
13
  * @deprecated Being deprecated from amplify-component-lib move into app if you want the implementation
14
14
  */
15
- declare const ExpandingIconButton: react2.ForwardRefExoticComponent<ExpandingIconButtonProps & react2.RefAttributes<HTMLDivElement>>;
15
+ declare const ExpandingIconButton: react1.ForwardRefExoticComponent<ExpandingIconButtonProps & react1.RefAttributes<HTMLDivElement>>;
16
16
  //#endregion
17
17
  export { ExpandingIconButton };
@@ -1,4 +1,4 @@
1
- import * as react0 from "react";
1
+ import * as react3 from "react";
2
2
  import { IconData } from "@equinor/eds-icons";
3
3
 
4
4
  //#region src/deprecated/IconToggleButton.d.ts
@@ -21,6 +21,6 @@ interface IconToggleButtonProps {
21
21
  /**
22
22
  * @deprecated Being deprecated from amplify-component-lib move into app if you want the implementation
23
23
  */
24
- declare const IconToggleButton: react0.ForwardRefExoticComponent<IconToggleButtonProps & react0.RefAttributes<HTMLButtonElement>>;
24
+ declare const IconToggleButton: react3.ForwardRefExoticComponent<IconToggleButtonProps & react3.RefAttributes<HTMLButtonElement>>;
25
25
  //#endregion
26
26
  export { IconToggleButton };
@@ -4,4 +4,4 @@ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/ind
4
4
  background: ${e=>e.$background};
5
5
  border: none;
6
6
  margin: 0;
7
- `;var o=({done:e})=>{let n=t(()=>e?i.interactive.primary__resting.rgba:i.interactive.disabled__text.rgba,[e]);return r(a,{$background:n})};export{o as default};
7
+ `;var o=({done:e})=>r(a,{$background:t(()=>e?i.interactive.primary__resting.rgba:i.interactive.disabled__text.rgba,[e])});export{o as default};
@@ -1,4 +1,4 @@
1
- import * as react5 from "react";
1
+ import * as react7 from "react";
2
2
  import { HTMLAttributes, KeyboardEvent, MouseEvent, ReactNode } from "react";
3
3
  import { IconData } from "@equinor/eds-icons";
4
4
 
@@ -25,6 +25,6 @@ type DeletableChipProps = BaseChipProps & InteractiveChipBase & {
25
25
  onDelete: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void;
26
26
  };
27
27
  type ChipProps = Omit<HTMLAttributes<HTMLDivElement | HTMLButtonElement>, 'onClick'> & (ReadOnlyChipProps | ClickableChipProps | DeletableChipProps);
28
- declare const Chip: react5.ForwardRefExoticComponent<ChipProps & react5.RefAttributes<HTMLDivElement | HTMLButtonElement>>;
28
+ declare const Chip: react7.ForwardRefExoticComponent<ChipProps & react7.RefAttributes<HTMLDivElement | HTMLButtonElement>>;
29
29
  //#endregion
30
30
  export { BaseChipProps, Chip, ClickableChipProps, DeletableChipProps };
@@ -1,5 +1,5 @@
1
1
  import { Variants } from "../../atoms/types/variants.js";
2
- import * as react7 from "react";
2
+ import * as react9 from "react";
3
3
  import { DatePickerProps } from "@equinor/eds-core-react";
4
4
 
5
5
  //#region src/molecules/DatePicker/DatePicker.d.ts
@@ -8,10 +8,10 @@ type DatePickerProps$1 = Omit<DatePickerProps, 'variant'> & {
8
8
  meta?: string;
9
9
  loading?: boolean;
10
10
  };
11
- declare const DatePicker$1: react7.ForwardRefExoticComponent<Omit<DatePickerProps, "variant"> & {
11
+ declare const DatePicker$1: react9.ForwardRefExoticComponent<Omit<DatePickerProps, "variant"> & {
12
12
  variant?: Variants;
13
13
  meta?: string;
14
14
  loading?: boolean;
15
- } & react7.RefAttributes<HTMLDivElement>>;
15
+ } & react9.RefAttributes<HTMLDivElement>>;
16
16
  //#endregion
17
17
  export { DatePicker$1 as DatePicker, DatePickerProps$1 as DatePickerProps };
@@ -1,5 +1,5 @@
1
1
  import { Variants } from "../../atoms/types/variants.js";
2
- import * as react13 from "react";
2
+ import * as react5 from "react";
3
3
  import { DateRangePickerProps } from "@equinor/eds-core-react";
4
4
 
5
5
  //#region src/molecules/DateRangePicker/DateRangePicker.d.ts
@@ -8,10 +8,10 @@ type DateRangePickerProps$1 = Omit<DateRangePickerProps, 'variant'> & {
8
8
  meta?: string;
9
9
  loading?: boolean;
10
10
  };
11
- declare const DateRangePicker$1: react13.ForwardRefExoticComponent<Omit<DateRangePickerProps, "variant"> & {
11
+ declare const DateRangePicker$1: react5.ForwardRefExoticComponent<Omit<DateRangePickerProps, "variant"> & {
12
12
  variant?: Variants;
13
13
  meta?: string;
14
14
  loading?: boolean;
15
- } & react13.RefAttributes<HTMLDivElement>>;
15
+ } & react5.RefAttributes<HTMLDivElement>>;
16
16
  //#endregion
17
17
  export { DateRangePicker$1 as DateRangePicker, DateRangePickerProps$1 as DateRangePickerProps };
@@ -1,4 +1,4 @@
1
- import * as react9 from "react";
1
+ import * as react11 from "react";
2
2
  import { ReactNode } from "react";
3
3
  import { ButtonProps, DialogProps } from "@equinor/eds-core-react";
4
4
  import { IconData } from "@equinor/eds-icons";
@@ -51,6 +51,6 @@ interface DialogProps$1 extends Omit<DialogProps, 'title'> {
51
51
  * @param additionalInfo - Defaults to empty, and won't show the additional info button
52
52
  * Also inherits props from EDS dialog
53
53
  */
54
- declare const Dialog$1: react9.ForwardRefExoticComponent<DialogProps$1 & react9.RefAttributes<HTMLDivElement>>;
54
+ declare const Dialog$1: react11.ForwardRefExoticComponent<DialogProps$1 & react11.RefAttributes<HTMLDivElement>>;
55
55
  //#endregion
56
56
  export { Dialog$1 as Dialog, DialogAction, DialogProps$1 as DialogProps };
@@ -1,11 +1,11 @@
1
1
  import { SizeIconProps } from "../../atoms/types/Icon.js";
2
- import * as react11 from "react";
2
+ import * as react15 from "react";
3
3
 
4
4
  //#region src/molecules/EquinorLogo/EquinorLogo.d.ts
5
5
  interface EquinorLogoProps extends Partial<SizeIconProps> {
6
6
  large?: boolean;
7
7
  color?: 'red' | 'white' | 'black';
8
8
  }
9
- declare const EquinorLogo: react11.ForwardRefExoticComponent<EquinorLogoProps & react11.RefAttributes<SVGSVGElement>>;
9
+ declare const EquinorLogo: react15.ForwardRefExoticComponent<EquinorLogoProps & react15.RefAttributes<SVGSVGElement>>;
10
10
  //#endregion
11
11
  export { EquinorLogo, EquinorLogoProps };
@@ -1 +1 @@
1
- import{NegativeFilled as e}from"./NegativeFilled.js";import{NegativeOutlined as t}from"./NegativeOutlined.js";import{PositiveFilled as n}from"./PositiveFilled.js";import{PositiveOutlined as r}from"./PositiveOutlined.js";import{jsx as i}from"react/jsx-runtime";const a=[{iconName:`negative-outlined`,component:t},{iconName:`negative-filled`,component:e},{iconName:`positive-filled`,component:n},{iconName:`positive-outlined`,component:r}],o=({name:e,size:t=48,variant:n=`filled`})=>{let r=a.find(t=>t.iconName===`${e}-${n}`);return i(r.component,{size:t})};export{o as FeedBackIcon};
1
+ import{NegativeFilled as e}from"./NegativeFilled.js";import{NegativeOutlined as t}from"./NegativeOutlined.js";import{PositiveFilled as n}from"./PositiveFilled.js";import{PositiveOutlined as r}from"./PositiveOutlined.js";import{jsx as i}from"react/jsx-runtime";const a=[{iconName:`negative-outlined`,component:t},{iconName:`negative-filled`,component:e},{iconName:`positive-filled`,component:n},{iconName:`positive-outlined`,component:r}],o=({name:e,size:t=48,variant:n=`filled`})=>i(a.find(t=>t.iconName===`${e}-${n}`).component,{size:t});export{o as FeedBackIcon};
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{OptionalTooltip as t}from"../OptionalTooltip/OptionalTooltip.js";import{AdditionalText as n,CircularProgress as r,CloseButton as i,CompactFileProgressContainer as a,DoneWrapper as o,FileTooltip as s,LoadingWrapper as c,Rejection as l}from"./CompactFileProgress.styles.js";import{getFileIcon as u,isFileImage as d,readUploadedFileAsText as f}from"./FileProgress.utils.js";import{useEffect as p,useMemo as m,useState as h}from"react";import{Icon as g,Typography as _}from"@equinor/eds-core-react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{clear as b,error_outlined as x}from"@equinor/eds-icons";var S=({file:S,isError:C,shortErrorText:w,showCompleteState:T,fullErrorText:E,handleOnClick:D,isDeleting:O,...k})=>{let[A,j]=h(``);p(()=>{C||(async e=>{let t=await f(e);j(t)})(S)},[C,S]);let M=m(()=>C?E&&E.length>0?E:`An error has occurred with the file`:``,[E,C]),N=m(()=>C?y(l,{children:[v(g,{data:x,color:e.interactive.warning__text.rgba}),v(`div`,{children:w&&w.length>0?w:`Invalid file type`}),v(`svg`,{width:`88`,height:`88`,viewBox:`0 0 88 88`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:v(`rect`,{x:`1`,y:`1`,width:`86`,height:`86`,rx:`7`,stroke:e.interactive.warning__text.rgba,strokeWidth:`2`,strokeDasharray:`4 4`})})]}):T&&!O&&d(S.name)?v(o,{children:v(`img`,{src:A,alt:` ${S.name}`})}):T&&!O?v(o,{children:v(g,{data:u(S.name)})}):y(c,{children:[v(r,{variant:k.indeterminate||O?`indeterminate`:`determinate`,value:!k.isDone&&!k.indeterminate?k.progressPercent:void 0,size:24}),v(_,{variant:`meta`,children:`Uploading...`}),v(`svg`,{width:`88`,height:`88`,viewBox:`0 0 88 88`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:v(`rect`,{x:`1`,y:`1`,width:`86`,height:`86`,rx:`7`,stroke:e.ui.background__medium.rgba,strokeWidth:`2`,strokeDasharray:`4 4`})})]}),[C,T,O,w,A,S.name,k]);return y(a,{$isError:C,children:[v(s,{title:M,children:N}),v(t,{title:S.name,children:v(n,{group:`paragraph`,variant:`meta`,children:S.name})}),!O&&k.onDelete&&v(i,{"data-testid":`delete-file`,onClick:D,children:v(g,{color:e.text.static_icons__tertiary.rgba,data:b})})]})};export{S as default};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{OptionalTooltip as t}from"../OptionalTooltip/OptionalTooltip.js";import{AdditionalText as n,CircularProgress as r,CloseButton as i,CompactFileProgressContainer as a,DoneWrapper as o,FileTooltip as s,LoadingWrapper as c,Rejection as l}from"./CompactFileProgress.styles.js";import{getFileIcon as u,isFileImage as d,readUploadedFileAsText as f}from"./FileProgress.utils.js";import{useEffect as p,useMemo as m,useState as h}from"react";import{Icon as g,Typography as _}from"@equinor/eds-core-react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{clear as b,error_outlined as x}from"@equinor/eds-icons";var S=({file:S,isError:C,shortErrorText:w,showCompleteState:T,fullErrorText:E,handleOnClick:D,isDeleting:O,...k})=>{let[A,j]=h(``);return p(()=>{C||(async e=>{j(await f(e))})(S)},[C,S]),y(a,{$isError:C,children:[v(s,{title:m(()=>C?E&&E.length>0?E:`An error has occurred with the file`:``,[E,C]),children:m(()=>C?y(l,{children:[v(g,{data:x,color:e.interactive.warning__text.rgba}),v(`div`,{children:w&&w.length>0?w:`Invalid file type`}),v(`svg`,{width:`88`,height:`88`,viewBox:`0 0 88 88`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:v(`rect`,{x:`1`,y:`1`,width:`86`,height:`86`,rx:`7`,stroke:e.interactive.warning__text.rgba,strokeWidth:`2`,strokeDasharray:`4 4`})})]}):T&&!O&&d(S.name)?v(o,{children:v(`img`,{src:A,alt:` ${S.name}`})}):T&&!O?v(o,{children:v(g,{data:u(S.name)})}):y(c,{children:[v(r,{variant:k.indeterminate||O?`indeterminate`:`determinate`,value:!k.isDone&&!k.indeterminate?k.progressPercent:void 0,size:24}),v(_,{variant:`meta`,children:`Uploading...`}),v(`svg`,{width:`88`,height:`88`,viewBox:`0 0 88 88`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:v(`rect`,{x:`1`,y:`1`,width:`86`,height:`86`,rx:`7`,stroke:e.ui.background__medium.rgba,strokeWidth:`2`,strokeDasharray:`4 4`})})]}),[C,T,O,w,A,S.name,k])}),v(t,{title:S.name,children:v(n,{group:`paragraph`,variant:`meta`,children:S.name})}),!O&&k.onDelete&&v(i,{"data-testid":`delete-file`,onClick:D,children:v(g,{color:e.text.static_icons__tertiary.rgba,data:b})})]})};export{S as default};
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{formatDataSize as t}from"../../atoms/utils/size.js";import{Container as n,FileName as r,LinearProgress as i,ProgressWrapper as a,RegularFileProgressDetails as o,RegularFileProgressWrapper as s}from"./RegularFileProgress.styles.js";import{useMemo as c}from"react";import{Button as l,CircularProgress 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{close_circle_outlined as h,delete_to_trash as g,file as _,refresh as v}from"@equinor/eds-icons";var y=({onRetry:y,file:b,customLoadingText:x,customCompleteText:S,isError:C,fullErrorText:w,showCompleteState:T,handleOnClick:E,isDeleting:D,...O})=>{let k=c(()=>{if(!b?.size||O.isDone||O.indeterminate||O.progressPercent===void 0)return 1;let e=b.size/100*O.progressPercent;return t({inputFormat:`B`,size:e,decimals:1})},[b?.size,O]),A=c(()=>C?w??`An error has occurred`:T?S??`File uploaded!`:x??`loading...`,[S,x,w,T,C]);return m(n,{$isError:C,children:[p(d,{data:_,color:C?e.interactive.warning__hover.rgba:e.interactive.primary__resting.rgba,size:32}),m(s,{children:[m(r,{children:[p(f,{variant:`caption`,children:b.name}),m(`div`,{children:[D?p(l,{variant:`ghost_icon`,children:p(u,{size:24})}):O.onDelete&&p(l,{variant:`ghost_icon`,onClick:E,"data-testid":`delete-file`,children:p(d,{data:T?g:h,color:e.text.static_icons__tertiary.rgba,size:24})}),C&&y&&p(l,{variant:`ghost_icon`,onClick:y,children:p(d,{data:v,color:e.text.static_icons__tertiary.rgba,size:24})})]})]}),p(a,{children:!T&&!O.isDone&&p(i,{variant:O.indeterminate?`indeterminate`:`determinate`,value:O.indeterminate?void 0:O.progressPercent})}),m(o,{children:[p(f,{variant:`overline`,children:A}),b?.size&&p(f,{variant:`overline`,children:T?t({size:b.size,decimals:1,inputFormat:`B`}):`${k} of ${t({size:b.size,decimals:1,inputFormat:`B`})}`})]})]})]})};export{y as default};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{formatDataSize as t}from"../../atoms/utils/size.js";import{Container as n,FileName as r,LinearProgress as i,ProgressWrapper as a,RegularFileProgressDetails as o,RegularFileProgressWrapper as s}from"./RegularFileProgress.styles.js";import{useMemo as c}from"react";import{Button as l,CircularProgress 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{close_circle_outlined as h,delete_to_trash as g,file as _,refresh as v}from"@equinor/eds-icons";var y=({onRetry:y,file:b,customLoadingText:x,customCompleteText:S,isError:C,fullErrorText:w,showCompleteState:T,handleOnClick:E,isDeleting:D,...O})=>{let k=c(()=>!b?.size||O.isDone||O.indeterminate||O.progressPercent===void 0?1:t({inputFormat:`B`,size:b.size/100*O.progressPercent,decimals:1}),[b?.size,O]),A=c(()=>C?w??`An error has occurred`:T?S??`File uploaded!`:x??`loading...`,[S,x,w,T,C]);return m(n,{$isError:C,children:[p(d,{data:_,color:C?e.interactive.warning__hover.rgba:e.interactive.primary__resting.rgba,size:32}),m(s,{children:[m(r,{children:[p(f,{variant:`caption`,children:b.name}),m(`div`,{children:[D?p(l,{variant:`ghost_icon`,children:p(u,{size:24})}):O.onDelete&&p(l,{variant:`ghost_icon`,onClick:E,"data-testid":`delete-file`,children:p(d,{data:T?g:h,color:e.text.static_icons__tertiary.rgba,size:24})}),C&&y&&p(l,{variant:`ghost_icon`,onClick:y,children:p(d,{data:v,color:e.text.static_icons__tertiary.rgba,size:24})})]})]}),p(a,{children:!T&&!O.isDone&&p(i,{variant:O.indeterminate?`indeterminate`:`determinate`,value:O.indeterminate?void 0:O.progressPercent})}),m(o,{children:[p(f,{variant:`overline`,children:A}),b?.size&&p(f,{variant:`overline`,children:T?t({size:b.size,decimals:1,inputFormat:`B`}):`${k} of ${t({size:b.size,decimals:1,inputFormat:`B`})}`})]})]})]})};export{y as default};
@@ -1,5 +1,5 @@
1
1
  import { IconCellColor, IconCellState, IconCellVariant, IconCellVariants } from "./IconCell.types.js";
2
- import * as react15 from "react";
2
+ import * as react17 from "react";
3
3
  import { HTMLAttributes, MouseEventHandler, ReactNode } from "react";
4
4
  import { IconData } from "@equinor/eds-icons";
5
5
 
@@ -49,6 +49,6 @@ type IconCellProps = ScribbledOutProps | RegularIconCellProps;
49
49
  * @param {React.Ref<HTMLButtonElement>} ref - Ref forwarded to the inner button element.
50
50
  * @returns {JSX.Element} The rendered IconCell.
51
51
  */
52
- declare const IconCell: react15.ForwardRefExoticComponent<IconCellProps & react15.RefAttributes<HTMLButtonElement>>;
52
+ declare const IconCell: react17.ForwardRefExoticComponent<IconCellProps & react17.RefAttributes<HTMLButtonElement>>;
53
53
  //#endregion
54
54
  export { IconCell, IconCellProps };
@@ -63,12 +63,12 @@ import{animation as e}from"../../atoms/style/animation.js";import{colors as t}fr
63
63
  `}
64
64
 
65
65
  // Overlay for Label & HelperIconContainer
66
- ${({$backgroundColor:e,$variant:n,$state:a})=>{let o=n===i.COLOURED?a===r.ERROR?c[r.ERROR]:a===r.WARNING?c[r.WARNING]:e:t.ui.background__default.rgba;return`
66
+ ${({$backgroundColor:e,$variant:n,$state:a})=>`
67
67
  ${f}::before,
68
68
  ${m}::before {
69
- ${u(o)}
69
+ ${u(n===i.COLOURED?a===r.ERROR?c[r.ERROR]:a===r.WARNING?c[r.WARNING]:e:t.ui.background__default.rgba)}
70
70
  }
71
- `}}
71
+ `}
72
72
 
73
73
  // Disabled state
74
74
  &:disabled {
@@ -1,5 +1,5 @@
1
1
  import { ChangeEvent, MouseEvent } from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/molecules/OptionDrawer/OptionDrawer.d.ts
5
5
  interface ToggleEventProps<T> {
@@ -43,7 +43,7 @@ declare const OptionDrawer: {
43
43
  openAll,
44
44
  showIntermediateParent,
45
45
  parentHasNestedItems
46
- }: OptionDrawerProps<T>): react_jsx_runtime0.JSX.Element;
46
+ }: OptionDrawerProps<T>): react_jsx_runtime1.JSX.Element;
47
47
  displayName: string;
48
48
  };
49
49
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react17 from "react";
1
+ import * as react13 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: react17.ForwardRefExoticComponent<ProfileAvatarProps & react17.RefAttributes<HTMLDivElement>>;
10
+ declare const ProfileAvatar: react13.ForwardRefExoticComponent<ProfileAvatarProps & react13.RefAttributes<HTMLDivElement>>;
11
11
  //#endregion
12
12
  export { ProfileAvatar, ProfileAvatarProps };
@@ -1 +1 @@
1
- import{useAmplifyKit as e}from"../../atoms/hooks/useAmplifyKit.js";import{useEffect as t,useRef as n}from"react";import{useEditor as r}from"@tiptap/react";import{useQueryClient as i}from"@tanstack/react-query";const a=({children:a,content:o,features:s,placeholder:c,onUpdate:l,onImageUpload:u,onImageRead:d,onImageRemove:f,onRemovedImagesChange:p,extensions:m=[]})=>{let h=e({features:s,placeholder:c,onImageUpload:u,onImageRead:d}),g=i(),_=n([]),v=n([]),y=n([]),b=e=>{let t=[];e.getJSON().content?.forEach(e=>{e.type===`image`&&e.attrs?.src&&t.push(e.attrs.src)});for(let e of t)if(!_.current.includes(e))_.current.push(e);else if(_.current.includes(e)&&f){let t=g.getQueryData([e]);if(t){let n=t.split(`,`),r=n[0].match(/:(.*?);/)[1],i=atob(n[n.length-1]),a=i.length,o=new Uint8Array(a);for(;a--;)o[a]=i.charCodeAt(a);let s=new File([o],e,{type:r});u?.(s)}}let n=_.current.filter(e=>!t.includes(e)&&!v.current.includes(e));if(f)for(let e of n)f?.(e),v.current.push(e);p&&y.current.length!==n.length&&(p(v.current),y.current=n)},x=r({content:o,shouldRerenderOnTransaction:!0,extensions:[h,...m],onCreate:({editor:e})=>{b(e)},onUpdate:({editor:e})=>{b(e),l?.(e.getHTML())}});return t(()=>{x&&o!==x.getHTML()&&x.commands.setContent(o||``)},[o]),x?a(x):null};export{a as EditorProvider};
1
+ import{useAmplifyKit as e}from"../../atoms/hooks/useAmplifyKit.js";import{useEffect as t,useRef as n}from"react";import{useEditor as r}from"@tiptap/react";import{useQueryClient as i}from"@tanstack/react-query";const a=({children:a,content:o,features:s,placeholder:c,onUpdate:l,onImageUpload:u,onImageRead:d,onImageRemove:f,onRemovedImagesChange:p,extensions:m=[]})=>{let h=e({features:s,placeholder:c,onImageUpload:u,onImageRead:d}),g=i(),_=n([]),v=n([]),y=n([]),b=e=>{let t=[];e.getJSON().content?.forEach(e=>{e.type===`image`&&e.attrs?.src&&t.push(e.attrs.src)});for(let e of t)if(!_.current.includes(e))_.current.push(e);else if(_.current.includes(e)&&f){let t=g.getQueryData([e]);if(t){let n=t.split(`,`),r=n[0].match(/:(.*?);/)[1],i=atob(n[n.length-1]),a=i.length,o=new Uint8Array(a);for(;a--;)o[a]=i.charCodeAt(a);let s=new File([o],e,{type:r});u?.(s)}}let n=_.current.filter(e=>!t.includes(e)&&!v.current.includes(e));if(f)for(let e of n)f?.(e),v.current.push(e);else p&&y.current.length!==n.length&&(p(n),y.current=n)},x=r({content:o,shouldRerenderOnTransaction:!0,extensions:[h,...m],onCreate:({editor:e})=>{b(e)},onUpdate:({editor:e})=>{b(e),l?.(e.getHTML())}});return t(()=>{x&&o!==x.getHTML()&&x.commands.setContent(o||``)},[o]),x?a(x):null};export{a as EditorProvider};
@@ -1,7 +1,7 @@
1
- import * as react39 from "react";
1
+ import * as react41 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: react39.ForwardRefExoticComponent<SearchProps & react39.RefAttributes<HTMLInputElement>>;
5
+ declare const Search$1: react41.ForwardRefExoticComponent<SearchProps & react41.RefAttributes<HTMLInputElement>>;
6
6
  //#endregion
7
7
  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_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/molecules/Select/ComboBox/ComboBox.d.ts
5
5
  type ListComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T> & MultiSelectCommon<T> & ListSelectProps<T>;
@@ -18,6 +18,6 @@ type GroupedComboBoxProps<T extends SelectOptionRequired> = CommonSelectProps<T>
18
18
  * @param showSelectedAsText - If values should be shown as "5/10 Selected", defaults to false
19
19
  * @param customMenuItemComponent - Custom component to use for rendering menu item, defaults to a checkbox with label
20
20
  */
21
- declare function ComboBox<T extends SelectOptionRequired>(props: ListComboBoxProps<T> | GroupedComboBoxProps<T>): react_jsx_runtime1.JSX.Element;
21
+ declare function ComboBox<T extends SelectOptionRequired>(props: ListComboBoxProps<T> | GroupedComboBoxProps<T>): react_jsx_runtime0.JSX.Element;
22
22
  //#endregion
23
23
  export { ComboBox, GroupedComboBoxProps, ListComboBoxProps };
@@ -1 +1 @@
1
- import{getCumulativeArrayFromNumberedArray as e}from"./Select.utils.js";import{NoItemsFoundText as t}from"./Select.styles.js";import{SelectMenuItem as n}from"./SelectMenuItem.js";import{useMemo as r}from"react";import{Menu as i}from"@equinor/eds-core-react";import{jsx as a}from"react/jsx-runtime";const o=o=>{let{onItemSelect:s,onItemKeyDown:c,itemRefs:l,groups:u,search:d,onSearchFilter:f,CustomMenuItemComponent:p}=o,m=r(()=>{if(d===``)return u;let e=new RegExp(d.trim(),`i`);return u.map(t=>({title:t.title,items:t.items.filter(t=>f===void 0?t.label.match(e):f(d,t))})).filter(e=>e.items.length>0)},[u,f,d]),h=r(()=>{let t=m.map(e=>e.items.length);return e(t)},[m]);return m.length===0?a(t,{children:`No items found`}):`values`in o?m.map((e,t)=>a(i.Section,{index:t,title:e.title,children:e.items.map((r,i)=>a(n,{index:i+h[t],childOffset:0,item:r,itemRefs:l,onItemKeyDown:c,onItemSelect:s,values:o.values,CustomMenuItemComponent:p},`${e.title}-${t}-item-${r.value}`))},`${e.title}-${t}`)):m.map((e,t)=>a(i.Section,{index:t,title:e.title,children:e.items.map((r,i)=>a(n,{index:i+h[t],childOffset:0,item:r,itemRefs:l,onItemKeyDown:c,onItemSelect:s,value:o.value,CustomMenuItemComponent:p},`${e.title}-${t}-item-${r.value}`))},`${e.title}-${t}`))};export{o as GroupedSelectMenu};
1
+ import{getCumulativeArrayFromNumberedArray as e}from"./Select.utils.js";import{NoItemsFoundText as t}from"./Select.styles.js";import{SelectMenuItem as n}from"./SelectMenuItem.js";import{useMemo as r}from"react";import{Menu as i}from"@equinor/eds-core-react";import{jsx as a}from"react/jsx-runtime";const o=o=>{let{onItemSelect:s,onItemKeyDown:c,itemRefs:l,groups:u,search:d,onSearchFilter:f,CustomMenuItemComponent:p}=o,m=r(()=>{if(d===``)return u;let e=new RegExp(d.trim(),`i`);return u.map(t=>({title:t.title,items:t.items.filter(t=>f===void 0?t.label.match(e):f(d,t))})).filter(e=>e.items.length>0)},[u,f,d]),h=r(()=>e(m.map(e=>e.items.length)),[m]);return m.length===0?a(t,{children:`No items found`}):`values`in o?m.map((e,t)=>a(i.Section,{index:t,title:e.title,children:e.items.map((r,i)=>a(n,{index:i+h[t],childOffset:0,item:r,itemRefs:l,onItemKeyDown:c,onItemSelect:s,values:o.values,CustomMenuItemComponent:p},`${e.title}-${t}-item-${r.value}`))},`${e.title}-${t}`)):m.map((e,t)=>a(i.Section,{index:t,title:e.title,children:e.items.map((r,i)=>a(n,{index:i+h[t],childOffset:0,item:r,itemRefs:l,onItemKeyDown:c,onItemSelect:s,value:o.value,CustomMenuItemComponent:p},`${e.title}-${t}-item-${r.value}`))},`${e.title}-${t}`))};export{o as GroupedSelectMenu};
@@ -1 +1 @@
1
- import{colors as e}from"../../atoms/style/colors.js";import{getVariantIcon as t}from"../../atoms/utils/forms.js";import{useSelect as n}from"../../atoms/hooks/useSelect.js";import{SkeletonField as r}from"../Skeleton/SkeletonField.js";import{useOutsideClick as i}from"../../node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js";import{ClearButton as ee,ComboBoxChip as a,Container as o,HelperWrapper as te,PlaceholderText as s,Section as c,StyledMenu as l,ValueText as u,Wrapper as ne}from"./Select.styles.js";import{GroupedSelectMenu as re}from"./GroupedSelectMenu.js";import{ListSelectMenu as d}from"./ListSelectMenu.js";import{useMemo as f,useRef as p}from"react";import{Icon as m,Label as h}from"@equinor/eds-core-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{arrow_drop_down as ie,arrow_drop_up as ae,clear as v}from"@equinor/eds-icons";const y=y=>{let{clearable:b=!0,loading:x=!1,disabled:S=!1,lightBackground:C=!1,underlineHighlight:w=!1,sortValues:T=!0,placeholder:E=`Select...`,label:D,helperText:O,showHelperIcon:k=!0,meta:A,id:j=`amplify-combobox-${D}`,variant:M,inDialog:N=!1,onSearchFilter:P,"data-testid":F,CustomMenuItemComponent:I}=y,{handleOnAddItem:L,handleOnClear:R,handleOnItemKeyDown:z,handleOnItemSelect:B,handleOnSearchChange:V,handleOnSearchKeyDown:H,handleToggleOpen:U,itemRefs:W,search:G,selectedValues:K,handleOnClose:q,handleOnOpen:oe,handleOnRemoveItem:J,open:Y,searchRef:se,tryingToRemoveItem:X}=n({...y,clearable:b,loading:x,disabled:S,lightBackground:C,underlineHighlight:w,sortValues:T,placeholder:E}),ce=p(`${Math.max(40,Math.random()*80)}%`),Z=p(null),Q=p(null),le=f(()=>!!D||!!A,[D,A]),ue=f(()=>!!O,[O]),$=f(()=>{if(k)return t(M)},[k,M]);i(Q.current,e=>{N&&Y&&e.target&&Z.current&&Q.current&&!Z.current.contains(e.target)&&!Q.current?.contains(e.target)&&q()});let de=f(()=>{if(`value`in y&&y.value&&`customValueComponent`in y&&y.customValueComponent)return g(y.customValueComponent,{item:y.value});if(`value`in y&&y.value)return g(u,{children:y.value.label});if(`showSelectedAsText`in y&&y.showSelectedAsText){let e=y.items?y.items.length:y.groups.flatMap(e=>e.items).length,t=typeof y.showSelectedAsText==`function`?y.showSelectedAsText({selectedAmount:K.length,totalAmount:e}):`${K.length}/${e} Selected`;return g(u,{children:t})}else return K.map(e=>`customValueComponent`in y&&y.customValueComponent?g(y.customValueComponent,{item:e,onDelete:()=>J(e),tryingToRemove:X!==void 0&&X.value===e.value},e.value):g(a,{"data-testid":`amplify-combobox-chip`,className:`amplify-combo-box-chip`,onDelete:()=>J(e),$tryingToRemove:X?.value===e.value,$lightBackground:C,children:e.label},e.value))},[K,X,C,y,J]);return _(`div`,{children:[le&&g(h,{label:D,meta:A,htmlFor:j,disabled:S}),_(ne,{children:[_(o,{"data-testid":F||`combobox-container`,ref:Z,onClick:oe,"aria-expanded":Y,$variant:M,$loading:x,$lightBackground:C,children:[_(c,{children:[!x&&G===``&&K.length===0&&g(s,{children:E}),(G===``&&`value`in y||`values`in y&&K.length>0&&(!y.showSelectedAsText||y.showSelectedAsText&&G===``))&&!x&&de,g(`input`,{id:j,disabled:S||x,ref:se,type:`search`,role:`combobox`,value:G,autoComplete:`off`,onChange:V,onKeyDownCapture:H}),x&&g(r,{role:`progressbar`,style:{width:ce.current,left:0,top:`50%`,transform:`translateY(-50%)`}})]}),g(m,{onClick:U,data:Y?ae:ie,color:x?e.interactive.disabled__fill.rgba:e.interactive.primary__resting.rgba}),b&&K.length>0&&!x&&g(ee,{id:`clear`,variant:`ghost_icon`,onClick:R,"data-testid":`clearBtn`,children:g(m,{data:v,size:18})})]}),ue&&_(te,{$variant:S?`disabled`:M,children:[$&&g(m,{data:$,size:16}),g(h,{label:O,htmlFor:j})]})]}),Y&&g(l,{ref:Q,open:!0,id:`combobox-menu`,anchorEl:Z.current,onClose:q,placement:`bottom`,style:{width:`${Z.current?.clientWidth}px`,maxWidth:`${Z.current?.clientWidth}px`},children:`groups`in y&&y.groups?g(re,{...y,search:G,itemRefs:W,onItemSelect:B,onItemKeyDown:z,onSearchFilter:P,CustomMenuItemComponent:I}):g(d,{...y,search:G,itemRefs:W,onAddItem:y.onAddItem?L:void 0,onItemSelect:B,onItemKeyDown:z,onSearchFilter:P,CustomMenuItemComponent:I})},`select-menu-${G}`)]})};export{y as Select};
1
+ import{colors as e}from"../../atoms/style/colors.js";import{getVariantIcon as t}from"../../atoms/utils/forms.js";import{useSelect as n}from"../../atoms/hooks/useSelect.js";import{SkeletonField as r}from"../Skeleton/SkeletonField.js";import{useOutsideClick as i}from"../../node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js";import{ClearButton as ee,ComboBoxChip as te,Container as a,HelperWrapper as ne,PlaceholderText as o,Section as s,StyledMenu as c,ValueText as l,Wrapper as re}from"./Select.styles.js";import{GroupedSelectMenu as u}from"./GroupedSelectMenu.js";import{ListSelectMenu as d}from"./ListSelectMenu.js";import{useMemo as f,useRef as p}from"react";import{Icon as m,Label as h}from"@equinor/eds-core-react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import{arrow_drop_down as ie,arrow_drop_up as ae,clear as v}from"@equinor/eds-icons";const y=y=>{let{clearable:b=!0,loading:x=!1,disabled:S=!1,lightBackground:C=!1,underlineHighlight:w=!1,sortValues:T=!0,placeholder:E=`Select...`,label:D,helperText:O,showHelperIcon:k=!0,meta:A,id:j=`amplify-combobox-${D}`,variant:M,inDialog:N=!1,onSearchFilter:P,"data-testid":F,CustomMenuItemComponent:I}=y,{handleOnAddItem:L,handleOnClear:R,handleOnItemKeyDown:z,handleOnItemSelect:B,handleOnSearchChange:V,handleOnSearchKeyDown:H,handleToggleOpen:U,itemRefs:W,search:G,selectedValues:K,handleOnClose:q,handleOnOpen:oe,handleOnRemoveItem:J,open:Y,searchRef:se,tryingToRemoveItem:X}=n({...y,clearable:b,loading:x,disabled:S,lightBackground:C,underlineHighlight:w,sortValues:T,placeholder:E}),ce=p(`${Math.max(40,Math.random()*80)}%`),Z=p(null),Q=p(null),le=f(()=>!!D||!!A,[D,A]),ue=f(()=>!!O,[O]),$=f(()=>{if(k)return t(M)},[k,M]);i(Q.current,e=>{N&&Y&&e.target&&Z.current&&Q.current&&!Z.current.contains(e.target)&&!Q.current?.contains(e.target)&&q()});let de=f(()=>{if(`value`in y&&y.value&&`customValueComponent`in y&&y.customValueComponent)return g(y.customValueComponent,{item:y.value});if(`value`in y&&y.value)return g(l,{children:y.value.label});if(`showSelectedAsText`in y&&y.showSelectedAsText){let e=y.items?y.items.length:y.groups.flatMap(e=>e.items).length;return g(l,{children:typeof y.showSelectedAsText==`function`?y.showSelectedAsText({selectedAmount:K.length,totalAmount:e}):`${K.length}/${e} Selected`})}else return K.map(e=>`customValueComponent`in y&&y.customValueComponent?g(y.customValueComponent,{item:e,onDelete:()=>J(e),tryingToRemove:X!==void 0&&X.value===e.value},e.value):g(te,{"data-testid":`amplify-combobox-chip`,className:`amplify-combo-box-chip`,onDelete:()=>J(e),$tryingToRemove:X?.value===e.value,$lightBackground:C,children:e.label},e.value))},[K,X,C,y,J]);return _(`div`,{children:[le&&g(h,{label:D,meta:A,htmlFor:j,disabled:S}),_(re,{children:[_(a,{"data-testid":F||`combobox-container`,ref:Z,onClick:oe,"aria-expanded":Y,$variant:M,$loading:x,$lightBackground:C,children:[_(s,{children:[!x&&G===``&&K.length===0&&g(o,{children:E}),(G===``&&`value`in y||`values`in y&&K.length>0&&(!y.showSelectedAsText||y.showSelectedAsText&&G===``))&&!x&&de,g(`input`,{id:j,disabled:S||x,ref:se,type:`search`,role:`combobox`,value:G,autoComplete:`off`,onChange:V,onKeyDownCapture:H}),x&&g(r,{role:`progressbar`,style:{width:ce.current,left:0,top:`50%`,transform:`translateY(-50%)`}})]}),g(m,{onClick:U,data:Y?ae:ie,color:x?e.interactive.disabled__fill.rgba:e.interactive.primary__resting.rgba}),b&&K.length>0&&!x&&g(ee,{id:`clear`,variant:`ghost_icon`,onClick:R,"data-testid":`clearBtn`,children:g(m,{data:v,size:18})})]}),ue&&_(ne,{$variant:S?`disabled`:M,children:[$&&g(m,{data:$,size:16}),g(h,{label:O,htmlFor:j})]})]}),Y&&g(c,{ref:Q,open:!0,id:`combobox-menu`,anchorEl:Z.current,onClose:q,placement:`bottom`,style:{width:`${Z.current?.clientWidth}px`,maxWidth:`${Z.current?.clientWidth}px`},children:`groups`in y&&y.groups?g(u,{...y,search:G,itemRefs:W,onItemSelect:B,onItemKeyDown:z,onSearchFilter:P,CustomMenuItemComponent:I}):g(d,{...y,search:G,itemRefs:W,onAddItem:y.onAddItem?L:void 0,onItemSelect:B,onItemKeyDown:z,onSearchFilter:P,CustomMenuItemComponent:I})},`select-menu-${G}`)]})};export{y as Select};
@@ -1 +1 @@
1
- function e(t,n){let r=t.length,i=t.slice(0,n).map(t=>e(t.children??[],0)).reduce((e,t)=>e+t,0);return r+i}const t=e=>{let t=e=>{if(!e?.length)return[];let n=e.flatMap(({children:e,value:t})=>e?.map(e=>({...e,parent:t}))??[]);return[...n,...t(n)]};return[...e,...t(e)]},n=e=>{let t=Array(e.length).fill(0);for(let n=1;n<e.length;n++)t[n]=t[n-1]+e[n-1];return t};export{t as flattenOptions,e as getChildOffset,n as getCumulativeArrayFromNumberedArray};
1
+ function e(t,n){return t.length+t.slice(0,n).map(t=>e(t.children??[],0)).reduce((e,t)=>e+t,0)}const t=e=>{let t=e=>{if(!e?.length)return[];let n=e.flatMap(({children:e,value:t})=>e?.map(e=>({...e,parent:t}))??[]);return[...n,...t(n)]};return[...e,...t(e)]},n=e=>{let t=Array(e.length).fill(0);for(let n=1;n<e.length;n++)t[n]=t[n-1]+e[n-1];return t};export{t as flattenOptions,e as getChildOffset,n as getCumulativeArrayFromNumberedArray};
@@ -1 +1 @@
1
- import{flattenOptions as e}from"./Select.utils.js";import{checkbox as t,checkbox_indeterminate as n,checkbox_outline as r}from"@equinor/eds-icons";const i={selected:t,indeterminate:n,none:r};function a(e,t){let n=o(e,t);return i[n]}function o(t,n){if(!t.children||t.children.length===0)return`none`;let r=n.some(e=>e.value===t.value),i=n.map(({value:e})=>e),a=e([t])?.map(({value:e})=>e);return r?`selected`:a.some(e=>i.includes(e))?`indeterminate`:`none`}export{a as getParentIcon,o as getParentState};
1
+ import{flattenOptions as e}from"./Select.utils.js";import{checkbox as t,checkbox_indeterminate as n,checkbox_outline as r}from"@equinor/eds-icons";const i={selected:t,indeterminate:n,none:r};function a(e,t){return i[o(e,t)]}function o(t,n){if(!t.children||t.children.length===0)return`none`;let r=n.some(e=>e.value===t.value),i=n.map(({value:e})=>e),a=e([t])?.map(({value:e})=>e);return r?`selected`:a.some(e=>i.includes(e))?`indeterminate`:`none`}export{a as getParentIcon,o as getParentState};
@@ -1,4 +1,4 @@
1
- import * as react41 from "react";
1
+ import * as react39 from "react";
2
2
  import * as styled_components_dist_types6 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_types6.IStyledComponentBase<"web", styled_components_dist_types6.Substitute<react41.DetailedHTMLProps<react41.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
10
+ declare const SkeletonBase: styled_components_dist_types6.IStyledComponentBase<"web", styled_components_dist_types6.Substitute<react39.DetailedHTMLProps<react39.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, SkeletonBaseProps>> & string;
11
11
  //#endregion
12
12
  export { SkeletonBase, SkeletonBaseProps, skeletonBaseloading };
@@ -4,4 +4,4 @@ import{tokens as e}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/ind
4
4
  background: ${e=>e.$background};
5
5
  border: none;
6
6
  margin: 0;
7
- `,o=({done:e})=>{let n=t(()=>e?i.interactive.primary__resting.rgba:i.interactive.disabled__text.rgba,[e]);return r(a,{$background:n})};export{o as StepLine};
7
+ `,o=({done:e})=>r(a,{$background:t(()=>e?i.interactive.primary__resting.rgba:i.interactive.disabled__text.rgba,[e])});export{o as StepLine};
@@ -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`)}});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};
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";const o=({gradientColors:o})=>{let s=r(null),[c,l]=i(s.current?.clientWidth??0),[u,d]=i(s.current?.clientHeight??0);return n(()=>{let e=()=>{s.current&&(l(s.current.clientWidth),d(s.current.clientHeight))};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[]),a(e,{ref:e=>{s.current=e,s.current&&(l(s.current.clientWidth),d(s.current.clientHeight))},children:a(t,{height:u,width:c,gradientColors:o})})};export{o as Waves};
@@ -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:a,selectedTab:u})=>{let{search:d}=c({strict:!1}),f=r(()=>a.toSorted((e,t)=>{let n=e.orderBy??0,r=t.orderBy??0;return n-r}),[a]),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?o(l,{children:s(t,{center:!1,children:[o(t.Title,{title:`No Questions Found`}),o(t.Description,{text:`No questions or answers matches your search in this category`})]})}):p.length===0?null:s(l,{children:[o(i,{variant:`h4`,children:e}),p.map(e=>o(n,{...e},e.id))]})};export{u as Category};
9
+ `,u=({categoryName:e,faqs:a,selectedTab:u})=>{let{search:d}=c({strict:!1}),f=r(()=>a.toSorted((e,t)=>(e.orderBy??0)-(t.orderBy??0)),[a]),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?o(l,{children:s(t,{center:!1,children:[o(t.Title,{title:`No Questions Found`}),o(t.Description,{text:`No questions or answers matches your search in this category`})]})}):p.length===0?null:s(l,{children:[o(i,{variant:`h4`,children:e}),p.map(e=>o(n,{...e},e.id))]})};export{u as Category};
@@ -1,5 +1,5 @@
1
1
  import { FilterProps } from "./Filter.types.js";
2
- import * as react_jsx_runtime4 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/organisms/Filter/Filter.d.ts
5
5
 
@@ -30,6 +30,6 @@ declare function Filter<T extends string>({
30
30
  placeholder,
31
31
  id,
32
32
  ...rest
33
- }: FilterProps<T>): react_jsx_runtime4.JSX.Element;
33
+ }: FilterProps<T>): react_jsx_runtime5.JSX.Element;
34
34
  //#endregion
35
35
  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_runtime5 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime6 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_runtime5.JSX.Element;
17
+ }: QuickFilterProps<T>): react_jsx_runtime6.JSX.Element;
18
18
  //#endregion
19
19
  export { QuickFilter };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime6 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime4 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_runtime6.JSX.Element;
16
+ }: SortMenuProps<S>): react_jsx_runtime4.JSX.Element;
17
17
  //#endregion
18
18
  export { SortMenu };
@@ -1 +1 @@
1
- import{TableOfContentsProvider as e}from"../../providers/TableOfContentsProvider.js";import{TableOfContents as t}from"../TableOfContents/TableOfContents.js";import{useFilteredReleaseNotes as n}from"./hooks/useFilteredReleaseNotes.js";import{extractYearsData as r,monthValueToString as i,yearId as a}from"./ReleaseNotesPage.utils.js";import{ReleasePosts as o}from"./ReleasePosts/ReleasePosts.js";import{ReleaseNoteFilter as s}from"./ReleaseNoteFilter.js";import{Container as c,StickyRightSide as l}from"./ReleaseNotesPage.styles.js";import{useMemo as u}from"react";import{Typography as d}from"@equinor/eds-core-react";import{jsx as f,jsxs as p}from"react/jsx-runtime";const m=()=>{let{data:m}=n(),h=u(()=>{let e=[];for(let t of r(m))e.push({value:a(t.value),label:t.label,children:t.months.map(e=>({label:e.label,value:i(e.value)}))});return e},[m]);return f(e,{items:h,children:p(c,{children:[f(d,{variant:`h1`,bold:!0,children:`Release Notes`}),p(`section`,{children:[f(s,{}),f(o,{})]}),f(l,{children:f(t,{onlyShowSelectedChildren:!1,variant:`border`})})]})})};export{m as ReleaseNotesPage};
1
+ import{TableOfContentsProvider as e}from"../../providers/TableOfContentsProvider.js";import{TableOfContents as t}from"../TableOfContents/TableOfContents.js";import{useFilteredReleaseNotes as n}from"./hooks/useFilteredReleaseNotes.js";import{extractYearsData as r,monthValueToString as i,yearId as a}from"./ReleaseNotesPage.utils.js";import{ReleasePosts as o}from"./ReleasePosts/ReleasePosts.js";import{ReleaseNoteFilter as s}from"./ReleaseNoteFilter.js";import{Container as c,StickyRightSide as l}from"./ReleaseNotesPage.styles.js";import{useMemo as u}from"react";import{Typography as d}from"@equinor/eds-core-react";import{jsx as f,jsxs as p}from"react/jsx-runtime";const m=()=>{let{data:m}=n();return f(e,{items:u(()=>{let e=[];for(let t of r(m))e.push({value:a(t.value),label:t.label,children:t.months.map(e=>({label:e.label,value:i(e.value)}))});return e},[m]),children:p(c,{children:[f(d,{variant:`h1`,bold:!0,children:`Release Notes`}),p(`section`,{children:[f(s,{}),f(o,{})]}),f(l,{children:f(t,{onlyShowSelectedChildren:!1,variant:`border`})})]})})};export{m as ReleaseNotesPage};
@@ -1 +1 @@
1
- import{sortByDate as e}from"../../../atoms/utils/sort.js";import{useReleaseNotesFilters as t}from"./useReleaseNotesFilters.js";import{useMemo as n}from"react";import{useReleaseNotesQuery as r}from"@equinor/subsurface-app-management";function i(){let{search:i,isFiltering:a}=t(),{data:o,isLoading:s}=r();return{data:n(()=>{let t=o??[];return i.releaseNoteTypes&&(t=t.filter(e=>i.releaseNoteTypes?.every(t=>!!e.tags?.includes(t)))),i.search&&(t=t.filter(e=>i.search?.every(t=>{let n=t.toLowerCase();return e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n)}))),t.sort((t,n)=>{let r=t.releaseDate??t.createdDate,i=n.releaseDate??n.createdDate;return e(r,i)}),t},[o,i]),isLoading:s,isSearchingOrFiltering:a}}export{i as useFilteredReleaseNotes};
1
+ import{sortByDate as e}from"../../../atoms/utils/sort.js";import{useReleaseNotesFilters as t}from"./useReleaseNotesFilters.js";import{useMemo as n}from"react";import{useReleaseNotesQuery as r}from"@equinor/subsurface-app-management";function i(){let{search:i,isFiltering:a}=t(),{data:o,isLoading:s}=r();return{data:n(()=>{let t=o??[];return i.releaseNoteTypes&&(t=t.filter(e=>i.releaseNoteTypes?.every(t=>!!e.tags?.includes(t)))),i.search&&(t=t.filter(e=>i.search?.every(t=>{let n=t.toLowerCase();return e.title.toLowerCase().includes(n)||e.body.toLowerCase().includes(n)}))),t.sort((t,n)=>e(t.releaseDate??t.createdDate,n.releaseDate??n.createdDate)),t},[o,i]),isLoading:s,isSearchingOrFiltering:a}}export{i as useFilteredReleaseNotes};
@@ -1 +1 @@
1
- import{capitalize as e}from"../../../atoms/utils/string.js";import{useNavigate as t,useSearch as n}from"@tanstack/react-router";function r(){let r=n({strict:!1}),i=t(),a={search:(r.search??[]).map(e=>({value:e,label:e})),releaseNoteTypes:(r.releaseNoteTypes??[]).map(t=>({value:t,label:e(t)}))};return{search:r,selected:a,setSearchParam:(e,t)=>{i({to:`.`,search:n=>({...n,[e]:Array.isArray(t)&&t.length===0?void 0:t})})},clearAll:()=>{i({to:`.`,search:void 0})},isFiltering:r.search!==void 0||r.releaseNoteTypes!==void 0}}export{r as useReleaseNotesFilters};
1
+ import{capitalize as e}from"../../../atoms/utils/string.js";import{useNavigate as t,useSearch as n}from"@tanstack/react-router";function r(){let r=n({strict:!1}),i=t();return{search:r,selected:{search:(r.search??[]).map(e=>({value:e,label:e})),releaseNoteTypes:(r.releaseNoteTypes??[]).map(t=>({value:t,label:e(t)}))},setSearchParam:(e,t)=>{i({to:`.`,search:n=>({...n,[e]:Array.isArray(t)&&t.length===0?void 0:t})})},clearAll:()=>{i({to:`.`,search:void 0})},isFiltering:r.search!==void 0||r.releaseNoteTypes!==void 0}}export{r as useReleaseNotesFilters};
@@ -1,4 +1,4 @@
1
- import * as react122 from "react";
1
+ import * as react121 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: react122.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react122.RefAttributes<HTMLDivElement>>;
19
+ declare const SideBar: react121.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react121.RefAttributes<HTMLDivElement>>;
20
20
  //#endregion
21
21
  export { SideBar };
@@ -1,10 +1,10 @@
1
- import * as react124 from "react";
1
+ import * as react125 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: react124.ForwardRefExoticComponent<ActionProps & react124.RefAttributes<HTMLButtonElement>>;
8
+ declare const Action: react125.ForwardRefExoticComponent<ActionProps & react125.RefAttributes<HTMLButtonElement>>;
9
9
  //#endregion
10
10
  export { Action };
@@ -1,9 +1,9 @@
1
- import * as react128 from "react";
1
+ import * as react127 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: react128.ForwardRefExoticComponent<DescriptionProps & react128.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Description: react127.ForwardRefExoticComponent<DescriptionProps & react127.RefAttributes<HTMLHeadingElement>>;
8
8
  //#endregion
9
9
  export { Description };
@@ -1,4 +1,4 @@
1
- import * as react126 from "react";
1
+ import * as react129 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: react126.ForwardRefExoticComponent<MissingAccessesProps & react126.RefAttributes<HTMLDivElement>>;
12
+ declare const MissingAccesses: react129.ForwardRefExoticComponent<MissingAccessesProps & react129.RefAttributes<HTMLDivElement>>;
13
13
  //#endregion
14
14
  export { MissingAccesses };
@@ -1,9 +1,9 @@
1
- import * as react130 from "react";
1
+ import * as react123 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: react130.ForwardRefExoticComponent<TitleProps & react130.RefAttributes<HTMLHeadingElement>>;
7
+ declare const Title: react123.ForwardRefExoticComponent<TitleProps & react123.RefAttributes<HTMLHeadingElement>>;
8
8
  //#endregion
9
9
  export { Title };
@@ -1,7 +1,7 @@
1
1
  import { ToggleGroup } from "./ToggleGroup.types.js";
2
- import * as react138 from "react";
2
+ import * as react133 from "react";
3
3
 
4
4
  //#region src/organisms/ToggleGroup/ToggleGroup.d.ts
5
- declare const ToggleGroup$1: react138.ForwardRefExoticComponent<ToggleGroup & react138.RefAttributes<HTMLDivElement>>;
5
+ declare const ToggleGroup$1: react133.ForwardRefExoticComponent<ToggleGroup & react133.RefAttributes<HTMLDivElement>>;
6
6
  //#endregion
7
7
  export { ToggleGroup$1 as ToggleGroup };
@@ -1,9 +1,9 @@
1
1
  import { ToggleGroupOption } from "./ToggleGroup.types.js";
2
- import * as react136 from "react";
2
+ import * as react131 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: react136.ForwardRefExoticComponent<ToggleGroupOptionProps & react136.RefAttributes<HTMLButtonElement>>;
7
+ declare const ToggleGroupOption$1: react131.ForwardRefExoticComponent<ToggleGroupOptionProps & react131.RefAttributes<HTMLButtonElement>>;
8
8
  //#endregion
9
9
  export { ToggleGroupOption$1 as ToggleGroupOption };
@@ -1 +1 @@
1
- import{EnvironmentType as e}from"../../../atoms/enums/Environment.js";import{environment as t}from"../../../atoms/utils/auth_environment.js";import{useAuth as n}from"../../../providers/AuthProvider/AuthProvider.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 l,Container as u,TextContent as d}from"./Account.styles.js";import{impersonateUserDtoToFullName as f}from"./ImpersonateMenu/Impersonate.utils.js";import{ImpersonateMenu as p}from"./ImpersonateMenu/ImpersonateMenu.js";import{AccountAvatar as m}from"./AccountAvatar.js";import{AccountButton as h}from"./AccountButton.js";import{ActiveUserImpersonationButton as g}from"./ActiveUserImpersonationButton.js";import{ImpersonateButton as _}from"./ImpersonateButton.js";import{RoleChips as v}from"./RoleChips.js";import{RoleList as ee}from"./RoleList.js";import{useCallback as te,useEffect as y,useMemo as b,useRef as x,useState as S}from"react";import{Icon as C,Typography as w}from"@equinor/eds-core-react";import{Fragment as T,jsx as E,jsxs as D}from"react/jsx-runtime";import{log_out as O}from"@equinor/eds-icons";const k=({renderCustomButton:k,hideRoles:A=!1,useDisplayNameForRole:j=!1,children:M,availableFields:N,availableWells:ne})=>{let P=t.getEnvironmentName(import.meta.env.VITE_ENVIRONMENT_NAME),F=t.getApiClientId(import.meta.env.VITE_API_CLIENT_ID),I=t.getAppName(import.meta.env.VITE_NAME),{account:L,roles:R,logout:z}=n(),[B,V]=S(!1),[H,U]=S(!1),W=x(null),{data:G=!0}=o(),{data:K}=a(),{mutate:q}=c(),J=s(K?K.roles:R??[],j),Y=K?f(K):L?.name,X=K?K.uniqueName:L?.username,Z=()=>V(!1),Q=te(()=>{V(e=>!e),U(!1)},[]),$=()=>{U(!0),V(!1)},re=()=>U(!1);y(()=>{K&&K.appName!=null&&K.appName.toUpperCase()!=I.toUpperCase()&&q()},[K,I,q]);let ie=b(()=>k?k(W,Q):null,[k,Q]);return D(T,{children:[ie||E(h,{ref:W,onClick:Q}),D(i,{open:B,title:`Account`,onClose:Z,anchorEl:W.current,children:[D(u,{children:[K&&E(g,{onClick:$}),E(m,{}),D(d,{children:[E(w,{variant:`h6`,children:Y}),E(w,{children:X})]}),J&&!A&&E(T,{children:J.length<=3?E(v,{roles:J}):E(ee,{roles:J})}),M,G&&P!==e.PRODUCTION&&F&&E(_,{onOpenImpersonateMenu:$,onClose:Z})]}),E(l,{children:D(r,{variant:`ghost`,onClick:z,children:[E(C,{data:O}),`Log out`]})})]}),E(p,{open:H,onClose:re,anchorEl:W.current,availableFields:N,availableWells:ne})]})};k.displayName=`TopBar.Account`;export{k as Account};
1
+ import{EnvironmentType as e}from"../../../atoms/enums/Environment.js";import{environment as t}from"../../../atoms/utils/auth_environment.js";import{useAuth as n}from"../../../providers/AuthProvider/AuthProvider.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 l,Container as u,TextContent as d}from"./Account.styles.js";import{impersonateUserDtoToFullName as f}from"./ImpersonateMenu/Impersonate.utils.js";import{ImpersonateMenu as p}from"./ImpersonateMenu/ImpersonateMenu.js";import{AccountAvatar as m}from"./AccountAvatar.js";import{AccountButton as h}from"./AccountButton.js";import{ActiveUserImpersonationButton as g}from"./ActiveUserImpersonationButton.js";import{ImpersonateButton as _}from"./ImpersonateButton.js";import{RoleChips as v}from"./RoleChips.js";import{RoleList as ee}from"./RoleList.js";import{useCallback as te,useEffect as y,useMemo as b,useRef as x,useState as S}from"react";import{Icon as C,Typography as w}from"@equinor/eds-core-react";import{Fragment as T,jsx as E,jsxs as D}from"react/jsx-runtime";import{log_out as O}from"@equinor/eds-icons";const k=({renderCustomButton:k,hideRoles:A=!1,useDisplayNameForRole:j=!1,children:M,availableFields:N,availableWells:ne})=>{let P=t.getEnvironmentName(import.meta.env.VITE_ENVIRONMENT_NAME),F=t.getApiClientId(import.meta.env.VITE_API_CLIENT_ID),I=t.getAppName(import.meta.env.VITE_NAME),{account:L,roles:R,logout:z}=n(),[B,V]=S(!1),[H,U]=S(!1),W=x(null),{data:G=!0}=o(),{data:K}=a(),{mutate:q}=c(),J=s(K?K.roles:R??[],j),Y=K?f(K):L?.name,X=K?K.uniqueName:L?.username,Z=()=>V(!1),Q=te(()=>{V(e=>!e),U(!1)},[]),$=()=>{U(!0),V(!1)};return y(()=>{K&&K.appName!=null&&K.appName.toUpperCase()!=I.toUpperCase()&&q()},[K,I,q]),D(T,{children:[b(()=>k?k(W,Q):null,[k,Q])||E(h,{ref:W,onClick:Q}),D(i,{open:B,title:`Account`,onClose:Z,anchorEl:W.current,children:[D(u,{children:[K&&E(g,{onClick:$}),E(m,{}),D(d,{children:[E(w,{variant:`h6`,children:Y}),E(w,{children:X})]}),J&&!A&&E(T,{children:J.length<=3?E(v,{roles:J}):E(ee,{roles:J})}),M,G&&P!==e.PRODUCTION&&F&&E(_,{onOpenImpersonateMenu:$,onClose:Z})]}),E(l,{children:D(r,{variant:`ghost`,onClick:z,children:[E(C,{data:O}),`Log out`]})})]}),E(p,{open:H,onClose:()=>U(!1),anchorEl:W.current,availableFields:N,availableWells:ne})]})};k.displayName=`TopBar.Account`;export{k as Account};
@@ -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]);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
+ 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(()=>{x&&R&&!T.current&&(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&&F(C.find(e=>e.uuid==x.field)?.name??void 0),w&&L(w.find(e=>e==x.well)??void 0),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,7 +1,7 @@
1
- import * as react134 from "react";
1
+ import * as react119 from "react";
2
2
  import { HTMLAttributes } from "react";
3
3
 
4
4
  //#region src/organisms/TopBar/Actions.d.ts
5
- declare const Actions: react134.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react134.RefAttributes<HTMLDivElement>>;
5
+ declare const Actions: react119.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react119.RefAttributes<HTMLDivElement>>;
6
6
  //#endregion
7
7
  export { Actions };
@@ -1 +1 @@
1
- import{environment as e}from"../../../atoms/utils/auth_environment.js";import{colors as t}from"../../../atoms/style/colors.js";import{ApplicationIcon as n}from"../../../molecules/ApplicationIcon/ApplicationIcon.js";import{TopBarMenu as r}from"../TopBarMenu.js";import{TopBarButton as i}from"../TopBar.styles.js";import{ApplicationBox as a,ApplicationButton as o,ApplicationContent as s,ApplicationName as c,LoadingApplications as l,MenuFixedItem as u,MenuSection as d,NoApplications as f,TextContainer as p}from"./ApplicationDrawer.styles.js";import{TransferToAppDialog as m}from"../TransferToAppDialog.js";import{useRef as h,useState as g}from"react";import{DotProgress as _,Icon as v,Typography as y}from"@equinor/eds-core-react";import{Fragment as b,jsx as x,jsxs as S}from"react/jsx-runtime";import{apps as C,exit_to_app as w}from"@equinor/eds-icons";import{AmplifyApplicationService as T}from"@equinor/subsurface-app-management";import{useQuery as E}from"@tanstack/react-query";const{getAppName:D,PORTAL_URL_WITHOUT_LOCALHOST:O}=e,k=()=>{let[e,k]=g(!1),[A,j]=g(void 0),[M,N]=g(!1),{data:P=[],isLoading:F}=E({queryKey:[`userApplications`],queryFn:()=>T.userApplications()}),I=h(null),L=()=>k(!e),R=()=>{k(!1),j(void 0)},z=e=>{j(e)},B=()=>{N(!0)};return F?S(b,{children:[x(i,{variant:`ghost_icon`,onClick:L,ref:I,children:x(v,{data:C,size:24})}),x(r,{open:e,title:`Your available applications`,onClose:R,anchorEl:I.current,contentPadding:!1,children:x(b,{children:x(d,{children:x(s,{children:x(l,{children:x(_,{color:`primary`})})})})})})]}):S(b,{children:[x(i,{variant:`ghost`,onClick:L,ref:I,children:x(v,{data:C,size:24})}),x(r,{open:e,title:`Your available applications`,onClose:R,anchorEl:I.current,contentPadding:!1,children:S(b,{children:[S(d,{children:[P.length===0?x(f,{children:x(y,{group:`paragraph`,variant:`body_short`,style:{color:t.text.static_icons__tertiary.rgba},children:`You don't have access to other applications`})}):x(y,{group:`paragraph`,variant:`overline`,children:`SWITCH BETWEEN APPS`}),x(s,{children:x(b,{children:P.map((e,t)=>{let r=D(import.meta.env.VITE_NAME)===e.name;return x(a,{$isSelected:r,"data-testid":`application-box-${e.name}`,children:S(o,{variant:`ghost_icon`,onClick:()=>z(e),"data-testid":e.name,children:[x(n,{name:e.name.toLowerCase(),size:36}),x(c,{children:x(y,{group:`paragraph`,variant:`caption`,children:e.name})})]})},t)})})})]}),x(u,{"data-testid":`access-it-link`,onClick:B,children:S(`div`,{children:[S(p,{children:[x(y,{variant:`overline`,children:`Access to more applications?`}),x(y,{variant:`h6`,children:`Go to Application Portal`})]}),x(v,{data:w,color:t.interactive.primary__resting.rgba,size:24})]})})]})}),M&&x(m,{onClose:R,applicationName:`Portal`,url:O}),A&&x(m,{onClose:R,applicationName:A.name,url:A.url})]})};export{k as ApplicationDrawer};
1
+ import{environment as e}from"../../../atoms/utils/auth_environment.js";import{colors as t}from"../../../atoms/style/colors.js";import{ApplicationIcon as n}from"../../../molecules/ApplicationIcon/ApplicationIcon.js";import{TopBarMenu as r}from"../TopBarMenu.js";import{TopBarButton as i}from"../TopBar.styles.js";import{ApplicationBox as a,ApplicationButton as o,ApplicationContent as s,ApplicationName as c,LoadingApplications as l,MenuFixedItem as u,MenuSection as d,NoApplications as f,TextContainer as p}from"./ApplicationDrawer.styles.js";import{TransferToAppDialog as m}from"../TransferToAppDialog.js";import{useRef as h,useState as g}from"react";import{DotProgress as _,Icon as v,Typography as y}from"@equinor/eds-core-react";import{Fragment as b,jsx as x,jsxs as S}from"react/jsx-runtime";import{apps as C,exit_to_app as w}from"@equinor/eds-icons";import{AmplifyApplicationService as T}from"@equinor/subsurface-app-management";import{useQuery as E}from"@tanstack/react-query";const{getAppName:D,PORTAL_URL_WITHOUT_LOCALHOST:O}=e,k=()=>{let[e,k]=g(!1),[A,j]=g(void 0),[M,N]=g(!1),{data:P=[],isLoading:F}=E({queryKey:[`userApplications`],queryFn:()=>T.userApplications()}),I=h(null),L=()=>k(!e),R=()=>{k(!1),j(void 0)},z=e=>{j(e)},B=()=>{N(!0)};return F?S(b,{children:[x(i,{variant:`ghost_icon`,onClick:L,ref:I,children:x(v,{data:C,size:24})}),x(r,{open:e,title:`Your available applications`,onClose:R,anchorEl:I.current,contentPadding:!1,children:x(b,{children:x(d,{children:x(s,{children:x(l,{children:x(_,{color:`primary`})})})})})})]}):S(b,{children:[x(i,{variant:`ghost`,onClick:L,ref:I,children:x(v,{data:C,size:24})}),x(r,{open:e,title:`Your available applications`,onClose:R,anchorEl:I.current,contentPadding:!1,children:S(b,{children:[S(d,{children:[P.length===0?x(f,{children:x(y,{group:`paragraph`,variant:`body_short`,style:{color:t.text.static_icons__tertiary.rgba},children:`You don't have access to other applications`})}):x(y,{group:`paragraph`,variant:`overline`,children:`SWITCH BETWEEN APPS`}),x(s,{children:x(b,{children:P.map((e,t)=>x(a,{$isSelected:D(import.meta.env.VITE_NAME)===e.name,"data-testid":`application-box-${e.name}`,children:S(o,{variant:`ghost_icon`,onClick:()=>z(e),"data-testid":e.name,children:[x(n,{name:e.name.toLowerCase(),size:36}),x(c,{children:x(y,{group:`paragraph`,variant:`caption`,children:e.name})})]})},t))})})]}),x(u,{"data-testid":`access-it-link`,onClick:B,children:S(`div`,{children:[S(p,{children:[x(y,{variant:`overline`,children:`Access to more applications?`}),x(y,{variant:`h6`,children:`Go to Application Portal`})]}),x(v,{data:w,color:t.interactive.primary__resting.rgba,size:24})]})})]})}),M&&x(m,{onClose:R,applicationName:`Portal`,url:O}),A&&x(m,{onClose:R,applicationName:A.name,url:A.url})]})};export{k as ApplicationDrawer};
@@ -1,5 +1,5 @@
1
1
  import { Field } from "../../../atoms/types/Field.js";
2
- import * as react132 from "react";
2
+ import * as react117 from "react";
3
3
 
4
4
  //#region src/organisms/TopBar/FieldMenu/FieldMenu.d.ts
5
5
  interface FieldMenuProps {
@@ -9,6 +9,6 @@ interface FieldMenuProps {
9
9
  itemNameSingular?: string;
10
10
  showAccessITLink?: boolean;
11
11
  }
12
- declare const FieldMenu: react132.ForwardRefExoticComponent<FieldMenuProps & react132.RefAttributes<HTMLDivElement>>;
12
+ declare const FieldMenu: react117.ForwardRefExoticComponent<FieldMenuProps & react117.RefAttributes<HTMLDivElement>>;
13
13
  //#endregion
14
14
  export { FieldMenu };
@@ -1,4 +1,4 @@
1
- import * as react121 from "react";
1
+ import * as react139 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: react121.Context<NotificationContext | undefined>;
9
+ declare const NotificationContext: react139.Context<NotificationContext | undefined>;
10
10
  declare const useNotification: () => NotificationContext;
11
11
  //#endregion
12
12
  export { useNotification };
@@ -2,6 +2,6 @@ import{OptionalTooltip as e}from"../../../../../molecules/OptionalTooltip/Option
2
2
  white-space: break-spaces;
3
3
  text-align: center;
4
4
  width: 400px;
5
- `,o=t(({show:e,children:t},r)=>{let o=n(()=>e?`The report was successfully submitted to ServiceNow.
5
+ `,o=t(({show:e,children:t},r)=>i(a,{title:n(()=>e?`The report was successfully submitted to ServiceNow.
6
6
  This field is locked so you can retry sending it to the development team.
7
- To reset the form, use the button in the bottom left corner.`:``,[e]);return i(a,{title:o,children:i(`div`,{ref:r,children:t})})});o.displayName=`LockedInputTooltip`;export{o as LockedInputTooltip};
7
+ To reset the form, use the button in the bottom left corner.`:``,[e]),children:i(`div`,{ref:r,children:t})}));o.displayName=`LockedInputTooltip`;export{o as LockedInputTooltip};
@@ -1,3 +1,3 @@
1
1
  import{SingleSelect as e}from"../../../../../molecules/Select/SingleSelect/SingleSelect.js";import{UrgencyOption as t}from"../Feedback.types.js";import{useFeedbackContext as n}from"../hooks/useFeedbackContext.js";import{LockedInputTooltip as r}from"./LockedInputTooltip.js";import i from"styled-components";import{jsx as a}from"react/jsx-runtime";const o=i.div`
2
2
  grid-column: 1/2;
3
- `,s=Object.values(t).map(e=>({value:e,label:e})),c=()=>{let{serviceNowSuccess:t,feedbackContent:i,updateFeedback:c}=n(),l=i.urgency?{value:i.urgency,label:i.urgency}:void 0;return a(o,{children:a(r,{show:t,children:a(e,{items:s,label:`Severity`,meta:`optional`,clearable:!1,disabled:t,value:l,placeholder:`Select error impact`,onSelect:e=>{c(`urgency`,e.value)}})})})};export{c as Severity};
3
+ `,s=Object.values(t).map(e=>({value:e,label:e})),c=()=>{let{serviceNowSuccess:t,feedbackContent:i,updateFeedback:c}=n();return a(o,{children:a(r,{show:t,children:a(e,{items:s,label:`Severity`,meta:`optional`,clearable:!1,disabled:t,value:i.urgency?{value:i.urgency,label:i.urgency}:void 0,placeholder:`Select error impact`,onSelect:e=>{c(`urgency`,e.value)}})})})};export{c as Severity};
@@ -4,4 +4,4 @@ import{tokens as e}from"../../../../../../node_modules/@equinor/eds-tokens/dist/
4
4
  width: 82px;
5
5
  height: 82px;
6
6
  position: relative;
7
- `,_=e=>{let[u,_]=c(``),{error:v,onDelete:y}=e,b=s(()=>{if(!v)return;let t=e.errors[0].code,n=e.errors[0].message;return t===`file-too-large`?n=n.replace(/(\d+ bytes)/,`1MB`):t===`file-invalid-type`&&(n=n.replace(/(\w+\/\w+,)/g,``).replaceAll(`,`,`, `)),`${e.errors[0].code} \n${n}`},[v,e]),x=s(()=>e.file.name,[v,e]),S=s(()=>v?e.errors.find(e=>e.code.includes(`invalid`))?`Invalid file type`:e.errors.find(e=>e.code.includes(`large`))?`Invalid file size`:`Error`:``,[v,e]);return o(()=>{v||(async e=>{let n=await t(e);_(n)})(e.file)},[v,e]),f(g,{children:[d(r,{title:`${x}${v?`: `+b:``}`,children:v?f(a,{children:[d(l,{data:m,color:h.interactive.warning__text.rgba}),d(`div`,{children:S})]}):d(i,{children:d(`img`,{src:u,alt:`Uploaded file: ${x}`})})}),d(n,{"data-testid":`attachment-delete-button`,onClick:y,children:d(l,{color:h.text.static_icons__tertiary.rgba,data:p,size:24})})]})};export{_ as ImageFile};
7
+ `,_=e=>{let[u,_]=c(``),{error:v,onDelete:y}=e,b=s(()=>{if(!v)return;let t=e.errors[0].code,n=e.errors[0].message;return t===`file-too-large`?n=n.replace(/(\d+ bytes)/,`1MB`):t===`file-invalid-type`&&(n=n.replace(/(\w+\/\w+,)/g,``).replaceAll(`,`,`, `)),`${e.errors[0].code} \n${n}`},[v,e]),x=s(()=>e.file.name,[v,e]),S=s(()=>v?e.errors.find(e=>e.code.includes(`invalid`))?`Invalid file type`:e.errors.find(e=>e.code.includes(`large`))?`Invalid file size`:`Error`:``,[v,e]);return o(()=>{v||(async e=>{_(await t(e))})(e.file)},[v,e]),f(g,{children:[d(r,{title:`${x}${v?`: `+b:``}`,children:v?f(a,{children:[d(l,{data:m,color:h.interactive.warning__text.rgba}),d(`div`,{children:S})]}):d(i,{children:d(`img`,{src:u,alt:`Uploaded file: ${x}`})})}),d(n,{"data-testid":`attachment-delete-button`,onClick:y,children:d(l,{color:h.text.static_icons__tertiary.rgba,data:p,size:24})})]})};export{_ as ImageFile};
@@ -2,4 +2,4 @@ import{FileUploadArea as e}from"../../../../../../molecules/FileUploadArea/FileU
2
2
  grid-column: 1/3;
3
3
  display: flex;
4
4
  flex-direction: column;
5
- `;function d(e,t){if(e.length===0||e.length===1)return e;for(let n=0;n<e.length;n++)for(let r=n+1;r<e.length;r++)t(e[n],e[r])&&e.splice(n,1);return e}const f=()=>{let{feedbackAttachments:s,setFeedbackAttachments:f}=n(),[p,m]=o([]),h=(e,t)=>{if(e.length>=1){let t=e.filter(e=>!e.name.startsWith(`.`));new FileReader().readAsDataURL(e[0]);let n=[];s&&n.push(...s);let r=[...t,...n],i=d(r,(e,t)=>e.name===t.name&&e.size===t.size);f(i)}m(t)},g=e=>{let t=s?.filter(t=>t.name!==e.name&&t.size!==e.size)??[];f(t)},_=e=>{m(p?.filter(t=>t.file.name===e.file.name&&t.file.size!==e.file.size)??[])};return l(u,{children:[c(i,{group:`input`,variant:`label`,children:`Attachments (.jpg, .jpeg, .png) (max 1 MB)`}),l(r,{children:[c(e,{maxSize:t,onDrop:h,accept:{"image/jpeg":[`.jpeg`,`.jpg`],"image/png":[`.png`]},size:`small`}),s?.map(e=>c(a,{onDelete:()=>g(e),file:e},e.name+e.size)),p.map(e=>c(a,{...e,onDelete:()=>_(e),error:!0},e.file.name+e.file.size))]})]})};export{f as UploadFile};
5
+ `;function d(e,t){if(e.length===0||e.length===1)return e;for(let n=0;n<e.length;n++)for(let r=n+1;r<e.length;r++)t(e[n],e[r])&&e.splice(n,1);return e}const f=()=>{let{feedbackAttachments:s,setFeedbackAttachments:f}=n(),[p,m]=o([]),h=(e,t)=>{if(e.length>=1){let t=e.filter(e=>!e.name.startsWith(`.`));new FileReader().readAsDataURL(e[0]);let n=[];s&&n.push(...s),f(d([...t,...n],(e,t)=>e.name===t.name&&e.size===t.size))}m(t)},g=e=>{f(s?.filter(t=>t.name!==e.name&&t.size!==e.size)??[])},_=e=>{m(p?.filter(t=>t.file.name===e.file.name&&t.file.size!==e.file.size)??[])};return l(u,{children:[c(i,{group:`input`,variant:`label`,children:`Attachments (.jpg, .jpeg, .png) (max 1 MB)`}),l(r,{children:[c(e,{maxSize:t,onDrop:h,accept:{"image/jpeg":[`.jpeg`,`.jpg`],"image/png":[`.png`]},size:`small`}),s?.map(e=>c(a,{onDelete:()=>g(e),file:e},e.name+e.size)),p.map(e=>c(a,{...e,onDelete:()=>_(e),error:!0},e.file.name+e.file.size))]})]})};export{f as UploadFile};
@@ -18,4 +18,4 @@ import{animation as e}from"../../../atoms/style/animation.js";import{colors as t
18
18
  &:hover {
19
19
  background: ${t.interactive.primary__hover_alt.rgba};
20
20
  }
21
- `,f=({onTutorialStart:e,onClose:n,id:a,name:f})=>{let{startTutorial:p,seenTutorialIDs:m}=u(),h=m.includes(a);return s(d,{onClick:()=>{p(a),e?.(a),n()},children:[h&&s(`header`,{children:[o(r,{data:c,size:16,color:t.interactive.primary__resting.rgba}),o(i,{varinat:`caption`,children:`COMPLETED`})]}),o(i,{variant:`h4`,children:f}),o(r,{data:l,color:t.interactive.primary__resting.rgba})]})};export{f as TutorialItem};
21
+ `,f=({onTutorialStart:e,onClose:n,id:a,name:f})=>{let{startTutorial:p,seenTutorialIDs:m}=u();return s(d,{onClick:()=>{p(a),e?.(a),n()},children:[m.includes(a)&&s(`header`,{children:[o(r,{data:c,size:16,color:t.interactive.primary__resting.rgba}),o(i,{varinat:`caption`,children:`COMPLETED`})]}),o(i,{variant:`h4`,children:f}),o(r,{data:l,color:t.interactive.primary__resting.rgba})]})};export{f as TutorialItem};
@@ -1 +1 @@
1
- import{auth as e,environment as t}from"../../atoms/utils/auth_environment.js";import{FullPageSpinner as n}from"../../molecules/FullPageSpinner/FullPageSpinner.js";import{MissingAccessToApp as r}from"../../organisms/Status/collections/MissingAccessToApp.js";import{useEffect as i,useRef as a,useState as o}from"react";import{useMsal as s,useMsalAuthentication as c}from"@azure/msal-react";import{InteractionRequiredAuthError as l,InteractionType as u}from"@azure/msal-browser";import{jsx as d}from"react/jsx-runtime";import{jwtDecode as f}from"jwt-decode";const{GRAPH_ENDPOINTS:p,GRAPH_REQUESTS_LOGIN:m,GRAPH_REQUESTS_PHOTO:h,GRAPH_REQUESTS_BACKEND:g,fetchMsGraph:_,isInIframe:v}=e,{getApiScope:y}=t,b=({children:e,account:t,setAccount:b,setPhoto:x,setRoles:S,authState:C,setAuthState:w,withoutLoader:T,loadingComponent:E,unauthorizedComponent:D,withoutBackend:O})=>{let{instance:k,accounts:A,inProgress:j}=s(),{login:M,result:N,error:P,acquireToken:F}=c(u.Silent,m),[I,L]=o(!1),R=a(!1);return i(()=>{I||(async()=>{console.log(`[AuthProvider] Initializing`),await k.initialize(),console.log(`[AuthProvider] Finished initializing`),L(!0)})().catch(e=>{console.error(`[AuthProvider] Error during initialization`,e)})},[k,I]),i(()=>{I&&(P instanceof l&&!v()&&C!==`unauthorized`?(console.error(P),console.log(`[AuthProvider] No account found, need to login via. redirect`),M(u.Redirect,m).catch(e=>{console.error(`[AuthProvider] Error during login`,e)})):N?.account&&!t?(console.log(`[AuthProvider] Found account in useMsalAuth result, setting that one as active`),k.setActiveAccount(N.account),b(N.account)):A.length>0&&!t?(console.log(`[AuthProvider] Found account in accounts array, setting that one as active`),k.setActiveAccount(A[0]),b(A[0])):P&&console.error(`[AuthProvider] Unexpected error:`,P))},[t,A,P,k,I,M,N,b,C]),i(()=>{if(!t||!I||R.current||j!==`none`)return;R.current=!0;let e=async()=>{try{let e=await F(u.Silent,h);if(e){let t=await _(p.PHOTO,e.accessToken);if(t.status===404)return null;let n=await t.blob(),r=(window.URL??window.webkitURL).createObjectURL(n);x(r)}}catch(e){console.error(e)}},n=async()=>{try{let e=await F(u.Silent,g(y(import.meta.env.VITE_API_SCOPE)));if(console.log(`[AuthProvider] Successfully acquired token`),e&&e.accessToken){console.log(`[AuthProvider] Decoding token`);let t=f(e.accessToken);if(console.log(`[AuthProvider] Token was valid`),t.roles)console.log(`[AuthProvider] Found roles`),S(t.roles);else throw Error(`Could not find roles in token`);w(`authorized`)}}catch(e){console.error(`[AuthProvider] Token error when trying to get roles!`,e),w(`unauthorized`)}};(async()=>{await e(),O?w(`authorized`):await n()})()},[t,F,P,I,j,w,x,S,O]),C===`unauthorized`?D??d(r,{}):T?e:C===`loading`||t===void 0?E??d(n,{variant:`application`}):e};export{b as AuthProviderInner};
1
+ import{auth as e,environment as t}from"../../atoms/utils/auth_environment.js";import{FullPageSpinner as n}from"../../molecules/FullPageSpinner/FullPageSpinner.js";import{MissingAccessToApp as r}from"../../organisms/Status/collections/MissingAccessToApp.js";import{useEffect as i,useRef as a,useState as o}from"react";import{useMsal as s,useMsalAuthentication as c}from"@azure/msal-react";import{InteractionRequiredAuthError as l,InteractionType as u}from"@azure/msal-browser";import{jsx as d}from"react/jsx-runtime";import{jwtDecode as f}from"jwt-decode";const{GRAPH_ENDPOINTS:p,GRAPH_REQUESTS_LOGIN:m,GRAPH_REQUESTS_PHOTO:h,GRAPH_REQUESTS_BACKEND:g,fetchMsGraph:_,isInIframe:v}=e,{getApiScope:y}=t,b=({children:e,account:t,setAccount:b,setPhoto:x,setRoles:S,authState:C,setAuthState:w,withoutLoader:T,loadingComponent:E,unauthorizedComponent:D,withoutBackend:O})=>{let{instance:k,accounts:A,inProgress:j}=s(),{login:M,result:N,error:P,acquireToken:F}=c(u.Silent,m),[I,L]=o(!1),R=a(!1);return i(()=>{I||(async()=>{console.log(`[AuthProvider] Initializing`),await k.initialize(),console.log(`[AuthProvider] Finished initializing`),L(!0)})().catch(e=>{console.error(`[AuthProvider] Error during initialization`,e)})},[k,I]),i(()=>{I&&(P instanceof l&&!v()&&C!==`unauthorized`?(console.error(P),console.log(`[AuthProvider] No account found, need to login via. redirect`),M(u.Redirect,m).catch(e=>{console.error(`[AuthProvider] Error during login`,e)})):N?.account&&!t?(console.log(`[AuthProvider] Found account in useMsalAuth result, setting that one as active`),k.setActiveAccount(N.account),b(N.account)):A.length>0&&!t?(console.log(`[AuthProvider] Found account in accounts array, setting that one as active`),k.setActiveAccount(A[0]),b(A[0])):P&&console.error(`[AuthProvider] Unexpected error:`,P))},[t,A,P,k,I,M,N,b,C]),i(()=>{if(!t||!I||R.current||j!==`none`)return;R.current=!0;let e=async()=>{try{let e=await F(u.Silent,h);if(e){let t=await _(p.PHOTO,e.accessToken);if(t.status===404)return null;let n=await t.blob();x((window.URL??window.webkitURL).createObjectURL(n))}}catch(e){console.error(e)}},n=async()=>{try{let e=await F(u.Silent,g(y(import.meta.env.VITE_API_SCOPE)));if(console.log(`[AuthProvider] Successfully acquired token`),e&&e.accessToken){console.log(`[AuthProvider] Decoding token`);let t=f(e.accessToken);if(console.log(`[AuthProvider] Token was valid`),t.roles)console.log(`[AuthProvider] Found roles`),S(t.roles);else throw Error(`Could not find roles in token`);w(`authorized`)}}catch(e){console.error(`[AuthProvider] Token error when trying to get roles!`,e),w(`unauthorized`)}};(async()=>{await e(),O?w(`authorized`):await n()})()},[t,F,P,I,j,w,x,S,O]),C===`unauthorized`?D??d(r,{}):T?e:C===`loading`||t===void 0?E??d(n,{variant:`application`}):e};export{b as AuthProviderInner};
@@ -21,4 +21,4 @@ import{spacings as e}from"../../atoms/style/spacings.js";import{getHighlightElem
21
21
  height: 100vh;
22
22
  background: none;
23
23
  pointer-events: none;
24
- `,g=({children:e,contentRef:s})=>{let{activeTutorial:g,activeStep:_,unseenTutorialsOnThisPage:v}=f(),y=p()>0,b=n(s),[x,S]=o({width:window.innerWidth,height:window.innerHeight});a(()=>{let e=()=>{S({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let[C,w]=o([]);a(()=>{y||(async()=>{if(g&&_!==void 0){if(!g.steps[_].highlightElement)return w([]);let e=await t(g.id,_,x);return w(e?[e]:[])}let e=await Promise.all(v.map(e=>{if(e.steps.at(0)?.highlightElement)return t(e.id,0,x)}));return w(e.filter(e=>e!==void 0))})()},[_,g,y,v,x]);let T=g?[g]:v.filter(e=>e.steps[0].highlightElement&&C.some(e=>e.id)||!e.steps[0].highlightElement);return T.length>0?u(c,{children:[e,l(h,{children:T.map(e=>{let t=C.find(t=>t.id===e.id);return l(i,{isHighlighting:C.length>0,contentRef:s,...e,...t},e.id)})}),u(m,{children:[u(`mask`,{id:`tutorials-rectangles`,children:[l(`rect`,{width:`100%`,height:`100%`,fill:`white`}),l(d.g,{style:{translateY:b},children:C.map(e=>l(d.path,{"data-testid":`tutorial-mask-${e.id}`,initial:{opacity:0,d:`M ${e.left} ${e.top} h ${e.width} v ${e.height} h -${e.width} Z`},animate:{opacity:1,d:`M ${e.left} ${e.top} h ${e.width} v ${e.height} h -${e.width} Z`},fill:`black`},e.id))})]}),l(d.rect,{width:`100%`,height:`100%`,fill:`rgba(111, 111, 111, 0.35)`,mask:`url(#tutorials-rectangles)`,...r})]})]}):l(c,{children:e})};export{g as TutorialHighlightingProviderInner};
24
+ `,g=({children:e,contentRef:s})=>{let{activeTutorial:g,activeStep:_,unseenTutorialsOnThisPage:v}=f(),y=p()>0,b=n(s),[x,S]=o({width:window.innerWidth,height:window.innerHeight});a(()=>{let e=()=>{S({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let[C,w]=o([]);a(()=>{y||(async()=>{if(g&&_!==void 0){if(!g.steps[_].highlightElement)return w([]);let e=await t(g.id,_,x);return w(e?[e]:[])}return w((await Promise.all(v.map(e=>{if(e.steps.at(0)?.highlightElement)return t(e.id,0,x)}))).filter(e=>e!==void 0))})()},[_,g,y,v,x]);let T=g?[g]:v.filter(e=>e.steps[0].highlightElement&&C.some(e=>e.id)||!e.steps[0].highlightElement);return T.length>0?u(c,{children:[e,l(h,{children:T.map(e=>{let t=C.find(t=>t.id===e.id);return l(i,{isHighlighting:C.length>0,contentRef:s,...e,...t},e.id)})}),u(m,{children:[u(`mask`,{id:`tutorials-rectangles`,children:[l(`rect`,{width:`100%`,height:`100%`,fill:`white`}),l(d.g,{style:{translateY:b},children:C.map(e=>l(d.path,{"data-testid":`tutorial-mask-${e.id}`,initial:{opacity:0,d:`M ${e.left} ${e.top} h ${e.width} v ${e.height} h -${e.width} Z`},animate:{opacity:1,d:`M ${e.left} ${e.top} h ${e.width} v ${e.height} h -${e.width} Z`},fill:`black`},e.id))})]}),l(d.rect,{width:`100%`,height:`100%`,fill:`rgba(111, 111, 111, 0.35)`,mask:`url(#tutorials-rectangles)`,...r})]})]}):l(c,{children:e})};export{g as TutorialHighlightingProviderInner};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/amplify-component-lib",
3
- "version": "10.0.0",
3
+ "version": "10.0.1",
4
4
  "description": "Frontend Typescript components for the Amplify team",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -58,9 +58,9 @@
58
58
  "@faker-js/faker": "^9.6.0",
59
59
  "@storybook/addon-coverage": "^2.0.0",
60
60
  "@storybook/addon-designs": "^10.0.2",
61
- "@storybook/addon-docs": "^9.1.1",
62
- "@storybook/addon-links": "^9.1.1",
63
- "@storybook/react-vite": "^9.1.1",
61
+ "@storybook/addon-docs": "^9.1.10",
62
+ "@storybook/addon-links": "^9.1.10",
63
+ "@storybook/react-vite": "^9.1.10",
64
64
  "@tanstack/react-query": "^5.67.2",
65
65
  "@testing-library/dom": "^10.4.0",
66
66
  "@testing-library/jest-dom": "^6.6.3",
@@ -96,7 +96,7 @@
96
96
  "react-dom": "^19.0.0",
97
97
  "resize-observer-polyfill": "^1.5.1",
98
98
  "resolve-tspaths": "^0.8.23",
99
- "storybook": "^9.1.1",
99
+ "storybook": "^9.1.10",
100
100
  "tsdown": "^0.14.2",
101
101
  "typescript": "^5.8.2",
102
102
  "typescript-eslint": "^8.26.1",