@teamix/pro 1.4.13 → 1.4.14

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/dist/pro.js CHANGED
@@ -72911,7 +72911,7 @@ var TagSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(f
72911
72911
  /* harmony import */ var _components_FieldMenuSelect__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(26229);
72912
72912
  /* harmony import */ var _components_FieldSelectGroup__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(98203);
72913
72913
  /* harmony import */ var _commonComponents__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(76457);
72914
- var _excluded = ["dataSource", "state", "tooltip", "tooltipLabel", "tooltipIcon", "tooltipIconSize"];
72914
+ var _excluded = ["dataSource", "state", "tooltip", "tooltipLabel", "tooltipIcon", "tooltipIconSize", "className", "style"];
72915
72915
 
72916
72916
  function ownKeys(object, enumerableOnly) {
72917
72917
  var keys = Object.keys(object);
@@ -73145,10 +73145,10 @@ function isDataSourceRemote(dataSource) {
73145
73145
  }
73146
73146
 
73147
73147
  var ProField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef(function (props, ref) {
73148
- var _getGlobalConfig, _transparentBase$clas, _cls;
73148
+ var _getGlobalConfig, _cls;
73149
73149
 
73150
73150
  var type = props.type,
73151
- layout = props.layout;
73151
+ layout = props.layout; // TODO 此处暂时移出className、style、data-。日后只透传需要的参数
73152
73152
 
73153
73153
  var dataSource = props.dataSource,
73154
73154
  state = props.state,
@@ -73156,6 +73156,8 @@ var ProField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forward
73156
73156
  tooltipLabel = props.tooltipLabel,
73157
73157
  tooltipIcon = props.tooltipIcon,
73158
73158
  tooltipIconSize = props.tooltipIconSize,
73159
+ className = props.className,
73160
+ style = props.style,
73159
73161
  others = _objectWithoutProperties(props, _excluded);
73160
73162
 
73161
73163
  var proFieldRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(); // 注册全局自定义组件
@@ -73184,23 +73186,35 @@ var ProField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forward
73184
73186
  setLoadingRemote(false);
73185
73187
  });
73186
73188
  }
73187
- }, []);
73189
+ }, []); // TODO 目前先取出,后续直接透传最外层
73190
+
73191
+ var dataProps = Object.fromEntries(Object.entries(others).filter(function (_ref) {
73192
+ var _ref2 = _slicedToArray(_ref, 1),
73193
+ k = _ref2[0];
73194
+
73195
+ return /data-.+/.test(k);
73196
+ }));
73188
73197
 
73189
73198
  var newProps = _objectSpread({
73190
73199
  state: loadingRemote ? 'loading' : state,
73191
73200
  dataSource: loadingRemote ? [] : remoteDataSource || dataSource
73192
- }, others); // 此处暂时作为透传。日后会重构透传逻辑
73201
+ }, Object.fromEntries(Object.entries(others).filter(function (_ref3) {
73202
+ var _ref4 = _slicedToArray(_ref3, 1),
73203
+ k = _ref4[0];
73204
+
73205
+ return !/data-.+/.test(k);
73206
+ }))); // 此处暂时作为透传。日后会重构透传逻辑
73193
73207
 
73194
73208
 
73195
73209
  var transparentBase = newProps;
73196
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _objectSpread(_objectSpread({
73210
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _objectSpread(_objectSpread(_objectSpread({
73197
73211
  className: classnames__WEBPACK_IMPORTED_MODULE_1___default()((_cls = {
73198
73212
  'teamix-pro-field': true
73199
- }, _defineProperty(_cls, "teamix-pro-field-".concat(type === null || type === void 0 ? void 0 : type.toLowerCase()), true), _defineProperty(_cls, 'teamix-pro-field-compact', layout === 'compact'), _defineProperty(_cls, (_transparentBase$clas = transparentBase.className) !== null && _transparentBase$clas !== void 0 ? _transparentBase$clas : '', true), _defineProperty(_cls, 'teamix-pro-field-tooltip', tooltip), _defineProperty(_cls, 'teamix-test-request', isDataSourceRemote(dataSource)), _cls)),
73213
+ }, _defineProperty(_cls, "teamix-pro-field-".concat(type === null || type === void 0 ? void 0 : type.toLowerCase()), true), _defineProperty(_cls, 'teamix-pro-field-compact', layout === 'compact'), _defineProperty(_cls, 'teamix-pro-field-tooltip', tooltip), _defineProperty(_cls, 'teamix-test-request', isDataSourceRemote(dataSource)), _defineProperty(_cls, className, className), _cls)),
73200
73214
  ref: proFieldRef
73201
73215
  }, (0,_utils__WEBPACK_IMPORTED_MODULE_23__/* .hasProps */ .s_)({
73202
- style: transparentBase === null || transparentBase === void 0 ? void 0 : transparentBase.style
73203
- })), isDataSourceRemote(dataSource) ? {
73216
+ style: style
73217
+ })), dataProps), isDataSourceRemote(dataSource) ? {
73204
73218
  'data-teamix-test-request': "url=".concat(dataSource === null || dataSource === void 0 ? void 0 : dataSource.url, "&formatResult=").concat(!!(dataSource === null || dataSource === void 0 ? void 0 : dataSource.formatResult)),
73205
73219
  'data-teamix-test-params': (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_3__.getTestRequestParams)(dataSource === null || dataSource === void 0 ? void 0 : dataSource.params),
73206
73220
  'data-teamix-test-data': (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_3__.getTestRequestData)('dataSource')
@@ -82474,7 +82488,7 @@ if (!((_window = window) != null && _window.TEAMIXPRO_WITHOUT_ICON)) {
82474
82488
 
82475
82489
 
82476
82490
 
82477
- var version = '1.4.13';
82491
+ var version = '1.4.14';
82478
82492
 
82479
82493
 
82480
82494
  /***/ }),