@equinor/amplify-component-lib 9.15.2-beta.0 → 9.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2807,7 +2807,7 @@ import {
2807
2807
  useRef as useRef2,
2808
2808
  useState as useState5
2809
2809
  } from "react";
2810
- import { useLocation, useNavigate } from "@tanstack/react-router";
2810
+ import { useLocation, useNavigate } from "react-router";
2811
2811
 
2812
2812
  // src/atoms/hooks/useOnScreenMultiple.ts
2813
2813
  import { useEffect as useEffect2, useState as useState4 } from "react";
@@ -2872,6 +2872,7 @@ var TableOfContentsProvider = ({
2872
2872
  const { hash } = useLocation();
2873
2873
  const [selected, setSelected] = useState5(items[0]?.value);
2874
2874
  const [elements, setElements] = useState5([]);
2875
+ const [shouldInstantlyJump, setShouldInstantlyJump] = useState5(hash !== "");
2875
2876
  const initHashStateRef = useRef2(false);
2876
2877
  const values = useMemo3(() => items.flatMap((item) => getValues([], item)), [items]);
2877
2878
  useEffect3(() => {
@@ -2895,19 +2896,9 @@ var TableOfContentsProvider = ({
2895
2896
  const isScrollingTo = useRef2(-1);
2896
2897
  const handleSetSelected = useCallback2((value, options) => {
2897
2898
  const selectedIndex = values.findIndex((itemValue) => itemValue === value);
2898
- if (hashNavigation) {
2899
- setSelected(values[selectedIndex]);
2900
- navigate({
2901
- to: ".",
2902
- hash: `#${values[selectedIndex]}`,
2903
- hashScrollIntoView: false,
2904
- replace: true
2905
- });
2906
- return;
2907
- }
2908
2899
  const element = elements[selectedIndex];
2909
2900
  if (element) {
2910
- const behavior = options?.behavior ?? "smooth";
2901
+ const behavior = options?.shouldInstantlyJumpOnMount && shouldInstantlyJump ? "instant" : options?.behavior ?? "smooth";
2911
2902
  element.scrollIntoView({
2912
2903
  block: "start",
2913
2904
  behavior
@@ -2921,6 +2912,10 @@ var TableOfContentsProvider = ({
2921
2912
  same += 1;
2922
2913
  if (same > 1) {
2923
2914
  setSelected(values[selectedIndex]);
2915
+ if (hashNavigation) {
2916
+ navigate(`#${values[selectedIndex]}`, { replace: true });
2917
+ setShouldInstantlyJump(false);
2918
+ }
2924
2919
  isScrollingTo.current = -1;
2925
2920
  return;
2926
2921
  }
@@ -2932,28 +2927,9 @@ var TableOfContentsProvider = ({
2932
2927
  };
2933
2928
  requestAnimationFrame(checkScrollDone);
2934
2929
  }
2935
- }, [elements, hashNavigation, navigate, values]);
2930
+ }, [elements, hashNavigation, navigate, shouldInstantlyJump, values]);
2936
2931
  useEffect3(() => {
2937
- if (hash && !initHashStateRef.current) {
2938
- initHashStateRef.current = true;
2939
- const targetValue = decodeURIComponent(hash.replace("#", ""));
2940
- if (!targetValue.length || !values.includes(targetValue)) {
2941
- return;
2942
- }
2943
- setSelected(targetValue);
2944
- navigate({
2945
- to: ".",
2946
- hash: `#${targetValue}`,
2947
- hashScrollIntoView: {
2948
- block: "start",
2949
- behavior: "instant"
2950
- },
2951
- replace: true
2952
- });
2953
- }
2954
- }, [hash, navigate, values]);
2955
- useEffect3(() => {
2956
- if (visible.length === 0 || visible.length !== values.length || isScrollingTo.current !== -1 || !initHashStateRef.current)
2932
+ if (visible.length === 0 || visible.length !== values.length || isScrollingTo.current !== -1)
2957
2933
  return;
2958
2934
  let newSelectedIndex = -1;
2959
2935
  for (let index = visible.length - 1;index >= 0; index--) {
@@ -2963,16 +2939,20 @@ var TableOfContentsProvider = ({
2963
2939
  }
2964
2940
  if (newSelectedIndex === -1 || values.at(newSelectedIndex) === undefined)
2965
2941
  return;
2942
+ const targetValue = hash.replace("#", "");
2943
+ if (!initHashStateRef.current && targetValue.length && values.includes(targetValue)) {
2944
+ handleSetSelected(targetValue, {
2945
+ behavior: "instant",
2946
+ shouldInstantlyJumpOnMount: true
2947
+ });
2948
+ initHashStateRef.current = true;
2949
+ return;
2950
+ }
2966
2951
  setSelected(values[newSelectedIndex]);
2967
2952
  if (hashNavigation) {
2968
- navigate({
2969
- to: ".",
2970
- hash: `#${values[newSelectedIndex]}`,
2971
- hashScrollIntoView: false,
2972
- replace: true
2973
- });
2953
+ navigate(`#${values[newSelectedIndex]}`, { replace: true });
2974
2954
  }
2975
- }, [handleSetSelected, hashNavigation, navigate, values, visible]);
2955
+ }, [hashNavigation, navigate, values, visible]);
2976
2956
  return /* @__PURE__ */ jsxDEV13(TableOfContentsContext.Provider, {
2977
2957
  value: {
2978
2958
  items,
@@ -3646,7 +3626,7 @@ import {
3646
3626
  useContext as useContext6,
3647
3627
  useState as useState11
3648
3628
  } from "react";
3649
- import { useLocation as useLocation2, useNavigate as useNavigate2, useParams } from "@tanstack/react-router";
3629
+ import { useLocation as useLocation2, useNavigate as useNavigate2, useParams } from "react-router";
3650
3630
  import { jsxDEV as jsxDEV17 } from "react/jsx-dev-runtime";
3651
3631
  var StepperContext = createContext6(undefined);
3652
3632
  function useStepper() {
@@ -3657,7 +3637,7 @@ function useStepper() {
3657
3637
  return context;
3658
3638
  }
3659
3639
  var StepperProvider = ({ steps, children, isStepDisabled, ...rest }) => {
3660
- const { step } = useParams({ strict: false });
3640
+ const { step } = useParams();
3661
3641
  const navigate = useNavigate2();
3662
3642
  const pathWithoutStep = useLocation2().pathname.split("/").slice(0, -1).join("/");
3663
3643
  const usingInitialStep = rest.syncToURLParam ? Number(step) : rest?.initialStep ?? 0;
@@ -3675,7 +3655,7 @@ var StepperProvider = ({ steps, children, isStepDisabled, ...rest }) => {
3675
3655
  }
3676
3656
  const handleOnSetStep = (value) => {
3677
3657
  if (rest.syncToURLParam) {
3678
- navigate({ to: `${pathWithoutStep}/${value}` });
3658
+ navigate(`${pathWithoutStep}/${value}`);
3679
3659
  } else {
3680
3660
  setCurrentStep(value);
3681
3661
  }
@@ -3766,16 +3746,49 @@ var ThemeProvider = ({ children }) => {
3766
3746
  children
3767
3747
  }, undefined, false, undefined, this);
3768
3748
  };
3749
+ // src/atoms/hooks/useSearchParameter.ts
3750
+ import { useRef as useRef7 } from "react";
3751
+ import { useSearchParams } from "react-router-dom";
3752
+ function useSearchParameter({
3753
+ key,
3754
+ initialValue,
3755
+ parser
3756
+ }) {
3757
+ const [searchParams, setSearchParams] = useSearchParams();
3758
+ const usedInitialValue = useRef7(false);
3759
+ const stringValue = searchParams.get(key) ?? undefined;
3760
+ const parsedValue = parser && stringValue ? parser(stringValue) : stringValue;
3761
+ const value = !usedInitialValue.current && parsedValue === undefined ? initialValue : parsedValue;
3762
+ const handleSetValue = (action) => {
3763
+ if (!usedInitialValue.current) {
3764
+ usedInitialValue.current = true;
3765
+ }
3766
+ if (action instanceof Function) {
3767
+ const newValue = action(value);
3768
+ handleSetValue(newValue);
3769
+ } else {
3770
+ const newSearchParams = new URLSearchParams(searchParams);
3771
+ const stringify = typeof action === "string" ? action : JSON.stringify(action);
3772
+ if (stringify === undefined || stringify === "" || stringify === "null" || stringify === "[]" || stringify === "{}") {
3773
+ newSearchParams.delete(key);
3774
+ } else {
3775
+ newSearchParams.set(key, stringify);
3776
+ }
3777
+ setSearchParams(newSearchParams);
3778
+ }
3779
+ };
3780
+ return [value, handleSetValue];
3781
+ }
3769
3782
  // src/atoms/hooks/usePrefetchRichTextImages.ts
3770
- import { useEffect as useEffect10, useRef as useRef7 } from "react";
3783
+ import { useEffect as useEffect10, useRef as useRef8 } from "react";
3771
3784
  import { useIsFetching, useQueryClient } from "@tanstack/react-query";
3772
3785
  function usePrefetchRichTextImages({
3773
3786
  richTextValues,
3774
3787
  onImageRead
3775
3788
  }) {
3776
3789
  const queryClient = useQueryClient();
3777
- const startedPrefetch = useRef7([]);
3778
- const prefetched = useRef7([]);
3790
+ const startedPrefetch = useRef8([]);
3791
+ const prefetched = useRef8([]);
3779
3792
  const paths = richTextValues.flatMap((value) => getImagesFromRichText(value));
3780
3793
  const isPrefetching = useIsFetching({
3781
3794
  predicate: (query) => startedPrefetch.current.some((path) => query.queryKey[0] === path && !prefetched.current.includes(path))
@@ -6285,7 +6298,7 @@ var ContentMenu = ({
6285
6298
  }, undefined, false, undefined, this);
6286
6299
  };
6287
6300
  // src/molecules/DatePicker/DatePicker.tsx
6288
- import { forwardRef as forwardRef28, useRef as useRef8 } from "react";
6301
+ import { forwardRef as forwardRef28, useRef as useRef9 } from "react";
6289
6302
  import {
6290
6303
  DatePicker as EDSDatePicker,
6291
6304
  Icon as Icon9,
@@ -6420,7 +6433,7 @@ var DatePicker = forwardRef28((props, ref) => {
6420
6433
  helperText: props.helperProps?.text,
6421
6434
  helperIcon: props.helperProps?.icon
6422
6435
  });
6423
- const skeletonWidth = useRef8(`${Math.max(40, Math.random() * 80)}%`);
6436
+ const skeletonWidth = useRef9(`${Math.max(40, Math.random() * 80)}%`);
6424
6437
  const usingDisabled = props.loading || props.disabled;
6425
6438
  return /* @__PURE__ */ jsxDEV52(DatePickerWrapper, {
6426
6439
  $variant: props.variant,
@@ -6457,7 +6470,7 @@ var DatePicker = forwardRef28((props, ref) => {
6457
6470
  });
6458
6471
  DatePicker.displayName = "DatePicker";
6459
6472
  // src/molecules/DateRangePicker/DateRangePicker.tsx
6460
- import { forwardRef as forwardRef29, useRef as useRef9 } from "react";
6473
+ import { forwardRef as forwardRef29, useRef as useRef10 } from "react";
6461
6474
  import {
6462
6475
  DateRangePicker as Base,
6463
6476
  Icon as Icon10,
@@ -6483,7 +6496,7 @@ var DateRangePicker = forwardRef29((props, ref) => {
6483
6496
  helperText: props.helperProps?.text,
6484
6497
  helperIcon: props.helperProps?.icon
6485
6498
  });
6486
- const skeletonWidth = useRef9(`${Math.max(40, Math.random() * 80)}%`);
6499
+ const skeletonWidth = useRef10(`${Math.max(40, Math.random() * 80)}%`);
6487
6500
  const usingDisabled = props.disabled || props.loading;
6488
6501
  return /* @__PURE__ */ jsxDEV53(DatePickerWrapper, {
6489
6502
  $variant: props.variant,
@@ -7719,7 +7732,7 @@ import { forwardRef as forwardRef33 } from "react";
7719
7732
  import { Typography as Typography18 } from "@equinor/eds-core-react";
7720
7733
 
7721
7734
  // src/molecules/InfoElement/CopyText.tsx
7722
- import { useEffect as useEffect16, useRef as useRef10, useState as useState20 } from "react";
7735
+ import { useEffect as useEffect16, useRef as useRef11, useState as useState20 } from "react";
7723
7736
  import { Icon as Icon16, Typography as Typography17 } from "@equinor/eds-core-react";
7724
7737
  import { copy } from "@equinor/eds-icons";
7725
7738
  import styled24, { keyframes as keyframes3 } from "styled-components";
@@ -7768,7 +7781,7 @@ var CopyIcon = styled24.div`
7768
7781
  align-items: center;
7769
7782
  `;
7770
7783
  var CopyText = ({ children, textToCopy }) => {
7771
- const isMounted = useRef10(false);
7784
+ const isMounted = useRef11(false);
7772
7785
  const [hovering, setHovering] = useState20(false);
7773
7786
  const [iconText, setIconText] = useState20("Copy");
7774
7787
  const handleCopy = () => {
@@ -7982,7 +7995,7 @@ var ProfileAvatar = forwardRef34(({ url, name, size = "medium", disabled = false
7982
7995
  });
7983
7996
  ProfileAvatar.displayName = "ProfileAvatar";
7984
7997
  // src/molecules/RichTextDisplay/RichTextDisplay.tsx
7985
- import { useEffect as useEffect17, useRef as useRef11 } from "react";
7998
+ import { useEffect as useEffect17, useRef as useRef12 } from "react";
7986
7999
  import { useEditor } from "@tiptap/react";
7987
8000
 
7988
8001
  // src/molecules/RichTextEditor/RichTextEditor.styles.ts
@@ -8181,7 +8194,7 @@ var RichTextDisplay = ({
8181
8194
  content: imgReadToken ? value?.replaceAll(/(<img src=")(.+)("\/>)/g, `$1$2?${imgReadToken}$3`) : value,
8182
8195
  editable: false
8183
8196
  });
8184
- const previousValue = useRef11(value);
8197
+ const previousValue = useRef12(value);
8185
8198
  useEffect17(() => {
8186
8199
  if (editor && value && value !== previousValue.current) {
8187
8200
  editor.commands.setContent(value);
@@ -8485,7 +8498,7 @@ var TextTable2 = {
8485
8498
  };
8486
8499
 
8487
8500
  // src/molecules/RichTextEditor/MenuBar/AddImageButton.tsx
8488
- import { useRef as useRef12 } from "react";
8501
+ import { useRef as useRef13 } from "react";
8489
8502
  import { camera_add_photo } from "@equinor/eds-icons";
8490
8503
  import { jsxDEV as jsxDEV75, Fragment as Fragment7 } from "react/jsx-dev-runtime";
8491
8504
  var AddImageButton = ({
@@ -8493,7 +8506,7 @@ var AddImageButton = ({
8493
8506
  editor,
8494
8507
  features
8495
8508
  }) => {
8496
- const inputRef = useRef12(null);
8509
+ const inputRef = useRef13(null);
8497
8510
  if (features && !features.includes("images" /* IMAGES */))
8498
8511
  return null;
8499
8512
  const showFileDialog = () => {
@@ -8799,12 +8812,12 @@ var TextHistory = ({ editor, features }) => {
8799
8812
  };
8800
8813
 
8801
8814
  // src/molecules/RichTextEditor/MenuBar/TextLinks.tsx
8802
- import { useRef as useRef14, useState as useState21 } from "react";
8815
+ import { useRef as useRef15, useState as useState21 } from "react";
8803
8816
  import { Button as Button8, Icon as Icon20, Popover } from "@equinor/eds-core-react";
8804
8817
  import { link, link_off } from "@equinor/eds-icons";
8805
8818
 
8806
8819
  // src/molecules/TextField/TextField.tsx
8807
- import { useRef as useRef13 } from "react";
8820
+ import { useRef as useRef14 } from "react";
8808
8821
  import {
8809
8822
  TextField as Base2
8810
8823
  } from "@equinor/eds-core-react";
@@ -8901,7 +8914,7 @@ var TextField = (props) => {
8901
8914
  const usingVariant = props.loading ? undefined : props.variant;
8902
8915
  const skeletonTop = getSkeletonTop(props);
8903
8916
  const skeletonHeight = getSkeletonHeight(props);
8904
- const skeletonWidth = useRef13(`${Math.max(20, Math.random() * 80)}%`);
8917
+ const skeletonWidth = useRef14(`${Math.max(20, Math.random() * 80)}%`);
8905
8918
  return /* @__PURE__ */ jsxDEV84(Wrapper3, {
8906
8919
  $variant: usingVariant,
8907
8920
  $disabled: props.loading ? false : props.disabled,
@@ -8935,8 +8948,8 @@ var Container12 = styled31.div`
8935
8948
  `;
8936
8949
  var TextLinks = ({ editor, features }) => {
8937
8950
  const [open, setOpen] = useState21(false);
8938
- const buttonRef = useRef14(null);
8939
- const linkText = useRef14("");
8951
+ const buttonRef = useRef15(null);
8952
+ const linkText = useRef15("");
8940
8953
  const [failedToSave, setFailedToSave] = useState21(false);
8941
8954
  const handleOnToggleOpen = () => {
8942
8955
  setOpen((prev) => !prev);
@@ -9157,7 +9170,7 @@ var EditorText = {
9157
9170
  };
9158
9171
 
9159
9172
  // src/molecules/RichTextEditor/EditorProvider.tsx
9160
- import { useEffect as useEffect18, useRef as useRef15 } from "react";
9173
+ import { useEffect as useEffect18, useRef as useRef16 } from "react";
9161
9174
  import { useQueryClient as useQueryClient2 } from "@tanstack/react-query";
9162
9175
  import { useEditor as useEditor2 } from "@tiptap/react";
9163
9176
  var EditorProvider = ({
@@ -9179,9 +9192,9 @@ var EditorProvider = ({
9179
9192
  onImageRead
9180
9193
  });
9181
9194
  const queryClient = useQueryClient2();
9182
- const addedImages = useRef15([]);
9183
- const deletedImages = useRef15([]);
9184
- const previousRemovedImages = useRef15([]);
9195
+ const addedImages = useRef16([]);
9196
+ const deletedImages = useRef16([]);
9197
+ const previousRemovedImages = useRef16([]);
9185
9198
  const handleImageCheck = (editor2) => {
9186
9199
  const currentImages = [];
9187
9200
  editor2.getJSON().content?.forEach((item) => {
@@ -9353,7 +9366,7 @@ var RichText = {
9353
9366
  Bar: AmplifyBar
9354
9367
  };
9355
9368
  // src/molecules/Tabs/Tabs.tsx
9356
- import { useEffect as useEffect19, useRef as useRef16, useState as useState22 } from "react";
9369
+ import { useEffect as useEffect19, useRef as useRef17, useState as useState22 } from "react";
9357
9370
  import { Button as Button10, Icon as Icon23 } from "@equinor/eds-core-react";
9358
9371
  import { chevron_left, chevron_right } from "@equinor/eds-icons";
9359
9372
 
@@ -9560,7 +9573,7 @@ function Tabs({
9560
9573
  ref,
9561
9574
  ...rest
9562
9575
  }) {
9563
- const tabContainer = useRef16(null);
9576
+ const tabContainer = useRef17(null);
9564
9577
  const [showScrollButtons, setShowScrollButtons] = useState22(false);
9565
9578
  const [containerWidth, setContainerWidth] = useState22(0);
9566
9579
  const [scrollLeftDisabled, setScrollLeftDisabled] = useState22(true);
@@ -9687,10 +9700,16 @@ var Search = forwardRef36((props, ref) => /* @__PURE__ */ jsxDEV91(StyledBase, {
9687
9700
  }, undefined, false, undefined, this));
9688
9701
  Search.displayName = "HeaderDrawer";
9689
9702
  // src/molecules/Sieve/Sieve.tsx
9690
- import { useCallback as useCallback6, useRef as useRef19, useState as useState25 } from "react";
9703
+ import {
9704
+ useCallback as useCallback6,
9705
+ useEffect as useEffect21,
9706
+ useRef as useRef20,
9707
+ useState as useState25
9708
+ } from "react";
9709
+ import { useSearchParams as useSearchParams2 } from "react-router-dom";
9691
9710
 
9692
9711
  // src/molecules/Sieve/Filter.tsx
9693
- import { useRef as useRef17, useState as useState23 } from "react";
9712
+ import { useRef as useRef18, useState as useState23 } from "react";
9694
9713
  import { Icon as Icon24, Menu as Menu2 } from "@equinor/eds-core-react";
9695
9714
  import {
9696
9715
  arrow_drop_right,
@@ -9778,10 +9797,10 @@ var Filter = ({
9778
9797
  filterValues,
9779
9798
  setFilterValues
9780
9799
  }) => {
9781
- const anchorRef = useRef17(null);
9800
+ const anchorRef = useRef18(null);
9782
9801
  const [subMenuAnchor, setSubMenuAnchor] = useState23(null);
9783
- const menuRef = useRef17(null);
9784
- const subMenuRef = useRef17(null);
9802
+ const menuRef = useRef18(null);
9803
+ const subMenuRef = useRef18(null);
9785
9804
  const [subMenuIndex, setSubMenuIndex] = useState23(-1);
9786
9805
  const [open, setOpen] = useState23(false);
9787
9806
  useOutsideClick(anchorRef.current, (event) => {
@@ -9884,7 +9903,7 @@ var Filter = ({
9884
9903
  var Filter_default = Filter;
9885
9904
 
9886
9905
  // src/molecules/Sieve/Sort.tsx
9887
- import { useRef as useRef18, useState as useState24 } from "react";
9906
+ import { useRef as useRef19, useState as useState24 } from "react";
9888
9907
  import { Icon as Icon25, Menu as Menu3 } from "@equinor/eds-core-react";
9889
9908
  import {
9890
9909
  radio_button_selected,
@@ -9897,7 +9916,7 @@ var Sort = ({
9897
9916
  selectedOption,
9898
9917
  setSelectedOption
9899
9918
  }) => {
9900
- const anchorRef = useRef18(null);
9919
+ const anchorRef = useRef19(null);
9901
9920
  const [open, setOpen] = useState24(false);
9902
9921
  const handleChipClick = () => {
9903
9922
  setOpen(!open);
@@ -9957,11 +9976,74 @@ var Sieve = ({
9957
9976
  onUpdate,
9958
9977
  showChips = true,
9959
9978
  minSearchWidth = "24rem",
9979
+ syncWithSearchParams = false,
9980
+ isLoadingOptions = false,
9960
9981
  debounceSearchValue = false,
9961
9982
  onIsTyping
9962
9983
  }) => {
9963
9984
  const [localSearchString, setLocalSearchString] = useState25(sieveValue.searchValue ?? "");
9964
- const previousOnIsTyping = useRef19(false);
9985
+ const previousOnIsTyping = useRef20(false);
9986
+ const [searchParams, setSearchParams] = useSearchParams2();
9987
+ const initializedSearchParams = useRef20(false);
9988
+ useEffect21(() => {
9989
+ if (!initializedSearchParams.current && syncWithSearchParams && !isLoadingOptions) {
9990
+ const search = searchParams.get("search") ?? undefined;
9991
+ const parents = filterOptions?.map((filterOption) => filterOption.label) ?? [];
9992
+ const filterValues = {};
9993
+ for (const parent of parents) {
9994
+ const parentOptions = filterOptions?.find((filterOption) => filterOption.label === parent)?.options;
9995
+ const labels = JSON.parse(searchParams.get(parent.toLowerCase()) ?? "[]");
9996
+ if (parentOptions !== undefined) {
9997
+ filterValues[parent] = parentOptions.filter((option) => labels.includes(option.label));
9998
+ }
9999
+ }
10000
+ onUpdate({
10001
+ searchValue: search,
10002
+ filterValues,
10003
+ sortValue: sieveValue.sortValue
10004
+ });
10005
+ initializedSearchParams.current = true;
10006
+ }
10007
+ }, [
10008
+ filterOptions,
10009
+ initializedSearchParams,
10010
+ isLoadingOptions,
10011
+ onUpdate,
10012
+ searchParams,
10013
+ sieveValue.sortValue,
10014
+ syncWithSearchParams
10015
+ ]);
10016
+ const previousSieveValue = useRef20("{}");
10017
+ useEffect21(() => {
10018
+ if (syncWithSearchParams && initializedSearchParams.current && !isLoadingOptions && JSON.stringify(sieveValue) !== previousSieveValue.current) {
10019
+ if (sieveValue.searchValue === undefined) {
10020
+ searchParams.delete("search");
10021
+ } else {
10022
+ searchParams.set("search", sieveValue.searchValue);
10023
+ }
10024
+ const parents = filterOptions?.map((filterOption) => filterOption.label) ?? [];
10025
+ const filterValues = sieveValue.filterValues;
10026
+ for (const parent of parents) {
10027
+ if (filterValues?.[parent] && filterValues[parent].length > 0) {
10028
+ searchParams.set(parent.toLowerCase(), JSON.stringify(filterValues[parent].map((option) => option.label)));
10029
+ } else {
10030
+ searchParams.delete(parent.toLowerCase());
10031
+ }
10032
+ }
10033
+ previousSieveValue.current = JSON.stringify(sieveValue);
10034
+ setSearchParams(searchParams);
10035
+ onUpdate(sieveValue);
10036
+ }
10037
+ }, [
10038
+ filterOptions,
10039
+ initializedSearchParams,
10040
+ isLoadingOptions,
10041
+ onUpdate,
10042
+ searchParams,
10043
+ setSearchParams,
10044
+ sieveValue,
10045
+ syncWithSearchParams
10046
+ ]);
9965
10047
  const handleUpdateSieveValue = useCallback6((key, value) => {
9966
10048
  const newSieveValue = {
9967
10049
  ...sieveValue,
@@ -10487,7 +10569,7 @@ var Stepper = ({
10487
10569
  }, undefined, true, undefined, this);
10488
10570
  };
10489
10571
  // src/molecules/OptionDrawer/OptionDrawer.tsx
10490
- import { useEffect as useEffect21, useState as useState27 } from "react";
10572
+ import { useEffect as useEffect22, useState as useState27 } from "react";
10491
10573
  import { Button as Button12, Checkbox, Icon as Icon28 } from "@equinor/eds-core-react";
10492
10574
  import { chevron_down as chevron_down2, chevron_right as chevron_right2 } from "@equinor/eds-icons";
10493
10575
 
@@ -10573,10 +10655,10 @@ var OptionDrawer = ({
10573
10655
  }) => {
10574
10656
  const [open, setOpen] = useState27(false);
10575
10657
  const [status, setStatus] = useState27(getStatus(item, selectedItems, singleSelect, showIntermediateParent));
10576
- useEffect21(() => {
10658
+ useEffect22(() => {
10577
10659
  setStatus(getStatus(item, selectedItems, singleSelect, showIntermediateParent));
10578
10660
  }, [item, selectedItems, singleSelect, showIntermediateParent]);
10579
- useEffect21(() => {
10661
+ useEffect22(() => {
10580
10662
  if (openAll) {
10581
10663
  setOpen(true);
10582
10664
  } else {
@@ -10647,7 +10729,7 @@ var OptionDrawer = ({
10647
10729
  };
10648
10730
  OptionDrawer.displayName = "OptionDrawer";
10649
10731
  // src/molecules/Select/Select.tsx
10650
- import { useMemo as useMemo19, useRef as useRef21 } from "react";
10732
+ import { useMemo as useMemo19, useRef as useRef22 } from "react";
10651
10733
  import { Icon as Icon31, Label } from "@equinor/eds-core-react";
10652
10734
  import { arrow_drop_down, arrow_drop_up, clear as clear2 } from "@equinor/eds-icons";
10653
10735
 
@@ -10904,7 +10986,7 @@ var SmallButton = styled45(Button13)`
10904
10986
  `;
10905
10987
 
10906
10988
  // src/molecules/Select/SelectMenuItem.tsx
10907
- import { useMemo as useMemo16, useRef as useRef20, useState as useState28 } from "react";
10989
+ import { useMemo as useMemo16, useRef as useRef21, useState as useState28 } from "react";
10908
10990
  import { Icon as Icon29 } from "@equinor/eds-core-react";
10909
10991
  import {
10910
10992
  checkbox as checkbox3,
@@ -10958,8 +11040,8 @@ var SelectMenuItem = (props) => {
10958
11040
  CustomMenuItemComponent
10959
11041
  } = props;
10960
11042
  const [openParent, setOpenParent] = useState28(false);
10961
- const focusingChildIndex = useRef20(-1);
10962
- const childRefs = useRef20([]);
11043
+ const focusingChildIndex = useRef21(-1);
11044
+ const childRefs = useRef21([]);
10963
11045
  const selectedValues = "values" in props ? props.values.map(({ value }) => value) : [];
10964
11046
  const isSelected = selectedValues.includes(item.value);
10965
11047
  const parentIcon = useMemo16(() => {
@@ -11353,9 +11435,9 @@ var Select = (props) => {
11353
11435
  sortValues,
11354
11436
  placeholder
11355
11437
  });
11356
- const skeletonWidth = useRef21(`${Math.max(40, Math.random() * 80)}%`);
11357
- const anchorRef = useRef21(null);
11358
- const menuRef = useRef21(null);
11438
+ const skeletonWidth = useRef22(`${Math.max(40, Math.random() * 80)}%`);
11439
+ const anchorRef = useRef22(null);
11440
+ const menuRef = useRef22(null);
11359
11441
  const shouldShowLabel = useMemo19(() => {
11360
11442
  return !!label || !!meta;
11361
11443
  }, [label, meta]);
@@ -12016,7 +12098,7 @@ var Switch = forwardRef40((props, ref) => {
12016
12098
  });
12017
12099
  Switch.displayName = "Switch";
12018
12100
  // src/molecules/Waves/Waves.tsx
12019
- import { useEffect as useEffect22, useRef as useRef22, useState as useState29 } from "react";
12101
+ import { useEffect as useEffect23, useRef as useRef23, useState as useState29 } from "react";
12020
12102
 
12021
12103
  // src/molecules/Waves/Waves.styles.ts
12022
12104
  import { motion as motion5 } from "framer-motion";
@@ -12244,7 +12326,7 @@ var WaveStatic = ({
12244
12326
  import { useScroll as useScroll2 } from "framer-motion";
12245
12327
  import { jsxDEV as jsxDEV124 } from "react/jsx-dev-runtime";
12246
12328
  var Waves = ({ gradientColors }) => {
12247
- const containerRef = useRef22(null);
12329
+ const containerRef = useRef23(null);
12248
12330
  const [width, setWidth] = useState29(containerRef.current?.clientWidth ?? 0);
12249
12331
  const [height, setHeight] = useState29(containerRef.current?.clientHeight ?? 0);
12250
12332
  const { scrollY } = useScroll2({
@@ -12257,7 +12339,7 @@ var Waves = ({ gradientColors }) => {
12257
12339
  setWidth(containerRef.current.clientWidth);
12258
12340
  setHeight(containerRef.current.clientHeight);
12259
12341
  };
12260
- useEffect22(() => {
12342
+ useEffect23(() => {
12261
12343
  const resizeHandler = () => {
12262
12344
  if (!containerRef.current)
12263
12345
  return;
@@ -12351,7 +12433,7 @@ var DataGrid = (props) => {
12351
12433
  }, undefined, false, undefined, this);
12352
12434
  };
12353
12435
  // src/organisms/FieldSelector/FieldSelector.tsx
12354
- import { useRef as useRef23, useState as useState31 } from "react";
12436
+ import { useRef as useRef24, useState as useState31 } from "react";
12355
12437
 
12356
12438
  // src/atoms/style/darkTokens.ts
12357
12439
  import { css as css16 } from "styled-components";
@@ -13177,7 +13259,7 @@ var FieldSelector = ({
13177
13259
  itemNameSingular = "field"
13178
13260
  }) => {
13179
13261
  const [isChangingField, setIsChangingField] = useState31(false);
13180
- const fieldName = useRef23("");
13262
+ const fieldName = useRef24("");
13181
13263
  const handleClick = (field) => {
13182
13264
  if (field.name && field.uuid) {
13183
13265
  setField({
@@ -13212,7 +13294,7 @@ var FieldSelector = ({
13212
13294
  }, undefined, true, undefined, this);
13213
13295
  };
13214
13296
  // src/organisms/Filter/Filter.tsx
13215
- import { useRef as useRef25, useState as useState33 } from "react";
13297
+ import { useRef as useRef26, useState as useState33 } from "react";
13216
13298
  import { Button as Button15, Icon as Icon35, Typography as Typography32 } from "@equinor/eds-core-react";
13217
13299
  import {
13218
13300
  arrow_drop_down as arrow_drop_down2,
@@ -13347,7 +13429,7 @@ var SearchFieldWrapper = styled55.section`
13347
13429
  `;
13348
13430
 
13349
13431
  // src/organisms/Filter/AutoCompleteMenu.tsx
13350
- import { useEffect as useEffect23, useRef as useRef24, useState as useState32 } from "react";
13432
+ import { useEffect as useEffect24, useRef as useRef25, useState as useState32 } from "react";
13351
13433
  import { Menu as Menu8, Typography as Typography30 } from "@equinor/eds-core-react";
13352
13434
 
13353
13435
  // src/organisms/Filter/Filter.utils.ts
@@ -13413,8 +13495,8 @@ function AutoCompleteMenu({
13413
13495
  onAutoComplete
13414
13496
  }) {
13415
13497
  const [open, setOpen] = useState32(false);
13416
- const previousSearch = useRef24("");
13417
- useEffect23(() => {
13498
+ const previousSearch = useRef25("");
13499
+ useEffect24(() => {
13418
13500
  if (!open && search !== previousSearch.current) {
13419
13501
  previousSearch.current = search;
13420
13502
  setOpen(true);
@@ -13529,11 +13611,11 @@ function Filter2({
13529
13611
  id,
13530
13612
  ...rest
13531
13613
  }) {
13532
- const searchRef = useRef25(null);
13533
- const sectionRef = useRef25(null);
13614
+ const searchRef = useRef26(null);
13615
+ const sectionRef = useRef26(null);
13534
13616
  const [open, setOpen] = useState33(initialOpen);
13535
13617
  const [attemptingToRemove, setAttemptingToRemove] = useState33(undefined);
13536
- const initialHeight = useRef25(initialOpen ? "auto" : 0);
13618
+ const initialHeight = useRef26(initialOpen ? "auto" : 0);
13537
13619
  const handleOnToggleOpen = () => {
13538
13620
  setOpen((prev) => !prev);
13539
13621
  if (initialHeight.current === "auto") {
@@ -13695,7 +13777,7 @@ import { Icon as Icon36, Menu as Menu10, Typography as Typography33 } from "@equ
13695
13777
  import { arrow_drop_down as arrow_drop_down3, arrow_drop_up as arrow_drop_up3 } from "@equinor/eds-icons";
13696
13778
 
13697
13779
  // src/organisms/Filter/ButtonWithMenu.tsx
13698
- import { useRef as useRef26, useState as useState34 } from "react";
13780
+ import { useRef as useRef27, useState as useState34 } from "react";
13699
13781
  import { Menu as Menu9 } from "@equinor/eds-core-react";
13700
13782
  import { jsxDEV as jsxDEV133, Fragment as Fragment17 } from "react/jsx-dev-runtime";
13701
13783
  var ButtonWithMenu = ({
@@ -13704,7 +13786,7 @@ var ButtonWithMenu = ({
13704
13786
  children
13705
13787
  }) => {
13706
13788
  const [open, setOpen] = useState34(false);
13707
- const buttonRef = useRef26(null);
13789
+ const buttonRef = useRef27(null);
13708
13790
  const handleOnToggleOpen = () => {
13709
13791
  setOpen(!open);
13710
13792
  onOpenChange?.(!open);
@@ -13815,18 +13897,18 @@ Filter3.QuickFilter = QuickFilter;
13815
13897
  Filter3.SortMenu = SortMenu;
13816
13898
  // src/organisms/SideBar/MenuItem/BasicMenuItem.tsx
13817
13899
  import { useCallback as useCallback7, useMemo as useMemo21 } from "react";
13900
+ import { useLocation as useLocation3 } from "react-router-dom";
13818
13901
  import { Icon as Icon38 } from "@equinor/eds-core-react";
13819
13902
  import { Feature } from "@equinor/subsurface-app-management";
13820
- import { useLocation as useLocation3 } from "@tanstack/react-router";
13821
13903
 
13822
13904
  // src/organisms/SideBar/MenuItem/MenuItem.styles.ts
13905
+ import { Link as ReactRouterDomLink } from "react-router-dom";
13823
13906
  import { Typography as Typography35 } from "@equinor/eds-core-react";
13824
- import { Link as TanstackLink } from "@tanstack/react-router";
13825
13907
  import styled59 from "styled-components";
13826
13908
  var MenuItemWrapper2 = styled59.span`
13827
13909
  width: 100%;
13828
13910
  `;
13829
- var Link2 = styled59(TanstackLink)`
13911
+ var Link2 = styled59(ReactRouterDomLink)`
13830
13912
  display: flex;
13831
13913
  align-self: stretch;
13832
13914
  align-items: center;
@@ -13972,10 +14054,10 @@ var BasicMenuItem = ({
13972
14054
  };
13973
14055
 
13974
14056
  // src/organisms/SideBar/MenuItem/CollapsableMenuItem.tsx
13975
- import { useEffect as useEffect24, useMemo as useMemo22, useRef as useRef27, useState as useState36 } from "react";
14057
+ import { useEffect as useEffect25, useMemo as useMemo22, useRef as useRef28, useState as useState36 } from "react";
14058
+ import { Link as ReactRouterLink, useLocation as useLocation4 } from "react-router-dom";
13976
14059
  import { Icon as Icon39, Menu as Menu12 } from "@equinor/eds-core-react";
13977
14060
  import { chevron_down as chevron_down4, chevron_up as chevron_up2 } from "@equinor/eds-icons";
13978
- import { Link as TanstackLink2, useLocation as useLocation4 } from "@tanstack/react-router";
13979
14061
  import styled60, { css as css20 } from "styled-components";
13980
14062
  import { jsxDEV as jsxDEV137, Fragment as Fragment18 } from "react/jsx-dev-runtime";
13981
14063
  var Parent = styled60.button`
@@ -14050,10 +14132,10 @@ var CollapsableMenuItem = ({
14050
14132
  const { isOpen } = useSideBar();
14051
14133
  const previousIsOpen = usePrevious(isOpen);
14052
14134
  const isActive = items.some((item) => isCurrentUrl({ currentUrl: pathname, link: item.link }));
14053
- const parentRef = useRef27(null);
14135
+ const parentRef = useRef28(null);
14054
14136
  const [expanded, setExpanded] = useState36(false);
14055
14137
  const handleOnToggleExpanded = () => setExpanded((prev) => !prev);
14056
- useEffect24(() => {
14138
+ useEffect25(() => {
14057
14139
  if (previousIsOpen && !isOpen && expanded || previousPathname !== pathname && expanded && !isOpen) {
14058
14140
  setExpanded(false);
14059
14141
  }
@@ -14129,7 +14211,7 @@ var CollapsableMenuItem = ({
14129
14211
  placement: "right-start",
14130
14212
  onClose: handleOnToggleExpanded,
14131
14213
  children: items.map((item) => /* @__PURE__ */ jsxDEV137(Menu12.Item, {
14132
- as: TanstackLink2,
14214
+ as: ReactRouterLink,
14133
14215
  active: isCurrentUrl({ currentUrl: pathname, link: item.link }),
14134
14216
  style: { width: "256px" },
14135
14217
  to: item.link,
@@ -14391,16 +14473,16 @@ SideBar2.Item = MenuItem4;
14391
14473
  // src/organisms/TopBar/Account/Account.tsx
14392
14474
  import {
14393
14475
  useCallback as useCallback8,
14394
- useEffect as useEffect28,
14476
+ useEffect as useEffect29,
14395
14477
  useMemo as useMemo25,
14396
- useRef as useRef30,
14478
+ useRef as useRef31,
14397
14479
  useState as useState40
14398
14480
  } from "react";
14399
14481
  import { Icon as Icon48, Typography as Typography47 } from "@equinor/eds-core-react";
14400
14482
  import { log_out } from "@equinor/eds-icons";
14401
14483
 
14402
14484
  // src/organisms/TopBar/TopBarMenu.tsx
14403
- import { forwardRef as forwardRef42, useEffect as useEffect25 } from "react";
14485
+ import { forwardRef as forwardRef42, useEffect as useEffect26 } from "react";
14404
14486
  import { Menu as Menu13 } from "@equinor/eds-core-react";
14405
14487
  import styled64 from "styled-components";
14406
14488
  import { jsxDEV as jsxDEV142 } from "react/jsx-dev-runtime";
@@ -14416,7 +14498,7 @@ var MenuWrapper = styled64(Menu13)`
14416
14498
  `}
14417
14499
  `;
14418
14500
  var TopBarMenu = forwardRef42(({ open, onClose, children, anchorEl, isNotification, withGap = false }, ref) => {
14419
- useEffect25(() => {
14501
+ useEffect26(() => {
14420
14502
  const handleResize = () => {
14421
14503
  if (open) {
14422
14504
  onClose();
@@ -14556,11 +14638,11 @@ function useStopImpersonation() {
14556
14638
  }
14557
14639
 
14558
14640
  // src/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.tsx
14559
- import { useEffect as useEffect27, useState as useState39 } from "react";
14641
+ import { useEffect as useEffect28, useState as useState39 } from "react";
14560
14642
  import { Menu as Menu15, Typography as Typography43 } from "@equinor/eds-core-react";
14561
14643
 
14562
14644
  // src/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.tsx
14563
- import { useEffect as useEffect26, useMemo as useMemo24, useRef as useRef28, useState as useState37 } from "react";
14645
+ import { useEffect as useEffect27, useMemo as useMemo24, useRef as useRef29, useState as useState37 } from "react";
14564
14646
  import { Button as Button17, DotProgress as DotProgress3, Icon as Icon42, Typography as Typography37 } from "@equinor/eds-core-react";
14565
14647
  import { arrow_back } from "@equinor/eds-icons";
14566
14648
 
@@ -14648,7 +14730,7 @@ var CreateOrEditUser = ({
14648
14730
  availableFields,
14649
14731
  availableWells
14650
14732
  }) => {
14651
- const initializedEditUser = useRef28(false);
14733
+ const initializedEditUser = useRef29(false);
14652
14734
  const [roles, setRoles] = useState37([]);
14653
14735
  const [firstName, setFirstName] = useState37("");
14654
14736
  const [lastName, setLastName] = useState37("");
@@ -14656,7 +14738,7 @@ var CreateOrEditUser = ({
14656
14738
  const [field, setField] = useState37(undefined);
14657
14739
  const [well, setWell] = useState37(undefined);
14658
14740
  const { data, isLoading: isLoadingRoles } = useAllAppRoles();
14659
- useEffect26(() => {
14741
+ useEffect27(() => {
14660
14742
  if (editingUser && data && !initializedEditUser.current) {
14661
14743
  initializedEditUser.current = true;
14662
14744
  setRoles(editingUser.roles.map((role) => {
@@ -15221,7 +15303,7 @@ var NoUsersText = styled72(Typography41)`
15221
15303
  `;
15222
15304
 
15223
15305
  // src/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.tsx
15224
- import { useRef as useRef29, useState as useState38 } from "react";
15306
+ import { useRef as useRef30, useState as useState38 } from "react";
15225
15307
  import { Button as Button19, Icon as Icon45, Menu as Menu14, Typography as Typography42 } from "@equinor/eds-core-react";
15226
15308
  import {
15227
15309
  account_circle,
@@ -15327,7 +15409,7 @@ var UserImpersonation = ({
15327
15409
  onDelete
15328
15410
  }) => {
15329
15411
  const [open, setOpen] = useState38(false);
15330
- const buttonRef = useRef29(null);
15412
+ const buttonRef = useRef30(null);
15331
15413
  const fullName = impersonateUserDtoToFullName({ firstName, lastName });
15332
15414
  const activeRoles = useMappedRoles(roles);
15333
15415
  const handleOnToggleMenu = () => setOpen((prev) => !prev);
@@ -15441,7 +15523,7 @@ var ImpersonateMenu = ({
15441
15523
  const { data: availableUsers } = useGetAllImpersonationUsersForApp();
15442
15524
  const { data: activeImpersonationUser } = useActiveImpersonationUser();
15443
15525
  const filteredUsers = availableUsers?.filter((user) => impersonateUserDtoToFullName(user).toLowerCase().includes(search.toLowerCase()));
15444
- useEffect27(() => {
15526
+ useEffect28(() => {
15445
15527
  if (!open && activeImpersonationUser && selectedUniqueName !== activeImpersonationUser.uniqueName) {
15446
15528
  setSelectedUniqueName(activeImpersonationUser.uniqueName);
15447
15529
  } else if (!open && !activeImpersonationUser && selectedUniqueName !== "") {
@@ -15816,7 +15898,7 @@ var Account = ({
15816
15898
  const { account, roles, logout } = useAuth();
15817
15899
  const [isOpen, setIsOpen] = useState40(false);
15818
15900
  const [openImpersonate, setOpenImpersonate] = useState40(false);
15819
- const buttonRef = useRef30(null);
15901
+ const buttonRef = useRef31(null);
15820
15902
  const { data: canImpersonate = true } = useCanImpersonate();
15821
15903
  const { data: activeImpersonationUser } = useActiveImpersonationUser();
15822
15904
  const { mutate: endImpersonation } = useStopImpersonation();
@@ -15833,7 +15915,7 @@ var Account = ({
15833
15915
  setIsOpen(false);
15834
15916
  };
15835
15917
  const handleOnCloseImpersonate = () => setOpenImpersonate(false);
15836
- useEffect28(() => {
15918
+ useEffect29(() => {
15837
15919
  if (activeImpersonationUser && activeImpersonationUser.appName != null && activeImpersonationUser.appName.toUpperCase() != APPLICATION_NAME.toUpperCase()) {
15838
15920
  endImpersonation();
15839
15921
  }
@@ -15914,7 +15996,7 @@ var Account = ({
15914
15996
  Account.displayName = "TopBar.Account";
15915
15997
 
15916
15998
  // src/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.tsx
15917
- import { useRef as useRef31, useState as useState41 } from "react";
15999
+ import { useRef as useRef32, useState as useState41 } from "react";
15918
16000
  import { DotProgress as DotProgress7, Icon as Icon50, Typography as Typography50 } from "@equinor/eds-core-react";
15919
16001
  import { apps as apps2, exit_to_app as exit_to_app2 } from "@equinor/eds-icons";
15920
16002
  import {
@@ -15923,13 +16005,13 @@ import {
15923
16005
  import { useQuery as useQuery7 } from "@tanstack/react-query";
15924
16006
 
15925
16007
  // src/organisms/TopBar/TopBar.styles.ts
16008
+ import { Link as Link3 } from "react-router-dom";
15926
16009
  import { Button as Button20 } from "@equinor/eds-core-react";
15927
16010
  import {
15928
16011
  CircularProgress as EDSCircularProgress2,
15929
16012
  TopBar as EDSTopBar,
15930
16013
  Typography as Typography48
15931
16014
  } from "@equinor/eds-core-react";
15932
- import { Link as Link3 } from "@tanstack/react-router";
15933
16015
  import styled80, { css as css22 } from "styled-components";
15934
16016
  var Bar = styled80(EDSTopBar)`
15935
16017
  border-bottom: 1px solid ${colors2.ui.background__medium.rgba};
@@ -16227,7 +16309,7 @@ var ApplicationDrawer = () => {
16227
16309
  queryKey: [`userApplications`],
16228
16310
  queryFn: () => AmplifyApplicationService2.userApplications()
16229
16311
  });
16230
- const buttonRef = useRef31(null);
16312
+ const buttonRef = useRef32(null);
16231
16313
  const toggleMenu = () => setIsOpen(!isOpen);
16232
16314
  const closeMenu = () => {
16233
16315
  setIsOpen(false);
@@ -16378,7 +16460,7 @@ var ApplicationDrawer = () => {
16378
16460
  };
16379
16461
 
16380
16462
  // src/organisms/TopBar/FieldMenu/FieldMenu.tsx
16381
- import { forwardRef as forwardRef44, useMemo as useMemo26, useRef as useRef32, useState as useState42 } from "react";
16463
+ import { forwardRef as forwardRef44, useMemo as useMemo26, useRef as useRef33, useState as useState42 } from "react";
16382
16464
  import { Icon as Icon51, Search as Search3, Typography as Typography52 } from "@equinor/eds-core-react";
16383
16465
  import {
16384
16466
  arrow_drop_down as arrow_drop_down4,
@@ -16489,8 +16571,8 @@ var FieldMenu = forwardRef44(({
16489
16571
  showAccessITLink = true
16490
16572
  }, ref) => {
16491
16573
  const [isOpen, setIsOpen] = useState42(false);
16492
- const menuRef = useRef32(null);
16493
- const buttonRef = useRef32(null);
16574
+ const menuRef = useRef33(null);
16575
+ const buttonRef = useRef33(null);
16494
16576
  const [searchValue, setSearchValue] = useState42("");
16495
16577
  const closeMenu = () => setIsOpen(false);
16496
16578
  const toggleMenu = () => setIsOpen(!isOpen);
@@ -16643,7 +16725,7 @@ var FieldMenu = forwardRef44(({
16643
16725
  FieldMenu.displayName = "FieldSelector";
16644
16726
 
16645
16727
  // src/organisms/TopBar/Notifications/NotificationsInner.tsx
16646
- import { useMemo as useMemo28, useRef as useRef34, useState as useState44 } from "react";
16728
+ import { useMemo as useMemo28, useRef as useRef35, useState as useState44 } from "react";
16647
16729
  import { Icon as Icon54 } from "@equinor/eds-core-react";
16648
16730
  import { notifications as notificationIcon } from "@equinor/eds-icons";
16649
16731
 
@@ -17267,7 +17349,7 @@ var NotificationTemplate = (props) => {
17267
17349
  };
17268
17350
 
17269
17351
  // src/organisms/TopBar/Notifications/FilterOptions.tsx
17270
- import { useRef as useRef33, useState as useState43 } from "react";
17352
+ import { useRef as useRef34, useState as useState43 } from "react";
17271
17353
  import { Icon as Icon53, Menu as Menu16, Typography as Typography63 } from "@equinor/eds-core-react";
17272
17354
  import {
17273
17355
  checkbox as checkbox4,
@@ -17326,8 +17408,8 @@ var FilterOptions = ({
17326
17408
  }) => {
17327
17409
  const [openFilter, setOpenFilter] = useState43(false);
17328
17410
  const [openSort, setOpenSort] = useState43(false);
17329
- const filterRef = useRef33(null);
17330
- const sortRef = useRef33(null);
17411
+ const filterRef = useRef34(null);
17412
+ const sortRef = useRef34(null);
17331
17413
  const [selectedSort, setSelectedSort] = useState43({
17332
17414
  ["unread" /* UNREAD */]: false,
17333
17415
  ["oldtonew" /* OLD_NEWEST */]: false,
@@ -17531,9 +17613,9 @@ var NotificationsInner = ({
17531
17613
  showFilterOptions = false,
17532
17614
  notifications
17533
17615
  }) => {
17534
- const buttonRef = useRef34(null);
17535
- const filterMenuRef = useRef34(null);
17536
- const sortMenuRef = useRef34(null);
17616
+ const buttonRef = useRef35(null);
17617
+ const filterMenuRef = useRef35(null);
17618
+ const sortMenuRef = useRef35(null);
17537
17619
  const { isOpen, setIsOpen } = useNotification();
17538
17620
  const [filteringOn, setFilteringOn] = useState44([]);
17539
17621
  const [sortingOn, setSortingOn] = useState44([]);
@@ -17639,7 +17721,7 @@ var Notifications = (props) => {
17639
17721
  // src/organisms/TopBar/Resources/Resources.tsx
17640
17722
  import {
17641
17723
  useMemo as useMemo36,
17642
- useRef as useRef37,
17724
+ useRef as useRef38,
17643
17725
  useState as useState51
17644
17726
  } from "react";
17645
17727
  import { Button as Button27, Dialog as Dialog5, Divider as Divider5, Icon as Icon62 } from "@equinor/eds-core-react";
@@ -17655,7 +17737,7 @@ import {
17655
17737
  import {
17656
17738
  createContext as createContext10,
17657
17739
  useCallback as useCallback9,
17658
- useEffect as useEffect29,
17740
+ useEffect as useEffect30,
17659
17741
  useMemo as useMemo29,
17660
17742
  useState as useState45
17661
17743
  } from "react";
@@ -18072,7 +18154,7 @@ var FeedbackContextProvider = ({
18072
18154
  setSlackRequestResponse({ status: "idle" /* idle */ });
18073
18155
  setSlackAttachmentRequestResponse([]);
18074
18156
  }, [setFeedbackLocalStorage]);
18075
- useEffect29(() => {
18157
+ useEffect30(() => {
18076
18158
  return () => {
18077
18159
  if (serviceNowRequestResponse.status === "success" /* success */ && allSlackRequestStatus === "success" /* success */) {
18078
18160
  setTimeout(() => {
@@ -18085,19 +18167,19 @@ var FeedbackContextProvider = ({
18085
18167
  serviceNowRequestResponse.status,
18086
18168
  setFeedbackLocalStorage
18087
18169
  ]);
18088
- useEffect29(() => {
18170
+ useEffect30(() => {
18089
18171
  if (slackAttachmentsRequestResponse.length !== feedbackAttachments.length) {
18090
18172
  setSlackAttachmentRequestResponse(feedbackAttachments.map((attachment) => {
18091
18173
  return { status: "idle" /* idle */, fileName: attachment.name };
18092
18174
  }));
18093
18175
  }
18094
18176
  }, [feedbackAttachments, slackAttachmentsRequestResponse.length]);
18095
- useEffect29(() => {
18177
+ useEffect30(() => {
18096
18178
  if (serviceNowRequestResponse.serviceNowId && serviceNowRequestResponse.serviceNowId.length !== 0) {
18097
18179
  setServiceNowUrl(createServiceNowUrl(serviceNowRequestResponse.serviceNowId, true));
18098
18180
  }
18099
18181
  }, [serviceNowRequestResponse.serviceNowId]);
18100
- useEffect29(() => {
18182
+ useEffect30(() => {
18101
18183
  if (selectedType === "suggestion" /* SUGGESTION */ && allSlackRequestStatus === "success" /* success */) {
18102
18184
  setRelevantRequestsHaveBeenSuccess(true);
18103
18185
  } else if (serviceNowRequestResponse.status === "success" /* success */ && allSlackRequestStatus === "success" /* success */) {
@@ -18153,7 +18235,7 @@ function useFeedbackContext() {
18153
18235
  import { useState as useState47 } from "react";
18154
18236
 
18155
18237
  // src/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.tsx
18156
- import { useEffect as useEffect30, useMemo as useMemo30, useState as useState46 } from "react";
18238
+ import { useEffect as useEffect31, useMemo as useMemo30, useState as useState46 } from "react";
18157
18239
  import { Icon as Icon55 } from "@equinor/eds-core-react";
18158
18240
  import { clear as clear4, error_outlined as error_outlined5 } from "@equinor/eds-icons";
18159
18241
 
@@ -18293,7 +18375,7 @@ ${message}`;
18293
18375
  }
18294
18376
  return "Error";
18295
18377
  }, [error, props]);
18296
- useEffect30(() => {
18378
+ useEffect31(() => {
18297
18379
  const getSrc = async (file) => {
18298
18380
  const src2 = await readUploadedFileAsText2(file);
18299
18381
  setSrc(src2);
@@ -18764,11 +18846,11 @@ var FeedbackForm = () => {
18764
18846
  };
18765
18847
 
18766
18848
  // src/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.tsx
18767
- import { useEffect as useEffect32, useState as useState49 } from "react";
18849
+ import { useEffect as useEffect33, useState as useState49 } from "react";
18768
18850
  import { Button as Button25 } from "@equinor/eds-core-react";
18769
18851
 
18770
18852
  // src/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.tsx
18771
- import { useEffect as useEffect31, useRef as useRef35, useState as useState48 } from "react";
18853
+ import { useEffect as useEffect32, useRef as useRef36, useState as useState48 } from "react";
18772
18854
  import { motion as motion8 } from "framer-motion";
18773
18855
  import styled105 from "styled-components";
18774
18856
  import { jsxDEV as jsxDEV182 } from "react/jsx-dev-runtime";
@@ -18782,9 +18864,9 @@ var AnimationWrapper = styled105(motion8.div)`
18782
18864
  var AnimateChangeInHeight = ({
18783
18865
  children
18784
18866
  }) => {
18785
- const containerRef = useRef35(null);
18867
+ const containerRef = useRef36(null);
18786
18868
  const [height, setHeight] = useState48("auto");
18787
- useEffect31(() => {
18869
+ useEffect32(() => {
18788
18870
  if (containerRef.current) {
18789
18871
  const resizeObserver = new ResizeObserver((entries) => {
18790
18872
  const observedHeight = entries[0].contentRect.height;
@@ -19004,7 +19086,7 @@ var ResponsePage = () => {
19004
19086
  requestHasError,
19005
19087
  relevantRequestsHaveBeenSuccess
19006
19088
  } = useFeedbackContext();
19007
- useEffect32(() => {
19089
+ useEffect33(() => {
19008
19090
  if (!showSuccessPage && relevantRequestsHaveBeenSuccess) {
19009
19091
  setTimeout(() => {
19010
19092
  setShowSuccessPage(true);
@@ -19208,7 +19290,7 @@ var AllReleaseNotesWrapper = styled113.div`
19208
19290
  `;
19209
19291
 
19210
19292
  // src/organisms/ReleaseNote/ReleaseNote.tsx
19211
- import { forwardRef as forwardRef46, useRef as useRef36, useState as useState50 } from "react";
19293
+ import { forwardRef as forwardRef46, useRef as useRef37, useState as useState50 } from "react";
19212
19294
  import { Typography as Typography73 } from "@equinor/eds-core-react";
19213
19295
  import {
19214
19296
  ReleaseNotesService
@@ -19349,10 +19431,10 @@ var ReleaseNote3 = forwardRef46(({
19349
19431
  expanded = false
19350
19432
  }, ref) => {
19351
19433
  const usingDate = usingReleaseNoteDate({ releaseDate, createdDate });
19352
- const initialHeight = useRef36(expanded ? "auto" : RELEASE_NOTE_RICH_TEXT_COLLAPSED_HEIGHT);
19434
+ const initialHeight = useRef37(expanded ? "auto" : RELEASE_NOTE_RICH_TEXT_COLLAPSED_HEIGHT);
19353
19435
  const [isExpanded, setIsExpanded] = useState50(expanded);
19354
19436
  const [needsShowMore, setNeedsShowMore] = useState50(getImagesFromRichText(body).length > 0);
19355
- const resizeObserver = useRef36(new ResizeObserver((entries) => {
19437
+ const resizeObserver = useRef37(new ResizeObserver((entries) => {
19356
19438
  if (entries.at(0) && entries[0].target.scrollHeight > RELEASE_NOTE_RICH_TEXT_COLLAPSED_HEIGHT) {
19357
19439
  setNeedsShowMore(true);
19358
19440
  }
@@ -19499,7 +19581,7 @@ var Resources = ({
19499
19581
  const [showFeedbackDialog, setShowFeedbackDialog] = useState51(false);
19500
19582
  const [openPortal, setOpenPortal] = useState51(false);
19501
19583
  const [showingResourceSection, setShowingResourceSection] = useState51(undefined);
19502
- const buttonRef = useRef37(null);
19584
+ const buttonRef = useRef38(null);
19503
19585
  const [feedbackType, setFeedbackType] = useState51(undefined);
19504
19586
  const closeMenu = () => {
19505
19587
  setShowingResourceSection(undefined);
@@ -19637,7 +19719,7 @@ var Resources = ({
19637
19719
  };
19638
19720
 
19639
19721
  // src/organisms/TopBar/Tutorials/Tutorials.tsx
19640
- import { useRef as useRef38, useState as useState52 } from "react";
19722
+ import { useRef as useRef39, useState as useState52 } from "react";
19641
19723
  import { Divider as Divider6, Icon as Icon64, Typography as Typography75 } from "@equinor/eds-core-react";
19642
19724
  import { youtube_alt } from "@equinor/eds-icons";
19643
19725
  import {
@@ -19745,7 +19827,7 @@ var Tutorials = ({
19745
19827
  }) => {
19746
19828
  const { allTutorials, tutorialsOnThisPage } = useTutorials5();
19747
19829
  const [open, setOpen] = useState52(false);
19748
- const buttonRef = useRef38(null);
19830
+ const buttonRef = useRef39(null);
19749
19831
  const filteredAllTutorials = filterTutorials ? allTutorials.filter(filterTutorials) : allTutorials;
19750
19832
  const filteredTutorialsOnThisPage = filterTutorials ? tutorialsOnThisPage.filter(filterTutorials) : tutorialsOnThisPage;
19751
19833
  const tutorialsOnOtherPages = filteredAllTutorials.filter((tutorial) => filteredTutorialsOnThisPage.findIndex((t) => t.id === tutorial.id) === -1);
@@ -19837,7 +19919,7 @@ var Colorbox = styled121.div`
19837
19919
  `;
19838
19920
 
19839
19921
  // src/organisms/TopBar/Guidelines/Guidelines.tsx
19840
- import { isValidElement as isValidElement2, useRef as useRef39, useState as useState53 } from "react";
19922
+ import { isValidElement as isValidElement2, useRef as useRef40, useState as useState53 } from "react";
19841
19923
  import { Icon as Icon65 } from "@equinor/eds-core-react";
19842
19924
  import { info_circle as info_circle9 } from "@equinor/eds-icons";
19843
19925
 
@@ -19901,7 +19983,7 @@ var Section5 = ({ title, children }) => /* @__PURE__ */ jsxDEV201(Container63, {
19901
19983
  import { jsxDEV as jsxDEV202, Fragment as Fragment31 } from "react/jsx-dev-runtime";
19902
19984
  var Guidelines = ({ sections }) => {
19903
19985
  const [isOpen, setIsOpen] = useState53(false);
19904
- const buttonRef = useRef39(null);
19986
+ const buttonRef = useRef40(null);
19905
19987
  const handleButtonClick = () => {
19906
19988
  if (isOpen) {
19907
19989
  setIsOpen(false);
@@ -19966,7 +20048,7 @@ var Guidelines2 = Guidelines;
19966
20048
  Guidelines2.Colorbox = Colorbox;
19967
20049
 
19968
20050
  // src/organisms/TopBar/Settings.tsx
19969
- import { useContext as useContext11, useMemo as useMemo37, useRef as useRef40, useState as useState54 } from "react";
20051
+ import { useContext as useContext11, useMemo as useMemo37, useRef as useRef41, useState as useState54 } from "react";
19970
20052
  import { Icon as Icon66, Radio as Radio2, Typography as Typography78 } from "@equinor/eds-core-react";
19971
20053
  import { settings } from "@equinor/eds-icons";
19972
20054
  import styled124 from "styled-components";
@@ -19999,7 +20081,7 @@ var SettingsItems = styled124.div`
19999
20081
  }
20000
20082
  `;
20001
20083
  var Settings = ({ allSettings, children }) => {
20002
- const buttonRef = useRef40(null);
20084
+ const buttonRef = useRef41(null);
20003
20085
  const [isOpen, setIsOpen] = useState54(false);
20004
20086
  const themeContext = useContext11(ThemeProviderContext);
20005
20087
  const closeMenu = () => setIsOpen(false);
@@ -20169,12 +20251,12 @@ TopBar2.Resources = Resources;
20169
20251
  TopBar2.ApplicationDrawer = ApplicationDrawer;
20170
20252
  TopBar2.Tutorials = Tutorials;
20171
20253
  // src/organisms/Status/collections/BadRequest.tsx
20172
- import { useRouter } from "@tanstack/react-router";
20254
+ import { useNavigate as useNavigate3 } from "react-router";
20173
20255
  import { jsxDEV as jsxDEV205 } from "react/jsx-dev-runtime";
20174
20256
  var BadRequest = () => {
20175
- const { history } = useRouter();
20257
+ const navigate = useNavigate3();
20176
20258
  const handleOnClick = () => {
20177
- history.go(-1);
20259
+ navigate(-1);
20178
20260
  };
20179
20261
  return /* @__PURE__ */ jsxDEV205(Status2, {
20180
20262
  color: "#AB9067",
@@ -20194,12 +20276,12 @@ var BadRequest = () => {
20194
20276
  }, undefined, true, undefined, this);
20195
20277
  };
20196
20278
  // src/organisms/Status/collections/GenericError.tsx
20197
- import { useRouter as useRouter2 } from "@tanstack/react-router";
20279
+ import { useNavigate as useNavigate4 } from "react-router";
20198
20280
  import { jsxDEV as jsxDEV206 } from "react/jsx-dev-runtime";
20199
20281
  var GenericError = () => {
20200
- const { history } = useRouter2();
20282
+ const navigate = useNavigate4();
20201
20283
  const handleOnClick = () => {
20202
- history.go(-1);
20284
+ navigate(-1);
20203
20285
  };
20204
20286
  return /* @__PURE__ */ jsxDEV206(Status2, {
20205
20287
  children: [
@@ -20212,12 +20294,12 @@ var GenericError = () => {
20212
20294
  }, undefined, true, undefined, this);
20213
20295
  };
20214
20296
  // src/organisms/Status/collections/MissingPermissions.tsx
20215
- import { useRouter as useRouter3 } from "@tanstack/react-router";
20297
+ import { useNavigate as useNavigate5 } from "react-router";
20216
20298
  import { jsxDEV as jsxDEV207 } from "react/jsx-dev-runtime";
20217
20299
  var MissingPermissions = () => {
20218
- const { history } = useRouter3();
20300
+ const navigate = useNavigate5();
20219
20301
  const handleOnClick = () => {
20220
- history.go(-1);
20302
+ navigate(-1);
20221
20303
  };
20222
20304
  return /* @__PURE__ */ jsxDEV207(Status2, {
20223
20305
  children: [
@@ -20231,12 +20313,12 @@ var MissingPermissions = () => {
20231
20313
  }, undefined, true, undefined, this);
20232
20314
  };
20233
20315
  // src/organisms/Status/collections/PageNotFound.tsx
20234
- import { useRouter as useRouter4 } from "@tanstack/react-router";
20316
+ import { useNavigate as useNavigate6 } from "react-router";
20235
20317
  import { jsxDEV as jsxDEV208 } from "react/jsx-dev-runtime";
20236
20318
  var PageNotFound = () => {
20237
- const { history } = useRouter4();
20319
+ const navigate = useNavigate6();
20238
20320
  const handleOnClick = () => {
20239
- history.go(-1);
20321
+ navigate(-1);
20240
20322
  };
20241
20323
  return /* @__PURE__ */ jsxDEV208(Status2, {
20242
20324
  center: false,
@@ -20255,12 +20337,12 @@ var PageNotFound = () => {
20255
20337
  }, undefined, true, undefined, this);
20256
20338
  };
20257
20339
  // src/organisms/Status/collections/ServerError.tsx
20258
- import { useRouter as useRouter5 } from "@tanstack/react-router";
20340
+ import { useNavigate as useNavigate7 } from "react-router";
20259
20341
  import { jsxDEV as jsxDEV209 } from "react/jsx-dev-runtime";
20260
20342
  var ServerError = () => {
20261
- const { history } = useRouter5();
20343
+ const navigate = useNavigate7();
20262
20344
  const handleOnClick = () => {
20263
- history.go(-1);
20345
+ navigate(-1);
20264
20346
  };
20265
20347
  return /* @__PURE__ */ jsxDEV209(Status2, {
20266
20348
  color: "#C47E84",
@@ -20306,7 +20388,7 @@ var ApiResponseError = ({ statusCode }) => {
20306
20388
  import { useMemo as useMemo39 } from "react";
20307
20389
 
20308
20390
  // src/organisms/TableOfContents/TableOfContents.styles.ts
20309
- import { Link as TanstackLink3 } from "@tanstack/react-router";
20391
+ import { Link as ReactLink } from "react-router-dom";
20310
20392
 
20311
20393
  // src/organisms/TableOfContents/TableOfContents.constants.ts
20312
20394
  var HEIGHT = {
@@ -20388,7 +20470,7 @@ var Button28 = styled125.button`
20388
20470
  }
20389
20471
  `}
20390
20472
  `;
20391
- var Link4 = styled125(TanstackLink3)`
20473
+ var Link4 = styled125(ReactLink)`
20392
20474
  text-decoration: none;
20393
20475
  &:focus,
20394
20476
  &:hover,
@@ -20559,7 +20641,7 @@ var ChildContainer = styled125(motion11.div)`
20559
20641
  `;
20560
20642
 
20561
20643
  // src/organisms/TableOfContents/TableOfContentsItem.tsx
20562
- import { useEffect as useEffect33, useMemo as useMemo38, useRef as useRef41 } from "react";
20644
+ import { useEffect as useEffect34, useMemo as useMemo38, useRef as useRef42 } from "react";
20563
20645
  import { jsxDEV as jsxDEV211 } from "react/jsx-dev-runtime";
20564
20646
  var TableOfContentsItem = ({
20565
20647
  label,
@@ -20572,8 +20654,8 @@ var TableOfContentsItem = ({
20572
20654
  isLink = false
20573
20655
  }) => {
20574
20656
  const { isActive, selected, setSelected } = useTableOfContents();
20575
- const initialHeight = useRef41(undefined);
20576
- useEffect33(() => {
20657
+ const initialHeight = useRef42(undefined);
20658
+ useEffect34(() => {
20577
20659
  if (initialHeight.current === undefined) {
20578
20660
  initialHeight.current = 0;
20579
20661
  }
@@ -20716,10 +20798,10 @@ var TableOfContents = ({
20716
20798
  }, undefined, false, undefined, this);
20717
20799
  };
20718
20800
  // src/organisms/PageTitle/PageTitle.tsx
20719
- import { useEffect as useEffect34 } from "react";
20801
+ import { useEffect as useEffect35 } from "react";
20720
20802
  var APP_NAME = environment.getAppName(import.meta.env.VITE_NAME);
20721
20803
  var PageTitle = ({ title, children }) => {
20722
- useEffect34(() => {
20804
+ useEffect35(() => {
20723
20805
  if (document.title !== title) {
20724
20806
  document.title = `${APP_NAME} - ${title}`;
20725
20807
  }
@@ -20881,7 +20963,7 @@ ToggleGroup.displayName = "ToggleGroup";
20881
20963
  var ToggleGroup2 = ToggleGroup;
20882
20964
  ToggleGroup2.Option = ToggleGroupOption;
20883
20965
  // src/organisms/Faq/Faq.tsx
20884
- import { useMemo as useMemo42, useState as useState58 } from "react";
20966
+ import { useMemo as useMemo42 } from "react";
20885
20967
  import { Typography as Typography83 } from "@equinor/eds-core-react";
20886
20968
 
20887
20969
  // src/organisms/Faq/Faq.styles.ts
@@ -20896,7 +20978,7 @@ var Container64 = styled128.div`
20896
20978
  `;
20897
20979
 
20898
20980
  // src/organisms/Faq/Header.tsx
20899
- import { useMemo as useMemo40, useState as useState55 } from "react";
20981
+ import { useMemo as useMemo40 } from "react";
20900
20982
  import { Search as Search4 } from "@equinor/eds-core-react";
20901
20983
  import styled129 from "styled-components";
20902
20984
  import { jsxDEV as jsxDEV215 } from "react/jsx-dev-runtime";
@@ -20916,8 +20998,12 @@ var Container65 = styled129.div`
20916
20998
  `;
20917
20999
  var Header5 = () => {
20918
21000
  const { data } = useFaqsInApplication();
20919
- const [selectedTab, setSelectedTab] = useState55(undefined);
20920
- const [search, setSearch] = useState55("");
21001
+ const [selectedTab, setSelectedTab] = useSearchParameter({
21002
+ key: "category"
21003
+ });
21004
+ const [search, setSearch] = useSearchParameter({
21005
+ key: "search"
21006
+ });
20921
21007
  const tabOptions = useMemo40(() => {
20922
21008
  if (!data)
20923
21009
  return [
@@ -20965,11 +21051,11 @@ var Header5 = () => {
20965
21051
  };
20966
21052
 
20967
21053
  // src/organisms/Faq/Category/Category.tsx
20968
- import { useMemo as useMemo41, useState as useState57 } from "react";
21054
+ import { useMemo as useMemo41 } from "react";
20969
21055
  import { Typography as Typography82 } from "@equinor/eds-core-react";
20970
21056
 
20971
21057
  // src/organisms/Faq/Category/Question.tsx
20972
- import { useState as useState56 } from "react";
21058
+ import { useState as useState55 } from "react";
20973
21059
  import { Icon as Icon68, Typography as Typography81 } from "@equinor/eds-core-react";
20974
21060
  import { chevron_down as chevron_down5, chevron_up as chevron_up3 } from "@equinor/eds-icons";
20975
21061
  import { FaqService as FaqService2 } from "@equinor/subsurface-app-management";
@@ -20999,7 +21085,7 @@ var Container66 = styled130.div`
20999
21085
  }
21000
21086
  `;
21001
21087
  var Question = ({ question, answer, createdDate }) => {
21002
- const [open, setOpen] = useState56(false);
21088
+ const [open, setOpen] = useState55(false);
21003
21089
  const handleOnToggleOpen = () => setOpen((prev) => !prev);
21004
21090
  return /* @__PURE__ */ jsxDEV216(Container66, {
21005
21091
  onClick: handleOnToggleOpen,
@@ -21047,8 +21133,12 @@ var Container67 = styled131.div`
21047
21133
  }
21048
21134
  `;
21049
21135
  var Category = ({ categoryName, faqs }) => {
21050
- const [search] = useState57(undefined);
21051
- const [selectedTab] = useState57(undefined);
21136
+ const [search] = useSearchParameter({
21137
+ key: "search"
21138
+ });
21139
+ const [selectedTab] = useSearchParameter({
21140
+ key: "category"
21141
+ });
21052
21142
  const sortedFaqs = useMemo41(() => {
21053
21143
  return faqs.toSorted((a, b) => {
21054
21144
  const usingA = a.orderBy ?? 0;
@@ -21155,7 +21245,9 @@ var CategorySkeleton = () => /* @__PURE__ */ jsxDEV218(Container68, {
21155
21245
  import { jsxDEV as jsxDEV219, Fragment as Fragment33 } from "react/jsx-dev-runtime";
21156
21246
  var Faq2 = () => {
21157
21247
  const { data, isLoading } = useFaqsInApplication();
21158
- const [selectedTab] = useState58(undefined);
21248
+ const [selectedTab] = useSearchParameter({
21249
+ key: "category"
21250
+ });
21159
21251
  const filteredCategories = useMemo42(() => {
21160
21252
  if (!data)
21161
21253
  return;
@@ -21314,11 +21406,11 @@ var ExpandingIconButton = forwardRef51(({ text, icon, onClick, className, iconPo
21314
21406
  });
21315
21407
  ExpandingIconButton.displayName = "ExpandingIconButton";
21316
21408
  // src/deprecated/IconToggleButton.tsx
21317
- import { forwardRef as forwardRef52, useState as useState59 } from "react";
21409
+ import { forwardRef as forwardRef52, useState as useState56 } from "react";
21318
21410
  import { Button as Button30, Icon as Icon71 } from "@equinor/eds-core-react";
21319
21411
  import { jsxDEV as jsxDEV221 } from "react/jsx-dev-runtime";
21320
21412
  var IconToggleButton = forwardRef52(({ initialState = false, toggleOn, toggleOff, onClick }, ref) => {
21321
- const [toggle, setToggle] = useState59(initialState);
21413
+ const [toggle, setToggle] = useState56(initialState);
21322
21414
  const handleToggleOff = () => {
21323
21415
  setToggle(false);
21324
21416
  onClick?.(toggle);
@@ -21361,7 +21453,7 @@ var IconToggleButton_default = IconToggleButton;
21361
21453
  import { useMemo as useMemo45 } from "react";
21362
21454
 
21363
21455
  // src/deprecated/OldStepper/OldStep.tsx
21364
- import { useMemo as useMemo43, useState as useState60 } from "react";
21456
+ import { useMemo as useMemo43, useState as useState57 } from "react";
21365
21457
  import { Icon as Icon72, Typography as Typography85 } from "@equinor/eds-core-react";
21366
21458
  import { check as check5 } from "@equinor/eds-icons";
21367
21459
  import styled134 from "styled-components";
@@ -21404,7 +21496,7 @@ var OldStep = ({
21404
21496
  onlyShowCurrentStepLabel = false,
21405
21497
  children
21406
21498
  }) => {
21407
- const [containerRef, setContainerRef] = useState60(null);
21499
+ const [containerRef, setContainerRef] = useState57(null);
21408
21500
  const StepIcon2 = useMemo43(() => {
21409
21501
  if (index >= currentIndex) {
21410
21502
  return /* @__PURE__ */ jsxDEV222(IconWrapper3, {
@@ -21539,6 +21631,7 @@ export {
21539
21631
  useSnackbar,
21540
21632
  useSideBar,
21541
21633
  useSelect,
21634
+ useSearchParameter,
21542
21635
  useReleaseNotes,
21543
21636
  usePrevious,
21544
21637
  usePrefetchRichTextImages,