@equinor/echo-cli 1.0.0-beta-1 → 1.0.0-beta-3
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/echo-dev-host/.env +29 -0
- package/echo-dev-host/.vscode/settings.json +5 -0
- package/{lib/echo-client → echo-dev-host}/README.md +7 -5
- package/echo-dev-host/env.sh +51 -0
- package/{lib/echo-client → echo-dev-host}/package-lock.json +2 -2
- package/{lib/echo-client → echo-dev-host}/src/app.tsx +1 -1
- package/{lib/echo-client → echo-dev-host}/src/index.tsx +1 -1
- package/{lib/echo-client → echo-dev-host}/webpack.config.js +4 -4
- package/lib/{echo-build-client.d.ts → echo-build-dev-host.d.ts} +1 -1
- package/lib/echo-build-dev-host.js +35 -0
- package/lib/echo-build-dev-host.js.map +1 -0
- package/lib/echo-dev-host/.env +29 -0
- package/lib/echo-dev-host/README.md +46 -0
- package/lib/echo-dev-host/babel.config.js +11 -0
- package/lib/echo-dev-host/env.sh +51 -0
- package/lib/echo-dev-host/jest.config.js +21 -0
- package/lib/echo-dev-host/package-lock.json +12457 -0
- package/lib/echo-dev-host/package.json +80 -0
- package/lib/echo-dev-host/public/env-config.js +17 -0
- package/{client → lib/echo-dev-host/public}/index.html +1 -1
- package/lib/echo-dev-host/src/api/api-plants.ts +22 -0
- package/lib/echo-dev-host/src/app.css +12 -0
- package/lib/echo-dev-host/src/app.tsx +43 -0
- package/lib/echo-dev-host/src/components/Home/Home.tsx +23 -0
- package/lib/echo-dev-host/src/components/Home/home.module.css +38 -0
- package/lib/echo-dev-host/src/components/legend.tsx +3 -0
- package/lib/echo-dev-host/src/index.tsx +90 -0
- package/lib/echo-dev-host/src/setupTests.ts +25 -0
- package/lib/echo-dev-host/src/utils/plants.test.ts +33 -0
- package/lib/echo-dev-host/src/utils/plants.ts +12 -0
- package/lib/echo-dev-host/src/utils/setupSkipAuth.ts +43 -0
- package/lib/echo-dev-host/tsconfig.json +21 -0
- package/lib/echo-dev-host/webpack.config.js +138 -0
- package/package.json +4 -4
- package/client/env-config.js +0 -1
- package/client/main.echo.bundle.js +0 -3
- package/client/main.echo.bundle.js.LICENSE.txt +0 -133
- package/client/main.echo.bundle.js.map +0 -1
- package/client/vendors-node_modules_babel_polyfill_lib_index_js-node_modules_react-dom_client_js-node_module-5b8715.echo.bundle.js +0 -3
- package/client/vendors-node_modules_babel_polyfill_lib_index_js-node_modules_react-dom_client_js-node_module-5b8715.echo.bundle.js.LICENSE.txt +0 -8453
- package/client/vendors-node_modules_babel_polyfill_lib_index_js-node_modules_react-dom_client_js-node_module-5b8715.echo.bundle.js.map +0 -1
- package/lib/echo-build-client.js +0 -37
- package/lib/echo-build-client.js.map +0 -1
- package/lib/echo-client/.links.json +0 -3
- package/lib/echo-client/build/env-config.js +0 -1
- package/lib/echo-client/public/echoModuleManifest.json +0 -30
- package/lib/echo-client/public/index.css +0 -60
- package/lib/echo-client/public/module-bundle-demo1.js +0 -250
- package/lib/echo-client/public/module-bundle-demo2.js +0 -251
- package/lib/echo-client/public/module-bundle-demo3.js +0 -251
- /package/{lib/echo-client → echo-dev-host}/babel.config.js +0 -0
- /package/{lib/echo-client → echo-dev-host}/jest.config.js +0 -0
- /package/{lib/echo-client → echo-dev-host}/package.json +0 -0
- /package/{lib/echo-client → echo-dev-host}/public/env-config.js +0 -0
- /package/{client → echo-dev-host/public}/index.css +0 -0
- /package/{lib/echo-client → echo-dev-host}/public/index.html +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/api/api-plants.ts +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/app.css +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/components/Home/Home.tsx +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/components/Home/home.module.css +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/components/legend.tsx +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/images/frontpage-brand-placeholder.jpg +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/setupTests.ts +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/utils/plants.test.ts +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/utils/plants.ts +0 -0
- /package/{lib/echo-client → echo-dev-host}/src/utils/setupSkipAuth.ts +0 -0
- /package/{lib/echo-client → echo-dev-host}/tsconfig.json +0 -0
- /package/lib/{echo-client/build → echo-dev-host/public}/index.css +0 -0
- /package/{client/d2d97a9feca22f12a8c8c7413d7867ac.jpg → lib/echo-dev-host/src/images/frontpage-brand-placeholder.jpg} +0 -0
package/lib/echo-build-client.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { Command } from '@oclif/command';
|
|
3
|
-
import { execSync } from 'child_process';
|
|
4
|
-
import fs from 'fs-extra';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
import { fileURLToPath } from 'url';
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
export default class BuildClient extends Command {
|
|
9
|
-
static description = 'Build echo-client locally with current echo lib versions';
|
|
10
|
-
async run() {
|
|
11
|
-
// Paths
|
|
12
|
-
const cliNodeModules = path.resolve(process.cwd(), 'node_modules', '@equinor', 'echo-cli');
|
|
13
|
-
const clientSrc = path.join(cliNodeModules, './lib/echo-client');
|
|
14
|
-
const tmpClient = path.resolve(process.cwd(), 'echo-client-tmp');
|
|
15
|
-
const buildOutput = path.join(tmpClient, 'client'); // adjust if your build output is different
|
|
16
|
-
const finalOutput = path.join(cliNodeModules, 'client');
|
|
17
|
-
// 1. Prepare echo-client-tmp
|
|
18
|
-
if (!fs.existsSync(tmpClient)) {
|
|
19
|
-
this.log(`echo-client-tmp does not exist. Copying echo-client to ${tmpClient}...`);
|
|
20
|
-
fs.copySync(clientSrc, tmpClient);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
this.log(`echo-client-tmp exists. Reusing it.`);
|
|
24
|
-
}
|
|
25
|
-
// 2. Run npm install and build in temp folder
|
|
26
|
-
this.log('Installing dependencies and building echo-client...');
|
|
27
|
-
execSync('npm install', { cwd: tmpClient, stdio: 'inherit' });
|
|
28
|
-
execSync('npm run build', { cwd: tmpClient, stdio: 'inherit' });
|
|
29
|
-
// 3. Copy build output back to echo-cli's client folder
|
|
30
|
-
this.log(`Copying build output to ${finalOutput}...`);
|
|
31
|
-
fs.removeSync(finalOutput);
|
|
32
|
-
fs.copySync(buildOutput, finalOutput);
|
|
33
|
-
this.log('echo-client build complete.');
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
BuildClient.run();
|
|
37
|
-
//# sourceMappingURL=echo-build-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"echo-build-client.js","sourceRoot":"","sources":["../src/echo-build-client.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAElD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,OAAO;IAC5C,MAAM,CAAC,WAAW,GAAG,0DAA0D,CAAC;IAEhF,KAAK,CAAC,GAAG;QACL,QAAQ;QACR,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QAC3F,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;QACjE,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,iBAAiB,CAAC,CAAC;QACjE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,2CAA2C;QAC/F,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;QAExD,6BAA6B;QAC7B,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5B,IAAI,CAAC,GAAG,CAAC,0DAA0D,SAAS,KAAK,CAAC,CAAC;YACnF,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACpD,CAAC;QAED,8CAA8C;QAC9C,IAAI,CAAC,GAAG,CAAC,qDAAqD,CAAC,CAAC;QAChE,QAAQ,CAAC,aAAa,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC9D,QAAQ,CAAC,eAAe,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAEhE,wDAAwD;QACxD,IAAI,CAAC,GAAG,CAAC,2BAA2B,WAAW,KAAK,CAAC,CAAC;QACtD,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3B,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;QAEtC,IAAI,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAC5C,CAAC;;AAGL,WAAW,CAAC,GAAG,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
window._env_={HTTPS:"true",GENERATE_SOURCEMAP:"true",INLINE_RUNTIME_CHUNK:"false",WEBSITE_HOSTNAME:"localhost:3000;",REACT_APP_DEFAULT_CACHE_LOCATION:"localstorage",REACT_APP_API_URL:"https://dt-echopedia-api-dev.azurewebsites.net",REACT_APP_WEB_URL:"https://dt-echopedia-web-dev.azurewebsites.net",REACT_APP_WEB_PROD_URL:"https://echo.equinor.com",REACT_APP_AZURE_AD_TENNANT:"StatoilSRM.onmicrosoft.com",REACT_APP_AZURE_AD_TENNANT_ID:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",REACT_APP_AZURE_AD_CLIENT_ID:"751d2504-0b66-4b78-9807-4b60525a14c6",REACT_APP_API_CLIENT_ID:"aef35d97-53d4-4fd0-adaf-c5a514b38436",REACT_APP_APPINSIGHTS_CONNECTION_STRING:"InstrumentationKey=e5299075-a00d-4012-96f9-42861e8d8a9e;IngestionEndpoint=https://northeurope-3.in.applicationinsights.azure.com/;LiveEndpoint=https://northeurope.livediagnostics.monitor.azure.com/;ApplicationId=a9b64222-d4a9-42e6-a615-7428fe1a26af",REACT_APP_AZURE_BUILD_NUMBER:"0.8.dev.9",REACT_APP_LOGGER_ACTIVE:"false"};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
[{
|
|
3
|
-
"name": "Shapes",
|
|
4
|
-
"key": "sh",
|
|
5
|
-
"shortName": "sh",
|
|
6
|
-
"fileUri": "/module-bundle-demo1.js",
|
|
7
|
-
"path": "/shapes",
|
|
8
|
-
"requireRef": "app",
|
|
9
|
-
"version": "0.0.1"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"name": "WorK",
|
|
13
|
-
"key": "of",
|
|
14
|
-
"shortName": "of",
|
|
15
|
-
"fileUri": "/module-bundle-demo2.js",
|
|
16
|
-
"path": "/work",
|
|
17
|
-
"requireRef": "app",
|
|
18
|
-
"version": "0.0.1"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"name": "Demo\n Settings",
|
|
22
|
-
"key": "ds",
|
|
23
|
-
"shortName": "ds",
|
|
24
|
-
"fileUri": "/module-bundle-demo3.js",
|
|
25
|
-
"path": "/settings",
|
|
26
|
-
"requireRef": "app",
|
|
27
|
-
"version": "0.0.1",
|
|
28
|
-
"private": true
|
|
29
|
-
}
|
|
30
|
-
]
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
body {
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
margin: 0;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.highlightedText {
|
|
7
|
-
background: yellow;
|
|
8
|
-
color: black;
|
|
9
|
-
padding: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
#rootloading {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
color: #ff1243;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
align-items: center;
|
|
18
|
-
text-align: center;
|
|
19
|
-
position: absolute;
|
|
20
|
-
width: 100%;
|
|
21
|
-
height: 100%;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.loaderContainer {
|
|
25
|
-
margin: 8px auto;
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
padding-top: 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.productLogo {
|
|
32
|
-
flex: 1;
|
|
33
|
-
margin-bottom: 4rem;
|
|
34
|
-
text-align: left;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.productLogoImg {
|
|
38
|
-
display: inline-block;
|
|
39
|
-
vertical-align: baseline;
|
|
40
|
-
width: 122px;
|
|
41
|
-
animation: fadeIn 0.5s;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.equinorLogo {
|
|
45
|
-
margin: 0 auto;
|
|
46
|
-
display: inline-block;
|
|
47
|
-
vertical-align: baseline;
|
|
48
|
-
width: 64px;
|
|
49
|
-
height: 64px;
|
|
50
|
-
animation: fadeIn 0.5s;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
@keyframes fadeIn {
|
|
54
|
-
0% {
|
|
55
|
-
opacity: 0;
|
|
56
|
-
}
|
|
57
|
-
100% {
|
|
58
|
-
opacity: 1;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
(function (g, f) {
|
|
2
|
-
function define(d, f) {
|
|
3
|
-
typeof document !== 'undefined' && (document.currentScript.module = {});
|
|
4
|
-
f(document.currentScript.module, ...d.filter((d) => d !== 'exports').map(window.app));
|
|
5
|
-
}
|
|
6
|
-
define.amd = !0;
|
|
7
|
-
typeof exports === 'object' && typeof module !== 'undefined'
|
|
8
|
-
? f(exports, require('@equinor/echo-core'), require('react'))
|
|
9
|
-
: typeof define === 'function' && define.amd
|
|
10
|
-
? define(['exports', '@equinor/echo-core', 'react'], f)
|
|
11
|
-
: ((g = typeof globalThis !== 'undefined' ? globalThis : g || self),
|
|
12
|
-
f((g['echo-module'] = {}), g['*'], g['^17']['0']['2']));
|
|
13
|
-
})(this, function (exports, EchoCore, React) {
|
|
14
|
-
('use strict');
|
|
15
|
-
function _interopDefaultLegacy(e) {
|
|
16
|
-
return e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
17
|
-
}
|
|
18
|
-
var EchoCore__default = /*#__PURE__*/ _interopDefaultLegacy(EchoCore);
|
|
19
|
-
var React__default = /*#__PURE__*/ _interopDefaultLegacy(React);
|
|
20
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
21
|
-
function adopt(value) {
|
|
22
|
-
return value instanceof P
|
|
23
|
-
? value
|
|
24
|
-
: new P(function (resolve) {
|
|
25
|
-
resolve(value);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
-
function fulfilled(value) {
|
|
30
|
-
try {
|
|
31
|
-
step(generator.next(value));
|
|
32
|
-
} catch (e) {
|
|
33
|
-
reject(e);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function rejected(value) {
|
|
37
|
-
try {
|
|
38
|
-
step(generator['throw'](value));
|
|
39
|
-
} catch (e) {
|
|
40
|
-
reject(e);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
function step(result) {
|
|
44
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
45
|
-
}
|
|
46
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function __generator(thisArg, body) {
|
|
50
|
-
var _ = {
|
|
51
|
-
label: 0,
|
|
52
|
-
sent: function () {
|
|
53
|
-
if (t[0] & 1) throw t[1];
|
|
54
|
-
return t[1];
|
|
55
|
-
},
|
|
56
|
-
trys: [],
|
|
57
|
-
ops: []
|
|
58
|
-
},
|
|
59
|
-
f,
|
|
60
|
-
y,
|
|
61
|
-
t,
|
|
62
|
-
g;
|
|
63
|
-
return (
|
|
64
|
-
(g = { next: verb(0), throw: verb(1), return: verb(2) }),
|
|
65
|
-
typeof Symbol === 'function' &&
|
|
66
|
-
(g[Symbol.iterator] = function () {
|
|
67
|
-
return this;
|
|
68
|
-
}),
|
|
69
|
-
g
|
|
70
|
-
);
|
|
71
|
-
function verb(n) {
|
|
72
|
-
return function (v) {
|
|
73
|
-
return step([n, v]);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function step(op) {
|
|
77
|
-
if (f) throw new TypeError('Generator is already executing.');
|
|
78
|
-
while (_)
|
|
79
|
-
try {
|
|
80
|
-
if (
|
|
81
|
-
((f = 1),
|
|
82
|
-
y &&
|
|
83
|
-
(t =
|
|
84
|
-
op[0] & 2
|
|
85
|
-
? y['return']
|
|
86
|
-
: op[0]
|
|
87
|
-
? y['throw'] || ((t = y['return']) && t.call(y), 0)
|
|
88
|
-
: y.next) &&
|
|
89
|
-
!(t = t.call(y, op[1])).done)
|
|
90
|
-
)
|
|
91
|
-
return t;
|
|
92
|
-
if (((y = 0), t)) op = [op[0] & 2, t.value];
|
|
93
|
-
switch (op[0]) {
|
|
94
|
-
case 0:
|
|
95
|
-
case 1:
|
|
96
|
-
t = op;
|
|
97
|
-
break;
|
|
98
|
-
case 4:
|
|
99
|
-
_.label++;
|
|
100
|
-
return { value: op[1], done: false };
|
|
101
|
-
case 5:
|
|
102
|
-
_.label++;
|
|
103
|
-
y = op[1];
|
|
104
|
-
op = [0];
|
|
105
|
-
continue;
|
|
106
|
-
case 7:
|
|
107
|
-
op = _.ops.pop();
|
|
108
|
-
_.trys.pop();
|
|
109
|
-
continue;
|
|
110
|
-
default:
|
|
111
|
-
if (
|
|
112
|
-
!((t = _.trys), (t = t.length > 0 && t[t.length - 1])) &&
|
|
113
|
-
(op[0] === 6 || op[0] === 2)
|
|
114
|
-
) {
|
|
115
|
-
_ = 0;
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
119
|
-
_.label = op[1];
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
123
|
-
_.label = t[1];
|
|
124
|
-
t = op;
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
if (t && _.label < t[2]) {
|
|
128
|
-
_.label = t[2];
|
|
129
|
-
_.ops.push(op);
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
if (t[2]) _.ops.pop();
|
|
133
|
-
_.trys.pop();
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
op = body.call(thisArg, _);
|
|
137
|
-
} catch (e) {
|
|
138
|
-
op = [6, e];
|
|
139
|
-
y = 0;
|
|
140
|
-
} finally {
|
|
141
|
-
f = t = 0;
|
|
142
|
-
}
|
|
143
|
-
if (op[0] & 5) throw op[1];
|
|
144
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function __read(o, n) {
|
|
148
|
-
var m = typeof Symbol === 'function' && o[Symbol.iterator];
|
|
149
|
-
if (!m) return o;
|
|
150
|
-
var i = m.call(o),
|
|
151
|
-
r,
|
|
152
|
-
ar = [],
|
|
153
|
-
e;
|
|
154
|
-
try {
|
|
155
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
156
|
-
} catch (error) {
|
|
157
|
-
e = { error: error };
|
|
158
|
-
} finally {
|
|
159
|
-
try {
|
|
160
|
-
if (r && !r.done && (m = i['return'])) m.call(i);
|
|
161
|
-
} finally {
|
|
162
|
-
if (e) throw e.error;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return ar;
|
|
166
|
-
}
|
|
167
|
-
function styleInject(css, ref) {
|
|
168
|
-
if (ref === void 0) ref = {};
|
|
169
|
-
var insertAt = ref.insertAt;
|
|
170
|
-
|
|
171
|
-
if (!css || typeof document === 'undefined') {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
176
|
-
var style = document.createElement('style');
|
|
177
|
-
style.type = 'text/css';
|
|
178
|
-
|
|
179
|
-
if (insertAt === 'top') {
|
|
180
|
-
if (head.firstChild) {
|
|
181
|
-
head.insertBefore(style, head.firstChild);
|
|
182
|
-
} else {
|
|
183
|
-
head.appendChild(style);
|
|
184
|
-
}
|
|
185
|
-
} else {
|
|
186
|
-
head.appendChild(style);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (style.styleSheet) {
|
|
190
|
-
style.styleSheet.cssText = css;
|
|
191
|
-
} else {
|
|
192
|
-
style.appendChild(document.createTextNode(css));
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
var css_248z = '.app-module_wrapper__WV5yl{margin-top:150px;padding:16px;text-align:center}';
|
|
196
|
-
var style = { wrapper: 'app-module_wrapper__WV5yl' };
|
|
197
|
-
styleInject(css_248z);
|
|
198
|
-
var baseApiUrl = EchoCore.EchoEnv.env().REACT_APP_API_URL;
|
|
199
|
-
|
|
200
|
-
function getVersion() {
|
|
201
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
202
|
-
var data;
|
|
203
|
-
return __generator(this, function (_a) {
|
|
204
|
-
switch (_a.label) {
|
|
205
|
-
case 0:
|
|
206
|
-
return [4, EchoCore__default['default'].EchoClient.fetch(baseApiUrl + '/Version')];
|
|
207
|
-
|
|
208
|
-
case 1:
|
|
209
|
-
data = _a.sent();
|
|
210
|
-
return [4, data.text()];
|
|
211
|
-
|
|
212
|
-
case 2:
|
|
213
|
-
return [2, _a.sent()];
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
var App = function App() {
|
|
220
|
-
var _a = __read(React.useState(''), 2),
|
|
221
|
-
echoVersion = _a[0],
|
|
222
|
-
setEchoVersion = _a[1];
|
|
223
|
-
|
|
224
|
-
React.useEffect(function () {
|
|
225
|
-
getVersion().then(function (version) {
|
|
226
|
-
setEchoVersion(version);
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
return /*#__PURE__*/ React__default['default'].createElement(
|
|
230
|
-
'div',
|
|
231
|
-
{
|
|
232
|
-
className: style.wrapper
|
|
233
|
-
},
|
|
234
|
-
/*#__PURE__*/ React__default['default'].createElement('h1', null, 'Echo Shapes'),
|
|
235
|
-
/*#__PURE__*/ React__default['default'].createElement(
|
|
236
|
-
'p',
|
|
237
|
-
null,
|
|
238
|
-
'This is an app template for Echo Applications'
|
|
239
|
-
),
|
|
240
|
-
/*#__PURE__*/ React__default['default'].createElement('h6', null, 'Echo v', echoVersion)
|
|
241
|
-
);
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
function setup(api) {
|
|
245
|
-
api.registerApp(App, { params: '', homeScreen: true });
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
exports.setup = setup;
|
|
249
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
250
|
-
});
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
(function (g, f) {
|
|
2
|
-
function define(d, f) {
|
|
3
|
-
typeof document !== 'undefined' && (document.currentScript.module = {});
|
|
4
|
-
f(document.currentScript.module, ...d.filter((d) => d !== 'exports').map(window.app));
|
|
5
|
-
}
|
|
6
|
-
define.amd = !0;
|
|
7
|
-
typeof exports === 'object' && typeof module !== 'undefined'
|
|
8
|
-
? f(exports, require('@equinor/echo-core'), require('react'))
|
|
9
|
-
: typeof define === 'function' && define.amd
|
|
10
|
-
? define(['exports', '@equinor/echo-core', 'react'], f)
|
|
11
|
-
: ((g = typeof globalThis !== 'undefined' ? globalThis : g || self),
|
|
12
|
-
f((g['echo-module'] = {}), g['*'], g['^17']['0']['2']));
|
|
13
|
-
})(this, function (exports, EchoCore, React) {
|
|
14
|
-
('use strict');
|
|
15
|
-
function _interopDefaultLegacy(e) {
|
|
16
|
-
return e && typeof e === 'object' && 'default' in e ? e : { default: e };
|
|
17
|
-
}
|
|
18
|
-
var EchoCore__default = /*#__PURE__*/ _interopDefaultLegacy(EchoCore);
|
|
19
|
-
var React__default = /*#__PURE__*/ _interopDefaultLegacy(React);
|
|
20
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
21
|
-
function adopt(value) {
|
|
22
|
-
return value instanceof P
|
|
23
|
-
? value
|
|
24
|
-
: new P(function (resolve) {
|
|
25
|
-
resolve(value);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
-
function fulfilled(value) {
|
|
30
|
-
try {
|
|
31
|
-
step(generator.next(value));
|
|
32
|
-
} catch (e) {
|
|
33
|
-
reject(e);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function rejected(value) {
|
|
37
|
-
try {
|
|
38
|
-
step(generator['throw'](value));
|
|
39
|
-
} catch (e) {
|
|
40
|
-
reject(e);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
function step(result) {
|
|
44
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
45
|
-
}
|
|
46
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function __generator(thisArg, body) {
|
|
50
|
-
var _ = {
|
|
51
|
-
label: 0,
|
|
52
|
-
sent: function () {
|
|
53
|
-
if (t[0] & 1) throw t[1];
|
|
54
|
-
return t[1];
|
|
55
|
-
},
|
|
56
|
-
trys: [],
|
|
57
|
-
ops: []
|
|
58
|
-
},
|
|
59
|
-
f,
|
|
60
|
-
y,
|
|
61
|
-
t,
|
|
62
|
-
g;
|
|
63
|
-
return (
|
|
64
|
-
(g = { next: verb(0), throw: verb(1), return: verb(2) }),
|
|
65
|
-
typeof Symbol === 'function' &&
|
|
66
|
-
(g[Symbol.iterator] = function () {
|
|
67
|
-
return this;
|
|
68
|
-
}),
|
|
69
|
-
g
|
|
70
|
-
);
|
|
71
|
-
function verb(n) {
|
|
72
|
-
return function (v) {
|
|
73
|
-
return step([n, v]);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function step(op) {
|
|
77
|
-
if (f) throw new TypeError('Generator is already executing.');
|
|
78
|
-
while (_)
|
|
79
|
-
try {
|
|
80
|
-
if (
|
|
81
|
-
((f = 1),
|
|
82
|
-
y &&
|
|
83
|
-
(t =
|
|
84
|
-
op[0] & 2
|
|
85
|
-
? y['return']
|
|
86
|
-
: op[0]
|
|
87
|
-
? y['throw'] || ((t = y['return']) && t.call(y), 0)
|
|
88
|
-
: y.next) &&
|
|
89
|
-
!(t = t.call(y, op[1])).done)
|
|
90
|
-
)
|
|
91
|
-
return t;
|
|
92
|
-
if (((y = 0), t)) op = [op[0] & 2, t.value];
|
|
93
|
-
switch (op[0]) {
|
|
94
|
-
case 0:
|
|
95
|
-
case 1:
|
|
96
|
-
t = op;
|
|
97
|
-
break;
|
|
98
|
-
case 4:
|
|
99
|
-
_.label++;
|
|
100
|
-
return { value: op[1], done: false };
|
|
101
|
-
case 5:
|
|
102
|
-
_.label++;
|
|
103
|
-
y = op[1];
|
|
104
|
-
op = [0];
|
|
105
|
-
continue;
|
|
106
|
-
case 7:
|
|
107
|
-
op = _.ops.pop();
|
|
108
|
-
_.trys.pop();
|
|
109
|
-
continue;
|
|
110
|
-
default:
|
|
111
|
-
if (
|
|
112
|
-
!((t = _.trys), (t = t.length > 0 && t[t.length - 1])) &&
|
|
113
|
-
(op[0] === 6 || op[0] === 2)
|
|
114
|
-
) {
|
|
115
|
-
_ = 0;
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
119
|
-
_.label = op[1];
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
123
|
-
_.label = t[1];
|
|
124
|
-
t = op;
|
|
125
|
-
break;
|
|
126
|
-
}
|
|
127
|
-
if (t && _.label < t[2]) {
|
|
128
|
-
_.label = t[2];
|
|
129
|
-
_.ops.push(op);
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
if (t[2]) _.ops.pop();
|
|
133
|
-
_.trys.pop();
|
|
134
|
-
continue;
|
|
135
|
-
}
|
|
136
|
-
op = body.call(thisArg, _);
|
|
137
|
-
} catch (e) {
|
|
138
|
-
op = [6, e];
|
|
139
|
-
y = 0;
|
|
140
|
-
} finally {
|
|
141
|
-
f = t = 0;
|
|
142
|
-
}
|
|
143
|
-
if (op[0] & 5) throw op[1];
|
|
144
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function __read(o, n) {
|
|
148
|
-
var m = typeof Symbol === 'function' && o[Symbol.iterator];
|
|
149
|
-
if (!m) return o;
|
|
150
|
-
var i = m.call(o),
|
|
151
|
-
r,
|
|
152
|
-
ar = [],
|
|
153
|
-
e;
|
|
154
|
-
try {
|
|
155
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
156
|
-
} catch (error) {
|
|
157
|
-
e = { error: error };
|
|
158
|
-
} finally {
|
|
159
|
-
try {
|
|
160
|
-
if (r && !r.done && (m = i['return'])) m.call(i);
|
|
161
|
-
} finally {
|
|
162
|
-
if (e) throw e.error;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return ar;
|
|
166
|
-
}
|
|
167
|
-
function styleInject(css, ref) {
|
|
168
|
-
if (ref === void 0) ref = {};
|
|
169
|
-
var insertAt = ref.insertAt;
|
|
170
|
-
|
|
171
|
-
if (!css || typeof document === 'undefined') {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
176
|
-
var style = document.createElement('style');
|
|
177
|
-
style.type = 'text/css';
|
|
178
|
-
|
|
179
|
-
if (insertAt === 'top') {
|
|
180
|
-
if (head.firstChild) {
|
|
181
|
-
head.insertBefore(style, head.firstChild);
|
|
182
|
-
} else {
|
|
183
|
-
head.appendChild(style);
|
|
184
|
-
}
|
|
185
|
-
} else {
|
|
186
|
-
head.appendChild(style);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
if (style.styleSheet) {
|
|
190
|
-
style.styleSheet.cssText = css;
|
|
191
|
-
} else {
|
|
192
|
-
style.appendChild(document.createTextNode(css));
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
var css_248z = '.app-module_wrapper__WV5yl{margin-top:150px;padding:16px;text-align:center}';
|
|
196
|
-
var style = { wrapper: 'app-module_wrapper__WV5yl' };
|
|
197
|
-
styleInject(css_248z);
|
|
198
|
-
var baseApiUrl = EchoCore.EchoEnv.env().REACT_APP_API_URL;
|
|
199
|
-
|
|
200
|
-
function getVersion() {
|
|
201
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
202
|
-
var data;
|
|
203
|
-
return __generator(this, function (_a) {
|
|
204
|
-
switch (_a.label) {
|
|
205
|
-
case 0:
|
|
206
|
-
return [4, EchoCore__default['default'].EchoClient.fetch(baseApiUrl + '/Version')];
|
|
207
|
-
|
|
208
|
-
case 1:
|
|
209
|
-
data = _a.sent();
|
|
210
|
-
return [4, data.text()];
|
|
211
|
-
|
|
212
|
-
case 2:
|
|
213
|
-
return [2, _a.sent()];
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
var App = function App() {
|
|
220
|
-
var _a = __read(React.useState(''), 2),
|
|
221
|
-
echoVersion = _a[0],
|
|
222
|
-
setEchoVersion = _a[1];
|
|
223
|
-
|
|
224
|
-
React.useEffect(function () {
|
|
225
|
-
getVersion().then(function (version) {
|
|
226
|
-
setEchoVersion(version);
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
return /*#__PURE__*/ React__default['default'].createElement(
|
|
230
|
-
'div',
|
|
231
|
-
{
|
|
232
|
-
className: style.wrapper
|
|
233
|
-
},
|
|
234
|
-
/*#__PURE__*/ React__default['default'].createElement('h1', null, 'Echo Work'),
|
|
235
|
-
/*#__PURE__*/ React__default['default'].createElement(
|
|
236
|
-
'p',
|
|
237
|
-
null,
|
|
238
|
-
'This is an app template for Echo Applications'
|
|
239
|
-
),
|
|
240
|
-
/*#__PURE__*/ React__default['default'].createElement('h6', null, 'Echo v', echoVersion)
|
|
241
|
-
);
|
|
242
|
-
};
|
|
243
|
-
const panels = [{ panelType: 'left', component: App, key: 'demo2', icon: 'settings', label: 'Demo2' }];
|
|
244
|
-
|
|
245
|
-
function setup(api) {
|
|
246
|
-
api.registerApp(App, { params: '', icon: 'work', homeScreen: true, panels });
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
exports.setup = setup;
|
|
250
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
251
|
-
});
|