@chaoswise/ui 2.5.7 → 2.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AbreastLayout/index.js +1 -1
- package/lib/Ace/ace.js +5 -6
- package/lib/Ace/diff.js +6 -7
- package/lib/Ace/split.js +5 -6
- package/lib/AdaptiveLayout/index.js +1 -1
- package/lib/Antd/Drawer.js +1 -1
- package/lib/Antd4Form/FieldList.js +1 -1
- package/lib/Antd4Form/FormItem.js +1 -1
- package/lib/Antd4Form/FormItemChildren.js +3 -4
- package/lib/Antd4Form/useForm.js +1 -1
- package/lib/BasicLayout/Breadcrumb.js +1 -1
- package/lib/BasicLayout/Sider.js +1 -1
- package/lib/CWCascader/Cascader/index.js +1 -1
- package/lib/CWCascader/rc-cascader/OptionList/Checkbox.js +1 -1
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +2 -2
- package/lib/CWCascader/rc-cascader/OptionList/index.js +1 -1
- package/lib/CWCascader/rc-cascader/hooks/useEntities.js +1 -1
- package/lib/CWCascader/rc-cascader/hooks/useSearchConfig.js +1 -1
- package/lib/CWCascader/rc-cascader/hooks/useSearchOptions.js +1 -1
- package/lib/CWMessage/MessageContent/TabList/index.js +2 -2
- package/lib/CWMessage/MessageContent/index.js +2 -2
- package/lib/CWMessage/index.js +2 -2
- package/lib/CWRangePicker/DropdownMenu/index.js +1 -1
- package/lib/CWRangePicker/Refresh/index.js +1 -1
- package/lib/CWRangePicker/index.js +1 -1
- package/lib/CWRangePicker/utils/index.js +1 -1
- package/lib/CWSelect/antd-select.js +6 -7
- package/lib/CWSelect/index.js +1 -1
- package/lib/CWTable/CWTable.js +26 -20
- package/lib/CWTable/EditLine.js +1 -1
- package/lib/CWTable/FormTable.js +1 -1
- package/lib/CWTable/header.js +40 -6
- package/lib/CWTable/index.js +7 -2
- package/lib/CWTable/index.less +1 -1
- package/lib/CWTree/index.js +1 -1
- package/lib/CWTree/index.less +3 -3
- package/lib/CWTree/utils/index.js +1 -1
- package/lib/CWUpload/upload/DragList.js +1 -1
- package/lib/CWUpload/upload/Upload.js +3 -4
- package/lib/CWUpload/upload/UploadList.js +3 -4
- package/lib/Checkbox/Checkbox.js +9 -10
- package/lib/Checkbox/Group.js +11 -12
- package/lib/ColorPicker/SketchPicker/components/common/Alpha.js +8 -9
- package/lib/ColorPicker/SketchPicker/components/common/Checkboard.js +1 -1
- package/lib/ColorPicker/SketchPicker/components/common/ColorWrap.js +6 -7
- package/lib/ColorPicker/SketchPicker/components/common/EditableInput.js +11 -12
- package/lib/ColorPicker/SketchPicker/components/common/Hue.js +7 -8
- package/lib/ColorPicker/SketchPicker/components/common/Saturation.js +7 -8
- package/lib/ColorPicker/SketchPicker/components/common/Swatch.js +1 -1
- package/lib/ColorPicker/SketchPicker/components/sketch/index.js +1 -1
- package/lib/ColorPicker/SketchPicker/helpers/interaction.js +7 -8
- package/lib/ColorPicker/index.js +9 -5
- package/lib/ConfigProvider/ConfigProvider.js +1 -1
- package/lib/CustomScrollBar/index.js +1 -1
- package/lib/DateRangePicker/components/ExtraTimeFooter.js +1 -1
- package/lib/Documentation/Tocify.js +2 -3
- package/lib/Documentation/index.js +1 -1
- package/lib/Drawer/index.js +1 -1
- package/lib/DropdownDatePicker/DropdownMenu/index.js +1 -1
- package/lib/DropdownDatePicker/index.js +1 -1
- package/lib/DropdownDatePicker/utils/index.js +1 -1
- package/lib/EchartsArea/index.js +1 -1
- package/lib/EchartsBar/index.js +1 -1
- package/lib/EchartsBase/index.js +1 -1
- package/lib/EchartsLine/index.js +1 -1
- package/lib/ErrorBoundary/history.js +3 -5
- package/lib/ErrorBoundary/index.js +11 -9
- package/lib/FilterDropDown/DragList.js +10 -5
- package/lib/FilterDropDown/index.js +16 -7
- package/lib/FilterDropDown/index.less +0 -1
- package/lib/Flow/components/PluginWrapper.js +1 -1
- package/lib/Flow/layouts/callChain.js +1 -1
- package/lib/Flow/plugins/CommandLifeCycle.js +2 -3
- package/lib/Flow/plugins/InitSideBarPlugin.js +2 -3
- package/lib/Flow/plugins/InitToolBarPlugin.js +2 -3
- package/lib/Form/FormItem.js +1 -1
- package/lib/FormItemWrapper/index.js +1 -1
- package/lib/Formily/FieldList/index.js +1 -1
- package/lib/Formily/FormItem/index.js +1 -1
- package/lib/Formily/MegaLayout/index.js +1 -1
- package/lib/Formily/subscribeFields/index.js +1 -1
- package/lib/GlobalTabs/index.js +1 -1
- package/lib/Header/CommonIcon.js +1 -1
- package/lib/Header/UserSetting/utils.js +1 -1
- package/lib/Input/InputComponent.js +1 -1
- package/lib/IntersectionInput/index.js +1 -1
- package/lib/Joyride/index.js +1 -1
- package/lib/LayoutBreadcrumb/index.js +1 -1
- package/lib/LazyLoadingTreeSelect/index.js +1 -1
- package/lib/Menu/menu/MenuItem.js +3 -4
- package/lib/Menu/menu/SubMenu.js +3 -4
- package/lib/Menu/menu/index.js +5 -7
- package/lib/Modal/Modal.js +8 -9
- package/lib/Modal/custom-backup/entiretyDrag.js +1 -1
- package/lib/Modal/index.js +1 -1
- package/lib/ModuleFederation/ErrorBoundary/index.js +3 -4
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +2 -2
- package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +1 -1
- package/lib/Pagination/index.js +1 -1
- package/lib/QuickRangePicker/index.js +1 -1
- package/lib/QuickTransfer/DragList.js +1 -1
- package/lib/QuickTransfer/index.js +1 -1
- package/lib/QuickTransfer/utils.js +1 -1
- package/lib/Radio/Group.js +8 -9
- package/lib/Radio/Radio.js +10 -11
- package/lib/RangePicker/components/ExtraTimeFooter.js +1 -1
- package/lib/ReactSelect/customStyles.js +1 -1
- package/lib/ReactSelect/index.js +1 -1
- package/lib/SearchBar/index.js +1 -1
- package/lib/SelectBackup/index.js +1 -1
- package/lib/SiderMenu/Item.js +3 -4
- package/lib/SiderMenu/index.js +1 -1
- package/lib/SimplePagination/index.js +1 -1
- package/lib/SingleSpa/hooks/useErrorHandle.js +1 -1
- package/lib/SingleSpa/index.js +2 -2
- package/lib/SingleSpa/singleSpa/single-spa.dev.js +1 -1
- package/lib/Tabs/index.js +1 -1
- package/lib/ThemeProvider/main.js +1 -1
- package/lib/TimeRangeSlider/Refresh/index.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +1 -1
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/utils/index.js +1 -1
- package/lib/TimeRangeSlider/index.js +1 -1
- package/lib/TimeRangeSlider/utils/index.js +1 -1
- package/lib/TreeList/index.js +1 -1
- package/lib/TreeSelect111/index.js +1 -1
- package/lib/TreeSelect111/utils/index.js +1 -1
- package/lib/message/index.js +1 -1
- package/lib/noticeManager/globalState.js +2 -3
- package/lib/portalNoticeManager/usePortalDispatchNotice.js +1 -1
- package/lib/useLocale/index.js +1 -1
- package/package.json +2 -2
|
@@ -9,7 +9,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
9
9
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
10
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
11
11
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
13
13
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
14
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
15
15
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
@@ -37,7 +37,6 @@ export default function UploadList(props) {
|
|
|
37
37
|
}, props));
|
|
38
38
|
}
|
|
39
39
|
var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
40
|
-
_inherits(IUploadList, _React$Component);
|
|
41
40
|
function IUploadList() {
|
|
42
41
|
var _this;
|
|
43
42
|
_classCallCheck(this, IUploadList);
|
|
@@ -392,7 +391,8 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
392
391
|
};
|
|
393
392
|
return _this;
|
|
394
393
|
}
|
|
395
|
-
|
|
394
|
+
_inherits(IUploadList, _React$Component);
|
|
395
|
+
return _createClass(IUploadList, [{
|
|
396
396
|
key: "componentDidUpdate",
|
|
397
397
|
value: function componentDidUpdate() {
|
|
398
398
|
var _this2 = this;
|
|
@@ -423,7 +423,6 @@ var IUploadList = /*#__PURE__*/function (_React$Component) {
|
|
|
423
423
|
return /*#__PURE__*/React.createElement(ConfigConsumer, null, this.renderUploadList);
|
|
424
424
|
}
|
|
425
425
|
}]);
|
|
426
|
-
return IUploadList;
|
|
427
426
|
}(React.Component);
|
|
428
427
|
IUploadList.defaultProps = {
|
|
429
428
|
listType: "text",
|
package/lib/Checkbox/Checkbox.js
CHANGED
|
@@ -10,13 +10,13 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10
10
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
11
11
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
12
12
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
13
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
13
14
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
14
15
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
15
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
16
16
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
17
17
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
18
18
|
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; }
|
|
19
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
20
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
21
21
|
import React, { Component } from "react";
|
|
22
22
|
import RcCheckbox from "rc-checkbox";
|
|
@@ -30,7 +30,6 @@ import "./index.less";
|
|
|
30
30
|
import Duigou01 from "./assets/duigou1";
|
|
31
31
|
import Duigou02 from "./assets/duigou2";
|
|
32
32
|
var Checkbox = /*#__PURE__*/function (_Component) {
|
|
33
|
-
_inherits(Checkbox, _Component);
|
|
34
33
|
function Checkbox() {
|
|
35
34
|
var _this;
|
|
36
35
|
_classCallCheck(this, Checkbox);
|
|
@@ -38,14 +37,14 @@ var Checkbox = /*#__PURE__*/function (_Component) {
|
|
|
38
37
|
_args[_key] = arguments[_key];
|
|
39
38
|
}
|
|
40
39
|
_this = _callSuper(this, Checkbox, [].concat(_args));
|
|
41
|
-
_defineProperty(
|
|
40
|
+
_defineProperty(_this, "saveCheckbox", function (node) {
|
|
42
41
|
_this.rcCheckbox = node;
|
|
43
42
|
});
|
|
44
|
-
_defineProperty(
|
|
43
|
+
_defineProperty(_this, "renderCheckbox", function (_ref) {
|
|
45
44
|
var getPrefixCls = _ref.getPrefixCls;
|
|
46
|
-
var
|
|
47
|
-
props =
|
|
48
|
-
context =
|
|
45
|
+
var _this2 = _this,
|
|
46
|
+
props = _this2.props,
|
|
47
|
+
context = _this2.context;
|
|
49
48
|
var customizePrefixCls = props.prefixCls,
|
|
50
49
|
className = props.className,
|
|
51
50
|
children = props.children,
|
|
@@ -110,7 +109,8 @@ var Checkbox = /*#__PURE__*/function (_Component) {
|
|
|
110
109
|
});
|
|
111
110
|
return _this;
|
|
112
111
|
}
|
|
113
|
-
|
|
112
|
+
_inherits(Checkbox, _Component);
|
|
113
|
+
return _createClass(Checkbox, [{
|
|
114
114
|
key: "componentDidMount",
|
|
115
115
|
value: function componentDidMount() {
|
|
116
116
|
var value = this.props.value;
|
|
@@ -167,7 +167,6 @@ var Checkbox = /*#__PURE__*/function (_Component) {
|
|
|
167
167
|
return /*#__PURE__*/React.createElement(ConfigConsumer, null, this.renderCheckbox);
|
|
168
168
|
}
|
|
169
169
|
}]);
|
|
170
|
-
return Checkbox;
|
|
171
170
|
}(Component);
|
|
172
171
|
Checkbox.defaultProps = {
|
|
173
172
|
indeterminate: false
|
package/lib/Checkbox/Group.js
CHANGED
|
@@ -14,13 +14,13 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
14
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
15
15
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
16
16
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
17
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
17
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
18
19
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
19
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
20
20
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
21
21
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
22
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
24
24
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
25
25
|
import React, { Component } from "react";
|
|
26
26
|
import PropTypes from "prop-types";
|
|
@@ -31,12 +31,11 @@ import omit from "omit.js";
|
|
|
31
31
|
import { ConfigConsumer } from "antd/es/config-provider";
|
|
32
32
|
import Checkbox from "./Checkbox";
|
|
33
33
|
var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
34
|
-
_inherits(CheckboxGroup, _Component);
|
|
35
34
|
function CheckboxGroup(_props) {
|
|
36
35
|
var _this;
|
|
37
36
|
_classCallCheck(this, CheckboxGroup);
|
|
38
37
|
_this = _callSuper(this, CheckboxGroup, [_props]);
|
|
39
|
-
_defineProperty(
|
|
38
|
+
_defineProperty(_this, "cancelValue", function (value) {
|
|
40
39
|
_this.setState(function (_ref) {
|
|
41
40
|
var registeredValues = _ref.registeredValues;
|
|
42
41
|
return {
|
|
@@ -46,7 +45,7 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
46
45
|
};
|
|
47
46
|
});
|
|
48
47
|
});
|
|
49
|
-
_defineProperty(
|
|
48
|
+
_defineProperty(_this, "registerValue", function (value) {
|
|
50
49
|
_this.setState(function (_ref2) {
|
|
51
50
|
var registeredValues = _ref2.registeredValues;
|
|
52
51
|
return {
|
|
@@ -54,7 +53,7 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
54
53
|
};
|
|
55
54
|
});
|
|
56
55
|
});
|
|
57
|
-
_defineProperty(
|
|
56
|
+
_defineProperty(_this, "toggleOption", function (option) {
|
|
58
57
|
var registeredValues = _this.state.registeredValues;
|
|
59
58
|
var optionIndex = _this.state.value.indexOf(option.value);
|
|
60
59
|
var value = _toConsumableArray(_this.state.value);
|
|
@@ -84,11 +83,11 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
84
83
|
}));
|
|
85
84
|
}
|
|
86
85
|
});
|
|
87
|
-
_defineProperty(
|
|
86
|
+
_defineProperty(_this, "renderGroup", function (_ref3) {
|
|
88
87
|
var getPrefixCls = _ref3.getPrefixCls;
|
|
89
|
-
var
|
|
90
|
-
props =
|
|
91
|
-
state =
|
|
88
|
+
var _this2 = _this,
|
|
89
|
+
props = _this2.props,
|
|
90
|
+
state = _this2.state;
|
|
92
91
|
var customizePrefixCls = props.prefixCls,
|
|
93
92
|
className = props.className,
|
|
94
93
|
style = props.style,
|
|
@@ -128,7 +127,8 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
128
127
|
};
|
|
129
128
|
return _this;
|
|
130
129
|
}
|
|
131
|
-
|
|
130
|
+
_inherits(CheckboxGroup, _Component);
|
|
131
|
+
return _createClass(CheckboxGroup, [{
|
|
132
132
|
key: "getChildContext",
|
|
133
133
|
value: function getChildContext() {
|
|
134
134
|
return {
|
|
@@ -177,7 +177,6 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
177
177
|
return null;
|
|
178
178
|
}
|
|
179
179
|
}]);
|
|
180
|
-
return CheckboxGroup;
|
|
181
180
|
}(Component);
|
|
182
181
|
CheckboxGroup.defaultProps = {
|
|
183
182
|
options: []
|
|
@@ -6,20 +6,19 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
6
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
9
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
11
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
12
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
13
13
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
14
|
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; }
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
16
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
17
17
|
import React, { Component, PureComponent } from 'react';
|
|
18
18
|
import reactCSS from 'reactcss';
|
|
19
19
|
import * as alpha from '../../helpers/alpha';
|
|
20
20
|
import Checkboard from './Checkboard';
|
|
21
21
|
export var Alpha = /*#__PURE__*/function (_ref) {
|
|
22
|
-
_inherits(Alpha, _ref);
|
|
23
22
|
function Alpha() {
|
|
24
23
|
var _this;
|
|
25
24
|
_classCallCheck(this, Alpha);
|
|
@@ -27,25 +26,26 @@ export var Alpha = /*#__PURE__*/function (_ref) {
|
|
|
27
26
|
args[_key] = arguments[_key];
|
|
28
27
|
}
|
|
29
28
|
_this = _callSuper(this, Alpha, [].concat(args));
|
|
30
|
-
_defineProperty(
|
|
29
|
+
_defineProperty(_this, "handleChange", function (e) {
|
|
31
30
|
var change = alpha.calculateChange(e, _this.props.hsl, _this.props.direction, _this.props.a, _this.container);
|
|
32
31
|
change && typeof _this.props.onChange === 'function' && _this.props.onChange(change, e);
|
|
33
32
|
});
|
|
34
|
-
_defineProperty(
|
|
33
|
+
_defineProperty(_this, "handleMouseDown", function (e) {
|
|
35
34
|
_this.handleChange(e);
|
|
36
35
|
window.addEventListener('mousemove', _this.handleChange);
|
|
37
36
|
window.addEventListener('mouseup', _this.handleMouseUp);
|
|
38
37
|
});
|
|
39
|
-
_defineProperty(
|
|
38
|
+
_defineProperty(_this, "handleMouseUp", function () {
|
|
40
39
|
_this.unbindEventListeners();
|
|
41
40
|
});
|
|
42
|
-
_defineProperty(
|
|
41
|
+
_defineProperty(_this, "unbindEventListeners", function () {
|
|
43
42
|
window.removeEventListener('mousemove', _this.handleChange);
|
|
44
43
|
window.removeEventListener('mouseup', _this.handleMouseUp);
|
|
45
44
|
});
|
|
46
45
|
return _this;
|
|
47
46
|
}
|
|
48
|
-
|
|
47
|
+
_inherits(Alpha, _ref);
|
|
48
|
+
return _createClass(Alpha, [{
|
|
49
49
|
key: "componentWillUnmount",
|
|
50
50
|
value: function componentWillUnmount() {
|
|
51
51
|
this.unbindEventListeners();
|
|
@@ -128,6 +128,5 @@ export var Alpha = /*#__PURE__*/function (_ref) {
|
|
|
128
128
|
}))));
|
|
129
129
|
}
|
|
130
130
|
}]);
|
|
131
|
-
return Alpha;
|
|
132
131
|
}(PureComponent || Component);
|
|
133
132
|
export default Alpha;
|
|
@@ -2,7 +2,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
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; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import React, { isValidElement } from 'react';
|
|
8
8
|
import reactCSS from 'reactcss';
|
|
@@ -7,20 +7,19 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
7
7
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
8
8
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
9
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
10
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10
11
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
12
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
13
13
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
14
14
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
15
15
|
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; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
17
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
18
18
|
import React, { Component, PureComponent } from 'react';
|
|
19
19
|
import debounce from 'lodash/debounce';
|
|
20
20
|
import * as color from '../../helpers/color';
|
|
21
21
|
export var ColorWrap = function ColorWrap(Picker) {
|
|
22
22
|
var ColorPicker = /*#__PURE__*/function (_ref) {
|
|
23
|
-
_inherits(ColorPicker, _ref);
|
|
24
23
|
function ColorPicker(props) {
|
|
25
24
|
var _this;
|
|
26
25
|
_classCallCheck(this, ColorPicker);
|
|
@@ -30,7 +29,7 @@ export var ColorWrap = function ColorWrap(Picker) {
|
|
|
30
29
|
// ...color.toState(nextProps.color, state.oldHue),
|
|
31
30
|
// }
|
|
32
31
|
// }
|
|
33
|
-
_defineProperty(
|
|
32
|
+
_defineProperty(_this, "handleChange", function (data, event) {
|
|
34
33
|
var isValidColor = color.simpleCheckForValidColor(data);
|
|
35
34
|
if (isValidColor) {
|
|
36
35
|
var colors = color.toState(data, data.h || _this.state.oldHue);
|
|
@@ -39,7 +38,7 @@ export var ColorWrap = function ColorWrap(Picker) {
|
|
|
39
38
|
_this.props.onChange && _this.props.onChange(colors, event);
|
|
40
39
|
}
|
|
41
40
|
});
|
|
42
|
-
_defineProperty(
|
|
41
|
+
_defineProperty(_this, "handleSwatchHover", function (data, event) {
|
|
43
42
|
var isValidColor = color.simpleCheckForValidColor(data);
|
|
44
43
|
if (isValidColor) {
|
|
45
44
|
var colors = color.toState(data, data.h || _this.state.oldHue);
|
|
@@ -52,7 +51,8 @@ export var ColorWrap = function ColorWrap(Picker) {
|
|
|
52
51
|
}, 100);
|
|
53
52
|
return _this;
|
|
54
53
|
}
|
|
55
|
-
|
|
54
|
+
_inherits(ColorPicker, _ref);
|
|
55
|
+
return _createClass(ColorPicker, [{
|
|
56
56
|
key: "render",
|
|
57
57
|
value: function render() {
|
|
58
58
|
var optionalEvents = {};
|
|
@@ -64,7 +64,6 @@ export var ColorWrap = function ColorWrap(Picker) {
|
|
|
64
64
|
}, optionalEvents));
|
|
65
65
|
}
|
|
66
66
|
}]);
|
|
67
|
-
return ColorPicker;
|
|
68
67
|
}(PureComponent || Component);
|
|
69
68
|
ColorPicker.propTypes = _objectSpread({}, Picker.propTypes);
|
|
70
69
|
ColorPicker.defaultProps = _objectSpread(_objectSpread({}, Picker.defaultProps), {}, {
|
|
@@ -4,13 +4,13 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
5
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
6
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
7
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
7
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
9
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
12
|
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; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
import React, { Component, PureComponent } from 'react';
|
|
16
16
|
import reactCSS from 'reactcss';
|
|
@@ -26,12 +26,11 @@ var getNumberValue = function getNumberValue(value) {
|
|
|
26
26
|
};
|
|
27
27
|
var idCounter = 1;
|
|
28
28
|
export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
29
|
-
_inherits(EditableInput, _ref);
|
|
30
29
|
function EditableInput(props) {
|
|
31
30
|
var _this;
|
|
32
31
|
_classCallCheck(this, EditableInput);
|
|
33
32
|
_this = _callSuper(this, EditableInput);
|
|
34
|
-
_defineProperty(
|
|
33
|
+
_defineProperty(_this, "handleBlur", function () {
|
|
35
34
|
if (_this.state.blurValue) {
|
|
36
35
|
_this.setState({
|
|
37
36
|
value: _this.state.blurValue,
|
|
@@ -39,10 +38,10 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
40
|
});
|
|
42
|
-
_defineProperty(
|
|
41
|
+
_defineProperty(_this, "handleChange", function (e) {
|
|
43
42
|
_this.setUpdatedValue(e.target.value, e);
|
|
44
43
|
});
|
|
45
|
-
_defineProperty(
|
|
44
|
+
_defineProperty(_this, "handleKeyDown", function (e) {
|
|
46
45
|
// In case `e.target.value` is a percentage remove the `%` character
|
|
47
46
|
// and update accordingly with a percentage
|
|
48
47
|
// https://github.com/casesandberg/react-color/issues/383
|
|
@@ -53,7 +52,7 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
53
52
|
_this.setUpdatedValue(updatedValue, e);
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
|
-
_defineProperty(
|
|
55
|
+
_defineProperty(_this, "handleDrag", function (e) {
|
|
57
56
|
if (_this.props.dragLabel) {
|
|
58
57
|
var newValue = Math.round(_this.props.value + e.movementX);
|
|
59
58
|
if (newValue >= 0 && newValue <= _this.props.dragMax) {
|
|
@@ -61,7 +60,7 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
62
|
});
|
|
64
|
-
_defineProperty(
|
|
63
|
+
_defineProperty(_this, "handleMouseDown", function (e) {
|
|
65
64
|
if (_this.props.dragLabel) {
|
|
66
65
|
e.preventDefault();
|
|
67
66
|
_this.handleDrag(e);
|
|
@@ -69,10 +68,10 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
69
68
|
window.addEventListener('mouseup', _this.handleMouseUp);
|
|
70
69
|
}
|
|
71
70
|
});
|
|
72
|
-
_defineProperty(
|
|
71
|
+
_defineProperty(_this, "handleMouseUp", function () {
|
|
73
72
|
_this.unbindEventListeners();
|
|
74
73
|
});
|
|
75
|
-
_defineProperty(
|
|
74
|
+
_defineProperty(_this, "unbindEventListeners", function () {
|
|
76
75
|
window.removeEventListener('mousemove', _this.handleDrag);
|
|
77
76
|
window.removeEventListener('mouseup', _this.handleMouseUp);
|
|
78
77
|
});
|
|
@@ -83,7 +82,8 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
83
82
|
_this.inputId = "rc-editable-input-".concat(idCounter++);
|
|
84
83
|
return _this;
|
|
85
84
|
}
|
|
86
|
-
|
|
85
|
+
_inherits(EditableInput, _ref);
|
|
86
|
+
return _createClass(EditableInput, [{
|
|
87
87
|
key: "componentDidUpdate",
|
|
88
88
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
89
89
|
if (this.props.value !== this.state.value && (prevProps.value !== this.props.value || prevState.value !== this.state.value)) {
|
|
@@ -167,6 +167,5 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
167
167
|
}, this.props.label) : null);
|
|
168
168
|
}
|
|
169
169
|
}]);
|
|
170
|
-
return EditableInput;
|
|
171
170
|
}(PureComponent || Component);
|
|
172
171
|
export default EditableInput;
|
|
@@ -4,20 +4,19 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
5
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
6
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
7
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
7
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
9
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
12
|
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; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
import React, { Component, PureComponent } from "react";
|
|
16
16
|
import reactCSS from "reactcss";
|
|
17
17
|
import * as hue from "../../helpers/hue";
|
|
18
18
|
import { floor, round } from "@chaoswise/utils";
|
|
19
19
|
export var Hue = /*#__PURE__*/function (_ref) {
|
|
20
|
-
_inherits(Hue, _ref);
|
|
21
20
|
function Hue() {
|
|
22
21
|
var _this;
|
|
23
22
|
_classCallCheck(this, Hue);
|
|
@@ -25,21 +24,22 @@ export var Hue = /*#__PURE__*/function (_ref) {
|
|
|
25
24
|
args[_key] = arguments[_key];
|
|
26
25
|
}
|
|
27
26
|
_this = _callSuper(this, Hue, [].concat(args));
|
|
28
|
-
_defineProperty(
|
|
27
|
+
_defineProperty(_this, "handleChange", function (e) {
|
|
29
28
|
var change = hue.calculateChange(e, _this.props.direction, _this.props.hsl, _this.container);
|
|
30
29
|
change && typeof _this.props.onChange === "function" && _this.props.onChange(change, e);
|
|
31
30
|
});
|
|
32
|
-
_defineProperty(
|
|
31
|
+
_defineProperty(_this, "handleMouseDown", function (e) {
|
|
33
32
|
_this.handleChange(e);
|
|
34
33
|
window.addEventListener("mousemove", _this.handleChange);
|
|
35
34
|
window.addEventListener("mouseup", _this.handleMouseUp);
|
|
36
35
|
});
|
|
37
|
-
_defineProperty(
|
|
36
|
+
_defineProperty(_this, "handleMouseUp", function () {
|
|
38
37
|
_this.unbindEventListeners();
|
|
39
38
|
});
|
|
40
39
|
return _this;
|
|
41
40
|
}
|
|
42
|
-
|
|
41
|
+
_inherits(Hue, _ref);
|
|
42
|
+
return _createClass(Hue, [{
|
|
43
43
|
key: "componentWillUnmount",
|
|
44
44
|
value: function componentWillUnmount() {
|
|
45
45
|
this.unbindEventListeners();
|
|
@@ -113,6 +113,5 @@ export var Hue = /*#__PURE__*/function (_ref) {
|
|
|
113
113
|
}))));
|
|
114
114
|
}
|
|
115
115
|
}]);
|
|
116
|
-
return Hue;
|
|
117
116
|
}(PureComponent || Component);
|
|
118
117
|
export default Hue;
|
|
@@ -4,34 +4,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
5
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
6
6
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
7
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
7
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
9
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10
10
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11
11
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12
12
|
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; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
14
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
15
|
import React, { Component, PureComponent } from 'react';
|
|
16
16
|
import reactCSS from 'reactcss';
|
|
17
17
|
import throttle from 'lodash/throttle';
|
|
18
18
|
import * as saturation from '../../helpers/saturation';
|
|
19
19
|
export var Saturation = /*#__PURE__*/function (_ref) {
|
|
20
|
-
_inherits(Saturation, _ref);
|
|
21
20
|
function Saturation(props) {
|
|
22
21
|
var _this;
|
|
23
22
|
_classCallCheck(this, Saturation);
|
|
24
23
|
_this = _callSuper(this, Saturation, [props]);
|
|
25
|
-
_defineProperty(
|
|
24
|
+
_defineProperty(_this, "handleChange", function (e) {
|
|
26
25
|
typeof _this.props.onChange === 'function' && _this.throttle(_this.props.onChange, saturation.calculateChange(e, _this.props.hsl, _this.container), e);
|
|
27
26
|
});
|
|
28
|
-
_defineProperty(
|
|
27
|
+
_defineProperty(_this, "handleMouseDown", function (e) {
|
|
29
28
|
_this.handleChange(e);
|
|
30
29
|
var renderWindow = _this.getContainerRenderWindow();
|
|
31
30
|
renderWindow.addEventListener('mousemove', _this.handleChange);
|
|
32
31
|
renderWindow.addEventListener('mouseup', _this.handleMouseUp);
|
|
33
32
|
});
|
|
34
|
-
_defineProperty(
|
|
33
|
+
_defineProperty(_this, "handleMouseUp", function () {
|
|
35
34
|
_this.unbindEventListeners();
|
|
36
35
|
});
|
|
37
36
|
_this.throttle = throttle(function (fn, data, e) {
|
|
@@ -39,7 +38,8 @@ export var Saturation = /*#__PURE__*/function (_ref) {
|
|
|
39
38
|
}, 50);
|
|
40
39
|
return _this;
|
|
41
40
|
}
|
|
42
|
-
|
|
41
|
+
_inherits(Saturation, _ref);
|
|
42
|
+
return _createClass(Saturation, [{
|
|
43
43
|
key: "componentWillUnmount",
|
|
44
44
|
value: function componentWillUnmount() {
|
|
45
45
|
this.throttle.cancel();
|
|
@@ -134,6 +134,5 @@ export var Saturation = /*#__PURE__*/function (_ref) {
|
|
|
134
134
|
}))));
|
|
135
135
|
}
|
|
136
136
|
}]);
|
|
137
|
-
return Saturation;
|
|
138
137
|
}(PureComponent || Component);
|
|
139
138
|
export default Saturation;
|
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
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; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import reactCSS from 'reactcss';
|
|
@@ -2,7 +2,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
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; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
@@ -5,20 +5,19 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
6
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
7
7
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
8
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
10
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11
11
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
12
12
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
13
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i :
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
16
|
/* eslint-disable no-invalid-this */
|
|
17
17
|
import React from 'react';
|
|
18
18
|
export var handleFocus = function handleFocus(Component) {
|
|
19
19
|
var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span';
|
|
20
20
|
return /*#__PURE__*/function (_React$Component) {
|
|
21
|
-
_inherits(Focus, _React$Component);
|
|
22
21
|
function Focus() {
|
|
23
22
|
var _this;
|
|
24
23
|
_classCallCheck(this, Focus);
|
|
@@ -26,22 +25,23 @@ export var handleFocus = function handleFocus(Component) {
|
|
|
26
25
|
args[_key] = arguments[_key];
|
|
27
26
|
}
|
|
28
27
|
_this = _callSuper(this, Focus, [].concat(args));
|
|
29
|
-
_defineProperty(
|
|
28
|
+
_defineProperty(_this, "state", {
|
|
30
29
|
focus: false
|
|
31
30
|
});
|
|
32
|
-
_defineProperty(
|
|
31
|
+
_defineProperty(_this, "handleFocus", function () {
|
|
33
32
|
return _this.setState({
|
|
34
33
|
focus: true
|
|
35
34
|
});
|
|
36
35
|
});
|
|
37
|
-
_defineProperty(
|
|
36
|
+
_defineProperty(_this, "handleBlur", function () {
|
|
38
37
|
return _this.setState({
|
|
39
38
|
focus: false
|
|
40
39
|
});
|
|
41
40
|
});
|
|
42
41
|
return _this;
|
|
43
42
|
}
|
|
44
|
-
|
|
43
|
+
_inherits(Focus, _React$Component);
|
|
44
|
+
return _createClass(Focus, [{
|
|
45
45
|
key: "render",
|
|
46
46
|
value: function render() {
|
|
47
47
|
return /*#__PURE__*/React.createElement(Span, {
|
|
@@ -50,6 +50,5 @@ export var handleFocus = function handleFocus(Component) {
|
|
|
50
50
|
}, /*#__PURE__*/React.createElement(Component, _extends({}, this.props, this.state)));
|
|
51
51
|
}
|
|
52
52
|
}]);
|
|
53
|
-
return Focus;
|
|
54
53
|
}(React.Component);
|
|
55
54
|
};
|