tenjin-ui-kit 0.2.136 → 0.2.137
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/package.json +1 -1
- package/dist/common/hooks/apiHooks.js +0 -223
- package/dist/common/hooks/newApiHook.js +0 -270
- package/dist/common/utils/security/index.js +0 -11
- package/dist/common/utils/security/securityConfig.js +0 -8
- package/dist/components/Canvas.js +0 -254
- package/dist/components/DragBox/index.js +0 -45
- package/dist/components/InputWithChip/index.js +0 -149
- package/dist/components/RightContext/index.css +0 -20
- package/dist/components/RightContext/index.js +0 -86
- package/dist/components/WorkFlow.js +0 -47
- package/dist/components/WorkFlowBuilder.js +0 -130
- package/dist/components/alert/Style.js +0 -23
- package/dist/components/alert/index.js +0 -69
- package/dist/components/attachment/index.js +0 -138
- package/dist/components/authenticationProvider/AuthError.js +0 -24
- package/dist/components/authenticationProvider/AuthLoader.js +0 -21
- package/dist/components/authenticationProvider/index.js +0 -128
- package/dist/components/avatar/index.js +0 -95
- package/dist/components/avatar/styles.js +0 -94
- package/dist/components/breadCrumbs/index.js +0 -162
- package/dist/components/breadCrumbs/style.js +0 -11
- package/dist/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +0 -19
- package/dist/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +0 -15
- package/dist/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +0 -36
- package/dist/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +0 -26
- package/dist/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +0 -48
- package/dist/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +0 -26
- package/dist/components/browsingTestCaseLayout/index.js +0 -187
- package/dist/components/browsingTestCaseLayout/style.css +0 -82
- package/dist/components/button/index.js +0 -131
- package/dist/components/checkBox/index.js +0 -30
- package/dist/components/divider/index.js +0 -39
- package/dist/components/editableField/index.js +0 -125
- package/dist/components/error/index.js +0 -56
- package/dist/components/errorBoundary/Error.jpg +0 -0
- package/dist/components/errorBoundary/index.js +0 -160
- package/dist/components/fileUploader/index.js +0 -124
- package/dist/components/fileUploader/style.js +0 -60
- package/dist/components/iconButton/index.js +0 -35
- package/dist/components/iconButton/style.js +0 -1
- package/dist/components/input/index.js +0 -124
- package/dist/components/layout/index.js +0 -98
- package/dist/components/layout/main/index.js +0 -27
- package/dist/components/layout/main/style.js +0 -22
- package/dist/components/layout/pageContent/index.js +0 -30
- package/dist/components/layout/sidebar/FlatMenu.js +0 -64
- package/dist/components/layout/sidebar/GroupedIconMenu.js +0 -227
- package/dist/components/layout/sidebar/GroupedMenu.js +0 -68
- package/dist/components/layout/sidebar/ProjectMenu.js +0 -230
- package/dist/components/layout/sidebar/index.js +0 -84
- package/dist/components/layout/sidebar/style.js +0 -154
- package/dist/components/layout/topBar/ProjectTopbar.js +0 -234
- package/dist/components/layout/topBar/UserAvatar.js +0 -102
- package/dist/components/layout/topBar/index.js +0 -132
- package/dist/components/loader/index.js +0 -28
- package/dist/components/menu/index.js +0 -80
- package/dist/components/modal/Modal.js +0 -56
- package/dist/components/modal/index.js +0 -88
- package/dist/components/modal/style.js +0 -60
- package/dist/components/optionMenu/index.js +0 -112
- package/dist/components/pagination/index.js +0 -129
- package/dist/components/pagination/style.js +0 -36
- package/dist/components/paper/index.js +0 -44
- package/dist/components/paper/style.js +0 -34
- package/dist/components/reactSelect/index.js +0 -212
- package/dist/components/reactSelect/style.js +0 -163
- package/dist/components/richTextEditor/index.js +0 -34
- package/dist/components/richTextEditor/style.js +0 -1
- package/dist/components/select/SimpleSelect.js +0 -123
- package/dist/components/select/index.js +0 -211
- package/dist/components/simpleSelect/index.js +0 -122
- package/dist/components/switch/index.js +0 -73
- package/dist/components/switch/style.js +0 -42
- package/dist/components/switch/switch.js +0 -110
- package/dist/components/table/ReactTable.js +0 -116
- package/dist/components/table/SimpleTable.js +0 -57
- package/dist/components/table/index.js +0 -257
- package/dist/components/text/index.js +0 -64
- package/dist/components/timeStamp/index.js +0 -40
- package/dist/components/timeStamp/style.js +0 -23
- package/dist/components/topBar/index.js +0 -176
- package/dist/components/tree/index.js +0 -314
- package/dist/components/tree/style.js +0 -32
- package/dist/components/valuePicker/ValueSelector.js +0 -275
- package/dist/components/valuePicker/index.js +0 -133
- package/dist/components/wrapperLayout/layout/index.js +0 -30
- package/dist/components/wrapperLayout/layout/style.js +0 -1
- package/dist/components/wrapperLayout/main/index.js +0 -22
- package/dist/components/wrapperLayout/main/pageContainer/index.js +0 -28
- package/dist/components/wrapperLayout/main/sideBar/index.js +0 -262
- package/dist/components/wrapperLayout/main/sideBar/style.js +0 -196
- package/dist/components/wrapperLayout/topBar/UserAvatar.js +0 -17
- package/dist/components/wrapperLayout/topBar/avatar.js +0 -57
- package/dist/components/wrapperLayout/topBar/index.js +0 -182
- package/dist/components/wrapperLayout/topBar/menuIcon.js +0 -14
- package/dist/components/wrapperLayout/topBar/style.js +0 -77
- package/dist/http/index.js +0 -225
- package/dist/index.js +0 -320
- package/dist/templates/listPage/index.js +0 -301
- package/dist/themes/default.js +0 -253
- package/dist/themes/defaultSmall.js +0 -86
- package/dist/themes/responsiveTheme.js +0 -250
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,123 +0,0 @@
|
|
|
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", "helperText"];
|
|
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
|
-
helperText = _ref.helperText,
|
|
28
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
-
console.log(errorMessage, error, "error");
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
|
|
31
|
-
sx: {
|
|
32
|
-
m: 1,
|
|
33
|
-
minWidth: 120
|
|
34
|
-
},
|
|
35
|
-
fullWidth: fullWidth,
|
|
36
|
-
disabled: isDisabled,
|
|
37
|
-
error: error,
|
|
38
|
-
style: {
|
|
39
|
-
margin: "0rem !important"
|
|
40
|
-
}
|
|
41
|
-
}, label && /*#__PURE__*/_react.default.createElement(_material.FormLabel, {
|
|
42
|
-
htmlFor: "my-input",
|
|
43
|
-
sx: {
|
|
44
|
-
fontSize: "0.8rem",
|
|
45
|
-
fontWeight: 500,
|
|
46
|
-
paddingBottom: "0.2rem"
|
|
47
|
-
}
|
|
48
|
-
}, /*#__PURE__*/_react.default.createElement(_text.default, null, label, isRequired ? /*#__PURE__*/_react.default.createElement("span", {
|
|
49
|
-
style: {
|
|
50
|
-
color: "red"
|
|
51
|
-
}
|
|
52
|
-
}, " * ") : "")), /*#__PURE__*/_react.default.createElement(_material.Select, _extends({}, rest, {
|
|
53
|
-
fullWidth: true
|
|
54
|
-
}), options.map(function (option) {
|
|
55
|
-
return /*#__PURE__*/_react.default.createElement(_material.MenuItem, {
|
|
56
|
-
key: option.value,
|
|
57
|
-
value: option.value
|
|
58
|
-
}, option.label);
|
|
59
|
-
})), error && /*#__PURE__*/_react.default.createElement(_material.FormHelperText, null, errorMessage), helperText && /*#__PURE__*/_react.default.createElement(_material.FormHelperText, null, helperText)));
|
|
60
|
-
};
|
|
61
|
-
var _default = SimpleSelect; // const options = [
|
|
62
|
-
// { value: "option1", label: "Option 1" },
|
|
63
|
-
// { value: "option2", label: "Option 2" },
|
|
64
|
-
// // ... other options
|
|
65
|
-
// ];
|
|
66
|
-
// export const MyForm = () => {
|
|
67
|
-
// const validateForm = (values, mandatoryFields) => {
|
|
68
|
-
// let errors = {};
|
|
69
|
-
// if (mandatoryFields) {
|
|
70
|
-
// mandatoryFields.forEach((field) => {
|
|
71
|
-
// if (!values[field]) errors[field] = "Required";
|
|
72
|
-
// });
|
|
73
|
-
// }
|
|
74
|
-
// return errors;
|
|
75
|
-
// };
|
|
76
|
-
// const validate = (values) => {
|
|
77
|
-
// const errors = validateForm(values, ["text", "select"]);
|
|
78
|
-
// return errors;
|
|
79
|
-
// };
|
|
80
|
-
// const Submit = (values) => {
|
|
81
|
-
// console.log(values, "values");
|
|
82
|
-
// };
|
|
83
|
-
// return (
|
|
84
|
-
// <Form onSubmit={Submit} validate={validate}>
|
|
85
|
-
// {({ handleSubmit }) => (
|
|
86
|
-
// <form onSubmit={handleSubmit}>
|
|
87
|
-
// {/* Other form fields */}
|
|
88
|
-
// <Field
|
|
89
|
-
// name="text"
|
|
90
|
-
// render={({ input, meta }) => (
|
|
91
|
-
// <Input
|
|
92
|
-
// autoFocus="autofocus"
|
|
93
|
-
// isRequired
|
|
94
|
-
// {...input}
|
|
95
|
-
// // isDisabled={props.type === 'edit' && true}
|
|
96
|
-
// size="normal"
|
|
97
|
-
// placeholder="Test Cycle Name"
|
|
98
|
-
// fullWidth
|
|
99
|
-
// label="Name"
|
|
100
|
-
// error={meta.touched && meta.error ? true : false}
|
|
101
|
-
// errorMessage={meta.touched && meta.error ? meta.error : null}
|
|
102
|
-
// />
|
|
103
|
-
// )}
|
|
104
|
-
// />
|
|
105
|
-
// <Field
|
|
106
|
-
// name="select"
|
|
107
|
-
// render={({ input, meta }) => (
|
|
108
|
-
// <MUISelectField
|
|
109
|
-
// {...input}
|
|
110
|
-
// // isDisabled={props.type === 'edit' && true}
|
|
111
|
-
// options={options}
|
|
112
|
-
// error={meta.touched && meta.error}
|
|
113
|
-
// errorMessage={meta.touched && meta.error ? meta.error : null}
|
|
114
|
-
// />
|
|
115
|
-
// )}
|
|
116
|
-
// />
|
|
117
|
-
// <button type="submit">Submit</button>
|
|
118
|
-
// </form>
|
|
119
|
-
// )}
|
|
120
|
-
// </Form>
|
|
121
|
-
// );
|
|
122
|
-
// };
|
|
123
|
-
exports.default = _default;
|
|
@@ -1,211 +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
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _material = require("@mui/material");
|
|
10
|
-
var _CheckBoxOutlineBlank = _interopRequireDefault(require("@mui/icons-material/CheckBoxOutlineBlank"));
|
|
11
|
-
var _CheckBox = _interopRequireDefault(require("@mui/icons-material/CheckBox"));
|
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var _responsiveTheme = _interopRequireDefault(require("../../themes/responsiveTheme"));
|
|
14
|
-
var _text = _interopRequireDefault(require("../text"));
|
|
15
|
-
var _excluded = ["options", "isMulti", "checkBox", "defaultValue", "value", "onChange", "placeholder", "label", "fullWidth", "error", "helperText", "blueTheme", "isRequired", "isDisabled"];
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
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); }
|
|
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
|
-
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); }
|
|
20
|
-
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; }
|
|
21
|
-
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; }
|
|
22
|
-
var ReactSelect = function ReactSelect(props) {
|
|
23
|
-
var options = props.options,
|
|
24
|
-
isMulti = props.isMulti,
|
|
25
|
-
checkBox = props.checkBox,
|
|
26
|
-
defaultValue = props.defaultValue,
|
|
27
|
-
value = props.value,
|
|
28
|
-
onChange = props.onChange,
|
|
29
|
-
placeholder = props.placeholder,
|
|
30
|
-
label = props.label,
|
|
31
|
-
fullWidth = props.fullWidth,
|
|
32
|
-
error = props.error,
|
|
33
|
-
helperText = props.helperText,
|
|
34
|
-
blueTheme = props.blueTheme,
|
|
35
|
-
isRequired = props.isRequired,
|
|
36
|
-
isDisabled = props.isDisabled,
|
|
37
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
38
|
-
console.log(defaultValue, "hsgdsahgd", options[1]);
|
|
39
|
-
var icon = /*#__PURE__*/_react.default.createElement(_CheckBoxOutlineBlank.default, {
|
|
40
|
-
fontSize: "small"
|
|
41
|
-
});
|
|
42
|
-
var checkedIcon = /*#__PURE__*/_react.default.createElement(_CheckBox.default, {
|
|
43
|
-
fontSize: "small"
|
|
44
|
-
});
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.FormControl, {
|
|
46
|
-
fullWidth: true
|
|
47
|
-
}, label && /*#__PURE__*/_react.default.createElement(_material.FormLabel, {
|
|
48
|
-
htmlFor: "my-input",
|
|
49
|
-
sx: {
|
|
50
|
-
fontSize: "0.8rem",
|
|
51
|
-
fontWeight: 500,
|
|
52
|
-
paddingBottom: "0.2rem"
|
|
53
|
-
}
|
|
54
|
-
}, /*#__PURE__*/_react.default.createElement(_text.default, null, label, isRequired ? /*#__PURE__*/_react.default.createElement("span", {
|
|
55
|
-
style: {
|
|
56
|
-
color: "red"
|
|
57
|
-
}
|
|
58
|
-
}, " * ") : "")), checkBox && /*#__PURE__*/_react.default.createElement(_material.Autocomplete, _extends({}, rest, {
|
|
59
|
-
sx: {
|
|
60
|
-
"& .MuiAutocomplete-input, & .MuiInputLabel-root": {
|
|
61
|
-
fontSize: _responsiveTheme.default.typography.fontSize
|
|
62
|
-
},
|
|
63
|
-
"& .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root']": {
|
|
64
|
-
background: isDisabled && "#DDDDDD",
|
|
65
|
-
color: isDisabled && "#000000"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
disabled: isDisabled,
|
|
69
|
-
multiple: isMulti,
|
|
70
|
-
options: options
|
|
71
|
-
// disableCloseOnSelect
|
|
72
|
-
,
|
|
73
|
-
getOptionLabel: function getOptionLabel(option) {
|
|
74
|
-
return option === null || option === void 0 ? void 0 : option.label;
|
|
75
|
-
},
|
|
76
|
-
value: value,
|
|
77
|
-
onChange: onChange,
|
|
78
|
-
defaultValue: [options[1]],
|
|
79
|
-
renderOption: function renderOption(props, option, _ref) {
|
|
80
|
-
var selected = _ref.selected;
|
|
81
|
-
return /*#__PURE__*/_react.default.createElement("li", props, /*#__PURE__*/_react.default.createElement(_material.Checkbox, {
|
|
82
|
-
icon: icon,
|
|
83
|
-
checkedIcon: checkedIcon,
|
|
84
|
-
style: {
|
|
85
|
-
marginRight: 8
|
|
86
|
-
},
|
|
87
|
-
checked: selected
|
|
88
|
-
}), /*#__PURE__*/_react.default.createElement(_text.default, null, option === null || option === void 0 ? void 0 : option.label));
|
|
89
|
-
},
|
|
90
|
-
renderInput: function renderInput(params) {
|
|
91
|
-
return /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({}, params, {
|
|
92
|
-
placeholder: placeholder,
|
|
93
|
-
helperText: helperText
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
})), !checkBox && !blueTheme && /*#__PURE__*/_react.default.createElement(_material.Autocomplete, _extends({}, rest, {
|
|
97
|
-
disabled: isDisabled,
|
|
98
|
-
multiple: isMulti,
|
|
99
|
-
options: options
|
|
100
|
-
// disableCloseOnSelect
|
|
101
|
-
,
|
|
102
|
-
getOptionLabel: function getOptionLabel(option) {
|
|
103
|
-
return option.label ? option.label : "";
|
|
104
|
-
},
|
|
105
|
-
value: value,
|
|
106
|
-
defaultValue: [defaultValue],
|
|
107
|
-
onChange: onChange,
|
|
108
|
-
sx: {
|
|
109
|
-
"& .MuiAutocomplete-input, & .MuiInputLabel-root": {
|
|
110
|
-
fontSize: _responsiveTheme.default.typography.fontSize
|
|
111
|
-
},
|
|
112
|
-
"& .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root']": {
|
|
113
|
-
background: isDisabled && "#DDDDDD",
|
|
114
|
-
color: isDisabled && "#000000"
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
renderInput: function renderInput(params) {
|
|
118
|
-
return /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({
|
|
119
|
-
error: error
|
|
120
|
-
}, params, {
|
|
121
|
-
variant: "outlined",
|
|
122
|
-
fullWidth: true,
|
|
123
|
-
placeholder: placeholder,
|
|
124
|
-
helperText: helperText
|
|
125
|
-
}));
|
|
126
|
-
}
|
|
127
|
-
})), blueTheme && /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
128
|
-
container: true,
|
|
129
|
-
sx: {
|
|
130
|
-
height: "200px",
|
|
131
|
-
backgroundColor: "#3D3981",
|
|
132
|
-
borderRadius: "7px",
|
|
133
|
-
padding: "16px",
|
|
134
|
-
width: "50%"
|
|
135
|
-
// background: "red",
|
|
136
|
-
}
|
|
137
|
-
}, /*#__PURE__*/_react.default.createElement(_material.Autocomplete, _extends({
|
|
138
|
-
sx: {
|
|
139
|
-
"& .MuiAutocomplete-input, & .MuiInputLabel-root": {
|
|
140
|
-
fontSize: _responsiveTheme.default.typography.fontSize
|
|
141
|
-
},
|
|
142
|
-
width: "100%",
|
|
143
|
-
"& .MuiAutocomplete-inputRoot[class*='MuiOutlinedInput-root']": {
|
|
144
|
-
background: "#6e6ba1",
|
|
145
|
-
color: "#F4F7FC"
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
PaperComponent: function PaperComponent(_ref2) {
|
|
149
|
-
var children = _ref2.children;
|
|
150
|
-
return /*#__PURE__*/_react.default.createElement(_material.Paper, {
|
|
151
|
-
style: {
|
|
152
|
-
background: "#6e6ba1",
|
|
153
|
-
color: "#F4F7FC",
|
|
154
|
-
"&:hover": {
|
|
155
|
-
background: "#fff"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}, children);
|
|
159
|
-
}
|
|
160
|
-
}, rest, {
|
|
161
|
-
disabled: isDisabled,
|
|
162
|
-
options: options
|
|
163
|
-
// disableCloseOnSelect
|
|
164
|
-
,
|
|
165
|
-
getOptionLabel: function getOptionLabel(option) {
|
|
166
|
-
return option.label;
|
|
167
|
-
},
|
|
168
|
-
value: value,
|
|
169
|
-
defaultValue: [defaultValue],
|
|
170
|
-
onChange: onChange,
|
|
171
|
-
renderInput: function renderInput(params) {
|
|
172
|
-
return /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({
|
|
173
|
-
error: error
|
|
174
|
-
}, params, {
|
|
175
|
-
variant: "outlined",
|
|
176
|
-
fullWidth: true,
|
|
177
|
-
placeholder: placeholder,
|
|
178
|
-
helperText: helperText
|
|
179
|
-
}));
|
|
180
|
-
}
|
|
181
|
-
// sx={{ }}
|
|
182
|
-
})))));
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
ReactSelect.propTypes = {
|
|
186
|
-
value: _propTypes.default.string,
|
|
187
|
-
className: _propTypes.default.string,
|
|
188
|
-
label: _propTypes.default.string,
|
|
189
|
-
defaultValue: _propTypes.default.instanceOf(Object),
|
|
190
|
-
isMulti: _propTypes.default.bool,
|
|
191
|
-
isDisabled: _propTypes.default.bool,
|
|
192
|
-
options: _propTypes.default.instanceOf(Array),
|
|
193
|
-
placeholder: _propTypes.default.string,
|
|
194
|
-
isRequired: _propTypes.default.bool,
|
|
195
|
-
simulateNativeSelect: _propTypes.default.bool,
|
|
196
|
-
onChange: _propTypes.default.func
|
|
197
|
-
};
|
|
198
|
-
ReactSelect.defaultProps = {
|
|
199
|
-
value: {},
|
|
200
|
-
label: "",
|
|
201
|
-
className: "",
|
|
202
|
-
defaultValue: [{}],
|
|
203
|
-
isMulti: false,
|
|
204
|
-
isDisabled: false,
|
|
205
|
-
options: [],
|
|
206
|
-
placeholder: "",
|
|
207
|
-
isRequired: false,
|
|
208
|
-
simulateNativeSelect: true
|
|
209
|
-
};
|
|
210
|
-
var _default = ReactSelect;
|
|
211
|
-
exports.default = _default;
|
|
@@ -1,122 +0,0 @@
|
|
|
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;
|
|
@@ -1,73 +0,0 @@
|
|
|
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 _default2 = _interopRequireDefault(require("../../themes/default"));
|
|
10
|
-
var _styles = require("@mui/material/styles");
|
|
11
|
-
var _text = _interopRequireDefault(require("../text"));
|
|
12
|
-
var _excluded = ["label"];
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
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); }
|
|
15
|
-
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; }
|
|
16
|
-
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; }
|
|
17
|
-
var Switch = function Switch(props) {
|
|
18
|
-
var label = props.label,
|
|
19
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
20
|
-
console.log(props.color, " theme.palette.grey.main theme.palette.grey.main");
|
|
21
|
-
var MuiSwitchStyledComp = (0, _styles.styled)(_material.Switch)(function (_ref) {
|
|
22
|
-
var _theme$palette;
|
|
23
|
-
var MuiSwitch = _ref.MuiSwitch;
|
|
24
|
-
return {
|
|
25
|
-
padding: 10,
|
|
26
|
-
marginTop: "-6px",
|
|
27
|
-
"& .MuiSwitch-track": {
|
|
28
|
-
borderRadius: 20 / 2
|
|
29
|
-
},
|
|
30
|
-
"& .Mui-checked": {
|
|
31
|
-
color: "".concat(_default2.default.palette.white.main, " !important")
|
|
32
|
-
},
|
|
33
|
-
"& .MuiSwitch-thumb": {
|
|
34
|
-
margin: "5px 0px 0px 5px",
|
|
35
|
-
width: 10,
|
|
36
|
-
height: 10
|
|
37
|
-
},
|
|
38
|
-
"& .MuiSwitch-switchBase.Mui-checked+.MuiSwitch-track": {
|
|
39
|
-
backgroundColor: (_theme$palette = _default2.default.palette["".concat(props.color.toString().toLowerCase())]) === null || _theme$palette === void 0 ? void 0 : _theme$palette.main,
|
|
40
|
-
opacity: 1
|
|
41
|
-
},
|
|
42
|
-
"& .MuiSwitch-switchBase.Mui-disabled+.MuiSwitch-track": {
|
|
43
|
-
backgroundColor: _default2.default.palette.grey.main,
|
|
44
|
-
opacity: 1
|
|
45
|
-
},
|
|
46
|
-
"& .MuiSwitch-switchBase:hover": {
|
|
47
|
-
backgroundColor: "transparent"
|
|
48
|
-
},
|
|
49
|
-
"& .MuiSwitch-switchBase.Mui-checked:hover": {
|
|
50
|
-
backgroundColor: "transparent !important"
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
});
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_material.FormControlLabel, _extends({
|
|
55
|
-
control: /*#__PURE__*/_react.default.createElement(MuiSwitchStyledComp, _extends({
|
|
56
|
-
sx: {
|
|
57
|
-
"&:hover": {
|
|
58
|
-
backgroundColor: "transparent",
|
|
59
|
-
cursor: "default"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}, rest)),
|
|
63
|
-
label: /*#__PURE__*/_react.default.createElement(_text.default, null, label)
|
|
64
|
-
}, rest)));
|
|
65
|
-
};
|
|
66
|
-
Switch.defaultProps = {
|
|
67
|
-
size: "medium",
|
|
68
|
-
color: "primary",
|
|
69
|
-
defaultChecked: true,
|
|
70
|
-
labelPlacement: "right"
|
|
71
|
-
};
|
|
72
|
-
var _default = Switch;
|
|
73
|
-
exports.default = _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _styles = require("@mui/styles");
|
|
8
|
-
var _default2 = _interopRequireDefault(require("../../themes/default"));
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
var _default = (0, _styles.makeStyles)(function () {
|
|
11
|
-
return {
|
|
12
|
-
labelLarge: {
|
|
13
|
-
"@media (min-width:1101px) and (max-width:1200px)": {
|
|
14
|
-
fontSize: "1.5rem !important",
|
|
15
|
-
fontWeight: "".concat(500, " !important")
|
|
16
|
-
},
|
|
17
|
-
"@media (min-width:769px) and (max-width:1100px)": {
|
|
18
|
-
fontSize: "1.3rem !important",
|
|
19
|
-
fontWeight: "".concat(500, " !important")
|
|
20
|
-
},
|
|
21
|
-
"@media (min-width:600px) and (max-width:768px)": {
|
|
22
|
-
fontSize: "1rem",
|
|
23
|
-
fontWeight: "".concat(500, " !important")
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
labelSmall: {
|
|
27
|
-
"@media (min-width:1101px) and (max-width:1200px)": {
|
|
28
|
-
fontSize: "0.85rem !important",
|
|
29
|
-
fontWeight: "".concat(500, " !important")
|
|
30
|
-
},
|
|
31
|
-
"@media (min-width:769px) and (max-width:1100px)": {
|
|
32
|
-
fontSize: "0.75rem !important",
|
|
33
|
-
fontWeight: "".concat(500, " !important")
|
|
34
|
-
},
|
|
35
|
-
"@media (min-width:600px) and (max-width:768px)": {
|
|
36
|
-
fontSize: "0.75rem",
|
|
37
|
-
fontWeight: "".concat(500, " !important")
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
exports.default = _default;
|