tenjin-ui-kit 0.3.73 → 0.3.74
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/README.md +13 -13
- package/common/hooks/apiHooks.js +199 -91
- package/common/hooks/newApiHook.js +258 -127
- package/common/utils/security/index.js +2 -2
- package/common/utils/security/securityConfig.js +2 -1
- package/components/Canvas.js +101 -172
- package/components/DragBox/index.js +31 -21
- package/components/InputWithChip/index.js +83 -178
- package/components/RightContext/index.css +20 -20
- package/components/RightContext/index.js +41 -17
- package/components/WorkFlow.js +29 -19
- package/components/WorkFlowBuilder.js +56 -32
- package/components/alert/Style.js +14 -11
- package/components/alert/index.js +14 -8
- package/components/attachment/index.js +31 -26
- package/components/authenticationProvider/AuthError.js +4 -3
- package/components/authenticationProvider/AuthLoader.js +4 -3
- package/components/authenticationProvider/index.js +130 -58
- package/components/avatar/index.js +23 -24
- package/components/avatar/styles.js +77 -76
- package/components/breadCrumbs/index.js +89 -64
- package/components/breadCrumbs/style.js +4 -1
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +6 -7
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/style.js +8 -5
- package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +6 -7
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +7 -8
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +7 -8
- package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +19 -16
- package/components/browsingTestCaseLayout/index.js +46 -30
- package/components/browsingTestCaseLayout/style.css +82 -82
- package/components/button/index.js +58 -47
- package/components/chatBotModal/index.js +61 -40
- package/components/checkBox/index.js +10 -8
- package/components/combobox/index.js +216 -182
- package/components/divider/index.js +18 -9
- package/components/editableField/index.js +46 -19
- package/components/error/index.js +12 -6
- package/components/errorBoundary/index.js +98 -74
- package/components/fileUploader/index.js +58 -46
- package/components/fileUploader/style.js +49 -46
- package/components/filter/ValueSelector.js +243 -148
- package/components/filter/index.js +66 -43
- package/components/iconButton/index.js +4 -3
- package/components/input/index.js +74 -60
- package/components/layout/index.js +49 -36
- package/components/layout/main/index.js +14 -13
- package/components/layout/main/style.js +14 -11
- package/components/layout/pageContent/index.js +7 -8
- package/components/layout/sidebar/FlatMenu.js +47 -51
- package/components/layout/sidebar/GroupedIconMenu.js +194 -169
- package/components/layout/sidebar/GroupedMenu.js +50 -45
- package/components/layout/sidebar/ProjectMenu.js +185 -165
- package/components/layout/sidebar/index.js +26 -27
- package/components/layout/sidebar/style.js +143 -138
- package/components/layout/topBar/ProjectTopbar.js +119 -86
- package/components/layout/topBar/UserAvatar.js +65 -51
- package/components/layout/topBar/index.js +41 -23
- package/components/loader/index.js +12 -9
- package/components/menu/index.js +42 -23
- package/components/modal/Modal.js +6 -5
- package/components/modal/index.js +20 -16
- package/components/modal/style.js +56 -53
- package/components/optionMenu/index.js +72 -57
- package/components/pagination/index.js +43 -23
- package/components/pagination/style.js +28 -25
- package/components/paginationUpdated/index.js +26 -19
- package/components/paper/index.js +22 -20
- package/components/paper/style.js +27 -24
- package/components/reactSelect/index.js +97 -64
- package/components/reactSelect/style.js +151 -131
- package/components/richTextEditor/index.js +48 -24
- package/components/select/GroupedSelect.js +100 -56
- package/components/select/SimpleSelect.js +99 -59
- package/components/select/index.js +69 -56
- package/components/simpleSelect/index.js +22 -18
- package/components/sort/index.js +36 -23
- package/components/switch/index.js +15 -14
- package/components/switch/style.js +32 -29
- package/components/switch/switch.js +47 -30
- package/components/table/ReactTable.js +83 -59
- package/components/table/SimpleTable.js +91 -67
- package/components/table/index.js +206 -300
- package/components/text/index.js +30 -22
- package/components/timeStamp/index.js +6 -4
- package/components/timeStamp/style.js +15 -12
- package/components/topBar/index.js +102 -86
- package/components/tree/index.js +58 -30
- package/components/tree/style.js +23 -20
- package/components/valuePicker/ValueSelector.js +160 -78
- package/components/valuePicker/index.js +50 -30
- package/components/wrapperLayout/layout/index.js +7 -8
- package/components/wrapperLayout/main/index.js +7 -8
- package/components/wrapperLayout/main/pageContainer/index.js +5 -6
- package/components/wrapperLayout/main/sideBar/index.js +175 -171
- package/components/wrapperLayout/main/sideBar/style.js +183 -177
- package/components/wrapperLayout/topBar/UserAvatar.js +5 -6
- package/components/wrapperLayout/topBar/avatar.js +18 -15
- package/components/wrapperLayout/topBar/index.js +107 -115
- package/components/wrapperLayout/topBar/menuIcon.js +5 -6
- package/components/wrapperLayout/topBar/style.js +64 -63
- package/http/index.js +188 -92
- package/index.js +55 -53
- package/package.json +124 -125
- package/templates/listPage/index.js +196 -168
- package/themes/default.js +7 -5
- package/themes/defaultSmall.js +3 -2
- package/themes/responsiveTheme.js +8 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
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); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -10,34 +11,57 @@ var _reactSelect = _interopRequireWildcard(require("react-select"));
|
|
|
10
11
|
var _material = require("@mui/material");
|
|
11
12
|
var _KeyboardArrowDown = _interopRequireDefault(require("@mui/icons-material/KeyboardArrowDown"));
|
|
12
13
|
var _style = require("./style");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
|
|
14
|
+
var _excluded = ["getStyles", "Icon", "isDisabled", "isFocused", "isSelected", "children", "innerProps", "isCheckBox"],
|
|
15
|
+
_excluded2 = ["options", "value", "label", "defaultValue", "isMulti", "isDisabled", "placeholder", "className", "isRequired", "simulateNativeSelect", "onChange", "theme", "error", "helperText", "isBlueTheme", "isLoading", "isCheckBox"];
|
|
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
|
+
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; }
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
24
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
25
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
26
|
+
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."); }
|
|
27
|
+
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); }
|
|
28
|
+
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; }
|
|
29
|
+
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; } }
|
|
30
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
|
+
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; }
|
|
32
|
+
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; }
|
|
33
|
+
var DropdownIndicator = function DropdownIndicator(props) {
|
|
17
34
|
return /*#__PURE__*/_react.default.createElement(_reactSelect.components.DropdownIndicator, props, /*#__PURE__*/_react.default.createElement(_KeyboardArrowDown.default, null));
|
|
18
35
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
var InputOption = function InputOption(_ref) {
|
|
37
|
+
var getStyles = _ref.getStyles,
|
|
38
|
+
Icon = _ref.Icon,
|
|
39
|
+
isDisabled = _ref.isDisabled,
|
|
40
|
+
isFocused = _ref.isFocused,
|
|
41
|
+
isSelected = _ref.isSelected,
|
|
42
|
+
children = _ref.children,
|
|
43
|
+
innerProps = _ref.innerProps,
|
|
44
|
+
isCheckBox = _ref.isCheckBox,
|
|
45
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
46
|
+
var _React$useState = _react.default.useState(false),
|
|
47
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
48
|
+
isActive = _React$useState2[0],
|
|
49
|
+
setIsActive = _React$useState2[1];
|
|
50
|
+
var onMouseDown = function onMouseDown() {
|
|
51
|
+
return setIsActive(true);
|
|
52
|
+
};
|
|
53
|
+
var onMouseUp = function onMouseUp() {
|
|
54
|
+
return setIsActive(false);
|
|
55
|
+
};
|
|
56
|
+
var onMouseLeave = function onMouseLeave() {
|
|
57
|
+
return setIsActive(false);
|
|
58
|
+
};
|
|
35
59
|
|
|
36
60
|
// styles
|
|
37
|
-
|
|
61
|
+
var bg = "transparent";
|
|
38
62
|
if (isFocused) bg = "#eee";
|
|
39
63
|
if (isActive) bg = "#B2D4FF";
|
|
40
|
-
|
|
64
|
+
var style = {
|
|
41
65
|
alignItems: "center",
|
|
42
66
|
backgroundColor: bg,
|
|
43
67
|
color: "inherit",
|
|
@@ -45,13 +69,12 @@ const InputOption = _ref => {
|
|
|
45
69
|
};
|
|
46
70
|
|
|
47
71
|
// prop assignment
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
72
|
+
var props = _objectSpread(_objectSpread({}, innerProps), {}, {
|
|
73
|
+
onMouseDown: onMouseDown,
|
|
74
|
+
onMouseUp: onMouseUp,
|
|
75
|
+
onMouseLeave: onMouseLeave,
|
|
76
|
+
style: style
|
|
77
|
+
});
|
|
55
78
|
return /*#__PURE__*/_react.default.createElement(_reactSelect.components.Option, _extends({}, rest, {
|
|
56
79
|
isDisabled: isDisabled,
|
|
57
80
|
isFocused: isFocused,
|
|
@@ -63,43 +86,46 @@ const InputOption = _ref => {
|
|
|
63
86
|
checked: isSelected
|
|
64
87
|
}), children);
|
|
65
88
|
};
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
} = _ref2;
|
|
87
|
-
const classes = (0, _style.useStyles)({
|
|
89
|
+
var ReactSelect = function ReactSelect(_ref2) {
|
|
90
|
+
var options = _ref2.options,
|
|
91
|
+
value = _ref2.value,
|
|
92
|
+
label = _ref2.label,
|
|
93
|
+
defaultValue = _ref2.defaultValue,
|
|
94
|
+
isMulti = _ref2.isMulti,
|
|
95
|
+
isDisabled = _ref2.isDisabled,
|
|
96
|
+
placeholder = _ref2.placeholder,
|
|
97
|
+
className = _ref2.className,
|
|
98
|
+
isRequired = _ref2.isRequired,
|
|
99
|
+
simulateNativeSelect = _ref2.simulateNativeSelect,
|
|
100
|
+
onChange = _ref2.onChange,
|
|
101
|
+
theme = _ref2.theme,
|
|
102
|
+
error = _ref2.error,
|
|
103
|
+
helperText = _ref2.helperText,
|
|
104
|
+
isBlueTheme = _ref2.isBlueTheme,
|
|
105
|
+
isLoading = _ref2.isLoading,
|
|
106
|
+
isCheckBox = _ref2.isCheckBox,
|
|
107
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
108
|
+
var classes = (0, _style.useStyles)({
|
|
88
109
|
colorTheme: isBlueTheme
|
|
89
110
|
});
|
|
90
|
-
|
|
111
|
+
var handleSelectChange = function handleSelectChange(value) {
|
|
91
112
|
if (simulateNativeSelect) {
|
|
92
113
|
onChange(value.value);
|
|
93
114
|
} else {
|
|
94
115
|
onChange(value);
|
|
95
116
|
}
|
|
96
117
|
};
|
|
97
|
-
|
|
118
|
+
var handleChange = function handleChange(options) {
|
|
98
119
|
if (Array.isArray(options)) {
|
|
99
|
-
setSelectedOptions(options.map(
|
|
120
|
+
setSelectedOptions(options.map(function (opt) {
|
|
121
|
+
return opt.value;
|
|
122
|
+
}));
|
|
100
123
|
}
|
|
101
124
|
};
|
|
102
|
-
|
|
125
|
+
var _React$useState3 = _react.default.useState([]),
|
|
126
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
127
|
+
selectedOptions = _React$useState4[0],
|
|
128
|
+
setSelectedOptions = _React$useState4[1];
|
|
103
129
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
104
130
|
style: {
|
|
105
131
|
width: "100%"
|
|
@@ -113,36 +139,42 @@ const ReactSelect = _ref2 => {
|
|
|
113
139
|
defaultValue: defaultValue && defaultValue.length > 0 ? defaultValue : "",
|
|
114
140
|
styles: (0, _style.getCustomStyles)({
|
|
115
141
|
colorTheme: isBlueTheme,
|
|
116
|
-
error
|
|
142
|
+
error: error
|
|
117
143
|
}),
|
|
118
144
|
isDisabled: isDisabled,
|
|
119
145
|
placeholder: placeholder,
|
|
120
146
|
components: isCheckBox ? {
|
|
121
|
-
DropdownIndicator,
|
|
147
|
+
DropdownIndicator: DropdownIndicator,
|
|
122
148
|
Option: InputOption
|
|
123
149
|
} : {
|
|
124
|
-
DropdownIndicator
|
|
150
|
+
DropdownIndicator: DropdownIndicator
|
|
125
151
|
},
|
|
126
152
|
isLoading: isLoading
|
|
127
153
|
/////isCheckBox
|
|
128
154
|
,
|
|
129
155
|
closeMenuOnSelect: !isCheckBox ? true : false,
|
|
130
156
|
hideSelectedOptions: !isCheckBox ? true : false,
|
|
131
|
-
onChange:
|
|
157
|
+
onChange: function onChange(options) {
|
|
158
|
+
return isCheckBox && handleChange(options);
|
|
159
|
+
}
|
|
132
160
|
}, rest))) : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_reactSelect.default, _extends({
|
|
133
161
|
options: options,
|
|
134
162
|
styles: (0, _style.getCustomStyles)({
|
|
135
163
|
colorTheme: isBlueTheme,
|
|
136
|
-
error
|
|
164
|
+
error: error
|
|
137
165
|
}),
|
|
138
166
|
onChange: handleSelectChange,
|
|
139
|
-
defaultValue: options.filter(
|
|
140
|
-
|
|
167
|
+
defaultValue: options.filter(function (option) {
|
|
168
|
+
return option.value === defaultValue;
|
|
169
|
+
}),
|
|
170
|
+
value: options.filter(function (option) {
|
|
171
|
+
return option.value === value;
|
|
172
|
+
}),
|
|
141
173
|
isMulti: isMulti,
|
|
142
174
|
isDisabled: isDisabled,
|
|
143
175
|
placeholder: placeholder,
|
|
144
176
|
components: {
|
|
145
|
-
DropdownIndicator
|
|
177
|
+
DropdownIndicator: DropdownIndicator
|
|
146
178
|
},
|
|
147
179
|
isLoading: isLoading
|
|
148
180
|
}, rest))), helperText && /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
@@ -176,4 +208,5 @@ ReactSelect.defaultProps = {
|
|
|
176
208
|
isRequired: false,
|
|
177
209
|
simulateNativeSelect: true
|
|
178
210
|
};
|
|
179
|
-
var _default =
|
|
211
|
+
var _default = ReactSelect;
|
|
212
|
+
exports.default = _default;
|
|
@@ -6,138 +6,158 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.useStyles = exports.getCustomStyles = void 0;
|
|
7
7
|
var _styles = require("@mui/styles");
|
|
8
8
|
var _responsiveTheme = _interopRequireDefault(require("../../themes/responsiveTheme"));
|
|
9
|
-
function _interopRequireDefault(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
fontSize: _responsiveTheme.default.typography.fontSize,
|
|
18
|
-
fontWeight: 500,
|
|
19
|
-
fontFamily: _responsiveTheme.default.typography.fontFamily,
|
|
20
|
-
display: "flex",
|
|
21
|
-
marginBottom: "12px"
|
|
22
|
-
};
|
|
23
|
-
},
|
|
24
|
-
star: {
|
|
25
|
-
lineHeight: "unset",
|
|
26
|
-
marginLeft: "4px"
|
|
27
|
-
},
|
|
28
|
-
helperText: {
|
|
29
|
-
color: "#f44336",
|
|
30
|
-
fontSize: "8.5px"
|
|
31
|
-
},
|
|
32
|
-
blueTheme: {
|
|
33
|
-
// width: "100%",
|
|
34
|
-
height: "200px",
|
|
35
|
-
backgroundColor: "#3D3981",
|
|
36
|
-
borderRadius: "7px",
|
|
37
|
-
padding: "16px",
|
|
38
|
-
width: "50%"
|
|
39
|
-
}
|
|
40
|
-
}));
|
|
41
|
-
const getCustomStyles = _ref2 => {
|
|
42
|
-
let {
|
|
43
|
-
colorTheme,
|
|
44
|
-
error
|
|
45
|
-
} = _ref2;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
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); }
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
|
+
var useStyles = (0, _styles.makeStyles)(function () {
|
|
46
17
|
return {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
18
|
+
inputLabel: function inputLabel(_ref) {
|
|
19
|
+
var colorTheme = _ref.colorTheme;
|
|
20
|
+
return {
|
|
21
|
+
color: colorTheme ? _responsiveTheme.default.palette.text.main : _responsiveTheme.default.palette.text.main,
|
|
22
|
+
fontSize: _responsiveTheme.default.typography.fontSize,
|
|
23
|
+
fontWeight: 500,
|
|
24
|
+
fontFamily: _responsiveTheme.default.typography.fontFamily,
|
|
25
|
+
display: "flex",
|
|
26
|
+
marginBottom: "12px"
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
star: {
|
|
30
|
+
lineHeight: "unset",
|
|
31
|
+
marginLeft: "4px"
|
|
32
|
+
},
|
|
33
|
+
helperText: {
|
|
34
|
+
color: "#f44336",
|
|
35
|
+
fontSize: "8.5px"
|
|
36
|
+
},
|
|
37
|
+
blueTheme: {
|
|
38
|
+
// width: "100%",
|
|
39
|
+
height: "200px",
|
|
40
|
+
backgroundColor: "#3D3981",
|
|
41
|
+
borderRadius: "7px",
|
|
42
|
+
padding: "16px",
|
|
43
|
+
width: "50%"
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
exports.useStyles = useStyles;
|
|
48
|
+
var getCustomStyles = function getCustomStyles(_ref2) {
|
|
49
|
+
var colorTheme = _ref2.colorTheme,
|
|
50
|
+
error = _ref2.error;
|
|
51
|
+
return {
|
|
52
|
+
option: function option(provided) {
|
|
53
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
54
|
+
color: colorTheme ? "#f4f7fc" : _responsiveTheme.default.palette.text.main,
|
|
55
|
+
fontSize: "10px",
|
|
56
|
+
fontFamily: _responsiveTheme.default.typography.fontFamily,
|
|
57
|
+
backgroundColor: colorTheme ? "#6e6ba1" : _responsiveTheme.default.palette.white.main,
|
|
58
|
+
opacity: "100%",
|
|
59
|
+
"&:hover": {
|
|
60
|
+
backgroundColor: _responsiveTheme.default.palette.secondary_grey.main,
|
|
61
|
+
color: _responsiveTheme.default.palette.primary.main
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
control: function control(provided) {
|
|
66
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
67
|
+
backgroundColor: colorTheme ? "#6e6ba1" : _responsiveTheme.default.palette.primary.white,
|
|
68
|
+
boxShadow: "none",
|
|
69
|
+
fontSize: "10px",
|
|
70
|
+
fontFamily: _responsiveTheme.default.typography.fontFamily,
|
|
71
|
+
// marginTop: theme.spacing(1.25),
|
|
72
|
+
height: "2.4rem !important",
|
|
73
|
+
border: error ? "1px solid #be1515" : colorTheme ? "none" : "1px solid #CFD7DF",
|
|
74
|
+
"&:hover": {
|
|
75
|
+
border: error ? "1px solid #be1515" : colorTheme ? "none" : "1px solid #CFD7DF"
|
|
76
|
+
}
|
|
77
|
+
// minHeight: "31.83px !important",
|
|
78
|
+
//border: "1px solid #adbac9",
|
|
79
|
+
});
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
placeholder: function placeholder(provided) {
|
|
83
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
84
|
+
color: colorTheme ? _responsiveTheme.default.palette.white.main : _responsiveTheme.default.palette.grey_dark.main,
|
|
85
|
+
fontFamily: _responsiveTheme.default.typography.fontFamily,
|
|
86
|
+
fontWeight: 400,
|
|
87
|
+
fontSize: _responsiveTheme.default.typography.fontSize,
|
|
88
|
+
padding: "0rem 0rem 0.1rem 0rem"
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
indicatorSeparator: function indicatorSeparator(provided) {
|
|
92
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
93
|
+
background: "none"
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
input: function input(provided) {
|
|
97
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
98
|
+
color: colorTheme ? "#F4F7FC" : _responsiveTheme.default.palette.text.main,
|
|
99
|
+
padding: "0rem 0rem 0.1rem 0rem"
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
menu: function menu(provided) {
|
|
103
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
104
|
+
padding: 0,
|
|
105
|
+
backgroundColor: colorTheme ? "#6e6ba1" : _responsiveTheme.default.palette.white.main,
|
|
106
|
+
zIndex: 9999
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
menuPortal: function menuPortal(provided) {
|
|
110
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
111
|
+
zIndex: 9999
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
dropdownIndicator: function dropdownIndicator(provided) {
|
|
115
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
116
|
+
color: colorTheme ? "#f4f7fc" : _responsiveTheme.default.palette.text.main,
|
|
117
|
+
opacity: 1,
|
|
118
|
+
padding: "0rem 0rem 0.1rem 0rem"
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
singleValue: function singleValue(provided) {
|
|
122
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
123
|
+
color: colorTheme ? "#F4F7FC" : _responsiveTheme.default.palette.text.main,
|
|
124
|
+
// fontWeight: 500,
|
|
125
|
+
fontSize: _responsiveTheme.default.typography.fontSize,
|
|
126
|
+
padding: "0rem 0rem 0.1rem 0rem"
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
valueContainer: function valueContainer(provided) {
|
|
130
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
131
|
+
// padding: 0,
|
|
132
|
+
color: colorTheme ? "#F4F7FC" : _responsiveTheme.default.palette.primary.tenjinLightBlack
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
clearIndicator: function clearIndicator(provided) {
|
|
136
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
137
|
+
color: colorTheme ? "#f4f7fc" : "#adb0bb"
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
multiValue: function multiValue(provided) {
|
|
141
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
142
|
+
backgroundColor: _responsiveTheme.default.palette.primary.tenjinMLight,
|
|
143
|
+
border: "1px solid #DAE0FF",
|
|
144
|
+
marginTop: "-0.15rem"
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
multiValueLabel: function multiValueLabel(provided) {
|
|
148
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
149
|
+
color: _responsiveTheme.default.palette.text.main,
|
|
150
|
+
fontWeight: 400,
|
|
151
|
+
fontSize: _responsiveTheme.default.typography.fontSize,
|
|
152
|
+
fontFamily: _responsiveTheme.default.typography.fontFamily
|
|
153
|
+
});
|
|
154
|
+
},
|
|
155
|
+
multiValueRemove: function multiValueRemove(provided) {
|
|
156
|
+
return _objectSpread(_objectSpread({}, provided), {}, {
|
|
157
|
+
color: _responsiveTheme.default.palette.primary.tenjinFBlue,
|
|
158
|
+
cursor: "pointer"
|
|
159
|
+
});
|
|
160
|
+
}
|
|
141
161
|
};
|
|
142
162
|
};
|
|
143
163
|
exports.getCustomStyles = getCustomStyles;
|