@entur-partner/common 9.3.3-alpha.0 → 9.3.3-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionBar.d.ts +9 -9
- package/dist/AuditInfo.d.ts +14 -14
- package/dist/Box.d.ts +57 -57
- package/dist/Breadcrumbs.d.ts +8 -8
- package/dist/ConfirmModal.d.ts +28 -28
- package/dist/Content.d.ts +10 -10
- package/dist/EnturPartnerLogo.d.ts +19 -19
- package/dist/ErrorBoundary.d.ts +22 -22
- package/dist/ExpandableMultiLanguageInput.d.ts +17 -17
- package/dist/FeatureToggle.d.ts +25 -25
- package/dist/FormatCurrencyAmount.d.ts +8 -8
- package/dist/FormatDateTime.d.ts +7 -7
- package/dist/LanguageSelect.d.ts +16 -16
- package/dist/LegacyPageTitle.d.ts +16 -0
- package/dist/Link.d.ts +6 -6
- package/dist/LinkButton.d.ts +8 -8
- package/dist/Menu.d.ts +10 -10
- package/dist/MultiLanguageInput.d.ts +28 -28
- package/dist/OrganisationDropdown.d.ts +14 -14
- package/dist/PageTitle.d.ts +6 -15
- package/dist/Pager.d.ts +8 -8
- package/dist/PermissionCheck.d.ts +24 -24
- package/dist/RouteLeavingGuard.d.ts +14 -14
- package/dist/Stack.d.ts +9 -9
- package/dist/StatusLabel.d.ts +11 -11
- package/dist/Text.d.ts +21 -21
- package/dist/Unbutton.d.ts +7 -7
- package/dist/UserMenu/components/CookieSettingsMenuItem.d.ts +9 -9
- package/dist/UserMenu/components/CustomOverflowMenu.d.ts +11 -11
- package/dist/UserMenu/components/CustomOverflowMenuItem.d.ts +3 -3
- package/dist/UserMenu/components/LanguageSwitchMenuItem.d.ts +10 -10
- package/dist/UserMenu/components/LogOutMenuItem.d.ts +9 -9
- package/dist/UserMenu/components/UserMenuItem.d.ts +9 -9
- package/dist/UserMenu/components/VersionMenuItem.d.ts +5 -5
- package/dist/UserMenu/index.d.ts +26 -25
- package/dist/UserMenu/useOutsideClick.d.ts +2 -2
- package/dist/common.cjs.development.js +199 -191
- package/dist/common.cjs.development.js.map +1 -1
- package/dist/common.cjs.production.min.js +1 -1
- package/dist/common.cjs.production.min.js.map +1 -1
- package/dist/common.esm.js +79 -67
- package/dist/common.esm.js.map +1 -1
- package/dist/environment.d.ts +13 -13
- package/dist/index.d.ts +31 -30
- package/dist/styles.css +185 -185
- package/dist/useEventListener.d.ts +3 -3
- package/package.json +6 -7
package/dist/ActionBar.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./ActionBar.scss";
|
|
2
|
-
import React, { type ReactNode } from "react";
|
|
3
|
-
export interface ActionBarProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
}
|
|
6
|
-
declare const ActionBarLeft: ({ children }: ActionBarProps) => React.JSX.Element;
|
|
7
|
-
declare const ActionBarRight: ({ children }: ActionBarProps) => React.JSX.Element;
|
|
8
|
-
declare const ActionBar: ({ children }: ActionBarProps) => React.JSX.Element;
|
|
9
|
-
export { ActionBar, ActionBarLeft, ActionBarRight };
|
|
1
|
+
import "./ActionBar.scss";
|
|
2
|
+
import React, { type ReactNode } from "react";
|
|
3
|
+
export interface ActionBarProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const ActionBarLeft: ({ children }: ActionBarProps) => React.JSX.Element;
|
|
7
|
+
declare const ActionBarRight: ({ children }: ActionBarProps) => React.JSX.Element;
|
|
8
|
+
declare const ActionBar: ({ children }: ActionBarProps) => React.JSX.Element;
|
|
9
|
+
export { ActionBar, ActionBarLeft, ActionBarRight };
|
package/dist/AuditInfo.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./AuditInfo.scss";
|
|
2
|
-
import { type FC } from "react";
|
|
3
|
-
interface Item {
|
|
4
|
-
label: string;
|
|
5
|
-
value: Date | string;
|
|
6
|
-
}
|
|
7
|
-
export interface AuditInfoProps {
|
|
8
|
-
items: Item[];
|
|
9
|
-
locale: string;
|
|
10
|
-
className?: string;
|
|
11
|
-
[key: string]: object | string | number | boolean | undefined;
|
|
12
|
-
}
|
|
13
|
-
export declare const AuditInfo: FC<AuditInfoProps>;
|
|
14
|
-
export {};
|
|
1
|
+
import "./AuditInfo.scss";
|
|
2
|
+
import { type FC } from "react";
|
|
3
|
+
interface Item {
|
|
4
|
+
label: string;
|
|
5
|
+
value: Date | string;
|
|
6
|
+
}
|
|
7
|
+
export interface AuditInfoProps {
|
|
8
|
+
items: Item[];
|
|
9
|
+
locale: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const AuditInfo: FC<AuditInfoProps>;
|
|
14
|
+
export {};
|
package/dist/Box.d.ts
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import "./Box.scss";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
import React from "react";
|
|
4
|
-
type StyleSpacing = "none" | "extraSmall2" | "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4" | "extraLarge5" | "extraLarge6" | "extraLarge7" | "extraLarge8" | "extraLarge9";
|
|
5
|
-
type StyleMargin = StyleSpacing | "auto";
|
|
6
|
-
type StyleDisplay = "block" | "flex" | "inline" | "inline-block";
|
|
7
|
-
type StyleJustifyContent = "center" | "space-between" | "start" | "end";
|
|
8
|
-
type StyleAlignItems = "center" | "start" | "end" | "stretch" | "baseline";
|
|
9
|
-
type StyleMaxWidth = "none" | "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4" | "extraLarge5" | "extraLarge6" | "full";
|
|
10
|
-
type StyleWidth = "auto" | "full";
|
|
11
|
-
export type StyleBackground = "blue" | "lavender" | "white" | "blue70";
|
|
12
|
-
export type StyleColor = "blue" | "lavender" | "white" | "black";
|
|
13
|
-
type StyleFlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
|
14
|
-
type StyleFlexWrap = "wrap" | "nowrap" | "wrap-reverse";
|
|
15
|
-
export type ResponsiveStyleSpacing = StyleSpacing | [StyleSpacing?, StyleSpacing?, StyleSpacing?];
|
|
16
|
-
export type ResponsiveStyleMargin = StyleMargin | [StyleMargin?, StyleMargin?, StyleMargin?];
|
|
17
|
-
export type ResponsiveStyleDisplay = StyleDisplay | [StyleDisplay?, StyleDisplay?, StyleDisplay?];
|
|
18
|
-
export type ResponsiveStyleJustifyContent = StyleJustifyContent | [StyleJustifyContent?, StyleJustifyContent?, StyleJustifyContent?];
|
|
19
|
-
export type ResponsiveStyleAlignItems = StyleAlignItems | [StyleAlignItems?, StyleAlignItems?, StyleAlignItems?];
|
|
20
|
-
export type ResponsiveStyleMaxWidth = StyleMaxWidth | [StyleMaxWidth?, StyleMaxWidth?, StyleMaxWidth?];
|
|
21
|
-
export type ResponsiveStyleWidth = StyleWidth | [StyleWidth?, StyleWidth?, StyleWidth?];
|
|
22
|
-
export type ResponsiveStyleFlexDirection = StyleFlexDirection | [StyleFlexDirection?, StyleFlexDirection?, StyleFlexDirection?];
|
|
23
|
-
export type ResponsiveStyleFlexWrap = StyleFlexWrap | [StyleFlexWrap?, StyleFlexWrap?, StyleFlexWrap?];
|
|
24
|
-
export interface BoxProps {
|
|
25
|
-
className?: string;
|
|
26
|
-
as?: React.ElementType;
|
|
27
|
-
[key: string]: object | string | number | boolean | undefined | ReactNode;
|
|
28
|
-
children: ReactNode;
|
|
29
|
-
contrast?: boolean;
|
|
30
|
-
paddingTop?: ResponsiveStyleSpacing;
|
|
31
|
-
paddingRight?: ResponsiveStyleSpacing;
|
|
32
|
-
paddingBottom?: ResponsiveStyleSpacing;
|
|
33
|
-
paddingLeft?: ResponsiveStyleSpacing;
|
|
34
|
-
paddingX?: ResponsiveStyleSpacing;
|
|
35
|
-
paddingY?: ResponsiveStyleSpacing;
|
|
36
|
-
padding?: ResponsiveStyleSpacing;
|
|
37
|
-
marginTop?: ResponsiveStyleMargin;
|
|
38
|
-
marginRight?: ResponsiveStyleMargin;
|
|
39
|
-
marginBottom?: ResponsiveStyleMargin;
|
|
40
|
-
marginLeft?: ResponsiveStyleMargin;
|
|
41
|
-
marginX?: ResponsiveStyleMargin;
|
|
42
|
-
marginY?: ResponsiveStyleMargin;
|
|
43
|
-
margin?: ResponsiveStyleMargin;
|
|
44
|
-
display?: ResponsiveStyleDisplay;
|
|
45
|
-
justifyContent?: ResponsiveStyleJustifyContent;
|
|
46
|
-
alignItems?: ResponsiveStyleAlignItems;
|
|
47
|
-
maxWidth?: ResponsiveStyleMaxWidth;
|
|
48
|
-
width?: ResponsiveStyleWidth;
|
|
49
|
-
background?: StyleBackground;
|
|
50
|
-
color?: StyleColor;
|
|
51
|
-
flexDirection?: ResponsiveStyleFlexDirection;
|
|
52
|
-
flexWrap?: ResponsiveStyleFlexWrap;
|
|
53
|
-
}
|
|
54
|
-
type ResponsiveProp = string | [string?, string?, string?];
|
|
55
|
-
export declare function responsiveProp(prefix: string, prop: ResponsiveProp): string[];
|
|
56
|
-
export declare const Box: ({ as: Component, children, contrast, paddingTop, paddingRight, paddingBottom, paddingLeft, paddingX, paddingY, padding, marginTop, marginRight, marginBottom, marginLeft, marginX, marginY, margin, display, justifyContent, alignItems, maxWidth, width, background, color, flexDirection, flexWrap, className, ...rest }: BoxProps) => React.JSX.Element;
|
|
57
|
-
export {};
|
|
1
|
+
import "./Box.scss";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
type StyleSpacing = "none" | "extraSmall2" | "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4" | "extraLarge5" | "extraLarge6" | "extraLarge7" | "extraLarge8" | "extraLarge9";
|
|
5
|
+
type StyleMargin = StyleSpacing | "auto";
|
|
6
|
+
type StyleDisplay = "block" | "flex" | "inline" | "inline-block";
|
|
7
|
+
type StyleJustifyContent = "center" | "space-between" | "start" | "end";
|
|
8
|
+
type StyleAlignItems = "center" | "start" | "end" | "stretch" | "baseline";
|
|
9
|
+
type StyleMaxWidth = "none" | "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4" | "extraLarge5" | "extraLarge6" | "full";
|
|
10
|
+
type StyleWidth = "auto" | "full";
|
|
11
|
+
export type StyleBackground = "blue" | "lavender" | "white" | "blue70";
|
|
12
|
+
export type StyleColor = "blue" | "lavender" | "white" | "black";
|
|
13
|
+
type StyleFlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
|
14
|
+
type StyleFlexWrap = "wrap" | "nowrap" | "wrap-reverse";
|
|
15
|
+
export type ResponsiveStyleSpacing = StyleSpacing | [StyleSpacing?, StyleSpacing?, StyleSpacing?];
|
|
16
|
+
export type ResponsiveStyleMargin = StyleMargin | [StyleMargin?, StyleMargin?, StyleMargin?];
|
|
17
|
+
export type ResponsiveStyleDisplay = StyleDisplay | [StyleDisplay?, StyleDisplay?, StyleDisplay?];
|
|
18
|
+
export type ResponsiveStyleJustifyContent = StyleJustifyContent | [StyleJustifyContent?, StyleJustifyContent?, StyleJustifyContent?];
|
|
19
|
+
export type ResponsiveStyleAlignItems = StyleAlignItems | [StyleAlignItems?, StyleAlignItems?, StyleAlignItems?];
|
|
20
|
+
export type ResponsiveStyleMaxWidth = StyleMaxWidth | [StyleMaxWidth?, StyleMaxWidth?, StyleMaxWidth?];
|
|
21
|
+
export type ResponsiveStyleWidth = StyleWidth | [StyleWidth?, StyleWidth?, StyleWidth?];
|
|
22
|
+
export type ResponsiveStyleFlexDirection = StyleFlexDirection | [StyleFlexDirection?, StyleFlexDirection?, StyleFlexDirection?];
|
|
23
|
+
export type ResponsiveStyleFlexWrap = StyleFlexWrap | [StyleFlexWrap?, StyleFlexWrap?, StyleFlexWrap?];
|
|
24
|
+
export interface BoxProps {
|
|
25
|
+
className?: string;
|
|
26
|
+
as?: React.ElementType;
|
|
27
|
+
[key: string]: object | string | number | boolean | undefined | ReactNode;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
contrast?: boolean;
|
|
30
|
+
paddingTop?: ResponsiveStyleSpacing;
|
|
31
|
+
paddingRight?: ResponsiveStyleSpacing;
|
|
32
|
+
paddingBottom?: ResponsiveStyleSpacing;
|
|
33
|
+
paddingLeft?: ResponsiveStyleSpacing;
|
|
34
|
+
paddingX?: ResponsiveStyleSpacing;
|
|
35
|
+
paddingY?: ResponsiveStyleSpacing;
|
|
36
|
+
padding?: ResponsiveStyleSpacing;
|
|
37
|
+
marginTop?: ResponsiveStyleMargin;
|
|
38
|
+
marginRight?: ResponsiveStyleMargin;
|
|
39
|
+
marginBottom?: ResponsiveStyleMargin;
|
|
40
|
+
marginLeft?: ResponsiveStyleMargin;
|
|
41
|
+
marginX?: ResponsiveStyleMargin;
|
|
42
|
+
marginY?: ResponsiveStyleMargin;
|
|
43
|
+
margin?: ResponsiveStyleMargin;
|
|
44
|
+
display?: ResponsiveStyleDisplay;
|
|
45
|
+
justifyContent?: ResponsiveStyleJustifyContent;
|
|
46
|
+
alignItems?: ResponsiveStyleAlignItems;
|
|
47
|
+
maxWidth?: ResponsiveStyleMaxWidth;
|
|
48
|
+
width?: ResponsiveStyleWidth;
|
|
49
|
+
background?: StyleBackground;
|
|
50
|
+
color?: StyleColor;
|
|
51
|
+
flexDirection?: ResponsiveStyleFlexDirection;
|
|
52
|
+
flexWrap?: ResponsiveStyleFlexWrap;
|
|
53
|
+
}
|
|
54
|
+
type ResponsiveProp = string | [string?, string?, string?];
|
|
55
|
+
export declare function responsiveProp(prefix: string, prop: ResponsiveProp): string[];
|
|
56
|
+
export declare const Box: ({ as: Component, children, contrast, paddingTop, paddingRight, paddingBottom, paddingLeft, paddingX, paddingY, padding, marginTop, marginRight, marginBottom, marginLeft, marginX, marginY, margin, display, justifyContent, alignItems, maxWidth, width, background, color, flexDirection, flexWrap, className, ...rest }: BoxProps) => React.JSX.Element;
|
|
57
|
+
export {};
|
package/dist/Breadcrumbs.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./Breadcrumbs.scss";
|
|
2
|
-
import { type FC, type ReactElement } from "react";
|
|
3
|
-
export interface BreadcrumbsProps {
|
|
4
|
-
pathname: string;
|
|
5
|
-
onBreadcrumbLookup: (path: string) => string | undefined;
|
|
6
|
-
prependBreadcrumbItem?: ReactElement;
|
|
7
|
-
}
|
|
8
|
-
export declare const Breadcrumbs: FC<BreadcrumbsProps>;
|
|
1
|
+
import "./Breadcrumbs.scss";
|
|
2
|
+
import { type FC, type ReactElement } from "react";
|
|
3
|
+
export interface BreadcrumbsProps {
|
|
4
|
+
pathname: string;
|
|
5
|
+
onBreadcrumbLookup: (path: string) => string | undefined;
|
|
6
|
+
prependBreadcrumbItem?: ReactElement;
|
|
7
|
+
}
|
|
8
|
+
export declare const Breadcrumbs: FC<BreadcrumbsProps>;
|
package/dist/ConfirmModal.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import "./ConfirmModal.scss";
|
|
2
|
-
import { type ModalProps } from "@entur/modal";
|
|
3
|
-
import type { FC, ReactNode } from "react";
|
|
4
|
-
import React from "react";
|
|
5
|
-
export interface BaseConfirmModalProps extends Partial<ModalProps> {
|
|
6
|
-
title: string;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
closeLabel: string;
|
|
9
|
-
/** Deprecated use children prop */
|
|
10
|
-
message?: ReactNode;
|
|
11
|
-
/** Deprecated use open prop */
|
|
12
|
-
isOpen?: boolean;
|
|
13
|
-
/** Deprecated use onDismiss prop */
|
|
14
|
-
onClose?: () => void;
|
|
15
|
-
}
|
|
16
|
-
interface CustomConfirmModalButtons extends BaseConfirmModalProps {
|
|
17
|
-
buttons: ReactNode[];
|
|
18
|
-
}
|
|
19
|
-
interface DefaultConfirmModalHandler extends BaseConfirmModalProps {
|
|
20
|
-
onConfirm: () => void;
|
|
21
|
-
messages: {
|
|
22
|
-
confirm: string;
|
|
23
|
-
cancel: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export type ConfirmModalProps = CustomConfirmModalButtons | DefaultConfirmModalHandler;
|
|
27
|
-
export declare const ConfirmModal: FC<ConfirmModalProps>;
|
|
28
|
-
export {};
|
|
1
|
+
import "./ConfirmModal.scss";
|
|
2
|
+
import { type ModalProps } from "@entur/modal";
|
|
3
|
+
import type { FC, ReactNode } from "react";
|
|
4
|
+
import React from "react";
|
|
5
|
+
export interface BaseConfirmModalProps extends Partial<ModalProps> {
|
|
6
|
+
title: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
closeLabel: string;
|
|
9
|
+
/** Deprecated use children prop */
|
|
10
|
+
message?: ReactNode;
|
|
11
|
+
/** Deprecated use open prop */
|
|
12
|
+
isOpen?: boolean;
|
|
13
|
+
/** Deprecated use onDismiss prop */
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
}
|
|
16
|
+
interface CustomConfirmModalButtons extends BaseConfirmModalProps {
|
|
17
|
+
buttons: ReactNode[];
|
|
18
|
+
}
|
|
19
|
+
interface DefaultConfirmModalHandler extends BaseConfirmModalProps {
|
|
20
|
+
onConfirm: () => void;
|
|
21
|
+
messages: {
|
|
22
|
+
confirm: string;
|
|
23
|
+
cancel: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export type ConfirmModalProps = CustomConfirmModalButtons | DefaultConfirmModalHandler;
|
|
27
|
+
export declare const ConfirmModal: FC<ConfirmModalProps>;
|
|
28
|
+
export {};
|
package/dist/Content.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./Content.scss";
|
|
2
|
-
import type { FC, ReactNode } from "react";
|
|
3
|
-
import React from "react";
|
|
4
|
-
interface ContentProps {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
as?: "main" | React.ElementType;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const Content: FC<ContentProps>;
|
|
10
|
-
export {};
|
|
1
|
+
import "./Content.scss";
|
|
2
|
+
import type { FC, ReactNode } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
interface ContentProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
as?: "main" | React.ElementType;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Content: FC<ContentProps>;
|
|
10
|
+
export {};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import "./EnturPartnerLogo.scss";
|
|
2
|
-
import type { FC } from "react";
|
|
3
|
-
import React from "react";
|
|
4
|
-
import { Environment } from "./environment";
|
|
5
|
-
interface LogoProps {
|
|
6
|
-
title: string;
|
|
7
|
-
className?: string;
|
|
8
|
-
accentColor?: string;
|
|
9
|
-
[key: string]: object | string | number | boolean | undefined;
|
|
10
|
-
}
|
|
11
|
-
export declare const EnturPartnerLogoSvg: FC<LogoProps>;
|
|
12
|
-
interface EnturPartnerLogoProps {
|
|
13
|
-
altText: string;
|
|
14
|
-
as?: "div" | React.ElementType;
|
|
15
|
-
className?: string;
|
|
16
|
-
environment?: Environment;
|
|
17
|
-
}
|
|
18
|
-
export declare const EnturPartnerLogo: FC<EnturPartnerLogoProps>;
|
|
19
|
-
export {};
|
|
1
|
+
import "./EnturPartnerLogo.scss";
|
|
2
|
+
import type { FC } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Environment } from "./environment";
|
|
5
|
+
interface LogoProps {
|
|
6
|
+
title: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
accentColor?: string;
|
|
9
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare const EnturPartnerLogoSvg: FC<LogoProps>;
|
|
12
|
+
interface EnturPartnerLogoProps {
|
|
13
|
+
altText: string;
|
|
14
|
+
as?: "div" | React.ElementType;
|
|
15
|
+
className?: string;
|
|
16
|
+
environment?: Environment;
|
|
17
|
+
}
|
|
18
|
+
export declare const EnturPartnerLogo: FC<EnturPartnerLogoProps>;
|
|
19
|
+
export {};
|
package/dist/ErrorBoundary.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import React, { Component, type ErrorInfo, type ReactNode } from "react";
|
|
2
|
-
type FallbackOptions = {
|
|
3
|
-
retry: () => void;
|
|
4
|
-
error: Error;
|
|
5
|
-
};
|
|
6
|
-
type RenderProp = (options: FallbackOptions) => ReactNode;
|
|
7
|
-
type Props = {
|
|
8
|
-
handleError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
9
|
-
fallback: ReactNode | RenderProp;
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
};
|
|
12
|
-
type State = {
|
|
13
|
-
error: null | Error;
|
|
14
|
-
};
|
|
15
|
-
export declare class ErrorBoundary extends Component<Props, State> {
|
|
16
|
-
constructor(props: Props);
|
|
17
|
-
static getDerivedStateFromError(error: Error): State;
|
|
18
|
-
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
19
|
-
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
20
|
-
}
|
|
21
|
-
export declare const LANGUAGE_STORAGE_KEY = "EP::locale";
|
|
22
|
-
export {};
|
|
1
|
+
import React, { Component, type ErrorInfo, type ReactNode } from "react";
|
|
2
|
+
type FallbackOptions = {
|
|
3
|
+
retry: () => void;
|
|
4
|
+
error: Error;
|
|
5
|
+
};
|
|
6
|
+
type RenderProp = (options: FallbackOptions) => ReactNode;
|
|
7
|
+
type Props = {
|
|
8
|
+
handleError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
9
|
+
fallback: ReactNode | RenderProp;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
type State = {
|
|
13
|
+
error: null | Error;
|
|
14
|
+
};
|
|
15
|
+
export declare class ErrorBoundary extends Component<Props, State> {
|
|
16
|
+
constructor(props: Props);
|
|
17
|
+
static getDerivedStateFromError(error: Error): State;
|
|
18
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
19
|
+
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare const LANGUAGE_STORAGE_KEY = "EP::locale";
|
|
22
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type { VariantType } from "@entur/form";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import type { LanguageKey, LanguageOption } from "./LanguageSelect";
|
|
4
|
-
export type MultiLanguageValues = Record<LanguageKey, string>;
|
|
5
|
-
type ExpandableMultiLanguageInputProps = {
|
|
6
|
-
title: string;
|
|
7
|
-
inputComponent: React.ElementType;
|
|
8
|
-
languages: LanguageOption[];
|
|
9
|
-
values: MultiLanguageValues;
|
|
10
|
-
onChange: (values: MultiLanguageValues) => void;
|
|
11
|
-
name: string;
|
|
12
|
-
variant?: (lang: LanguageKey) => VariantType;
|
|
13
|
-
feedback?: (lang: LanguageKey) => string;
|
|
14
|
-
[key: string]: object | string | number | boolean | undefined;
|
|
15
|
-
};
|
|
16
|
-
export declare const ExpandableMultiLanguageInput: ({ title, inputComponent: InputComponent, languages, values, onChange, name, variant, feedback, ...rest }: ExpandableMultiLanguageInputProps) => React.JSX.Element;
|
|
17
|
-
export {};
|
|
1
|
+
import type { VariantType } from "@entur/form";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { LanguageKey, LanguageOption } from "./LanguageSelect";
|
|
4
|
+
export type MultiLanguageValues = Record<LanguageKey, string>;
|
|
5
|
+
type ExpandableMultiLanguageInputProps = {
|
|
6
|
+
title: string;
|
|
7
|
+
inputComponent: React.ElementType;
|
|
8
|
+
languages: LanguageOption[];
|
|
9
|
+
values: MultiLanguageValues;
|
|
10
|
+
onChange: (values: MultiLanguageValues) => void;
|
|
11
|
+
name: string;
|
|
12
|
+
variant?: (lang: LanguageKey) => VariantType;
|
|
13
|
+
feedback?: (lang: LanguageKey) => string;
|
|
14
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
15
|
+
};
|
|
16
|
+
export declare const ExpandableMultiLanguageInput: ({ title, inputComponent: InputComponent, languages, values, onChange, name, variant, feedback, ...rest }: ExpandableMultiLanguageInputProps) => React.JSX.Element;
|
|
17
|
+
export {};
|
package/dist/FeatureToggle.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import React, { type ReactNode } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if the provided flag exist in localStorage
|
|
4
|
-
* or is set as an environment variable.
|
|
5
|
-
*
|
|
6
|
-
* @param flag case sensitive flag. If it is an environment variable
|
|
7
|
-
* you can drop the VITE_APP_ prefix.
|
|
8
|
-
*/
|
|
9
|
-
export declare function featureFlag(flag: string): boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Returns true if the provided flag exist in localStorage
|
|
12
|
-
* or is set as an environment variable.
|
|
13
|
-
*
|
|
14
|
-
* @param flag case sensitive flag. If it is an environment variable
|
|
15
|
-
* you can drop the VITE_APP_ prefix.
|
|
16
|
-
*/
|
|
17
|
-
export declare function useFeatureToggle(flag: string): boolean;
|
|
18
|
-
export interface FeatureToggleProps {
|
|
19
|
-
/** Visible if flag exist, hidden if not.*/
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
/** Case sensitive flag. If it is an environment variable
|
|
22
|
-
* you can drop the VITE_APP_ prefix. */
|
|
23
|
-
flag: string;
|
|
24
|
-
}
|
|
25
|
-
export declare const FeatureToggle: ({ children, flag }: FeatureToggleProps) => React.JSX.Element | null;
|
|
1
|
+
import React, { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Returns true if the provided flag exist in localStorage
|
|
4
|
+
* or is set as an environment variable.
|
|
5
|
+
*
|
|
6
|
+
* @param flag case sensitive flag. If it is an environment variable
|
|
7
|
+
* you can drop the VITE_APP_ prefix.
|
|
8
|
+
*/
|
|
9
|
+
export declare function featureFlag(flag: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Returns true if the provided flag exist in localStorage
|
|
12
|
+
* or is set as an environment variable.
|
|
13
|
+
*
|
|
14
|
+
* @param flag case sensitive flag. If it is an environment variable
|
|
15
|
+
* you can drop the VITE_APP_ prefix.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useFeatureToggle(flag: string): boolean;
|
|
18
|
+
export interface FeatureToggleProps {
|
|
19
|
+
/** Visible if flag exist, hidden if not.*/
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
/** Case sensitive flag. If it is an environment variable
|
|
22
|
+
* you can drop the VITE_APP_ prefix. */
|
|
23
|
+
flag: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const FeatureToggle: ({ children, flag }: FeatureToggleProps) => React.JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { FC } from "react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface FormatCurrencyAmountProps {
|
|
4
|
-
amount: number | string;
|
|
5
|
-
as?: "span" | React.ElementType;
|
|
6
|
-
[key: string]: object | string | number | boolean | undefined;
|
|
7
|
-
}
|
|
8
|
-
export declare const FormatCurrencyAmount: FC<FormatCurrencyAmountProps>;
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface FormatCurrencyAmountProps {
|
|
4
|
+
amount: number | string;
|
|
5
|
+
as?: "span" | React.ElementType;
|
|
6
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare const FormatCurrencyAmount: FC<FormatCurrencyAmountProps>;
|
package/dist/FormatDateTime.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type FC } from "react";
|
|
2
|
-
export interface FormatDateTimeProps {
|
|
3
|
-
date: string | Date;
|
|
4
|
-
locale: string;
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export declare const FormatDateTime: FC<FormatDateTimeProps>;
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
export interface FormatDateTimeProps {
|
|
3
|
+
date: string | Date;
|
|
4
|
+
locale: string;
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}
|
|
7
|
+
export declare const FormatDateTime: FC<FormatDateTimeProps>;
|
package/dist/LanguageSelect.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "./LanguageSelect.scss";
|
|
2
|
-
import { type FC } from "react";
|
|
3
|
-
export type LanguageKey = "nob" | "nno" | "eng";
|
|
4
|
-
export interface LanguageOption {
|
|
5
|
-
value: LanguageKey;
|
|
6
|
-
label: string;
|
|
7
|
-
required: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface LanguageSelectProps {
|
|
10
|
-
language: string;
|
|
11
|
-
options: LanguageOption[];
|
|
12
|
-
className?: string;
|
|
13
|
-
onChange: (language: string) => void;
|
|
14
|
-
[key: string]: object | string | number | boolean | undefined;
|
|
15
|
-
}
|
|
16
|
-
export declare const LanguageSelect: FC<LanguageSelectProps>;
|
|
1
|
+
import "./LanguageSelect.scss";
|
|
2
|
+
import { type FC } from "react";
|
|
3
|
+
export type LanguageKey = "nob" | "nno" | "eng";
|
|
4
|
+
export interface LanguageOption {
|
|
5
|
+
value: LanguageKey;
|
|
6
|
+
label: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface LanguageSelectProps {
|
|
10
|
+
language: string;
|
|
11
|
+
options: LanguageOption[];
|
|
12
|
+
className?: string;
|
|
13
|
+
onChange: (language: string) => void;
|
|
14
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
export declare const LanguageSelect: FC<LanguageSelectProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Props = {
|
|
3
|
+
readonly pathname: string;
|
|
4
|
+
readonly onBreadcrumbLookup: (path: string) => string | undefined;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Won't work with React 19, because of react-helmet-async
|
|
8
|
+
* This component changes page title by using helmet and current path. It will translate subpaths, join them with a dash
|
|
9
|
+
* and display it on browser tab.
|
|
10
|
+
*
|
|
11
|
+
* @param Props.pathname - The current path from react-router-dom.useLocation()
|
|
12
|
+
* @param Props.onBreadcrumbLookup - A function that takes a path and returns a i18n translated string or undefined
|
|
13
|
+
* @returns A Helmet component with updated title
|
|
14
|
+
*/
|
|
15
|
+
export declare const LegacyPageTitle: ({ pathname, onBreadcrumbLookup }: Props) => React.JSX.Element;
|
|
16
|
+
export {};
|
package/dist/Link.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type FC } from "react";
|
|
2
|
-
import { type LinkProps } from "react-router-dom";
|
|
3
|
-
interface Props extends LinkProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Link: FC<Props>;
|
|
6
|
-
export {};
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import { type LinkProps } from "react-router-dom";
|
|
3
|
+
interface Props extends LinkProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const Link: FC<Props>;
|
|
6
|
+
export {};
|
package/dist/LinkButton.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./LinkButton.scss";
|
|
2
|
-
import React, { type ReactNode } from "react";
|
|
3
|
-
export interface LinkButtonProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
[key: string]: object | string | number | boolean | undefined | ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const LinkButton: ({ children, className, ...rest }: LinkButtonProps) => React.JSX.Element;
|
|
1
|
+
import "./LinkButton.scss";
|
|
2
|
+
import React, { type ReactNode } from "react";
|
|
3
|
+
export interface LinkButtonProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
[key: string]: object | string | number | boolean | undefined | ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare const LinkButton: ({ children, className, ...rest }: LinkButtonProps) => React.JSX.Element;
|
package/dist/Menu.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./Menu.scss";
|
|
2
|
-
import type { FC, ReactNode } from "react";
|
|
3
|
-
import React from "react";
|
|
4
|
-
interface MenuProps {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
as?: "div" | React.ElementType;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const Menu: FC<MenuProps>;
|
|
10
|
-
export {};
|
|
1
|
+
import "./Menu.scss";
|
|
2
|
+
import type { FC, ReactNode } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
interface MenuProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
as?: "div" | React.ElementType;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const Menu: FC<MenuProps>;
|
|
10
|
+
export {};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import "./MultiLanguageInput.scss";
|
|
2
|
-
import type { VariantType } from "@entur/form";
|
|
3
|
-
import React, { type FC, type FocusEvent } from "react";
|
|
4
|
-
import { type LanguageOption } from "./LanguageSelect";
|
|
5
|
-
type Values = {
|
|
6
|
-
[key: string]: string;
|
|
7
|
-
};
|
|
8
|
-
export interface MultiLanguageInputProps {
|
|
9
|
-
className?: string;
|
|
10
|
-
onBlur?: (e: FocusEvent<HTMLDivElement>) => void;
|
|
11
|
-
inputComponent: React.ElementType;
|
|
12
|
-
values: {
|
|
13
|
-
[key: string]: string;
|
|
14
|
-
};
|
|
15
|
-
languages: LanguageOption[];
|
|
16
|
-
onChange: (values: Values) => void;
|
|
17
|
-
name: string;
|
|
18
|
-
alertLevel?: VariantType;
|
|
19
|
-
alertLabel?: string;
|
|
20
|
-
label?: string;
|
|
21
|
-
defaultLanguage?: string;
|
|
22
|
-
[key: string]: object | string | number | boolean | undefined;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated use ExpandableMultiLanguageInput
|
|
26
|
-
*/
|
|
27
|
-
export declare const MultiLanguageInput: FC<MultiLanguageInputProps>;
|
|
28
|
-
export {};
|
|
1
|
+
import "./MultiLanguageInput.scss";
|
|
2
|
+
import type { VariantType } from "@entur/form";
|
|
3
|
+
import React, { type FC, type FocusEvent } from "react";
|
|
4
|
+
import { type LanguageOption } from "./LanguageSelect";
|
|
5
|
+
type Values = {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
8
|
+
export interface MultiLanguageInputProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
onBlur?: (e: FocusEvent<HTMLDivElement>) => void;
|
|
11
|
+
inputComponent: React.ElementType;
|
|
12
|
+
values: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
languages: LanguageOption[];
|
|
16
|
+
onChange: (values: Values) => void;
|
|
17
|
+
name: string;
|
|
18
|
+
alertLevel?: VariantType;
|
|
19
|
+
alertLabel?: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
defaultLanguage?: string;
|
|
22
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated use ExpandableMultiLanguageInput
|
|
26
|
+
*/
|
|
27
|
+
export declare const MultiLanguageInput: FC<MultiLanguageInputProps>;
|
|
28
|
+
export {};
|