@entur-partner/common 9.3.2 → 9.3.3-alpha.0
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 +2 -2
- package/dist/AuditInfo.d.ts +3 -3
- package/dist/Box.d.ts +15 -14
- package/dist/Breadcrumbs.d.ts +2 -2
- package/dist/ConfirmModal.d.ts +4 -3
- package/dist/Content.d.ts +4 -3
- package/dist/EnturPartnerLogo.d.ts +6 -5
- package/dist/ErrorBoundary.d.ts +1 -1
- package/dist/ExpandableMultiLanguageInput.d.ts +4 -4
- package/dist/FeatureToggle.d.ts +1 -1
- package/dist/FormatCurrencyAmount.d.ts +4 -3
- package/dist/FormatDateTime.d.ts +1 -1
- package/dist/LanguageSelect.d.ts +4 -4
- package/dist/Link.d.ts +2 -2
- package/dist/LinkButton.d.ts +3 -3
- package/dist/Menu.d.ts +4 -3
- package/dist/MultiLanguageInput.d.ts +5 -5
- package/dist/OrganisationDropdown.d.ts +2 -2
- package/dist/PageTitle.d.ts +1 -1
- package/dist/Pager.d.ts +1 -1
- package/dist/PermissionCheck.d.ts +2 -2
- package/dist/RouteLeavingGuard.d.ts +3 -3
- package/dist/Stack.d.ts +3 -2
- package/dist/StatusLabel.d.ts +2 -2
- package/dist/Text.d.ts +7 -6
- package/dist/Unbutton.d.ts +4 -4
- package/dist/UserMenu/components/CookieSettingsMenuItem.d.ts +2 -2
- package/dist/UserMenu/components/CustomOverflowMenu.d.ts +3 -3
- package/dist/UserMenu/components/CustomOverflowMenuItem.d.ts +2 -2
- package/dist/UserMenu/components/LanguageSwitchMenuItem.d.ts +2 -2
- package/dist/UserMenu/components/LogOutMenuItem.d.ts +2 -2
- package/dist/UserMenu/components/UserMenuItem.d.ts +2 -2
- package/dist/UserMenu/components/VersionMenuItem.d.ts +1 -1
- package/dist/UserMenu/index.d.ts +3 -3
- package/dist/UserMenu/useOutsideClick.d.ts +1 -1
- package/dist/common.cjs.development.js +793 -793
- 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 +789 -789
- package/dist/common.esm.js.map +1 -1
- package/dist/index.d.ts +30 -30
- package/dist/styles.css +180 -180
- package/dist/useEventListener.d.ts +1 -3
- package/package.json +62 -62
- package/dist/helpers.d.ts +0 -1
package/dist/ActionBar.d.ts
CHANGED
package/dist/AuditInfo.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FC } from
|
|
1
|
+
import "./AuditInfo.scss";
|
|
2
|
+
import { type FC } from "react";
|
|
3
3
|
interface Item {
|
|
4
4
|
label: string;
|
|
5
5
|
value: Date | string;
|
|
@@ -8,7 +8,7 @@ export interface AuditInfoProps {
|
|
|
8
8
|
items: Item[];
|
|
9
9
|
locale: string;
|
|
10
10
|
className?: string;
|
|
11
|
-
[key: string]:
|
|
11
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
12
12
|
}
|
|
13
13
|
export declare const AuditInfo: FC<AuditInfoProps>;
|
|
14
14
|
export {};
|
package/dist/Box.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
type
|
|
5
|
-
type
|
|
6
|
-
type
|
|
7
|
-
type
|
|
8
|
-
type
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
export type
|
|
12
|
-
type
|
|
13
|
-
type
|
|
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";
|
|
14
15
|
export type ResponsiveStyleSpacing = StyleSpacing | [StyleSpacing?, StyleSpacing?, StyleSpacing?];
|
|
15
16
|
export type ResponsiveStyleMargin = StyleMargin | [StyleMargin?, StyleMargin?, StyleMargin?];
|
|
16
17
|
export type ResponsiveStyleDisplay = StyleDisplay | [StyleDisplay?, StyleDisplay?, StyleDisplay?];
|
|
@@ -23,7 +24,7 @@ export type ResponsiveStyleFlexWrap = StyleFlexWrap | [StyleFlexWrap?, StyleFlex
|
|
|
23
24
|
export interface BoxProps {
|
|
24
25
|
className?: string;
|
|
25
26
|
as?: React.ElementType;
|
|
26
|
-
[key: string]:
|
|
27
|
+
[key: string]: object | string | number | boolean | undefined | ReactNode;
|
|
27
28
|
children: ReactNode;
|
|
28
29
|
contrast?: boolean;
|
|
29
30
|
paddingTop?: ResponsiveStyleSpacing;
|
package/dist/Breadcrumbs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FC, ReactElement } from
|
|
1
|
+
import "./Breadcrumbs.scss";
|
|
2
|
+
import { type FC, type ReactElement } from "react";
|
|
3
3
|
export interface BreadcrumbsProps {
|
|
4
4
|
pathname: string;
|
|
5
5
|
onBreadcrumbLookup: (path: string) => string | undefined;
|
package/dist/ConfirmModal.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import "./ConfirmModal.scss";
|
|
2
|
+
import { type ModalProps } from "@entur/modal";
|
|
3
|
+
import type { FC, ReactNode } from "react";
|
|
4
|
+
import React from "react";
|
|
4
5
|
export interface BaseConfirmModalProps extends Partial<ModalProps> {
|
|
5
6
|
title: string;
|
|
6
7
|
children: React.ReactNode;
|
package/dist/Content.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "./Content.scss";
|
|
2
|
+
import type { FC, ReactNode } from "react";
|
|
3
|
+
import React from "react";
|
|
3
4
|
interface ContentProps {
|
|
4
5
|
children: ReactNode;
|
|
5
|
-
as?:
|
|
6
|
+
as?: "main" | React.ElementType;
|
|
6
7
|
className?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const Content: FC<ContentProps>;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import "./EnturPartnerLogo.scss";
|
|
2
|
+
import type { FC } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Environment } from "./environment";
|
|
4
5
|
interface LogoProps {
|
|
5
6
|
title: string;
|
|
6
7
|
className?: string;
|
|
7
8
|
accentColor?: string;
|
|
8
|
-
[key: string]:
|
|
9
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
9
10
|
}
|
|
10
11
|
export declare const EnturPartnerLogoSvg: FC<LogoProps>;
|
|
11
12
|
interface EnturPartnerLogoProps {
|
|
12
13
|
altText: string;
|
|
13
|
-
as?:
|
|
14
|
+
as?: "div" | React.ElementType;
|
|
14
15
|
className?: string;
|
|
15
16
|
environment?: Environment;
|
|
16
17
|
}
|
package/dist/ErrorBoundary.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { LanguageKey, LanguageOption } from
|
|
1
|
+
import type { VariantType } from "@entur/form";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { LanguageKey, LanguageOption } from "./LanguageSelect";
|
|
4
4
|
export type MultiLanguageValues = Record<LanguageKey, string>;
|
|
5
5
|
type ExpandableMultiLanguageInputProps = {
|
|
6
6
|
title: string;
|
|
@@ -11,7 +11,7 @@ type ExpandableMultiLanguageInputProps = {
|
|
|
11
11
|
name: string;
|
|
12
12
|
variant?: (lang: LanguageKey) => VariantType;
|
|
13
13
|
feedback?: (lang: LanguageKey) => string;
|
|
14
|
-
[key: string]:
|
|
14
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
15
15
|
};
|
|
16
16
|
export declare const ExpandableMultiLanguageInput: ({ title, inputComponent: InputComponent, languages, values, onChange, name, variant, feedback, ...rest }: ExpandableMultiLanguageInputProps) => React.JSX.Element;
|
|
17
17
|
export {};
|
package/dist/FeatureToggle.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import React from "react";
|
|
2
3
|
export interface FormatCurrencyAmountProps {
|
|
3
4
|
amount: number | string;
|
|
4
|
-
as?:
|
|
5
|
-
[key: string]:
|
|
5
|
+
as?: "span" | React.ElementType;
|
|
6
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
6
7
|
}
|
|
7
8
|
export declare const FormatCurrencyAmount: FC<FormatCurrencyAmountProps>;
|
package/dist/FormatDateTime.d.ts
CHANGED
package/dist/LanguageSelect.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FC } from
|
|
3
|
-
export type LanguageKey =
|
|
1
|
+
import "./LanguageSelect.scss";
|
|
2
|
+
import { type FC } from "react";
|
|
3
|
+
export type LanguageKey = "nob" | "nno" | "eng";
|
|
4
4
|
export interface LanguageOption {
|
|
5
5
|
value: LanguageKey;
|
|
6
6
|
label: string;
|
|
@@ -11,6 +11,6 @@ export interface LanguageSelectProps {
|
|
|
11
11
|
options: LanguageOption[];
|
|
12
12
|
className?: string;
|
|
13
13
|
onChange: (language: string) => void;
|
|
14
|
-
[key: string]:
|
|
14
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
15
15
|
}
|
|
16
16
|
export declare const LanguageSelect: FC<LanguageSelectProps>;
|
package/dist/Link.d.ts
CHANGED
package/dist/LinkButton.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React, { ReactNode } from
|
|
1
|
+
import "./LinkButton.scss";
|
|
2
|
+
import React, { type ReactNode } from "react";
|
|
3
3
|
export interface LinkButtonProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
|
-
[key: string]:
|
|
6
|
+
[key: string]: object | string | number | boolean | undefined | ReactNode;
|
|
7
7
|
}
|
|
8
8
|
export declare const LinkButton: ({ children, className, ...rest }: LinkButtonProps) => React.JSX.Element;
|
package/dist/Menu.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "./Menu.scss";
|
|
2
|
+
import type { FC, ReactNode } from "react";
|
|
3
|
+
import React from "react";
|
|
3
4
|
interface MenuProps {
|
|
4
5
|
children: ReactNode;
|
|
5
|
-
as?:
|
|
6
|
+
as?: "div" | React.ElementType;
|
|
6
7
|
className?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare const Menu: FC<MenuProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { LanguageOption } from
|
|
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
5
|
type Values = {
|
|
6
6
|
[key: string]: string;
|
|
7
7
|
};
|
|
@@ -19,7 +19,7 @@ export interface MultiLanguageInputProps {
|
|
|
19
19
|
alertLabel?: string;
|
|
20
20
|
label?: string;
|
|
21
21
|
defaultLanguage?: string;
|
|
22
|
-
[key: string]:
|
|
22
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @deprecated use ExpandableMultiLanguageInput
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC } from
|
|
1
|
+
import { type FC } from "react";
|
|
2
2
|
interface OrganisationV3 {
|
|
3
3
|
organisationId: number;
|
|
4
4
|
tradingName: string;
|
|
@@ -8,7 +8,7 @@ interface OrganisationDropDownProps {
|
|
|
8
8
|
onChange: (organisationId: number) => void;
|
|
9
9
|
organisations: OrganisationV3[];
|
|
10
10
|
selectedOrganisationId?: number;
|
|
11
|
-
[key: string]:
|
|
11
|
+
[key: string]: object | string | number | boolean | undefined;
|
|
12
12
|
}
|
|
13
13
|
export declare const OrganisationDropDown: FC<OrganisationDropDownProps>;
|
|
14
14
|
export {};
|
package/dist/PageTitle.d.ts
CHANGED
package/dist/Pager.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { BusinessCapability } from "@entur-partner/permission-client-node";
|
|
2
|
+
import { type FC, type ReactNode } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Note: We use BusinessCapability here, not because we only want to check
|
|
5
5
|
* BusinessCapabilities but because it represents a minimal subset of what we
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Location } from
|
|
3
|
-
import {
|
|
1
|
+
import type { ModalProps } from "@entur/modal";
|
|
2
|
+
import type { Location } from "history";
|
|
3
|
+
import { type FC, type ReactNode } from "react";
|
|
4
4
|
export interface RouteLeavingGuardProps extends Partial<ModalProps> {
|
|
5
5
|
title: string;
|
|
6
6
|
closeLabel: string;
|
package/dist/Stack.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/** biome-ignore-all lint/suspicious/noArrayIndexKey: Ignore for now. Should be tested properly before doing changes */
|
|
2
|
+
import React, { type ReactNode } from "react";
|
|
3
|
+
import { type ResponsiveStyleSpacing } from "./Box";
|
|
3
4
|
export interface StackProps {
|
|
4
5
|
className?: string;
|
|
5
6
|
children: ReactNode;
|
package/dist/StatusLabel.d.ts
CHANGED
package/dist/Text.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
type
|
|
6
|
-
type
|
|
1
|
+
import "./Text.scss";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { type StyleColor } from "./Box";
|
|
5
|
+
type StyleFontSize = "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4";
|
|
6
|
+
type StyleFontWeight = "body" | "heading";
|
|
7
|
+
type StyleLineHeight = "extraSmall" | "small" | "medium" | "large" | "extraLarge" | "extraLarge2" | "extraLarge3" | "extraLarge4" | "extraLarge5" | "extraLarge6" | "extraLarge7";
|
|
7
8
|
export type ResponsiveStyleFontSize = StyleFontSize | [StyleFontSize?, StyleFontSize?, StyleFontSize?];
|
|
8
9
|
export type ResponsiveStyleLineHeight = StyleLineHeight | [StyleLineHeight?, StyleLineHeight?, StyleLineHeight?];
|
|
9
10
|
export interface TextProps {
|
package/dist/Unbutton.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
interface UnbuttonProps extends Omit<ButtonProps<
|
|
1
|
+
import "./Unbutton.scss";
|
|
2
|
+
import { Button, type ButtonProps } from "@entur/button";
|
|
3
|
+
import { type FC } from "react";
|
|
4
|
+
interface UnbuttonProps extends Omit<ButtonProps<typeof Button>, "variant"> {
|
|
5
5
|
}
|
|
6
6
|
export declare const Unbutton: FC<UnbuttonProps>;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React from
|
|
3
|
-
import { Environment } from
|
|
1
|
+
import "../index.scss";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Environment } from "../../environment";
|
|
4
4
|
export declare const CustomOverflowMenu: React.FC<{
|
|
5
5
|
className?: string;
|
|
6
6
|
children: React.ReactNode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
import React from
|
|
1
|
+
import "../index.scss";
|
|
2
|
+
import React from "react";
|
|
3
3
|
export declare const CustomOverflowMenuItem: React.FC<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
|
package/dist/UserMenu/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FC } from
|
|
3
|
-
import { Environment } from
|
|
1
|
+
import "./index.scss";
|
|
2
|
+
import { type FC } from "react";
|
|
3
|
+
import type { Environment } from "../environment";
|
|
4
4
|
interface UserMenuProps {
|
|
5
5
|
userName: string;
|
|
6
6
|
messages: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
export declare function useOutsideClick(ref: React.RefObject<HTMLDivElement>, buttonRef: React.RefObject<HTMLButtonElement>, handler: () => void): void;
|