@equinor/amplify-component-lib 9.14.0 → 9.14.1-beta.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/atoms/hooks/index.d.ts +0 -1
- package/dist/atoms/hooks/useAmplifyKit.js +1 -1
- package/dist/atoms/hooks/useDebounce.js +1 -1
- package/dist/atoms/hooks/useFakeProgress.js +1 -1
- package/dist/atoms/hooks/useFaqsInApplication.js +1 -1
- package/dist/atoms/hooks/useLocalStorage.js +1 -1
- package/dist/atoms/hooks/useOnScreenMultiple.js +1 -1
- package/dist/atoms/hooks/usePrefetchRichTextImages.js +1 -1
- package/dist/atoms/hooks/usePrevious.js +1 -1
- package/dist/atoms/hooks/useSelect.js +1 -1
- package/dist/atoms/index.js +1 -1
- package/dist/atoms/utils/auth_environment.js +1 -1
- package/dist/atoms/utils/export.js +1 -1
- package/dist/atoms/utils/richtext.js +1 -1
- package/dist/atoms/utils/string.js +1 -1
- package/dist/atoms/utils/tutorials.js +1 -1
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.js +1 -1
- package/dist/deprecated/IconToggleButton.js +1 -1
- package/dist/deprecated/OldStepper/OldStep.js +1 -1
- package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
- package/dist/deprecated/OldStepper/OldStepper.js +1 -1
- package/dist/index.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIcon.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconBase.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Acquire.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Adca.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Bravos.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Dasha.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Fallback.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/FourDInsight.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/InPress.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/JsEmbark.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/LoggingQualification.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Orca.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Premo.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Pwex.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Recap.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/Sam.js +1 -1
- package/dist/molecules/ApplicationIcon/Icons/SubsurfacePortal.js +1 -1
- package/dist/molecules/Badge/Badge.js +1 -1
- package/dist/molecules/Button/Button.js +1 -1
- package/dist/molecules/Chip/Chip.js +1 -1
- package/dist/molecules/Chip/InteractiveChip.js +1 -1
- package/dist/molecules/Chip/ReadOnlyChip.js +1 -1
- package/dist/molecules/ContentMenu/ContentMenu.js +1 -1
- package/dist/molecules/DatePicker/DatePicker.js +1 -1
- package/dist/molecules/DateRangePicker/DateRangePicker.js +1 -1
- package/dist/molecules/Dialog/Dialog.js +1 -1
- package/dist/molecules/Dialog/DialogAction.js +1 -1
- package/dist/molecules/EquinorLogo/EquinorLogo.js +1 -1
- package/dist/molecules/FeedBackIcon/FeedBackIcon.js +1 -1
- package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
- package/dist/molecules/FileProgress/CompactFileProgress.styles.d.ts +2 -2
- package/dist/molecules/FileProgress/FileProgress.js +1 -1
- package/dist/molecules/FileProgress/FileProgress.utils.js +1 -1
- package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
- package/dist/molecules/FileUploadArea/FileUploadArea.js +1 -1
- package/dist/molecules/FullPageSpinner/FullPageSpinner.js +1 -1
- package/dist/molecules/InfoElement/CopyText.js +1 -1
- package/dist/molecules/InfoElement/InfoElement.js +1 -1
- package/dist/molecules/ListItem/ListItem.js +3 -3
- package/dist/molecules/ListItem/ListItem.utils.js +1 -1
- package/dist/molecules/OptionDrawer/OptionDrawer.js +1 -1
- package/dist/molecules/OptionDrawer/OptionDrawer.utils.js +1 -1
- package/dist/molecules/OptionalTooltip/OptionalTooltip.js +1 -1
- package/dist/molecules/ProfileAvatar/ProfileAvatar.js +1 -1
- package/dist/molecules/RichTextDisplay/RichTextDisplay.js +1 -1
- package/dist/molecules/RichTextEditor/EditorProvider.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/MenuButton.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/TextLinks.js +1 -1
- package/dist/molecules/RichTextEditor/RichTextEditor.styles.d.ts +1 -1
- package/dist/molecules/RichTextEditor/custom-extensions/AmplifyKit.js +1 -1
- package/dist/molecules/RichTextEditor/custom-extensions/ExtendedHeaders.js +1 -1
- package/dist/molecules/RichTextEditor/custom-extensions/ExtendedImage.js +1 -1
- package/dist/molecules/RichTextEditor/index.d.ts +1 -1
- package/dist/molecules/Search/Search.js +1 -1
- package/dist/molecules/Select/GroupedSelectMenu.js +1 -1
- package/dist/molecules/Select/ListSelectMenu.js +1 -1
- package/dist/molecules/Select/Select.js +1 -1
- package/dist/molecules/Select/Select.styles.d.ts +5 -5
- package/dist/molecules/Select/Select.utils.js +1 -1
- package/dist/molecules/Select/SelectMenuItem.js +1 -1
- package/dist/molecules/Select/SelectMenuItem.utils.js +1 -1
- package/dist/molecules/SelectionControls/Checkbox/Checkbox.js +1 -1
- package/dist/molecules/SelectionControls/Radio/Radio.js +1 -1
- package/dist/molecules/SelectionControls/Switch/Switch.js +1 -1
- package/dist/molecules/Sieve/Filter.js +1 -1
- package/dist/molecules/Sieve/Sieve.js +1 -1
- package/dist/molecules/Sieve/Sieve.types.d.ts +0 -2
- package/dist/molecules/Sieve/Sort.js +1 -1
- package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +1 -1
- package/dist/molecules/Stepper/Step/Step.js +1 -1
- package/dist/molecules/Stepper/StepLine.js +1 -1
- package/dist/molecules/Stepper/Stepper.js +1 -1
- package/dist/molecules/Stepper/SubTitle/SubStepIndicator.js +1 -1
- package/dist/molecules/Stepper/SubTitle/SubTitle.js +3 -3
- package/dist/molecules/Tabs/Tabs.js +1 -1
- package/dist/molecules/Waves/Waves.js +1 -1
- package/dist/node_modules/@equinor/eds-utils/dist/esm/hooks/useOutsideClick.js +1 -1
- package/dist/node_modules/lodash/lodash.js +1 -1
- package/dist/node_modules/prosemirror-model/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-state/dist/index.js +1 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js +1 -1
- package/dist/organisms/Faq/Category/Category.js +3 -3
- package/dist/organisms/Faq/Category/Question.js +2 -2
- package/dist/organisms/Faq/CategorySkeleton.js +1 -1
- package/dist/organisms/Faq/Faq.js +1 -1
- package/dist/organisms/Faq/Header.js +2 -2
- package/dist/organisms/FieldSelector/ChangingField.js +7 -7
- package/dist/organisms/FieldSelector/SelectorCard/SelectorCard.js +2 -2
- package/dist/organisms/Filter/AutoCompleteMenu.js +2 -2
- package/dist/organisms/Filter/AutoCompleteText.d.ts +1 -1
- package/dist/organisms/Filter/AutoCompleteText.js +1 -1
- package/dist/organisms/Filter/Filter.js +1 -1
- package/dist/organisms/Filter/Filter.styles.js +4 -4
- package/dist/organisms/Filter/Filter.utils.js +1 -1
- package/dist/organisms/Filter/QuickFilter.js +1 -1
- package/dist/organisms/Filter/SortMenu.js +2 -2
- package/dist/organisms/PageTitle/PageTitle.js +1 -1
- package/dist/organisms/ReleaseNote/MetaTags.js +1 -1
- package/dist/organisms/ReleaseNote/ReleaseNote.js +2 -2
- package/dist/organisms/ReleaseNote/ToggleExpanded.js +6 -6
- package/dist/organisms/SideBar/CreateItem.styles.js +1 -1
- package/dist/organisms/SideBar/MenuItem/BasicMenuItem.js +1 -1
- package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +4 -4
- package/dist/organisms/SideBar/MenuItem/MenuItem.styles.d.ts +295 -2
- package/dist/organisms/SideBar/MenuItem/MenuItem.styles.js +10 -10
- package/dist/organisms/SideBar/SideBar.js +1 -1
- package/dist/organisms/Status/Action.js +1 -1
- package/dist/organisms/Status/Description.js +1 -1
- package/dist/organisms/Status/Illustration.constants.js +1 -1
- package/dist/organisms/Status/Illustration.js +1 -1
- package/dist/organisms/Status/MissingAccesses.js +1 -1
- package/dist/organisms/Status/Title.js +1 -1
- package/dist/organisms/Status/collections/BadRequest.js +1 -1
- package/dist/organisms/Status/collections/GenericError.js +1 -1
- package/dist/organisms/Status/collections/MissingAccessToApp.js +1 -1
- package/dist/organisms/Status/collections/MissingPermissions.js +1 -1
- package/dist/organisms/Status/collections/PageNotFound.js +1 -1
- package/dist/organisms/Status/collections/ServerError.js +1 -1
- package/dist/organisms/TableOfContents/TableOfContents.js +1 -1
- package/dist/organisms/TableOfContents/TableOfContents.styles.d.ts +294 -1
- package/dist/organisms/TableOfContents/TableOfContents.styles.js +2 -2
- package/dist/organisms/TableOfContents/TableOfContentsItem.js +1 -1
- package/dist/organisms/ToggleGroup/ToggleGroup.js +2 -2
- package/dist/organisms/ToggleGroup/ToggleGroupOption.js +1 -1
- package/dist/organisms/TopBar/Account/Account.js +1 -1
- package/dist/organisms/TopBar/Account/AccountAvatar.js +1 -1
- package/dist/organisms/TopBar/Account/AccountButton.js +2 -2
- package/dist/organisms/TopBar/Account/ActiveUserImpersonationButton.js +2 -2
- package/dist/organisms/TopBar/Account/ImpersonateAvatar.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateButton.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/CreateOrEditUser/CreateOrEditUser.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/DeleteUser/DeleteUser.styles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.constants.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/Impersonate.styles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/ImpersonateMenu.styles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/UserImpersonation.styles.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useCreateImpersonation.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useDeleteImpersonation.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useEditImpersonation.js +1 -1
- package/dist/organisms/TopBar/Account/ImpersonateMenu/hooks/useMappedRoles.js +1 -1
- package/dist/organisms/TopBar/Actions.js +1 -1
- package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.js +1 -1
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.styles.d.ts +1 -1
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.styles.js +1 -1
- package/dist/organisms/TopBar/Guidelines/Guidelines.js +1 -1
- package/dist/organisms/TopBar/Guidelines/Item.js +1 -1
- package/dist/organisms/TopBar/Guidelines/Section.js +1 -1
- package/dist/organisms/TopBar/Notifications/FilterOptions.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsInner.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/DefaultNotification.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/NoNotifications.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationTemplate.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.styles.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Description.js +2 -2
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/FeedbackForm.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/LockedInputTooltip.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/Severity.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/ImageFile.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/FullSlackResponse.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/RequestStatus.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.styles.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/providers/FeedbackContextProvider.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesDialog.utils.js +1 -1
- package/dist/organisms/TopBar/Resources/ResourceMenuItem.js +1 -1
- package/dist/organisms/TopBar/Resources/Resources.js +1 -1
- package/dist/organisms/TopBar/Settings.js +1 -1
- package/dist/organisms/TopBar/TopBar.js +1 -1
- package/dist/organisms/TopBar/TopBar.styles.d.ts +295 -2
- package/dist/organisms/TopBar/TopBar.styles.js +6 -6
- package/dist/organisms/TopBar/TopBarMenu.js +1 -1
- package/dist/organisms/TopBar/TransferToAppDialog.js +1 -1
- package/dist/organisms/TopBar/Tutorials/Tutorials.js +1 -1
- package/dist/providers/AuthProvider/AuthProvider.js +1 -1
- package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
- package/dist/providers/LoadingProvider.js +1 -1
- package/dist/providers/ReleaseNotesProvider.js +1 -1
- package/dist/providers/ReleaseNotesProvider.utils.js +1 -1
- package/dist/providers/SnackbarProvider/SnackbarProvider.js +1 -1
- package/dist/providers/StepperProvider.js +1 -1
- package/dist/providers/TableOfContentsProvider.js +1 -1
- package/dist/providers/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProvider.d.ts +2 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProvider.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.d.ts +2 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +2 -2
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/StepIndicator.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/TutorialPopover.d.ts +2 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/TutorialPopover.js +2 -2
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/hooks/useTutorialPopoverPosition.d.ts +3 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialPopover/hooks/useTutorialPopoverPosition.js +1 -1
- package/dist/providers/TutorialHighlightingProvider/hooks/useReversedScrollY.d.ts +2 -1
- package/dist/providers/TutorialHighlightingProvider/hooks/useReversedScrollY.js +1 -1
- package/package.json +5 -9
- package/dist/atoms/hooks/useSearchParameter.d.ts +0 -5
- package/dist/atoms/hooks/useSearchParameter.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as t,Fragment as i,jsx as e}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{jsxs as t,Fragment as i,jsx as e}from"react/jsx-runtime";import{useState as n,useEffect as r}from"react";import{useTutorials as o}from"@equinor/subsurface-app-management";import{useIsFetching as s}from"@tanstack/react-query";import{useReversedScrollY as h}from"./hooks/useReversedScrollY.js";import{TutorialPopover as l}from"./TutorialPopover/TutorialPopover.js";import{TUTORIAL_HIGHLIGHT_ANIMATION_PROPS as a}from"./TutorialHighlightingProvider.constants.js";import"../../atoms/style/colors.js";import{spacings as d}from"../../atoms/style/spacings.js";import{getHighlightElementBoundingBox as m}from"../../atoms/utils/tutorials.js";import{motion as c}from"framer-motion";import p from"styled-components";const g=p.svg`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -21,4 +21,4 @@ import{jsxs as t,Fragment as i,jsx as e}from"react/jsx-runtime";import{useState
|
|
|
21
21
|
height: 100vh;
|
|
22
22
|
background: none;
|
|
23
23
|
pointer-events: none;
|
|
24
|
-
`,u=({children:d})=>{const{activeTutorial:
|
|
24
|
+
`,u=({children:d,contentRef:p})=>{const{activeTutorial:u,activeStep:w,unseenTutorialsOnThisPage:v}=o(),$=s()>0,y=h(p),[j,k]=n({width:window.innerWidth,height:window.innerHeight});r(()=>{const t=()=>{k({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]);const[x,E]=n([]);r(()=>{if($)return;(async()=>{if(u&&void 0!==w){if(!u.steps[w].highlightElement)return E([]);const t=await m(u.id,w,j);return E(t?[t]:[])}const t=await Promise.all(v.map(t=>{if(t.steps.at(0)?.highlightElement)return m(t.id,0,j)}));E(t.filter(t=>void 0!==t))})()},[w,u,$,v,j]);const T=u?[u]:v.filter(t=>t.steps[0].highlightElement&&x.some(t=>t.id)||!t.steps[0].highlightElement);return T.length>0?t(i,{children:[d,e(f,{children:T.map(t=>{const i=x.find(i=>i.id===t.id);return e(l,{isHighlighting:x.length>0,contentRef:p,...t,...i},t.id)})}),t(g,{children:[t("mask",{id:"tutorials-rectangles",children:[e("rect",{width:"100%",height:"100%",fill:"white"}),e(c.g,{style:{translateY:y},children:x.map(t=>e(c.path,{"data-testid":`tutorial-mask-${t.id}`,initial:{opacity:0,d:`M ${t.left} ${t.top} h ${t.width} v ${t.height} h -${t.width} Z`},animate:{opacity:1,d:`M ${t.left} ${t.top} h ${t.width} v ${t.height} h -${t.width} Z`},fill:"black"},t.id))})]}),e(c.rect,{width:"100%",height:"100%",fill:"rgba(111, 111, 111, 0.35)",mask:"url(#tutorials-rectangles)",...a})]})]}):e(i,{children:d})};export{u as TutorialHighlightingProviderInner};
|
|
@@ -17,4 +17,4 @@ import{jsx as t}from"react/jsx-runtime";import{useTutorials as e}from"@equinor/s
|
|
|
17
17
|
transition: left ${n.transitionMS};
|
|
18
18
|
left: calc(${({$index:t,$activeIndex:e})=>100*(e-t)}%);
|
|
19
19
|
}
|
|
20
|
-
`,p=({stepAmount:r})=>{const{activeStep:i}=e();return t(s,{style:{gridTemplateColumns:`repeat(${r}, 1fr)`},children:Array.from({length:r}).map((
|
|
20
|
+
`,p=({stepAmount:r})=>{const{activeStep:i}=e();return t(s,{style:{gridTemplateColumns:`repeat(${r}, 1fr)`},children:Array.from({length:r}).map((e,r)=>t(m,{$index:r,$activeIndex:i},r))})};export{p as StepIndicator};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, RefObject } from 'react';
|
|
2
2
|
import { MyTutorialDto } from '@equinor/subsurface-app-management';
|
|
3
3
|
interface TutorialPopoverProps extends MyTutorialDto {
|
|
4
|
+
contentRef: RefObject<HTMLElement | null>;
|
|
4
5
|
isHighlighting: boolean;
|
|
5
6
|
top?: number;
|
|
6
7
|
left?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as t,jsx as r,Fragment as
|
|
1
|
+
import{jsxs as t,jsx as r,Fragment as e}from"react/jsx-runtime";import{useState as i}from"react";import{Card as o,Icon as n,Typography as a,Button as s}from"@equinor/eds-core-react";import{info_circle as l}from"@equinor/eds-icons";import{useTutorials as c,useTutorialStepImage as d}from"@equinor/subsurface-app-management";import{useTutorialHighlighting as m}from"../TutorialHighlightingProvider.js";import{TUTORIAL_HIGHLIGHT_ANIMATION_PROPS as h}from"../TutorialHighlightingProvider.constants.js";import{useTutorialPopoverPosition as g}from"./hooks/useTutorialPopoverPosition.js";import{StepIndicator as p}from"./StepIndicator.js";import{elevation as u}from"../../../atoms/style/index.js";import{motion as f}from"framer-motion";import v,{css as b}from"styled-components";import{spacings as x}from"../../../atoms/style/spacings.js";import{colors as $}from"../../../atoms/style/colors.js";const y=v(f(o))`
|
|
2
2
|
width: 360px;
|
|
3
3
|
padding: ${x.medium};
|
|
4
4
|
background: ${$.ui.background__tutorial_card.rgba};
|
|
@@ -72,4 +72,4 @@ import{jsxs as t,jsx as r,Fragment as i}from"react/jsx-runtime";import{useState
|
|
|
72
72
|
margin-right: auto;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`,_=({
|
|
75
|
+
`,_=({contentRef:o,isHighlighting:u,id:f,top:v,left:b,width:x,height:_,name:j,steps:w})=>{const{customStepContent:P}=m(),{activeTutorial:T,activeStep:C,skipTutorial:S,startTutorial:E,goToNextStep:H,goToPreviousStep:q}=c(),{data:I}=d(T?.steps.at(C)?.imgUrl??void 0),[z,D]=i(void 0),{style:N,highlightingElement:R,caretPosition:A}=g({contentRef:o,top:v,left:b,width:x,height:_,popoverSize:z}),B=t=>{D(t?{width:t.clientWidth,height:t.clientHeight}:void 0)},F=()=>{S(f)},U=()=>{E(f)};if(void 0!==C&&w[C].custom&&!P[w[C].id])throw new Error(`[TutorialHighlightingProvider]: Custom step content not found, tutorial ID: ${f}, step ID: ${w[C].id}`);return!R&&u?null:t(y,T&&void 0!==C?{ref:B,style:{...N,width:w[C].custom?"auto":void 0},$caretPosition:A,$highlightingElement:R,...h,children:[w[C].custom?P[w[C].id]:t(e,{children:[t("header",{children:[r(n,{data:l,color:$.interactive.primary__resting.rgba}),r(a,{variant:"h6",children:w[C]?.title})]}),r(a,{variant:"body_short",children:w[C]?.body}),I?r("img",{src:I,alt:w[C].title}):null]}),t(k,{children:[r(s,{variant:"outlined",disabled:0===C,onClick:q,children:"Back"}),r(s,{variant:"ghost",onClick:F,children:"Cancel"}),r(s,{onClick:H,children:C===w.length-1?"Finish":"Next"})]}),r(p,{stepAmount:w.length})]}:{ref:B,style:{...N},$highlightingElement:R,$caretPosition:A,...h,children:[t("header",{children:[r(n,{data:l,color:$.interactive.primary__resting.rgba}),r(a,{variant:"h6",children:j})]}),t(k,{children:[r(s,{variant:"ghost",onClick:F,children:"Skip"}),r(s,{onClick:U,children:"Start tour"})]})]})};export{_ as TutorialPopover};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
1
2
|
import { MotionStyle } from 'framer-motion';
|
|
2
3
|
export declare const CARET_OFFSET = 16;
|
|
3
4
|
interface UseTutorialPopoverPositionArgs {
|
|
5
|
+
contentRef: RefObject<HTMLElement | null>;
|
|
4
6
|
top?: number;
|
|
5
7
|
left?: number;
|
|
6
8
|
width?: number;
|
|
@@ -17,5 +19,5 @@ export interface UseTutorialPopoverPositionReturn {
|
|
|
17
19
|
highlightingElement: boolean;
|
|
18
20
|
caretPosition: VerticalPosition | HorizontalPosition | `${VerticalPosition}-${HorizontalPosition}`;
|
|
19
21
|
}
|
|
20
|
-
export declare function useTutorialPopoverPosition({ top, left, width, height, popoverSize, }: UseTutorialPopoverPositionArgs): UseTutorialPopoverPositionReturn;
|
|
22
|
+
export declare function useTutorialPopoverPosition({ top, left, width, height, popoverSize, contentRef, }: UseTutorialPopoverPositionArgs): UseTutorialPopoverPositionReturn;
|
|
21
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useReversedScrollY as i}from"../../hooks/useReversedScrollY.js";import{useTransform as o}from"framer-motion";const t=16;function d({top:d,left:e,width:
|
|
1
|
+
import{useReversedScrollY as i}from"../../hooks/useReversedScrollY.js";import{useTransform as o}from"framer-motion";const t=16;function d({top:d,left:e,width:n,height:h,popoverSize:v,contentRef:r}){const w=i(r);let l=d&&h?d+h+t:void 0,s=e&&n?e+n/2:void 0;const g=!!l&&!!s;let c="top";const f=(v?.width??0)/2+t,p=window.innerWidth-t,m=window.innerHeight-t,u=void 0!==d&&void 0!==h&&void 0!==e&&void 0!==n&&void 0!==s&&void 0!==v&&s<v.width/2,b=void 0!==d&&void 0!==h&&void 0!==e&&void 0!==n&&void 0!==s&&void 0!==v&&s+v.width>window.innerWidth;u?(s=e+n+v.width/2+t,l=d-v.height/2-4,c="left"):b&&(s=e-v.width/2-t,l=d-v.height/2-4,c="right");const a=void 0!==d&&void 0!==h&&void 0!==l&&void 0!==v&&d+h/2+v.height>=window.innerHeight,H=void 0!==d&&void 0!==h&&void 0!==l&&void 0!==v&&l<v.height;H?l=d+h+t:a&&(l=d-v.height-h-32),u&&(H||a)?s=e+v?.width/2:b&&(H||a)&&(s=e+n-v?.width/2),H&&u?c="top-left":H&&b&&(c="top-right"),a&&u?c="bottom-left":a&&b?c="bottom-right":a&&(c="bottom");const R=o(w,i=>{if(!g||!l)return null;const o=i+l;return o<32?32:o>m?m:o});return s&&s<f?s=f:s&&s>p&&(s=p),{style:{position:g?"absolute":void 0,top:R,left:s},highlightingElement:g,caretPosition:c}}export{t as CARET_OFFSET,d as useTutorialPopoverPosition};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export declare function useReversedScrollY(contentRef: RefObject<HTMLElement | null>): import("motion-dom").MotionValue<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useScroll as
|
|
1
|
+
import{useScroll as o,useTransform as r}from"framer-motion";function n(n){const{scrollY:t}=o({container:n});return r(t,o=>o>0?-1*o:0)}export{n as useReversedScrollY};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/amplify-component-lib",
|
|
3
|
-
"version": "9.14.
|
|
3
|
+
"version": "9.14.1-beta.1",
|
|
4
4
|
"description": "Frontend Typescript components for the Amplify team",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@equinor/eds-icons": "^0.22.0",
|
|
96
|
-
"@equinor/subsurface-app-management": "
|
|
96
|
+
"@equinor/subsurface-app-management": "4.4.2-beta.0",
|
|
97
97
|
"@eslint/js": "^9.22.0",
|
|
98
98
|
"@faker-js/faker": "^9.6.0",
|
|
99
99
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
@@ -124,7 +124,6 @@
|
|
|
124
124
|
"@types/random-seed": "^0.3.5",
|
|
125
125
|
"@types/react": "^19.0.10",
|
|
126
126
|
"@types/react-dom": "^19.0.4",
|
|
127
|
-
"@types/react-router-dom": "^5.3.3",
|
|
128
127
|
"@types/styled-components": "^5.1.34",
|
|
129
128
|
"@types/uuid": "^10.0.0",
|
|
130
129
|
"@types/wicg-file-system-access": "^2023.10.5",
|
|
@@ -145,8 +144,6 @@
|
|
|
145
144
|
"prettier": "^3.5.3",
|
|
146
145
|
"react": "^19.0.0",
|
|
147
146
|
"react-dom": "^19.0.0",
|
|
148
|
-
"react-router": "^6.28.0",
|
|
149
|
-
"react-router-dom": "^6.28.0",
|
|
150
147
|
"resize-observer-polyfill": "^1.5.1",
|
|
151
148
|
"resolve-tspaths": "^0.8.23",
|
|
152
149
|
"rollup": "^4.35.0",
|
|
@@ -168,12 +165,11 @@
|
|
|
168
165
|
},
|
|
169
166
|
"peerDependencies": {
|
|
170
167
|
"@equinor/eds-icons": "*",
|
|
171
|
-
"@equinor/subsurface-app-management": "
|
|
168
|
+
"@equinor/subsurface-app-management": "4.4.2-beta.0",
|
|
172
169
|
"@tanstack/react-query": "*",
|
|
170
|
+
"@tanstack/react-router": "*",
|
|
173
171
|
"react": "^19.0.0",
|
|
174
|
-
"react-dom": "^19.0.0"
|
|
175
|
-
"react-router": "^6.28.0",
|
|
176
|
-
"react-router-dom": "^6.28.0"
|
|
172
|
+
"react-dom": "^19.0.0"
|
|
177
173
|
},
|
|
178
174
|
"msw": {
|
|
179
175
|
"workerDirectory": [
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRef as r}from"react";import{useSearchParams as t}from"react-router-dom";function e({key:e,initialValue:n,parser:o}){const[i,c]=t(),s=r(!1),a=i.get(e)??void 0,u=o&&a?o(a):a,f=s.current||void 0!==u?u:n,l=r=>{if(s.current||(s.current=!0),r instanceof Function){const t=r(f);l(t)}else{const t=new URLSearchParams(i),n="string"==typeof r?r:JSON.stringify(r);void 0===n||""===n||"null"===n||"[]"===n||"{}"===n?t.delete(e):t.set(e,n),c(t)}};return[f,l]}export{e as useSearchParameter};
|