@equinor/amplify-component-lib 13.2.5-beta.0 → 13.2.5
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/useLocalStorage.d.ts +2 -2
- package/dist/atoms/hooks/useLocalStorage.js +1 -1
- package/dist/atoms/hooks/useSelect.d.ts +3 -3
- package/dist/atoms/index.d.ts +1 -1
- package/dist/atoms/index.js +1 -1
- package/dist/atoms/style/index.d.ts +1 -1
- package/dist/atoms/style/index.js +1 -1
- package/dist/atoms/utils/auth_environment.d.ts +0 -1
- package/dist/atoms/utils/auth_environment.js +1 -1
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.d.ts +1 -1
- package/dist/deprecated/IconToggleButton.d.ts +1 -1
- package/dist/deprecated/OldStepper/OldStepLine.js +1 -1
- package/dist/deprecated/OldStepper/OldStepper.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/molecules/AnimatedCheckmark/AnimatedCheckmark.d.ts +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIcon.d.ts +1 -1
- package/dist/molecules/Badge/Badge.d.ts +1 -1
- package/dist/molecules/Button/Button.js +1 -1
- package/dist/molecules/Button/IconButton/IconButton.js +1 -1
- package/dist/molecules/Chip/Chip.d.ts +3 -3
- package/dist/molecules/Chip/Chip.styles.js +1 -1
- package/dist/molecules/Confetti/Confetti.types.d.ts +1 -1
- package/dist/molecules/Confetti/utils/seasonalColors.js +1 -1
- package/dist/molecules/DateRangePicker/DateRangePicker.d.ts +3 -3
- package/dist/molecules/EquinorLogo/EquinorLogo.d.ts +2 -2
- package/dist/molecules/FileProgress/CompactFileProgress.js +1 -1
- package/dist/molecules/FileProgress/FileProgress.types.d.ts +1 -1
- package/dist/molecules/IconCell/IconCell.d.ts +1 -1
- package/dist/molecules/IconCell/IconCell.styles.js +3 -3
- package/dist/molecules/IconCell/IconCell.utils.js +1 -1
- package/dist/molecules/OptionDrawer/OptionDrawer.d.ts +1 -1
- package/dist/molecules/ProfileAvatar/ProfileAvatar.d.ts +2 -2
- package/dist/molecules/ProfileAvatar/ProfileAvatar.js +1 -1
- package/dist/molecules/RichTextEditor/custom-extensions/AmplifyKit.js +1 -1
- package/dist/molecules/RichTextEditor/index.d.ts +6 -6
- package/dist/molecules/RichTextEditor/index.js +1 -1
- package/dist/molecules/Select/ComboBox/ComboBox.d.ts +2 -2
- package/dist/molecules/Select/PersistentComboBox/PersistentComboBox.d.ts +2 -2
- package/dist/molecules/Select/Select.styles.d.ts +5 -5
- package/dist/molecules/Select/Select.styles.js +1 -1
- package/dist/molecules/Select/Select.types.d.ts +1 -1
- package/dist/molecules/Select/SelectMenuItem.utils.js +1 -1
- package/dist/molecules/Select/SingleSelect/SingleSelect.d.ts +2 -2
- package/dist/molecules/SelectionControls/Radio/Radio.d.ts +2 -2
- package/dist/molecules/SelectionControls/Switch/Switch.d.ts +2 -2
- 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/Waves/Waves.d.ts +1 -1
- package/dist/molecules/index.d.ts +1 -1
- package/dist/molecules/index.js +1 -1
- package/dist/organisms/Faq/Faq.d.ts +1 -1
- package/dist/organisms/Faq/Faq.utils.js +1 -1
- package/dist/organisms/FieldSelector/ChangingField.js +1 -1
- package/dist/organisms/Filter/AutoCompleteText.js +1 -1
- package/dist/organisms/Filter/Filter.d.ts +2 -2
- package/dist/organisms/Filter/Filter.types.d.ts +1 -1
- package/dist/organisms/Filter/QuickFilter.d.ts +2 -2
- package/dist/organisms/Filter/SortMenu.d.ts +2 -2
- package/dist/organisms/ReleaseNote/ReleaseNote.d.ts +3 -3
- package/dist/organisms/SideBar/MenuItem/CollapsableMenuItem.js +4 -1
- package/dist/organisms/SideBar/MenuItem/MenuItem.d.ts +1 -1
- package/dist/organisms/SideBar/SideBar.d.ts +2 -2
- package/dist/organisms/SideBar/index.d.ts +1 -1
- package/dist/organisms/Status/Action.d.ts +2 -2
- package/dist/organisms/Status/Description.d.ts +2 -2
- package/dist/organisms/Status/MissingAccesses.d.ts +2 -2
- package/dist/organisms/Status/Title.d.ts +2 -2
- package/dist/organisms/Status/collections/BadRequest.d.ts +2 -2
- package/dist/organisms/Status/collections/GenericError.d.ts +2 -2
- package/dist/organisms/Status/collections/MissingPermissions.d.ts +2 -2
- package/dist/organisms/Status/collections/PageNotFound.d.ts +2 -2
- package/dist/organisms/Status/collections/ServerError.d.ts +2 -2
- package/dist/organisms/Status/index.d.ts +1 -1
- package/dist/organisms/Template/Template.d.ts +3 -3
- package/dist/organisms/ToggleGroup/ToggleGroupOption.js +1 -1
- package/dist/organisms/TopBar/Account/Account.d.ts +1 -1
- package/dist/organisms/TopBar/Account/AccountButton.js +1 -1
- package/dist/organisms/TopBar/Actions.d.ts +2 -2
- package/dist/organisms/TopBar/FieldMenu/FieldMenu.d.ts +3 -3
- package/dist/organisms/TopBar/Guidelines/Guidelines.d.ts +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationProvider.d.ts +2 -2
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/Notifications.types.d.ts +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/Feedback.utils.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/LockedInputTooltip.js +2 -2
- 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/ResponsePage/ResponsePage.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponseStatus.js +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/Success.js +1 -1
- package/dist/organisms/TopBar/Resources/Resources.d.ts +1 -1
- package/dist/organisms/TopBar/Tutorials/TutorialItem.js +1 -1
- package/dist/organisms/TopBar/index.d.ts +1 -1
- package/dist/organisms/index.d.ts +1 -1
- package/dist/organisms/index.js +1 -1
- package/dist/providers/AuthProvider/AuthProvider.d.ts +3 -15
- 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/SnackbarProvider/SnackbarProvider.d.ts +1 -1
- package/dist/providers/StepperProvider.d.ts +1 -1
- package/dist/providers/StepperProvider.js +1 -1
- package/dist/providers/TableOfContentsProvider.d.ts +1 -1
- package/dist/providers/TutorialHighlightingProvider/TutorialHighlightingProviderInner.js +1 -1
- package/package.json +1 -1
|
@@ -52,4 +52,4 @@ import { Radio as Radio$1, RadioProps as RadioProps$1 } from "./SelectionControl
|
|
|
52
52
|
import { Switch as Switch$1, SwitchProps as SwitchProps$1 } from "./SelectionControls/Switch/Switch.js";
|
|
53
53
|
import { Waves } from "./Waves/Waves.js";
|
|
54
54
|
import { Accordion, AccordionHeaderActionsProps, AccordionHeaderProps, AccordionHeaderTitleProps, AccordionItemProps, AccordionPanelProps, AccordionProps, BreadcrumbProps, Breadcrumbs, BreadcrumbsProps, CircularProgress as CircularProgress$1, CircularProgressProps, Dialog as EDSDialog, DialogProps as EDSDialogProps, Divider as Divider$1, DividerProps, DotProgress as DotProgress$1, DotProgressProps, Icon as Icon$1, IconProps as IconProps$1, LinearProgress as LinearProgress$1, LinearProgressProps, Menu as Menu$1, MenuProps, SearchProps as SearchProps$1, Typography as Typography$1, TypographyProps } from "@equinor/eds-core-react";
|
|
55
|
-
export { Accordion, type AccordionHeaderActionsProps, type AccordionHeaderProps, type AccordionHeaderTitleProps, type AccordionItemProps, type AccordionPanelProps, type AccordionProps,
|
|
55
|
+
export { Accordion, type AccordionHeaderActionsProps, type AccordionHeaderProps, type AccordionHeaderTitleProps, type AccordionItemProps, type AccordionPanelProps, type AccordionProps, type BreadcrumbProps, Breadcrumbs, type BreadcrumbsProps, CircularProgress$1 as CircularProgress, type CircularProgressProps, Divider$1 as Divider, type DividerProps, DotProgress$1 as DotProgress, type DotProgressProps, EDSDialog, type EDSDialogProps, Icon$1 as Icon, type IconProps$1 as IconProps, LinearProgress$1 as LinearProgress, type LinearProgressProps, Menu$1 as Menu, type MenuProps, type SearchProps$1 as SearchProps, Typography$1 as Typography, type TypographyProps };
|
package/dist/molecules/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"./FullPageSpinner/FullPageSpinner.js";import"./RichTextEditor/RichTextEditor.types.js";import"./RichTextEditor/custom-extensions/AmplifyKit.js";import"./AnimatedCheckmark/AnimatedCheckmark.js";import"./ApplicationIcon/ApplicationIcon.js";import"./Badge/Badge.js";import"./Banner/Banner.js";import"./Button/Button.js";import"./Button/IconButton/IconButton.js";import"./Chip/Chip.js";import"./Confetti/Confetti.js";import"./Skeleton/SkeletonBase/SkeletonBase.js";import"./DatePicker/DatePicker.js";import"./DateRangePicker/DateRangePicker.js";import"./OptionalTooltip/OptionalTooltip.js";import"./Dialog/Dialog.js";import"./EquinorLogo/EquinorLogo.js";import"./FileProgress/FileProgress.js";import"./FileUploadArea/FileUploadArea.js";import"./IconCell/IconCell.types.js";import"./IconCell/IconCell.js";import"./InfoElement/InfoElement.js";import"./InformationalNotice/InformationalNotice.js";import"./ProfileAvatar/ProfileAvatar.js";import"./RichTextDisplay/RichTextDisplay.js";import"./RichTextEditor/MenuBar/Table/TableBar.js";import"./TextField/TextField.js";import"./RichTextEditor/MenuBar/MenuBar.js";import"./RichTextEditor/RichTextEditor.js";import"./RichTextEditor/index.js";import"./Tabs/Tabs.js";import"./Search/Search.js";import"./Skeleton/SkeletonGradient/SkeletonGradient.js";import"./Stepper/Stepper.js";import"./OptionDrawer/OptionDrawer.js";import"./Select/Select.styles.js";import"./Select/ComboBox/ComboBox.js";import"./Select/PersistentComboBox/PersistentComboBox.js";import"./Select/SingleSelect/SingleSelect.js";import"./Tag/Tag.js";import"./TableHeader/TableHeader.js";import"./FeedBackIcon/FeedBackIcon.js";import"./ListItem/ListItem.js";import"./SelectionControls/Checkbox/Checkbox.js";import"./SelectionControls/Radio/Radio.js";import"./SelectionControls/Switch/Switch.js";import"./Waves/Waves.js";import"./Toast/Toast.js";import{Accordion as e,Breadcrumbs as t,CircularProgress as n,Dialog as r,Divider as i,DotProgress as a,Icon as o,LinearProgress as s,Menu as c,Typography as l}from"@equinor/eds-core-react";export{e as Accordion,t as Breadcrumbs,n as CircularProgress,i as Divider,a as DotProgress,r as EDSDialog,o as Icon,s as LinearProgress,c as Menu,l as Typography};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>{let t=(e.faqs?.length??0)>0,n=e.subCategories?.some(e=>(e.faqs?.length??0)>0);return t||!!n};function t(e,t){let n=t.toLowerCase();return!e.answer||!e.question?!1:n===``?!0:e.answer.toLowerCase().includes(n)||e.question.toLowerCase().includes(n)}function n(t){return e(t)}function r(e,n){let r=(e.faqs??[]).filter(e=>!n||t(e,n)),i=(e.subCategories??[]).map(e=>{let r=(e.faqs??[]).filter(e=>!n||t(e,n));return r.length>0?{...e,faqs:r}:null}).filter(Boolean);return{...e,faqs:r,subCategories:i}}export{e as categoryHasFaqs,
|
|
1
|
+
const e=e=>{let t=(e.faqs?.length??0)>0,n=e.subCategories?.some(e=>(e.faqs?.length??0)>0);return t||!!n};function t(e,t){let n=t.toLowerCase();return!e.answer||!e.question?!1:n===``?!0:e.answer.toLowerCase().includes(n)||e.question.toLowerCase().includes(n)}function n(t){return e(t)}function r(e,n){let r=(e.faqs??[]).filter(e=>!n||t(e,n)),i=(e.subCategories??[]).map(e=>{let r=(e.faqs??[]).filter(e=>!n||t(e,n));return r.length>0?{...e,faqs:r}:null}).filter(Boolean);return{...e,faqs:r,subCategories:i}}export{e as categoryHasFaqs,n as filterCategory,r as mapCategoryToSearch};
|
|
@@ -21,4 +21,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
|
|
|
21
21
|
span {
|
|
22
22
|
text-transform: capitalize;
|
|
23
23
|
}
|
|
24
|
-
`,m=({fieldName:e,onChangedField:t,finishedText:a})=>{let{finished:s,progress:m}=r({onDone:t});return l(d,{children:s?u(c,{children:[u(p,{variant:`h3`,children:[`Changed to `,l(`span`,{children:n(e)})]}),l(i,{}),l(o,{variant:`h6`,children:a})]}):u(c,{children:[u(o,{variant:`h3`,children:[`Changing field.`,`.`.repeat(m/35)]}),l(f,{variant:`determinate`,value:m})]})})};export{m as ChangingField
|
|
24
|
+
`,m=({fieldName:e,onChangedField:t,finishedText:a})=>{let{finished:s,progress:m}=r({onDone:t});return l(d,{children:s?u(c,{children:[u(p,{variant:`h3`,children:[`Changed to `,l(`span`,{children:n(e)})]}),l(i,{}),l(o,{variant:`h6`,children:a})]}):u(c,{children:[u(o,{variant:`h3`,children:[`Changing field.`,`.`.repeat(m/35)]}),l(f,{variant:`determinate`,value:m})]})})};export{m as ChangingField};
|
|
@@ -8,4 +8,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{findStartAndEndIndex
|
|
|
8
8
|
> span {
|
|
9
9
|
color: transparent;
|
|
10
10
|
}
|
|
11
|
-
`;function c({search:e,autoCompleteOptions:r}){let i=n({autoCompleteOptions:r,searchValue:e});if(i.length===0)return null;let c=i[0],[l,u]=t({searchValue:e,label:c.label});return l===0?o(s,{children:[a(`span`,{children:e.slice(0,e.length)}),c.label.slice(u+1)]}):null}export{c as AutoCompleteText
|
|
11
|
+
`;function c({search:e,autoCompleteOptions:r}){let i=n({autoCompleteOptions:r,searchValue:e});if(i.length===0)return null;let c=i[0],[l,u]=t({searchValue:e,label:c.label});return l===0?o(s,{children:[a(`span`,{children:e.slice(0,e.length)}),c.label.slice(u+1)]}):null}export{c as AutoCompleteText};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilterProps } from "./Filter.types.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react183 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/Filter/Filter.d.ts
|
|
5
5
|
|
|
@@ -32,6 +32,6 @@ declare function Filter<T extends string>({
|
|
|
32
32
|
id,
|
|
33
33
|
openOnFocus,
|
|
34
34
|
...rest
|
|
35
|
-
}: FilterProps<T>):
|
|
35
|
+
}: FilterProps<T>): react183.JSX.Element;
|
|
36
36
|
//#endregion
|
|
37
37
|
export { Filter };
|
|
@@ -26,4 +26,4 @@ interface FilterWithAutoCompleteOptions<T extends string> extends CommonFilterPr
|
|
|
26
26
|
}
|
|
27
27
|
type FilterProps<T extends string> = CommonFilterProps<T> | FilterWithAutoCompleteOptions<T>;
|
|
28
28
|
//#endregion
|
|
29
|
-
export { FilterProps
|
|
29
|
+
export { FilterProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SelectOptionRequired } from "../../molecules/Select/Select.types.js";
|
|
2
2
|
import { FilterProps } from "./Filter.types.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react184 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/organisms/Filter/QuickFilter.d.ts
|
|
6
6
|
interface QuickFilterProps<T extends string> {
|
|
@@ -14,6 +14,6 @@ declare function QuickFilter<T extends string>({
|
|
|
14
14
|
items,
|
|
15
15
|
onQuickFilter,
|
|
16
16
|
label
|
|
17
|
-
}: QuickFilterProps<T>):
|
|
17
|
+
}: QuickFilterProps<T>): react184.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { QuickFilter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react182 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Filter/SortMenu.d.ts
|
|
4
4
|
interface SortMenuProps<S> {
|
|
@@ -13,6 +13,6 @@ declare function SortMenu<S>({
|
|
|
13
13
|
value,
|
|
14
14
|
onChange,
|
|
15
15
|
items
|
|
16
|
-
}: SortMenuProps<S>):
|
|
16
|
+
}: SortMenuProps<S>): react182.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SortMenu };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react7 from "react";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ReleaseNote } from "@equinor/subsurface-app-management";
|
|
4
4
|
|
|
@@ -7,9 +7,9 @@ type ReleaseNoteProps = {
|
|
|
7
7
|
actionMenu?: ReactNode;
|
|
8
8
|
expanded?: boolean;
|
|
9
9
|
} & ReleaseNote;
|
|
10
|
-
declare const ReleaseNote$1:
|
|
10
|
+
declare const ReleaseNote$1: react7.ForwardRefExoticComponent<{
|
|
11
11
|
actionMenu?: ReactNode;
|
|
12
12
|
expanded?: boolean;
|
|
13
|
-
} & ReleaseNote &
|
|
13
|
+
} & ReleaseNote & react7.RefAttributes<HTMLDivElement>>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { ReleaseNote$1 as ReleaseNote, ReleaseNoteProps };
|
|
@@ -45,4 +45,7 @@ import{colors as e}from"../../../atoms/style/colors.js";import{spacings as t}fro
|
|
|
45
45
|
> p:first-child {
|
|
46
46
|
grid-column: 2;
|
|
47
47
|
}
|
|
48
|
-
`,D=
|
|
48
|
+
`,D=h(m)`
|
|
49
|
+
max-height: 80vh;
|
|
50
|
+
overflow-y: auto;
|
|
51
|
+
`,O=({icon:t,name:s,items:h,...g})=>{let{pathname:O}=C(),k=w(),A=r(O),{isOpen:j}=n(),M=r(j),N=h.some(e=>!!k({...e})),P=d(null),[F,I]=f(!1),L=()=>I(e=>!e);l(()=>{(M&&!j&&F||A!==O&&F&&!j)&&I(!1)},[F,j,O,M,A]);let R=u(()=>v(i,{title:s,placement:`right`,children:v(c,{children:y(T,{ref:P,$open:j,$active:N,$expanded:F,onClick:L,...g,children:[v(a,{"data-testid":`icon-container`,children:v(p,{data:t,size:24,color:e.interactive.primary__resting.rgba})}),j&&y(_,{children:[v(o,{$active:!1,$disabled:!1,variant:`button`,group:`navigation`,children:s}),v(p,{data:F?x:b,size:24,color:e.interactive.primary__resting.rgba})]})]})})}),[F,t,N,j,s,g]);return F&&j?y(_,{children:[R,h.map((e,t)=>v(E,{$disabled:e.disabled||!1,...e,children:v(o,{$active:N,$disabled:e.disabled||!1,variant:`button`,group:`navigation`,children:e.name})},t))]}):F?y(_,{children:[R,v(D,{open:!0,anchorEl:P.current,placement:`right-start`,onClose:L,children:h.map(e=>v(m.Item,{as:S,active:!!k({...e}),style:{width:`256px`},...e,children:e.name},`${e.to}-${e.name}`))})]}):R};export{O as CollapsableMenuItem};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react185 from "react";
|
|
2
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/SideBar/SideBar.d.ts
|
|
@@ -16,6 +16,6 @@ interface SideBarWithCreate extends SideBarProps {
|
|
|
16
16
|
createDisabled?: boolean;
|
|
17
17
|
createActive?: boolean;
|
|
18
18
|
}
|
|
19
|
-
declare const SideBar:
|
|
19
|
+
declare const SideBar: react185.ForwardRefExoticComponent<(SideBarWithCreate | BaseSideBar) & react185.RefAttributes<HTMLDivElement>>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { SideBar };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react198 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Action.d.ts
|
|
4
4
|
interface ActionProps {
|
|
5
5
|
onClick: () => void;
|
|
6
6
|
buttonText?: string;
|
|
7
7
|
}
|
|
8
|
-
declare const Action:
|
|
8
|
+
declare const Action: react198.ForwardRefExoticComponent<ActionProps & react198.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { Action };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react200 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Description.d.ts
|
|
4
4
|
interface DescriptionProps {
|
|
5
5
|
text?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const Description:
|
|
7
|
+
declare const Description: react200.ForwardRefExoticComponent<DescriptionProps & react200.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Description };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react202 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/MissingAccesses.d.ts
|
|
4
4
|
interface AccessType {
|
|
@@ -9,6 +9,6 @@ interface MissingAccessesProps {
|
|
|
9
9
|
accesses?: AccessType[];
|
|
10
10
|
text?: string;
|
|
11
11
|
}
|
|
12
|
-
declare const MissingAccesses:
|
|
12
|
+
declare const MissingAccesses: react202.ForwardRefExoticComponent<MissingAccessesProps & react202.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { MissingAccesses };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react196 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/Title.d.ts
|
|
4
4
|
interface TitleProps {
|
|
5
5
|
title?: string;
|
|
6
6
|
}
|
|
7
|
-
declare const Title:
|
|
7
|
+
declare const Title: react196.ForwardRefExoticComponent<TitleProps & react196.RefAttributes<HTMLHeadingElement>>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { Title };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react194 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/BadRequest.d.ts
|
|
4
4
|
interface BadRequestProps {
|
|
@@ -12,6 +12,6 @@ declare const BadRequest: ({
|
|
|
12
12
|
redirectFallbackUrl,
|
|
13
13
|
onBackClick,
|
|
14
14
|
hideBackButton
|
|
15
|
-
}: BadRequestProps) =>
|
|
15
|
+
}: BadRequestProps) => react194.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { BadRequest };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react195 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/GenericError.d.ts
|
|
4
4
|
interface GenericErrorProps {
|
|
@@ -14,6 +14,6 @@ declare const GenericError: ({
|
|
|
14
14
|
redirectFallbackUrl,
|
|
15
15
|
onBackClick,
|
|
16
16
|
hideBackButton
|
|
17
|
-
}: GenericErrorProps) =>
|
|
17
|
+
}: GenericErrorProps) => react195.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { GenericError };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react191 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/MissingPermissions.d.ts
|
|
4
4
|
interface MissingPermissionsProps {
|
|
@@ -14,6 +14,6 @@ declare const MissingPermissions: ({
|
|
|
14
14
|
redirectFallbackUrl,
|
|
15
15
|
onBackClick,
|
|
16
16
|
hideBackButton
|
|
17
|
-
}: MissingPermissionsProps) =>
|
|
17
|
+
}: MissingPermissionsProps) => react191.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { MissingPermissions };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react192 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/PageNotFound.d.ts
|
|
4
4
|
interface PageNotFoundProps {
|
|
@@ -12,6 +12,6 @@ declare const PageNotFound: ({
|
|
|
12
12
|
redirectFallbackUrl,
|
|
13
13
|
onBackClick,
|
|
14
14
|
hideBackButton
|
|
15
|
-
}: PageNotFoundProps) =>
|
|
15
|
+
}: PageNotFoundProps) => react192.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { PageNotFound };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react193 from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/organisms/Status/collections/ServerError.d.ts
|
|
4
4
|
interface ServerErrorProps {
|
|
@@ -12,6 +12,6 @@ declare const ServerError: ({
|
|
|
12
12
|
redirectFallbackUrl,
|
|
13
13
|
onBackClick,
|
|
14
14
|
hideBackButton
|
|
15
|
-
}: ServerErrorProps) =>
|
|
15
|
+
}: ServerErrorProps) => react193.JSX.Element;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { ServerError };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react9 from "react";
|
|
2
2
|
import * as styled_components0 from "styled-components";
|
|
3
3
|
import { IStyledComponent } from "styled-components";
|
|
4
4
|
import * as styled_components_dist_types0 from "styled-components/dist/types";
|
|
@@ -7,8 +7,8 @@ import * as styled_components_dist_types0 from "styled-components/dist/types";
|
|
|
7
7
|
interface ContentProps {
|
|
8
8
|
$open: boolean;
|
|
9
9
|
}
|
|
10
|
-
declare const Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<
|
|
11
|
-
declare const GlobalStyles:
|
|
10
|
+
declare const Content: styled_components_dist_types0.IStyledComponentBase<"web", styled_components0.FastOmit<styled_components0.FastOmit<react9.DetailedHTMLProps<react9.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$open"> & ContentProps, never> & Partial<Pick<styled_components0.FastOmit<react9.DetailedHTMLProps<react9.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$open"> & ContentProps, never>>> & string;
|
|
11
|
+
declare const GlobalStyles: react9.NamedExoticComponent<styled_components0.ExecutionProps & object>;
|
|
12
12
|
type TemplateType = IStyledComponent<'web', any> & {
|
|
13
13
|
Container: IStyledComponent<'web', any>;
|
|
14
14
|
Content: typeof Content;
|
|
@@ -55,4 +55,4 @@ import{colors as e}from"../../atoms/style/colors.js";import{spacings as t}from".
|
|
|
55
55
|
fill: ${e.interactive.disabled__text.rgba};
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`,d=i(({checked:e,onToggle:t,icon:n,disabled:i,...s},d)=>
|
|
58
|
+
`,d=i(({checked:e,onToggle:t,icon:n,disabled:i,...s},d)=>l(u,{ref:d,"aria-checked":e,onClick:()=>{t(!e)},disabled:i,...`tooltip`in s?{...s,tooltip:void 0,toolTipPlacement:void 0}:{...s},children:[n?`tooltip`in s&&s.tooltip?c(r,{title:s.tooltip,placement:s.tooltipPlacement,children:c(a,{data:n,size:24})}):c(a,{data:n,size:24}):null,`label`in s?c(o,{as:`span`,variant:`button`,group:`navigation`,children:s.label}):null]}));d.displayName=`ToggleGroupOption`;export{d as ToggleGroupOption};
|
|
@@ -6,4 +6,4 @@ import{spacings as e}from"../../../atoms/style/spacings.js";import{useAuth as t}
|
|
|
6
6
|
background: ${({$variant:e})=>s(e).chipBackground};
|
|
7
7
|
outline: none;
|
|
8
8
|
padding: 0;
|
|
9
|
-
`,h=l(({onClick:e,environmentToggle:n},s)=>{let{account:l,photo:u}=t(),{data:h}=i(),g=n.length>0,_=n.map(e=>o(e.value)),v=h?.roles?.sort()??[];return f(p,{children:[v.at(0)&&d(m,{$variant:`impersonate`,children:v[0]}),v.length>1&&d(m,{$variant:`impersonate`,children:`+${v.length-1}`}),g&&_.at(0)&&d(m,{$variant:`environment`,children:_[0]}),_.length>1&&d(m,{$variant:`environment`,children:`+${_.length-1}`}),d(a,{ref:s,onClick:e,children:g&&h?d(c,{size:36,variant:`combined`}):g?d(c,{size:36,name:n.map(e=>e.value).join(`, `),variant:`environment`}):h?d(c,{size:36,variant:`impersonate`}):d(r,{size:36,name:l?.name,url:u})})]})});h.displayName=`AccountButton`;export{h as AccountButton
|
|
9
|
+
`,h=l(({onClick:e,environmentToggle:n},s)=>{let{account:l,photo:u}=t(),{data:h}=i(),g=n.length>0,_=n.map(e=>o(e.value)),v=h?.roles?.sort()??[];return f(p,{children:[v.at(0)&&d(m,{$variant:`impersonate`,children:v[0]}),v.length>1&&d(m,{$variant:`impersonate`,children:`+${v.length-1}`}),g&&_.at(0)&&d(m,{$variant:`environment`,children:_[0]}),_.length>1&&d(m,{$variant:`environment`,children:`+${_.length-1}`}),d(a,{ref:s,onClick:e,children:g&&h?d(c,{size:36,variant:`combined`}):g?d(c,{size:36,name:n.map(e=>e.value).join(`, `),variant:`environment`}):h?d(c,{size:36,variant:`impersonate`}):d(r,{size:36,name:l?.name,url:u})})]})});h.displayName=`AccountButton`;export{h as AccountButton};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react189 from "react";
|
|
2
2
|
import { HTMLAttributes } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/TopBar/Actions.d.ts
|
|
5
|
-
declare const Actions:
|
|
5
|
+
declare const Actions: react189.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react189.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { Actions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Field } from "../../../atoms/types/Field.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react187 from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/TopBar/FieldMenu/FieldMenu.d.ts
|
|
5
5
|
interface FieldMenuProps {
|
|
@@ -8,6 +8,6 @@ interface FieldMenuProps {
|
|
|
8
8
|
itemNameSingular?: string;
|
|
9
9
|
showAccessITLink?: boolean;
|
|
10
10
|
}
|
|
11
|
-
declare const FieldMenu:
|
|
11
|
+
declare const FieldMenu: react187.ForwardRefExoticComponent<FieldMenuProps & react187.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { FieldMenu
|
|
13
|
+
export { FieldMenu };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react235 from "react";
|
|
2
2
|
import { Dispatch, FC, ReactNode, SetStateAction } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/organisms/TopBar/Notifications/NotificationProvider.d.ts
|
|
@@ -6,7 +6,7 @@ interface NotificationContext {
|
|
|
6
6
|
setIsOpen: Dispatch<SetStateAction<boolean>>;
|
|
7
7
|
isOpen: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare const NotificationContext:
|
|
9
|
+
declare const NotificationContext: react235.Context<NotificationContext | undefined>;
|
|
10
10
|
declare const useNotification: () => NotificationContext;
|
|
11
11
|
//#endregion
|
|
12
12
|
export { useNotification };
|
|
@@ -83,4 +83,4 @@ type ExperienceReadyToPublishTypes = {
|
|
|
83
83
|
notificationType: NotificationsTypes.EXPERIENCE_READY_TO_PUBLISH;
|
|
84
84
|
} & NotificationDto;
|
|
85
85
|
//#endregion
|
|
86
|
-
export { DefaultNotificationTypes, Due3WeeksTypes, ExperienceReadyToPublishTypes, MergeBranchOrcaTypes,
|
|
86
|
+
export { DefaultNotificationTypes, Due3WeeksTypes, ExperienceReadyToPublishTypes, MergeBranchOrcaTypes, ReadyToReportNotificationTypes, RequestChangeOrcaTypes, RequestReviewOrcaTypes, ReviewQANotificationsTypes };
|
|
@@ -5,4 +5,4 @@ import"../../../../atoms/enums/Environment.js";import{environment as e}from"../.
|
|
|
5
5
|
${e.description} \n \n User agent string: ${navigator.userAgent}`},p=(e,t)=>{let n=t?`selfservice?id=ticket&table=incident&sys_id=`:`now/nav/ui/classic/params/target/incident.do%3Fsys_id%3D`;return`https://equinor${s(import.meta.env.VITE_ENVIRONMENT_NAME)===`production`?``:`test`}.service-now.com/${n}${e}`},m=()=>{if(navigator.userAgent.includes(`Edg`))return`Edge`;if(navigator.userAgent.includes(`Chrome`))return`Chrome`;if(navigator.userAgent.includes(`Safari`))return`Safari`;if(navigator.userAgent.includes(`Firefox`))return`Firefox`},h=e=>{let t=e;e===`Edge`&&(t=`Edg`);let n=RegExp(`${t}/(\\d+(?:\\.\\d+)+)`);return navigator.userAgent.match(n)?.[1]},g=()=>{let e=m();return e?`${e} (${h(e)})`:`Not found`},_=(e,r,i,s,l)=>{let u=i===a.BUG?`:bug: Bug report`:`:bulb: Suggestion`,f=[],m=[];m.push({type:`mrkdwn`,text:`*Title* \n ${e.title}`}),f.push({type:`mrkdwn`,text:` ${t(new Date,{format:`DD. month YYYY`})}`}),e.url&&f.push({type:`mrkdwn`,text:`*<${e.url}|Error URL>*`}),e.urgency&&m.push({type:`mrkdwn`,text:`*Severity* \n ${c(e)} ${d(e.urgency)}`});let h=[{type:`header`,text:{type:`plain_text`,text:u,emoji:!0}},{type:`section`,fields:f},{type:`section`,fields:m},{type:`section`,fields:[{type:`mrkdwn`,text:`*Application*
|
|
6
6
|
`+o(import.meta.env.VITE_NAME)},{type:`mrkdwn`,text:`*User* \n ${s}`}]},{type:`section`,fields:[{type:`mrkdwn`,text:`*Browser*
|
|
7
7
|
`+g()},{type:`mrkdwn`,text:`*Field* \n ${n(r??`Not found`)}`}]},{type:`section`,text:{type:`mrkdwn`,text:`*Description*
|
|
8
|
-
`+e.description}}];return l&&h.push({type:`section`,text:{type:`mrkdwn`,text:`*<${p(l)}|:link: Click to open the ticket in Service Now>*`}}),h.push({type:`divider`}),JSON.stringify(h)};export{f as createServiceNowDescription,p as createServiceNowUrl,_ as createSlackMessage,g as getBrowserInfo,u as getServiceNowUrgencyNumber,
|
|
8
|
+
`+e.description}}];return l&&h.push({type:`section`,text:{type:`mrkdwn`,text:`*<${p(l)}|:link: Click to open the ticket in Service Now>*`}}),h.push({type:`divider`}),JSON.stringify(h)};export{f as createServiceNowDescription,p as createServiceNowUrl,_ as createSlackMessage,g as getBrowserInfo,u as getServiceNowUrgencyNumber,d as getUrgencyDisplayText,l as readUploadedFileAsText};
|
|
@@ -2,6 +2,6 @@ import{OptionalTooltip as e}from"../../../../../molecules/OptionalTooltip/Option
|
|
|
2
2
|
white-space: break-spaces;
|
|
3
3
|
text-align: center;
|
|
4
4
|
width: 400px;
|
|
5
|
-
`,o=t(({show:e,children:t},r)=>{
|
|
5
|
+
`,o=t(({show:e,children:t},r)=>i(a,{title:n(()=>e?`The report was successfully submitted to ServiceNow.
|
|
6
6
|
This field is locked so you can retry sending it to the development team.
|
|
7
|
-
To reset the form, use the button in the bottom left corner.`:``,[e])
|
|
7
|
+
To reset the form, use the button in the bottom left corner.`:``,[e]),children:i(`div`,{ref:r,children:t})}));o.displayName=`LockedInputTooltip`;export{o as LockedInputTooltip};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{SingleSelect as e}from"../../../../../molecules/Select/SingleSelect/SingleSelect.js";import{SORTED_BUG_SEVERITY_OPTIONS as t}from"../Feedback.const.js";import{getUrgencyDisplayText as n}from"../Feedback.utils.js";import{useFeedbackContext as r}from"../hooks/useFeedbackContext.js";import{LockedInputTooltip as i}from"./LockedInputTooltip.js";import a from"styled-components";import{jsx as o}from"react/jsx-runtime";const s=a.div`
|
|
2
2
|
grid-column: 1/2;
|
|
3
|
-
`,c=t.map(e=>({value:e,label:n(e)})),l=()=>{let{serviceNowSuccess:t,feedbackContent:a,updateFeedback:l}=r()
|
|
3
|
+
`,c=t.map(e=>({value:e,label:n(e)})),l=()=>{let{serviceNowSuccess:t,feedbackContent:a,updateFeedback:l}=r();return o(s,{children:o(i,{show:t,children:o(e,{items:c,label:`Severity`,meta:`optional`,clearable:!0,disabled:t,value:a.urgency?{value:a.urgency,label:n(a.urgency)}:void 0,placeholder:`Select error impact`,onSelect:e=>{l(`urgency`,e?.value)}})})})};export{l as Severity};
|
|
@@ -4,4 +4,4 @@ import{tokens as e}from"../../../../../../node_modules/@equinor/eds-tokens/dist/
|
|
|
4
4
|
width: 82px;
|
|
5
5
|
height: 82px;
|
|
6
6
|
position: relative;
|
|
7
|
-
`,_=e=>{let[u,_]=c(``),{error:v,onDelete:y}=e,b=s(()=>{if(!v)return;let t=e.errors[0].code,n=e.errors[0].message;return t===`file-too-large`?n=n.replace(/(\d+ bytes)/,`1MB`):t===`file-invalid-type`&&(n=n.replace(/(\w+\/\w+,)/g,``).replaceAll(`,`,`, `)),`${e.errors[0].code} \n${n}`},[v,e]),x=s(()=>e.file.name,[v,e]),S=s(()=>v?e.errors.find(e=>e.code.includes(`invalid`))?`Invalid file type`:e.errors.find(e=>e.code.includes(`large`))?`Invalid file size`:`Error`:``,[v,e]);return o(()=>{v||(async e=>{
|
|
7
|
+
`,_=e=>{let[u,_]=c(``),{error:v,onDelete:y}=e,b=s(()=>{if(!v)return;let t=e.errors[0].code,n=e.errors[0].message;return t===`file-too-large`?n=n.replace(/(\d+ bytes)/,`1MB`):t===`file-invalid-type`&&(n=n.replace(/(\w+\/\w+,)/g,``).replaceAll(`,`,`, `)),`${e.errors[0].code} \n${n}`},[v,e]),x=s(()=>e.file.name,[v,e]),S=s(()=>v?e.errors.find(e=>e.code.includes(`invalid`))?`Invalid file type`:e.errors.find(e=>e.code.includes(`large`))?`Invalid file size`:`Error`:``,[v,e]);return o(()=>{v||(async e=>{_(await t(e))})(e.file)},[v,e]),f(g,{children:[d(r,{title:`${x}${v?`: `+b:``}`,children:v?f(a,{children:[d(l,{data:m,color:h.interactive.warning__text.rgba}),d(`div`,{children:S})]}):d(i,{children:d(`img`,{src:u,alt:`Uploaded file: ${x}`})})}),d(n,{"data-testid":`attachment-delete-button`,onClick:y,children:d(l,{color:h.text.static_icons__tertiary.rgba,data:p,size:24})})]})};export{_ as ImageFile};
|
|
@@ -2,4 +2,4 @@ import{FileUploadArea as e}from"../../../../../../molecules/FileUploadArea/FileU
|
|
|
2
2
|
grid-column: 1/3;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
|
-
`;function d(e,t){if(e.length===0||e.length===1)return e;for(let n=0;n<e.length;n++)for(let r=n+1;r<e.length;r++)t(e[n],e[r])&&e.splice(n,1);return e}const f=()=>{let{feedbackAttachments:s,setFeedbackAttachments:f}=n(),[p,m]=o([]),h=(e,t)=>{if(e.length>=1){let t=e.filter(e=>!e.name.startsWith(`.`));new FileReader().readAsDataURL(e[0]);let n=[];s&&n.push(...s)
|
|
5
|
+
`;function d(e,t){if(e.length===0||e.length===1)return e;for(let n=0;n<e.length;n++)for(let r=n+1;r<e.length;r++)t(e[n],e[r])&&e.splice(n,1);return e}const f=()=>{let{feedbackAttachments:s,setFeedbackAttachments:f}=n(),[p,m]=o([]),h=(e,t)=>{if(e.length>=1){let t=e.filter(e=>!e.name.startsWith(`.`));new FileReader().readAsDataURL(e[0]);let n=[];s&&n.push(...s),f(d([...t,...n],(e,t)=>e.name===t.name&&e.size===t.size))}m(t)},g=e=>{f(s?.filter(t=>t.name!==e.name&&t.size!==e.size)??[])},_=e=>{m(p?.filter(t=>t.file.name===e.file.name&&t.file.size!==e.file.size)??[])};return l(u,{children:[c(i,{group:`input`,variant:`label`,children:`Attachments (.jpg, .jpeg, .png) (max 1 MB)`}),l(r,{children:[c(e,{maxSize:t,onDrop:h,accept:{"image/jpeg":[`.jpeg`,`.jpg`],"image/png":[`.png`]},size:`small`}),s?.map(e=>c(a,{onDelete:()=>g(e),file:e},e.name+e.size)),p.map(e=>c(a,{...e,onDelete:()=>_(e),error:!0},e.file.name+e.file.size))]})]})};export{f as UploadFile};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{spacings as e}from"../../../../../atoms/style/spacings.js";import{useFeedbackContext as t}from"../hooks/useFeedbackContext.js";import{ContentWrapper as n}from"../Feedback.styles.js";import{AnimateChangeInHeight as r}from"./AnimateChangeInHeight.js";import
|
|
1
|
+
import{spacings as e}from"../../../../../atoms/style/spacings.js";import{useFeedbackContext as t}from"../hooks/useFeedbackContext.js";import{ContentWrapper as n}from"../Feedback.styles.js";import{AnimateChangeInHeight as r}from"./AnimateChangeInHeight.js";import i from"./ResponseStatus.js";import{Success as a}from"./Success.js";import{useEffect as o,useState as s}from"react";import{Button as c}from"@equinor/eds-core-react";import l from"styled-components";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{motion as f}from"motion/react";const p=l(f.div)`
|
|
2
2
|
display: flex;
|
|
3
3
|
gap: ${e.large};
|
|
4
4
|
height: auto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useFeedbackContext as e}from"../hooks/useFeedbackContext.js";import{RequestStatus as t}from"./RequestStatus.js";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{WorkItemType as a}from"@equinor/subsurface-app-management";const o=()=>{let{serviceNowRequestResponse:o,workItemRequestResponse:s,selectedType:c}=e();return i(n,{children:[c===a.BUG&&r(t,{title:`Service Now`,requestStatus:o}),r(t,{title:`Development team`,requestStatus:s})]})};export{o as
|
|
1
|
+
import{useFeedbackContext as e}from"../hooks/useFeedbackContext.js";import{RequestStatus as t}from"./RequestStatus.js";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{WorkItemType as a}from"@equinor/subsurface-app-management";const o=()=>{let{serviceNowRequestResponse:o,workItemRequestResponse:s,selectedType:c}=e();return i(n,{children:[c===a.BUG&&r(t,{title:`Service Now`,requestStatus:o}),r(t,{title:`Development team`,requestStatus:s})]})};export{o as default};
|
|
@@ -6,4 +6,4 @@ import{tokens as e}from"../../../../../node_modules/@equinor/eds-tokens/dist/esm
|
|
|
6
6
|
padding-left: ${t.large};
|
|
7
7
|
font-weight: 400;
|
|
8
8
|
font-size: 16px;
|
|
9
|
-
`,d=()=>{let{selectedType:e,serviceNowUrl:t}=n();return o(l,{children:[a(r,{variant:`h3`,children:`Thank you, we have received your ${e===s.BUG?`report!`:`suggestion!`}`}),e===s.BUG&&t.length>0&&a(u,{href:t,children:`See ticket in ServiceNow`})]})};export{
|
|
9
|
+
`,d=()=>{let{selectedType:e,serviceNowUrl:t}=n();return o(l,{children:[a(r,{variant:`h3`,children:`Thank you, we have received your ${e===s.BUG?`report!`:`suggestion!`}`}),e===s.BUG&&t.length>0&&a(u,{href:t,children:`See ticket in ServiceNow`})]})};export{d as Success};
|
|
@@ -18,4 +18,4 @@ import{animation as e}from"../../../atoms/style/animation.js";import{colors as t
|
|
|
18
18
|
&:hover {
|
|
19
19
|
background: ${t.interactive.primary__hover_alt.rgba};
|
|
20
20
|
}
|
|
21
|
-
`,f=({onTutorialStart:e,onClose:n,id:a,name:f})=>{let{startTutorial:p,seenTutorialIDs:m}=u()
|
|
21
|
+
`,f=({onTutorialStart:e,onClose:n,id:a,name:f})=>{let{startTutorial:p,seenTutorialIDs:m}=u();return s(d,{onClick:()=>{p(a),e?.(a),n()},children:[m.includes(a)&&s(`header`,{children:[o(r,{data:c,size:16,color:t.interactive.primary__resting.rgba}),o(i,{varinat:`caption`,children:`COMPLETED`})]}),o(i,{variant:`h4`,children:f}),o(r,{data:l,color:t.interactive.primary__resting.rgba})]})};export{f as TutorialItem};
|
|
@@ -24,4 +24,4 @@ import { Faq } from "./Faq/Faq.js";
|
|
|
24
24
|
import { ReleaseNotesPage } from "./ReleaseNotesPage/ReleaseNotesPage.js";
|
|
25
25
|
import { Card as Card$1, CardProps } from "@equinor/eds-core-react";
|
|
26
26
|
import { EdsDataGridProps as DataGridProps } from "@equinor/eds-data-grid-react";
|
|
27
|
-
export {
|
|
27
|
+
export { Card$1 as Card, type CardProps, type DataGridProps };
|
package/dist/organisms/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import"./Status/index.js";import"./Status/collections/MissingAccessToApp.js";import"./DataGrid/DataGrid.js";import"./Template/Template.js";import"./FieldSelector/FieldSelector.js";import"./Filter/index.js";import"./SideBar/index.js";import"./ReleaseNote/ReleaseNote.js";import"./TopBar/index.js";import"./Status/collections/BadRequest.js";import"./Status/collections/GenericError.js";import"./Status/collections/MissingPermissions.js";import"./Status/collections/PageNotFound.js";import"./Status/collections/ServerError.js";import"./Status/collections/ApiResponseError.js";import"./SideSheet/SideSheet.js";import"./TableOfContents/TableOfContents.js";import"./PageTitle/PageTitle.js";import"./ToggleGroup/index.js";import"./Faq/Faq.js";import"./ReleaseNotesPage/ReleaseNotesPage.js";import{Card as e}from"@equinor/eds-core-react";export{e as Card};
|
|
@@ -1,26 +1,14 @@
|
|
|
1
1
|
import { FC, ReactElement, ReactNode } from "react";
|
|
2
|
-
import { AccountInfo
|
|
2
|
+
import { AccountInfo } from "@azure/msal-browser";
|
|
3
3
|
|
|
4
4
|
//#region src/providers/AuthProvider/AuthProvider.d.ts
|
|
5
|
-
type AuthState = 'loading' | 'authorized' | 'unauthorized'
|
|
5
|
+
type AuthState = 'loading' | 'authorized' | 'unauthorized';
|
|
6
6
|
interface AuthContextType {
|
|
7
7
|
account: AccountInfo | undefined;
|
|
8
8
|
photo: string | undefined;
|
|
9
9
|
roles: string[] | undefined;
|
|
10
10
|
logout: () => void;
|
|
11
11
|
authState: AuthState;
|
|
12
|
-
/**
|
|
13
|
-
* Trigger an interactive popup login. Useful when silent auth cannot
|
|
14
|
-
* complete (e.g. embedded in an iframe where third-party cookies are
|
|
15
|
-
* blocked). On success the context transitions to `authorized` in place,
|
|
16
|
-
* with roles populated, without requiring a page reload.
|
|
17
|
-
*/
|
|
18
|
-
login: () => Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Acquire a token interactively (popup) for the given scopes, falling back
|
|
21
|
-
* to the configured API scope when none are provided.
|
|
22
|
-
*/
|
|
23
|
-
acquireToken: (scopes?: string[]) => Promise<AuthenticationResult | null>;
|
|
24
12
|
}
|
|
25
13
|
declare const useAuth: () => AuthContextType;
|
|
26
14
|
interface AuthProviderProps {
|
|
@@ -39,4 +27,4 @@ interface AuthProviderProps {
|
|
|
39
27
|
*/
|
|
40
28
|
declare const AuthProvider: FC<AuthProviderProps>;
|
|
41
29
|
//#endregion
|
|
42
|
-
export {
|
|
30
|
+
export { AuthProvider, useAuth };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{auth as e,environment as t}from"../../atoms/utils/auth_environment.js";import{AuthProviderInner as n}from"./AuthProviderInner.js";import{createContext as r,useContext as i,useMemo as a,useState as o}from"react";import{MsalProvider as s}from"@azure/msal-react";import{jsx as c}from"react/jsx-runtime";
|
|
1
|
+
import{auth as e,environment as t}from"../../atoms/utils/auth_environment.js";import{AuthProviderInner as n}from"./AuthProviderInner.js";import{createContext as r,useContext as i,useMemo as a,useState as o}from"react";import{MsalProvider as s}from"@azure/msal-react";import{jsx as c}from"react/jsx-runtime";const{msalApp:l}=e,{getIsMock:u,getMockUserPhoto:d,getMockRoles:f}=t,p=r(void 0),m=()=>{let e=i(p);if(e===void 0)throw Error(`useAuth must be used within a AuthContext provider`);return e},h={homeAccountId:`mock-home-account-id`,environment:`mock`,tenantId:`mock-tenant-id`,username:`MOCK@equinor.com`,localAccountId:`mock-local-account-id`,name:`Mock mocksnes`,idToken:`fake`,idTokenClaims:{id:`claim`},nativeAccountId:`accountid`,authorityType:`authority`,tenantProfiles:new Map},g=({children:e,loadingComponent:t,unauthorizedComponent:r,withoutLoader:i=!1,withoutBackend:m=!1})=>{let[g,_]=o(void 0),[v,y]=o(),[b,x]=o(`loading`),[S,C]=o(),w=a(()=>u(import.meta.env.VITE_IS_MOCK),[]),T=a(()=>d(import.meta.env.VITE_MOCK_USER_PHOTO),[]),E=a(()=>f(import.meta.env.VITE_MOCK_ROLES),[]);return w?(b===`loading`&&setTimeout(()=>{x(`authorized`)},1e3),c(p.Provider,{value:{roles:E,account:h,photo:T,logout:()=>console.log(`Logged out the user!`),authState:b},children:e})):c(p.Provider,{value:{roles:v,account:g,photo:S,logout:()=>l.logoutRedirect(),authState:b},children:c(s,{instance:l,children:c(n,{loadingComponent:t,unauthorizedComponent:r,account:g,setAccount:_,setRoles:y,setPhoto:C,authState:b,setAuthState:x,withoutLoader:i,withoutBackend:m,children:e})})})};export{g as AuthProvider,m as useAuth};
|