chem-generic-ui 0.1.10 → 0.1.11

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/dist/app.js ADDED
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ElementManager", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _ElementManager.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "GenPropertiesNumber", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _GenPropertiesText.GenPropertiesNumber;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "GenPropertiesText", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _GenPropertiesText.GenPropertiesText;
22
+ }
23
+ });
24
+
25
+ var _ElementManager = _interopRequireDefault(require("./components/admin/ElementManager"));
26
+
27
+ var _GenPropertiesText = require("./components/fields/GenPropertiesText");
28
+
29
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,54 @@
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
+ 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); }
15
+
16
+ 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; }
17
+
18
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
+
20
+ 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."); }
21
+
22
+ 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); }
23
+
24
+ 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; }
25
+
26
+ 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; }
27
+
28
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
29
+
30
+ var ElementManager = function ElementManager() {
31
+ var _useState = (0, _react.useState)(0),
32
+ _useState2 = _slicedToArray(_useState, 2),
33
+ count = _useState2[0],
34
+ setCount = _useState2[1]; // return (
35
+ // <Panel bsStyle="primary">
36
+ // <Panel.Heading>
37
+ // <Panel.Title componentClass="h3">Panel heading</Panel.Title>
38
+ // </Panel.Heading>
39
+ // <Panel.Body>Panel content</Panel.Body>
40
+ // </Panel>
41
+ // );
42
+
43
+
44
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, "You clicked ", count, " times"), /*#__PURE__*/_react.default.createElement(_reactBootstrap.Button, {
45
+ variant: "primary",
46
+ onClick: function onClick() {
47
+ return setCount(count + 1);
48
+ }
49
+ }, "Click me"));
50
+ }; // export { GenPropertiesText, ElementManager };
51
+
52
+
53
+ var _default = ElementManager;
54
+ exports.default = _default;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.GenPropertiesText = exports.GenPropertiesNumber = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _reactBootstrap = require("react-bootstrap");
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
14
+ // import { findIndex, filter, sortBy, orderBy } from 'lodash';
15
+ var GenPropertiesText = function GenPropertiesText(opt) {
16
+ var className = opt.isEditable ? 'editable' : 'readonly';
17
+ className = opt.isRequired && opt.isEditable ? 'required' : className;
18
+ var fieldHeader = 'test';
19
+ return /*#__PURE__*/_react.default.createElement(_reactBootstrap.FormGroup, {
20
+ className: "text_generic_properties"
21
+ }, fieldHeader, /*#__PURE__*/_react.default.createElement(_reactBootstrap.FormControl, {
22
+ type: "text",
23
+ value: opt.value,
24
+ onChange: opt.onChange,
25
+ className: className,
26
+ readOnly: opt.readOnly,
27
+ required: opt.isRequired,
28
+ placeholder: opt.placeholder
29
+ }));
30
+ };
31
+
32
+ exports.GenPropertiesText = GenPropertiesText;
33
+
34
+ var GenPropertiesNumber = function GenPropertiesNumber(opt) {
35
+ var className = opt.isEditable ? 'editable' : 'readonly';
36
+ className = opt.isRequired && opt.isEditable ? 'required' : className;
37
+ var fieldHeader = 'test';
38
+ return /*#__PURE__*/_react.default.createElement(_reactBootstrap.FormGroup, null, fieldHeader, /*#__PURE__*/_react.default.createElement(_reactBootstrap.FormControl, {
39
+ type: "number",
40
+ value: opt.value,
41
+ onChange: opt.onChange,
42
+ className: className,
43
+ readOnly: opt.readOnly,
44
+ required: opt.isRequired,
45
+ placeholder: opt.placeholder,
46
+ min: 1
47
+ }));
48
+ };
49
+
50
+ exports.GenPropertiesNumber = GenPropertiesNumber;
package/dist/index.js CHANGED
@@ -1,8 +1,31 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom';
3
- import './index.css'; //import App from './App';
4
-
5
- import { Demo } from './App';
6
- ReactDOM.render( /*#__PURE__*/React.createElement(React.StrictMode, null, /*#__PURE__*/React.createElement(Demo, null)), document.getElementById('root')); // If you want to start measuring performance in your app, pass a function
7
- // to log results (for example: reportWebVitals(console.log))
8
- // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
1
+ "use strict";
2
+
3
+ var _react = _interopRequireDefault(require("react"));
4
+
5
+ var _reactDom = _interopRequireDefault(require("react-dom"));
6
+
7
+ require("bootstrap/dist/css/bootstrap.min.css");
8
+
9
+ require("./index.css");
10
+
11
+ var _app = require("./app");
12
+
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+
15
+ // import 'bootstrap/dist/css/bootstrap.min.css';
16
+ // import App from './App';
17
+ // import reportWebVitals from './reportWebVitals';
18
+ // import { ElementManager, GenPropertiesText } from './components/admin/ElementManager';
19
+ // export { ElementManager, GenPropertiesText };
20
+ _reactDom.default.render( /*#__PURE__*/_react.default.createElement(_app.ElementManager, {
21
+ elements: [],
22
+ element: {}
23
+ }), document.getElementById('root')); // function App() {
24
+ // return (
25
+ // <div>
26
+ // Project A
27
+ // <ElementManager />
28
+ // </div>
29
+ // );
30
+ // }
31
+ // export default App;
package/package.json CHANGED
@@ -1,42 +1,45 @@
1
1
  {
2
2
  "name": "chem-generic-ui",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "private": false,
5
- "dependencies": {
6
- "react": "^17.0.2",
7
- "react-bootstrap": "0.33.1",
8
- "react-dom": "^17.0.2",
9
- "react-scripts": "4.0.3"
10
- },
5
+ "license": "MIT",
11
6
  "scripts": {
12
7
  "start": "react-scripts start",
13
- "compile": "rm -rf dist && NODE_ENV=production babel --ignore tests,stories ./src --out-dir ./dist",
14
8
  "build": "react-scripts build",
15
- "test": "react-scripts test",
16
- "eject": "react-scripts eject"
17
- },
18
- "eslintConfig": {
19
- "extends": [
20
- "react-app",
21
- "react-app/jest"
22
- ]
9
+ "compile": "rm -rf dist && NODE_ENV=production babel --ignore tests,stories ./src --out-dir ./dist",
10
+ "test": "react-scripts test --env=jsdom --testPathIgnorePatterns=src/__tests__/helper/* src/__tests__/e2e/*"
23
11
  },
24
- "browserslist": {
25
- "production": [
26
- ">0.2%",
27
- "not dead",
28
- "not op_mini all"
29
- ],
30
- "development": [
31
- "last 1 chrome version",
32
- "last 1 firefox version",
33
- "last 1 safari version"
34
- ]
12
+ "peerDependencies": {
13
+ "react": "^17.0.2",
14
+ "react-dom": "^17.0.2"
35
15
  },
36
16
  "devDependencies": {
37
- "@babel/cli": "^7.17.6",
38
- "@babel/core": "^7.17.7",
39
- "@babel/preset-env": "^7.16.11"
17
+ "eslint-config-airbnb": "^16.1.0",
18
+ "eslint-plugin-import": "^2.8.0",
19
+ "eslint-plugin-jsx-a11y": "^6.0.2",
20
+ "eslint-plugin-react": "^7.4.0"
40
21
  },
41
- "license": "MIT"
22
+ "main": "dist/app.js",
23
+ "module": "dist/app.js",
24
+ "files": [
25
+ "dist",
26
+ "README.md"
27
+ ],
28
+ "browserslist": [
29
+ "defaults"
30
+ ],
31
+ "dependencies": {
32
+ "@babel/cli": "^7.0.0",
33
+ "@babel/core": "^7.0.0",
34
+ "@babel/preset-env": "7.3.1",
35
+ "@babel/preset-react": "7.0.0",
36
+ "bootstrap": "5.1.3",
37
+ "lodash": "^4.17.21",
38
+ "react": "^17.0.2",
39
+ "react-bootstrap": "^2.2.1",
40
+ "react-dom": "^17.0.2",
41
+ "react-scripts": "4.0.1",
42
+ "react-select": "^2.0.0",
43
+ "uuid": "^8.3.2"
44
+ }
42
45
  }
package/.babelrc DELETED
@@ -1,3 +0,0 @@
1
- {
2
- 'presets': ['@babel/preset-react']
3
- }
package/dist/App.js DELETED
@@ -1,22 +0,0 @@
1
- // import './App.css';
2
- // function App() {
3
- // return (
4
- // <div className="App">
5
- // <header className="App-header">
6
- // <p>
7
- // Edit <code>src/App.js</code> and save to reload.
8
- // </p>
9
- // <a
10
- // className="App-link"
11
- // href="https://reactjs.org"
12
- // target="_blank"
13
- // rel="noopener noreferrer"
14
- // >
15
- // Learn React
16
- // </a>
17
- // </header>
18
- // </div>
19
- // );
20
- // }
21
- // export default App;
22
- export { default as Demo } from './components/Demo';
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import { Button } from 'react-bootstrap';
3
- export default class Demo extends React.Component {
4
- render() {
5
- return /*#__PURE__*/React.createElement(Button, {
6
- bsSize: "xsmall",
7
- bsStyle: "info"
8
- }, "AAAAAAAAAAAAAAAAAAAAAAAA");
9
- }
10
-
11
- }
Binary file
package/public/index.html DELETED
@@ -1,43 +0,0 @@
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
@@ -1,25 +0,0 @@
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/public/robots.txt DELETED
@@ -1,3 +0,0 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow:
package/src/App.css DELETED
@@ -1,38 +0,0 @@
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 DELETED
@@ -1,26 +0,0 @@
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;
24
-
25
- export { default as Demo } from './components/Demo';
26
-
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Button } from 'react-bootstrap';
4
-
5
-
6
- export default class Demo extends React.Component {
7
-
8
- render() {
9
- return (<Button bsSize="xsmall" bsStyle="info">AAAAAAAAAAAAAAAAAAAAAAAA</Button>);
10
- }
11
- }
package/src/index.css DELETED
@@ -1,13 +0,0 @@
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 DELETED
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom';
3
- import './index.css';
4
- //import App from './App';
5
- import { Demo } from './App';
6
-
7
- ReactDOM.render(
8
- <React.StrictMode>
9
- <Demo />
10
- </React.StrictMode>,
11
- document.getElementById('root')
12
- );
13
-
14
- // If you want to start measuring performance in your app, pass a function
15
- // to log results (for example: reportWebVitals(console.log))
16
- // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
17
-