shineout 3.8.0-beta.34 → 3.8.0-beta.36
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/form/form.type.d.ts +15 -0
- package/cjs/index.js +1 -1
- package/dist/shineout.js +54 -26
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/form/form.type.d.ts +15 -0
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/form/form.type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FormFieldProps as UiFormFieldProps, FormFieldSetProps as UiFormFieldSetProps, FormItemProps as UiFormItemProps, FormProps as UiFormProps, ObjectType, FormFlowProps as UiFormFlowProps, FormRef as UiFormRef, FormDatum as UiFormDatum } from '@sheinx/base';
|
|
2
|
+
import { ButtonProps } from '../button/button.type';
|
|
2
3
|
/**
|
|
3
4
|
* @title FormRef
|
|
4
5
|
* @sort 6
|
|
@@ -58,3 +59,17 @@ export type FormFieldSetProps<T> = UiFormFieldSetProps<T>;
|
|
|
58
59
|
* @cn 表单流程组件,用于监听表单数据变化并执行相应的副作用。适用于实现表单联动、条件渲染等场景
|
|
59
60
|
*/
|
|
60
61
|
export type FormFlowProps = UiFormFlowProps;
|
|
62
|
+
/**
|
|
63
|
+
* @title Form.Button
|
|
64
|
+
* @sort 8
|
|
65
|
+
* @en Form button component with htmlType='button'. Prevents accidental form submission when users press Enter in form inputs. Users must explicitly click the button to submit the form. Internally calls formFunc.submit() for better control over submission logic
|
|
66
|
+
* @cn 表单按钮组件,htmlType='button'。防止用户在表单输入框中按回车键时意外提交表单。用户必须显式点击按钮才能提交表单。内部调用 formFunc.submit() 以更好地控制提交逻辑
|
|
67
|
+
*/
|
|
68
|
+
export type FormButtonProps = ButtonProps;
|
|
69
|
+
/**
|
|
70
|
+
* @title Form.Submit
|
|
71
|
+
* @sort 9
|
|
72
|
+
* @en Form submit button component with htmlType='submit'. Uses native browser submit behavior. When users press Enter in any form input, it will trigger this button automatically. Suitable for simple forms where Enter-to-submit behavior is desired
|
|
73
|
+
* @cn 表单提交按钮组件,htmlType='submit'。使用浏览器原生提交行为。当用户在任何表单输入框中按回车键时,会自动触发此按钮。适用于希望支持回车提交的简单表单
|
|
74
|
+
*/
|
|
75
|
+
export type FormSubmitProps = ButtonProps;
|
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.8.0-beta.
|
|
525
|
+
version: '3.8.0-beta.36'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12386
12386
|
};
|
|
12387
12387
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12388
12388
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12389
|
-
/* harmony default export */ var version = ('3.8.0-beta.
|
|
12389
|
+
/* harmony default export */ var version = ('3.8.0-beta.36');
|
|
12390
12390
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12391
12391
|
|
|
12392
12392
|
|
|
@@ -27165,14 +27165,14 @@ var getCardStyle = function getCardStyle() {
|
|
|
27165
27165
|
bottom: 0,
|
|
27166
27166
|
right: -1,
|
|
27167
27167
|
width: 1,
|
|
27168
|
-
background:
|
|
27168
|
+
background: src.tabsCardCheckedBackgroundColor
|
|
27169
27169
|
})),
|
|
27170
27170
|
'&[dir=rtl]': objectSpread2_default()(objectSpread2_default()({}, active({
|
|
27171
27171
|
top: 0,
|
|
27172
27172
|
bottom: 0,
|
|
27173
27173
|
left: -1,
|
|
27174
27174
|
width: 1,
|
|
27175
|
-
background:
|
|
27175
|
+
background: src.tabsCardCheckedBackgroundColor
|
|
27176
27176
|
})), {}, {
|
|
27177
27177
|
'& $cardHr': {
|
|
27178
27178
|
'&:before': {
|
|
@@ -27205,7 +27205,7 @@ var getCardStyle = function getCardStyle() {
|
|
|
27205
27205
|
bottom: 0,
|
|
27206
27206
|
left: -1,
|
|
27207
27207
|
width: 1,
|
|
27208
|
-
background:
|
|
27208
|
+
background: src.tabsCardCheckedBackgroundColor
|
|
27209
27209
|
})),
|
|
27210
27210
|
'&[dir=rtl]': objectSpread2_default()({
|
|
27211
27211
|
'& $cardHr': {
|
|
@@ -27220,7 +27220,7 @@ var getCardStyle = function getCardStyle() {
|
|
|
27220
27220
|
bottom: 0,
|
|
27221
27221
|
right: -1,
|
|
27222
27222
|
width: 1,
|
|
27223
|
-
background:
|
|
27223
|
+
background: src.tabsCardCheckedBackgroundColor
|
|
27224
27224
|
}))
|
|
27225
27225
|
},
|
|
27226
27226
|
'&[data-soui-position^="top-"][data-soui-shape="card"]': objectSpread2_default()({
|
|
@@ -27237,7 +27237,7 @@ var getCardStyle = function getCardStyle() {
|
|
|
27237
27237
|
left: 0,
|
|
27238
27238
|
right: 0,
|
|
27239
27239
|
height: 1,
|
|
27240
|
-
background:
|
|
27240
|
+
background: src.tabsCardCheckedBackgroundColor
|
|
27241
27241
|
})),
|
|
27242
27242
|
'&[data-soui-position^="bottom-"][data-soui-shape="card"]': objectSpread2_default()({
|
|
27243
27243
|
'& $tab,& $next,& $prev': {
|
|
@@ -27259,13 +27259,13 @@ var getCardStyle = function getCardStyle() {
|
|
|
27259
27259
|
left: 0,
|
|
27260
27260
|
right: 0,
|
|
27261
27261
|
height: 1,
|
|
27262
|
-
background:
|
|
27262
|
+
background: src.tabsCardCheckedBackgroundColor
|
|
27263
27263
|
}))
|
|
27264
27264
|
};
|
|
27265
27265
|
};
|
|
27266
27266
|
var getLineStyle = function getLineStyle() {
|
|
27267
27267
|
return {
|
|
27268
|
-
'$tab': {
|
|
27268
|
+
'&[data-soui-shape="line"] $tab': {
|
|
27269
27269
|
'&:after': {
|
|
27270
27270
|
display: 'none'
|
|
27271
27271
|
}
|
|
@@ -39203,7 +39203,10 @@ var useFilter = function useFilter(props) {
|
|
|
39203
39203
|
return getKey(keygen, item) === key;
|
|
39204
39204
|
};
|
|
39205
39205
|
var handleClearCreatedData = function handleClearCreatedData() {
|
|
39206
|
-
|
|
39206
|
+
// why setTimeout: 避免回车时,新创建的数据走到了renderUnmatched逻辑中去
|
|
39207
|
+
setTimeout(function () {
|
|
39208
|
+
setCreatedData(undefined);
|
|
39209
|
+
}, 0);
|
|
39207
39210
|
};
|
|
39208
39211
|
var handleCreate = function handleCreate(text) {
|
|
39209
39212
|
var createFn = typeof onCreate === 'boolean' ? function (t) {
|
|
@@ -39631,6 +39634,8 @@ var useTree = function useTree(props) {
|
|
|
39631
39634
|
var _context$dataFlatStat2;
|
|
39632
39635
|
context.updateMap.set(id, update);
|
|
39633
39636
|
var isActive = activeProp === id;
|
|
39637
|
+
// 立即调用update函数设置正确的active状态
|
|
39638
|
+
if (isActive) update('active', isActive);
|
|
39634
39639
|
return {
|
|
39635
39640
|
active: isActive,
|
|
39636
39641
|
expanded: !!((_context$dataFlatStat2 = context.dataFlatStatusMap.get(id)) !== null && _context$dataFlatStat2 !== void 0 && _context$dataFlatStat2.expanded)
|
|
@@ -39760,7 +39765,7 @@ var useTree = function useTree(props) {
|
|
|
39760
39765
|
context.dataMap.set(id, item);
|
|
39761
39766
|
if (virtual) {
|
|
39762
39767
|
context.dataFlatStatusMap.set(id, {
|
|
39763
|
-
active:
|
|
39768
|
+
active: activeProp === id,
|
|
39764
39769
|
expanded: defaultExpandAll ? true : (expanded === null || expanded === void 0 ? void 0 : expanded.includes(id)) || false,
|
|
39765
39770
|
fetching: false
|
|
39766
39771
|
});
|
|
@@ -40111,6 +40116,17 @@ var useTree = function useTree(props) {
|
|
|
40111
40116
|
call('expanded', tempExpandMap.has(id));
|
|
40112
40117
|
});
|
|
40113
40118
|
});
|
|
40119
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
40120
|
+
if (props.datum) return;
|
|
40121
|
+
if (!dataUpdate) return;
|
|
40122
|
+
setData(data);
|
|
40123
|
+
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
|
40124
|
+
if (!defaultExpandAll && !shallowEqual(nextExpanded, expanded)) {
|
|
40125
|
+
onExpand(nextExpanded);
|
|
40126
|
+
updateExpanded(nextExpanded, true);
|
|
40127
|
+
}
|
|
40128
|
+
updateInnerCheckStatus();
|
|
40129
|
+
}, [props.data]);
|
|
40114
40130
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
40115
40131
|
if (defaultExpandAll) {
|
|
40116
40132
|
var nextExpanded = [];
|
|
@@ -40123,17 +40139,6 @@ var useTree = function useTree(props) {
|
|
|
40123
40139
|
updateExpanded(nextExpanded, true);
|
|
40124
40140
|
}
|
|
40125
40141
|
}, [context.dataMap, props.data]);
|
|
40126
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
40127
|
-
if (props.datum) return;
|
|
40128
|
-
if (!dataUpdate) return;
|
|
40129
|
-
setData(data);
|
|
40130
|
-
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
|
40131
|
-
if (!defaultExpandAll && !shallowEqual(nextExpanded, expanded)) {
|
|
40132
|
-
onExpand(nextExpanded);
|
|
40133
|
-
updateExpanded(nextExpanded, true);
|
|
40134
|
-
}
|
|
40135
|
-
updateInnerCheckStatus();
|
|
40136
|
-
}, [props.data]);
|
|
40137
40142
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
40138
40143
|
if (props.datum) return;
|
|
40139
40144
|
setValue(value);
|
|
@@ -67004,10 +67009,33 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
67004
67009
|
|
|
67005
67010
|
// 使用 offsetWidth/offsetHeight 而不是 getBoundingClientRect()
|
|
67006
67011
|
// 这样可以避免受到外部容器 CSS transform scale 的影响
|
|
67007
|
-
|
|
67008
|
-
|
|
67009
|
-
|
|
67010
|
-
|
|
67012
|
+
var width = (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetWidth) || 0;
|
|
67013
|
+
var height = (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetHeight) || 0;
|
|
67014
|
+
// 微前端场景下,可能出现获取不到元素的尺寸信息
|
|
67015
|
+
if (width === 0 || height === 0) {
|
|
67016
|
+
var timerCount = 0;
|
|
67017
|
+
var timer = setInterval(function () {
|
|
67018
|
+
timerCount++;
|
|
67019
|
+
if (currentTab !== null && currentTab !== void 0 && currentTab.offsetWidth && currentTab !== null && currentTab !== void 0 && currentTab.offsetHeight) {
|
|
67020
|
+
setCurrentTabSize({
|
|
67021
|
+
width: currentTab.offsetWidth,
|
|
67022
|
+
height: currentTab.offsetHeight
|
|
67023
|
+
});
|
|
67024
|
+
clearInterval(timer);
|
|
67025
|
+
}
|
|
67026
|
+
if (timerCount >= 100) {
|
|
67027
|
+
clearInterval(timer);
|
|
67028
|
+
}
|
|
67029
|
+
}, 16);
|
|
67030
|
+
return function () {
|
|
67031
|
+
return clearInterval(timer);
|
|
67032
|
+
};
|
|
67033
|
+
} else {
|
|
67034
|
+
setCurrentTabSize({
|
|
67035
|
+
width: width,
|
|
67036
|
+
height: height
|
|
67037
|
+
});
|
|
67038
|
+
}
|
|
67011
67039
|
}, [active, tabs]);
|
|
67012
67040
|
var renderHeaderScrollBar = function renderHeaderScrollBar() {
|
|
67013
67041
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
@@ -72892,7 +72920,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
72892
72920
|
|
|
72893
72921
|
|
|
72894
72922
|
/* harmony default export */ var src_0 = ({
|
|
72895
|
-
version: '3.8.0-beta.
|
|
72923
|
+
version: '3.8.0-beta.36'
|
|
72896
72924
|
});
|
|
72897
72925
|
}();
|
|
72898
72926
|
/******/ return __webpack_exports__;
|