@chaoswise/ui 2.5.8 → 2.6.0
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 +6 -5
- package/lib/Ace/diff.js +7 -6
- package/lib/Ace/split.js +6 -5
- 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 +4 -3
- 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 +29 -20
- 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 +7 -6
- package/lib/CWSelect/index.js +4 -3
- package/lib/CWTable/CWTable.js +2 -2
- package/lib/CWTable/EditLine.js +1 -1
- package/lib/CWTable/FormTable.js +1 -1
- package/lib/CWTree/index.js +1 -1
- package/lib/CWTree/utils/index.js +1 -1
- package/lib/CWUpload/upload/DragList.js +1 -1
- package/lib/CWUpload/upload/Upload.js +4 -3
- package/lib/CWUpload/upload/UploadList.js +4 -3
- package/lib/Checkbox/Checkbox.js +10 -9
- package/lib/Checkbox/Group.js +12 -11
- package/lib/ColorPicker/SketchPicker/components/common/Alpha.js +9 -8
- package/lib/ColorPicker/SketchPicker/components/common/Checkboard.js +1 -1
- package/lib/ColorPicker/SketchPicker/components/common/ColorWrap.js +7 -6
- package/lib/ColorPicker/SketchPicker/components/common/EditableInput.js +12 -11
- package/lib/ColorPicker/SketchPicker/components/common/Hue.js +8 -7
- package/lib/ColorPicker/SketchPicker/components/common/Saturation.js +8 -7
- 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 +8 -7
- package/lib/ColorPicker/index.js +1 -1
- package/lib/ColorPicker/index.less +1 -1
- 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 +3 -2
- 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 +5 -3
- package/lib/ErrorBoundary/index.js +8 -7
- package/lib/FilterDropDown/DragList.js +1 -1
- package/lib/Flow/components/PluginWrapper.js +1 -1
- package/lib/Flow/layouts/callChain.js +1 -1
- package/lib/Flow/plugins/CommandLifeCycle.js +3 -2
- package/lib/Flow/plugins/InitSideBarPlugin.js +3 -2
- package/lib/Flow/plugins/InitToolBarPlugin.js +3 -2
- 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/IconSelect/components/CustomImg/index.less +5 -3
- package/lib/IconSelect/locale/en_US.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 +4 -3
- package/lib/Menu/menu/SubMenu.js +4 -3
- package/lib/Menu/menu/index.js +7 -5
- package/lib/Modal/Modal.js +9 -8
- package/lib/Modal/custom-backup/entiretyDrag.js +1 -1
- package/lib/Modal/index.js +1 -1
- package/lib/ModuleFederation/ErrorBoundary/index.js +4 -3
- 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 +9 -8
- package/lib/Radio/Radio.js +11 -10
- 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 +4 -3
- 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/Table/Table.less +6 -0
- 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/assets/Limit.js +126 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/assets/Limit.svg +50 -0
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/BottomSlider/BottomPlaceholder.js +27 -10
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/BottomSlider/index.js +4 -2
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/BottomSlider/index.less +28 -8
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/TopSlider/TopDateProcess.js +2 -6
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/TopSlider/TopPlaceholder.js +24 -4
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/components/TopSlider/index.less +31 -16
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/hooks/useMouse.js +162 -87
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/index.js +4 -6
- package/lib/TimeRangeSlider/TimeRangeSliderCmp/utils/index.js +29 -1
- package/lib/TimeRangeSlider/index.js +89 -12
- package/lib/TimeRangeSlider/index.less +4 -2
- package/lib/TimeRangeSlider/locale/en_US.js +2 -0
- package/lib/TimeRangeSlider/locale/zh_CN.js +2 -0
- package/lib/TimeRangeSlider/locale/zh_TW.js +2 -0
- package/lib/TimeRangeSlider/utils/index.js +26 -1
- package/lib/TooltipText/index.less +1 -0
- 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 +3 -2
- package/lib/portalNoticeManager/usePortalDispatchNotice.js +1 -1
- package/lib/useLocale/index.js +1 -1
- package/package.json +2 -3
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; }
|
|
18
17
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
18
|
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 : i
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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,11 +31,12 @@ 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);
|
|
34
35
|
function CheckboxGroup(_props) {
|
|
35
36
|
var _this;
|
|
36
37
|
_classCallCheck(this, CheckboxGroup);
|
|
37
38
|
_this = _callSuper(this, CheckboxGroup, [_props]);
|
|
38
|
-
_defineProperty(_this, "cancelValue", function (value) {
|
|
39
|
+
_defineProperty(_assertThisInitialized(_this), "cancelValue", function (value) {
|
|
39
40
|
_this.setState(function (_ref) {
|
|
40
41
|
var registeredValues = _ref.registeredValues;
|
|
41
42
|
return {
|
|
@@ -45,7 +46,7 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
45
46
|
};
|
|
46
47
|
});
|
|
47
48
|
});
|
|
48
|
-
_defineProperty(_this, "registerValue", function (value) {
|
|
49
|
+
_defineProperty(_assertThisInitialized(_this), "registerValue", function (value) {
|
|
49
50
|
_this.setState(function (_ref2) {
|
|
50
51
|
var registeredValues = _ref2.registeredValues;
|
|
51
52
|
return {
|
|
@@ -53,7 +54,7 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
53
54
|
};
|
|
54
55
|
});
|
|
55
56
|
});
|
|
56
|
-
_defineProperty(_this, "toggleOption", function (option) {
|
|
57
|
+
_defineProperty(_assertThisInitialized(_this), "toggleOption", function (option) {
|
|
57
58
|
var registeredValues = _this.state.registeredValues;
|
|
58
59
|
var optionIndex = _this.state.value.indexOf(option.value);
|
|
59
60
|
var value = _toConsumableArray(_this.state.value);
|
|
@@ -83,11 +84,11 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
83
84
|
}));
|
|
84
85
|
}
|
|
85
86
|
});
|
|
86
|
-
_defineProperty(_this, "renderGroup", function (_ref3) {
|
|
87
|
+
_defineProperty(_assertThisInitialized(_this), "renderGroup", function (_ref3) {
|
|
87
88
|
var getPrefixCls = _ref3.getPrefixCls;
|
|
88
|
-
var
|
|
89
|
-
props =
|
|
90
|
-
state =
|
|
89
|
+
var _assertThisInitialize = _assertThisInitialized(_this),
|
|
90
|
+
props = _assertThisInitialize.props,
|
|
91
|
+
state = _assertThisInitialize.state;
|
|
91
92
|
var customizePrefixCls = props.prefixCls,
|
|
92
93
|
className = props.className,
|
|
93
94
|
style = props.style,
|
|
@@ -127,8 +128,7 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
127
128
|
};
|
|
128
129
|
return _this;
|
|
129
130
|
}
|
|
130
|
-
|
|
131
|
-
return _createClass(CheckboxGroup, [{
|
|
131
|
+
_createClass(CheckboxGroup, [{
|
|
132
132
|
key: "getChildContext",
|
|
133
133
|
value: function getChildContext() {
|
|
134
134
|
return {
|
|
@@ -177,6 +177,7 @@ var CheckboxGroup = /*#__PURE__*/function (_Component) {
|
|
|
177
177
|
return null;
|
|
178
178
|
}
|
|
179
179
|
}]);
|
|
180
|
+
return CheckboxGroup;
|
|
180
181
|
}(Component);
|
|
181
182
|
CheckboxGroup.defaultProps = {
|
|
182
183
|
options: []
|
|
@@ -6,19 +6,20 @@ 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; }
|
|
10
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
10
|
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 : i
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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);
|
|
22
23
|
function Alpha() {
|
|
23
24
|
var _this;
|
|
24
25
|
_classCallCheck(this, Alpha);
|
|
@@ -26,26 +27,25 @@ export var Alpha = /*#__PURE__*/function (_ref) {
|
|
|
26
27
|
args[_key] = arguments[_key];
|
|
27
28
|
}
|
|
28
29
|
_this = _callSuper(this, Alpha, [].concat(args));
|
|
29
|
-
_defineProperty(_this, "handleChange", function (e) {
|
|
30
|
+
_defineProperty(_assertThisInitialized(_this), "handleChange", function (e) {
|
|
30
31
|
var change = alpha.calculateChange(e, _this.props.hsl, _this.props.direction, _this.props.a, _this.container);
|
|
31
32
|
change && typeof _this.props.onChange === 'function' && _this.props.onChange(change, e);
|
|
32
33
|
});
|
|
33
|
-
_defineProperty(_this, "handleMouseDown", function (e) {
|
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseDown", function (e) {
|
|
34
35
|
_this.handleChange(e);
|
|
35
36
|
window.addEventListener('mousemove', _this.handleChange);
|
|
36
37
|
window.addEventListener('mouseup', _this.handleMouseUp);
|
|
37
38
|
});
|
|
38
|
-
_defineProperty(_this, "handleMouseUp", function () {
|
|
39
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseUp", function () {
|
|
39
40
|
_this.unbindEventListeners();
|
|
40
41
|
});
|
|
41
|
-
_defineProperty(_this, "unbindEventListeners", function () {
|
|
42
|
+
_defineProperty(_assertThisInitialized(_this), "unbindEventListeners", function () {
|
|
42
43
|
window.removeEventListener('mousemove', _this.handleChange);
|
|
43
44
|
window.removeEventListener('mouseup', _this.handleMouseUp);
|
|
44
45
|
});
|
|
45
46
|
return _this;
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
return _createClass(Alpha, [{
|
|
48
|
+
_createClass(Alpha, [{
|
|
49
49
|
key: "componentWillUnmount",
|
|
50
50
|
value: function componentWillUnmount() {
|
|
51
51
|
this.unbindEventListeners();
|
|
@@ -128,5 +128,6 @@ export var Alpha = /*#__PURE__*/function (_ref) {
|
|
|
128
128
|
}))));
|
|
129
129
|
}
|
|
130
130
|
}]);
|
|
131
|
+
return Alpha;
|
|
131
132
|
}(PureComponent || Component);
|
|
132
133
|
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 : i
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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,19 +7,20 @@ 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; }
|
|
11
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
11
|
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 : i
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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);
|
|
23
24
|
function ColorPicker(props) {
|
|
24
25
|
var _this;
|
|
25
26
|
_classCallCheck(this, ColorPicker);
|
|
@@ -29,7 +30,7 @@ export var ColorWrap = function ColorWrap(Picker) {
|
|
|
29
30
|
// ...color.toState(nextProps.color, state.oldHue),
|
|
30
31
|
// }
|
|
31
32
|
// }
|
|
32
|
-
_defineProperty(_this, "handleChange", function (data, event) {
|
|
33
|
+
_defineProperty(_assertThisInitialized(_this), "handleChange", function (data, event) {
|
|
33
34
|
var isValidColor = color.simpleCheckForValidColor(data);
|
|
34
35
|
if (isValidColor) {
|
|
35
36
|
var colors = color.toState(data, data.h || _this.state.oldHue);
|
|
@@ -38,7 +39,7 @@ export var ColorWrap = function ColorWrap(Picker) {
|
|
|
38
39
|
_this.props.onChange && _this.props.onChange(colors, event);
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
|
-
_defineProperty(_this, "handleSwatchHover", function (data, event) {
|
|
42
|
+
_defineProperty(_assertThisInitialized(_this), "handleSwatchHover", function (data, event) {
|
|
42
43
|
var isValidColor = color.simpleCheckForValidColor(data);
|
|
43
44
|
if (isValidColor) {
|
|
44
45
|
var colors = color.toState(data, data.h || _this.state.oldHue);
|
|
@@ -51,8 +52,7 @@ export var ColorWrap = function ColorWrap(Picker) {
|
|
|
51
52
|
}, 100);
|
|
52
53
|
return _this;
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
-
return _createClass(ColorPicker, [{
|
|
55
|
+
_createClass(ColorPicker, [{
|
|
56
56
|
key: "render",
|
|
57
57
|
value: function render() {
|
|
58
58
|
var optionalEvents = {};
|
|
@@ -64,6 +64,7 @@ export var ColorWrap = function ColorWrap(Picker) {
|
|
|
64
64
|
}, optionalEvents));
|
|
65
65
|
}
|
|
66
66
|
}]);
|
|
67
|
+
return ColorPicker;
|
|
67
68
|
}(PureComponent || Component);
|
|
68
69
|
ColorPicker.propTypes = _objectSpread({}, Picker.propTypes);
|
|
69
70
|
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; }
|
|
8
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
8
|
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 : i
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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,11 +26,12 @@ var getNumberValue = function getNumberValue(value) {
|
|
|
26
26
|
};
|
|
27
27
|
var idCounter = 1;
|
|
28
28
|
export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
29
|
+
_inherits(EditableInput, _ref);
|
|
29
30
|
function EditableInput(props) {
|
|
30
31
|
var _this;
|
|
31
32
|
_classCallCheck(this, EditableInput);
|
|
32
33
|
_this = _callSuper(this, EditableInput);
|
|
33
|
-
_defineProperty(_this, "handleBlur", function () {
|
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "handleBlur", function () {
|
|
34
35
|
if (_this.state.blurValue) {
|
|
35
36
|
_this.setState({
|
|
36
37
|
value: _this.state.blurValue,
|
|
@@ -38,10 +39,10 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
|
-
_defineProperty(_this, "handleChange", function (e) {
|
|
42
|
+
_defineProperty(_assertThisInitialized(_this), "handleChange", function (e) {
|
|
42
43
|
_this.setUpdatedValue(e.target.value, e);
|
|
43
44
|
});
|
|
44
|
-
_defineProperty(_this, "handleKeyDown", function (e) {
|
|
45
|
+
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (e) {
|
|
45
46
|
// In case `e.target.value` is a percentage remove the `%` character
|
|
46
47
|
// and update accordingly with a percentage
|
|
47
48
|
// https://github.com/casesandberg/react-color/issues/383
|
|
@@ -52,7 +53,7 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
52
53
|
_this.setUpdatedValue(updatedValue, e);
|
|
53
54
|
}
|
|
54
55
|
});
|
|
55
|
-
_defineProperty(_this, "handleDrag", function (e) {
|
|
56
|
+
_defineProperty(_assertThisInitialized(_this), "handleDrag", function (e) {
|
|
56
57
|
if (_this.props.dragLabel) {
|
|
57
58
|
var newValue = Math.round(_this.props.value + e.movementX);
|
|
58
59
|
if (newValue >= 0 && newValue <= _this.props.dragMax) {
|
|
@@ -60,7 +61,7 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
});
|
|
63
|
-
_defineProperty(_this, "handleMouseDown", function (e) {
|
|
64
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseDown", function (e) {
|
|
64
65
|
if (_this.props.dragLabel) {
|
|
65
66
|
e.preventDefault();
|
|
66
67
|
_this.handleDrag(e);
|
|
@@ -68,10 +69,10 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
68
69
|
window.addEventListener('mouseup', _this.handleMouseUp);
|
|
69
70
|
}
|
|
70
71
|
});
|
|
71
|
-
_defineProperty(_this, "handleMouseUp", function () {
|
|
72
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseUp", function () {
|
|
72
73
|
_this.unbindEventListeners();
|
|
73
74
|
});
|
|
74
|
-
_defineProperty(_this, "unbindEventListeners", function () {
|
|
75
|
+
_defineProperty(_assertThisInitialized(_this), "unbindEventListeners", function () {
|
|
75
76
|
window.removeEventListener('mousemove', _this.handleDrag);
|
|
76
77
|
window.removeEventListener('mouseup', _this.handleMouseUp);
|
|
77
78
|
});
|
|
@@ -82,8 +83,7 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
82
83
|
_this.inputId = "rc-editable-input-".concat(idCounter++);
|
|
83
84
|
return _this;
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
-
return _createClass(EditableInput, [{
|
|
86
|
+
_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,5 +167,6 @@ export var EditableInput = /*#__PURE__*/function (_ref) {
|
|
|
167
167
|
}, this.props.label) : null);
|
|
168
168
|
}
|
|
169
169
|
}]);
|
|
170
|
+
return EditableInput;
|
|
170
171
|
}(PureComponent || Component);
|
|
171
172
|
export default EditableInput;
|
|
@@ -4,19 +4,20 @@ 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; }
|
|
8
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
8
|
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 : i
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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);
|
|
20
21
|
function Hue() {
|
|
21
22
|
var _this;
|
|
22
23
|
_classCallCheck(this, Hue);
|
|
@@ -24,22 +25,21 @@ export var Hue = /*#__PURE__*/function (_ref) {
|
|
|
24
25
|
args[_key] = arguments[_key];
|
|
25
26
|
}
|
|
26
27
|
_this = _callSuper(this, Hue, [].concat(args));
|
|
27
|
-
_defineProperty(_this, "handleChange", function (e) {
|
|
28
|
+
_defineProperty(_assertThisInitialized(_this), "handleChange", function (e) {
|
|
28
29
|
var change = hue.calculateChange(e, _this.props.direction, _this.props.hsl, _this.container);
|
|
29
30
|
change && typeof _this.props.onChange === "function" && _this.props.onChange(change, e);
|
|
30
31
|
});
|
|
31
|
-
_defineProperty(_this, "handleMouseDown", function (e) {
|
|
32
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseDown", function (e) {
|
|
32
33
|
_this.handleChange(e);
|
|
33
34
|
window.addEventListener("mousemove", _this.handleChange);
|
|
34
35
|
window.addEventListener("mouseup", _this.handleMouseUp);
|
|
35
36
|
});
|
|
36
|
-
_defineProperty(_this, "handleMouseUp", function () {
|
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseUp", function () {
|
|
37
38
|
_this.unbindEventListeners();
|
|
38
39
|
});
|
|
39
40
|
return _this;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
return _createClass(Hue, [{
|
|
42
|
+
_createClass(Hue, [{
|
|
43
43
|
key: "componentWillUnmount",
|
|
44
44
|
value: function componentWillUnmount() {
|
|
45
45
|
this.unbindEventListeners();
|
|
@@ -113,5 +113,6 @@ export var Hue = /*#__PURE__*/function (_ref) {
|
|
|
113
113
|
}))));
|
|
114
114
|
}
|
|
115
115
|
}]);
|
|
116
|
+
return Hue;
|
|
116
117
|
}(PureComponent || Component);
|
|
117
118
|
export default Hue;
|
|
@@ -4,33 +4,34 @@ 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; }
|
|
8
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
8
|
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 : i
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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);
|
|
20
21
|
function Saturation(props) {
|
|
21
22
|
var _this;
|
|
22
23
|
_classCallCheck(this, Saturation);
|
|
23
24
|
_this = _callSuper(this, Saturation, [props]);
|
|
24
|
-
_defineProperty(_this, "handleChange", function (e) {
|
|
25
|
+
_defineProperty(_assertThisInitialized(_this), "handleChange", function (e) {
|
|
25
26
|
typeof _this.props.onChange === 'function' && _this.throttle(_this.props.onChange, saturation.calculateChange(e, _this.props.hsl, _this.container), e);
|
|
26
27
|
});
|
|
27
|
-
_defineProperty(_this, "handleMouseDown", function (e) {
|
|
28
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseDown", function (e) {
|
|
28
29
|
_this.handleChange(e);
|
|
29
30
|
var renderWindow = _this.getContainerRenderWindow();
|
|
30
31
|
renderWindow.addEventListener('mousemove', _this.handleChange);
|
|
31
32
|
renderWindow.addEventListener('mouseup', _this.handleMouseUp);
|
|
32
33
|
});
|
|
33
|
-
_defineProperty(_this, "handleMouseUp", function () {
|
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "handleMouseUp", function () {
|
|
34
35
|
_this.unbindEventListeners();
|
|
35
36
|
});
|
|
36
37
|
_this.throttle = throttle(function (fn, data, e) {
|
|
@@ -38,8 +39,7 @@ export var Saturation = /*#__PURE__*/function (_ref) {
|
|
|
38
39
|
}, 50);
|
|
39
40
|
return _this;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
-
return _createClass(Saturation, [{
|
|
42
|
+
_createClass(Saturation, [{
|
|
43
43
|
key: "componentWillUnmount",
|
|
44
44
|
value: function componentWillUnmount() {
|
|
45
45
|
this.throttle.cancel();
|
|
@@ -134,5 +134,6 @@ export var Saturation = /*#__PURE__*/function (_ref) {
|
|
|
134
134
|
}))));
|
|
135
135
|
}
|
|
136
136
|
}]);
|
|
137
|
+
return Saturation;
|
|
137
138
|
}(PureComponent || Component);
|
|
138
139
|
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 : i
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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 : i
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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,19 +5,20 @@ 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; }
|
|
9
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
9
|
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 : i
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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);
|
|
21
22
|
function Focus() {
|
|
22
23
|
var _this;
|
|
23
24
|
_classCallCheck(this, Focus);
|
|
@@ -25,23 +26,22 @@ export var handleFocus = function handleFocus(Component) {
|
|
|
25
26
|
args[_key] = arguments[_key];
|
|
26
27
|
}
|
|
27
28
|
_this = _callSuper(this, Focus, [].concat(args));
|
|
28
|
-
_defineProperty(_this, "state", {
|
|
29
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
29
30
|
focus: false
|
|
30
31
|
});
|
|
31
|
-
_defineProperty(_this, "handleFocus", function () {
|
|
32
|
+
_defineProperty(_assertThisInitialized(_this), "handleFocus", function () {
|
|
32
33
|
return _this.setState({
|
|
33
34
|
focus: true
|
|
34
35
|
});
|
|
35
36
|
});
|
|
36
|
-
_defineProperty(_this, "handleBlur", function () {
|
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "handleBlur", function () {
|
|
37
38
|
return _this.setState({
|
|
38
39
|
focus: false
|
|
39
40
|
});
|
|
40
41
|
});
|
|
41
42
|
return _this;
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
return _createClass(Focus, [{
|
|
44
|
+
_createClass(Focus, [{
|
|
45
45
|
key: "render",
|
|
46
46
|
value: function render() {
|
|
47
47
|
return /*#__PURE__*/React.createElement(Span, {
|
|
@@ -50,5 +50,6 @@ export var handleFocus = function handleFocus(Component) {
|
|
|
50
50
|
}, /*#__PURE__*/React.createElement(Component, _extends({}, this.props, this.state)));
|
|
51
51
|
}
|
|
52
52
|
}]);
|
|
53
|
+
return Focus;
|
|
53
54
|
}(React.Component);
|
|
54
55
|
};
|
package/lib/ColorPicker/index.js
CHANGED
|
@@ -13,7 +13,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
13
13
|
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; }
|
|
14
14
|
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; }
|
|
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 : i
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(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
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
19
19
|
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."); }
|
|
@@ -6,7 +6,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
8
8
|
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; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
10
|
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); }
|
|
11
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
12
|
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."); }
|
|
@@ -6,7 +6,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
8
8
|
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; }
|
|
9
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
10
|
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); }
|
|
11
11
|
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; }
|
|
12
12
|
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; }
|
|
@@ -5,7 +5,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
7
|
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; }
|
|
8
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
9
9
|
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); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import moment from 'moment';
|
|
@@ -4,7 +4,7 @@ import _Anchor from "antd/es/anchor";
|
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
5
|
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); } }
|
|
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
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
8
|
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); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { last } from 'lodash-es';
|
|
@@ -21,7 +21,7 @@ var Tocify = /*#__PURE__*/function () {
|
|
|
21
21
|
this.anchors = [];
|
|
22
22
|
this.tocItems = [];
|
|
23
23
|
}
|
|
24
|
-
|
|
24
|
+
_createClass(Tocify, [{
|
|
25
25
|
key: "add",
|
|
26
26
|
value: function add(text, level) {
|
|
27
27
|
var id = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
@@ -93,5 +93,6 @@ var Tocify = /*#__PURE__*/function () {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}]);
|
|
96
|
+
return Tocify;
|
|
96
97
|
}();
|
|
97
98
|
export { Tocify as default };
|
|
@@ -4,7 +4,7 @@ import _AbreastLayout from "@chaoswise/ui/lib/AbreastLayout";
|
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
8
|
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); }
|
|
9
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
10
|
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."); }
|