@equinor/amplify-component-lib 8.1.0 → 8.3.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/useReleaseNotesQuery.js +1 -1
- package/dist/atoms/style/colors.d.ts +440 -4
- package/dist/atoms/style/colors.js +1 -1
- package/dist/atoms/style/darkTokens.d.ts +1 -1
- package/dist/atoms/style/darkTokens.js +153 -1
- package/dist/atoms/style/lightTokens.d.ts +1 -0
- package/dist/atoms/style/lightTokens.js +46 -0
- package/dist/atoms/style/spacingTokens.d.ts +1 -1
- package/dist/atoms/style/spacingTokens.js +40 -1
- package/dist/atoms/utils/coordinate.d.ts +2 -7
- package/dist/atoms/utils/coordinate.js +1 -1
- package/dist/atoms/utils/date.d.ts +12 -15
- package/dist/atoms/utils/date.js +1 -1
- package/dist/atoms/utils/errors.d.ts +0 -5
- package/dist/atoms/utils/errors.js +1 -1
- package/dist/atoms/utils/favicon.d.ts +1 -4
- package/dist/atoms/utils/favicon.js +1 -1
- package/dist/atoms/utils/index.d.ts +69 -14
- package/dist/atoms/utils/index.js +1 -0
- package/dist/atoms/utils/map.d.ts +6 -10
- package/dist/atoms/utils/map.js +1 -1
- package/dist/atoms/utils/reactquery.d.ts +1 -3
- package/dist/atoms/utils/reactquery.js +1 -1
- package/dist/atoms/utils/richtext.d.ts +6 -13
- package/dist/atoms/utils/richtext.js +1 -1
- package/dist/atoms/utils/size.d.ts +22 -5
- package/dist/atoms/utils/size.js +1 -1
- package/dist/atoms/utils/sort.d.ts +3 -7
- package/dist/atoms/utils/sort.js +1 -1
- package/dist/atoms/utils/string.d.ts +2 -5
- package/dist/atoms/utils/string.js +1 -1
- package/dist/atoms/utils/url.d.ts +1 -5
- package/dist/atoms/utils/url.js +1 -1
- package/dist/deprecated/CommentField/CommentField.js +5 -5
- package/dist/deprecated/ConfirmationPopup.js +2 -2
- package/dist/deprecated/DataCard.js +8 -8
- package/dist/deprecated/EditableField.js +2 -2
- package/dist/deprecated/ExpandingIconButton/ExpandingIconButton.js +2 -2
- package/dist/deprecated/HeaderDrawer.js +5 -5
- package/dist/deprecated/MultiSelectDrawer.js +4 -4
- package/dist/deprecated/SingleSelectDrawer.js +3 -3
- package/dist/deprecated/Workflow/WorkflowDescription.js +4 -4
- package/dist/index.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIcon.constants.d.ts +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIcon.d.ts +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIcon.js +1 -1
- package/dist/molecules/ApplicationIcon/ApplicationIconData/ApplicationIconCollection.d.ts +1 -0
- package/dist/molecules/ApplicationIcon/ApplicationIconData/ApplicationIconCollection.js +1 -1
- package/dist/molecules/Badge/Badge.js +1 -1
- package/dist/molecules/Badge/Badge.styles.js +2 -2
- package/dist/molecules/Chip/Chip.styles.js +13 -13
- package/dist/molecules/ContentMenu/ContentMenu.js +19 -19
- package/dist/molecules/EquinorLogo/EquinorLogo.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/CompactFileProgress.styles.js +23 -23
- package/dist/molecules/FileProgress/RegularFileProgress.js +1 -1
- package/dist/molecules/FileProgress/RegularFileProgress.styles.js +10 -10
- package/dist/molecules/FileUploadArea/FileUploadArea.js +6 -6
- package/dist/molecules/FullPageSpinner/FullPageSpinner.js +5 -5
- package/dist/molecules/InfoElement/CopyText.js +9 -9
- package/dist/molecules/InfoElement/InfoElement.js +1 -1
- package/dist/molecules/ListItem/ListItem.d.ts +4 -4
- package/dist/molecules/ListItem/ListItem.js +11 -7
- package/dist/molecules/ListItem/ListItem.utils.d.ts +3 -0
- package/dist/molecules/ListItem/ListItem.utils.js +1 -0
- package/dist/molecules/OptionDrawer/OptionDrawer.styles.js +11 -11
- package/dist/molecules/ProfileAvatar/ProfileAvatar.js +6 -6
- package/dist/molecules/RichTextDisplay/RichTextDisplay.js +1 -1
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.js +6 -6
- package/dist/molecules/RichTextEditor/MenuBar/MenuBar.styles.js +4 -4
- package/dist/molecules/RichTextEditor/MenuBar/TextLinks.js +2 -2
- package/dist/molecules/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/molecules/RichTextEditor/custom-extensions/ExtendedHeaders.js +1 -1
- package/dist/molecules/RichTextEditor/index.js +1 -1
- package/dist/molecules/Select/Select.styles.d.ts +4 -4
- package/dist/molecules/Select/Select.styles.js +41 -36
- package/dist/molecules/SelectionControls/SelectionControls.styles.js +3 -3
- package/dist/molecules/Sieve/Sieve.styles.js +16 -16
- package/dist/molecules/Sieve/Sort.js +1 -1
- package/dist/molecules/SingleFilterMenu/SingleFilterMenu.js +9 -9
- package/dist/molecules/Stepper/Step.js +2 -2
- package/dist/molecules/Stepper/Stepper.js +2 -2
- package/dist/molecules/TextField/TextField.js +3 -3
- package/dist/organisms/DataGrid/DataGrid.js +1 -1
- package/dist/organisms/ErrorPage/Description.js +1 -1
- package/dist/organisms/ErrorPage/Details.js +6 -6
- package/dist/organisms/ErrorPage/ErrorPage.js +2 -2
- package/dist/organisms/ErrorPage/MissingAccesses.js +2 -2
- package/dist/organisms/ErrorPage/Title.js +1 -1
- package/dist/organisms/ErrorPage/collections/PageNotFound.js +1 -1
- package/dist/organisms/ErrorPage/collections/Unauthorized.js +2 -2
- package/dist/organisms/FieldSelector/ChangingField.js +6 -6
- package/dist/organisms/FieldSelector/SelectorCard/SelectorCard.js +2 -2
- package/dist/organisms/FieldSelector/SelectorCard/Skeleton.js +4 -4
- package/dist/organisms/FullPageStatus/FullPageStatus.js +2 -2
- package/dist/organisms/SideBar/MenuItem.styles.d.ts +1 -1
- package/dist/organisms/SideBar/MenuItem.styles.js +3 -3
- package/dist/organisms/SideBar/SideBar.styles.js +3 -3
- package/dist/organisms/SideBar/ToggleOpen.styles.js +5 -5
- package/dist/organisms/TableOfContents/TableOfContents.constants.js +1 -1
- package/dist/organisms/TableOfContents/TableOfContents.styles.d.ts +12 -12
- package/dist/organisms/TableOfContents/TableOfContents.styles.js +3 -3
- package/dist/organisms/Template/Template.js +10 -9
- package/dist/organisms/TopBar/Account/Account.styles.js +7 -7
- package/dist/organisms/TopBar/Actions.js +2 -2
- package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.js +1 -1
- package/dist/organisms/TopBar/ApplicationDrawer/ApplicationDrawer.styles.js +5 -5
- 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/Item.js +1 -1
- package/dist/organisms/TopBar/Guidelines/Section.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/DefaultNotification.js +1 -1
- package/dist/organisms/TopBar/Notifications/NotificationsTemplate/NotificationElements/NoNotifications.js +2 -2
- 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 +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Resources/Feedback/FeedbackForm/UploadFile/UploadFile.styles.js +4 -4
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/AnimateChangeInHeight.js +3 -3
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/FullSlackResponse.js +4 -4
- package/dist/organisms/TopBar/Resources/Feedback/ResponsePage/ResponsePage.js +2 -2
- 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/FilterHeader/FilterHeader.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/FilterHeader/FilterHeader.styles.js +3 -3
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotes.styles.js +3 -3
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesHeader.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesHeader.styles.js +4 -4
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleaseNotesTypes/ReleaseNotesTypes.styles.js +12 -12
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleasePosts/ReleasePost/ReleasePost.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleasePosts/ReleasePost/ReleasePost.styles.d.ts +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleasePosts/ReleasePost/ReleasePost.styles.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleasePosts/ReleasePosts.js +1 -1
- package/dist/organisms/TopBar/Resources/ReleaseNotesDialog/ReleasePosts/ReleasePosts.styles.js +4 -4
- package/dist/organisms/TopBar/Resources/ResourceMenuItem.js +2 -2
- package/dist/organisms/TopBar/Resources/Resources.js +4 -4
- package/dist/organisms/TopBar/Settings.d.ts +2 -15
- package/dist/organisms/TopBar/Settings.js +5 -5
- package/dist/organisms/TopBar/Settings.types.d.ts +28 -0
- package/dist/organisms/TopBar/TopBar.js +1 -1
- package/dist/organisms/TopBar/TopBar.styles.d.ts +1 -1
- package/dist/organisms/TopBar/TopBar.styles.js +13 -13
- package/dist/organisms/TopBar/TopBarMenu.js +3 -3
- package/dist/organisms/TopBar/TransferToAppDialog.js +2 -2
- package/dist/organisms/index.d.ts +1 -1
- package/dist/providers/AuthProvider/AuthProvider.js +1 -1
- package/dist/providers/AuthProvider/AuthProviderInner.js +1 -1
- package/dist/providers/ReleaseNotesProvider.js +1 -1
- package/dist/{atoms/utils/releaseNotes.d.ts → providers/ReleaseNotesProvider.utils.d.ts} +6 -2
- package/package.json +1 -1
- /package/dist/{atoms/utils/releaseNotes.js → providers/ReleaseNotesProvider.utils.js} +0 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import{css as a}from"styled-components";const i=a`
|
|
2
|
+
html[data-theme='light'] {
|
|
3
|
+
--amplify_dataviz_darkblue_default: rgba(0, 71, 153, 1);
|
|
4
|
+
--amplify_dataviz_darkblue_darker: rgba(4, 48, 98, 1);
|
|
5
|
+
--amplify_dataviz_darkblue_lighter: rgba(191, 220, 252, 1);
|
|
6
|
+
|
|
7
|
+
--amplify_dataviz_lightblue_default: rgba(133, 208, 250, 1);
|
|
8
|
+
--amplify_dataviz_lightblue_darker: rgba(35, 170, 246, 1);
|
|
9
|
+
--amplify_dataviz_lightblue_lighter: rgba(211, 238, 253, 1);
|
|
10
|
+
|
|
11
|
+
--amplify_dataviz_lightgreen_default: rgba(10, 194, 154, 1);
|
|
12
|
+
--amplify_dataviz_lightgreen_darker: rgba(8, 145, 115, 1);
|
|
13
|
+
--amplify_dataviz_lightgreen_lighter: rgba(220, 241, 236, 1);
|
|
14
|
+
|
|
15
|
+
--amplify_dataviz_darkgreen_default: rgba(0, 102, 76, 1);
|
|
16
|
+
--amplify_dataviz_darkgreen_darker: rgba(0, 61, 46, 1);
|
|
17
|
+
--amplify_dataviz_darkgreen_lighter: rgba(200, 237, 227, 1);
|
|
18
|
+
|
|
19
|
+
--amplify_dataviz_darkpink_default: rgba(169, 30, 88, 1);
|
|
20
|
+
--amplify_dataviz_darkpink_darker: rgba(135, 18, 67, 1);
|
|
21
|
+
--amplify_dataviz_darkpink_lighter: rgba(252, 212, 229, 1);
|
|
22
|
+
|
|
23
|
+
--amplify_dataviz_lightpink_default: rgba(255, 128, 138, 1);
|
|
24
|
+
--amplify_dataviz_lightpink_darker: rgba(225, 81, 93, 1);
|
|
25
|
+
--amplify_dataviz_lightpink_lighter: rgba(255, 219, 222, 1);
|
|
26
|
+
|
|
27
|
+
--amplify_dataviz_darkyellow_default: rgba(160, 112, 28, 1);
|
|
28
|
+
--amplify_dataviz_darkyellow_darker: rgba(121, 85, 21, 1);
|
|
29
|
+
--amplify_dataviz_darkyellow_lighter: rgba(244, 226, 195, 1);
|
|
30
|
+
|
|
31
|
+
--amplify_dataviz_lightyellow_default: rgba(253, 203, 53, 1);
|
|
32
|
+
--amplify_dataviz_lightyellow_darker: rgba(227, 171, 2, 1);
|
|
33
|
+
--amplify_dataviz_lightyellow_lighter: rgba(255, 240, 194, 1);
|
|
34
|
+
|
|
35
|
+
--amplify_dataviz_darkpurple_default: rgba(147, 20, 219, 1);
|
|
36
|
+
--amplify_dataviz_darkpurple_darker: rgba(97, 1, 152, 1);
|
|
37
|
+
--amplify_dataviz_darkpurple_lighter: rgba(232, 209, 246, 1);
|
|
38
|
+
|
|
39
|
+
--amplify_dataviz_lightpurple_default: rgba(186, 153, 255, 1);
|
|
40
|
+
--amplify_dataviz_lightpurple_darker: rgba(155, 89, 242, 1);
|
|
41
|
+
--amplify_dataviz_lightpurple_lighter: rgba(234, 224, 255, 1);
|
|
42
|
+
|
|
43
|
+
--amplify_dataviz_grey_darker: rgba(86, 86, 86, 1);
|
|
44
|
+
--amplify_dataviz_grey_lighter: rgba(194, 200, 204, 1);
|
|
45
|
+
}
|
|
46
|
+
`;export{i as lightTokens};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const spacingTokens
|
|
1
|
+
export declare const spacingTokens: import("styled-components").RuleSet<object>;
|
|
@@ -1 +1,40 @@
|
|
|
1
|
-
|
|
1
|
+
import{css as _}from"styled-components";const s=_`
|
|
2
|
+
/*Comfortable, by default*/
|
|
3
|
+
html {
|
|
4
|
+
--eds_spacing_xxx_large: 48px;
|
|
5
|
+
--eds_spacing_xx_large: 40px;
|
|
6
|
+
--eds_spacing_x_large: 32px;
|
|
7
|
+
--eds_spacing_large: 24px;
|
|
8
|
+
--eds_spacing_medium: 16px;
|
|
9
|
+
--eds_spacing_medium_small: 12px;
|
|
10
|
+
--eds_spacing_small: 8px;
|
|
11
|
+
--eds_spacing_x_small: 4px;
|
|
12
|
+
--eds_spacing_xx_small: 2px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/*Compact*/
|
|
16
|
+
[data-spacing-mode='compact'] {
|
|
17
|
+
--eds_spacing_xxx_large: 40px;
|
|
18
|
+
--eds_spacing_xx_large: 32px;
|
|
19
|
+
--eds_spacing_x_large: 40px;
|
|
20
|
+
--eds_spacing_large: 16px;
|
|
21
|
+
--eds_spacing_medium: 12px;
|
|
22
|
+
--eds_spacing_medium_small: 8px;
|
|
23
|
+
--eds_spacing_small: 4px;
|
|
24
|
+
--eds_spacing_x_small: 2px;
|
|
25
|
+
--eds_spacing_xx_small: 0px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/*Extra Compact*/
|
|
29
|
+
[data-spacing-mode='extra-compact'] {
|
|
30
|
+
--eds_spacing_xxx_large: 32px;
|
|
31
|
+
--eds_spacing_xx_large: 24px;
|
|
32
|
+
--eds_spacing_x_large: 16px;
|
|
33
|
+
--eds_spacing_large: 12px;
|
|
34
|
+
--eds_spacing_medium: 8px;
|
|
35
|
+
--eds_spacing_medium_small: 4px;
|
|
36
|
+
--eds_spacing_small: 2px;
|
|
37
|
+
--eds_spacing_x_small: 0px;
|
|
38
|
+
--eds_spacing_xx_small: 0px;
|
|
39
|
+
}
|
|
40
|
+
`;export{s as spacingTokens};
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
declare function formatLatLng(coordinate: number): string;
|
|
2
|
-
declare function formatUtm(coordinate: number, decimals?: number): string;
|
|
3
|
-
declare const _default: {
|
|
4
|
-
formatLatLng: typeof formatLatLng;
|
|
5
|
-
formatUtm: typeof formatUtm;
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
1
|
+
export declare function formatLatLng(coordinate: number): string;
|
|
2
|
+
export declare function formatUtm(coordinate: number, decimals?: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function t(t){const n=t.toString().split(".");return`${n[0]}.${n[1].substring(0,7)}`}function n(t,n=2){const r=t.toString().split(".");return`${r[0]}.${r[1].substring(0,n)}m`}export{t as formatLatLng,n as formatUtm};
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isBetweenDates: (date: Date | string | null | undefined, dates: [Date, Date]) => boolean;
|
|
14
|
-
};
|
|
15
|
-
export default _default;
|
|
1
|
+
export declare const formatDate: (date: Date | string | null | undefined, options?: {
|
|
2
|
+
format: "DD.MM.YYYY" | "DD. month YYYY" | "YYYY-MM-DD" | "DD.MM.YY" | "DD. month";
|
|
3
|
+
month?: "short" | "long";
|
|
4
|
+
useUTC?: boolean;
|
|
5
|
+
}) => string;
|
|
6
|
+
export declare const formatDateTime: (date: Date | string | null | undefined, options?: {
|
|
7
|
+
month?: "short" | "long";
|
|
8
|
+
hideYear?: boolean;
|
|
9
|
+
isGMT?: boolean;
|
|
10
|
+
}) => string;
|
|
11
|
+
export declare const formatRelativeDateTime: (date: Date | string | null | undefined, isGMT?: boolean) => string;
|
|
12
|
+
export declare const isBetweenDates: (date: Date | string | null | undefined, dates: [Date, Date]) => boolean;
|
package/dist/atoms/utils/date.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=(t,e
|
|
1
|
+
const t=(t,e)=>{if(t){const n=new Date(t);if(n.getTime()){if("DD. month YYYY"===e?.format){return`${n.toLocaleDateString("en-GB",{day:"numeric",timeZone:e.useUTC?"UTC":void 0})}. ${n.toLocaleString("en-GB",{month:e?.month??"long",year:"numeric",timeZone:e.useUTC?"UTC":void 0})}`}const t=e?.useUTC?n.getUTCDate():n.getDate(),i=e?.useUTC?n.getUTCMonth()+1:n.getMonth()+1,r=e?.useUTC?n.getUTCFullYear():n.getFullYear();if("DD. month"===e?.format){return`${n.toLocaleDateString("en-GB",{day:"numeric",timeZone:e.useUTC?"UTC":void 0})}. ${n.toLocaleString("en-GB",{month:e.month??"long",timeZone:e.useUTC?"UTC":void 0})}`}return"YYYY-MM-DD"===e?.format?`${r.toString().padStart(4,"0")}-${i.toString().padStart(2,"0")}-${t.toString().padStart(2,"0")}`:"DD.MM.YY"===e?.format?`${t.toString().padStart(2,"0")}.${i.toString().padStart(2,"0")}.${r.toString().padStart(4,"0").slice(-2)}`:`${t.toString().padStart(2,"0")}.${i.toString().padStart(2,"0")}.${r.toString().padStart(4,"0")}`}}return""},e=(t,e={month:"long",hideYear:!1,isGMT:!1})=>{if(t){const n=new Date(t);if(n.getTime()){e.isGMT&&n.setTime(n.getTime()+6e4*n.getTimezoneOffset());return`${n.toLocaleDateString("en-GB",{day:"numeric"})}. ${n.toLocaleString("en-GB",{month:e.month??"long",year:e.hideYear?void 0:"numeric",hour:"2-digit",minute:"2-digit"})}`}}return""},n=(t,n=!1)=>{if(t){const i=new Date(t),r=new Date;if(i.getTime()){n&&i.setTime(i.getTime()+6e4*i.getTimezoneOffset());const o=(i<r?r.getTime()-i.getTime():i.getTime()-r.getTime())/864e5,a=i.toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"});return o<1&&i.getDate()===r.getDate()?`Today at ${a}`:o<2&&i<r?`Yesterday at ${a}`:o<2&&o>=0?`Tomorrow at ${a}`:o>2&&o<7&&i>r?`${i.toLocaleString("en-GB",{weekday:"long"})} at ${a}`:e(t,{hideYear:i.getFullYear()===r.getFullYear()})}}return""},i=(t,e)=>{if(t){if(new Date(t).getTime())return t>=e[0]&&t<=e[1]}return!1};export{t as formatDate,e as formatDateTime,n as formatRelativeDateTime,i as isBetweenDates};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import { ErrorContentType, ErrorType } from '../types/Errors';
|
|
2
2
|
export declare const getListOfErrors: (appName: string) => ErrorContentType[];
|
|
3
3
|
export declare const getErrorContent: (appName: string, errorType?: ErrorType) => ErrorContentType;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
getErrorContent: (appName: string, errorType?: ErrorType) => ErrorContentType;
|
|
6
|
-
getListOfErrors: (appName: string) => ErrorContentType[];
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{ErrorType as e}from"../types/Errors.js";import{GlitchAnimation as o}from"../../organisms/ErrorPage/illustrations/GlitchAnimation.js";import{QuestioningAnimation as i}from"../../organisms/ErrorPage/illustrations/QuestioningAnimation.js";const r=r=>[{type:e.DEFAULT,illustration:t(i,{}),title:"Oops! Something went wrong.",description:"Try again later or use our feedback form if the problem persists."},{type:e.ERROR_400,illustration:t(i,{}),title:"Bad Request, oh no!",description:"We got a little confused by your request. Try again later, or report the bug in the feedback form in the topbar if the problem persist."},{type:e.ERROR_401,illustration:t(o,{}),title:`You don’t have access to ${r}.`,description:`Beep boop, dont worry! You can apply for ${r} in AccessIT`,button:{text:"Apply for access",onClick:()=>window.open("https://accessit.equinor.com/#","_blank")}},{type:e.ERROR_403,illustration:t(o,{}),title:"It looks like you don't have permission to access this page.",description:""},{type:e.ERROR_404,illustration:t(i,{}),title:"Page not found!",description:"It looks like the page you're looking for has gone missing. Please check the URL and try again."},{type:e.ERROR_500,illustration:t(o,{}),title:"Oops, our server just hiccuped!",description:"It looks like the page you're looking for has gone missing. Please check the URL and try again."}],s=(t,o)=>{const i=r(t).find((t=>t.type===o));return i||r(t).find((t=>t.type===e.DEFAULT))};
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{ErrorType as e}from"../types/Errors.js";import{GlitchAnimation as o}from"../../organisms/ErrorPage/illustrations/GlitchAnimation.js";import{QuestioningAnimation as i}from"../../organisms/ErrorPage/illustrations/QuestioningAnimation.js";const r=r=>[{type:e.DEFAULT,illustration:t(i,{}),title:"Oops! Something went wrong.",description:"Try again later or use our feedback form if the problem persists."},{type:e.ERROR_400,illustration:t(i,{}),title:"Bad Request, oh no!",description:"We got a little confused by your request. Try again later, or report the bug in the feedback form in the topbar if the problem persist."},{type:e.ERROR_401,illustration:t(o,{}),title:`You don’t have access to ${r}.`,description:`Beep boop, dont worry! You can apply for ${r} in AccessIT`,button:{text:"Apply for access",onClick:()=>window.open("https://accessit.equinor.com/#","_blank")}},{type:e.ERROR_403,illustration:t(o,{}),title:"It looks like you don't have permission to access this page.",description:""},{type:e.ERROR_404,illustration:t(i,{}),title:"Page not found!",description:"It looks like the page you're looking for has gone missing. Please check the URL and try again."},{type:e.ERROR_500,illustration:t(o,{}),title:"Oops, our server just hiccuped!",description:"It looks like the page you're looking for has gone missing. Please check the URL and try again."}],s=(t,o)=>{const i=r(t).find((t=>t.type===o));return i||r(t).find((t=>t.type===e.DEFAULT))};export{s as getErrorContent,r as getListOfErrors};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e,d){const n=document.querySelector(`link#${e}`),o=document.querySelector(`link#${d}`);const c=window.matchMedia("(prefers-color-scheme:dark)"),t=()=>{c.matches?o&&n&&(document.head.removeChild(n),document.head.appendChild(o)):o&&n&&(document.head.removeChild(o),document.head.appendChild(n))};c.addEventListener("change",t),t()}export{e as setupIcons};
|
|
@@ -1,14 +1,69 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
1
|
+
import * as coordinateTemp from './coordinate';
|
|
2
|
+
import * as dateTemp from './date';
|
|
3
|
+
import * as errorsTemp from './errors';
|
|
4
|
+
import * as faviconTemp from './favicon';
|
|
5
|
+
import * as mapTemp from './map';
|
|
6
|
+
import * as reactQueryTemp from './reactquery';
|
|
7
|
+
import * as richtextTemp from './richtext';
|
|
8
|
+
import * as sizeTemp from './size';
|
|
9
|
+
import * as sortTemp from './sort';
|
|
10
|
+
import * as stringTemp from './string';
|
|
11
|
+
import * as urlTemp from './url';
|
|
12
|
+
export * from './auth_environment';
|
|
13
|
+
export * from './coordinate';
|
|
14
|
+
export * from './date';
|
|
15
|
+
export * from './errors';
|
|
16
|
+
export * from './export';
|
|
17
|
+
export * from './favicon';
|
|
18
|
+
export * from './map';
|
|
19
|
+
export * from './reactquery';
|
|
20
|
+
export * from './richtext';
|
|
21
|
+
export * from './size';
|
|
22
|
+
export * from './sort';
|
|
23
|
+
export * from './string';
|
|
24
|
+
export * from './url';
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated - Use direct export instead
|
|
27
|
+
*/
|
|
28
|
+
declare const coordinate: typeof coordinateTemp;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated - Use direct export instead
|
|
31
|
+
*/
|
|
32
|
+
declare const date: typeof dateTemp;
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated - Use direct export instead
|
|
35
|
+
*/
|
|
36
|
+
declare const errors: typeof errorsTemp;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated - Use direct export instead
|
|
39
|
+
*/
|
|
40
|
+
declare const favicon: typeof faviconTemp;
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated - Use direct export instead
|
|
43
|
+
*/
|
|
44
|
+
declare const map: typeof mapTemp;
|
|
45
|
+
/**
|
|
46
|
+
* @deprecated - Use direct export instead
|
|
47
|
+
*/
|
|
48
|
+
declare const reactquery: typeof reactQueryTemp;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated - Use direct export instead
|
|
51
|
+
*/
|
|
52
|
+
declare const richtext: typeof richtextTemp;
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated - Use direct export instead
|
|
55
|
+
*/
|
|
56
|
+
declare const size: typeof sizeTemp;
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated - Use direct export instead
|
|
59
|
+
*/
|
|
60
|
+
declare const sort: typeof sortTemp;
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated - Use direct export instead
|
|
63
|
+
*/
|
|
64
|
+
declare const string: typeof stringTemp;
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated - Use direct export instead
|
|
67
|
+
*/
|
|
68
|
+
declare const url: typeof urlTemp;
|
|
69
|
+
export { coordinate, date, errors, richtext, reactquery, favicon, map, size, sort, string, url, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as r from"./coordinate.js";export{formatLatLng,formatUtm}from"./coordinate.js";import*as t from"./date.js";export{formatDate,formatDateTime,formatRelativeDateTime,isBetweenDates}from"./date.js";import*as o from"./errors.js";export{getErrorContent,getListOfErrors}from"./errors.js";import*as e from"./favicon.js";export{setupIcons}from"./favicon.js";import*as s from"./map.js";export{convertLatLngToUtm,convertUtmToLatLng,degrees2radians,distanceLatLng,utmProjection}from"./map.js";import*as a from"./reactquery.js";export{defaultQueryOptions}from"./reactquery.js";import*as m from"./richtext.js";export{IMG_WITH_ALT,IMG_WITH_SRC_AND_ALT,cleanRichTextValue,extractImageUrls,getFeatures,imageToB64}from"./richtext.js";import*as i from"./size.js";export{formatBytes,formatDataSize,formatKiloBytes}from"./size.js";import*as f from"./sort.js";export{sortByDate,sortByWellboreName}from"./sort.js";import*as p from"./string.js";export{Empty,capitalize}from"./string.js";import*as n from"./url.js";export{isValidUrl}from"./url.js";export{auth,environment}from"./auth_environment.js";import"html2canvas";const j=r,c=t,x=o,l=e,g=s,u=a,L=m,T=i,d=f,v=p,y=n;export{j as coordinate,c as date,x as errors,l as favicon,g as map,u as reactquery,L as richtext,T as size,d as sort,v as string,y as url};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
+
export declare function degrees2radians(degrees: number): number;
|
|
1
2
|
interface Point {
|
|
2
3
|
lat: number;
|
|
3
4
|
lng: number;
|
|
4
5
|
}
|
|
5
|
-
declare function distanceLatLng(x: Point, y: Point): number;
|
|
6
|
-
declare
|
|
7
|
-
declare function
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
utmProjection: string;
|
|
11
|
-
convertUtmToLatLng: typeof convertUtmToLatLng;
|
|
12
|
-
convertLatLngToUtm: typeof convertLatLngToUtm;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
|
6
|
+
export declare function distanceLatLng(x: Point, y: Point): number;
|
|
7
|
+
export declare const utmProjection = "+proj=utm +zone=31 +ellps=intl +towgs84=-90.365,-101.13,-123.384,0.333,0.077,0.894,1.994 +units=m +no_defs";
|
|
8
|
+
export declare function convertUtmToLatLng(x: string | number, y: string | number): Point;
|
|
9
|
+
export declare function convertLatLngToUtm(coordinate: Point): [number, number];
|
|
10
|
+
export {};
|
package/dist/atoms/utils/map.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"proj4";function n(t){return t*(Math.PI/180)}
|
|
1
|
+
import t from"proj4";function n(t){return t*(Math.PI/180)}function a(t,a){const o=n(a.lat-t.lat),r=n(a.lng-t.lng),s=Math.sin(o/2)*Math.sin(o/2)+Math.cos(n(t.lat))*Math.cos(n(a.lat))*Math.sin(r/2)*Math.sin(r/2);return 6371*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}const o="+proj=utm +zone=31 +ellps=intl +towgs84=-90.365,-101.13,-123.384,0.333,0.077,0.894,1.994 +units=m +no_defs";function r(n,a){const r=t(o,"EPSG:4326",[Number(n),Number(a)]);return{lat:r[1],lng:r[0]}}function s(n){const a=t("EPSG:4326",o,[n.lng,n.lat]);return[a[0],a[1]]}export{s as convertLatLngToUtm,r as convertUtmToLatLng,n as degrees2radians,a as distanceLatLng,o as utmProjection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const o={
|
|
1
|
+
const o={mutations:{onError:o=>{console.error("[ACL - MutationError]",o)}}};export{o as defaultQueryOptions};
|
|
@@ -5,16 +5,9 @@ export interface FeaturesProps {
|
|
|
5
5
|
removeFeatures?: RichTextEditorFeatures[];
|
|
6
6
|
onImageUpload?: OnImageUploadFn;
|
|
7
7
|
}
|
|
8
|
-
declare function getFeatures({ features, extendFeatures, removeFeatures, onImageUpload, }: FeaturesProps): RichTextEditorFeatures[];
|
|
9
|
-
declare
|
|
10
|
-
declare
|
|
11
|
-
declare function
|
|
12
|
-
export declare
|
|
13
|
-
|
|
14
|
-
extractImageUrls: typeof extractImageUrls;
|
|
15
|
-
imageToB64: typeof imageToB64;
|
|
16
|
-
cleanRichTextValue: typeof cleanRichTextValue;
|
|
17
|
-
IMG_WITH_SRC_AND_ALT: RegExp;
|
|
18
|
-
IMG_WITH_ALT: RegExp;
|
|
19
|
-
};
|
|
20
|
-
export {};
|
|
8
|
+
export declare function getFeatures({ features, extendFeatures, removeFeatures, onImageUpload, }: FeaturesProps): RichTextEditorFeatures[];
|
|
9
|
+
export declare const IMG_WITH_SRC_AND_ALT: RegExp;
|
|
10
|
+
export declare const IMG_WITH_ALT: RegExp;
|
|
11
|
+
export declare function extractImageUrls(value: string | undefined): string[];
|
|
12
|
+
export declare function imageToB64(file: File): Promise<string>;
|
|
13
|
+
export declare function cleanRichTextValue(value: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{RichTextEditorFeatures as e,DEFAULT_FEATURES as
|
|
1
|
+
import{RichTextEditorFeatures as e,DEFAULT_FEATURES as r}from"../../molecules/RichTextEditor/RichTextEditor.types.js";function t({features:t,extendFeatures:n,removeFeatures:o,onImageUpload:i}){const a=[...t??r,...n??[]].filter((e=>!o?.includes(e))).filter(((e,r,t)=>r===t.indexOf(e)));if(a.includes(e.IMAGES)&&void 0===i)throw new Error("onImageUpload cannot be undefined when features include images!\n Either add the onImageUpload function or remove RichTextEditorFeatures.IMAGES from the features array");return a}const n=/(<img src=".*?" alt="(.*?)">)/g,o=/(<img alt="(.*?)" \/>)/g;function i(e){if(!e)return[];const r=[],t=e.matchAll(o);for(const e of t)r.push(e[2]);return r}function a(e){return new Promise(((r,t)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>{"string"==typeof n.result&&r(n.result)},n.onerror=t}))}function s(e){return e.replaceAll(n,'<img alt="$2" />')}export{o as IMG_WITH_ALT,n as IMG_WITH_SRC_AND_ALT,s as cleanRichTextValue,i as extractImageUrls,t as getFeatures,a as imageToB64};
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated - Use new 'formatDataSize' instead
|
|
3
|
+
*/
|
|
4
|
+
export declare const formatBytes: (bytes: number, decimals?: number) => string;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated - Use new 'formatDataSize' instead
|
|
7
|
+
*/
|
|
8
|
+
export declare const formatKiloBytes: (kiloBytes: number, decimals?: number) => string;
|
|
9
|
+
type InputFormats = 'B' | 'KiB' | 'MiB' | 'GiB' | 'TiB' | 'PiB' | 'EiB' | 'ZiB' | 'YiB';
|
|
10
|
+
interface FormatDataSizeParams {
|
|
11
|
+
size: number;
|
|
12
|
+
decimals?: number;
|
|
13
|
+
inputFormat?: InputFormats;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @param size - Size in whatever the input format is set to
|
|
17
|
+
* @param decimals - Amount of decimals to round to, defaults to 2
|
|
18
|
+
* @param inputFormat - The format that size is in, defaults to 'KiB'
|
|
19
|
+
* @returns - Formatted data size to human readable, i.e. '1024 KiB' = '1 MiB'
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatDataSize({ size, decimals, inputFormat, }: FormatDataSizeParams): string;
|
|
22
|
+
export {};
|
package/dist/atoms/utils/size.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const t=1024,
|
|
1
|
+
const t=1024,i=(i,e=2)=>{if(i<0)return"0 Bytes";if(0===i)return"0 Bytes";if(1===i)return"1 Byte";const r=e<0?0:e,o=Math.floor(Math.log(i)/Math.log(t));return parseFloat((i/Math.pow(t,o)).toFixed(r))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][o]},e=(e,r=2)=>i(e*t,r),r=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];function o({size:t,decimals:i=2,inputFormat:e="KiB"}){if(t<0)throw new Error("Invalid size, must be a positive integer");if(i<0)throw new Error("Invalid decimals, must be a positive integer");if(0===t)return`${t} ${e}`;const o=r.indexOf(e),B=t*Math.pow(1024,o),a=Math.floor(Math.log(B)/Math.log(1024));return`${parseFloat((B/Math.pow(1024,a)).toFixed(i))} ${r[a]}`}export{i as formatBytes,o as formatDataSize,e as formatKiloBytes};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
declare function sortByDate(a: Date | string, b: Date | string): number;
|
|
1
|
+
export declare function sortByDate(a: Date | string, b: Date | string): number;
|
|
2
2
|
interface WellBore {
|
|
3
3
|
wellboreName?: string | null;
|
|
4
4
|
}
|
|
5
|
-
declare function sortByWellboreName(a: string | WellBore, b: string | WellBore): number;
|
|
6
|
-
|
|
7
|
-
sortByDate: typeof sortByDate;
|
|
8
|
-
sortByWellboreName: typeof sortByWellboreName;
|
|
9
|
-
};
|
|
10
|
-
export default _default;
|
|
5
|
+
export declare function sortByWellboreName(a: string | WellBore, b: string | WellBore): number;
|
|
6
|
+
export {};
|
package/dist/atoms/utils/sort.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(e,t){const n="string"==typeof e?new Date(e):e,o="string"==typeof t?new Date(t):t;return n>o?-1:n<o?1:0}function t(e,t){const n="string"==typeof e?e:e.wellboreName,o="string"==typeof t?t:t.wellboreName;return n&&o?n.localeCompare(o,void 0,{numeric:!0,sensitivity:"base"}):0}export{e as sortByDate,t as sortByWellboreName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const t="",o=t=>t.toLowerCase().split(" ").map((t=>t.charAt(0).toUpperCase()+t.substring(1))).join(" ");export{t as Empty,o as capitalize};
|
package/dist/atoms/utils/url.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function d(d){return new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(d)}export{d as isValidUrl};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{jsx as o,jsxs as
|
|
1
|
+
import{jsx as o,jsxs as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{Button as i,TextField as s,Icon as n}from"@equinor/eds-core-react";import{delete_to_trash as a}from"@equinor/eds-icons";import{tokens as m}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../../molecules/RichTextEditor/custom-extensions/AmplifyKit.js";import"../../molecules/RichTextEditor/RichTextEditor.types.js";import{useDebounce as d}from"../../atoms/hooks/useDebounce.js";import"../../node_modules/lodash/lodash.js";import"@equinor/subsurface-app-management";import"@tanstack/react-query";import{date as p}from"../../atoms/utils/index.js";import"@microsoft/signalr";import"../../atoms/types/Environment.js";import"../../atoms/utils/auth_environment.js";import"../../organisms/TopBar/Notifications/NotificationProvider.js";import"../../providers/AuthProvider/AuthProvider.js";import"../../providers/SideBarProvider.js";import"../../providers/SnackbarProvider.js";import"../../providers/TableOfContentsProvider.js";import"../../providers/TutorialStepsProvider.js";import"../../atoms/style/colors.js";import{spacings as l}from"../../atoms/style/spacings.js";import c from"styled-components";const{colors:u}=m,g=c.div`
|
|
2
2
|
padding-left: ${l.small};
|
|
3
3
|
margin-bottom: ${l.small};
|
|
4
4
|
padding-top: 1em;
|
|
5
|
-
`,
|
|
5
|
+
`,v=c.div`
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
|
-
`,
|
|
8
|
+
`,f=c.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
position: relative;
|
|
11
11
|
align-items: center;
|
|
12
12
|
width: 100%;
|
|
13
13
|
padding-top: 3px;
|
|
14
14
|
padding-bottom: 3px;
|
|
15
|
-
`,
|
|
15
|
+
`,h=c(i)`
|
|
16
16
|
color: ${u.text.static_icons__tertiary.rgba};
|
|
17
17
|
margin-top: 4px;
|
|
18
18
|
width: ${l.xxx_large};
|
|
@@ -37,4 +37,4 @@ import{jsx as o,jsxs as t}from"react/jsx-runtime";import{useState as r,useEffect
|
|
|
37
37
|
box-shadow: inset 0 -2px 0 0 ${u.interactive.primary__resting.rgba};
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,b=({value:i,createdDate:s,onChange:m,onDelete:l,id:c})=>{const[b,j]=t(i),_=d(b,600);return r((()=>{_!==i&&m(_)}),[_,i,m]),o(g,{children:o(v,{children:e(f,{children:[o(x,{id:`comment-${c}`,autoComplete:"off",label:`Posted ${p.formatDateTime(s)}`,value:b,placeholder:"Write comment here",onInput:o=>{const e=o.target.value;j(e)}}),o(h,{variant:"ghost_icon",onClick:()=>l(c),children:o(n,{name:"delete",size:24,color:u.interactive.primary__resting.rgba,data:a})})]})})})};export{b as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as i,jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{Dialog as e,Button as n,Icon as s,Typography as a}from"@equinor/eds-core-react";import{close as r}from"@equinor/eds-icons";import{spacings as l}from"../atoms/style/spacings.js";import d from"styled-components";const m=d(e)`
|
|
1
|
+
import{jsxs as i,jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"react";import{Dialog as e,Button as n,Icon as s,Typography as a}from"@equinor/eds-core-react";import{close as r}from"@equinor/eds-icons";import"../atoms/style/colors.js";import{spacings as l}from"../atoms/style/spacings.js";import d from"styled-components";const m=d(e)`
|
|
2
2
|
min-width: 400px;
|
|
3
3
|
`,c=d(n)`
|
|
4
4
|
min-width: 40px;
|
|
@@ -19,4 +19,4 @@ import{jsxs as i,jsx as t}from"react/jsx-runtime";import{forwardRef as o}from"re
|
|
|
19
19
|
|
|
20
20
|
margin-right: ${i=>"left"===i.$actionPosition?l.x_small:void 0};
|
|
21
21
|
}
|
|
22
|
-
`,h=o((({show:o,title:n,body:l,actions:d,actionPosition:h="right",onClose:g,children:x,width:
|
|
22
|
+
`,h=o((({show:o,title:n,body:l,actions:d,actionPosition:h="right",onClose:g,children:x,width:y="400px",isDismissable:u=!0},$)=>o?i(m,{ref:$,open:o,style:{width:y},isDismissable:u,onClose:g,children:[i(p,{"data-testid":"dialog-header",children:[n,t(c,{variant:"ghost_icon",onClick:g,children:t(s,{data:r})})]}),i(e.CustomContent,{children:[l&&t(a,{variant:"body_short",children:l}),x]}),t(f,{"data-testid":`confirmation-actions-${h}`,$actionPosition:h,children:d})]}):null));h.displayName="ConfirmationPopup";export{h as default};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as o}from"react";import{Card as t,Typography as i,Tooltip as n,Icon as a}from"@equinor/eds-core-react";import{tokens as l}from"../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import s from"styled-components";import"../atoms/style/colors.js";import{spacings as d}from"../atoms/style/spacings.js";const{colors:c,elevation:m}=l,p=s(t)`
|
|
2
2
|
box-shadow: ${m.raised};
|
|
3
3
|
grid-gap: 0;
|
|
4
|
-
padding: ${
|
|
4
|
+
padding: ${d.medium};
|
|
5
5
|
transition: box-shadow 400ms;
|
|
6
6
|
${e=>{if(e.onClick)return`&:hover {\n box-shadow: ${m.overlay};\n cursor: pointer;\n }`}}
|
|
7
|
-
`,h=
|
|
7
|
+
`,h=s.div`
|
|
8
8
|
display: grid;
|
|
9
9
|
grid-template-columns: 80% auto;
|
|
10
10
|
overflow: hidden;
|
|
11
|
-
`,f=
|
|
11
|
+
`,f=s(i)`
|
|
12
12
|
white-space: nowrap;
|
|
13
13
|
overflow: hidden;
|
|
14
14
|
text-overflow: ellipsis;
|
|
15
|
-
`,u=
|
|
15
|
+
`,u=s.div`
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-direction: column;
|
|
18
18
|
justify-content: center;
|
|
19
|
-
`,v=
|
|
19
|
+
`,v=s.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
align-items: center;
|
|
22
22
|
justify-content: flex-end;
|
|
23
|
-
`,g=
|
|
23
|
+
`,g=s(i)`
|
|
24
24
|
white-space: nowrap;
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
text-overflow: ellipsis;
|
|
27
|
-
`,x=
|
|
27
|
+
`,x=o((({headerText:o,title:t,tooltipOnTitle:i=!1,rightIcon:l,rightElement:s,body:d,className:m,onClick:x,onContextMenu:w},y)=>{if(l&&s)throw new Error("Only use one; rightIcon or rightElement");return e(p,{ref:y,className:m??"",onClick:x,"data-testid":"dataCard",onContextMenu:e=>{w?.(e)},children:[e(h,{children:[e(u,{children:[r(f,{group:"paragraph",variant:"overline",children:o}),i?r(n,{title:t,placement:"top",children:r(g,{variant:"h6",children:t})}):r(g,{variant:"h6",children:t})]}),e(v,{children:[l&&r(a,{data:l,size:24,color:c.interactive.primary__resting.rgba}),s&&s]})]}),d&&d]})}));x.displayName="DataCard";export{x as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as n}from"react";import{Icon as r,TextField as a,Typography as s}from"@equinor/eds-core-react";import{edit as d}from"@equinor/eds-icons";import{tokens as l}from"../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../atoms/style/colors.js";import{spacings as c}from"../atoms/style/spacings.js";import m from"styled-components";const{colors:u}=l,p=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
|
|
4
4
|
&:hover {
|
|
@@ -17,4 +17,4 @@ import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{useState
|
|
|
17
17
|
div:focus-within {
|
|
18
18
|
outline: none;
|
|
19
19
|
}
|
|
20
|
-
`,h=({editable:r,value:a,inputField:l,onChange:c,children:m})=>{const[h,b]=
|
|
20
|
+
`,h=({editable:r,value:a,inputField:l,onChange:c,children:m})=>{const[h,b]=o(!1),[v,x]=o(a);n((()=>{x(a)}),[a]),n((()=>{r||b(!1)}),[r]);return e(p,{$editable:r,"data-testid":"editablefield",onClick:()=>{r&&(h||b(!0))},children:[!h&&!m&&i(s,{variant:"h6",children:v}),!h&&m&&m,h&&i(t,{children:l||i(g,{autoFocus:!0,$editing:h,id:`edit-${a}`,onBlur:e=>{c&&c(e.target.value),b(!1)},onChange:e=>{x(e.target.value)},value:v})}),r&&!h&&i(f,{"data-testid":"editableicon",color:u.interactive.primary__resting.rgba,data:d})]})};export{h as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as i}from"react/jsx-runtime";import{forwardRef as r}from"react";import{Icon as e,Typography as a}from"@equinor/eds-core-react";import{tokens as o}from"../../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import"../../atoms/style/colors.js";import{spacings as n}from"../../atoms/style/spacings.js";import{motion as s}from"framer-motion";import l from"styled-components";const{colors:c,shape:m}=o,p=l.div`
|
|
2
2
|
position: relative;
|
|
3
3
|
height: 48px;
|
|
4
4
|
width: 48px;
|
|
@@ -21,4 +21,4 @@ import{jsx as i,jsxs as t}from"react/jsx-runtime";import{forwardRef as r}from"re
|
|
|
21
21
|
color: ${c.text.static_icons__primary_white.rgba};
|
|
22
22
|
white-space: nowrap;
|
|
23
23
|
}
|
|
24
|
-
`),g={closed_left:{width:"48px",left:0,background:c.interactive.primary__resting.rgba},open_left:{width:"auto",left:0,background:c.interactive.primary__hover.rgba},closed_right:{width:"48px",right:0,background:c.interactive.primary__resting.rgba},open_right:{width:"auto",right:0,background:c.interactive.primary__hover.rgba}},h=r((({text:r,icon:o,onClick:s,className:l,iconPosition:m="left"},h)=>
|
|
24
|
+
`),g={closed_left:{width:"48px",left:0,background:c.interactive.primary__resting.rgba},open_left:{width:"auto",left:0,background:c.interactive.primary__hover.rgba},closed_right:{width:"48px",right:0,background:c.interactive.primary__resting.rgba},open_right:{width:"auto",right:0,background:c.interactive.primary__hover.rgba}},h=r((({text:r,icon:o,onClick:s,className:l,iconPosition:m="left"},h)=>t(p,"left"===m?{ref:h,className:l,children:i(d,{variants:g,initial:"closed_left",whileHover:"open_left",onClick:s,children:[t(e,{style:{left:"24px",transform:"translate(-50%, 0)"},data:o,size:24,color:c.text.static_icons__primary_white.rgba}),t(a,{variant:"button",group:"navigation",as:"span",style:{marginLeft:`calc(48px - ${n.x_small})`,marginRight:n.large},children:r})]})}:{ref:h,className:l,children:i(d,{variants:g,initial:"closed_right",whileHover:"open_right",onClick:s,children:[t(a,{variant:"button",group:"navigation",as:"span",style:{marginLeft:n.medium,marginRight:`calc(48px + ${n.x_small})`},children:r}),t(e,{style:{right:"24px",transform:"translate(50%, 0)"},data:o,size:24,color:c.text.static_icons__primary_white.rgba})]})})));h.displayName="ExpandingIconButton";export{h as ExpandingIconButton};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as o,useState as i,useRef as t,useEffect as n}from"react";import{Typography as d,Icon as s}from"@equinor/eds-core-react";import{chevron_up as a,chevron_down as c}from"@equinor/eds-icons";import{tokens as m}from"../node_modules/@equinor/eds-tokens/dist/esm/base/index.js";import{motion as l,AnimatePresence as h}from"framer-motion";import p from"styled-components";import"../atoms/style/colors.js";import{spacings as f}from"../atoms/style/spacings.js";const{colors:u,elevation:b,shape:v}=m,g=p(l.div)`
|
|
2
2
|
overflow: hidden;
|
|
3
|
-
`,x=
|
|
3
|
+
`,x=p.button`
|
|
4
4
|
display: flex;
|
|
5
|
-
gap: ${
|
|
5
|
+
gap: ${f.medium};
|
|
6
6
|
width: fit-content;
|
|
7
7
|
border: none;
|
|
8
8
|
background: none;
|
|
@@ -12,10 +12,10 @@ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as i,useStat
|
|
|
12
12
|
box-shadow: ${b.overlay};
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
`,y=
|
|
15
|
+
`,y=p.div`
|
|
16
16
|
transition: box-shadow 200ms;
|
|
17
17
|
box-shadow: ${b.raised};
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: center;
|
|
20
20
|
border-radius: ${v.circle.borderRadius};
|
|
21
|
-
`,w=
|
|
21
|
+
`,w=o((({title:o,openByDefault:m=!1,id:l,children:p},f)=>{const[b,v]=i(m),w=t(m?"fit-content":0);return n((()=>{"fit-content"!==w.current||b||(w.current=0)}),[b]),e("div",{children:[e(x,{onClick:()=>v((e=>!e)),children:[r(d,{variant:"h6",ref:f,id:l,children:o}),r(y,{children:r(s,{data:b?a:c,color:u.interactive.primary__resting.rgba})})]}),r(h,{children:b&&r(g,{initial:{height:w.current},animate:{height:"fit-content"},exit:{height:0},children:p})})]})}));w.displayName="HeaderDrawer";export{w as default};
|