@equinor/amplify-component-lib 9.15.0-beta.0 → 9.15.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.
- package/dist/index.js +297 -216
- package/dist/src/atoms/hooks/index.d.ts +1 -0
- package/dist/src/atoms/hooks/useSearchParameter.d.ts +5 -0
- package/dist/src/index.d.ts +4 -4
- package/dist/src/molecules/Chip/Chip.d.ts +1 -1
- package/dist/src/molecules/FileProgress/CompactFileProgress.styles.d.ts +2 -2
- package/dist/src/molecules/ListItem/ListItem.utils.d.ts +1 -1
- package/dist/src/molecules/Select/Select.styles.d.ts +11 -11
- package/dist/src/molecules/Sieve/Sieve.styles.d.ts +1 -1
- package/dist/src/molecules/Sieve/Sieve.types.d.ts +2 -0
- package/dist/src/organisms/Filter/AutoCompleteText.d.ts +1 -1
- package/dist/src/organisms/Filter/Filter.styles.d.ts +3 -3
- package/dist/src/organisms/SideBar/CreateItem.styles.d.ts +1 -1
- package/dist/src/organisms/SideBar/MenuItem/MenuItem.styles.d.ts +2 -295
- package/dist/src/organisms/TableOfContents/TableOfContents.styles.d.ts +1 -294
- package/dist/src/organisms/TopBar/Account/Account.styles.d.ts +3 -3
- package/dist/src/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.styles.d.ts +1 -1
- package/dist/src/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.styles.d.ts +3 -3
- package/dist/src/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.styles.d.ts +1 -1
- package/dist/src/organisms/TopBar/FieldMenu/FieldMenu.styles.d.ts +1 -1
- package/dist/src/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.style.d.ts +1 -1
- package/dist/src/organisms/TopBar/Resources/Feedback/Feedback.styles.d.ts +1 -1
- package/dist/src/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.d.ts +1 -1
- package/dist/src/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.d.ts +1 -1
- package/dist/src/organisms/TopBar/TopBar.styles.d.ts +3 -296
- package/package.json +9 -5
package/dist/index.js
CHANGED
|
@@ -363,8 +363,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
363
363
|
return types;
|
|
364
364
|
}
|
|
365
365
|
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
366
|
-
} catch (e) {
|
|
367
|
-
}
|
|
366
|
+
} catch (e) {}
|
|
368
367
|
}();
|
|
369
368
|
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
370
369
|
function apply(func, thisArg, args) {
|
|
@@ -590,14 +589,12 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
590
589
|
}
|
|
591
590
|
function charsStartIndex(strSymbols, chrSymbols) {
|
|
592
591
|
var index = -1, length = strSymbols.length;
|
|
593
|
-
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
594
|
-
}
|
|
592
|
+
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
|
595
593
|
return index;
|
|
596
594
|
}
|
|
597
595
|
function charsEndIndex(strSymbols, chrSymbols) {
|
|
598
596
|
var index = strSymbols.length;
|
|
599
|
-
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
|
|
600
|
-
}
|
|
597
|
+
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
|
|
601
598
|
return index;
|
|
602
599
|
}
|
|
603
600
|
function countHolders(array, placeholder) {
|
|
@@ -693,8 +690,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
693
690
|
}
|
|
694
691
|
function trimmedEndIndex(string) {
|
|
695
692
|
var index = string.length;
|
|
696
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {
|
|
697
|
-
}
|
|
693
|
+
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
698
694
|
return index;
|
|
699
695
|
}
|
|
700
696
|
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
|
|
@@ -733,8 +729,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
733
729
|
var func = getNative(Object2, "defineProperty");
|
|
734
730
|
func({}, "", {});
|
|
735
731
|
return func;
|
|
736
|
-
} catch (e) {
|
|
737
|
-
}
|
|
732
|
+
} catch (e) {}
|
|
738
733
|
}();
|
|
739
734
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
740
735
|
var { ceil: nativeCeil, floor: nativeFloor } = Math2, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
@@ -755,8 +750,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
755
750
|
return new LodashWrapper(value);
|
|
756
751
|
}
|
|
757
752
|
var baseCreate = function() {
|
|
758
|
-
function object() {
|
|
759
|
-
}
|
|
753
|
+
function object() {}
|
|
760
754
|
return function(proto) {
|
|
761
755
|
if (!isObject(proto)) {
|
|
762
756
|
return {};
|
|
@@ -770,8 +764,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
770
764
|
return result2;
|
|
771
765
|
};
|
|
772
766
|
}();
|
|
773
|
-
function baseLodash() {
|
|
774
|
-
}
|
|
767
|
+
function baseLodash() {}
|
|
775
768
|
function LodashWrapper(value, chainAll) {
|
|
776
769
|
this.__wrapped__ = value;
|
|
777
770
|
this.__actions__ = [];
|
|
@@ -1921,8 +1914,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
1921
1914
|
}
|
|
1922
1915
|
function baseWhile(array, predicate, isDrop, fromRight) {
|
|
1923
1916
|
var length = array.length, index = fromRight ? length : -1;
|
|
1924
|
-
while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {
|
|
1925
|
-
}
|
|
1917
|
+
while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {}
|
|
1926
1918
|
return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
|
|
1927
1919
|
}
|
|
1928
1920
|
function baseWrapperValue(value, actions) {
|
|
@@ -2703,8 +2695,7 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
2703
2695
|
try {
|
|
2704
2696
|
value[symToStringTag] = undefined2;
|
|
2705
2697
|
var unmasked = true;
|
|
2706
|
-
} catch (e) {
|
|
2707
|
-
}
|
|
2698
|
+
} catch (e) {}
|
|
2708
2699
|
var result2 = nativeObjectToString.call(value);
|
|
2709
2700
|
if (unmasked) {
|
|
2710
2701
|
if (isOwn) {
|
|
@@ -3062,12 +3053,10 @@ var require_lodash = __commonJS((exports, module) => {
|
|
|
3062
3053
|
if (func != null) {
|
|
3063
3054
|
try {
|
|
3064
3055
|
return funcToString.call(func);
|
|
3065
|
-
} catch (e) {
|
|
3066
|
-
}
|
|
3056
|
+
} catch (e) {}
|
|
3067
3057
|
try {
|
|
3068
3058
|
return func + "";
|
|
3069
|
-
} catch (e) {
|
|
3070
|
-
}
|
|
3059
|
+
} catch (e) {}
|
|
3071
3060
|
}
|
|
3072
3061
|
return "";
|
|
3073
3062
|
}
|
|
@@ -4864,8 +4853,7 @@ __p += '`;
|
|
|
4864
4853
|
}
|
|
4865
4854
|
return this;
|
|
4866
4855
|
}
|
|
4867
|
-
function noop() {
|
|
4868
|
-
}
|
|
4856
|
+
function noop() {}
|
|
4869
4857
|
function nthArg(n) {
|
|
4870
4858
|
n = toInteger(n);
|
|
4871
4859
|
return baseRest(function(args) {
|
|
@@ -8251,7 +8239,7 @@ import {
|
|
|
8251
8239
|
useRef as useRef2,
|
|
8252
8240
|
useState as useState5
|
|
8253
8241
|
} from "react";
|
|
8254
|
-
import { useLocation, useNavigate } from "
|
|
8242
|
+
import { useLocation, useNavigate } from "react-router";
|
|
8255
8243
|
|
|
8256
8244
|
// src/atoms/hooks/useOnScreenMultiple.ts
|
|
8257
8245
|
import { useEffect as useEffect2, useState as useState4 } from "react";
|
|
@@ -8316,6 +8304,7 @@ var TableOfContentsProvider = ({
|
|
|
8316
8304
|
const { hash } = useLocation();
|
|
8317
8305
|
const [selected, setSelected] = useState5(items[0]?.value);
|
|
8318
8306
|
const [elements, setElements] = useState5([]);
|
|
8307
|
+
const [shouldInstantlyJump, setShouldInstantlyJump] = useState5(hash !== "");
|
|
8319
8308
|
const initHashStateRef = useRef2(false);
|
|
8320
8309
|
const values = useMemo3(() => items.flatMap((item) => getValues([], item)), [items]);
|
|
8321
8310
|
useEffect3(() => {
|
|
@@ -8339,19 +8328,9 @@ var TableOfContentsProvider = ({
|
|
|
8339
8328
|
const isScrollingTo = useRef2(-1);
|
|
8340
8329
|
const handleSetSelected = useCallback2((value, options) => {
|
|
8341
8330
|
const selectedIndex = values.findIndex((itemValue) => itemValue === value);
|
|
8342
|
-
if (hashNavigation) {
|
|
8343
|
-
setSelected(values[selectedIndex]);
|
|
8344
|
-
navigate({
|
|
8345
|
-
to: ".",
|
|
8346
|
-
hash: `#${values[selectedIndex]}`,
|
|
8347
|
-
hashScrollIntoView: false,
|
|
8348
|
-
replace: true
|
|
8349
|
-
});
|
|
8350
|
-
return;
|
|
8351
|
-
}
|
|
8352
8331
|
const element = elements[selectedIndex];
|
|
8353
8332
|
if (element) {
|
|
8354
|
-
const behavior = options?.behavior ?? "smooth";
|
|
8333
|
+
const behavior = options?.shouldInstantlyJumpOnMount && shouldInstantlyJump ? "instant" : options?.behavior ?? "smooth";
|
|
8355
8334
|
element.scrollIntoView({
|
|
8356
8335
|
block: "start",
|
|
8357
8336
|
behavior
|
|
@@ -8365,6 +8344,10 @@ var TableOfContentsProvider = ({
|
|
|
8365
8344
|
same += 1;
|
|
8366
8345
|
if (same > 1) {
|
|
8367
8346
|
setSelected(values[selectedIndex]);
|
|
8347
|
+
if (hashNavigation) {
|
|
8348
|
+
navigate(`#${values[selectedIndex]}`, { replace: true });
|
|
8349
|
+
setShouldInstantlyJump(false);
|
|
8350
|
+
}
|
|
8368
8351
|
isScrollingTo.current = -1;
|
|
8369
8352
|
return;
|
|
8370
8353
|
}
|
|
@@ -8376,28 +8359,9 @@ var TableOfContentsProvider = ({
|
|
|
8376
8359
|
};
|
|
8377
8360
|
requestAnimationFrame(checkScrollDone);
|
|
8378
8361
|
}
|
|
8379
|
-
}, [elements, hashNavigation, navigate, values]);
|
|
8380
|
-
useEffect3(() => {
|
|
8381
|
-
if (hash && !initHashStateRef.current) {
|
|
8382
|
-
initHashStateRef.current = true;
|
|
8383
|
-
const targetValue = decodeURIComponent(hash.replace("#", ""));
|
|
8384
|
-
if (!targetValue.length || !values.includes(targetValue)) {
|
|
8385
|
-
return;
|
|
8386
|
-
}
|
|
8387
|
-
setSelected(targetValue);
|
|
8388
|
-
navigate({
|
|
8389
|
-
to: ".",
|
|
8390
|
-
hash: `#${targetValue}`,
|
|
8391
|
-
hashScrollIntoView: {
|
|
8392
|
-
block: "start",
|
|
8393
|
-
behavior: "instant"
|
|
8394
|
-
},
|
|
8395
|
-
replace: true
|
|
8396
|
-
});
|
|
8397
|
-
}
|
|
8398
|
-
}, [hash, navigate, values]);
|
|
8362
|
+
}, [elements, hashNavigation, navigate, shouldInstantlyJump, values]);
|
|
8399
8363
|
useEffect3(() => {
|
|
8400
|
-
if (visible.length === 0 || visible.length !== values.length || isScrollingTo.current !== -1
|
|
8364
|
+
if (visible.length === 0 || visible.length !== values.length || isScrollingTo.current !== -1)
|
|
8401
8365
|
return;
|
|
8402
8366
|
let newSelectedIndex = -1;
|
|
8403
8367
|
for (let index = visible.length - 1;index >= 0; index--) {
|
|
@@ -8407,16 +8371,20 @@ var TableOfContentsProvider = ({
|
|
|
8407
8371
|
}
|
|
8408
8372
|
if (newSelectedIndex === -1 || values.at(newSelectedIndex) === undefined)
|
|
8409
8373
|
return;
|
|
8374
|
+
const targetValue = hash.replace("#", "");
|
|
8375
|
+
if (!initHashStateRef.current && targetValue.length && values.includes(targetValue)) {
|
|
8376
|
+
handleSetSelected(targetValue, {
|
|
8377
|
+
behavior: "instant",
|
|
8378
|
+
shouldInstantlyJumpOnMount: true
|
|
8379
|
+
});
|
|
8380
|
+
initHashStateRef.current = true;
|
|
8381
|
+
return;
|
|
8382
|
+
}
|
|
8410
8383
|
setSelected(values[newSelectedIndex]);
|
|
8411
8384
|
if (hashNavigation) {
|
|
8412
|
-
navigate({
|
|
8413
|
-
to: ".",
|
|
8414
|
-
hash: `#${values[newSelectedIndex]}`,
|
|
8415
|
-
hashScrollIntoView: false,
|
|
8416
|
-
replace: true
|
|
8417
|
-
});
|
|
8385
|
+
navigate(`#${values[newSelectedIndex]}`, { replace: true });
|
|
8418
8386
|
}
|
|
8419
|
-
}, [
|
|
8387
|
+
}, [hashNavigation, navigate, values, visible]);
|
|
8420
8388
|
return /* @__PURE__ */ jsxDEV13(TableOfContentsContext.Provider, {
|
|
8421
8389
|
value: {
|
|
8422
8390
|
items,
|
|
@@ -9090,7 +9058,7 @@ import {
|
|
|
9090
9058
|
useContext as useContext6,
|
|
9091
9059
|
useState as useState11
|
|
9092
9060
|
} from "react";
|
|
9093
|
-
import { useLocation as useLocation2, useNavigate as useNavigate2, useParams } from "
|
|
9061
|
+
import { useLocation as useLocation2, useNavigate as useNavigate2, useParams } from "react-router";
|
|
9094
9062
|
import { jsxDEV as jsxDEV17 } from "react/jsx-dev-runtime";
|
|
9095
9063
|
var StepperContext = createContext6(undefined);
|
|
9096
9064
|
function useStepper() {
|
|
@@ -9101,7 +9069,7 @@ function useStepper() {
|
|
|
9101
9069
|
return context;
|
|
9102
9070
|
}
|
|
9103
9071
|
var StepperProvider = ({ steps, children, isStepDisabled, ...rest }) => {
|
|
9104
|
-
const { step } = useParams(
|
|
9072
|
+
const { step } = useParams();
|
|
9105
9073
|
const navigate = useNavigate2();
|
|
9106
9074
|
const pathWithoutStep = useLocation2().pathname.split("/").slice(0, -1).join("/");
|
|
9107
9075
|
const usingInitialStep = rest.syncToURLParam ? Number(step) : rest?.initialStep ?? 0;
|
|
@@ -9119,7 +9087,7 @@ var StepperProvider = ({ steps, children, isStepDisabled, ...rest }) => {
|
|
|
9119
9087
|
}
|
|
9120
9088
|
const handleOnSetStep = (value) => {
|
|
9121
9089
|
if (rest.syncToURLParam) {
|
|
9122
|
-
navigate(
|
|
9090
|
+
navigate(`${pathWithoutStep}/${value}`);
|
|
9123
9091
|
} else {
|
|
9124
9092
|
setCurrentStep(value);
|
|
9125
9093
|
}
|
|
@@ -9210,16 +9178,49 @@ var ThemeProvider = ({ children }) => {
|
|
|
9210
9178
|
children
|
|
9211
9179
|
}, undefined, false, undefined, this);
|
|
9212
9180
|
};
|
|
9181
|
+
// src/atoms/hooks/useSearchParameter.ts
|
|
9182
|
+
import { useRef as useRef7 } from "react";
|
|
9183
|
+
import { useSearchParams } from "react-router-dom";
|
|
9184
|
+
function useSearchParameter({
|
|
9185
|
+
key,
|
|
9186
|
+
initialValue,
|
|
9187
|
+
parser
|
|
9188
|
+
}) {
|
|
9189
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
9190
|
+
const usedInitialValue = useRef7(false);
|
|
9191
|
+
const stringValue = searchParams.get(key) ?? undefined;
|
|
9192
|
+
const parsedValue = parser && stringValue ? parser(stringValue) : stringValue;
|
|
9193
|
+
const value = !usedInitialValue.current && parsedValue === undefined ? initialValue : parsedValue;
|
|
9194
|
+
const handleSetValue = (action) => {
|
|
9195
|
+
if (!usedInitialValue.current) {
|
|
9196
|
+
usedInitialValue.current = true;
|
|
9197
|
+
}
|
|
9198
|
+
if (action instanceof Function) {
|
|
9199
|
+
const newValue = action(value);
|
|
9200
|
+
handleSetValue(newValue);
|
|
9201
|
+
} else {
|
|
9202
|
+
const newSearchParams = new URLSearchParams(searchParams);
|
|
9203
|
+
const stringify = typeof action === "string" ? action : JSON.stringify(action);
|
|
9204
|
+
if (stringify === undefined || stringify === "" || stringify === "null" || stringify === "[]" || stringify === "{}") {
|
|
9205
|
+
newSearchParams.delete(key);
|
|
9206
|
+
} else {
|
|
9207
|
+
newSearchParams.set(key, stringify);
|
|
9208
|
+
}
|
|
9209
|
+
setSearchParams(newSearchParams);
|
|
9210
|
+
}
|
|
9211
|
+
};
|
|
9212
|
+
return [value, handleSetValue];
|
|
9213
|
+
}
|
|
9213
9214
|
// src/atoms/hooks/usePrefetchRichTextImages.ts
|
|
9214
|
-
import { useEffect as useEffect10, useRef as
|
|
9215
|
+
import { useEffect as useEffect10, useRef as useRef8 } from "react";
|
|
9215
9216
|
import { useIsFetching, useQueryClient } from "@tanstack/react-query";
|
|
9216
9217
|
function usePrefetchRichTextImages({
|
|
9217
9218
|
richTextValues,
|
|
9218
9219
|
onImageRead
|
|
9219
9220
|
}) {
|
|
9220
9221
|
const queryClient = useQueryClient();
|
|
9221
|
-
const startedPrefetch =
|
|
9222
|
-
const prefetched =
|
|
9222
|
+
const startedPrefetch = useRef8([]);
|
|
9223
|
+
const prefetched = useRef8([]);
|
|
9223
9224
|
const paths = richTextValues.flatMap((value) => getImagesFromRichText(value));
|
|
9224
9225
|
const isPrefetching = useIsFetching({
|
|
9225
9226
|
predicate: (query) => startedPrefetch.current.some((path) => query.queryKey[0] === path && !prefetched.current.includes(path))
|
|
@@ -11729,7 +11730,7 @@ var ContentMenu = ({
|
|
|
11729
11730
|
}, undefined, false, undefined, this);
|
|
11730
11731
|
};
|
|
11731
11732
|
// src/molecules/DatePicker/DatePicker.tsx
|
|
11732
|
-
import { forwardRef as forwardRef28, useRef as
|
|
11733
|
+
import { forwardRef as forwardRef28, useRef as useRef9 } from "react";
|
|
11733
11734
|
import {
|
|
11734
11735
|
DatePicker as EDSDatePicker,
|
|
11735
11736
|
Icon as Icon9,
|
|
@@ -11864,7 +11865,7 @@ var DatePicker = forwardRef28((props, ref) => {
|
|
|
11864
11865
|
helperText: props.helperProps?.text,
|
|
11865
11866
|
helperIcon: props.helperProps?.icon
|
|
11866
11867
|
});
|
|
11867
|
-
const skeletonWidth =
|
|
11868
|
+
const skeletonWidth = useRef9(`${Math.max(40, Math.random() * 80)}%`);
|
|
11868
11869
|
const usingDisabled = props.loading || props.disabled;
|
|
11869
11870
|
return /* @__PURE__ */ jsxDEV52(DatePickerWrapper, {
|
|
11870
11871
|
$variant: props.variant,
|
|
@@ -11901,7 +11902,7 @@ var DatePicker = forwardRef28((props, ref) => {
|
|
|
11901
11902
|
});
|
|
11902
11903
|
DatePicker.displayName = "DatePicker";
|
|
11903
11904
|
// src/molecules/DateRangePicker/DateRangePicker.tsx
|
|
11904
|
-
import { forwardRef as forwardRef29, useRef as
|
|
11905
|
+
import { forwardRef as forwardRef29, useRef as useRef10 } from "react";
|
|
11905
11906
|
import {
|
|
11906
11907
|
DateRangePicker as Base,
|
|
11907
11908
|
Icon as Icon10,
|
|
@@ -11927,7 +11928,7 @@ var DateRangePicker = forwardRef29((props, ref) => {
|
|
|
11927
11928
|
helperText: props.helperProps?.text,
|
|
11928
11929
|
helperIcon: props.helperProps?.icon
|
|
11929
11930
|
});
|
|
11930
|
-
const skeletonWidth =
|
|
11931
|
+
const skeletonWidth = useRef10(`${Math.max(40, Math.random() * 80)}%`);
|
|
11931
11932
|
const usingDisabled = props.disabled || props.loading;
|
|
11932
11933
|
return /* @__PURE__ */ jsxDEV53(DatePickerWrapper, {
|
|
11933
11934
|
$variant: props.variant,
|
|
@@ -13163,7 +13164,7 @@ import { forwardRef as forwardRef33 } from "react";
|
|
|
13163
13164
|
import { Typography as Typography18 } from "@equinor/eds-core-react";
|
|
13164
13165
|
|
|
13165
13166
|
// src/molecules/InfoElement/CopyText.tsx
|
|
13166
|
-
import { useEffect as useEffect16, useRef as
|
|
13167
|
+
import { useEffect as useEffect16, useRef as useRef11, useState as useState20 } from "react";
|
|
13167
13168
|
import { Icon as Icon16, Typography as Typography17 } from "@equinor/eds-core-react";
|
|
13168
13169
|
import { copy } from "@equinor/eds-icons";
|
|
13169
13170
|
import styled24, { keyframes as keyframes3 } from "styled-components";
|
|
@@ -13212,7 +13213,7 @@ var CopyIcon = styled24.div`
|
|
|
13212
13213
|
align-items: center;
|
|
13213
13214
|
`;
|
|
13214
13215
|
var CopyText = ({ children, textToCopy }) => {
|
|
13215
|
-
const isMounted =
|
|
13216
|
+
const isMounted = useRef11(false);
|
|
13216
13217
|
const [hovering, setHovering] = useState20(false);
|
|
13217
13218
|
const [iconText, setIconText] = useState20("Copy");
|
|
13218
13219
|
const handleCopy = () => {
|
|
@@ -13426,7 +13427,7 @@ var ProfileAvatar = forwardRef34(({ url, name, size = "medium", disabled = false
|
|
|
13426
13427
|
});
|
|
13427
13428
|
ProfileAvatar.displayName = "ProfileAvatar";
|
|
13428
13429
|
// src/molecules/RichTextDisplay/RichTextDisplay.tsx
|
|
13429
|
-
import { useEffect as useEffect17, useRef as
|
|
13430
|
+
import { useEffect as useEffect17, useRef as useRef12 } from "react";
|
|
13430
13431
|
import { useEditor } from "@tiptap/react";
|
|
13431
13432
|
|
|
13432
13433
|
// src/molecules/RichTextEditor/RichTextEditor.styles.ts
|
|
@@ -13625,7 +13626,7 @@ var RichTextDisplay = ({
|
|
|
13625
13626
|
content: imgReadToken ? value?.replaceAll(/(<img src=")(.+)("\/>)/g, `$1$2?${imgReadToken}$3`) : value,
|
|
13626
13627
|
editable: false
|
|
13627
13628
|
});
|
|
13628
|
-
const previousValue =
|
|
13629
|
+
const previousValue = useRef12(value);
|
|
13629
13630
|
useEffect17(() => {
|
|
13630
13631
|
if (editor && value && value !== previousValue.current) {
|
|
13631
13632
|
editor.commands.setContent(value);
|
|
@@ -13929,7 +13930,7 @@ var TextTable2 = {
|
|
|
13929
13930
|
};
|
|
13930
13931
|
|
|
13931
13932
|
// src/molecules/RichTextEditor/MenuBar/AddImageButton.tsx
|
|
13932
|
-
import { useRef as
|
|
13933
|
+
import { useRef as useRef13 } from "react";
|
|
13933
13934
|
import { camera_add_photo } from "@equinor/eds-icons";
|
|
13934
13935
|
import { jsxDEV as jsxDEV75, Fragment as Fragment7 } from "react/jsx-dev-runtime";
|
|
13935
13936
|
var AddImageButton = ({
|
|
@@ -13937,7 +13938,7 @@ var AddImageButton = ({
|
|
|
13937
13938
|
editor,
|
|
13938
13939
|
features
|
|
13939
13940
|
}) => {
|
|
13940
|
-
const inputRef =
|
|
13941
|
+
const inputRef = useRef13(null);
|
|
13941
13942
|
if (features && !features.includes("images" /* IMAGES */))
|
|
13942
13943
|
return null;
|
|
13943
13944
|
const showFileDialog = () => {
|
|
@@ -14243,12 +14244,12 @@ var TextHistory = ({ editor, features }) => {
|
|
|
14243
14244
|
};
|
|
14244
14245
|
|
|
14245
14246
|
// src/molecules/RichTextEditor/MenuBar/TextLinks.tsx
|
|
14246
|
-
import { useRef as
|
|
14247
|
+
import { useRef as useRef15, useState as useState21 } from "react";
|
|
14247
14248
|
import { Button as Button8, Icon as Icon20, Popover } from "@equinor/eds-core-react";
|
|
14248
14249
|
import { link, link_off } from "@equinor/eds-icons";
|
|
14249
14250
|
|
|
14250
14251
|
// src/molecules/TextField/TextField.tsx
|
|
14251
|
-
import { useRef as
|
|
14252
|
+
import { useRef as useRef14 } from "react";
|
|
14252
14253
|
import {
|
|
14253
14254
|
TextField as Base2
|
|
14254
14255
|
} from "@equinor/eds-core-react";
|
|
@@ -14345,7 +14346,7 @@ var TextField = (props) => {
|
|
|
14345
14346
|
const usingVariant = props.loading ? undefined : props.variant;
|
|
14346
14347
|
const skeletonTop = getSkeletonTop(props);
|
|
14347
14348
|
const skeletonHeight = getSkeletonHeight(props);
|
|
14348
|
-
const skeletonWidth =
|
|
14349
|
+
const skeletonWidth = useRef14(`${Math.max(20, Math.random() * 80)}%`);
|
|
14349
14350
|
return /* @__PURE__ */ jsxDEV84(Wrapper3, {
|
|
14350
14351
|
$variant: usingVariant,
|
|
14351
14352
|
$disabled: props.loading ? false : props.disabled,
|
|
@@ -14379,8 +14380,8 @@ var Container12 = styled31.div`
|
|
|
14379
14380
|
`;
|
|
14380
14381
|
var TextLinks = ({ editor, features }) => {
|
|
14381
14382
|
const [open, setOpen] = useState21(false);
|
|
14382
|
-
const buttonRef =
|
|
14383
|
-
const linkText =
|
|
14383
|
+
const buttonRef = useRef15(null);
|
|
14384
|
+
const linkText = useRef15("");
|
|
14384
14385
|
const [failedToSave, setFailedToSave] = useState21(false);
|
|
14385
14386
|
const handleOnToggleOpen = () => {
|
|
14386
14387
|
setOpen((prev) => !prev);
|
|
@@ -14601,7 +14602,7 @@ var EditorText = {
|
|
|
14601
14602
|
};
|
|
14602
14603
|
|
|
14603
14604
|
// src/molecules/RichTextEditor/EditorProvider.tsx
|
|
14604
|
-
import { useEffect as useEffect18, useRef as
|
|
14605
|
+
import { useEffect as useEffect18, useRef as useRef16 } from "react";
|
|
14605
14606
|
import { useQueryClient as useQueryClient2 } from "@tanstack/react-query";
|
|
14606
14607
|
import { useEditor as useEditor2 } from "@tiptap/react";
|
|
14607
14608
|
var EditorProvider = ({
|
|
@@ -14623,9 +14624,9 @@ var EditorProvider = ({
|
|
|
14623
14624
|
onImageRead
|
|
14624
14625
|
});
|
|
14625
14626
|
const queryClient = useQueryClient2();
|
|
14626
|
-
const addedImages =
|
|
14627
|
-
const deletedImages =
|
|
14628
|
-
const previousRemovedImages =
|
|
14627
|
+
const addedImages = useRef16([]);
|
|
14628
|
+
const deletedImages = useRef16([]);
|
|
14629
|
+
const previousRemovedImages = useRef16([]);
|
|
14629
14630
|
const handleImageCheck = (editor2) => {
|
|
14630
14631
|
const currentImages = [];
|
|
14631
14632
|
editor2.getJSON().content?.forEach((item) => {
|
|
@@ -14797,7 +14798,7 @@ var RichText = {
|
|
|
14797
14798
|
Bar: AmplifyBar
|
|
14798
14799
|
};
|
|
14799
14800
|
// src/molecules/Tabs/Tabs.tsx
|
|
14800
|
-
import { useEffect as useEffect19, useRef as
|
|
14801
|
+
import { useEffect as useEffect19, useRef as useRef17, useState as useState22 } from "react";
|
|
14801
14802
|
import { Button as Button10, Icon as Icon23 } from "@equinor/eds-core-react";
|
|
14802
14803
|
import { chevron_left, chevron_right } from "@equinor/eds-icons";
|
|
14803
14804
|
|
|
@@ -15004,7 +15005,7 @@ function Tabs({
|
|
|
15004
15005
|
ref,
|
|
15005
15006
|
...rest
|
|
15006
15007
|
}) {
|
|
15007
|
-
const tabContainer =
|
|
15008
|
+
const tabContainer = useRef17(null);
|
|
15008
15009
|
const [showScrollButtons, setShowScrollButtons] = useState22(false);
|
|
15009
15010
|
const [containerWidth, setContainerWidth] = useState22(0);
|
|
15010
15011
|
const [scrollLeftDisabled, setScrollLeftDisabled] = useState22(true);
|
|
@@ -15131,10 +15132,16 @@ var Search = forwardRef36((props, ref) => /* @__PURE__ */ jsxDEV91(StyledBase, {
|
|
|
15131
15132
|
}, undefined, false, undefined, this));
|
|
15132
15133
|
Search.displayName = "HeaderDrawer";
|
|
15133
15134
|
// src/molecules/Sieve/Sieve.tsx
|
|
15134
|
-
import {
|
|
15135
|
+
import {
|
|
15136
|
+
useCallback as useCallback6,
|
|
15137
|
+
useEffect as useEffect21,
|
|
15138
|
+
useRef as useRef20,
|
|
15139
|
+
useState as useState25
|
|
15140
|
+
} from "react";
|
|
15141
|
+
import { useSearchParams as useSearchParams2 } from "react-router-dom";
|
|
15135
15142
|
|
|
15136
15143
|
// src/molecules/Sieve/Filter.tsx
|
|
15137
|
-
import { useRef as
|
|
15144
|
+
import { useRef as useRef18, useState as useState23 } from "react";
|
|
15138
15145
|
import { Icon as Icon24, Menu as Menu2 } from "@equinor/eds-core-react";
|
|
15139
15146
|
import {
|
|
15140
15147
|
arrow_drop_right,
|
|
@@ -15222,10 +15229,10 @@ var Filter = ({
|
|
|
15222
15229
|
filterValues,
|
|
15223
15230
|
setFilterValues
|
|
15224
15231
|
}) => {
|
|
15225
|
-
const anchorRef =
|
|
15232
|
+
const anchorRef = useRef18(null);
|
|
15226
15233
|
const [subMenuAnchor, setSubMenuAnchor] = useState23(null);
|
|
15227
|
-
const menuRef =
|
|
15228
|
-
const subMenuRef =
|
|
15234
|
+
const menuRef = useRef18(null);
|
|
15235
|
+
const subMenuRef = useRef18(null);
|
|
15229
15236
|
const [subMenuIndex, setSubMenuIndex] = useState23(-1);
|
|
15230
15237
|
const [open, setOpen] = useState23(false);
|
|
15231
15238
|
useOutsideClick(anchorRef.current, (event) => {
|
|
@@ -15328,7 +15335,7 @@ var Filter = ({
|
|
|
15328
15335
|
var Filter_default = Filter;
|
|
15329
15336
|
|
|
15330
15337
|
// src/molecules/Sieve/Sort.tsx
|
|
15331
|
-
import { useRef as
|
|
15338
|
+
import { useRef as useRef19, useState as useState24 } from "react";
|
|
15332
15339
|
import { Icon as Icon25, Menu as Menu3 } from "@equinor/eds-core-react";
|
|
15333
15340
|
import {
|
|
15334
15341
|
radio_button_selected,
|
|
@@ -15341,7 +15348,7 @@ var Sort = ({
|
|
|
15341
15348
|
selectedOption,
|
|
15342
15349
|
setSelectedOption
|
|
15343
15350
|
}) => {
|
|
15344
|
-
const anchorRef =
|
|
15351
|
+
const anchorRef = useRef19(null);
|
|
15345
15352
|
const [open, setOpen] = useState24(false);
|
|
15346
15353
|
const handleChipClick = () => {
|
|
15347
15354
|
setOpen(!open);
|
|
@@ -15401,11 +15408,74 @@ var Sieve = ({
|
|
|
15401
15408
|
onUpdate,
|
|
15402
15409
|
showChips = true,
|
|
15403
15410
|
minSearchWidth = "24rem",
|
|
15411
|
+
syncWithSearchParams = false,
|
|
15412
|
+
isLoadingOptions = false,
|
|
15404
15413
|
debounceSearchValue = false,
|
|
15405
15414
|
onIsTyping
|
|
15406
15415
|
}) => {
|
|
15407
15416
|
const [localSearchString, setLocalSearchString] = useState25(sieveValue.searchValue ?? "");
|
|
15408
|
-
const previousOnIsTyping =
|
|
15417
|
+
const previousOnIsTyping = useRef20(false);
|
|
15418
|
+
const [searchParams, setSearchParams] = useSearchParams2();
|
|
15419
|
+
const initializedSearchParams = useRef20(false);
|
|
15420
|
+
useEffect21(() => {
|
|
15421
|
+
if (!initializedSearchParams.current && syncWithSearchParams && !isLoadingOptions) {
|
|
15422
|
+
const search = searchParams.get("search") ?? undefined;
|
|
15423
|
+
const parents = filterOptions?.map((filterOption) => filterOption.label) ?? [];
|
|
15424
|
+
const filterValues = {};
|
|
15425
|
+
for (const parent of parents) {
|
|
15426
|
+
const parentOptions = filterOptions?.find((filterOption) => filterOption.label === parent)?.options;
|
|
15427
|
+
const labels = JSON.parse(searchParams.get(parent.toLowerCase()) ?? "[]");
|
|
15428
|
+
if (parentOptions !== undefined) {
|
|
15429
|
+
filterValues[parent] = parentOptions.filter((option) => labels.includes(option.label));
|
|
15430
|
+
}
|
|
15431
|
+
}
|
|
15432
|
+
onUpdate({
|
|
15433
|
+
searchValue: search,
|
|
15434
|
+
filterValues,
|
|
15435
|
+
sortValue: sieveValue.sortValue
|
|
15436
|
+
});
|
|
15437
|
+
initializedSearchParams.current = true;
|
|
15438
|
+
}
|
|
15439
|
+
}, [
|
|
15440
|
+
filterOptions,
|
|
15441
|
+
initializedSearchParams,
|
|
15442
|
+
isLoadingOptions,
|
|
15443
|
+
onUpdate,
|
|
15444
|
+
searchParams,
|
|
15445
|
+
sieveValue.sortValue,
|
|
15446
|
+
syncWithSearchParams
|
|
15447
|
+
]);
|
|
15448
|
+
const previousSieveValue = useRef20("{}");
|
|
15449
|
+
useEffect21(() => {
|
|
15450
|
+
if (syncWithSearchParams && initializedSearchParams.current && !isLoadingOptions && JSON.stringify(sieveValue) !== previousSieveValue.current) {
|
|
15451
|
+
if (sieveValue.searchValue === undefined) {
|
|
15452
|
+
searchParams.delete("search");
|
|
15453
|
+
} else {
|
|
15454
|
+
searchParams.set("search", sieveValue.searchValue);
|
|
15455
|
+
}
|
|
15456
|
+
const parents = filterOptions?.map((filterOption) => filterOption.label) ?? [];
|
|
15457
|
+
const filterValues = sieveValue.filterValues;
|
|
15458
|
+
for (const parent of parents) {
|
|
15459
|
+
if (filterValues?.[parent] && filterValues[parent].length > 0) {
|
|
15460
|
+
searchParams.set(parent.toLowerCase(), JSON.stringify(filterValues[parent].map((option) => option.label)));
|
|
15461
|
+
} else {
|
|
15462
|
+
searchParams.delete(parent.toLowerCase());
|
|
15463
|
+
}
|
|
15464
|
+
}
|
|
15465
|
+
previousSieveValue.current = JSON.stringify(sieveValue);
|
|
15466
|
+
setSearchParams(searchParams);
|
|
15467
|
+
onUpdate(sieveValue);
|
|
15468
|
+
}
|
|
15469
|
+
}, [
|
|
15470
|
+
filterOptions,
|
|
15471
|
+
initializedSearchParams,
|
|
15472
|
+
isLoadingOptions,
|
|
15473
|
+
onUpdate,
|
|
15474
|
+
searchParams,
|
|
15475
|
+
setSearchParams,
|
|
15476
|
+
sieveValue,
|
|
15477
|
+
syncWithSearchParams
|
|
15478
|
+
]);
|
|
15409
15479
|
const handleUpdateSieveValue = useCallback6((key, value) => {
|
|
15410
15480
|
const newSieveValue = {
|
|
15411
15481
|
...sieveValue,
|
|
@@ -15931,7 +16001,7 @@ var Stepper = ({
|
|
|
15931
16001
|
}, undefined, true, undefined, this);
|
|
15932
16002
|
};
|
|
15933
16003
|
// src/molecules/OptionDrawer/OptionDrawer.tsx
|
|
15934
|
-
import { useEffect as
|
|
16004
|
+
import { useEffect as useEffect22, useState as useState27 } from "react";
|
|
15935
16005
|
import { Button as Button12, Checkbox, Icon as Icon28 } from "@equinor/eds-core-react";
|
|
15936
16006
|
import { chevron_down as chevron_down2, chevron_right as chevron_right2 } from "@equinor/eds-icons";
|
|
15937
16007
|
|
|
@@ -16017,10 +16087,10 @@ var OptionDrawer = ({
|
|
|
16017
16087
|
}) => {
|
|
16018
16088
|
const [open, setOpen] = useState27(false);
|
|
16019
16089
|
const [status, setStatus] = useState27(getStatus(item, selectedItems, singleSelect, showIntermediateParent));
|
|
16020
|
-
|
|
16090
|
+
useEffect22(() => {
|
|
16021
16091
|
setStatus(getStatus(item, selectedItems, singleSelect, showIntermediateParent));
|
|
16022
16092
|
}, [item, selectedItems, singleSelect, showIntermediateParent]);
|
|
16023
|
-
|
|
16093
|
+
useEffect22(() => {
|
|
16024
16094
|
if (openAll) {
|
|
16025
16095
|
setOpen(true);
|
|
16026
16096
|
} else {
|
|
@@ -16091,7 +16161,7 @@ var OptionDrawer = ({
|
|
|
16091
16161
|
};
|
|
16092
16162
|
OptionDrawer.displayName = "OptionDrawer";
|
|
16093
16163
|
// src/molecules/Select/Select.tsx
|
|
16094
|
-
import { useMemo as useMemo19, useRef as
|
|
16164
|
+
import { useMemo as useMemo19, useRef as useRef22 } from "react";
|
|
16095
16165
|
import { Icon as Icon31, Label } from "@equinor/eds-core-react";
|
|
16096
16166
|
import { arrow_drop_down, arrow_drop_up, clear as clear2 } from "@equinor/eds-icons";
|
|
16097
16167
|
|
|
@@ -16348,7 +16418,7 @@ var SmallButton = styled45(Button13)`
|
|
|
16348
16418
|
`;
|
|
16349
16419
|
|
|
16350
16420
|
// src/molecules/Select/SelectMenuItem.tsx
|
|
16351
|
-
import { useMemo as useMemo16, useRef as
|
|
16421
|
+
import { useMemo as useMemo16, useRef as useRef21, useState as useState28 } from "react";
|
|
16352
16422
|
import { Icon as Icon29 } from "@equinor/eds-core-react";
|
|
16353
16423
|
import {
|
|
16354
16424
|
checkbox as checkbox3,
|
|
@@ -16402,8 +16472,8 @@ var SelectMenuItem = (props) => {
|
|
|
16402
16472
|
CustomMenuItemComponent
|
|
16403
16473
|
} = props;
|
|
16404
16474
|
const [openParent, setOpenParent] = useState28(false);
|
|
16405
|
-
const focusingChildIndex =
|
|
16406
|
-
const childRefs =
|
|
16475
|
+
const focusingChildIndex = useRef21(-1);
|
|
16476
|
+
const childRefs = useRef21([]);
|
|
16407
16477
|
const selectedValues = "values" in props ? props.values.map(({ value }) => value) : [];
|
|
16408
16478
|
const isSelected = selectedValues.includes(item.value);
|
|
16409
16479
|
const parentIcon = useMemo16(() => {
|
|
@@ -16797,9 +16867,9 @@ var Select = (props) => {
|
|
|
16797
16867
|
sortValues,
|
|
16798
16868
|
placeholder
|
|
16799
16869
|
});
|
|
16800
|
-
const skeletonWidth =
|
|
16801
|
-
const anchorRef =
|
|
16802
|
-
const menuRef =
|
|
16870
|
+
const skeletonWidth = useRef22(`${Math.max(40, Math.random() * 80)}%`);
|
|
16871
|
+
const anchorRef = useRef22(null);
|
|
16872
|
+
const menuRef = useRef22(null);
|
|
16803
16873
|
const shouldShowLabel = useMemo19(() => {
|
|
16804
16874
|
return !!label || !!meta;
|
|
16805
16875
|
}, [label, meta]);
|
|
@@ -17460,7 +17530,7 @@ var Switch = forwardRef40((props, ref) => {
|
|
|
17460
17530
|
});
|
|
17461
17531
|
Switch.displayName = "Switch";
|
|
17462
17532
|
// src/molecules/Waves/Waves.tsx
|
|
17463
|
-
import { useEffect as
|
|
17533
|
+
import { useEffect as useEffect23, useRef as useRef23, useState as useState29 } from "react";
|
|
17464
17534
|
|
|
17465
17535
|
// src/molecules/Waves/Waves.styles.ts
|
|
17466
17536
|
import { motion as motion5 } from "framer-motion";
|
|
@@ -17688,7 +17758,7 @@ var WaveStatic = ({
|
|
|
17688
17758
|
import { useScroll as useScroll2 } from "framer-motion";
|
|
17689
17759
|
import { jsxDEV as jsxDEV124 } from "react/jsx-dev-runtime";
|
|
17690
17760
|
var Waves = ({ gradientColors }) => {
|
|
17691
|
-
const containerRef =
|
|
17761
|
+
const containerRef = useRef23(null);
|
|
17692
17762
|
const [width, setWidth] = useState29(containerRef.current?.clientWidth ?? 0);
|
|
17693
17763
|
const [height, setHeight] = useState29(containerRef.current?.clientHeight ?? 0);
|
|
17694
17764
|
const { scrollY } = useScroll2({
|
|
@@ -17701,7 +17771,7 @@ var Waves = ({ gradientColors }) => {
|
|
|
17701
17771
|
setWidth(containerRef.current.clientWidth);
|
|
17702
17772
|
setHeight(containerRef.current.clientHeight);
|
|
17703
17773
|
};
|
|
17704
|
-
|
|
17774
|
+
useEffect23(() => {
|
|
17705
17775
|
const resizeHandler = () => {
|
|
17706
17776
|
if (!containerRef.current)
|
|
17707
17777
|
return;
|
|
@@ -17795,7 +17865,7 @@ var DataGrid = (props) => {
|
|
|
17795
17865
|
}, undefined, false, undefined, this);
|
|
17796
17866
|
};
|
|
17797
17867
|
// src/organisms/FieldSelector/FieldSelector.tsx
|
|
17798
|
-
import { useRef as
|
|
17868
|
+
import { useRef as useRef24, useState as useState31 } from "react";
|
|
17799
17869
|
|
|
17800
17870
|
// src/atoms/style/darkTokens.ts
|
|
17801
17871
|
import { css as css16 } from "styled-components";
|
|
@@ -18621,7 +18691,7 @@ var FieldSelector = ({
|
|
|
18621
18691
|
itemNameSingular = "field"
|
|
18622
18692
|
}) => {
|
|
18623
18693
|
const [isChangingField, setIsChangingField] = useState31(false);
|
|
18624
|
-
const fieldName =
|
|
18694
|
+
const fieldName = useRef24("");
|
|
18625
18695
|
const handleClick = (field) => {
|
|
18626
18696
|
if (field.name && field.uuid) {
|
|
18627
18697
|
setField({
|
|
@@ -18656,7 +18726,7 @@ var FieldSelector = ({
|
|
|
18656
18726
|
}, undefined, true, undefined, this);
|
|
18657
18727
|
};
|
|
18658
18728
|
// src/organisms/Filter/Filter.tsx
|
|
18659
|
-
import { useRef as
|
|
18729
|
+
import { useRef as useRef26, useState as useState33 } from "react";
|
|
18660
18730
|
import { Button as Button15, Icon as Icon35, Typography as Typography32 } from "@equinor/eds-core-react";
|
|
18661
18731
|
import {
|
|
18662
18732
|
arrow_drop_down as arrow_drop_down2,
|
|
@@ -18791,7 +18861,7 @@ var SearchFieldWrapper = styled55.section`
|
|
|
18791
18861
|
`;
|
|
18792
18862
|
|
|
18793
18863
|
// src/organisms/Filter/AutoCompleteMenu.tsx
|
|
18794
|
-
import { useEffect as
|
|
18864
|
+
import { useEffect as useEffect24, useRef as useRef25, useState as useState32 } from "react";
|
|
18795
18865
|
import { Menu as Menu8, Typography as Typography30 } from "@equinor/eds-core-react";
|
|
18796
18866
|
|
|
18797
18867
|
// src/organisms/Filter/Filter.utils.ts
|
|
@@ -18857,8 +18927,8 @@ function AutoCompleteMenu({
|
|
|
18857
18927
|
onAutoComplete
|
|
18858
18928
|
}) {
|
|
18859
18929
|
const [open, setOpen] = useState32(false);
|
|
18860
|
-
const previousSearch =
|
|
18861
|
-
|
|
18930
|
+
const previousSearch = useRef25("");
|
|
18931
|
+
useEffect24(() => {
|
|
18862
18932
|
if (!open && search !== previousSearch.current) {
|
|
18863
18933
|
previousSearch.current = search;
|
|
18864
18934
|
setOpen(true);
|
|
@@ -18973,11 +19043,11 @@ function Filter2({
|
|
|
18973
19043
|
id,
|
|
18974
19044
|
...rest
|
|
18975
19045
|
}) {
|
|
18976
|
-
const searchRef =
|
|
18977
|
-
const sectionRef =
|
|
19046
|
+
const searchRef = useRef26(null);
|
|
19047
|
+
const sectionRef = useRef26(null);
|
|
18978
19048
|
const [open, setOpen] = useState33(initialOpen);
|
|
18979
19049
|
const [attemptingToRemove, setAttemptingToRemove] = useState33(undefined);
|
|
18980
|
-
const initialHeight =
|
|
19050
|
+
const initialHeight = useRef26(initialOpen ? "auto" : 0);
|
|
18981
19051
|
const handleOnToggleOpen = () => {
|
|
18982
19052
|
setOpen((prev) => !prev);
|
|
18983
19053
|
if (initialHeight.current === "auto") {
|
|
@@ -19139,7 +19209,7 @@ import { Icon as Icon36, Menu as Menu10, Typography as Typography33 } from "@equ
|
|
|
19139
19209
|
import { arrow_drop_down as arrow_drop_down3, arrow_drop_up as arrow_drop_up3 } from "@equinor/eds-icons";
|
|
19140
19210
|
|
|
19141
19211
|
// src/organisms/Filter/ButtonWithMenu.tsx
|
|
19142
|
-
import { useRef as
|
|
19212
|
+
import { useRef as useRef27, useState as useState34 } from "react";
|
|
19143
19213
|
import { Menu as Menu9 } from "@equinor/eds-core-react";
|
|
19144
19214
|
import { jsxDEV as jsxDEV133, Fragment as Fragment17 } from "react/jsx-dev-runtime";
|
|
19145
19215
|
var ButtonWithMenu = ({
|
|
@@ -19148,7 +19218,7 @@ var ButtonWithMenu = ({
|
|
|
19148
19218
|
children
|
|
19149
19219
|
}) => {
|
|
19150
19220
|
const [open, setOpen] = useState34(false);
|
|
19151
|
-
const buttonRef =
|
|
19221
|
+
const buttonRef = useRef27(null);
|
|
19152
19222
|
const handleOnToggleOpen = () => {
|
|
19153
19223
|
setOpen(!open);
|
|
19154
19224
|
onOpenChange?.(!open);
|
|
@@ -19259,18 +19329,18 @@ Filter3.QuickFilter = QuickFilter;
|
|
|
19259
19329
|
Filter3.SortMenu = SortMenu;
|
|
19260
19330
|
// src/organisms/SideBar/MenuItem/BasicMenuItem.tsx
|
|
19261
19331
|
import { useCallback as useCallback7, useMemo as useMemo21 } from "react";
|
|
19332
|
+
import { useLocation as useLocation3 } from "react-router-dom";
|
|
19262
19333
|
import { Icon as Icon38 } from "@equinor/eds-core-react";
|
|
19263
19334
|
import { Feature } from "@equinor/subsurface-app-management";
|
|
19264
|
-
import { useLocation as useLocation3 } from "@tanstack/react-router";
|
|
19265
19335
|
|
|
19266
19336
|
// src/organisms/SideBar/MenuItem/MenuItem.styles.ts
|
|
19337
|
+
import { Link as ReactRouterDomLink } from "react-router-dom";
|
|
19267
19338
|
import { Typography as Typography35 } from "@equinor/eds-core-react";
|
|
19268
|
-
import { Link as TanstackLink } from "@tanstack/react-router";
|
|
19269
19339
|
import styled59 from "styled-components";
|
|
19270
19340
|
var MenuItemWrapper2 = styled59.span`
|
|
19271
19341
|
width: 100%;
|
|
19272
19342
|
`;
|
|
19273
|
-
var Link2 = styled59(
|
|
19343
|
+
var Link2 = styled59(ReactRouterDomLink)`
|
|
19274
19344
|
display: flex;
|
|
19275
19345
|
align-self: stretch;
|
|
19276
19346
|
align-items: center;
|
|
@@ -19416,10 +19486,10 @@ var BasicMenuItem = ({
|
|
|
19416
19486
|
};
|
|
19417
19487
|
|
|
19418
19488
|
// src/organisms/SideBar/MenuItem/CollapsableMenuItem.tsx
|
|
19419
|
-
import { useEffect as
|
|
19489
|
+
import { useEffect as useEffect25, useMemo as useMemo22, useRef as useRef28, useState as useState36 } from "react";
|
|
19490
|
+
import { Link as ReactRouterLink, useLocation as useLocation4 } from "react-router-dom";
|
|
19420
19491
|
import { Icon as Icon39, Menu as Menu12 } from "@equinor/eds-core-react";
|
|
19421
19492
|
import { chevron_down as chevron_down4, chevron_up as chevron_up2 } from "@equinor/eds-icons";
|
|
19422
|
-
import { Link as TanstackLink2, useLocation as useLocation4 } from "@tanstack/react-router";
|
|
19423
19493
|
import styled60, { css as css20 } from "styled-components";
|
|
19424
19494
|
import { jsxDEV as jsxDEV137, Fragment as Fragment18 } from "react/jsx-dev-runtime";
|
|
19425
19495
|
var Parent = styled60.button`
|
|
@@ -19494,10 +19564,10 @@ var CollapsableMenuItem = ({
|
|
|
19494
19564
|
const { isOpen } = useSideBar();
|
|
19495
19565
|
const previousIsOpen = usePrevious(isOpen);
|
|
19496
19566
|
const isActive = items.some((item) => isCurrentUrl({ currentUrl: pathname, link: item.link }));
|
|
19497
|
-
const parentRef =
|
|
19567
|
+
const parentRef = useRef28(null);
|
|
19498
19568
|
const [expanded, setExpanded] = useState36(false);
|
|
19499
19569
|
const handleOnToggleExpanded = () => setExpanded((prev) => !prev);
|
|
19500
|
-
|
|
19570
|
+
useEffect25(() => {
|
|
19501
19571
|
if (previousIsOpen && !isOpen && expanded || previousPathname !== pathname && expanded && !isOpen) {
|
|
19502
19572
|
setExpanded(false);
|
|
19503
19573
|
}
|
|
@@ -19573,7 +19643,7 @@ var CollapsableMenuItem = ({
|
|
|
19573
19643
|
placement: "right-start",
|
|
19574
19644
|
onClose: handleOnToggleExpanded,
|
|
19575
19645
|
children: items.map((item) => /* @__PURE__ */ jsxDEV137(Menu12.Item, {
|
|
19576
|
-
as:
|
|
19646
|
+
as: ReactRouterLink,
|
|
19577
19647
|
active: isCurrentUrl({ currentUrl: pathname, link: item.link }),
|
|
19578
19648
|
style: { width: "256px" },
|
|
19579
19649
|
to: item.link,
|
|
@@ -19835,16 +19905,16 @@ SideBar2.Item = MenuItem4;
|
|
|
19835
19905
|
// src/organisms/TopBar/Account/Account.tsx
|
|
19836
19906
|
import {
|
|
19837
19907
|
useCallback as useCallback8,
|
|
19838
|
-
useEffect as
|
|
19908
|
+
useEffect as useEffect29,
|
|
19839
19909
|
useMemo as useMemo25,
|
|
19840
|
-
useRef as
|
|
19910
|
+
useRef as useRef31,
|
|
19841
19911
|
useState as useState40
|
|
19842
19912
|
} from "react";
|
|
19843
19913
|
import { Icon as Icon48, Typography as Typography47 } from "@equinor/eds-core-react";
|
|
19844
19914
|
import { log_out } from "@equinor/eds-icons";
|
|
19845
19915
|
|
|
19846
19916
|
// src/organisms/TopBar/TopBarMenu.tsx
|
|
19847
|
-
import { forwardRef as forwardRef42, useEffect as
|
|
19917
|
+
import { forwardRef as forwardRef42, useEffect as useEffect26 } from "react";
|
|
19848
19918
|
import { Menu as Menu13 } from "@equinor/eds-core-react";
|
|
19849
19919
|
import styled64 from "styled-components";
|
|
19850
19920
|
import { jsxDEV as jsxDEV142 } from "react/jsx-dev-runtime";
|
|
@@ -19860,7 +19930,7 @@ var MenuWrapper = styled64(Menu13)`
|
|
|
19860
19930
|
`}
|
|
19861
19931
|
`;
|
|
19862
19932
|
var TopBarMenu = forwardRef42(({ open, onClose, children, anchorEl, isNotification, withGap = false }, ref) => {
|
|
19863
|
-
|
|
19933
|
+
useEffect26(() => {
|
|
19864
19934
|
const handleResize = () => {
|
|
19865
19935
|
if (open) {
|
|
19866
19936
|
onClose();
|
|
@@ -20000,11 +20070,11 @@ function useStopImpersonation() {
|
|
|
20000
20070
|
}
|
|
20001
20071
|
|
|
20002
20072
|
// src/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.tsx
|
|
20003
|
-
import { useEffect as
|
|
20073
|
+
import { useEffect as useEffect28, useState as useState39 } from "react";
|
|
20004
20074
|
import { Menu as Menu15, Typography as Typography43 } from "@equinor/eds-core-react";
|
|
20005
20075
|
|
|
20006
20076
|
// src/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.tsx
|
|
20007
|
-
import { useEffect as
|
|
20077
|
+
import { useEffect as useEffect27, useMemo as useMemo24, useRef as useRef29, useState as useState37 } from "react";
|
|
20008
20078
|
import { Button as Button17, DotProgress as DotProgress3, Icon as Icon42, Typography as Typography37 } from "@equinor/eds-core-react";
|
|
20009
20079
|
import { arrow_back } from "@equinor/eds-icons";
|
|
20010
20080
|
|
|
@@ -20092,7 +20162,7 @@ var CreateOrEditUser = ({
|
|
|
20092
20162
|
availableFields,
|
|
20093
20163
|
availableWells
|
|
20094
20164
|
}) => {
|
|
20095
|
-
const initializedEditUser =
|
|
20165
|
+
const initializedEditUser = useRef29(false);
|
|
20096
20166
|
const [roles, setRoles] = useState37([]);
|
|
20097
20167
|
const [firstName, setFirstName] = useState37("");
|
|
20098
20168
|
const [lastName, setLastName] = useState37("");
|
|
@@ -20100,7 +20170,7 @@ var CreateOrEditUser = ({
|
|
|
20100
20170
|
const [field, setField] = useState37(undefined);
|
|
20101
20171
|
const [well, setWell] = useState37(undefined);
|
|
20102
20172
|
const { data, isLoading: isLoadingRoles } = useAllAppRoles();
|
|
20103
|
-
|
|
20173
|
+
useEffect27(() => {
|
|
20104
20174
|
if (editingUser && data && !initializedEditUser.current) {
|
|
20105
20175
|
initializedEditUser.current = true;
|
|
20106
20176
|
setRoles(editingUser.roles.map((role) => {
|
|
@@ -20665,7 +20735,7 @@ var NoUsersText = styled72(Typography41)`
|
|
|
20665
20735
|
`;
|
|
20666
20736
|
|
|
20667
20737
|
// src/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.tsx
|
|
20668
|
-
import { useRef as
|
|
20738
|
+
import { useRef as useRef30, useState as useState38 } from "react";
|
|
20669
20739
|
import { Button as Button19, Icon as Icon45, Menu as Menu14, Typography as Typography42 } from "@equinor/eds-core-react";
|
|
20670
20740
|
import {
|
|
20671
20741
|
account_circle,
|
|
@@ -20771,7 +20841,7 @@ var UserImpersonation = ({
|
|
|
20771
20841
|
onDelete
|
|
20772
20842
|
}) => {
|
|
20773
20843
|
const [open, setOpen] = useState38(false);
|
|
20774
|
-
const buttonRef =
|
|
20844
|
+
const buttonRef = useRef30(null);
|
|
20775
20845
|
const fullName = impersonateUserDtoToFullName({ firstName, lastName });
|
|
20776
20846
|
const activeRoles = useMappedRoles(roles);
|
|
20777
20847
|
const handleOnToggleMenu = () => setOpen((prev) => !prev);
|
|
@@ -20885,7 +20955,7 @@ var ImpersonateMenu = ({
|
|
|
20885
20955
|
const { data: availableUsers } = useGetAllImpersonationUsersForApp();
|
|
20886
20956
|
const { data: activeImpersonationUser } = useActiveImpersonationUser();
|
|
20887
20957
|
const filteredUsers = availableUsers?.filter((user) => impersonateUserDtoToFullName(user).toLowerCase().includes(search.toLowerCase()));
|
|
20888
|
-
|
|
20958
|
+
useEffect28(() => {
|
|
20889
20959
|
if (!open && activeImpersonationUser && selectedUniqueName !== activeImpersonationUser.uniqueName) {
|
|
20890
20960
|
setSelectedUniqueName(activeImpersonationUser.uniqueName);
|
|
20891
20961
|
} else if (!open && !activeImpersonationUser && selectedUniqueName !== "") {
|
|
@@ -21260,7 +21330,7 @@ var Account = ({
|
|
|
21260
21330
|
const { account, roles, logout } = useAuth();
|
|
21261
21331
|
const [isOpen, setIsOpen] = useState40(false);
|
|
21262
21332
|
const [openImpersonate, setOpenImpersonate] = useState40(false);
|
|
21263
|
-
const buttonRef =
|
|
21333
|
+
const buttonRef = useRef31(null);
|
|
21264
21334
|
const { data: canImpersonate = true } = useCanImpersonate();
|
|
21265
21335
|
const { data: activeImpersonationUser } = useActiveImpersonationUser();
|
|
21266
21336
|
const { mutate: endImpersonation } = useStopImpersonation();
|
|
@@ -21277,7 +21347,7 @@ var Account = ({
|
|
|
21277
21347
|
setIsOpen(false);
|
|
21278
21348
|
};
|
|
21279
21349
|
const handleOnCloseImpersonate = () => setOpenImpersonate(false);
|
|
21280
|
-
|
|
21350
|
+
useEffect29(() => {
|
|
21281
21351
|
if (activeImpersonationUser && activeImpersonationUser.appName != null && activeImpersonationUser.appName.toUpperCase() != APPLICATION_NAME.toUpperCase()) {
|
|
21282
21352
|
endImpersonation();
|
|
21283
21353
|
}
|
|
@@ -21358,7 +21428,7 @@ var Account = ({
|
|
|
21358
21428
|
Account.displayName = "TopBar.Account";
|
|
21359
21429
|
|
|
21360
21430
|
// src/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.tsx
|
|
21361
|
-
import { useRef as
|
|
21431
|
+
import { useRef as useRef32, useState as useState41 } from "react";
|
|
21362
21432
|
import { DotProgress as DotProgress7, Icon as Icon50, Typography as Typography50 } from "@equinor/eds-core-react";
|
|
21363
21433
|
import { apps as apps2, exit_to_app as exit_to_app2 } from "@equinor/eds-icons";
|
|
21364
21434
|
import {
|
|
@@ -21367,13 +21437,13 @@ import {
|
|
|
21367
21437
|
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
21368
21438
|
|
|
21369
21439
|
// src/organisms/TopBar/TopBar.styles.ts
|
|
21440
|
+
import { Link as Link3 } from "react-router-dom";
|
|
21370
21441
|
import { Button as Button20 } from "@equinor/eds-core-react";
|
|
21371
21442
|
import {
|
|
21372
21443
|
CircularProgress as EDSCircularProgress2,
|
|
21373
21444
|
TopBar as EDSTopBar,
|
|
21374
21445
|
Typography as Typography48
|
|
21375
21446
|
} from "@equinor/eds-core-react";
|
|
21376
|
-
import { Link as Link3 } from "@tanstack/react-router";
|
|
21377
21447
|
import styled80, { css as css22 } from "styled-components";
|
|
21378
21448
|
var Bar = styled80(EDSTopBar)`
|
|
21379
21449
|
border-bottom: 1px solid ${colors2.ui.background__medium.rgba};
|
|
@@ -21671,7 +21741,7 @@ var ApplicationDrawer = () => {
|
|
|
21671
21741
|
queryKey: [`userApplications`],
|
|
21672
21742
|
queryFn: () => AmplifyApplicationService2.userApplications()
|
|
21673
21743
|
});
|
|
21674
|
-
const buttonRef =
|
|
21744
|
+
const buttonRef = useRef32(null);
|
|
21675
21745
|
const toggleMenu = () => setIsOpen(!isOpen);
|
|
21676
21746
|
const closeMenu = () => {
|
|
21677
21747
|
setIsOpen(false);
|
|
@@ -21822,7 +21892,7 @@ var ApplicationDrawer = () => {
|
|
|
21822
21892
|
};
|
|
21823
21893
|
|
|
21824
21894
|
// src/organisms/TopBar/FieldMenu/FieldMenu.tsx
|
|
21825
|
-
import { forwardRef as forwardRef44, useMemo as useMemo26, useRef as
|
|
21895
|
+
import { forwardRef as forwardRef44, useMemo as useMemo26, useRef as useRef33, useState as useState42 } from "react";
|
|
21826
21896
|
import { Icon as Icon51, Search as Search3, Typography as Typography52 } from "@equinor/eds-core-react";
|
|
21827
21897
|
import {
|
|
21828
21898
|
arrow_drop_down as arrow_drop_down4,
|
|
@@ -21933,8 +22003,8 @@ var FieldMenu = forwardRef44(({
|
|
|
21933
22003
|
showAccessITLink = true
|
|
21934
22004
|
}, ref) => {
|
|
21935
22005
|
const [isOpen, setIsOpen] = useState42(false);
|
|
21936
|
-
const menuRef =
|
|
21937
|
-
const buttonRef =
|
|
22006
|
+
const menuRef = useRef33(null);
|
|
22007
|
+
const buttonRef = useRef33(null);
|
|
21938
22008
|
const [searchValue, setSearchValue] = useState42("");
|
|
21939
22009
|
const closeMenu = () => setIsOpen(false);
|
|
21940
22010
|
const toggleMenu = () => setIsOpen(!isOpen);
|
|
@@ -22087,7 +22157,7 @@ var FieldMenu = forwardRef44(({
|
|
|
22087
22157
|
FieldMenu.displayName = "FieldSelector";
|
|
22088
22158
|
|
|
22089
22159
|
// src/organisms/TopBar/Notifications/NotificationsInner.tsx
|
|
22090
|
-
import { useMemo as useMemo28, useRef as
|
|
22160
|
+
import { useMemo as useMemo28, useRef as useRef35, useState as useState44 } from "react";
|
|
22091
22161
|
import { Icon as Icon54 } from "@equinor/eds-core-react";
|
|
22092
22162
|
import { notifications as notificationIcon } from "@equinor/eds-icons";
|
|
22093
22163
|
|
|
@@ -22711,7 +22781,7 @@ var NotificationTemplate = (props) => {
|
|
|
22711
22781
|
};
|
|
22712
22782
|
|
|
22713
22783
|
// src/organisms/TopBar/Notifications/FilterOptions.tsx
|
|
22714
|
-
import { useRef as
|
|
22784
|
+
import { useRef as useRef34, useState as useState43 } from "react";
|
|
22715
22785
|
import { Icon as Icon53, Menu as Menu16, Typography as Typography63 } from "@equinor/eds-core-react";
|
|
22716
22786
|
import {
|
|
22717
22787
|
checkbox as checkbox4,
|
|
@@ -22770,8 +22840,8 @@ var FilterOptions = ({
|
|
|
22770
22840
|
}) => {
|
|
22771
22841
|
const [openFilter, setOpenFilter] = useState43(false);
|
|
22772
22842
|
const [openSort, setOpenSort] = useState43(false);
|
|
22773
|
-
const filterRef =
|
|
22774
|
-
const sortRef =
|
|
22843
|
+
const filterRef = useRef34(null);
|
|
22844
|
+
const sortRef = useRef34(null);
|
|
22775
22845
|
const [selectedSort, setSelectedSort] = useState43({
|
|
22776
22846
|
["unread" /* UNREAD */]: false,
|
|
22777
22847
|
["oldtonew" /* OLD_NEWEST */]: false,
|
|
@@ -22975,9 +23045,9 @@ var NotificationsInner = ({
|
|
|
22975
23045
|
showFilterOptions = false,
|
|
22976
23046
|
notifications
|
|
22977
23047
|
}) => {
|
|
22978
|
-
const buttonRef =
|
|
22979
|
-
const filterMenuRef =
|
|
22980
|
-
const sortMenuRef =
|
|
23048
|
+
const buttonRef = useRef35(null);
|
|
23049
|
+
const filterMenuRef = useRef35(null);
|
|
23050
|
+
const sortMenuRef = useRef35(null);
|
|
22981
23051
|
const { isOpen, setIsOpen } = useNotification();
|
|
22982
23052
|
const [filteringOn, setFilteringOn] = useState44([]);
|
|
22983
23053
|
const [sortingOn, setSortingOn] = useState44([]);
|
|
@@ -23083,7 +23153,7 @@ var Notifications = (props) => {
|
|
|
23083
23153
|
// src/organisms/TopBar/Resources/Resources.tsx
|
|
23084
23154
|
import {
|
|
23085
23155
|
useMemo as useMemo36,
|
|
23086
|
-
useRef as
|
|
23156
|
+
useRef as useRef38,
|
|
23087
23157
|
useState as useState51
|
|
23088
23158
|
} from "react";
|
|
23089
23159
|
import { Button as Button27, Dialog as Dialog5, Divider as Divider5, Icon as Icon62 } from "@equinor/eds-core-react";
|
|
@@ -23099,7 +23169,7 @@ import {
|
|
|
23099
23169
|
import {
|
|
23100
23170
|
createContext as createContext10,
|
|
23101
23171
|
useCallback as useCallback9,
|
|
23102
|
-
useEffect as
|
|
23172
|
+
useEffect as useEffect30,
|
|
23103
23173
|
useMemo as useMemo29,
|
|
23104
23174
|
useState as useState45
|
|
23105
23175
|
} from "react";
|
|
@@ -23516,7 +23586,7 @@ var FeedbackContextProvider = ({
|
|
|
23516
23586
|
setSlackRequestResponse({ status: "idle" /* idle */ });
|
|
23517
23587
|
setSlackAttachmentRequestResponse([]);
|
|
23518
23588
|
}, [setFeedbackLocalStorage]);
|
|
23519
|
-
|
|
23589
|
+
useEffect30(() => {
|
|
23520
23590
|
return () => {
|
|
23521
23591
|
if (serviceNowRequestResponse.status === "success" /* success */ && allSlackRequestStatus === "success" /* success */) {
|
|
23522
23592
|
setTimeout(() => {
|
|
@@ -23529,19 +23599,19 @@ var FeedbackContextProvider = ({
|
|
|
23529
23599
|
serviceNowRequestResponse.status,
|
|
23530
23600
|
setFeedbackLocalStorage
|
|
23531
23601
|
]);
|
|
23532
|
-
|
|
23602
|
+
useEffect30(() => {
|
|
23533
23603
|
if (slackAttachmentsRequestResponse.length !== feedbackAttachments.length) {
|
|
23534
23604
|
setSlackAttachmentRequestResponse(feedbackAttachments.map((attachment) => {
|
|
23535
23605
|
return { status: "idle" /* idle */, fileName: attachment.name };
|
|
23536
23606
|
}));
|
|
23537
23607
|
}
|
|
23538
23608
|
}, [feedbackAttachments, slackAttachmentsRequestResponse.length]);
|
|
23539
|
-
|
|
23609
|
+
useEffect30(() => {
|
|
23540
23610
|
if (serviceNowRequestResponse.serviceNowId && serviceNowRequestResponse.serviceNowId.length !== 0) {
|
|
23541
23611
|
setServiceNowUrl(createServiceNowUrl(serviceNowRequestResponse.serviceNowId, true));
|
|
23542
23612
|
}
|
|
23543
23613
|
}, [serviceNowRequestResponse.serviceNowId]);
|
|
23544
|
-
|
|
23614
|
+
useEffect30(() => {
|
|
23545
23615
|
if (selectedType === "suggestion" /* SUGGESTION */ && allSlackRequestStatus === "success" /* success */) {
|
|
23546
23616
|
setRelevantRequestsHaveBeenSuccess(true);
|
|
23547
23617
|
} else if (serviceNowRequestResponse.status === "success" /* success */ && allSlackRequestStatus === "success" /* success */) {
|
|
@@ -23597,7 +23667,7 @@ function useFeedbackContext() {
|
|
|
23597
23667
|
import { useState as useState47 } from "react";
|
|
23598
23668
|
|
|
23599
23669
|
// src/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.tsx
|
|
23600
|
-
import { useEffect as
|
|
23670
|
+
import { useEffect as useEffect31, useMemo as useMemo30, useState as useState46 } from "react";
|
|
23601
23671
|
import { Icon as Icon55 } from "@equinor/eds-core-react";
|
|
23602
23672
|
import { clear as clear4, error_outlined as error_outlined5 } from "@equinor/eds-icons";
|
|
23603
23673
|
|
|
@@ -23737,7 +23807,7 @@ ${message}`;
|
|
|
23737
23807
|
}
|
|
23738
23808
|
return "Error";
|
|
23739
23809
|
}, [error, props]);
|
|
23740
|
-
|
|
23810
|
+
useEffect31(() => {
|
|
23741
23811
|
const getSrc = async (file) => {
|
|
23742
23812
|
const src2 = await readUploadedFileAsText2(file);
|
|
23743
23813
|
setSrc(src2);
|
|
@@ -24208,11 +24278,11 @@ var FeedbackForm = () => {
|
|
|
24208
24278
|
};
|
|
24209
24279
|
|
|
24210
24280
|
// src/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.tsx
|
|
24211
|
-
import { useEffect as
|
|
24281
|
+
import { useEffect as useEffect33, useState as useState49 } from "react";
|
|
24212
24282
|
import { Button as Button25 } from "@equinor/eds-core-react";
|
|
24213
24283
|
|
|
24214
24284
|
// src/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.tsx
|
|
24215
|
-
import { useEffect as
|
|
24285
|
+
import { useEffect as useEffect32, useRef as useRef36, useState as useState48 } from "react";
|
|
24216
24286
|
import { motion as motion8 } from "framer-motion";
|
|
24217
24287
|
import styled105 from "styled-components";
|
|
24218
24288
|
import { jsxDEV as jsxDEV182 } from "react/jsx-dev-runtime";
|
|
@@ -24226,9 +24296,9 @@ var AnimationWrapper = styled105(motion8.div)`
|
|
|
24226
24296
|
var AnimateChangeInHeight = ({
|
|
24227
24297
|
children
|
|
24228
24298
|
}) => {
|
|
24229
|
-
const containerRef =
|
|
24299
|
+
const containerRef = useRef36(null);
|
|
24230
24300
|
const [height, setHeight] = useState48("auto");
|
|
24231
|
-
|
|
24301
|
+
useEffect32(() => {
|
|
24232
24302
|
if (containerRef.current) {
|
|
24233
24303
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
24234
24304
|
const observedHeight = entries[0].contentRect.height;
|
|
@@ -24448,7 +24518,7 @@ var ResponsePage = () => {
|
|
|
24448
24518
|
requestHasError,
|
|
24449
24519
|
relevantRequestsHaveBeenSuccess
|
|
24450
24520
|
} = useFeedbackContext();
|
|
24451
|
-
|
|
24521
|
+
useEffect33(() => {
|
|
24452
24522
|
if (!showSuccessPage && relevantRequestsHaveBeenSuccess) {
|
|
24453
24523
|
setTimeout(() => {
|
|
24454
24524
|
setShowSuccessPage(true);
|
|
@@ -24652,7 +24722,7 @@ var AllReleaseNotesWrapper = styled113.div`
|
|
|
24652
24722
|
`;
|
|
24653
24723
|
|
|
24654
24724
|
// src/organisms/ReleaseNote/ReleaseNote.tsx
|
|
24655
|
-
import { forwardRef as forwardRef46, useRef as
|
|
24725
|
+
import { forwardRef as forwardRef46, useRef as useRef37, useState as useState50 } from "react";
|
|
24656
24726
|
import { Typography as Typography73 } from "@equinor/eds-core-react";
|
|
24657
24727
|
import {
|
|
24658
24728
|
ReleaseNotesService
|
|
@@ -24793,10 +24863,10 @@ var ReleaseNote3 = forwardRef46(({
|
|
|
24793
24863
|
expanded = false
|
|
24794
24864
|
}, ref) => {
|
|
24795
24865
|
const usingDate = usingReleaseNoteDate({ releaseDate, createdDate });
|
|
24796
|
-
const initialHeight =
|
|
24866
|
+
const initialHeight = useRef37(expanded ? "auto" : RELEASE_NOTE_RICH_TEXT_COLLAPSED_HEIGHT);
|
|
24797
24867
|
const [isExpanded, setIsExpanded] = useState50(expanded);
|
|
24798
24868
|
const [needsShowMore, setNeedsShowMore] = useState50(getImagesFromRichText(body).length > 0);
|
|
24799
|
-
const resizeObserver =
|
|
24869
|
+
const resizeObserver = useRef37(new ResizeObserver((entries) => {
|
|
24800
24870
|
if (entries.at(0) && entries[0].target.scrollHeight > RELEASE_NOTE_RICH_TEXT_COLLAPSED_HEIGHT) {
|
|
24801
24871
|
setNeedsShowMore(true);
|
|
24802
24872
|
}
|
|
@@ -24943,7 +25013,7 @@ var Resources = ({
|
|
|
24943
25013
|
const [showFeedbackDialog, setShowFeedbackDialog] = useState51(false);
|
|
24944
25014
|
const [openPortal, setOpenPortal] = useState51(false);
|
|
24945
25015
|
const [showingResourceSection, setShowingResourceSection] = useState51(undefined);
|
|
24946
|
-
const buttonRef =
|
|
25016
|
+
const buttonRef = useRef38(null);
|
|
24947
25017
|
const [feedbackType, setFeedbackType] = useState51(undefined);
|
|
24948
25018
|
const closeMenu = () => {
|
|
24949
25019
|
setShowingResourceSection(undefined);
|
|
@@ -25081,7 +25151,7 @@ var Resources = ({
|
|
|
25081
25151
|
};
|
|
25082
25152
|
|
|
25083
25153
|
// src/organisms/TopBar/Tutorials/Tutorials.tsx
|
|
25084
|
-
import { useRef as
|
|
25154
|
+
import { useRef as useRef39, useState as useState52 } from "react";
|
|
25085
25155
|
import { Divider as Divider6, Icon as Icon64, Typography as Typography75 } from "@equinor/eds-core-react";
|
|
25086
25156
|
import { youtube_alt } from "@equinor/eds-icons";
|
|
25087
25157
|
import {
|
|
@@ -25189,7 +25259,7 @@ var Tutorials = ({
|
|
|
25189
25259
|
}) => {
|
|
25190
25260
|
const { allTutorials, tutorialsOnThisPage } = useTutorials5();
|
|
25191
25261
|
const [open, setOpen] = useState52(false);
|
|
25192
|
-
const buttonRef =
|
|
25262
|
+
const buttonRef = useRef39(null);
|
|
25193
25263
|
const filteredAllTutorials = filterTutorials ? allTutorials.filter(filterTutorials) : allTutorials;
|
|
25194
25264
|
const filteredTutorialsOnThisPage = filterTutorials ? tutorialsOnThisPage.filter(filterTutorials) : tutorialsOnThisPage;
|
|
25195
25265
|
const tutorialsOnOtherPages = filteredAllTutorials.filter((tutorial) => filteredTutorialsOnThisPage.findIndex((t) => t.id === tutorial.id) === -1);
|
|
@@ -25281,7 +25351,7 @@ var Colorbox = styled121.div`
|
|
|
25281
25351
|
`;
|
|
25282
25352
|
|
|
25283
25353
|
// src/organisms/TopBar/Guidelines/Guidelines.tsx
|
|
25284
|
-
import { isValidElement as isValidElement2, useRef as
|
|
25354
|
+
import { isValidElement as isValidElement2, useRef as useRef40, useState as useState53 } from "react";
|
|
25285
25355
|
import { Icon as Icon65 } from "@equinor/eds-core-react";
|
|
25286
25356
|
import { info_circle as info_circle9 } from "@equinor/eds-icons";
|
|
25287
25357
|
|
|
@@ -25345,7 +25415,7 @@ var Section5 = ({ title, children }) => /* @__PURE__ */ jsxDEV201(Container63, {
|
|
|
25345
25415
|
import { jsxDEV as jsxDEV202, Fragment as Fragment31 } from "react/jsx-dev-runtime";
|
|
25346
25416
|
var Guidelines = ({ sections }) => {
|
|
25347
25417
|
const [isOpen, setIsOpen] = useState53(false);
|
|
25348
|
-
const buttonRef =
|
|
25418
|
+
const buttonRef = useRef40(null);
|
|
25349
25419
|
const handleButtonClick = () => {
|
|
25350
25420
|
if (isOpen) {
|
|
25351
25421
|
setIsOpen(false);
|
|
@@ -25410,7 +25480,7 @@ var Guidelines2 = Guidelines;
|
|
|
25410
25480
|
Guidelines2.Colorbox = Colorbox;
|
|
25411
25481
|
|
|
25412
25482
|
// src/organisms/TopBar/Settings.tsx
|
|
25413
|
-
import { useContext as useContext11, useMemo as useMemo37, useRef as
|
|
25483
|
+
import { useContext as useContext11, useMemo as useMemo37, useRef as useRef41, useState as useState54 } from "react";
|
|
25414
25484
|
import { Icon as Icon66, Radio as Radio2, Typography as Typography78 } from "@equinor/eds-core-react";
|
|
25415
25485
|
import { settings } from "@equinor/eds-icons";
|
|
25416
25486
|
import styled124 from "styled-components";
|
|
@@ -25443,7 +25513,7 @@ var SettingsItems = styled124.div`
|
|
|
25443
25513
|
}
|
|
25444
25514
|
`;
|
|
25445
25515
|
var Settings = ({ allSettings, children }) => {
|
|
25446
|
-
const buttonRef =
|
|
25516
|
+
const buttonRef = useRef41(null);
|
|
25447
25517
|
const [isOpen, setIsOpen] = useState54(false);
|
|
25448
25518
|
const themeContext = useContext11(ThemeProviderContext);
|
|
25449
25519
|
const closeMenu = () => setIsOpen(false);
|
|
@@ -25613,12 +25683,12 @@ TopBar2.Resources = Resources;
|
|
|
25613
25683
|
TopBar2.ApplicationDrawer = ApplicationDrawer;
|
|
25614
25684
|
TopBar2.Tutorials = Tutorials;
|
|
25615
25685
|
// src/organisms/Status/collections/BadRequest.tsx
|
|
25616
|
-
import {
|
|
25686
|
+
import { useNavigate as useNavigate3 } from "react-router";
|
|
25617
25687
|
import { jsxDEV as jsxDEV205 } from "react/jsx-dev-runtime";
|
|
25618
25688
|
var BadRequest = () => {
|
|
25619
|
-
const
|
|
25689
|
+
const navigate = useNavigate3();
|
|
25620
25690
|
const handleOnClick = () => {
|
|
25621
|
-
|
|
25691
|
+
navigate(-1);
|
|
25622
25692
|
};
|
|
25623
25693
|
return /* @__PURE__ */ jsxDEV205(Status2, {
|
|
25624
25694
|
color: "#AB9067",
|
|
@@ -25638,12 +25708,12 @@ var BadRequest = () => {
|
|
|
25638
25708
|
}, undefined, true, undefined, this);
|
|
25639
25709
|
};
|
|
25640
25710
|
// src/organisms/Status/collections/GenericError.tsx
|
|
25641
|
-
import {
|
|
25711
|
+
import { useNavigate as useNavigate4 } from "react-router";
|
|
25642
25712
|
import { jsxDEV as jsxDEV206 } from "react/jsx-dev-runtime";
|
|
25643
25713
|
var GenericError = () => {
|
|
25644
|
-
const
|
|
25714
|
+
const navigate = useNavigate4();
|
|
25645
25715
|
const handleOnClick = () => {
|
|
25646
|
-
|
|
25716
|
+
navigate(-1);
|
|
25647
25717
|
};
|
|
25648
25718
|
return /* @__PURE__ */ jsxDEV206(Status2, {
|
|
25649
25719
|
children: [
|
|
@@ -25656,12 +25726,12 @@ var GenericError = () => {
|
|
|
25656
25726
|
}, undefined, true, undefined, this);
|
|
25657
25727
|
};
|
|
25658
25728
|
// src/organisms/Status/collections/MissingPermissions.tsx
|
|
25659
|
-
import {
|
|
25729
|
+
import { useNavigate as useNavigate5 } from "react-router";
|
|
25660
25730
|
import { jsxDEV as jsxDEV207 } from "react/jsx-dev-runtime";
|
|
25661
25731
|
var MissingPermissions = () => {
|
|
25662
|
-
const
|
|
25732
|
+
const navigate = useNavigate5();
|
|
25663
25733
|
const handleOnClick = () => {
|
|
25664
|
-
|
|
25734
|
+
navigate(-1);
|
|
25665
25735
|
};
|
|
25666
25736
|
return /* @__PURE__ */ jsxDEV207(Status2, {
|
|
25667
25737
|
children: [
|
|
@@ -25675,12 +25745,12 @@ var MissingPermissions = () => {
|
|
|
25675
25745
|
}, undefined, true, undefined, this);
|
|
25676
25746
|
};
|
|
25677
25747
|
// src/organisms/Status/collections/PageNotFound.tsx
|
|
25678
|
-
import {
|
|
25748
|
+
import { useNavigate as useNavigate6 } from "react-router";
|
|
25679
25749
|
import { jsxDEV as jsxDEV208 } from "react/jsx-dev-runtime";
|
|
25680
25750
|
var PageNotFound = () => {
|
|
25681
|
-
const
|
|
25751
|
+
const navigate = useNavigate6();
|
|
25682
25752
|
const handleOnClick = () => {
|
|
25683
|
-
|
|
25753
|
+
navigate(-1);
|
|
25684
25754
|
};
|
|
25685
25755
|
return /* @__PURE__ */ jsxDEV208(Status2, {
|
|
25686
25756
|
center: false,
|
|
@@ -25699,12 +25769,12 @@ var PageNotFound = () => {
|
|
|
25699
25769
|
}, undefined, true, undefined, this);
|
|
25700
25770
|
};
|
|
25701
25771
|
// src/organisms/Status/collections/ServerError.tsx
|
|
25702
|
-
import {
|
|
25772
|
+
import { useNavigate as useNavigate7 } from "react-router";
|
|
25703
25773
|
import { jsxDEV as jsxDEV209 } from "react/jsx-dev-runtime";
|
|
25704
25774
|
var ServerError = () => {
|
|
25705
|
-
const
|
|
25775
|
+
const navigate = useNavigate7();
|
|
25706
25776
|
const handleOnClick = () => {
|
|
25707
|
-
|
|
25777
|
+
navigate(-1);
|
|
25708
25778
|
};
|
|
25709
25779
|
return /* @__PURE__ */ jsxDEV209(Status2, {
|
|
25710
25780
|
color: "#C47E84",
|
|
@@ -25750,7 +25820,7 @@ var ApiResponseError = ({ statusCode }) => {
|
|
|
25750
25820
|
import { useMemo as useMemo39 } from "react";
|
|
25751
25821
|
|
|
25752
25822
|
// src/organisms/TableOfContents/TableOfContents.styles.ts
|
|
25753
|
-
import { Link as
|
|
25823
|
+
import { Link as ReactLink } from "react-router-dom";
|
|
25754
25824
|
|
|
25755
25825
|
// src/organisms/TableOfContents/TableOfContents.constants.ts
|
|
25756
25826
|
var HEIGHT = {
|
|
@@ -25832,7 +25902,7 @@ var Button28 = styled125.button`
|
|
|
25832
25902
|
}
|
|
25833
25903
|
`}
|
|
25834
25904
|
`;
|
|
25835
|
-
var Link4 = styled125(
|
|
25905
|
+
var Link4 = styled125(ReactLink)`
|
|
25836
25906
|
text-decoration: none;
|
|
25837
25907
|
&:focus,
|
|
25838
25908
|
&:hover,
|
|
@@ -26003,7 +26073,7 @@ var ChildContainer = styled125(motion11.div)`
|
|
|
26003
26073
|
`;
|
|
26004
26074
|
|
|
26005
26075
|
// src/organisms/TableOfContents/TableOfContentsItem.tsx
|
|
26006
|
-
import { useEffect as
|
|
26076
|
+
import { useEffect as useEffect34, useMemo as useMemo38, useRef as useRef42 } from "react";
|
|
26007
26077
|
import { jsxDEV as jsxDEV211 } from "react/jsx-dev-runtime";
|
|
26008
26078
|
var TableOfContentsItem = ({
|
|
26009
26079
|
label,
|
|
@@ -26016,8 +26086,8 @@ var TableOfContentsItem = ({
|
|
|
26016
26086
|
isLink = false
|
|
26017
26087
|
}) => {
|
|
26018
26088
|
const { isActive, selected, setSelected } = useTableOfContents();
|
|
26019
|
-
const initialHeight =
|
|
26020
|
-
|
|
26089
|
+
const initialHeight = useRef42(undefined);
|
|
26090
|
+
useEffect34(() => {
|
|
26021
26091
|
if (initialHeight.current === undefined) {
|
|
26022
26092
|
initialHeight.current = 0;
|
|
26023
26093
|
}
|
|
@@ -26160,10 +26230,10 @@ var TableOfContents = ({
|
|
|
26160
26230
|
}, undefined, false, undefined, this);
|
|
26161
26231
|
};
|
|
26162
26232
|
// src/organisms/PageTitle/PageTitle.tsx
|
|
26163
|
-
import { useEffect as
|
|
26233
|
+
import { useEffect as useEffect35 } from "react";
|
|
26164
26234
|
var APP_NAME = environment.getAppName(import.meta.env.VITE_NAME);
|
|
26165
26235
|
var PageTitle = ({ title, children }) => {
|
|
26166
|
-
|
|
26236
|
+
useEffect35(() => {
|
|
26167
26237
|
if (document.title !== title) {
|
|
26168
26238
|
document.title = `${APP_NAME} - ${title}`;
|
|
26169
26239
|
}
|
|
@@ -26325,7 +26395,7 @@ ToggleGroup.displayName = "ToggleGroup";
|
|
|
26325
26395
|
var ToggleGroup2 = ToggleGroup;
|
|
26326
26396
|
ToggleGroup2.Option = ToggleGroupOption;
|
|
26327
26397
|
// src/organisms/Faq/Faq.tsx
|
|
26328
|
-
import { useMemo as useMemo42
|
|
26398
|
+
import { useMemo as useMemo42 } from "react";
|
|
26329
26399
|
import { Typography as Typography83 } from "@equinor/eds-core-react";
|
|
26330
26400
|
|
|
26331
26401
|
// src/organisms/Faq/Faq.styles.ts
|
|
@@ -26340,7 +26410,7 @@ var Container64 = styled128.div`
|
|
|
26340
26410
|
`;
|
|
26341
26411
|
|
|
26342
26412
|
// src/organisms/Faq/Header.tsx
|
|
26343
|
-
import { useMemo as useMemo40
|
|
26413
|
+
import { useMemo as useMemo40 } from "react";
|
|
26344
26414
|
import { Search as Search4 } from "@equinor/eds-core-react";
|
|
26345
26415
|
import styled129 from "styled-components";
|
|
26346
26416
|
import { jsxDEV as jsxDEV215 } from "react/jsx-dev-runtime";
|
|
@@ -26360,8 +26430,12 @@ var Container65 = styled129.div`
|
|
|
26360
26430
|
`;
|
|
26361
26431
|
var Header5 = () => {
|
|
26362
26432
|
const { data } = useFaqsInApplication();
|
|
26363
|
-
const [selectedTab, setSelectedTab] =
|
|
26364
|
-
|
|
26433
|
+
const [selectedTab, setSelectedTab] = useSearchParameter({
|
|
26434
|
+
key: "category"
|
|
26435
|
+
});
|
|
26436
|
+
const [search, setSearch] = useSearchParameter({
|
|
26437
|
+
key: "search"
|
|
26438
|
+
});
|
|
26365
26439
|
const tabOptions = useMemo40(() => {
|
|
26366
26440
|
if (!data)
|
|
26367
26441
|
return [
|
|
@@ -26409,11 +26483,11 @@ var Header5 = () => {
|
|
|
26409
26483
|
};
|
|
26410
26484
|
|
|
26411
26485
|
// src/organisms/Faq/Category/Category.tsx
|
|
26412
|
-
import { useMemo as useMemo41
|
|
26486
|
+
import { useMemo as useMemo41 } from "react";
|
|
26413
26487
|
import { Typography as Typography82 } from "@equinor/eds-core-react";
|
|
26414
26488
|
|
|
26415
26489
|
// src/organisms/Faq/Category/Question.tsx
|
|
26416
|
-
import { useState as
|
|
26490
|
+
import { useState as useState55 } from "react";
|
|
26417
26491
|
import { Icon as Icon68, Typography as Typography81 } from "@equinor/eds-core-react";
|
|
26418
26492
|
import { chevron_down as chevron_down5, chevron_up as chevron_up3 } from "@equinor/eds-icons";
|
|
26419
26493
|
import { FaqService as FaqService2 } from "@equinor/subsurface-app-management";
|
|
@@ -26443,7 +26517,7 @@ var Container66 = styled130.div`
|
|
|
26443
26517
|
}
|
|
26444
26518
|
`;
|
|
26445
26519
|
var Question = ({ question, answer, createdDate }) => {
|
|
26446
|
-
const [open, setOpen] =
|
|
26520
|
+
const [open, setOpen] = useState55(false);
|
|
26447
26521
|
const handleOnToggleOpen = () => setOpen((prev) => !prev);
|
|
26448
26522
|
return /* @__PURE__ */ jsxDEV216(Container66, {
|
|
26449
26523
|
onClick: handleOnToggleOpen,
|
|
@@ -26491,8 +26565,12 @@ var Container67 = styled131.div`
|
|
|
26491
26565
|
}
|
|
26492
26566
|
`;
|
|
26493
26567
|
var Category = ({ categoryName, faqs }) => {
|
|
26494
|
-
const [search] =
|
|
26495
|
-
|
|
26568
|
+
const [search] = useSearchParameter({
|
|
26569
|
+
key: "search"
|
|
26570
|
+
});
|
|
26571
|
+
const [selectedTab] = useSearchParameter({
|
|
26572
|
+
key: "category"
|
|
26573
|
+
});
|
|
26496
26574
|
const sortedFaqs = useMemo41(() => {
|
|
26497
26575
|
return faqs.toSorted((a, b) => {
|
|
26498
26576
|
const usingA = a.orderBy ?? 0;
|
|
@@ -26599,7 +26677,9 @@ var CategorySkeleton = () => /* @__PURE__ */ jsxDEV218(Container68, {
|
|
|
26599
26677
|
import { jsxDEV as jsxDEV219, Fragment as Fragment33 } from "react/jsx-dev-runtime";
|
|
26600
26678
|
var Faq2 = () => {
|
|
26601
26679
|
const { data, isLoading } = useFaqsInApplication();
|
|
26602
|
-
const [selectedTab] =
|
|
26680
|
+
const [selectedTab] = useSearchParameter({
|
|
26681
|
+
key: "category"
|
|
26682
|
+
});
|
|
26603
26683
|
const filteredCategories = useMemo42(() => {
|
|
26604
26684
|
if (!data)
|
|
26605
26685
|
return;
|
|
@@ -26758,11 +26838,11 @@ var ExpandingIconButton = forwardRef51(({ text, icon, onClick, className, iconPo
|
|
|
26758
26838
|
});
|
|
26759
26839
|
ExpandingIconButton.displayName = "ExpandingIconButton";
|
|
26760
26840
|
// src/deprecated/IconToggleButton.tsx
|
|
26761
|
-
import { forwardRef as forwardRef52, useState as
|
|
26841
|
+
import { forwardRef as forwardRef52, useState as useState56 } from "react";
|
|
26762
26842
|
import { Button as Button30, Icon as Icon71 } from "@equinor/eds-core-react";
|
|
26763
26843
|
import { jsxDEV as jsxDEV221 } from "react/jsx-dev-runtime";
|
|
26764
26844
|
var IconToggleButton = forwardRef52(({ initialState = false, toggleOn, toggleOff, onClick }, ref) => {
|
|
26765
|
-
const [toggle, setToggle] =
|
|
26845
|
+
const [toggle, setToggle] = useState56(initialState);
|
|
26766
26846
|
const handleToggleOff = () => {
|
|
26767
26847
|
setToggle(false);
|
|
26768
26848
|
onClick?.(toggle);
|
|
@@ -26805,7 +26885,7 @@ var IconToggleButton_default = IconToggleButton;
|
|
|
26805
26885
|
import { useMemo as useMemo45 } from "react";
|
|
26806
26886
|
|
|
26807
26887
|
// src/deprecated/OldStepper/OldStep.tsx
|
|
26808
|
-
import { useMemo as useMemo43, useState as
|
|
26888
|
+
import { useMemo as useMemo43, useState as useState57 } from "react";
|
|
26809
26889
|
import { Icon as Icon72, Typography as Typography85 } from "@equinor/eds-core-react";
|
|
26810
26890
|
import { check as check5 } from "@equinor/eds-icons";
|
|
26811
26891
|
import styled134 from "styled-components";
|
|
@@ -26848,7 +26928,7 @@ var OldStep = ({
|
|
|
26848
26928
|
onlyShowCurrentStepLabel = false,
|
|
26849
26929
|
children
|
|
26850
26930
|
}) => {
|
|
26851
|
-
const [containerRef, setContainerRef] =
|
|
26931
|
+
const [containerRef, setContainerRef] = useState57(null);
|
|
26852
26932
|
const StepIcon2 = useMemo43(() => {
|
|
26853
26933
|
if (index >= currentIndex) {
|
|
26854
26934
|
return /* @__PURE__ */ jsxDEV222(IconWrapper3, {
|
|
@@ -26983,6 +27063,7 @@ export {
|
|
|
26983
27063
|
useSnackbar,
|
|
26984
27064
|
useSideBar,
|
|
26985
27065
|
useSelect,
|
|
27066
|
+
useSearchParameter,
|
|
26986
27067
|
useReleaseNotes,
|
|
26987
27068
|
usePrevious,
|
|
26988
27069
|
usePrefetchRichTextImages,
|