@equinor/roma-framework 0.0.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/dev-portal/index.html +34 -0
- package/dev-portal/lib/dev-portal/AppLoader.d.ts +12 -0
- package/dev-portal/lib/dev-portal/AppViewer.d.ts +6 -0
- package/dev-portal/lib/dev-portal/EquinorLoader.d.ts +12 -0
- package/dev-portal/lib/dev-portal/ErrorViewer.d.ts +12 -0
- package/dev-portal/lib/dev-portal/Header.d.ts +2 -0
- package/dev-portal/lib/dev-portal/Navigation.d.ts +5 -0
- package/dev-portal/lib/dev-portal/Root.d.ts +5 -0
- package/dev-portal/lib/dev-portal/config.d.ts +3 -0
- package/dev-portal/lib/dev-portal/index.d.ts +13 -0
- package/dev-portal/package.json +14 -0
- package/dev-portal/roma-framework.umd.js +392 -0
- package/index.d.ts +5 -0
- package/lib/dev-portal/AppLoader.d.ts +12 -0
- package/lib/dev-portal/AppViewer.d.ts +6 -0
- package/lib/dev-portal/EquinorLoader.d.ts +12 -0
- package/lib/dev-portal/ErrorViewer.d.ts +12 -0
- package/lib/make-component.d.ts +12 -0
- package/package.json +14 -0
- package/roma-framework.js +117 -0
- package/roma-framework.mjs +15200 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang='en'>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset='utf-8'/>
|
|
5
|
+
<title>Workbench</title>
|
|
6
|
+
<base href='/'/>
|
|
7
|
+
<script>
|
|
8
|
+
// Hack to avoid duplicate registration of custom elements
|
|
9
|
+
const _customElementsDefine = window.customElements.define;
|
|
10
|
+
window.customElements.define = (name, cl, conf) => {
|
|
11
|
+
if ( !customElements.get(name) ) {
|
|
12
|
+
_customElementsDefine.call(window.customElements, name, cl, conf);
|
|
13
|
+
} else {
|
|
14
|
+
console.debug(`duplicate registration of ${ name }`);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
</script>
|
|
18
|
+
<style>
|
|
19
|
+
html,
|
|
20
|
+
body {
|
|
21
|
+
min-height: 100vh;
|
|
22
|
+
padding: 0;
|
|
23
|
+
margin: 0;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
26
|
+
<meta name='viewport' content='width=device-width, initial-scale=1'/>
|
|
27
|
+
<link rel='icon' type='image/x-icon' href='/favicon.ico'/>
|
|
28
|
+
<script type="module" crossorigin src="/roma-framework.umd.js"></script>
|
|
29
|
+
</head>
|
|
30
|
+
<body>
|
|
31
|
+
<div id='root'></div>
|
|
32
|
+
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AppManifest } from '@equinor/fusion-framework-module-app';
|
|
2
|
+
/**
|
|
3
|
+
* Component that will render a Fusion application
|
|
4
|
+
*
|
|
5
|
+
* @param app the AppManifest for the application to render
|
|
6
|
+
* @param kind whether the app is a widget or an application
|
|
7
|
+
* @constructor
|
|
8
|
+
*/
|
|
9
|
+
export declare function AppLoader({ app, kind }: {
|
|
10
|
+
app: AppManifest | null;
|
|
11
|
+
kind?: 'app' | 'widget';
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Simple in-place loader for fusion apps
|
|
4
|
+
*
|
|
5
|
+
* @param children
|
|
6
|
+
* @param text
|
|
7
|
+
* @constructor
|
|
8
|
+
*/
|
|
9
|
+
export declare const EquinorLoader: ({ children, text, }: React.PropsWithChildren<{
|
|
10
|
+
readonly text: string;
|
|
11
|
+
}>) => JSX.Element;
|
|
12
|
+
export default EquinorLoader;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple error display component.
|
|
3
|
+
* Does not create a pretty error, and should most likely be recreated for various error types (e.g. lack of access etc.)
|
|
4
|
+
* Reasonable to assume this will be a part of e.g. @equinor/roma-components in the future.
|
|
5
|
+
*
|
|
6
|
+
* @param error
|
|
7
|
+
* @constructor
|
|
8
|
+
*/
|
|
9
|
+
export declare const ErrorViewer: ({ error }: {
|
|
10
|
+
readonly error: Error;
|
|
11
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default ErrorViewer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dev portal rotues
|
|
3
|
+
*/
|
|
4
|
+
export declare const routes: {
|
|
5
|
+
path: string;
|
|
6
|
+
element: import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
children: {
|
|
8
|
+
path: string;
|
|
9
|
+
element: import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
}[];
|
|
11
|
+
}[];
|
|
12
|
+
export declare function App(): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default App;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@equinor/roma-framework",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"repository": "https://github.com/equinor/tops-roma",
|
|
5
|
+
"main": "./framework.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"private": false,
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./framework.mjs",
|
|
11
|
+
"require": "./framework.js"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|