@douyinfe/semi-ui 2.8.0-beta.0 → 2.9.0-beta.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/_base/_story/index.scss +0 -1
- package/badge/index.tsx +12 -3
- package/descriptions/index.tsx +4 -5
- package/descriptions/item.tsx +1 -1
- package/dist/css/semi.css +63 -16
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +231 -53
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/divider/__test__/divider.test.js +72 -0
- package/divider/_story/Demo.tsx +16 -0
- package/divider/_story/divider.stories.js +41 -0
- package/divider/_story/divider.stories.tsx +8 -0
- package/divider/index.tsx +72 -0
- package/form/_story/demo.jsx +9 -0
- package/index.ts +1 -0
- package/lib/cjs/badge/index.d.ts +9 -0
- package/lib/cjs/badge/index.js +34 -6
- package/lib/cjs/descriptions/index.d.ts +1 -2
- package/lib/cjs/descriptions/index.js +4 -3
- package/lib/cjs/descriptions/item.d.ts +1 -1
- package/lib/cjs/divider/index.d.ts +20 -0
- package/lib/cjs/divider/index.js +88 -0
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +9 -0
- package/lib/cjs/slider/index.js +16 -12
- package/lib/cjs/tagInput/index.d.ts +1 -1
- package/lib/es/badge/index.d.ts +9 -0
- package/lib/es/badge/index.js +31 -6
- package/lib/es/descriptions/index.d.ts +1 -2
- package/lib/es/descriptions/index.js +4 -3
- package/lib/es/descriptions/item.d.ts +1 -1
- package/lib/es/divider/index.d.ts +20 -0
- package/lib/es/divider/index.js +68 -0
- package/lib/es/index.d.ts +1 -0
- package/lib/es/index.js +1 -0
- package/lib/es/slider/index.js +16 -12
- package/lib/es/tagInput/index.d.ts +1 -1
- package/package.json +11 -11
- package/select/__test__/select.test.js +16 -0
- package/slider/_story/slider.stories.js +28 -6
- package/slider/index.tsx +16 -11
- package/upload/_story/upload.stories.js +2 -3
package/dist/umd/semi-ui.js
CHANGED
|
@@ -5478,7 +5478,7 @@ const fillInChunks = _ref3 => {
|
|
|
5478
5478
|
|
|
5479
5479
|
const findAll = _ref4 => {
|
|
5480
5480
|
let {
|
|
5481
|
-
autoEscape,
|
|
5481
|
+
autoEscape = true,
|
|
5482
5482
|
caseSensitive = false,
|
|
5483
5483
|
searchWords,
|
|
5484
5484
|
sourceString
|
|
@@ -8995,6 +8995,13 @@ module.exports = stackHas;
|
|
|
8995
8995
|
|
|
8996
8996
|
module.exports = __webpack_require__("pb5m");
|
|
8997
8997
|
|
|
8998
|
+
/***/ }),
|
|
8999
|
+
|
|
9000
|
+
/***/ "LDNj":
|
|
9001
|
+
/***/ (function(module, exports) {
|
|
9002
|
+
|
|
9003
|
+
|
|
9004
|
+
|
|
8998
9005
|
/***/ }),
|
|
8999
9006
|
|
|
9000
9007
|
/***/ "LF7m":
|
|
@@ -22829,6 +22836,7 @@ __webpack_require__.d(__webpack_exports__, "Collapsible", function() { return /*
|
|
|
22829
22836
|
__webpack_require__.d(__webpack_exports__, "ConfigProvider", function() { return /* reexport */ configProvider_ConfigProvider; });
|
|
22830
22837
|
__webpack_require__.d(__webpack_exports__, "DatePicker", function() { return /* reexport */ datePicker_0; });
|
|
22831
22838
|
__webpack_require__.d(__webpack_exports__, "Descriptions", function() { return /* reexport */ descriptions_0; });
|
|
22839
|
+
__webpack_require__.d(__webpack_exports__, "Divider", function() { return /* reexport */ divider_0; });
|
|
22832
22840
|
__webpack_require__.d(__webpack_exports__, "Empty", function() { return /* reexport */ empty_Empty; });
|
|
22833
22841
|
__webpack_require__.d(__webpack_exports__, "Modal", function() { return /* reexport */ modal_0; });
|
|
22834
22842
|
__webpack_require__.d(__webpack_exports__, "Dropdown", function() { return /* reexport */ dropdown_0; });
|
|
@@ -35752,6 +35760,22 @@ var badge = __webpack_require__("rU3k");
|
|
|
35752
35760
|
|
|
35753
35761
|
|
|
35754
35762
|
|
|
35763
|
+
var badge_rest = undefined && undefined.__rest || function (s, e) {
|
|
35764
|
+
var t = {};
|
|
35765
|
+
|
|
35766
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && index_of_default()(e).call(e, p) < 0) t[p] = s[p];
|
|
35767
|
+
|
|
35768
|
+
if (s != null && typeof get_own_property_symbols_default.a === "function") for (var i = 0, p = get_own_property_symbols_default()(s); i < p.length; i++) {
|
|
35769
|
+
if (index_of_default()(e).call(e, p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
35770
|
+
}
|
|
35771
|
+
return t;
|
|
35772
|
+
};
|
|
35773
|
+
|
|
35774
|
+
|
|
35775
|
+
|
|
35776
|
+
|
|
35777
|
+
|
|
35778
|
+
|
|
35755
35779
|
|
|
35756
35780
|
const badge_prefixCls = badge_constants_cssClasses.PREFIX;
|
|
35757
35781
|
class badge_Badge extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
|
|
@@ -35764,7 +35788,8 @@ class badge_Badge extends external_root_React_commonjs2_react_commonjs_react_amd
|
|
|
35764
35788
|
|
|
35765
35789
|
const defaultPosition = direction === 'rtl' ? 'leftTop' : 'rightTop'; // eslint-disable-next-line max-len
|
|
35766
35790
|
|
|
35767
|
-
const
|
|
35791
|
+
const _a = this.props,
|
|
35792
|
+
{
|
|
35768
35793
|
count,
|
|
35769
35794
|
dot,
|
|
35770
35795
|
type,
|
|
@@ -35774,7 +35799,9 @@ class badge_Badge extends external_root_React_commonjs2_react_commonjs_react_amd
|
|
|
35774
35799
|
style,
|
|
35775
35800
|
children,
|
|
35776
35801
|
className
|
|
35777
|
-
} =
|
|
35802
|
+
} = _a,
|
|
35803
|
+
rest = badge_rest(_a, ["count", "dot", "type", "theme", "position", "overflowCount", "style", "children", "className"]);
|
|
35804
|
+
|
|
35778
35805
|
const custom = count && !(isNumber_default()(count) || isString_default()(count));
|
|
35779
35806
|
const showBadge = count !== null && typeof count !== 'undefined';
|
|
35780
35807
|
const wrapper = classnames_default()(className, {
|
|
@@ -35794,9 +35821,9 @@ class badge_Badge extends external_root_React_commonjs2_react_commonjs_react_amd
|
|
|
35794
35821
|
content = count;
|
|
35795
35822
|
}
|
|
35796
35823
|
|
|
35797
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
35824
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", assign_default()({
|
|
35798
35825
|
className: badge_prefixCls
|
|
35799
|
-
}, children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
35826
|
+
}, rest), children, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
35800
35827
|
className: wrapper,
|
|
35801
35828
|
style: style
|
|
35802
35829
|
}, dot ? null : content));
|
|
@@ -35813,13 +35840,19 @@ badge_Badge.propTypes = {
|
|
|
35813
35840
|
overflowCount: prop_types_default.a.number,
|
|
35814
35841
|
style: prop_types_default.a.object,
|
|
35815
35842
|
className: prop_types_default.a.string,
|
|
35816
|
-
children: prop_types_default.a.node
|
|
35843
|
+
children: prop_types_default.a.node,
|
|
35844
|
+
onClick: prop_types_default.a.func,
|
|
35845
|
+
onMouseEnter: prop_types_default.a.func,
|
|
35846
|
+
onMouseLeave: prop_types_default.a.func
|
|
35817
35847
|
};
|
|
35818
35848
|
badge_Badge.defaultProps = {
|
|
35819
35849
|
dot: false,
|
|
35820
35850
|
type: 'primary',
|
|
35821
35851
|
theme: 'solid',
|
|
35822
|
-
className: ''
|
|
35852
|
+
className: '',
|
|
35853
|
+
onClick: () => noop_default.a,
|
|
35854
|
+
onMouseEnter: () => noop_default.a,
|
|
35855
|
+
onMouseLeave: () => noop_default.a
|
|
35823
35856
|
};
|
|
35824
35857
|
// CONCATENATED MODULE: ../semi-foundation/banner/constants.ts
|
|
35825
35858
|
|
|
@@ -44064,7 +44097,7 @@ const cascader_constants_cssClasses = {
|
|
|
44064
44097
|
};
|
|
44065
44098
|
const cascader_constants_strings = {
|
|
44066
44099
|
SIZE_SET: ['small', 'large', 'default'],
|
|
44067
|
-
VALIDATE_STATUS: ['default', 'error', 'warning'],
|
|
44100
|
+
VALIDATE_STATUS: ['success', 'default', 'error', 'warning'],
|
|
44068
44101
|
IS_KEY: 'isKey',
|
|
44069
44102
|
IS_VALUE: 'isValue',
|
|
44070
44103
|
SHOW_NEXT_BY_CLICK: 'click',
|
|
@@ -46526,7 +46559,7 @@ const tagInput_constants_cssClasses = {
|
|
|
46526
46559
|
};
|
|
46527
46560
|
const tagInput_constants_strings = {
|
|
46528
46561
|
SIZE_SET: ['large', 'default', 'small'],
|
|
46529
|
-
STATUS: ["default", "error", "warning"]
|
|
46562
|
+
STATUS: ["success", "default", "error", "warning"]
|
|
46530
46563
|
};
|
|
46531
46564
|
|
|
46532
46565
|
// EXTERNAL MODULE: ../semi-foundation/tagInput/tagInput.scss
|
|
@@ -61592,10 +61625,11 @@ class descriptions_Descriptions extends external_root_React_commonjs2_react_comm
|
|
|
61592
61625
|
["".concat(descriptions_prefixCls, "-double")]: row,
|
|
61593
61626
|
[concat_default()(_context2 = "".concat(descriptions_prefixCls, "-double-")).call(_context2, size)]: row
|
|
61594
61627
|
});
|
|
61595
|
-
const childrenList = data && data.length ? map_default()(data).call(data, item => isPlainObject_default()(item) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(descriptions_item_Item, assign_default()({
|
|
61596
|
-
key: item.key,
|
|
61628
|
+
const childrenList = data && data.length ? map_default()(data).call(data, (item, index) => isPlainObject_default()(item) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(descriptions_item_Item, assign_default()({
|
|
61597
61629
|
itemKey: item.key
|
|
61598
|
-
}, item
|
|
61630
|
+
}, item, {
|
|
61631
|
+
key: index
|
|
61632
|
+
}), item.value) : null) : children;
|
|
61599
61633
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
61600
61634
|
className: classNames,
|
|
61601
61635
|
style: style
|
|
@@ -61631,6 +61665,87 @@ descriptions_Descriptions.defaultProps = {
|
|
|
61631
61665
|
data: []
|
|
61632
61666
|
};
|
|
61633
61667
|
/* harmony default export */ var descriptions_0 = (descriptions_Descriptions);
|
|
61668
|
+
// CONCATENATED MODULE: ../semi-foundation/divider/constants.ts
|
|
61669
|
+
|
|
61670
|
+
const divider_constants_cssClasses = {
|
|
61671
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX)
|
|
61672
|
+
};
|
|
61673
|
+
const divider_constants_strings = {
|
|
61674
|
+
LAYOUT: ['vertical', 'horizontal']
|
|
61675
|
+
};
|
|
61676
|
+
|
|
61677
|
+
// EXTERNAL MODULE: ../semi-foundation/divider/divider.scss
|
|
61678
|
+
var divider = __webpack_require__("LDNj");
|
|
61679
|
+
|
|
61680
|
+
// CONCATENATED MODULE: ./divider/index.tsx
|
|
61681
|
+
|
|
61682
|
+
|
|
61683
|
+
|
|
61684
|
+
|
|
61685
|
+
|
|
61686
|
+
var divider_rest = undefined && undefined.__rest || function (s, e) {
|
|
61687
|
+
var t = {};
|
|
61688
|
+
|
|
61689
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && index_of_default()(e).call(e, p) < 0) t[p] = s[p];
|
|
61690
|
+
|
|
61691
|
+
if (s != null && typeof get_own_property_symbols_default.a === "function") for (var i = 0, p = get_own_property_symbols_default()(s); i < p.length; i++) {
|
|
61692
|
+
if (index_of_default()(e).call(e, p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
61693
|
+
}
|
|
61694
|
+
return t;
|
|
61695
|
+
};
|
|
61696
|
+
|
|
61697
|
+
|
|
61698
|
+
|
|
61699
|
+
|
|
61700
|
+
|
|
61701
|
+
const divider_prefixCls = divider_constants_cssClasses.PREFIX;
|
|
61702
|
+
|
|
61703
|
+
const Divider = props => {
|
|
61704
|
+
var _context;
|
|
61705
|
+
|
|
61706
|
+
const {
|
|
61707
|
+
layout = 'horizontal',
|
|
61708
|
+
dashed,
|
|
61709
|
+
align = 'center',
|
|
61710
|
+
className,
|
|
61711
|
+
margin,
|
|
61712
|
+
style,
|
|
61713
|
+
children
|
|
61714
|
+
} = props,
|
|
61715
|
+
rest = divider_rest(props, ["layout", "dashed", "align", "className", "margin", "style", "children"]);
|
|
61716
|
+
|
|
61717
|
+
const dividerClassNames = classnames_default()("".concat(divider_prefixCls, "-divider"), className, {
|
|
61718
|
+
["".concat(divider_prefixCls, "-divider-horizontal")]: layout === 'horizontal',
|
|
61719
|
+
["".concat(divider_prefixCls, "-divider-vertical")]: layout === 'vertical',
|
|
61720
|
+
["".concat(divider_prefixCls, "-divider-dashed")]: !!dashed,
|
|
61721
|
+
["".concat(divider_prefixCls, "-divider-with-text")]: children && layout === 'horizontal',
|
|
61722
|
+
[concat_default()(_context = "".concat(divider_prefixCls, "-divider-with-text-")).call(_context, align)]: children && layout === 'horizontal'
|
|
61723
|
+
});
|
|
61724
|
+
let overrideDefaultStyle = {};
|
|
61725
|
+
|
|
61726
|
+
if (margin !== undefined) {
|
|
61727
|
+
if (layout === 'vertical') {
|
|
61728
|
+
overrideDefaultStyle = {
|
|
61729
|
+
'marginLeft': margin,
|
|
61730
|
+
'marginRight': margin
|
|
61731
|
+
};
|
|
61732
|
+
} else if (layout === 'horizontal') {
|
|
61733
|
+
overrideDefaultStyle = {
|
|
61734
|
+
'marginTop': margin,
|
|
61735
|
+
'marginBottom': margin
|
|
61736
|
+
};
|
|
61737
|
+
}
|
|
61738
|
+
}
|
|
61739
|
+
|
|
61740
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({}, rest, {
|
|
61741
|
+
className: dividerClassNames,
|
|
61742
|
+
style: assign_default()(assign_default()({}, overrideDefaultStyle), style)
|
|
61743
|
+
}), children && layout === 'horizontal' ? typeof children === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
61744
|
+
className: "".concat(divider_prefixCls, "-divider_inner-text")
|
|
61745
|
+
}, children) : children : null);
|
|
61746
|
+
};
|
|
61747
|
+
|
|
61748
|
+
/* harmony default export */ var divider_0 = (Divider);
|
|
61634
61749
|
// CONCATENATED MODULE: ../semi-foundation/empty/constants.ts
|
|
61635
61750
|
|
|
61636
61751
|
const empty_constants_cssClasses = {
|
|
@@ -78941,6 +79056,16 @@ class foundation_SliderFoundation extends foundation {
|
|
|
78941
79056
|
};
|
|
78942
79057
|
|
|
78943
79058
|
this.checkAndUpdateIsInRenderTreeState = () => this._adapter.checkAndUpdateIsInRenderTreeState();
|
|
79059
|
+
|
|
79060
|
+
this.calculateOutputValue = (position, isMin) => {
|
|
79061
|
+
const moveValue = this.transPosToValue(position, isMin);
|
|
79062
|
+
|
|
79063
|
+
if (moveValue === false) {
|
|
79064
|
+
return undefined;
|
|
79065
|
+
}
|
|
79066
|
+
|
|
79067
|
+
return this.outPutValue(moveValue);
|
|
79068
|
+
};
|
|
78944
79069
|
/**
|
|
78945
79070
|
*
|
|
78946
79071
|
*
|
|
@@ -79056,7 +79181,16 @@ class foundation_SliderFoundation extends foundation {
|
|
|
79056
79181
|
pagePos = pagePos - this._dragOffset;
|
|
79057
79182
|
|
|
79058
79183
|
if (chooseMovePos === 'min' && dragging[0] || chooseMovePos === 'max' && dragging[1]) {
|
|
79059
|
-
this.
|
|
79184
|
+
const outPutValue = this.calculateOutputValue(pagePos, chooseMovePos === 'min');
|
|
79185
|
+
|
|
79186
|
+
if (outPutValue === undefined) {
|
|
79187
|
+
return false;
|
|
79188
|
+
}
|
|
79189
|
+
|
|
79190
|
+
this._adapter.notifyChange(outPutValue); // allow drag for controlled component, so no _isControlledComponent check
|
|
79191
|
+
|
|
79192
|
+
|
|
79193
|
+
this._adapter.onHandleMove(pagePos, chooseMovePos === 'min', undefined, false, outPutValue);
|
|
79060
79194
|
}
|
|
79061
79195
|
|
|
79062
79196
|
return true;
|
|
@@ -79163,7 +79297,22 @@ class foundation_SliderFoundation extends foundation {
|
|
|
79163
79297
|
const mousePos = this.handleMousePos(e.pageX, e.pageY);
|
|
79164
79298
|
const position = vertical ? mousePos.y : mousePos.x;
|
|
79165
79299
|
const isMin = this.checkWhichHandle(position);
|
|
79166
|
-
this.
|
|
79300
|
+
const outPutValue = this.calculateOutputValue(position, isMin);
|
|
79301
|
+
|
|
79302
|
+
if (outPutValue === undefined) {
|
|
79303
|
+
return;
|
|
79304
|
+
}
|
|
79305
|
+
|
|
79306
|
+
this._adapter.notifyChange(outPutValue); // check if is controlled component
|
|
79307
|
+
|
|
79308
|
+
|
|
79309
|
+
if (this._isControlledComponent()) {
|
|
79310
|
+
// only perform callback ops, skip UI update
|
|
79311
|
+
return;
|
|
79312
|
+
} // trigger UI state update
|
|
79313
|
+
|
|
79314
|
+
|
|
79315
|
+
this.setHandlePos(position, isMin, true, outPutValue);
|
|
79167
79316
|
};
|
|
79168
79317
|
/**
|
|
79169
79318
|
* Move the slider to the current click position
|
|
@@ -79174,8 +79323,9 @@ class foundation_SliderFoundation extends foundation {
|
|
|
79174
79323
|
|
|
79175
79324
|
this.setHandlePos = function (position, isMin) {
|
|
79176
79325
|
let clickTrack = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
79326
|
+
let outPutValue = arguments.length > 3 ? arguments[3] : undefined;
|
|
79177
79327
|
|
|
79178
|
-
_this._adapter.onHandleMove(position, isMin, () => _this._adapter.onHandleUpAfter(), clickTrack);
|
|
79328
|
+
_this._adapter.onHandleMove(position, isMin, () => _this._adapter.onHandleUpAfter(), clickTrack, outPutValue);
|
|
79179
79329
|
};
|
|
79180
79330
|
/**
|
|
79181
79331
|
* Determine which slider should be moved currently
|
|
@@ -79538,7 +79688,10 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
79538
79688
|
["".concat(slider_prefixCls, "-dot-active")]: this.foundation.isMarkActive(Number(mark)) === 'active'
|
|
79539
79689
|
});
|
|
79540
79690
|
const markPercent = (Number(mark) - min) / (max - min);
|
|
79541
|
-
return activeResult ?
|
|
79691
|
+
return activeResult ?
|
|
79692
|
+
/*#__PURE__*/
|
|
79693
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
79694
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
79542
79695
|
key: mark,
|
|
79543
79696
|
onClick: e => this.foundation.handleWrapClick(e),
|
|
79544
79697
|
className: markClass,
|
|
@@ -79720,6 +79873,7 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
79720
79873
|
onHandleMove: function (mousePos, isMin) {
|
|
79721
79874
|
let stateChangeCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop_default.a;
|
|
79722
79875
|
let clickTrack = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
79876
|
+
let outPutValue = arguments.length > 4 ? arguments[4] : undefined;
|
|
79723
79877
|
|
|
79724
79878
|
const sliderDOMIsInRenderTree = _this.foundation.checkAndUpdateIsInRenderTreeState();
|
|
79725
79879
|
|
|
@@ -79728,32 +79882,32 @@ class slider_Slider extends baseComponent_BaseComponent {
|
|
|
79728
79882
|
}
|
|
79729
79883
|
|
|
79730
79884
|
const {
|
|
79731
|
-
value
|
|
79732
|
-
onChange
|
|
79885
|
+
value
|
|
79733
79886
|
} = _this.props;
|
|
79887
|
+
let finalOutPutValue = outPutValue;
|
|
79734
79888
|
|
|
79735
|
-
|
|
79889
|
+
if (finalOutPutValue === undefined) {
|
|
79890
|
+
const moveValue = _this.foundation.transPosToValue(mousePos, isMin);
|
|
79736
79891
|
|
|
79737
|
-
|
|
79738
|
-
|
|
79739
|
-
|
|
79892
|
+
if (moveValue === false) {
|
|
79893
|
+
return;
|
|
79894
|
+
}
|
|
79740
79895
|
|
|
79741
|
-
|
|
79896
|
+
finalOutPutValue = _this.foundation.outPutValue(moveValue);
|
|
79897
|
+
}
|
|
79742
79898
|
|
|
79743
79899
|
const {
|
|
79744
79900
|
currentValue
|
|
79745
79901
|
} = _this.state;
|
|
79746
79902
|
|
|
79747
|
-
if (!isEqual_default()(_this.foundation.outPutValue(currentValue),
|
|
79748
|
-
onChange(outPutValue);
|
|
79749
|
-
|
|
79903
|
+
if (!isEqual_default()(_this.foundation.outPutValue(currentValue), finalOutPutValue)) {
|
|
79750
79904
|
if (!clickTrack && _this.foundation.valueFormatIsCorrect(value)) {
|
|
79751
79905
|
// still require afterChangeCallback when click on the track directly, need skip here
|
|
79752
79906
|
return false;
|
|
79753
79907
|
}
|
|
79754
79908
|
|
|
79755
79909
|
_this.setState({
|
|
79756
|
-
currentValue:
|
|
79910
|
+
currentValue: finalOutPutValue
|
|
79757
79911
|
}, stateChangeCallback);
|
|
79758
79912
|
}
|
|
79759
79913
|
},
|
|
@@ -99474,9 +99628,21 @@ function sortableHandle(WrappedComponent) {
|
|
|
99474
99628
|
_inherits(WithSortableHandle, _React$Component);
|
|
99475
99629
|
|
|
99476
99630
|
function WithSortableHandle() {
|
|
99631
|
+
var _getPrototypeOf2;
|
|
99632
|
+
|
|
99633
|
+
var _this;
|
|
99634
|
+
|
|
99477
99635
|
_classCallCheck(this, WithSortableHandle);
|
|
99478
99636
|
|
|
99479
|
-
|
|
99637
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
99638
|
+
args[_key] = arguments[_key];
|
|
99639
|
+
}
|
|
99640
|
+
|
|
99641
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(WithSortableHandle)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
99642
|
+
|
|
99643
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "wrappedInstance", Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"])());
|
|
99644
|
+
|
|
99645
|
+
return _this;
|
|
99480
99646
|
}
|
|
99481
99647
|
|
|
99482
99648
|
_createClass(WithSortableHandle, [{
|
|
@@ -99489,12 +99655,12 @@ function sortableHandle(WrappedComponent) {
|
|
|
99489
99655
|
key: "getWrappedInstance",
|
|
99490
99656
|
value: function getWrappedInstance() {
|
|
99491
99657
|
browser_default()(config.withRef, 'To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call');
|
|
99492
|
-
return this.
|
|
99658
|
+
return this.wrappedInstance.current;
|
|
99493
99659
|
}
|
|
99494
99660
|
}, {
|
|
99495
99661
|
key: "render",
|
|
99496
99662
|
value: function render() {
|
|
99497
|
-
var ref = config.withRef ?
|
|
99663
|
+
var ref = config.withRef ? this.wrappedInstance : null;
|
|
99498
99664
|
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(WrappedComponent, _extends({
|
|
99499
99665
|
ref: ref
|
|
99500
99666
|
}, this.props));
|
|
@@ -99695,6 +99861,9 @@ function _finallyRethrows(body, finalizer) {
|
|
|
99695
99861
|
|
|
99696
99862
|
return finalizer(false, value);
|
|
99697
99863
|
}
|
|
99864
|
+
var SortableContext = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createContext"])({
|
|
99865
|
+
manager: {}
|
|
99866
|
+
});
|
|
99698
99867
|
function sortableContainer(WrappedComponent) {
|
|
99699
99868
|
var _class, _temp;
|
|
99700
99869
|
|
|
@@ -99933,7 +100102,7 @@ function sortableContainer(WrappedComponent) {
|
|
|
99933
100102
|
});
|
|
99934
100103
|
}
|
|
99935
100104
|
|
|
99936
|
-
_this.listenerNode = event.touches ?
|
|
100105
|
+
_this.listenerNode = event.touches ? event.target : _this.contentWindow;
|
|
99937
100106
|
|
|
99938
100107
|
if (_isKeySorting) {
|
|
99939
100108
|
_this.listenerNode.addEventListener('wheel', _this.handleKeyEnd, true);
|
|
@@ -100018,7 +100187,7 @@ function sortableContainer(WrappedComponent) {
|
|
|
100018
100187
|
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "handleSortMove", function (event) {
|
|
100019
100188
|
var onSortMove = _this.props.onSortMove;
|
|
100020
100189
|
|
|
100021
|
-
if (typeof event.preventDefault === 'function') {
|
|
100190
|
+
if (typeof event.preventDefault === 'function' && event.cancelable) {
|
|
100022
100191
|
event.preventDefault();
|
|
100023
100192
|
}
|
|
100024
100193
|
|
|
@@ -100265,8 +100434,13 @@ function sortableContainer(WrappedComponent) {
|
|
|
100265
100434
|
return node && node.sortableInfo && !node.sortableInfo.disabled && (useDragHandle ? isSortableHandle(target) : target.sortableInfo);
|
|
100266
100435
|
});
|
|
100267
100436
|
|
|
100437
|
+
var manager = new react_sortable_hoc_esm_Manager();
|
|
100268
100438
|
react_sortable_hoc_esm_validateProps(props);
|
|
100269
|
-
_this.manager =
|
|
100439
|
+
_this.manager = manager;
|
|
100440
|
+
_this.wrappedInstance = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"])();
|
|
100441
|
+
_this.sortableContextValue = {
|
|
100442
|
+
manager: manager
|
|
100443
|
+
};
|
|
100270
100444
|
_this.events = {
|
|
100271
100445
|
end: _this.handleEnd,
|
|
100272
100446
|
move: _this.handleMove,
|
|
@@ -100276,13 +100450,6 @@ function sortableContainer(WrappedComponent) {
|
|
|
100276
100450
|
}
|
|
100277
100451
|
|
|
100278
100452
|
_createClass(WithSortableContainer, [{
|
|
100279
|
-
key: "getChildContext",
|
|
100280
|
-
value: function getChildContext() {
|
|
100281
|
-
return {
|
|
100282
|
-
manager: this.manager
|
|
100283
|
-
};
|
|
100284
|
-
}
|
|
100285
|
-
}, {
|
|
100286
100453
|
key: "componentDidMount",
|
|
100287
100454
|
value: function componentDidMount() {
|
|
100288
100455
|
var _this2 = this;
|
|
@@ -100533,7 +100700,7 @@ function sortableContainer(WrappedComponent) {
|
|
|
100533
100700
|
key: "getWrappedInstance",
|
|
100534
100701
|
value: function getWrappedInstance() {
|
|
100535
100702
|
browser_default()(config.withRef, 'To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableContainer() call');
|
|
100536
|
-
return this.
|
|
100703
|
+
return this.wrappedInstance.current;
|
|
100537
100704
|
}
|
|
100538
100705
|
}, {
|
|
100539
100706
|
key: "getContainer",
|
|
@@ -100549,10 +100716,12 @@ function sortableContainer(WrappedComponent) {
|
|
|
100549
100716
|
}, {
|
|
100550
100717
|
key: "render",
|
|
100551
100718
|
value: function render() {
|
|
100552
|
-
var ref = config.withRef ?
|
|
100553
|
-
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(
|
|
100719
|
+
var ref = config.withRef ? this.wrappedInstance : null;
|
|
100720
|
+
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(SortableContext.Provider, {
|
|
100721
|
+
value: this.sortableContextValue
|
|
100722
|
+
}, Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(WrappedComponent, _extends({
|
|
100554
100723
|
ref: ref
|
|
100555
|
-
}, react_sortable_hoc_esm_omit(this.props, omittedProps)));
|
|
100724
|
+
}, react_sortable_hoc_esm_omit(this.props, omittedProps))));
|
|
100556
100725
|
}
|
|
100557
100726
|
}, {
|
|
100558
100727
|
key: "helperContainer",
|
|
@@ -100593,9 +100762,7 @@ function sortableContainer(WrappedComponent) {
|
|
|
100593
100762
|
}]);
|
|
100594
100763
|
|
|
100595
100764
|
return WithSortableContainer;
|
|
100596
|
-
}(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]), _defineProperty(_class, "displayName", provideDisplayName('sortableList', WrappedComponent)), _defineProperty(_class, "defaultProps", react_sortable_hoc_esm_defaultProps), _defineProperty(_class, "propTypes", propTypes),
|
|
100597
|
-
manager: prop_types_default.a.object.isRequired
|
|
100598
|
-
}), _temp;
|
|
100765
|
+
}(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]), _defineProperty(_class, "displayName", provideDisplayName('sortableList', WrappedComponent)), _defineProperty(_class, "defaultProps", react_sortable_hoc_esm_defaultProps), _defineProperty(_class, "propTypes", propTypes), _temp;
|
|
100599
100766
|
}
|
|
100600
100767
|
|
|
100601
100768
|
var propTypes$1 = {
|
|
@@ -100614,9 +100781,21 @@ function sortableElement(WrappedComponent) {
|
|
|
100614
100781
|
_inherits(WithSortableElement, _React$Component);
|
|
100615
100782
|
|
|
100616
100783
|
function WithSortableElement() {
|
|
100784
|
+
var _getPrototypeOf2;
|
|
100785
|
+
|
|
100786
|
+
var _this;
|
|
100787
|
+
|
|
100617
100788
|
_classCallCheck(this, WithSortableElement);
|
|
100618
100789
|
|
|
100619
|
-
|
|
100790
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
100791
|
+
args[_key] = arguments[_key];
|
|
100792
|
+
}
|
|
100793
|
+
|
|
100794
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(WithSortableElement)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
100795
|
+
|
|
100796
|
+
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "wrappedInstance", Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createRef"])());
|
|
100797
|
+
|
|
100798
|
+
return _this;
|
|
100620
100799
|
}
|
|
100621
100800
|
|
|
100622
100801
|
_createClass(WithSortableElement, [{
|
|
@@ -100677,12 +100856,12 @@ function sortableElement(WrappedComponent) {
|
|
|
100677
100856
|
key: "getWrappedInstance",
|
|
100678
100857
|
value: function getWrappedInstance() {
|
|
100679
100858
|
browser_default()(config.withRef, 'To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call');
|
|
100680
|
-
return this.
|
|
100859
|
+
return this.wrappedInstance.current;
|
|
100681
100860
|
}
|
|
100682
100861
|
}, {
|
|
100683
100862
|
key: "render",
|
|
100684
100863
|
value: function render() {
|
|
100685
|
-
var ref = config.withRef ?
|
|
100864
|
+
var ref = config.withRef ? this.wrappedInstance : null;
|
|
100686
100865
|
return Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"])(WrappedComponent, _extends({
|
|
100687
100866
|
ref: ref
|
|
100688
100867
|
}, react_sortable_hoc_esm_omit(this.props, omittedProps$1)));
|
|
@@ -100690,9 +100869,7 @@ function sortableElement(WrappedComponent) {
|
|
|
100690
100869
|
}]);
|
|
100691
100870
|
|
|
100692
100871
|
return WithSortableElement;
|
|
100693
|
-
}(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]), _defineProperty(_class, "displayName", provideDisplayName('sortableElement', WrappedComponent)), _defineProperty(_class, "
|
|
100694
|
-
manager: prop_types_default.a.object.isRequired
|
|
100695
|
-
}), _defineProperty(_class, "propTypes", propTypes$1), _defineProperty(_class, "defaultProps", {
|
|
100872
|
+
}(external_root_React_commonjs2_react_commonjs_react_amd_react_["Component"]), _defineProperty(_class, "displayName", provideDisplayName('sortableElement', WrappedComponent)), _defineProperty(_class, "contextType", SortableContext), _defineProperty(_class, "propTypes", propTypes$1), _defineProperty(_class, "defaultProps", {
|
|
100696
100873
|
collection: 0
|
|
100697
100874
|
}), _temp;
|
|
100698
100875
|
}
|
|
@@ -104628,6 +104805,7 @@ arrayField_ArrayFieldComponent.contextType = FormUpdaterContext;
|
|
|
104628
104805
|
|
|
104629
104806
|
|
|
104630
104807
|
|
|
104808
|
+
|
|
104631
104809
|
|
|
104632
104810
|
|
|
104633
104811
|
/** Form */
|