@equinor/echo-framework 0.20.11-beta-0 → 0.20.12-beta-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.
Files changed (37) hide show
  1. package/index.cjs.js +1 -1
  2. package/package.json +1 -1
  3. package/src/lib/components/prepview/common/index.d.ts +0 -1
  4. package/src/lib/components/prepview/common/info/section/index.d.ts +0 -1
  5. package/src/lib/components/prepview/hooks/index.d.ts +0 -1
  6. package/src/lib/components/prepview/utils/documents.d.ts +0 -1
  7. package/src/lib/components/prepview/utils/index.d.ts +0 -2
  8. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.types.d.ts +6 -5
  9. package/src/lib/feature/globalSelection/globalSelectionStore/globalSelectionStore.utils.d.ts +1 -4
  10. package/src/lib/feature/globalSelection/hooks/useGlobalSelectionItems.d.ts +1 -1
  11. package/src/lib/feature/globalSelection/hooks/useGlobalSelectionTags.d.ts +1 -1
  12. package/src/lib/feature/globalSelection/hooks/useGlobalSelectionWorkOrders.d.ts +2 -2
  13. package/src/lib/feature/globalSelection/panToEcho3d/panTo3DButton.d.ts +1 -1
  14. package/src/lib/feature/globalSelection/panToEcho3d/usePanTo3DWeb.d.ts +1 -1
  15. package/src/lib/feature/openItemsIn3d/index.d.ts +1 -1
  16. package/src/lib/feature/openItemsIn3d/logic/convertToPlantTagPairs.d.ts +4 -4
  17. package/src/lib/utils/moduleNameUtils.d.ts +1 -1
  18. package/src/lib/components/homePage/HomePage.d.ts +0 -1
  19. package/src/lib/components/homePage/index.d.ts +0 -1
  20. package/src/lib/components/panel/corePanelIcon.d.ts +0 -6
  21. package/src/lib/components/prepview/common/access/handler/StatusHandler.d.ts +0 -8
  22. package/src/lib/components/prepview/common/access/handler/index.d.ts +0 -1
  23. package/src/lib/components/prepview/common/access/index.d.ts +0 -2
  24. package/src/lib/components/prepview/common/access/request/RequestAccess.d.ts +0 -6
  25. package/src/lib/components/prepview/common/access/request/index.d.ts +0 -1
  26. package/src/lib/components/prepview/common/info/section/longText/LongTextSection.d.ts +0 -7
  27. package/src/lib/components/prepview/common/info/section/longText/index.d.ts +0 -1
  28. package/src/lib/components/prepview/hooks/useIsMobile.d.ts +0 -4
  29. package/src/lib/components/prepview/panels/history/items/index.d.ts +0 -1
  30. package/src/lib/components/prepview/utils/dom.d.ts +0 -1
  31. package/src/lib/components/prepview/utils/notification.d.ts +0 -2
  32. package/src/lib/feature/workOrder/index.d.ts +0 -1
  33. package/src/lib/services/api/api-stid-tags.d.ts +0 -13
  34. package/src/lib/types/device.d.ts +0 -53
  35. package/src/lib/types/eventTypes/onClickTagsTrigger.d.ts +0 -3
  36. package/src/lib/types/grid/index.d.ts +0 -1
  37. package/src/lib/types/toaster.d.ts +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/echo-framework",
3
- "version": "0.20.11-beta-0",
3
+ "version": "0.20.12-beta-0",
4
4
  "peerDependencies": {
5
5
  "@equinor/echo-base": ">= 0.7.0 < 0.8.0",
6
6
  "@equinor/echo-components": ">= 0.11.0 < 0.12.0",
@@ -1,5 +1,4 @@
1
1
  export * from '../../verticalTabsSplitView';
2
- export * from './access';
3
2
  export * from './details';
4
3
  export * from './error';
5
4
  export * from './fileSizeDisplay';
@@ -1,2 +1 @@
1
1
  export * from './InfoSection';
2
- export * from './longText';
@@ -1,3 +1,2 @@
1
1
  export * from './useFetch';
2
2
  export * from './useOnClickDownload';
3
- export * from './useIsMobile';
@@ -1,2 +1 @@
1
- export declare function setFileIcon(fileExtension: string | undefined): string;
2
1
  export declare function getExtension(filename: string): string | undefined;
@@ -1,10 +1,8 @@
1
1
  export * from './date';
2
2
  export * from './documents';
3
- export * from './dom';
4
3
  export * from './enums';
5
4
  export * from './logger';
6
5
  export * from './object';
7
6
  export * from './string';
8
7
  export * from './url';
9
8
  export * from './workorder';
10
- export * from './notification';
@@ -46,7 +46,7 @@ export type WorkOrderGlobalSelectionListItem = GlobalSelectionTypes.GenericItem<
46
46
  */
47
47
  export type TagGlobalSelectionListItem = GlobalSelectionTypes.GenericItem<GlobalSelectionItemType.Tag>;
48
48
  /**
49
- * @deprecated We plan to make this private in the future: Use the public GlobalSelectionTypes namespace to access this type.
49
+ * @deprecated We plan to make this private in the future: Use the public namespace, GlobalSelectionTypes.SelectionItem type instead.
50
50
  */
51
51
  export type GlobalSelectionItem = WorkOrderGlobalSelectionListItem | TagGlobalSelectionListItem | EquipmentGlobalSelectionListItem;
52
52
  /**
@@ -97,6 +97,7 @@ export interface GlobalSelectionStore {
97
97
  *@deprecated This method is deprecated. Use `removeErrorStatusForItems` instead.
98
98
  */
99
99
  resetItemNotFoundStates: () => void;
100
+ resetItemErrorStatuses: () => void;
100
101
  resetState: () => void;
101
102
  setErrorStatusForItems: (args: {
102
103
  itemErrorStatuses: GlobalSelectionTypes.ItemErrorStatusUpdate[];
@@ -116,11 +117,11 @@ export declare namespace GlobalSelectionTypes {
116
117
  type EquipmentId = Pick<Equipment, 'equipmentId'>;
117
118
  type TagId = Pick<TagSummaryDto, 'tagNo' | 'instCode'>;
118
119
  type ItemId = WorkOrderId | EquipmentId | TagId;
119
- type EquipmentListItem = GlobalSelectionGenericItem<GlobalSelectionItemType.Equipment>;
120
- type WorkOrderListItem = GlobalSelectionGenericItem<GlobalSelectionItemType.WorkOrder>;
121
- type TagListItem = GlobalSelectionGenericItem<GlobalSelectionItemType.Tag>;
120
+ type EquipmentItem = GlobalSelectionGenericItem<GlobalSelectionItemType.Equipment>;
121
+ type WorkOrderItem = GlobalSelectionGenericItem<GlobalSelectionItemType.WorkOrder>;
122
+ type TagItem = GlobalSelectionGenericItem<GlobalSelectionItemType.Tag>;
122
123
  type List<T extends GlobalSelectionItemType> = GlobalSelectionList<T>;
123
- type ListItem = EquipmentListItem | WorkOrderListItem | TagListItem;
124
+ type SelectionItem = EquipmentItem | WorkOrderItem | TagItem;
124
125
  type GenericItem<T extends GlobalSelectionItemType> = GlobalSelectionGenericItem<T>;
125
126
  type Store = GlobalSelectionStore;
126
127
  type ItemErrorStatusUpdate = ItemErrorStatusUpdates;
@@ -17,10 +17,7 @@ declare function itemIdToString(itemId: Record<string, string | number>): string
17
17
  * @property {Function} isTagId - Checks if the passed object is a global selection TagID.
18
18
  * @property {Function} idsEqual - Compares two global selection item IDs for equality.
19
19
  * @property {Function} mapToId - Maps an object to its global selection item ID.
20
- * @property {Function} allTags - Retrieves all tags in the global selection store.
21
- * @property {Function} allEquipments - Retrieves all equipments in the global selection store.
22
- * @property {Function} allWorkOrders - Retrieves all work orders in the global selection store.
23
- * @property {Function} snapshot - Returns the current state of the global selection store.
20
+ * @property {Function} itemIdToString - Converts a global selection item id object to a string, each value is concatenated by a '-'
24
21
  */
25
22
  export declare const globalSelectionUtils: Readonly<{
26
23
  isWorkOrderId: typeof isWorkOrderId;
@@ -1,2 +1,2 @@
1
1
  import { GlobalSelectionTypes } from '../globalSelectionStore/globalSelectionStore.types';
2
- export declare const useGlobalSelectionItems: () => GlobalSelectionTypes.ListItem[];
2
+ export declare const useGlobalSelectionItems: () => GlobalSelectionTypes.SelectionItem[];
@@ -3,4 +3,4 @@ import { GlobalSelectionTypes } from '../globalSelectionStore/globalSelectionSto
3
3
  * Returns with the stored Tags from the global selection store
4
4
  * @returns {TagGlobalSelectionListItem[]} Array of Tags with some global selection meta data.
5
5
  */
6
- export declare function useGlobalSelectionTags(): GlobalSelectionTypes.TagListItem[];
6
+ export declare function useGlobalSelectionTags(): GlobalSelectionTypes.TagItem[];
@@ -1,6 +1,6 @@
1
1
  import { GlobalSelectionTypes } from '../globalSelectionStore/globalSelectionStore.types';
2
2
  /**
3
3
  * Returns with the stored Work Orders from the global selection store
4
- * @returns {GlobalSelectionTypes.WorkOrderListItem[]} Array of Work Orders
4
+ * @returns {GlobalSelectionTypes.WorkOrderItem[]} Array of Work Orders
5
5
  */
6
- export declare function useGlobalSelectionWorkOrders(): GlobalSelectionTypes.WorkOrderListItem[];
6
+ export declare function useGlobalSelectionWorkOrders(): GlobalSelectionTypes.WorkOrderItem[];
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { GlobalSelectionTypes } from '../globalSelectionStore/globalSelectionStore.types';
3
3
  interface PanTo3DButtonProps {
4
- item: GlobalSelectionTypes.ListItem;
4
+ item: GlobalSelectionTypes.SelectionItem;
5
5
  }
6
6
  export declare const PanTo3DButton: React.FC<PanTo3DButtonProps>;
7
7
  export {};
@@ -1,4 +1,4 @@
1
1
  import { GlobalSelectionTypes } from '../globalSelectionStore/globalSelectionStore.types';
2
2
  export declare const usePanTo3dWeb: () => {
3
- panTo3D: (item: GlobalSelectionTypes.ListItem) => Promise<void>;
3
+ panTo3D: (item: GlobalSelectionTypes.SelectionItem) => Promise<void>;
4
4
  };
@@ -1,4 +1,4 @@
1
- export { workOrdersToPlantTagPairs } from './logic/convertToPlantTagPairs';
1
+ export { tagIdPlantIdToPlantTagPairs } from './logic/convertToPlantTagPairs';
2
2
  export type { Plant3dInfo, PlantAndTagForOpenIn3d } from './logic/openItemsIn3d.utils';
3
3
  export { OpenItemsIn3dDialog } from './openItemsIn3dDialog';
4
4
  export { SelectedItemsMenu } from './SelectedItemsMenu';
@@ -1,10 +1,10 @@
1
1
  import { PlantAndTagForOpenIn3d } from './openItemsIn3d.utils';
2
- export interface WorkOrderTag {
2
+ export interface TagIdPlantId {
3
3
  tagPlantId: string | undefined;
4
4
  tagId: string | undefined;
5
5
  }
6
- export declare function tagToPlantTagPairs(selectedWorkOrders: {
6
+ export declare function tagToPlantTagPairs(selectedWorkOrders: ReadonlyArray<{
7
7
  tagNo: string;
8
8
  instCode: string;
9
- }[]): Promise<PlantAndTagForOpenIn3d[]>;
10
- export declare function workOrdersToPlantTagPairs(selectedWorkOrders: WorkOrderTag[]): Promise<PlantAndTagForOpenIn3d[]>;
9
+ }>): Promise<PlantAndTagForOpenIn3d[]>;
10
+ export declare function tagIdPlantIdToPlantTagPairs(items: ReadonlyArray<TagIdPlantId>): Promise<PlantAndTagForOpenIn3d[]>;
@@ -1,2 +1,2 @@
1
1
  export declare const showModuleName: (moduleName: string, moduleNameToReadableString: string) => string | undefined;
2
- export declare const convertPathNameToReadableString: (pathName: string) => string;
2
+ export declare const convertPathNameToReadableString: (pathName: string) => Capitalize<string>;
@@ -1 +0,0 @@
1
- export declare const HomePage: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export * from './HomePage';
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface CoreIconProps {
3
- name: string;
4
- }
5
- export declare const CoreIcon: React.FC<CoreIconProps>;
6
- export {};
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { FetchStatus } from '../../../types';
3
- interface Props {
4
- statusCode: FetchStatus['statusCode'];
5
- children: React.ReactNode;
6
- }
7
- declare function StatusHandler({ statusCode, children }: Props): JSX.Element;
8
- export { StatusHandler };
@@ -1 +0,0 @@
1
- export * from './StatusHandler';
@@ -1,2 +0,0 @@
1
- export * from './handler';
2
- export * from './request';
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- type RequestAccessProps = {
3
- padding?: boolean;
4
- };
5
- export declare const RequestAccess: React.FC<RequestAccessProps>;
6
- export {};
@@ -1 +0,0 @@
1
- export * from './RequestAccess';
@@ -1,7 +0,0 @@
1
- interface Props {
2
- text: string;
3
- toggleLongText: () => void;
4
- isPunch?: boolean;
5
- }
6
- declare function LongTextSection({ text, toggleLongText }: Props): import("react/jsx-runtime").JSX.Element;
7
- export { LongTextSection };
@@ -1 +0,0 @@
1
- export * from './LongTextSection';
@@ -1,4 +0,0 @@
1
- /**
2
- * @deprecated use isMobileDevice from @equinor/echo-utils instead
3
- */
4
- export declare function useIsMobile(): boolean;
@@ -1 +0,0 @@
1
- export * from './Items';
@@ -1 +0,0 @@
1
- export declare function escapeSpecialCharacters(text: string): string[];
@@ -1,2 +0,0 @@
1
- export declare function getStatusColor(statusIds: string): "#4bb748" | "#fbca36";
2
- export declare function getStatusText(statusIds: string): "Completed" | "Active";
@@ -1 +0,0 @@
1
- export { WorkOrderContent } from './WorkOrderContent';
@@ -1,13 +0,0 @@
1
- import { TagSummaryDto } from '@equinor/echo-search';
2
- /**
3
- * Get a list of tags from STID.
4
- * @param {string} args.instCode Plant instCode
5
- * @param {string[]} args.tagNos Tag ids to query for
6
- * @param {boolean} args.enableCache With this enabled, the call will be cached in memory and
7
- * will be fetched from there instead of getting it from the API
8
- * @returns {TagSummaryDto[]}
9
- */
10
- export declare function getTagsFromStidApi(args: {
11
- instCode: string;
12
- tagNos: string[];
13
- }): Promise<TagSummaryDto[]>;
@@ -1,53 +0,0 @@
1
- export type SupportedPlatforms = 'Android' | 'Linux' | 'MacOs' | 'iOS' | 'iPadOS' | 'Windows' | 'Platform not found.';
2
- export type DetailedDeviceInformation = {
3
- operatingSystem: string;
4
- webBrowser: string;
5
- deviceModel: string;
6
- platform?: SupportedPlatforms;
7
- };
8
- export type IDeepDeviceInformation = {
9
- operatingSystem: string;
10
- webBrowser: string;
11
- deviceModel: string;
12
- platform?: SupportedPlatforms;
13
- };
14
- /** If the viewport is a square, then the orientation will be portrait. */
15
- export type ScreenOrientation = 'portrait' | 'landscape';
16
- /** Keep in mind, this is calculated when the page loads, so be sure to do refresh if simulating a device in DevTools. */
17
- export type DeviceType = 'mobile' | 'tablet' | 'desktop';
18
- export type UserInput = 'touch' | 'mouse';
19
- export type Browser = 'Chrome' | 'Safari' | 'Firefox' | 'Edge' | 'Opera';
20
- type Dimensions = {
21
- width: number;
22
- height: number;
23
- };
24
- export type ScreenDimensions = {
25
- /** Provides measurements for use in the visual viewport.
26
- *
27
- * The visual viewport is the currently visible viewport and these dimensions
28
- * can be smaller than the layout viewport if, for example, the user has pinch zoomed or summoned their
29
- * on-screen keyboards.
30
- */
31
- visual: Dimensions;
32
- /**
33
- * Provides measurements for the layout viewport. These values are always fetched from
34
- * innerHeight and innerWidth, so scrollbars are included.
35
- */
36
- layout?: Dimensions;
37
- /** Provides measurements for use in fullscreen contexts. */
38
- fullscreen?: FullscreenDimensions;
39
- };
40
- export type FullscreenDimensions = {
41
- /** The total screen dimensions, essentially equal to the screen resolution configured in OS settings.*/
42
- total: Dimensions;
43
- /** The available screen dimensions, taking into account overlays such as browser address bar or virtual keyboard. */
44
- available: Dimensions;
45
- };
46
- export interface IDeviceSummary {
47
- orientation: ScreenOrientation;
48
- deviceType: DeviceType;
49
- userInput: UserInput;
50
- screenDimensions: ScreenDimensions;
51
- deepInfo: IDeepDeviceInformation;
52
- }
53
- export {};
@@ -1,3 +0,0 @@
1
- export interface OnClickTagsTriggerEvent {
2
- tagId: string;
3
- }
@@ -1 +0,0 @@
1
- export type { BucketPanelKey, BucketSourceKey } from './bucketSideDrawer.types';
@@ -1,7 +0,0 @@
1
- import { ToasterMessage } from './toasterMessage';
2
- export interface Toaster {
3
- toastNumber: number;
4
- toast: ToasterMessage;
5
- numberOfToasts: number;
6
- onClose?: () => void;
7
- }