shineout 3.10.0-beta.14 → 3.10.0-beta.16

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 CHANGED
@@ -545,5 +545,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
545
545
  // 此文件由脚本自动生成,请勿直接修改。
546
546
  // This file was generated automatically by a script. Please do not modify it directly.
547
547
  var _default = exports.default = {
548
- version: '3.10.0-beta.14'
548
+ version: '3.10.0-beta.16'
549
549
  };
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _base = require("@sheinx/base");
8
+ var _hooks = require("@sheinx/hooks");
8
9
  var _shineoutStyle = require("@sheinx/shineout-style");
9
10
  var _useFieldCommon = _interopRequireDefault(require("../hooks/use-field-common"));
10
11
  var _useUploadCommon = _interopRequireDefault(require("./use-upload-common"));
@@ -31,8 +32,18 @@ var BaseUploadButton = function BaseUploadButton(props) {
31
32
  };
32
33
  BaseUploadButton.displayName = 'ShineoutUploadButton';
33
34
  var _default = exports.default = function _default(props) {
35
+ var _props$htmlName;
34
36
  var customProps = (0, _useUploadCommon.default)({
35
37
  rules: props.rules
36
38
  });
37
- return (0, _useFieldCommon.default)(_objectSpread(_objectSpread({}, props), customProps), BaseUploadButton);
39
+
40
+ // 同 upload.tsx:useFieldCommon 会把 name 从子组件 props 中移除,
41
+ // 提前将其作为 htmlName 的 fallback 保存,以兼容 v2 中 name 作为 FormData 键名的行为。
42
+ var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
43
+ if (!props.htmlName && typeof props.name === 'string' && props.name !== 'file') {
44
+ _hooks.util.devUseWarning.warn("Upload.Button \u7684 name=\"".concat(props.name, "\" \u4F1A\u4F5C\u4E3A\u4E0A\u4F20\u8BF7\u6C42 FormData \u7684\u5B57\u6BB5\u540D\u3002\u5982\u9700\u4FDD\u6301\u9ED8\u8BA4\u5B57\u6BB5\u540D \"file\"\uFF0C\u8BF7\u663E\u5F0F\u8BBE\u7F6E htmlName=\"file\"\u3002"));
45
+ }
46
+ return (0, _useFieldCommon.default)(_objectSpread(_objectSpread({}, props), {}, {
47
+ htmlName: htmlName
48
+ }, customProps), BaseUploadButton);
38
49
  };
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _base = require("@sheinx/base");
8
+ var _hooks = require("@sheinx/hooks");
8
9
  var _shineoutStyle = require("@sheinx/shineout-style");
9
10
  var _useFieldCommon = _interopRequireDefault(require("../hooks/use-field-common"));
10
11
  var _useUploadCommon = _interopRequireDefault(require("./use-upload-common"));
@@ -39,6 +40,9 @@ var _default = exports.default = function _default(props) {
39
40
  // 同 upload.tsx:useFieldCommon 会把 name 从子组件 props 中移除,
40
41
  // 提前将其作为 htmlName 的 fallback 保存,以兼容 v2 中 name 作为 FormData 键名的行为。
41
42
  var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
43
+ if (!props.htmlName && typeof props.name === 'string' && props.name !== 'file') {
44
+ _hooks.util.devUseWarning.warn("Upload.Image \u7684 name=\"".concat(props.name, "\" \u4F1A\u4F5C\u4E3A\u4E0A\u4F20\u8BF7\u6C42 FormData \u7684\u5B57\u6BB5\u540D\u3002\u5982\u9700\u4FDD\u6301\u9ED8\u8BA4\u5B57\u6BB5\u540D \"file\"\uFF0C\u8BF7\u663E\u5F0F\u8BBE\u7F6E htmlName=\"file\"\u3002"));
45
+ }
42
46
  return (0, _useFieldCommon.default)(_objectSpread(_objectSpread({}, props), {}, {
43
47
  htmlName: htmlName
44
48
  }, customProps), BaseUploadImage);
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _base = require("@sheinx/base");
8
+ var _hooks = require("@sheinx/hooks");
8
9
  var _shineoutStyle = require("@sheinx/shineout-style");
9
10
  var _useFieldCommon = _interopRequireDefault(require("../hooks/use-field-common"));
10
11
  var _useUploadCommon = _interopRequireDefault(require("./use-upload-common"));
@@ -40,6 +41,9 @@ var _default = exports.default = function _default(props) {
40
41
  // 但 Upload 的 name 在 v2 中同时作为 FormData 的键名,为了兼容 v2 行为,
41
42
  // 在 name 被移除之前将其作为 htmlName 的 fallback 保存下来。
42
43
  var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
44
+ if (!props.htmlName && typeof props.name === 'string' && props.name !== 'file') {
45
+ _hooks.util.devUseWarning.warn("Upload \u7684 name=\"".concat(props.name, "\" \u4F1A\u4F5C\u4E3A\u4E0A\u4F20\u8BF7\u6C42 FormData \u7684\u5B57\u6BB5\u540D\u3002\u5982\u9700\u4FDD\u6301\u9ED8\u8BA4\u5B57\u6BB5\u540D \"file\"\uFF0C\u8BF7\u663E\u5F0F\u8BBE\u7F6E htmlName=\"file\"\u3002"));
46
+ }
43
47
  return (0, _useFieldCommon.default)(_objectSpread(_objectSpread({}, props), {}, {
44
48
  htmlName: htmlName
45
49
  }, customProps), BaseUpload, 'array');
package/dist/shineout.js CHANGED
@@ -12345,7 +12345,7 @@ var handleStyle = function handleStyle(style) {
12345
12345
  };
12346
12346
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12347
12347
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12348
- /* harmony default export */ var version = ('3.10.0-beta.14');
12348
+ /* harmony default export */ var version = ('3.10.0-beta.16');
12349
12349
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12350
12350
 
12351
12351
 
@@ -70077,6 +70077,8 @@ var useTransform = function useTransform(props) {
70077
70077
  ;// CONCATENATED MODULE: ../base/src/tabs/tab.tsx
70078
70078
 
70079
70079
 
70080
+ var tab_excluded = ["ref"];
70081
+
70080
70082
 
70081
70083
 
70082
70084
 
@@ -70167,13 +70169,16 @@ var Tab = function Tab(props, _ref) {
70167
70169
  dir: config.direction
70168
70170
  });
70169
70171
  if (shape === 'button') {
70172
+ var buttonRef = containerProps.ref,
70173
+ restContainerProps = objectWithoutProperties_default()(containerProps, tab_excluded);
70170
70174
  return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, objectSpread2_default()(objectSpread2_default()({
70171
70175
  jssStyle: {
70172
70176
  button: buttonStyle
70173
70177
  },
70174
70178
  disabled: disabled,
70175
70179
  type: isActive ? 'primary' : 'secondary'
70176
- }, containerProps), {}, {
70180
+ }, restContainerProps), {}, {
70181
+ onRef: buttonRef,
70177
70182
  children: tab
70178
70183
  }));
70179
70184
  }
@@ -70420,7 +70425,11 @@ var TabsHeader = function TabsHeader(props) {
70420
70425
  buttonGroup: buttonGroupStyle
70421
70426
  },
70422
70427
  children: tabs.map(function (tab, index) {
70423
- return /*#__PURE__*/(0,jsx_runtime.jsx)(tabs_tab, objectSpread2_default()({}, tab), index);
70428
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(tabs_tab, objectSpread2_default()(objectSpread2_default()({}, tab), {}, {
70429
+ ref: function ref(node) {
70430
+ tabRef.current[tab.id] = node;
70431
+ }
70432
+ }), index);
70424
70433
  })
70425
70434
  }), shape !== 'button' && tabs.map(function (tab, index) {
70426
70435
  return /*#__PURE__*/(0,jsx_runtime.jsx)(tabs_tab, objectSpread2_default()(objectSpread2_default()({}, tab), {}, {
@@ -74917,6 +74926,7 @@ var useUploadCommon = function useUploadCommon(props) {
74917
74926
 
74918
74927
 
74919
74928
 
74929
+
74920
74930
  var upload_jssStyle = {
74921
74931
  upload: useUploadStyle,
74922
74932
  spin: useSpinStyle,
@@ -74941,6 +74951,9 @@ BaseUpload.displayName = 'ShineoutUpload';
74941
74951
  // 但 Upload 的 name 在 v2 中同时作为 FormData 的键名,为了兼容 v2 行为,
74942
74952
  // 在 name 被移除之前将其作为 htmlName 的 fallback 保存下来。
74943
74953
  var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
74954
+ if (!props.htmlName && typeof props.name === 'string' && props.name !== 'file') {
74955
+ devUseWarning.warn("Upload \u7684 name=\"".concat(props.name, "\" \u4F1A\u4F5C\u4E3A\u4E0A\u4F20\u8BF7\u6C42 FormData \u7684\u5B57\u6BB5\u540D\u3002\u5982\u9700\u4FDD\u6301\u9ED8\u8BA4\u5B57\u6BB5\u540D \"file\"\uFF0C\u8BF7\u663E\u5F0F\u8BBE\u7F6E htmlName=\"file\"\u3002"));
74956
+ }
74944
74957
  return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), {}, {
74945
74958
  htmlName: htmlName
74946
74959
  }, customProps), BaseUpload, 'array');
@@ -74966,6 +74979,7 @@ var upload_image_Image = function Image(props) {
74966
74979
 
74967
74980
 
74968
74981
 
74982
+
74969
74983
  var upload_image_jssStyle = {
74970
74984
  upload: useUploadStyle,
74971
74985
  spin: useSpinStyle,
@@ -74989,6 +75003,9 @@ BaseUploadImage.displayName = 'ShineoutUploadImage';
74989
75003
  // 同 upload.tsx:useFieldCommon 会把 name 从子组件 props 中移除,
74990
75004
  // 提前将其作为 htmlName 的 fallback 保存,以兼容 v2 中 name 作为 FormData 键名的行为。
74991
75005
  var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
75006
+ if (!props.htmlName && typeof props.name === 'string' && props.name !== 'file') {
75007
+ devUseWarning.warn("Upload.Image \u7684 name=\"".concat(props.name, "\" \u4F1A\u4F5C\u4E3A\u4E0A\u4F20\u8BF7\u6C42 FormData \u7684\u5B57\u6BB5\u540D\u3002\u5982\u9700\u4FDD\u6301\u9ED8\u8BA4\u5B57\u6BB5\u540D \"file\"\uFF0C\u8BF7\u663E\u5F0F\u8BBE\u7F6E htmlName=\"file\"\u3002"));
75008
+ }
74992
75009
  return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), {}, {
74993
75010
  htmlName: htmlName
74994
75011
  }, customProps), BaseUploadImage);
@@ -75105,6 +75122,7 @@ var UploadButton = function UploadButton(props) {
75105
75122
 
75106
75123
 
75107
75124
 
75125
+
75108
75126
  var upload_button_jssStyle = {
75109
75127
  upload: useUploadStyle,
75110
75128
  spin: useSpinStyle,
@@ -75120,10 +75138,20 @@ var BaseUploadButton = function BaseUploadButton(props) {
75120
75138
  };
75121
75139
  BaseUploadButton.displayName = 'ShineoutUploadButton';
75122
75140
  /* harmony default export */ var src_upload_button = (function (props) {
75141
+ var _props$htmlName;
75123
75142
  var customProps = use_upload_common({
75124
75143
  rules: props.rules
75125
75144
  });
75126
- return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), customProps), BaseUploadButton);
75145
+
75146
+ // 同 upload.tsx:useFieldCommon 会把 name 从子组件 props 中移除,
75147
+ // 提前将其作为 htmlName 的 fallback 保存,以兼容 v2 中 name 作为 FormData 键名的行为。
75148
+ var htmlName = (_props$htmlName = props.htmlName) !== null && _props$htmlName !== void 0 ? _props$htmlName : typeof props.name === 'string' ? props.name : undefined;
75149
+ if (!props.htmlName && typeof props.name === 'string' && props.name !== 'file') {
75150
+ devUseWarning.warn("Upload.Button \u7684 name=\"".concat(props.name, "\" \u4F1A\u4F5C\u4E3A\u4E0A\u4F20\u8BF7\u6C42 FormData \u7684\u5B57\u6BB5\u540D\u3002\u5982\u9700\u4FDD\u6301\u9ED8\u8BA4\u5B57\u6BB5\u540D \"file\"\uFF0C\u8BF7\u663E\u5F0F\u8BBE\u7F6E htmlName=\"file\"\u3002"));
75151
+ }
75152
+ return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), {}, {
75153
+ htmlName: htmlName
75154
+ }, customProps), BaseUploadButton);
75127
75155
  });
75128
75156
  ;// CONCATENATED MODULE: ../base/src/upload/dragger.tsx
75129
75157
 
@@ -78227,7 +78255,7 @@ var watermark_interface = __webpack_require__(6640);
78227
78255
 
78228
78256
 
78229
78257
  /* harmony default export */ var src_0 = ({
78230
- version: '3.10.0-beta.14'
78258
+ version: '3.10.0-beta.16'
78231
78259
  });
78232
78260
  }();
78233
78261
  /******/ return __webpack_exports__;