tenjin-ui-kit 0.2.135 → 0.2.136
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/.dockerignore +6 -0
- package/.storybook/main.js +16 -0
- package/.storybook/preview.js +11 -0
- package/Dockerfile +17 -0
- package/Jenkinsfile +66 -0
- package/{components → dist/components}/InputWithChip/index.js +4 -12
- package/{components → dist/components}/breadCrumbs/index.js +3 -1
- package/dist/components/button/index.js +131 -0
- package/dist/components/error/index.js +56 -0
- package/dist/components/layout/sidebar/GroupedIconMenu.js +227 -0
- package/{components → dist/components}/layout/sidebar/index.js +2 -0
- package/{components → dist/components}/layout/sidebar/style.js +17 -9
- package/dist/components/optionMenu/index.js +112 -0
- package/dist/components/reactSelect/index.js +212 -0
- package/dist/components/reactSelect/style.js +163 -0
- package/dist/components/select/SimpleSelect.js +123 -0
- package/dist/components/simpleSelect/index.js +122 -0
- package/dist/components/table/ReactTable.js +116 -0
- package/dist/components/table/SimpleTable.js +57 -0
- package/{index.js → dist/index.js} +49 -0
- package/package.json +3 -2
- 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/public/tenjinLogo.png +0 -0
- package/components/button/index.js +0 -71
- /package/{common → dist/common}/hooks/apiHooks.js +0 -0
- /package/{common → dist/common}/hooks/newApiHook.js +0 -0
- /package/{common → dist/common}/utils/security/index.js +0 -0
- /package/{common → dist/common}/utils/security/securityConfig.js +0 -0
- /package/{components → dist/components}/Canvas.js +0 -0
- /package/{components → dist/components}/DragBox/index.js +0 -0
- /package/{components → dist/components}/RightContext/index.css +0 -0
- /package/{components → dist/components}/RightContext/index.js +0 -0
- /package/{components → dist/components}/WorkFlow.js +0 -0
- /package/{components → dist/components}/WorkFlowBuilder.js +0 -0
- /package/{components → dist/components}/alert/Style.js +0 -0
- /package/{components → dist/components}/alert/index.js +0 -0
- /package/{components → dist/components}/attachment/index.js +0 -0
- /package/{components → dist/components}/authenticationProvider/AuthError.js +0 -0
- /package/{components → dist/components}/authenticationProvider/AuthLoader.js +0 -0
- /package/{components → dist/components}/authenticationProvider/index.js +0 -0
- /package/{components → dist/components}/avatar/index.js +0 -0
- /package/{components → dist/components}/avatar/styles.js +0 -0
- /package/{components → dist/components}/breadCrumbs/style.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/index.js +0 -0
- /package/{components → dist/components}/browsingTestCaseLayout/style.css +0 -0
- /package/{components → dist/components}/checkBox/index.js +0 -0
- /package/{components → dist/components}/divider/index.js +0 -0
- /package/{components → dist/components}/editableField/index.js +0 -0
- /package/{components → dist/components}/errorBoundary/Error.jpg +0 -0
- /package/{components → dist/components}/errorBoundary/index.js +0 -0
- /package/{components → dist/components}/fileUploader/index.js +0 -0
- /package/{components → dist/components}/fileUploader/style.js +0 -0
- /package/{components → dist/components}/iconButton/index.js +0 -0
- /package/{components → dist/components}/iconButton/style.js +0 -0
- /package/{components → dist/components}/input/index.js +0 -0
- /package/{components → dist/components}/layout/index.js +0 -0
- /package/{components → dist/components}/layout/main/index.js +0 -0
- /package/{components → dist/components}/layout/main/style.js +0 -0
- /package/{components → dist/components}/layout/pageContent/index.js +0 -0
- /package/{components → dist/components}/layout/sidebar/FlatMenu.js +0 -0
- /package/{components → dist/components}/layout/sidebar/GroupedMenu.js +0 -0
- /package/{components → dist/components}/layout/sidebar/ProjectMenu.js +0 -0
- /package/{components → dist/components}/layout/topBar/ProjectTopbar.js +0 -0
- /package/{components → dist/components}/layout/topBar/UserAvatar.js +0 -0
- /package/{components → dist/components}/layout/topBar/index.js +0 -0
- /package/{components → dist/components}/loader/index.js +0 -0
- /package/{components → dist/components}/menu/index.js +0 -0
- /package/{components → dist/components}/modal/Modal.js +0 -0
- /package/{components → dist/components}/modal/index.js +0 -0
- /package/{components → dist/components}/modal/style.js +0 -0
- /package/{components → dist/components}/pagination/index.js +0 -0
- /package/{components → dist/components}/pagination/style.js +0 -0
- /package/{components → dist/components}/paper/index.js +0 -0
- /package/{components → dist/components}/paper/style.js +0 -0
- /package/{components → dist/components}/richTextEditor/index.js +0 -0
- /package/{components → dist/components}/richTextEditor/style.js +0 -0
- /package/{components → dist/components}/select/index.js +0 -0
- /package/{components → dist/components}/switch/index.js +0 -0
- /package/{components → dist/components}/switch/style.js +0 -0
- /package/{components → dist/components}/switch/switch.js +0 -0
- /package/{components → dist/components}/table/index.js +0 -0
- /package/{components → dist/components}/text/index.js +0 -0
- /package/{components → dist/components}/timeStamp/index.js +0 -0
- /package/{components → dist/components}/timeStamp/style.js +0 -0
- /package/{components → dist/components}/topBar/index.js +0 -0
- /package/{components → dist/components}/tree/index.js +0 -0
- /package/{components → dist/components}/tree/style.js +0 -0
- /package/{components → dist/components}/valuePicker/ValueSelector.js +0 -0
- /package/{components → dist/components}/valuePicker/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/layout/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/layout/style.js +0 -0
- /package/{components → dist/components}/wrapperLayout/main/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/main/pageContainer/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/main/sideBar/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/main/sideBar/style.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/UserAvatar.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/avatar.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/index.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/menuIcon.js +0 -0
- /package/{components → dist/components}/wrapperLayout/topBar/style.js +0 -0
- /package/{http → dist/http}/index.js +0 -0
- /package/{templates → dist/templates}/listPage/index.js +0 -0
- /package/{themes → dist/themes}/default.js +0 -0
- /package/{themes → dist/themes}/defaultSmall.js +0 -0
- /package/{themes → dist/themes}/responsiveTheme.js +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactFinalForm = require("react-final-form");
|
|
9
|
+
var _material = require("@mui/material");
|
|
10
|
+
var _text = _interopRequireDefault(require("../text"));
|
|
11
|
+
var _excluded = ["options", "errorMessage", "error", "fullWidth", "isDisabled", "label", "isRequired"];
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
15
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16
|
+
// import { Form } from "react-final-form";
|
|
17
|
+
// import { Input } from "tenjin-ui-kit";
|
|
18
|
+
|
|
19
|
+
var SimpleSelect = function SimpleSelect(_ref) {
|
|
20
|
+
var options = _ref.options,
|
|
21
|
+
errorMessage = _ref.errorMessage,
|
|
22
|
+
error = _ref.error,
|
|
23
|
+
fullWidth = _ref.fullWidth,
|
|
24
|
+
isDisabled = _ref.isDisabled,
|
|
25
|
+
label = _ref.label,
|
|
26
|
+
isRequired = _ref.isRequired,
|
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
+
console.log(errorMessage, error, "error");
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
|
|
30
|
+
sx: {
|
|
31
|
+
m: 1,
|
|
32
|
+
minWidth: 120
|
|
33
|
+
},
|
|
34
|
+
fullWidth: fullWidth,
|
|
35
|
+
disabled: isDisabled,
|
|
36
|
+
error: error,
|
|
37
|
+
style: {
|
|
38
|
+
margin: "0rem !important"
|
|
39
|
+
}
|
|
40
|
+
}, label && /*#__PURE__*/_react.default.createElement(_material.FormLabel, {
|
|
41
|
+
htmlFor: "my-input",
|
|
42
|
+
sx: {
|
|
43
|
+
fontSize: "0.8rem",
|
|
44
|
+
fontWeight: 500,
|
|
45
|
+
paddingBottom: "0.2rem"
|
|
46
|
+
}
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, label, isRequired ? /*#__PURE__*/_react.default.createElement("span", {
|
|
48
|
+
style: {
|
|
49
|
+
color: "red"
|
|
50
|
+
}
|
|
51
|
+
}, " * ") : "")), /*#__PURE__*/_react.default.createElement(_material.Select, _extends({}, rest, {
|
|
52
|
+
fullWidth: true
|
|
53
|
+
}), options.map(function (option) {
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
55
|
+
key: option.value,
|
|
56
|
+
value: option.value
|
|
57
|
+
}, option.label);
|
|
58
|
+
})), error && /*#__PURE__*/_react.default.createElement(_material.FormHelperText, null, errorMessage)));
|
|
59
|
+
};
|
|
60
|
+
var _default = SimpleSelect; // const options = [
|
|
61
|
+
// { value: "option1", label: "Option 1" },
|
|
62
|
+
// { value: "option2", label: "Option 2" },
|
|
63
|
+
// // ... other options
|
|
64
|
+
// ];
|
|
65
|
+
// export const MyForm = () => {
|
|
66
|
+
// const validateForm = (values, mandatoryFields) => {
|
|
67
|
+
// let errors = {};
|
|
68
|
+
// if (mandatoryFields) {
|
|
69
|
+
// mandatoryFields.forEach((field) => {
|
|
70
|
+
// if (!values[field]) errors[field] = "Required";
|
|
71
|
+
// });
|
|
72
|
+
// }
|
|
73
|
+
// return errors;
|
|
74
|
+
// };
|
|
75
|
+
// const validate = (values) => {
|
|
76
|
+
// const errors = validateForm(values, ["text", "select"]);
|
|
77
|
+
// return errors;
|
|
78
|
+
// };
|
|
79
|
+
// const Submit = (values) => {
|
|
80
|
+
// console.log(values, "values");
|
|
81
|
+
// };
|
|
82
|
+
// return (
|
|
83
|
+
// <Form onSubmit={Submit} validate={validate}>
|
|
84
|
+
// {({ handleSubmit }) => (
|
|
85
|
+
// <form onSubmit={handleSubmit}>
|
|
86
|
+
// {/* Other form fields */}
|
|
87
|
+
// <Field
|
|
88
|
+
// name="text"
|
|
89
|
+
// render={({ input, meta }) => (
|
|
90
|
+
// <Input
|
|
91
|
+
// autoFocus="autofocus"
|
|
92
|
+
// isRequired
|
|
93
|
+
// {...input}
|
|
94
|
+
// // isDisabled={props.type === 'edit' && true}
|
|
95
|
+
// size="normal"
|
|
96
|
+
// placeholder="Test Cycle Name"
|
|
97
|
+
// fullWidth
|
|
98
|
+
// label="Name"
|
|
99
|
+
// error={meta.touched && meta.error ? true : false}
|
|
100
|
+
// errorMessage={meta.touched && meta.error ? meta.error : null}
|
|
101
|
+
// />
|
|
102
|
+
// )}
|
|
103
|
+
// />
|
|
104
|
+
// <Field
|
|
105
|
+
// name="select"
|
|
106
|
+
// render={({ input, meta }) => (
|
|
107
|
+
// <MUISelectField
|
|
108
|
+
// {...input}
|
|
109
|
+
// // isDisabled={props.type === 'edit' && true}
|
|
110
|
+
// options={options}
|
|
111
|
+
// error={meta.touched && meta.error}
|
|
112
|
+
// errorMessage={meta.touched && meta.error ? meta.error : null}
|
|
113
|
+
// />
|
|
114
|
+
// )}
|
|
115
|
+
// />
|
|
116
|
+
// <button type="submit">Submit</button>
|
|
117
|
+
// </form>
|
|
118
|
+
// )}
|
|
119
|
+
// </Form>
|
|
120
|
+
// );
|
|
121
|
+
// };
|
|
122
|
+
exports.default = _default;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _material = require("@mui/material");
|
|
10
|
+
var _text = _interopRequireDefault(require("../text"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
13
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
17
|
+
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."); }
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
21
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
+
var ReactTable = function ReactTable(_ref) {
|
|
23
|
+
var columns = _ref.columns,
|
|
24
|
+
rows = _ref.rows,
|
|
25
|
+
sortable = _ref.sortable,
|
|
26
|
+
msg = _ref.msg;
|
|
27
|
+
var _React$useState = _react.default.useState({
|
|
28
|
+
column: null,
|
|
29
|
+
direction: "desc"
|
|
30
|
+
}),
|
|
31
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
32
|
+
sorting = _React$useState2[0],
|
|
33
|
+
setSorting = _React$useState2[1];
|
|
34
|
+
var handleSort = function handleSort(columnName) {
|
|
35
|
+
setSorting(function (prevSorting) {
|
|
36
|
+
return {
|
|
37
|
+
column: columnName,
|
|
38
|
+
direction: prevSorting.column === columnName && prevSorting.direction === "desc" ? "asc" : "desc"
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
var sortedData = _react.default.useMemo(function () {
|
|
43
|
+
if (sorting !== null && sorting !== void 0 && sorting.column) {
|
|
44
|
+
var sortedArray = _toConsumableArray(rows).sort(function (a, b) {
|
|
45
|
+
var valueA = a[sorting.column];
|
|
46
|
+
var valueB = b[sorting.column];
|
|
47
|
+
if (typeof valueA === "string" && typeof valueB === "string") {
|
|
48
|
+
return sorting.direction === "asc" ? valueA.localeCompare(valueB) : valueB.localeCompare(valueA);
|
|
49
|
+
}
|
|
50
|
+
return sorting.direction === "asc" ? valueA - valueB : valueB - valueA;
|
|
51
|
+
});
|
|
52
|
+
return sortedArray;
|
|
53
|
+
}
|
|
54
|
+
return rows;
|
|
55
|
+
}, [rows, sorting]);
|
|
56
|
+
return rows && (rows === null || rows === void 0 ? void 0 : rows.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, null, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns === null || columns === void 0 ? void 0 : columns.map(function (c) {
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
58
|
+
key: c.name,
|
|
59
|
+
style: {
|
|
60
|
+
width: c.width
|
|
61
|
+
}
|
|
62
|
+
}, sortable ? /*#__PURE__*/_react.default.createElement(_material.TableSortLabel, {
|
|
63
|
+
active: sorting.column === c.name.toLowerCase(),
|
|
64
|
+
direction: sorting.column === c.name.toLowerCase() ? sorting.direction : "asc",
|
|
65
|
+
onClick: function onClick() {
|
|
66
|
+
return handleSort(c.name.toLowerCase());
|
|
67
|
+
}
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
69
|
+
style: {
|
|
70
|
+
color: "#7D7D7D"
|
|
71
|
+
}
|
|
72
|
+
}, c.displayName)) : /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
73
|
+
style: {
|
|
74
|
+
color: "#7D7D7D"
|
|
75
|
+
}
|
|
76
|
+
}, c.displayName));
|
|
77
|
+
}))), /*#__PURE__*/_react.default.createElement(_material.TableBody, null, sortedData === null || sortedData === void 0 ? void 0 : sortedData.map(function (u) {
|
|
78
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableRow, {
|
|
79
|
+
key: u.id
|
|
80
|
+
}, columns === null || columns === void 0 ? void 0 : columns.map(function (c) {
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
82
|
+
key: u[c.name],
|
|
83
|
+
style: {
|
|
84
|
+
width: c.width,
|
|
85
|
+
borderBottom: "none"
|
|
86
|
+
}
|
|
87
|
+
}, c.render ? c.render(u) : /*#__PURE__*/_react.default.createElement(_text.default, null, u[c.name]));
|
|
88
|
+
}));
|
|
89
|
+
}))))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, " ", /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, null, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, columns === null || columns === void 0 ? void 0 : columns.map(function (c) {
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
91
|
+
key: c.name,
|
|
92
|
+
style: {
|
|
93
|
+
width: c.width,
|
|
94
|
+
color: "#7D7D7D",
|
|
95
|
+
borderBottom: "none"
|
|
96
|
+
}
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, null, c.displayName));
|
|
98
|
+
})), " ")), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
99
|
+
item: true,
|
|
100
|
+
xs: 11,
|
|
101
|
+
container: true,
|
|
102
|
+
justifyContent: "center"
|
|
103
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
104
|
+
style: {
|
|
105
|
+
color: "grey",
|
|
106
|
+
marginTop: "calc(100vh - 750px)"
|
|
107
|
+
}
|
|
108
|
+
}, msg)));
|
|
109
|
+
};
|
|
110
|
+
ReactTable.propTypes = {
|
|
111
|
+
rows: _propTypes.default.array.isRequired,
|
|
112
|
+
columns: _propTypes.default.array.isRequired,
|
|
113
|
+
msg: _propTypes.default.string
|
|
114
|
+
};
|
|
115
|
+
var _default = ReactTable;
|
|
116
|
+
exports.default = _default;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _text = _interopRequireDefault(require("../text"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
var SimpleTable = function SimpleTable(_ref) {
|
|
12
|
+
var rows = _ref.rows,
|
|
13
|
+
columns = _ref.columns,
|
|
14
|
+
size = _ref.size;
|
|
15
|
+
var theme = (0, _material.useTheme)();
|
|
16
|
+
return rows && rows.length > 0 ? /*#__PURE__*/_react.default.createElement(_material.TableContainer, null, /*#__PURE__*/_react.default.createElement(_material.Table, {
|
|
17
|
+
size: size
|
|
18
|
+
}, /*#__PURE__*/_react.default.createElement(_material.TableHead, null, "a", /*#__PURE__*/_react.default.createElement(_material.TableRow, null, columns && columns.map(function (c, index) {
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
20
|
+
key: index
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
22
|
+
semibold: true,
|
|
23
|
+
color: theme.palette.grey[500],
|
|
24
|
+
textTransform: "uppercase",
|
|
25
|
+
fontSize: theme.typography.fontSize - 1
|
|
26
|
+
}, c.displayName));
|
|
27
|
+
}))), /*#__PURE__*/_react.default.createElement(_material.TableBody, null, rows.map(function (r, index) {
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableRow, {
|
|
29
|
+
key: index
|
|
30
|
+
}, columns.map(function (c, index) {
|
|
31
|
+
return /*#__PURE__*/_react.default.createElement(_material.TableCell, {
|
|
32
|
+
key: index
|
|
33
|
+
}, renderCellContent(r, c));
|
|
34
|
+
}));
|
|
35
|
+
})))) : /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
36
|
+
height: "300px",
|
|
37
|
+
display: "flex",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
justifyContent: "center"
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement(_text.default, {
|
|
41
|
+
color: theme.palette.grey[500],
|
|
42
|
+
semibold: true
|
|
43
|
+
}, "No records found"));
|
|
44
|
+
};
|
|
45
|
+
var renderCellContent = function renderCellContent(row, column) {
|
|
46
|
+
var name = column.name,
|
|
47
|
+
render = column.render;
|
|
48
|
+
var returnComponent;
|
|
49
|
+
if (render) {
|
|
50
|
+
returnComponent = render(row);
|
|
51
|
+
} else {
|
|
52
|
+
returnComponent = /*#__PURE__*/_react.default.createElement(_text.default, null, row[name]);
|
|
53
|
+
}
|
|
54
|
+
return returnComponent;
|
|
55
|
+
};
|
|
56
|
+
var _default = SimpleTable;
|
|
57
|
+
exports.default = _default;
|
|
@@ -58,6 +58,12 @@ Object.defineProperty(exports, "EditableField", {
|
|
|
58
58
|
return _editableField.default;
|
|
59
59
|
}
|
|
60
60
|
});
|
|
61
|
+
Object.defineProperty(exports, "Error", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function get() {
|
|
64
|
+
return _error.default;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
61
67
|
Object.defineProperty(exports, "ErrorBoundary", {
|
|
62
68
|
enumerable: true,
|
|
63
69
|
get: function get() {
|
|
@@ -100,6 +106,12 @@ Object.defineProperty(exports, "Modal", {
|
|
|
100
106
|
return _modal.default;
|
|
101
107
|
}
|
|
102
108
|
});
|
|
109
|
+
Object.defineProperty(exports, "OptionMenu", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function get() {
|
|
112
|
+
return _optionMenu.default;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
103
115
|
Object.defineProperty(exports, "Pagination", {
|
|
104
116
|
enumerable: true,
|
|
105
117
|
get: function get() {
|
|
@@ -112,6 +124,18 @@ Object.defineProperty(exports, "Paper", {
|
|
|
112
124
|
return _paper.default;
|
|
113
125
|
}
|
|
114
126
|
});
|
|
127
|
+
Object.defineProperty(exports, "ReactSelect", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function get() {
|
|
130
|
+
return _reactSelect.default;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(exports, "ReactTable", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function get() {
|
|
136
|
+
return _ReactTable.default;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
115
139
|
Object.defineProperty(exports, "RichTextEditor", {
|
|
116
140
|
enumerable: true,
|
|
117
141
|
get: function get() {
|
|
@@ -124,6 +148,18 @@ Object.defineProperty(exports, "Select", {
|
|
|
124
148
|
return _select.default;
|
|
125
149
|
}
|
|
126
150
|
});
|
|
151
|
+
Object.defineProperty(exports, "SimpleSelect", {
|
|
152
|
+
enumerable: true,
|
|
153
|
+
get: function get() {
|
|
154
|
+
return _SimpleSelect.default;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
Object.defineProperty(exports, "SimpleTable", {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function get() {
|
|
160
|
+
return _SimpleTable.default;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
127
163
|
Object.defineProperty(exports, "Switch", {
|
|
128
164
|
enumerable: true,
|
|
129
165
|
get: function get() {
|
|
@@ -142,6 +178,12 @@ Object.defineProperty(exports, "Table", {
|
|
|
142
178
|
return _table.default;
|
|
143
179
|
}
|
|
144
180
|
});
|
|
181
|
+
Object.defineProperty(exports, "Text", {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
get: function get() {
|
|
184
|
+
return _text.default;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
145
187
|
Object.defineProperty(exports, "TimeStamp", {
|
|
146
188
|
enumerable: true,
|
|
147
189
|
get: function get() {
|
|
@@ -266,6 +308,13 @@ var _avatar = _interopRequireDefault(require("./components/avatar"));
|
|
|
266
308
|
var _errorBoundary = _interopRequireDefault(require("./components/errorBoundary"));
|
|
267
309
|
var _browsingTestCaseLayout = _interopRequireDefault(require("./components/browsingTestCaseLayout"));
|
|
268
310
|
var _fileUploader = _interopRequireDefault(require("./components/fileUploader"));
|
|
311
|
+
var _optionMenu = _interopRequireDefault(require("./components/optionMenu"));
|
|
312
|
+
var _error = _interopRequireDefault(require("./components/error"));
|
|
313
|
+
var _reactSelect = _interopRequireDefault(require("./components/reactSelect"));
|
|
314
|
+
var _ReactTable = _interopRequireDefault(require("./components/table/ReactTable"));
|
|
315
|
+
var _SimpleTable = _interopRequireDefault(require("./components/table/SimpleTable"));
|
|
316
|
+
var _SimpleSelect = _interopRequireDefault(require("./components/select/SimpleSelect"));
|
|
317
|
+
var _text = _interopRequireDefault(require("./components/text"));
|
|
269
318
|
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); }
|
|
270
319
|
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; }
|
|
271
320
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tenjin-ui-kit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.136",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://gitlab.com/yethi/react/tenjin-ui-kit.git"
|
|
6
6
|
},
|
|
@@ -30,9 +30,10 @@
|
|
|
30
30
|
"react-feather": "^2.0.10",
|
|
31
31
|
"react-final-form": "^6.5.9",
|
|
32
32
|
"react-flow-renderer": "^10.3.17",
|
|
33
|
-
"react-icons": "^4.
|
|
33
|
+
"react-icons": "^4.10.1",
|
|
34
34
|
"react-moment": "^1.1.3",
|
|
35
35
|
"react-scripts": "5.0.1",
|
|
36
|
+
"react-select": "^5.7.4",
|
|
36
37
|
"react-sortable-hoc": "^2.0.0",
|
|
37
38
|
"reactflow": "^11.6.1",
|
|
38
39
|
"storybook-react-context": "^0.6.0",
|
|
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
|
+
}
|
|
Binary file
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.ButtonLoader = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _material = require("@mui/material");
|
|
9
|
-
var _styles = require("@mui/material/styles");
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _text = _interopRequireDefault(require("../text"));
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
14
|
-
var Button = function Button(props) {
|
|
15
|
-
var loading = props.loading,
|
|
16
|
-
loadingText = props.loadingText,
|
|
17
|
-
children = props.children,
|
|
18
|
-
size = props.size,
|
|
19
|
-
onClick = props.onClick,
|
|
20
|
-
color = props.color,
|
|
21
|
-
fixedWidth = props.fixedWidth;
|
|
22
|
-
var handleClick = function handleClick(e) {
|
|
23
|
-
if (loading) {
|
|
24
|
-
e.preventDefault();
|
|
25
|
-
} else {
|
|
26
|
-
onClick && onClick(e);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
return /*#__PURE__*/_react.default.createElement(_material.Button, _extends({
|
|
30
|
-
onClick: handleClick
|
|
31
|
-
}, props, {
|
|
32
|
-
sx: fixedWidth && {
|
|
33
|
-
minWidth: 148
|
|
34
|
-
}
|
|
35
|
-
}), loading ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(ButtonLoader, {
|
|
36
|
-
buttonColor: color,
|
|
37
|
-
size: size,
|
|
38
|
-
loadingText: loadingText
|
|
39
|
-
}), loadingText && {
|
|
40
|
-
loadingText: loadingText
|
|
41
|
-
}) : children);
|
|
42
|
-
};
|
|
43
|
-
var ButtonLoader = function ButtonLoader(_ref) {
|
|
44
|
-
var buttonColor = _ref.buttonColor,
|
|
45
|
-
size = _ref.size,
|
|
46
|
-
loadingText = _ref.loadingText;
|
|
47
|
-
var theme = (0, _styles.useTheme)();
|
|
48
|
-
var resolvedButtonColor = theme.palette[buttonColor] ? theme.palette[buttonColor].main : theme.palette.primary.main;
|
|
49
|
-
var textColor = theme.palette.getContrastText(resolvedButtonColor);
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement(_material.CircularProgress, {
|
|
51
|
-
size: size === "small" ? 20 : size === "large" ? 24 : 22,
|
|
52
|
-
sx: {
|
|
53
|
-
marginRight: loadingText ? "0.5rem" : "initial",
|
|
54
|
-
color: textColor
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
};
|
|
58
|
-
exports.ButtonLoader = ButtonLoader;
|
|
59
|
-
Button.defaultProps = {
|
|
60
|
-
color: "primary"
|
|
61
|
-
};
|
|
62
|
-
Button.propTypes = {
|
|
63
|
-
loading: _propTypes.default.bool,
|
|
64
|
-
loadingText: _propTypes.default.string,
|
|
65
|
-
children: _propTypes.default.any,
|
|
66
|
-
size: _propTypes.default.string,
|
|
67
|
-
onClick: _propTypes.default.func,
|
|
68
|
-
color: _propTypes.default.string
|
|
69
|
-
};
|
|
70
|
-
var _default = Button;
|
|
71
|
-
exports.default = _default;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|