shineout 3.6.4-beta.4 → 3.6.4-beta.5
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/cjs/index.js +1 -1
- package/dist/shineout.js +73 -23
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -514,5 +514,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
514
514
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
515
515
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
516
516
|
var _default = exports.default = {
|
|
517
|
-
version: '3.6.4-beta.
|
|
517
|
+
version: '3.6.4-beta.5'
|
|
518
518
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12217,7 +12217,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12217
12217
|
};
|
|
12218
12218
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12219
12219
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12220
|
-
/* harmony default export */ var version = ('3.6.4-beta.
|
|
12220
|
+
/* harmony default export */ var version = ('3.6.4-beta.5');
|
|
12221
12221
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12222
12222
|
|
|
12223
12223
|
|
|
@@ -29986,19 +29986,6 @@ var usePopup = function usePopup(props) {
|
|
|
29986
29986
|
};
|
|
29987
29987
|
};
|
|
29988
29988
|
/* harmony default export */ var use_popup = (usePopup);
|
|
29989
|
-
;// CONCATENATED MODULE: ../hooks/src/utils/attribute.ts
|
|
29990
|
-
var getDataAttribute = function getDataAttribute(attrs) {
|
|
29991
|
-
return Object.keys(attrs).reduce(function (acc, key) {
|
|
29992
|
-
var ns = "data-soui-".concat(key);
|
|
29993
|
-
if (attrs[key] !== undefined) {
|
|
29994
|
-
acc[ns] = attrs[key];
|
|
29995
|
-
}
|
|
29996
|
-
return acc;
|
|
29997
|
-
}, {});
|
|
29998
|
-
};
|
|
29999
|
-
var getDataAttributeName = function getDataAttributeName(name) {
|
|
30000
|
-
return "data-soui-".concat(name);
|
|
30001
|
-
};
|
|
30002
29989
|
;// CONCATENATED MODULE: ../hooks/src/utils/func.ts
|
|
30003
29990
|
// 节流函数
|
|
30004
29991
|
var throttle = function throttle(func, wait) {
|
|
@@ -30217,6 +30204,19 @@ var getFieldId = function getFieldId(name, formName) {
|
|
|
30217
30204
|
if (!name) return undefined;
|
|
30218
30205
|
return "".concat(formName ? "".concat(formName, "_") : '').concat(name);
|
|
30219
30206
|
};
|
|
30207
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/attribute.ts
|
|
30208
|
+
var getDataAttribute = function getDataAttribute(attrs) {
|
|
30209
|
+
return Object.keys(attrs).reduce(function (acc, key) {
|
|
30210
|
+
var ns = "data-soui-".concat(key);
|
|
30211
|
+
if (attrs[key] !== undefined) {
|
|
30212
|
+
acc[ns] = attrs[key];
|
|
30213
|
+
}
|
|
30214
|
+
return acc;
|
|
30215
|
+
}, {});
|
|
30216
|
+
};
|
|
30217
|
+
var getDataAttributeName = function getDataAttributeName(name) {
|
|
30218
|
+
return "data-soui-".concat(name);
|
|
30219
|
+
};
|
|
30220
30220
|
;// CONCATENATED MODULE: ../hooks/src/common/use-position-style/get-position-style.ts
|
|
30221
30221
|
|
|
30222
30222
|
var ReverseDir = {
|
|
@@ -30658,13 +30658,6 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30658
30658
|
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left - (offset ? offset[0] : 0);
|
|
30659
30659
|
style.left = 'auto';
|
|
30660
30660
|
style.transform = '';
|
|
30661
|
-
if (adjust) {
|
|
30662
|
-
overLeft = bodyRect.left - (rect.right - context.popUpWidth);
|
|
30663
|
-
if (style.right < 0 && targetRect) {
|
|
30664
|
-
style.left = bodyRect.width - targetRect.width;
|
|
30665
|
-
style.right = 'auto';
|
|
30666
|
-
}
|
|
30667
|
-
}
|
|
30668
30661
|
} else {
|
|
30669
30662
|
// 居中对齐
|
|
30670
30663
|
style.left = rect.left + rect.width / 2 - containerRect.left + containerScroll.left;
|
|
@@ -31536,6 +31529,7 @@ var AbsoluteList = function AbsoluteList(props) {
|
|
|
31536
31529
|
|
|
31537
31530
|
|
|
31538
31531
|
|
|
31532
|
+
|
|
31539
31533
|
var emptyEvent = function emptyEvent(e) {
|
|
31540
31534
|
return e.stopPropagation();
|
|
31541
31535
|
};
|
|
@@ -31594,7 +31588,17 @@ var Popover = function Popover(props) {
|
|
|
31594
31588
|
Provider = _usePopup.Provider,
|
|
31595
31589
|
providerValue = _usePopup.providerValue;
|
|
31596
31590
|
var events = getTargetProps();
|
|
31591
|
+
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
|
|
31592
|
+
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
31593
|
+
updateKey = _React$useState2[0],
|
|
31594
|
+
setUpdateKey = _React$useState2[1];
|
|
31595
|
+
var handleUpdateKey = function handleUpdateKey() {
|
|
31596
|
+
setUpdateKey(function (prev) {
|
|
31597
|
+
return (prev + 1) % 2;
|
|
31598
|
+
});
|
|
31599
|
+
};
|
|
31597
31600
|
var bindEvents = function bindEvents() {
|
|
31601
|
+
var _window;
|
|
31598
31602
|
var targetEl = targetRef.current;
|
|
31599
31603
|
if (!targetEl) return;
|
|
31600
31604
|
if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
|
|
@@ -31604,8 +31608,14 @@ var Popover = function Popover(props) {
|
|
|
31604
31608
|
if (trigger === 'hover' && props.clickToCancelDelay && props.mouseEnterDelay) {
|
|
31605
31609
|
targetEl.addEventListener('click', closePop);
|
|
31606
31610
|
}
|
|
31611
|
+
(_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
|
|
31612
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
31613
|
+
if (scrollContainer) {
|
|
31614
|
+
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
31615
|
+
}
|
|
31607
31616
|
};
|
|
31608
31617
|
var unbindEvents = function unbindEvents() {
|
|
31618
|
+
var _window2;
|
|
31609
31619
|
var targetEl = targetRef.current;
|
|
31610
31620
|
if (!targetEl) return;
|
|
31611
31621
|
var events = getTargetProps();
|
|
@@ -31613,6 +31623,11 @@ var Popover = function Popover(props) {
|
|
|
31613
31623
|
if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
|
|
31614
31624
|
if (events.onClick) targetEl.removeEventListener('click', events.onClick);
|
|
31615
31625
|
targetEl.removeEventListener('click', closePop);
|
|
31626
|
+
(_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
|
|
31627
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
31628
|
+
if (scrollContainer) {
|
|
31629
|
+
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
31630
|
+
}
|
|
31616
31631
|
};
|
|
31617
31632
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
31618
31633
|
bindEvents();
|
|
@@ -31673,6 +31688,7 @@ var Popover = function Popover(props) {
|
|
|
31673
31688
|
adjust: props.adjust,
|
|
31674
31689
|
lazy: props.lazy,
|
|
31675
31690
|
offset: props.offset,
|
|
31691
|
+
updateKey: updateKey,
|
|
31676
31692
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
31677
31693
|
className: classnames_default()(className, popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.rootClass, popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.wrapper, open && (popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.wrapperOpen), !showArrow && (popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.hideArrow)),
|
|
31678
31694
|
style: containerStyle
|
|
@@ -41897,6 +41913,7 @@ var validate = function validate(value, formData, rules, p) {
|
|
|
41897
41913
|
|
|
41898
41914
|
|
|
41899
41915
|
|
|
41916
|
+
|
|
41900
41917
|
var getValue = function getValue(name, formValue) {
|
|
41901
41918
|
if (!name) return undefined;
|
|
41902
41919
|
if (isArray(name)) {
|
|
@@ -41936,6 +41953,10 @@ function useFormControl(props) {
|
|
|
41936
41953
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
41937
41954
|
errorState = _React$useState2[0],
|
|
41938
41955
|
setErrorState = _React$useState2[1];
|
|
41956
|
+
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
|
|
41957
|
+
mounted: false
|
|
41958
|
+
}),
|
|
41959
|
+
context = _React$useRef.current;
|
|
41939
41960
|
var value;
|
|
41940
41961
|
var error = errorState;
|
|
41941
41962
|
var inForm = false;
|
|
@@ -42095,7 +42116,11 @@ function useFormControl(props) {
|
|
|
42095
42116
|
} else {
|
|
42096
42117
|
controlFunc.bind(name, defaultValue, validateField, update);
|
|
42097
42118
|
}
|
|
42119
|
+
if (context.mounted) {
|
|
42120
|
+
devUseWarning.warn('Please avoid modifying the name property after the component has mounted, as this may result in unintended behavior or errors.');
|
|
42121
|
+
}
|
|
42098
42122
|
}
|
|
42123
|
+
context.mounted = true;
|
|
42099
42124
|
return function () {
|
|
42100
42125
|
if (inForm && controlFunc) {
|
|
42101
42126
|
if (isArray(name)) {
|
|
@@ -49792,8 +49817,10 @@ var useForm = function useForm(props) {
|
|
|
49792
49817
|
context.updateMap[n] = new Set();
|
|
49793
49818
|
}
|
|
49794
49819
|
context.updateMap[n].add(updateFn);
|
|
49820
|
+
var shouldTriggerResetChange = context.removeArr.has(n);
|
|
49795
49821
|
context.removeArr.delete(n);
|
|
49796
|
-
|
|
49822
|
+
var shouldTriggerDefaultChange = df !== undefined && deepGet(context.value, n) === undefined;
|
|
49823
|
+
if (shouldTriggerDefaultChange || shouldTriggerResetChange) {
|
|
49797
49824
|
if (!context.mounted) context.defaultValues[n] = df;
|
|
49798
49825
|
onChange(function (v) {
|
|
49799
49826
|
deepSet(v, n, df, deepSetOptions);
|
|
@@ -50161,6 +50188,7 @@ var UseFormItem = function UseFormItem() {
|
|
|
50161
50188
|
|
|
50162
50189
|
|
|
50163
50190
|
|
|
50191
|
+
|
|
50164
50192
|
var tooltip_devUseWarning = devUseWarning;
|
|
50165
50193
|
var defaultDelay = 0;
|
|
50166
50194
|
var Tooltip = function Tooltip(props) {
|
|
@@ -50202,14 +50230,30 @@ var Tooltip = function Tooltip(props) {
|
|
|
50202
50230
|
popupRef = _usePopup.popupRef,
|
|
50203
50231
|
closePop = _usePopup.closePop;
|
|
50204
50232
|
var events = getTargetProps();
|
|
50233
|
+
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
|
|
50234
|
+
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
50235
|
+
updateKey = _React$useState2[0],
|
|
50236
|
+
setUpdateKey = _React$useState2[1];
|
|
50237
|
+
var handleUpdateKey = function handleUpdateKey() {
|
|
50238
|
+
setUpdateKey(function (prev) {
|
|
50239
|
+
return (prev + 1) % 2;
|
|
50240
|
+
});
|
|
50241
|
+
};
|
|
50205
50242
|
var bindEvents = function bindEvents() {
|
|
50243
|
+
var _window;
|
|
50206
50244
|
var targetEl = targetRef.current;
|
|
50207
50245
|
if (!targetEl) return;
|
|
50208
50246
|
if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
|
|
50209
50247
|
if (events.onMouseLeave) targetEl.addEventListener('mouseleave', events.onMouseLeave);
|
|
50210
50248
|
if (events.onClick) targetEl.addEventListener('click', events.onClick);
|
|
50249
|
+
(_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
|
|
50250
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
50251
|
+
if (scrollContainer) {
|
|
50252
|
+
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
50253
|
+
}
|
|
50211
50254
|
};
|
|
50212
50255
|
var unbindEvents = function unbindEvents() {
|
|
50256
|
+
var _window2;
|
|
50213
50257
|
var targetEl = targetRef.current;
|
|
50214
50258
|
if (!targetEl) return;
|
|
50215
50259
|
var events = getTargetProps();
|
|
@@ -50217,6 +50261,11 @@ var Tooltip = function Tooltip(props) {
|
|
|
50217
50261
|
if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
|
|
50218
50262
|
if (events.onClick) targetEl.removeEventListener('click', events.onClick);
|
|
50219
50263
|
targetEl.removeEventListener('click', closePop);
|
|
50264
|
+
(_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
|
|
50265
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
50266
|
+
if (scrollContainer) {
|
|
50267
|
+
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
50268
|
+
}
|
|
50220
50269
|
};
|
|
50221
50270
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
50222
50271
|
if (!persistent) return;
|
|
@@ -50260,6 +50309,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
50260
50309
|
popupGap: 0,
|
|
50261
50310
|
zIndex: zIndex,
|
|
50262
50311
|
adjust: popsitionProps === 'auto',
|
|
50312
|
+
updateKey: updateKey,
|
|
50263
50313
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
50264
50314
|
className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.rootClass, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen)),
|
|
50265
50315
|
style: {
|
|
@@ -69869,7 +69919,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
69869
69919
|
|
|
69870
69920
|
|
|
69871
69921
|
/* harmony default export */ var src_0 = ({
|
|
69872
|
-
version: '3.6.4-beta.
|
|
69922
|
+
version: '3.6.4-beta.5'
|
|
69873
69923
|
});
|
|
69874
69924
|
}();
|
|
69875
69925
|
/******/ return __webpack_exports__;
|