chem-generic-ui 0.1.7 → 0.1.8
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/.babelrc +3 -0
- package/dist/App.js +21 -0
- package/dist/index.js +7 -29
- package/package.json +29 -36
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/App.css +38 -0
- package/src/App.js +23 -0
- package/src/index.css +13 -0
- package/src/index.js +16 -0
- package/dist/app.js +0 -37
- package/dist/components/admin/ElementManager.js +0 -98
- package/dist/components/fields/GenPropertiesText.js +0 -55
package/.babelrc
ADDED
package/dist/App.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import logo from './logo.svg';
|
|
2
|
+
import './App.css';
|
|
3
|
+
|
|
4
|
+
function App() {
|
|
5
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
6
|
+
className: "App"
|
|
7
|
+
}, /*#__PURE__*/React.createElement("header", {
|
|
8
|
+
className: "App-header"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
10
|
+
src: logo,
|
|
11
|
+
className: "App-logo",
|
|
12
|
+
alt: "logo"
|
|
13
|
+
}), /*#__PURE__*/React.createElement("p", null, "Edit ", /*#__PURE__*/React.createElement("code", null, "src/App.js"), " and save to reload."), /*#__PURE__*/React.createElement("a", {
|
|
14
|
+
className: "App-link",
|
|
15
|
+
href: "https://reactjs.org",
|
|
16
|
+
target: "_blank",
|
|
17
|
+
rel: "noopener noreferrer"
|
|
18
|
+
}, "Learn React")));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default App;
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _app = require("./app");
|
|
10
|
-
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
// import 'bootstrap/dist/css/bootstrap.min.css';
|
|
14
|
-
// import App from './App';
|
|
15
|
-
// import reportWebVitals from './reportWebVitals';
|
|
16
|
-
// import { ElementManager, GenPropertiesText } from './components/admin/ElementManager';
|
|
17
|
-
// export { ElementManager, GenPropertiesText };
|
|
18
|
-
_reactDom.default.render(_react.default.createElement(_app.ElementManager, {
|
|
19
|
-
elements: [],
|
|
20
|
-
element: {}
|
|
21
|
-
}), document.getElementById('root')); // function App() {
|
|
22
|
-
// return (
|
|
23
|
-
// <div>
|
|
24
|
-
// Project A
|
|
25
|
-
// <ElementManager />
|
|
26
|
-
// </div>
|
|
27
|
-
// );
|
|
28
|
-
// }
|
|
29
|
-
// export default App;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import App from './App';
|
|
5
|
+
ReactDOM.render( /*#__PURE__*/React.createElement(React.StrictMode, null, /*#__PURE__*/React.createElement(App, null)), document.getElementById('root')); // If you want to start measuring performance in your app, pass a function
|
|
6
|
+
// to log results (for example: reportWebVitals(console.log))
|
|
7
|
+
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
package/package.json
CHANGED
|
@@ -1,47 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chem-generic-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"private": false,
|
|
5
|
-
"
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"react": "^17.0.2",
|
|
7
|
+
"react-dom": "^17.0.2",
|
|
8
|
+
"react-scripts": "4.0.0"
|
|
9
|
+
},
|
|
6
10
|
"scripts": {
|
|
7
11
|
"start": "react-scripts start",
|
|
8
|
-
"build": "react-scripts build",
|
|
9
12
|
"compile": "rm -rf dist && NODE_ENV=production babel --ignore tests,stories ./src --out-dir ./dist",
|
|
10
|
-
"
|
|
13
|
+
"build": "react-scripts build",
|
|
14
|
+
"test": "react-scripts test",
|
|
15
|
+
"eject": "react-scripts eject"
|
|
11
16
|
},
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
|
|
17
|
+
"eslintConfig": {
|
|
18
|
+
"extends": [
|
|
19
|
+
"react-app",
|
|
20
|
+
"react-app/jest"
|
|
21
|
+
]
|
|
15
22
|
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
"browserslist": {
|
|
24
|
+
"production": [
|
|
25
|
+
">0.2%",
|
|
26
|
+
"not dead",
|
|
27
|
+
"not op_mini all"
|
|
28
|
+
],
|
|
29
|
+
"development": [
|
|
30
|
+
"last 1 chrome version",
|
|
31
|
+
"last 1 firefox version",
|
|
32
|
+
"last 1 safari version"
|
|
33
|
+
]
|
|
21
34
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
"README.md"
|
|
27
|
-
],
|
|
28
|
-
"browserslist": [
|
|
29
|
-
">0.2%",
|
|
30
|
-
"not dead",
|
|
31
|
-
"not ie <= 11",
|
|
32
|
-
"not op_mini all"
|
|
33
|
-
],
|
|
34
|
-
"dependencies": {
|
|
35
|
-
"@babel/cli": "^7.0.0",
|
|
36
|
-
"@babel/core": "^7.0.0",
|
|
37
|
-
"@babel/preset-env": "7.3.1",
|
|
38
|
-
"@babel/preset-react": "7.0.0",
|
|
39
|
-
"react": "^17.0.2",
|
|
40
|
-
"react-dom": "^17.0.2",
|
|
41
|
-
"react-scripts": "^2.1.1",
|
|
42
|
-
"react-select": "^2.0.0",
|
|
43
|
-
"lodash": "^4.17.21",
|
|
44
|
-
"react-bootstrap": "~0.33.1",
|
|
45
|
-
"uuid": "^8.3.2"
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@babel/cli": "^7.17.6",
|
|
37
|
+
"@babel/core": "^7.17.7",
|
|
38
|
+
"@babel/preset-env": "^7.16.11"
|
|
46
39
|
}
|
|
47
40
|
}
|
|
Binary file
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<meta name="theme-color" content="#000000" />
|
|
8
|
+
<meta
|
|
9
|
+
name="description"
|
|
10
|
+
content="Web site created using create-react-app"
|
|
11
|
+
/>
|
|
12
|
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
+
<!--
|
|
14
|
+
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
+
-->
|
|
17
|
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
+
<!--
|
|
19
|
+
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
+
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
+
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
+
|
|
23
|
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
+
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
+
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
+
-->
|
|
27
|
+
<title>React App</title>
|
|
28
|
+
</head>
|
|
29
|
+
<body>
|
|
30
|
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
31
|
+
<div id="root"></div>
|
|
32
|
+
<!--
|
|
33
|
+
This HTML file is a template.
|
|
34
|
+
If you open it directly in the browser, you will see an empty page.
|
|
35
|
+
|
|
36
|
+
You can add webfonts, meta tags, or analytics to this file.
|
|
37
|
+
The build step will place the bundled scripts into the <body> tag.
|
|
38
|
+
|
|
39
|
+
To begin the development, run `npm start` or `yarn start`.
|
|
40
|
+
To create a production bundle, use `npm run build` or `yarn build`.
|
|
41
|
+
-->
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"short_name": "React App",
|
|
3
|
+
"name": "Create React App Sample",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "favicon.ico",
|
|
7
|
+
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
+
"type": "image/x-icon"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"src": "logo192.png",
|
|
12
|
+
"type": "image/png",
|
|
13
|
+
"sizes": "192x192"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "logo512.png",
|
|
17
|
+
"type": "image/png",
|
|
18
|
+
"sizes": "512x512"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"start_url": ".",
|
|
22
|
+
"display": "standalone",
|
|
23
|
+
"theme_color": "#000000",
|
|
24
|
+
"background_color": "#ffffff"
|
|
25
|
+
}
|
package/src/App.css
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.App {
|
|
2
|
+
text-align: center;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.App-logo {
|
|
6
|
+
height: 40vmin;
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
11
|
+
.App-logo {
|
|
12
|
+
animation: App-logo-spin infinite 20s linear;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.App-header {
|
|
17
|
+
background-color: #282c34;
|
|
18
|
+
min-height: 100vh;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
font-size: calc(10px + 2vmin);
|
|
24
|
+
color: white;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.App-link {
|
|
28
|
+
color: #61dafb;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes App-logo-spin {
|
|
32
|
+
from {
|
|
33
|
+
transform: rotate(0deg);
|
|
34
|
+
}
|
|
35
|
+
to {
|
|
36
|
+
transform: rotate(360deg);
|
|
37
|
+
}
|
|
38
|
+
}
|
package/src/App.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import './App.css';
|
|
2
|
+
|
|
3
|
+
function App() {
|
|
4
|
+
return (
|
|
5
|
+
<div className="App">
|
|
6
|
+
<header className="App-header">
|
|
7
|
+
<p>
|
|
8
|
+
Edit <code>src/App.js</code> and save to reload.
|
|
9
|
+
</p>
|
|
10
|
+
<a
|
|
11
|
+
className="App-link"
|
|
12
|
+
href="https://reactjs.org"
|
|
13
|
+
target="_blank"
|
|
14
|
+
rel="noopener noreferrer"
|
|
15
|
+
>
|
|
16
|
+
Learn React
|
|
17
|
+
</a>
|
|
18
|
+
</header>
|
|
19
|
+
</div>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default App;
|
package/src/index.css
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
body {
|
|
2
|
+
margin: 0;
|
|
3
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
|
+
sans-serif;
|
|
6
|
+
-webkit-font-smoothing: antialiased;
|
|
7
|
+
-moz-osx-font-smoothing: grayscale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
code {
|
|
11
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
12
|
+
monospace;
|
|
13
|
+
}
|
package/src/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import App from './App';
|
|
5
|
+
|
|
6
|
+
ReactDOM.render(
|
|
7
|
+
<React.StrictMode>
|
|
8
|
+
<App />
|
|
9
|
+
</React.StrictMode>,
|
|
10
|
+
document.getElementById('root')
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
// If you want to start measuring performance in your app, pass a function
|
|
14
|
+
// to log results (for example: reportWebVitals(console.log))
|
|
15
|
+
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
16
|
+
|
package/dist/app.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "ElementManager", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _ElementManager.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "GenPropertiesNumber", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _GenPropertiesText.GenPropertiesNumber;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "GenPropertiesText", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return _GenPropertiesText.GenPropertiesText;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
28
|
-
|
|
29
|
-
var _ElementManager = _interopRequireDefault(require("./components/admin/ElementManager"));
|
|
30
|
-
|
|
31
|
-
var _GenPropertiesText = require("./components/fields/GenPropertiesText");
|
|
32
|
-
|
|
33
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
|
-
|
|
35
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
36
|
-
|
|
37
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _reactBootstrap = require("react-bootstrap");
|
|
13
|
-
|
|
14
|
-
var _lodash = require("lodash");
|
|
15
|
-
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
21
|
-
|
|
22
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
23
|
-
|
|
24
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
-
|
|
26
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
27
|
-
|
|
28
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
29
|
-
|
|
30
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
-
|
|
32
|
-
var ElementManager = function ElementManager(props) {
|
|
33
|
-
var _useState = (0, _react.useState)({
|
|
34
|
-
elements: [],
|
|
35
|
-
element: {}
|
|
36
|
-
}),
|
|
37
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
-
state = _useState2[0],
|
|
39
|
-
setState = _useState2[1];
|
|
40
|
-
|
|
41
|
-
(0, _react.useEffect)(function () {// setState({...state, element: 'test'});
|
|
42
|
-
// UsersFetcher.scifinderCredential().then((json) => {
|
|
43
|
-
// setCredential(json);
|
|
44
|
-
// }).catch(err => notify({ title: 'SciFinder-n Error', lvl: 'error', msg: err }));
|
|
45
|
-
}, [state.element]);
|
|
46
|
-
var els = (0, _lodash.orderBy)(props.elements, ['is_active', 'name', 'klass_prefix'], ['desc', 'asc', 'asc']);
|
|
47
|
-
var tb = els && els.map(function (e, idx) {
|
|
48
|
-
return _react.default.createElement("tbody", {
|
|
49
|
-
key: "tbody_".concat(e.id)
|
|
50
|
-
}, _react.default.createElement("tr", {
|
|
51
|
-
key: "row_".concat(e.id),
|
|
52
|
-
id: "row_".concat(e.id),
|
|
53
|
-
style: e.id === props.element.id ? {
|
|
54
|
-
fontWeight: 'bold',
|
|
55
|
-
borderWidth: 'medium',
|
|
56
|
-
backgroundColor: 'white',
|
|
57
|
-
borderStyle: 'groove'
|
|
58
|
-
} : {
|
|
59
|
-
fontWeight: 'unset'
|
|
60
|
-
}
|
|
61
|
-
}, _react.default.createElement("td", null, idx + 1), _react.default.createElement("td", null, _react.default.createElement(_reactBootstrap.Button, {
|
|
62
|
-
bsStyle: "primary",
|
|
63
|
-
onClick: function onClick() {}
|
|
64
|
-
}, "Copy to..."), "\xA0", _react.default.createElement(_reactBootstrap.Button, {
|
|
65
|
-
bsStyle: "primary",
|
|
66
|
-
onClick: function onClick() {}
|
|
67
|
-
}, "Edit Element attributes..."), "\xA0"), _react.default.createElement("td", null, e.name), _react.default.createElement("td", null, e.klass_prefix), _react.default.createElement("td", null, e.is_active ? _react.default.createElement("i", {
|
|
68
|
-
className: "fa fa-check",
|
|
69
|
-
"aria-hidden": "true",
|
|
70
|
-
style: {
|
|
71
|
-
color: 'green'
|
|
72
|
-
}
|
|
73
|
-
}) : _react.default.createElement("i", {
|
|
74
|
-
className: "fa fa-ban",
|
|
75
|
-
"aria-hidden": "true",
|
|
76
|
-
style: {
|
|
77
|
-
color: 'red'
|
|
78
|
-
}
|
|
79
|
-
})), _react.default.createElement("td", null, e.label), _react.default.createElement("td", null, _react.default.createElement("i", {
|
|
80
|
-
className: e.icon_name
|
|
81
|
-
})), _react.default.createElement("td", null, e.desc), _react.default.createElement("td", null, _react.default.createElement(_reactBootstrap.Button, {
|
|
82
|
-
bsStyle: "primary",
|
|
83
|
-
onClick: function onClick() {}
|
|
84
|
-
}, "Edit Element template..."), _react.default.createElement(_reactBootstrap.Button, {
|
|
85
|
-
bsStyle: "primary",
|
|
86
|
-
onClick: function onClick() {}
|
|
87
|
-
}, "Edit Element template in YAML format...")), _react.default.createElement("td", null, e.released_at, " (UTC)")));
|
|
88
|
-
});
|
|
89
|
-
return _react.default.createElement(_reactBootstrap.Panel, {
|
|
90
|
-
bsStyle: "primary"
|
|
91
|
-
}, _react.default.createElement(_reactBootstrap.Panel.Heading, null, _react.default.createElement(_reactBootstrap.Panel.Title, {
|
|
92
|
-
componentClass: "h3"
|
|
93
|
-
}, "Panel heading")), _react.default.createElement(_reactBootstrap.Panel.Body, null, "Panel content"));
|
|
94
|
-
}; // export { GenPropertiesText, ElementManager };
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var _default = ElementManager;
|
|
98
|
-
exports.default = _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.GenPropertiesNumber = exports.GenPropertiesText = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _reactBootstrap = require("react-bootstrap");
|
|
13
|
-
|
|
14
|
-
var _lodash = require("lodash");
|
|
15
|
-
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
|
-
|
|
18
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
|
-
|
|
20
|
-
var GenPropertiesText = function GenPropertiesText(opt) {
|
|
21
|
-
var className = opt.isEditable ? 'editable' : 'readonly';
|
|
22
|
-
className = opt.isRequired && opt.isEditable ? 'required' : className;
|
|
23
|
-
var fieldHeader = 'test';
|
|
24
|
-
return _react.default.createElement(_reactBootstrap.FormGroup, {
|
|
25
|
-
className: "text_generic_properties"
|
|
26
|
-
}, fieldHeader, _react.default.createElement(_reactBootstrap.FormControl, {
|
|
27
|
-
type: "text",
|
|
28
|
-
value: opt.value,
|
|
29
|
-
onChange: opt.onChange,
|
|
30
|
-
className: className,
|
|
31
|
-
readOnly: opt.readOnly,
|
|
32
|
-
required: opt.isRequired,
|
|
33
|
-
placeholder: opt.placeholder
|
|
34
|
-
}));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
exports.GenPropertiesText = GenPropertiesText;
|
|
38
|
-
|
|
39
|
-
var GenPropertiesNumber = function GenPropertiesNumber(opt) {
|
|
40
|
-
var className = opt.isEditable ? 'editable' : 'readonly';
|
|
41
|
-
className = opt.isRequired && opt.isEditable ? 'required' : className;
|
|
42
|
-
var fieldHeader = 'test';
|
|
43
|
-
return _react.default.createElement(_reactBootstrap.FormGroup, null, fieldHeader, _react.default.createElement(_reactBootstrap.FormControl, {
|
|
44
|
-
type: "number",
|
|
45
|
-
value: opt.value,
|
|
46
|
-
onChange: opt.onChange,
|
|
47
|
-
className: className,
|
|
48
|
-
readOnly: opt.readOnly,
|
|
49
|
-
required: opt.isRequired,
|
|
50
|
-
placeholder: opt.placeholder,
|
|
51
|
-
min: 1
|
|
52
|
-
}));
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports.GenPropertiesNumber = GenPropertiesNumber;
|