@equinor/echo-components 4.0.1 → 4.1.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/index.cjs.js +1 -1
- package/package.json +2 -2
- package/src/components/echoButton/EchoButton.d.ts +2 -0
- package/src/components/index.d.ts +5 -1
- package/src/components/itemCards/equipmentItemCard/EquipmentItemCard.d.ts +6 -0
- package/src/components/itemCards/equipmentItemCard/equipmentItemCard.types.d.ts +5 -0
- package/src/components/itemCards/index.d.ts +14 -0
- package/src/components/itemCards/itemCard/ItemCard.d.ts +11 -0
- package/src/components/itemCards/itemCard/ItemCardBody.d.ts +4 -0
- package/src/components/itemCards/itemCard/ItemCardContainer.d.ts +2 -0
- package/src/components/itemCards/itemCard/ItemCardFooter.d.ts +4 -0
- package/src/components/itemCards/itemCard/ItemCardHeader.d.ts +2 -0
- package/src/components/itemCards/itemCard/ItemCardIcons.d.ts +2 -0
- package/src/components/itemCards/itemCard/ItemCardTitle.d.ts +2 -0
- package/src/components/itemCards/itemCard/itemCard.types.d.ts +27 -0
- package/src/components/itemCards/measuringPointItemCard/MeasuringPointItemCard.d.ts +6 -0
- package/src/components/itemCards/measuringPointItemCard/lastRecordedMeasurement/LastRecordedMeasurement.d.ts +7 -0
- package/src/components/itemCards/measuringPointItemCard/lastRecordedMeasurement/lastRecordedMeasurement.types.d.ts +5 -0
- package/src/components/itemCards/measuringPointItemCard/measuringPointItemCard.types.d.ts +7 -0
- package/src/components/itemCards/notificationItemCard/NotificationItemCard.d.ts +6 -0
- package/src/components/itemCards/notificationItemCard/notificationItemCard.types.d.ts +11 -0
- package/src/components/itemCards/notificationItemCard/notificationItemCard.utils.d.ts +3 -0
- package/src/components/itemCards/tagItemCard/TagItemCard.d.ts +6 -0
- package/src/components/itemCards/tagItemCard/TagItemCardStatus.d.ts +6 -0
- package/src/components/itemCards/tagItemCard/tagItemCard.types.d.ts +9 -0
- package/src/components/itemCards/workOrderItemCard/WorkOrderItemCard.d.ts +6 -0
- package/src/components/itemCards/workOrderItemCard/workOrderItemCard.types.d.ts +12 -0
- package/src/components/itemCards/workOrderItemCard/workOrderItemCard.utils.d.ts +3 -0
- package/src/components/itemMarkerPopover/{itemMarkerPopover.d.ts → OldItemMarkerPopover.d.ts} +4 -2
- package/src/components/itemMarkerPopover/OldItemMarkerPopoverPagination.d.ts +10 -0
- package/src/components/lozenge/LabelledLozenge.d.ts +10 -0
- package/src/components/lozenge/Lozenge.d.ts +9 -0
- package/src/components/selectionColorPicker/SelectionColorPicker.d.ts +9 -0
- package/src/components/subseaStatusLabel/SubseaStatusLabel.d.ts +2 -1
- package/src/theme/themeConst.d.ts +4 -0
- package/src/components/itemMarkerPopover/Pagination.d.ts +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/echo-components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"chart.js": "4.5.1",
|
|
6
6
|
"react-datepicker": "8.7.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"react-window": "1.8.11"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@equinor/echo-utils": ">= 4.0
|
|
11
|
+
"@equinor/echo-utils": ">= 4.1.0 < 5.0.0",
|
|
12
12
|
"@equinor/eds-core-react": "0.49.0",
|
|
13
13
|
"@equinor/eds-icons": "0.22.0",
|
|
14
14
|
"@equinor/eds-tokens": "2.1.0",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ButtonProps } from '@equinor/eds-core-react';
|
|
2
2
|
export type EchoButtonProps = ButtonProps & {
|
|
3
3
|
isSelected?: boolean;
|
|
4
|
+
isLoading?: boolean;
|
|
4
5
|
};
|
|
5
6
|
/**
|
|
6
7
|
* Wrapper for EDS Button with UI preferences support, and dark mode support (uses new light/dark CSS variables).
|
|
@@ -16,4 +17,5 @@ export declare const EchoButton: import("react").ForwardRefExoticComponent<{
|
|
|
16
17
|
fullWidth?: boolean;
|
|
17
18
|
} & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
18
19
|
isSelected?: boolean;
|
|
20
|
+
isLoading?: boolean;
|
|
19
21
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -24,13 +24,14 @@ export * from './functionalLocationListItem/FunctionalLocationListItem';
|
|
|
24
24
|
export * from './horizontalTabView';
|
|
25
25
|
export * from './iconLink/compactIconLink/CompactIconLink';
|
|
26
26
|
export * from './iconLink/inlineTagIconLink/InlineTagIconLink';
|
|
27
|
+
export * from './itemCards';
|
|
27
28
|
export * from './itemMarker/ItemMarker';
|
|
28
29
|
export * from './itemMarker/ItemMarkerChip';
|
|
29
30
|
export type { ItemMarkerChipProps } from './itemMarker/ItemMarkerChip';
|
|
30
31
|
export * from './itemMarker/ItemMarkerIcon';
|
|
31
32
|
export * from './itemMarker/MultipleItemMarkers';
|
|
32
33
|
export * from './itemMarker/utils/itemMarkerUtils';
|
|
33
|
-
export * from './itemMarkerPopover/
|
|
34
|
+
export * from './itemMarkerPopover/OldItemMarkerPopover';
|
|
34
35
|
export * from './legend';
|
|
35
36
|
export * from './legendChip/LegendChip';
|
|
36
37
|
export * from './legendSelector/LegendSelector';
|
|
@@ -39,6 +40,8 @@ export * from './legendSelectorMenu/LegendSelectorMenu';
|
|
|
39
40
|
export * from './linkIcon/LinkIcon';
|
|
40
41
|
export * from './listItem';
|
|
41
42
|
export * from './listRow/ListRow';
|
|
43
|
+
export * from './lozenge/LabelledLozenge';
|
|
44
|
+
export * from './lozenge/Lozenge';
|
|
42
45
|
export * from './markedContent/MarkedContent';
|
|
43
46
|
export * from './mediaViewer/MediaViewer';
|
|
44
47
|
export * from './multilineTabs/MultilineTabs';
|
|
@@ -52,6 +55,7 @@ export * from './secondaryMarker/SecondaryMarker';
|
|
|
52
55
|
export * from './secondaryMarker/SecondaryMarkerExpander';
|
|
53
56
|
export * from './secondaryMarker/SecondaryMarkerWithChip';
|
|
54
57
|
export * from './secondaryMarker/SecondaryMarkerWrapper';
|
|
58
|
+
export * from './selectionColorPicker/SelectionColorPicker';
|
|
55
59
|
export * from './selectTextOnFocusAutocomplete/SelectTextOnFocusAutocomplete';
|
|
56
60
|
export * from './sidebarButton/SidebarButton';
|
|
57
61
|
export * from './sidesheet';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EquipmentItemCardData } from './equipmentItemCard.types';
|
|
2
|
+
interface EquipmentItemCardProps {
|
|
3
|
+
readonly equipment: EquipmentItemCardData;
|
|
4
|
+
}
|
|
5
|
+
export declare const EquipmentItemCard: ({ equipment }: EquipmentItemCardProps) => React.JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { EquipmentItemCard } from './equipmentItemCard/EquipmentItemCard';
|
|
2
|
+
export type { EquipmentItemCardData } from './equipmentItemCard/equipmentItemCard.types';
|
|
3
|
+
export { ItemCard } from './itemCard/ItemCard';
|
|
4
|
+
export { type ItemCardIconItem, type ItemCardIconsProps } from './itemCard/itemCard.types';
|
|
5
|
+
export { LastRecordedMeasurement } from './measuringPointItemCard/lastRecordedMeasurement/LastRecordedMeasurement';
|
|
6
|
+
export type { LastRecordedMeasurementInfo } from './measuringPointItemCard/lastRecordedMeasurement/lastRecordedMeasurement.types';
|
|
7
|
+
export { MeasuringPointItemCard } from './measuringPointItemCard/MeasuringPointItemCard';
|
|
8
|
+
export type { MeasuringPointItemCardData } from './measuringPointItemCard/measuringPointItemCard.types';
|
|
9
|
+
export { NotificationItemCard } from './notificationItemCard/NotificationItemCard';
|
|
10
|
+
export { type NotificationItemCardData } from './notificationItemCard/notificationItemCard.types';
|
|
11
|
+
export { TagItemCard } from './tagItemCard/TagItemCard';
|
|
12
|
+
export { type TagItemCardData, type TagStatus } from './tagItemCard/tagItemCard.types';
|
|
13
|
+
export { WorkOrderItemCard } from './workOrderItemCard/WorkOrderItemCard';
|
|
14
|
+
export type { WorkOrderItemCardData } from './workOrderItemCard/workOrderItemCard.types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ItemCard: (({ children, className }: import("./itemCard.types").ItemCardContainerProps) => React.JSX.Element) & {
|
|
2
|
+
Header: ({ children, className }: import("./itemCard.types").ItemCardRowProps) => React.JSX.Element;
|
|
3
|
+
Body: (({ children, className }: import("./itemCard.types").ItemCardRowProps) => React.JSX.Element) & {
|
|
4
|
+
Text: ({ children, className }: import("./itemCard.types").ItemCardTextProps) => React.JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
Footer: (({ children, className }: import("./itemCard.types").ItemCardRowProps) => React.JSX.Element) & {
|
|
7
|
+
Text: ({ children, className }: import("./itemCard.types").ItemCardTextProps) => React.JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
Title: (props: import("./itemCard.types").ItemCardTitleProps) => React.JSX.Element;
|
|
10
|
+
Icons: ({ items, className }: import("./itemCard.types").ItemCardIconsProps) => React.JSX.Element;
|
|
11
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ElementType, ReactNode } from 'react';
|
|
2
|
+
export interface ItemCardContainerProps {
|
|
3
|
+
readonly children: ReactNode;
|
|
4
|
+
readonly className?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ItemCardRowProps {
|
|
7
|
+
readonly children: ReactNode;
|
|
8
|
+
readonly className?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ItemCardTitleProps {
|
|
11
|
+
readonly children: ReactNode;
|
|
12
|
+
readonly className?: string;
|
|
13
|
+
readonly as?: ElementType;
|
|
14
|
+
}
|
|
15
|
+
export interface ItemCardTextProps {
|
|
16
|
+
readonly children: ReactNode;
|
|
17
|
+
readonly className?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ItemCardIconItem {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly title?: string;
|
|
22
|
+
readonly color?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ItemCardIconsProps {
|
|
25
|
+
readonly items: ReadonlyArray<ItemCardIconItem>;
|
|
26
|
+
readonly className?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MeasuringPointItemCardData } from './measuringPointItemCard.types';
|
|
2
|
+
interface MeasuringPointItemCardProps {
|
|
3
|
+
readonly measuringPoint: MeasuringPointItemCardData;
|
|
4
|
+
}
|
|
5
|
+
export declare const MeasuringPointItemCard: ({ measuringPoint }: MeasuringPointItemCardProps) => React.JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LastRecordedMeasurementInfo } from './lastRecordedMeasurement.types';
|
|
2
|
+
interface LastRecordedMeasurementProps {
|
|
3
|
+
readonly lastRecordedMeasurement: LastRecordedMeasurementInfo;
|
|
4
|
+
readonly failureMechanismDescription: string | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare const LastRecordedMeasurement: ({ lastRecordedMeasurement, failureMechanismDescription }: LastRecordedMeasurementProps) => "" | import("react/jsx-runtime").JSX.Element | undefined;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LastRecordedMeasurementInfo } from './lastRecordedMeasurement/lastRecordedMeasurement.types';
|
|
2
|
+
export interface MeasuringPointItemCardData {
|
|
3
|
+
readonly measuringPointId: string;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
readonly lastRecordedMeasurement: LastRecordedMeasurementInfo;
|
|
6
|
+
readonly failureMechanismDescription: string | undefined;
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NotificationItemCardData } from './notificationItemCard.types';
|
|
2
|
+
interface NotificationItemCardProps {
|
|
3
|
+
readonly notification: NotificationItemCardData;
|
|
4
|
+
}
|
|
5
|
+
export declare const NotificationItemCard: ({ notification }: NotificationItemCardProps) => React.JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface NotificationItemCardData {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly isActive?: boolean;
|
|
4
|
+
readonly description?: string;
|
|
5
|
+
readonly requiredEndDateTime?: Date;
|
|
6
|
+
readonly requiredEndDateStatus?: string;
|
|
7
|
+
readonly failureImpact?: string;
|
|
8
|
+
readonly hasAttachments?: boolean;
|
|
9
|
+
readonly hasActivityLongText?: boolean;
|
|
10
|
+
readonly hasB30Document?: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface TagItemCardData {
|
|
2
|
+
readonly tagNo: string;
|
|
3
|
+
readonly description: string;
|
|
4
|
+
readonly tagCategoryDescription?: string;
|
|
5
|
+
readonly instCode: string;
|
|
6
|
+
readonly plantNo: string;
|
|
7
|
+
readonly status: TagStatus;
|
|
8
|
+
}
|
|
9
|
+
export type TagStatus = 'Unknown' | 'AsBuilt' | 'Planned' | 'Reserved' | 'Future' | 'Historic' | 'OutOfService' | 'Voided';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WorkOrderItemCardData } from './workOrderItemCard.types';
|
|
2
|
+
interface WorkOrderItemCardProps {
|
|
3
|
+
readonly workOrder: WorkOrderItemCardData;
|
|
4
|
+
}
|
|
5
|
+
export declare const WorkOrderItemCard: ({ workOrder }: WorkOrderItemCardProps) => React.JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface WorkOrderItemCardData {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly description: string;
|
|
4
|
+
readonly isActive?: boolean;
|
|
5
|
+
readonly plantNo?: string;
|
|
6
|
+
readonly workCenter?: string;
|
|
7
|
+
readonly basicFinishDateStatus?: string;
|
|
8
|
+
readonly basicFinishDateTime?: Date;
|
|
9
|
+
readonly hasPrts?: boolean;
|
|
10
|
+
readonly hasB30Document?: boolean;
|
|
11
|
+
readonly recordTypeIds?: ReadonlyArray<string>;
|
|
12
|
+
}
|
package/src/components/itemMarkerPopover/{itemMarkerPopover.d.ts → OldItemMarkerPopover.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
export type
|
|
2
|
+
export type OldItemMarkerPopover = {
|
|
3
3
|
items: ReadonlyArray<JSX.Element> | ReadonlyArray<string>;
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
handleClose: () => void;
|
|
@@ -24,4 +24,6 @@ export type ItemMarkerPopover = {
|
|
|
24
24
|
* @param {string} className - ClassName of the popover.
|
|
25
25
|
* @param {CSSProperties} style - style of the popover.
|
|
26
26
|
*/
|
|
27
|
-
export declare const
|
|
27
|
+
export declare const OldItemMarkerPopover: ({ items, isOpen, handleClose, title, zIndex, className, style }: OldItemMarkerPopover) => false | import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
/** @deprecated This component is being deprecated as a part of #419082 in favor of the new ItemMarkerPopover compound component which interacts well with ItemCard. */
|
|
29
|
+
export declare const ItemMarkerPopover: ({ items, isOpen, handleClose, title, zIndex, className, style }: OldItemMarkerPopover) => false | import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type OldItemMarkerPopoverPaginationProps = {
|
|
2
|
+
itemCount: number;
|
|
3
|
+
currentItemIndex: number;
|
|
4
|
+
setCurrentItemIndex: (index: number) => void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated This component is being deprecated as a part of #419082 in favor of the new ItemMarkerPopover compound component which interacts well with ItemCard.
|
|
8
|
+
*/
|
|
9
|
+
export declare const OldItemMarkerPopoverPagination: ({ itemCount, currentItemIndex, setCurrentItemIndex }: OldItemMarkerPopoverPaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface LabelledLozengeProps {
|
|
2
|
+
readonly label: string;
|
|
3
|
+
readonly content: string | Date | undefined;
|
|
4
|
+
readonly backgroundColor?: string;
|
|
5
|
+
readonly labelColor?: string;
|
|
6
|
+
readonly textColor?: string;
|
|
7
|
+
readonly className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const LabelledLozenge: (props: LabelledLozengeProps) => React.JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface LozengeProps {
|
|
2
|
+
readonly text: string | Date;
|
|
3
|
+
readonly backgroundColor?: string;
|
|
4
|
+
readonly textColor?: string;
|
|
5
|
+
readonly className?: string;
|
|
6
|
+
readonly 'aria-labelledby'?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const Lozenge: (props: LozengeProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface SelectionColorProps {
|
|
2
|
+
readonly itemColor?: string;
|
|
3
|
+
readonly colors: ReadonlyArray<string>;
|
|
4
|
+
readonly onColorSelect: (color: string) => void;
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
readonly renderButtonAsSpan?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const SelectionColorPicker: ({ itemColor, colors, onColorSelect, disabled, renderButtonAsSpan }: SelectionColorProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface SubseaStatusLabelProps {
|
|
2
2
|
isActive: boolean;
|
|
3
3
|
className?: string;
|
|
4
|
+
textColor?: string;
|
|
4
5
|
}
|
|
5
|
-
export declare function SubseaStatusLabel({ isActive, className }: SubseaStatusLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function SubseaStatusLabel({ isActive, className, textColor }: SubseaStatusLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export declare const themeConst: {
|
|
2
|
+
xxSmall: string;
|
|
2
3
|
xSmall: string;
|
|
3
4
|
smallXSmall: string;
|
|
4
5
|
small: string;
|
|
6
|
+
smallToMedium: string;
|
|
5
7
|
smallMedium: string;
|
|
6
8
|
medium: string;
|
|
7
9
|
mediumLarge: string;
|
|
@@ -15,6 +17,8 @@ export declare const themeConst: {
|
|
|
15
17
|
breakpointLg: string;
|
|
16
18
|
breakpointXl: string;
|
|
17
19
|
breakpointXxl: string;
|
|
20
|
+
breakPointMaxWidthS: string;
|
|
21
|
+
breakPointMaxWidthM: string;
|
|
18
22
|
fontSizeXSmall: string;
|
|
19
23
|
fontSizeSmall: string;
|
|
20
24
|
fontSizeSmallMedium: string;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type PaginationProps = {
|
|
2
|
-
itemCount: number;
|
|
3
|
-
currentItemIndex: number;
|
|
4
|
-
setCurrentItemIndex: (index: number) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare const Pagination: ({ itemCount, currentItemIndex, setCurrentItemIndex }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|