@equinor/echo-framework 0.10.24 → 0.10.26-rc0

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.
@@ -1,14 +1,34 @@
1
1
  /// <reference types="react" />
2
2
  type AnyComponentType = React.FC<any>;
3
- interface ComponentRegistry {
3
+ export declare enum RegisteredComponentName {
4
+ /** @deprecated Please use 'TagListItem' instead - that supports the new search flow */
5
+ TagItem = "TagItem",
6
+ TagListItem = "TagListItem"
7
+ }
8
+ export declare const componentRegistry: Readonly<{
9
+ /**
10
+ * Should be only used by EchopediaWeb, when bootstrapping Echo app.
11
+ * Use this method to register a legacy component from Echopedia to EchoFramework, so it's available for others to use.
12
+ * Originally created to make tightly coupled components available until they are properly refactored and decoupled.
13
+ * @param {RegisteredComponentName} name The component will be assigned to this key.
14
+ * @param {React.FC<any>} component The component which should be registered.
15
+ */
4
16
  registerComponent: ({ name, component }: {
5
17
  name: RegisteredComponentName;
6
18
  component: AnyComponentType;
7
19
  }) => void;
20
+ /**
21
+ * @deprecated Please use 'getTagListItem()' instead - that supports the new search flow
22
+ * Returns with the TagItem component, which is used in EchopediaWeb's search panel
23
+ * and pdf side drawer when listing out tags.
24
+ * @returns {React.FC<any>}
25
+ */
8
26
  getTagItem: () => AnyComponentType;
9
- }
10
- export declare enum RegisteredComponentName {
11
- TagItem = "TagItem"
12
- }
13
- export declare const componentRegistry: ComponentRegistry;
27
+ /**
28
+ * Returns with the TagItem component, which is used in EchopediaWeb's search panel
29
+ * and pdf side drawer when listing out tags.
30
+ * @returns {React.FC<any>}
31
+ */
32
+ getTagListItem: () => AnyComponentType;
33
+ }>;
14
34
  export {};
@@ -0,0 +1,26 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const useSearchItemDetailsStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<SearchItemDetailsState>, "setState"> & {
3
+ setState(nextStateOrUpdater: SearchItemDetailsState | Partial<SearchItemDetailsState> | ((state: import("immer/dist/internal").WritableDraft<SearchItemDetailsState>) => void), shouldReplace?: boolean | undefined): void;
4
+ }>;
5
+ export type SearchItemDetailsObject = {
6
+ content: ReactNode;
7
+ header?: ReactNode;
8
+ subHeader?: ReactNode;
9
+ isOpen: boolean;
10
+ };
11
+ export type SearchItemDetailsState = {
12
+ actions: {
13
+ showDetails: (args: ShowDetailsArgs) => void;
14
+ hideDetails: (panelKey: string) => void;
15
+ clearItemsByPanelKey: (panelKey: string) => void;
16
+ };
17
+ items: Record<string, SearchItemDetailsObject[]>;
18
+ };
19
+ type ShowDetailsArgs = {
20
+ panelKey: string;
21
+ content: ReactNode;
22
+ header?: ReactNode;
23
+ subHeader?: ReactNode;
24
+ replaceLastNavigationItem?: boolean;
25
+ };
26
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface SearchItemDetailsContainerProps {
3
+ onSearchDetailsClose?: (panelKey: string) => void;
4
+ }
5
+ export declare const SearchItemDetailsContainer: React.FC<SearchItemDetailsContainerProps>;
6
+ export {};
@@ -1,3 +1,11 @@
1
1
  export type { LegendChangedEvent } from './legendEvent';
2
2
  export type { PlantEvent } from './plantEvent';
3
+ export type { SearchItemDetailsClosedEvent } from './searchDetailsContainerEvents';
3
4
  export type { ToasterEvent } from './toasterEvent';
5
+ export declare enum EchoEvent {
6
+ LegendTypeChanged = "legendTypeChanged",
7
+ PlantChanged = "plantChanged",
8
+ ProcosysProjectChanged = "procosysProjectChanged",
9
+ Toaster = "toaster",
10
+ SearchItemDetailsClosed = "SearchItemDetailsClosed"
11
+ }
@@ -0,0 +1,3 @@
1
+ export interface SearchItemDetailsClosedEvent {
2
+ panelKey: string;
3
+ }
@@ -1,5 +1,20 @@
1
- export type SetActiveTagNo = (tagNo: string, activeTagTab?: string, activeTagSubTab?: string, instCode?: string) => void;
1
+ export type SetActiveTagNo = (argsORtagNo: string | {
2
+ tagNo: string;
3
+ activeTagTab?: string;
4
+ activeTagSubTab?: string;
5
+ instCode?: string;
6
+ activePanelKey?: string;
7
+ replaceLastNavigationItem?: boolean;
8
+ }, activeTagTab?: string, activeTagSubTab?: string, instCode?: string) => void;
2
9
  export type TagData = [(tagNo: string, instCode: string) => void];
3
- export type SetActiveCommPackNo = (commPackNo: string, activeCommPackProject: string, activeCommPackTab?: string, activeCommPackSubTab?: string) => void;
4
- export type SetActiveMcPackNo = (mcPackNo: string, activeMcPackProject: string, activeMcPackTab?: string, activeMcPackSubTab?: string) => void;
10
+ export type SetActiveCommPackNo = (argsORcommPackNo: string | {
11
+ commPackNo: string;
12
+ activeCommPackProject: string;
13
+ activePanelKey?: string;
14
+ }, activeCommPackProject?: string) => void;
15
+ export type SetActiveMcPackNo = (argsORmcPackNo: string | {
16
+ mcPackNo: string;
17
+ activeMcPackProject: string;
18
+ activePanelKey?: string;
19
+ }, activeMcPackProject?: string) => void;
5
20
  export type ScreenOrientation = 'landscape' | 'portrait' | undefined;
package/package.json CHANGED
@@ -1,123 +1,125 @@
1
- {
2
- "name": "@equinor/echo-framework",
3
- "version": "0.10.24",
4
- "description": "Modules and components for EchoWeb, utilizing EchoCore",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "source": "src/index.ts",
8
- "repository": "https://github.com/equinor/EchoFramework.git",
9
- "author": "Echo Core",
10
- "license": "MIT",
11
- "private": false,
12
- "scripts": {
13
- "build": "rollup -c",
14
- "build-cli": "npm --prefix ../EchoCli run build",
15
- "prebuild-cli": "npm --prefix ../EchoClient run build -- --env=cli=true",
16
- "cli-publish": "npm run build-cli",
17
- "postcli-publish": "npm --prefix ../EchoCli run echo-publish",
18
- "cli-next": "npm run build-cli",
19
- "postcli-next": "npm --prefix ../EchoCli run echo-publish-next",
20
- "start": "rollup -c -w ",
21
- "publish-pk": "npm publish --access public",
22
- "echo-publish": "npm publish --access public",
23
- "echo-publish-beta": "npm publish --access public --tag beta",
24
- "echo-publish-next": "npm publish --access public --tag next",
25
- "echo-test": "jest",
26
- "lint": "eslint --ext .js,.jsx,.ts,.tsx src --color",
27
- "test-wo-install": "jest --watchAll",
28
- "test": "npm ci & jest --watchAll",
29
- "test-coverage": "npm ci & jest --coverage --watchAll",
30
- "patch": "npm version patch",
31
- "major": "npm version major",
32
- "minor": "npm version minor",
33
- "echo-update": "echo-update",
34
- "echo-update-all": "echo-update -a",
35
- "yalc-purge": "rmdir \"%APPDATA%/../Local/Yalc/packages/@equinor/echo-framework\" /q /s",
36
- "re-yalc": "npm run build && yalc push --sig"
37
- },
38
- "peerDependencies": {
39
- "@equinor/echo-base": ">=0.6.12 < 0.7.0",
40
- "@equinor/echo-components": ">=0.5.0 < 0.6.0",
41
- "@equinor/echo-core": ">=0.6.20 < 0.8.0",
42
- "@equinor/echo-search": ">=0.13.2 < 0.14.0",
43
- "@equinor/echo-utils": ">=0.2.12 < 0.3.0",
44
- "@equinor/eds-core-react": "^0.25.0",
45
- "react": "^17.0.2",
46
- "react-dom": "^17.0.2",
47
- "react-router-dom": "^5.3.4",
48
- "styled-components": "^5.3.6"
49
- },
50
- "devDependencies": {
51
- "@babel/core": "^7.20.12",
52
- "@babel/preset-env": "^7.20.2",
53
- "@babel/preset-react": "^7.18.6",
54
- "@equinor/echo-base": "^0.6.22",
55
- "@equinor/echo-core": "^0.7.3",
56
- "@equinor/echo-components": "^0.5.19",
57
- "@equinor/echo-scripts": "^0.1.5",
58
- "@equinor/echo-search": "^0.13.11",
59
- "@equinor/echo-update": "^1.3.1",
60
- "@equinor/echo-utils": "^0.2.12",
61
- "@equinor/eds-core-react": "^0.25.0",
62
- "@modular-css/rollup": "^28.3.2",
63
- "@rollup/plugin-babel": "^5.3.1",
64
- "@rollup/plugin-commonjs": "^22.0.2",
65
- "@rollup/plugin-image": "^2.1.1",
66
- "@rollup/plugin-json": "^4.1.0",
67
- "@rollup/plugin-node-resolve": "^13.3.0",
68
- "@rollup/plugin-typescript": "^8.5.0",
69
- "@rollup/plugin-url": "^7.0.0",
70
- "@svgr/rollup": "^6.5.1",
71
- "@testing-library/react-hooks": "^8.0.1",
72
- "@types/jest": "^29.4.0",
73
- "@types/node": "^18.11.18",
74
- "@types/react": "^17.0.53",
75
- "@types/react-dom": "^17.0.18",
76
- "@types/react-router-dom": "^5.3.3",
77
- "@types/styled-components": "5.1.26",
78
- "@typescript-eslint/eslint-plugin": "^5.49.0",
79
- "@typescript-eslint/parser": "^5.49.0",
80
- "@wessberg/rollup-plugin-ts": "^2.0.4",
81
- "autoprefixer": "^10.4.13",
82
- "babel-jest": "^29.4.0",
83
- "eslint": "^8.32.0",
84
- "eslint-config-prettier": "^8.6.0",
85
- "eslint-plugin-prettier": "^4.2.1",
86
- "eslint-plugin-react": "^7.32.1",
87
- "eslint-plugin-react-hooks": "^4.6.0",
88
- "jest": "^29.4.0",
89
- "jest-environment-jsdom": "^29.4.0",
90
- "jest-expo": "^47.0.1",
91
- "postcss": "^8.4.21",
92
- "postcss-assets": "^6.0.0",
93
- "postcss-modules": "^4.3.1",
94
- "prettier": "^2.8.3",
95
- "react": "^17.0.2",
96
- "react-dom": "^17.0.2",
97
- "react-router-dom": "^5.3.4",
98
- "rollup": "^2.79.1",
99
- "rollup-plugin-delete": "^2.0.0",
100
- "rollup-plugin-postcss": "^4.0.2",
101
- "rollup-plugin-terser": "^7.0.2",
102
- "rollup-plugin-tslib-resolve-id": "^0.0.0",
103
- "rollup-plugin-typescript-paths": "^1.4.0",
104
- "rollup-plugin-typescript2": "^0.34.1",
105
- "styled-components": "^5.3.6",
106
- "ts-jest": "^29.0.5",
107
- "tslib": "^2.4.1",
108
- "typescript": "=4.9.4"
109
- },
110
- "compilerOptions": {
111
- "declaration": true
112
- },
113
- "files": [
114
- "dist/"
115
- ],
116
- "engines": {
117
- "node": ">=16.8.0",
118
- "npm": ">=7.0.0"
119
- },
120
- "dependencies": {
121
- "@microsoft/signalr": "^6.0.13"
122
- }
123
- }
1
+ {
2
+ "name": "@equinor/echo-framework",
3
+ "version": "0.10.26-rc0",
4
+ "description": "Modules and components for EchoWeb, utilizing EchoCore",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "source": "src/index.ts",
8
+ "repository": "https://github.com/equinor/EchoFramework.git",
9
+ "author": "Echo Core",
10
+ "license": "MIT",
11
+ "private": false,
12
+ "scripts": {
13
+ "build": "rollup -c",
14
+ "build-cli": "npm --prefix ../EchoCli run build",
15
+ "prebuild-cli": "npm --prefix ../EchoClient run build -- --env=cli=true",
16
+ "cli-publish": "npm run build-cli",
17
+ "postcli-publish": "npm --prefix ../EchoCli run echo-publish",
18
+ "cli-next": "npm run build-cli",
19
+ "postcli-next": "npm --prefix ../EchoCli run echo-publish-next",
20
+ "start": "rollup -c -w ",
21
+ "publish-pk": "npm publish --access public",
22
+ "echo-publish": "npm publish --access public",
23
+ "echo-publish-beta": "npm publish --access public --tag beta",
24
+ "echo-publish-next": "npm publish --access public --tag next",
25
+ "echo-test": "jest",
26
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx src --color",
27
+ "test-wo-install": "jest --watchAll",
28
+ "test": "npm ci & jest --watchAll",
29
+ "test-coverage": "npm ci & jest --coverage --watchAll",
30
+ "patch": "npm version patch",
31
+ "major": "npm version major",
32
+ "minor": "npm version minor",
33
+ "echo-update": "echo-update",
34
+ "echo-update-all": "echo-update -a",
35
+ "yalc-purge": "rmdir \"%APPDATA%/../Local/Yalc/packages/@equinor/echo-framework\" /q /s",
36
+ "re-yalc": "npm run build && yalc push --sig"
37
+ },
38
+ "peerDependencies": {
39
+ "@equinor/echo-base": ">=0.6.12 < 0.7.0",
40
+ "@equinor/echo-components": ">=0.5.0 < 0.6.0",
41
+ "@equinor/echo-core": ">=0.6.20 < 0.8.0",
42
+ "@equinor/echo-search": ">=0.13.2 < 0.14.0",
43
+ "@equinor/echo-utils": ">=0.2.12 < 0.3.0",
44
+ "@equinor/eds-core-react": "^0.25.0",
45
+ "react": "^17.0.2",
46
+ "react-dom": "^17.0.2",
47
+ "react-router-dom": "^5.3.4",
48
+ "styled-components": "^5.3.6"
49
+ },
50
+ "devDependencies": {
51
+ "@babel/core": "^7.20.12",
52
+ "@babel/preset-env": "^7.20.2",
53
+ "@babel/preset-react": "^7.18.6",
54
+ "@equinor/echo-base": "^0.6.22",
55
+ "@equinor/echo-components": "^0.5.19",
56
+ "@equinor/echo-core": "^0.7.3",
57
+ "@equinor/echo-scripts": "^0.1.5",
58
+ "@equinor/echo-search": "^0.13.11",
59
+ "@equinor/echo-update": "^1.3.1",
60
+ "@equinor/echo-utils": "^0.2.12",
61
+ "@equinor/eds-core-react": "^0.25.0",
62
+ "@modular-css/rollup": "^28.3.2",
63
+ "@rollup/plugin-babel": "^5.3.1",
64
+ "@rollup/plugin-commonjs": "^22.0.2",
65
+ "@rollup/plugin-image": "^2.1.1",
66
+ "@rollup/plugin-json": "^4.1.0",
67
+ "@rollup/plugin-node-resolve": "^13.3.0",
68
+ "@rollup/plugin-typescript": "^8.5.0",
69
+ "@rollup/plugin-url": "^7.0.0",
70
+ "@svgr/rollup": "^6.5.1",
71
+ "@testing-library/react-hooks": "^8.0.1",
72
+ "@types/jest": "^29.4.0",
73
+ "@types/node": "^18.11.18",
74
+ "@types/react": "^17.0.53",
75
+ "@types/react-dom": "^17.0.18",
76
+ "@types/react-router-dom": "^5.3.3",
77
+ "@types/styled-components": "5.1.26",
78
+ "@typescript-eslint/eslint-plugin": "^5.49.0",
79
+ "@typescript-eslint/parser": "^5.49.0",
80
+ "@wessberg/rollup-plugin-ts": "^2.0.4",
81
+ "autoprefixer": "^10.4.13",
82
+ "babel-jest": "^29.4.0",
83
+ "eslint": "^8.32.0",
84
+ "eslint-config-prettier": "^8.6.0",
85
+ "eslint-plugin-prettier": "^4.2.1",
86
+ "eslint-plugin-react": "^7.32.1",
87
+ "eslint-plugin-react-hooks": "^4.6.0",
88
+ "jest": "^29.4.0",
89
+ "jest-environment-jsdom": "^29.4.0",
90
+ "jest-expo": "^47.0.1",
91
+ "postcss": "^8.4.21",
92
+ "postcss-assets": "^6.0.0",
93
+ "postcss-modules": "^4.3.1",
94
+ "prettier": "^2.8.3",
95
+ "react": "^17.0.2",
96
+ "react-dom": "^17.0.2",
97
+ "react-router-dom": "^5.3.4",
98
+ "rollup": "^2.79.1",
99
+ "rollup-plugin-delete": "^2.0.0",
100
+ "rollup-plugin-postcss": "^4.0.2",
101
+ "rollup-plugin-terser": "^7.0.2",
102
+ "rollup-plugin-tslib-resolve-id": "^0.0.0",
103
+ "rollup-plugin-typescript-paths": "^1.4.0",
104
+ "rollup-plugin-typescript2": "^0.34.1",
105
+ "styled-components": "^5.3.6",
106
+ "ts-jest": "^29.0.5",
107
+ "tslib": "^2.4.1",
108
+ "typescript": "=4.9.4"
109
+ },
110
+ "compilerOptions": {
111
+ "declaration": true
112
+ },
113
+ "files": [
114
+ "dist/"
115
+ ],
116
+ "engines": {
117
+ "node": ">=16.8.0",
118
+ "npm": ">=7.0.0"
119
+ },
120
+ "dependencies": {
121
+ "@microsoft/signalr": "^6.0.13",
122
+ "immer": "^9.0.19",
123
+ "zustand": "^4.3.2"
124
+ }
125
+ }