@j2inn/fin5-ui-utils 0.0.1-alpha.1 → 0.0.1-alpha.4

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,8 +1,7 @@
1
1
  import { AlarmFilter } from './openFin5Alarm';
2
2
  import { HistorianArgs, HistorianType } from './openFin5Historian';
3
3
  export declare const getFin5top: (notifyFailure?: () => void) => Fin5Top | null;
4
- declare const fin5Top: Fin5Top | null;
5
- export default fin5Top;
4
+ export declare const fin5Top: Fin5Top | null;
6
5
  export declare function isWindowTopFin5(notifyFailure?: () => void): boolean;
7
6
  export interface Fin5Top {
8
7
  app: Fin5App;
@@ -109,3 +108,4 @@ interface Fin5AppComponent {
109
108
  set: (value: unknown) => Promise<undefined>;
110
109
  }
111
110
  export declare type TargetRef = string | null | undefined;
111
+ export {};
@@ -13,8 +13,7 @@ class Fin5TopRetriever {
13
13
  };
14
14
  }
15
15
  export const getFin5top = Fin5TopRetriever.getFin5top;
16
- const fin5Top = Fin5TopRetriever.fin5Top;
17
- export default fin5Top;
16
+ export const fin5Top = Fin5TopRetriever.fin5Top;
18
17
  export function isWindowTopFin5(notifyFailure) {
19
18
  try {
20
19
  window?.top?.origin;
@@ -1,2 +1,2 @@
1
- import fin5Top from './fin5Top';
1
+ import { fin5Top } from './fin5Top';
2
2
  export const getFin5BinUrl = (id) => `/finGetFile/${fin5Top?.finstack?.projectName}?fileRef=${id?.toString()}`;
@@ -1,17 +1,16 @@
1
1
  //////////////////////////////////////////////////////////////////////////
2
2
  // Alarms
3
3
  //////////////////////////////////////////////////////////////////////////
4
- import { getFin5top } from './fin5Top';
4
+ import { fin5Top } from './fin5Top';
5
5
  export const openFin5AlarmsApp = async ({ targetRef, filter, historical = false, }) => {
6
- const fin5top = getFin5top();
7
- await fin5top?.app.NavigateToApp(fin5top?.app?.APP_NAMES?.ALARMS, targetRef);
8
- fin5top?.app.ToggleCollapse(false);
9
- let alarmFilters = fin5top?.app?.GetAlarmFilters() ?? {};
6
+ await fin5Top?.app.NavigateToApp(fin5Top?.app?.APP_NAMES?.ALARMS, targetRef);
7
+ fin5Top?.app.ToggleCollapse(false);
8
+ let alarmFilters = fin5Top?.app?.GetAlarmFilters() ?? {};
10
9
  if (filter) {
11
10
  alarmFilters = {
12
11
  ...alarmFilters,
13
12
  ...filter,
14
13
  };
15
14
  }
16
- fin5top?.app?.SetAlarmFilters(alarmFilters, historical);
15
+ fin5Top?.app?.SetAlarmFilters(alarmFilters, historical);
17
16
  };
@@ -1,7 +1,7 @@
1
1
  //////////////////////////////////////////////////////////////////////////
2
2
  // Historian
3
3
  //////////////////////////////////////////////////////////////////////////
4
- import fin5Top from './fin5Top';
4
+ import { fin5Top } from './fin5Top';
5
5
  export const openFin5HistorianApp = async (queryType, args) => {
6
6
  if (fin5Top) {
7
7
  queryType && args
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from 'fantomProps';
2
- export * from 'fin5Top';
3
- export * from 'react/components';
1
+ export * from './fantomProps';
2
+ export * from './fin5Top';
3
+ export * from './react/components';
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export * from 'fantomProps';
2
- export * from 'fin5Top';
3
- export * from 'react/components';
1
+ export * from './fantomProps';
2
+ export * from './fin5Top';
3
+ export * from './react/components';
package/package.json CHANGED
@@ -1,20 +1,18 @@
1
1
  {
2
2
  "name": "@j2inn/fin5-ui-utils",
3
- "version": "0.0.1-alpha.1",
3
+ "version": "0.0.1-alpha.4",
4
4
  "description": "A set of useful client-side utilities useful for creating UI applications on top of FIN 5",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
8
- "start": "webpack serve --config node_modules/@j2inn/react-config/webpack.config.js",
9
8
  "clean": "rimraf ./dist",
10
9
  "doc": "typedoc ./src --excludePrivate",
11
10
  "prebuild": "npm run clean",
12
- "build": "tsc -d --outDir dist",
11
+ "build": "tsc",
13
12
  "checktypes": "tsc --noEmit",
14
13
  "format": "prettier-eslint --list-different --write \"$(pwd)/src/**/*.{ts,tsx,js,jsx}\"",
15
14
  "lint": "eslint --fix --ext ts,tsx,js,jsx src/",
16
15
  "lint-staged": "lint-staged",
17
- "analyze": "webpack --analyze --config node_modules/@j2inn/react-config/webpack.config.js",
18
16
  "test": "cross-env NODE_ENV=test && npm run test:jest",
19
17
  "test:jest": "jest --passWithNoTests",
20
18
  "prepack": "npm run lint && npm test && npm run build"
@@ -24,90 +22,81 @@
24
22
  "files": [
25
23
  "dist/**/*"
26
24
  ],
25
+ "dependencies": {
26
+ "haystack-core": "^2.0.29",
27
+ "haystack-nclient": "^3.0.12",
28
+ "haystack-react": "^3.0.3",
29
+ "haystack-units": "^1.0.12",
30
+ "@j2inn/react-config": "^4.0.10",
31
+ "@j2inn/ui": "^5.0.0-beta.6",
32
+ "@j2inn/utils": "^5.0.6"
33
+ },
34
+ "peerDependencies": {
35
+ "react": "^17.0.2",
36
+ "react-dom": "^17.0.2"
37
+ },
27
38
  "devDependencies": {
28
39
  "@babel/cli": "^7.14.3",
29
40
  "@babel/core": "^7.14.3",
30
41
  "@babel/eslint-parser": "^7.14.4",
31
- "@babel/plugin-proposal-class-properties": "^7.13.0",
32
- "@babel/plugin-proposal-decorators": "^7.14.2",
33
- "@babel/plugin-proposal-export-default-from": "^7.12.13",
34
- "@babel/plugin-proposal-function-bind": "^7.12.13",
35
- "@babel/plugin-proposal-object-rest-spread": "^7.14.4",
42
+ "@babel/plugin-proposal-class-properties": "^7.16.7",
43
+ "@babel/plugin-proposal-decorators": "^7.17.8",
44
+ "@babel/plugin-proposal-export-default-from": "^7.16.7",
45
+ "@babel/plugin-proposal-function-bind": "^7.16.7",
46
+ "@babel/plugin-proposal-object-rest-spread": "^7.17.3",
47
+ "@babel/plugin-proposal-private-methods": "^7.16.11",
48
+ "@babel/plugin-proposal-private-property-in-object": "^7.16.7",
36
49
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
37
- "@babel/plugin-transform-react-inline-elements": "^7.12.13",
38
- "@babel/plugin-transform-runtime": "^7.14.3",
39
- "@babel/preset-env": "^7.14.4",
40
- "@babel/preset-react": "^7.13.13",
41
- "@babel/preset-typescript": "^7.13.0",
42
- "@j2inn/react-config": "^4.0.10",
43
- "@svgr/webpack": "^5.5.0",
50
+ "@babel/plugin-transform-modules-commonjs": "^7.17.7",
51
+ "@babel/plugin-transform-react-inline-elements": "^7.16.7",
52
+ "@babel/plugin-transform-runtime": "^7.17.0",
53
+ "@babel/preset-typescript": "^7.16.7",
54
+ "@babel/runtime": "^7.17.8",
44
55
  "@types/jest": "^27.4.0",
45
56
  "@types/node": "^15.0.2",
46
57
  "@types/react": "^17.0.8",
47
- "@types/react-dom": "^17.0.5",
48
58
  "@typescript-eslint/eslint-plugin": "^5.28.0",
49
59
  "@typescript-eslint/parser": "^5.28.0",
50
60
  "babel-eslint": "^10.1.0",
51
61
  "babel-loader": "^8.2.2",
52
- "babel-plugin-jsx-remove-data-test-id": "^3.0.0",
53
62
  "babel-plugin-react-html-attrs": "^3.0.5",
54
- "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
55
- "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
63
+ "babel-preset-react-app": "^10.0.1",
56
64
  "bundle-loader": "^0.5.6",
57
- "cpy": "^8.1.2",
58
- "cpy-cli": "^3.1.1",
65
+ "cpy": "^9.0.1",
66
+ "cpy-cli": "^4.1.0",
59
67
  "cross-env": "^7.0.3",
60
- "css-loader": "^5.2.6",
68
+ "css-loader": "^6.7.1",
61
69
  "css-modules-typescript-loader": "^4.0.1",
62
- "cypress": "^7.4.0",
63
- "eslint": "^7.27.0",
70
+ "cypress": "^9.5.2",
71
+ "eslint": "^7.32.0",
64
72
  "eslint-config-prettier": "^8.3.0",
65
- "eslint-plugin-jest": "^24.3.6",
73
+ "eslint-plugin-jest": "^26.1.3",
66
74
  "eslint-plugin-prettier": "^4.0.0",
67
- "eslint-plugin-react": "^7.24.0",
75
+ "eslint-plugin-react": "^7.29.4",
68
76
  "extract-css-chunks-webpack-plugin": "^4.9.0",
69
- "file-loader": "^6.2.0",
70
- "html-webpack-plugin": "^5.3.1",
71
- "husky": "^6.0.0",
77
+ "husky": "^7.0.4",
72
78
  "jest": "^27.0.3",
73
79
  "jest-chain": "^1.1.5",
74
80
  "jest-css-modules": "^2.1.0",
75
81
  "jest-css-modules-transform": "^4.2.1",
76
82
  "jest-extended": "^0.11.5",
77
- "less": "^4.1.1",
78
- "less-loader": "^9.0.0",
79
- "lint-staged": "^11.0.0",
83
+ "less": "^4.1.2",
84
+ "less-loader": "^10.2.0",
85
+ "lint-staged": "^12.3.7",
80
86
  "lodash-webpack-plugin": "^0.11.6",
81
- "loglevel": "^1.7.1",
82
- "mini-css-extract-plugin": "^1.6.0",
87
+ "mini-css-extract-plugin": "^2.6.0",
83
88
  "moment-locales-webpack-plugin": "^1.2.0",
84
89
  "monaco-editor-webpack-plugin": "^3.1.0",
85
90
  "nib": "^1.1.2",
86
- "prettier-eslint": "^12.0.0",
91
+ "prettier": "^2.6.1",
92
+ "prettier-eslint": "^13.0.0",
87
93
  "prettier-eslint-cli": "^5.0.1",
88
- "raw-loader": "^4.0.2",
94
+ "react-hot-loader": "^4.13.0",
89
95
  "rimraf": "^3.0.2",
90
- "style-loader": "^2.0.0",
91
- "stylus": "^0.54.8",
92
- "stylus-loader": "^6.0.0",
96
+ "stylus-loader": "^6.2.0",
93
97
  "ts-jest": "^27.1.3",
94
98
  "typedoc": "^0.22.5",
95
- "typescript": "^4.3.2",
96
- "url-loader": "^4.1.1",
97
- "webpack": "^5.38.1",
98
- "webpack-bundle-analyzer": "^4.4.1",
99
- "webpack-cli": "^4.7.0",
100
- "webpack-dev-server": "^3.11.2"
101
- },
102
- "dependencies": {
103
- "@j2inn/ui": "^5.0.0-beta.6",
104
- "@j2inn/utils": "^5.0.6",
105
- "haystack-core": "^2.0.29",
106
- "haystack-nclient": "^3.0.12",
107
- "haystack-react": "^3.0.3",
108
- "haystack-units": "^1.0.12",
109
- "react": "^17.0.2",
110
- "react-dom": "^17.0.2"
99
+ "typescript": "^4.6.3"
111
100
  },
112
101
  "lint-staged": {
113
102
  "**/*.[jt]s?(x)": [