shineout 3.8.1-beta.7 → 3.8.2-beta.1

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
@@ -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.1-beta.7'
525
+ version: '3.8.2-beta.1'
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.1-beta.7');
12389
+ /* harmony default export */ var version = ('3.8.2-beta.1');
12390
12390
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12391
12391
 
12392
12392
 
@@ -33388,12 +33388,14 @@ var Tooltip = function Tooltip(props) {
33388
33388
  var persistent = persistentProp !== null && persistentProp !== void 0 ? persistentProp : (_config$tooltip = config.tooltip) === null || _config$tooltip === void 0 ? void 0 : _config$tooltip.persistent;
33389
33389
  var childrenProps = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children) ? children === null || children === void 0 ? void 0 : children.props : {};
33390
33390
  var delay = props.delay || props.mouseEnterDelay || defaultDelay;
33391
+ var mouseLeaveDelay = props.mouseLeaveDelay || defaultDelay;
33391
33392
  var _usePopup = use_popup({
33392
33393
  position: popsitionProps,
33393
33394
  trigger: trigger,
33394
33395
  autoMode: 'popover',
33395
33396
  priorityDirection: priorityDirection,
33396
33397
  mouseEnterDelay: delay,
33398
+ mouseLeaveDelay: mouseLeaveDelay,
33397
33399
  targetEvents: disabledChild ? {} : childrenProps
33398
33400
  }),
33399
33401
  open = _usePopup.open,
@@ -51116,6 +51118,19 @@ var SchemaBuilder = /*#__PURE__*/function () {
51116
51118
  };
51117
51119
  }
51118
51120
  createClass_default()(SchemaBuilder, [{
51121
+ key: "mapEnumData",
51122
+ value: function mapEnumData(data, format) {
51123
+ return data.map(function (item) {
51124
+ if (typeof format === 'string') {
51125
+ return item ? item[format] : item;
51126
+ } else if (typeof format === 'function' && item) {
51127
+ return format(item);
51128
+ } else {
51129
+ return item;
51130
+ }
51131
+ });
51132
+ }
51133
+ }, {
51119
51134
  key: "updateSchema",
51120
51135
  value: function updateSchema(_ref) {
51121
51136
  var path = _ref.path,
@@ -51192,11 +51207,9 @@ var SchemaBuilder = /*#__PURE__*/function () {
51192
51207
  }
51193
51208
  if (componentElement.props.multiple) {
51194
51209
  fieldSchemaInfo.type = 'array';
51195
- if (itemType !== 'undefined') {
51196
- fieldSchemaInfo.items = {
51197
- type: itemType
51198
- };
51199
- }
51210
+ fieldSchemaInfo.items = {
51211
+ type: itemType !== 'undefined' ? itemType : 'string'
51212
+ };
51200
51213
  } else {
51201
51214
  if (itemType !== 'undefined') {
51202
51215
  fieldSchemaInfo.type = itemType;
@@ -51220,9 +51233,10 @@ var SchemaBuilder = /*#__PURE__*/function () {
51220
51233
  });
51221
51234
  }
51222
51235
  } else {
51223
- fieldSchemaInfo.enum = componentElement.props.data.map(function (item) {
51224
- return (item === null || item === void 0 ? void 0 : item[format]) || item;
51225
- });
51236
+ var enumData = this.mapEnumData(componentElement.props.data, format);
51237
+ if (enumData.length > 0) {
51238
+ fieldSchemaInfo.enum = enumData;
51239
+ }
51226
51240
  }
51227
51241
  break;
51228
51242
  }
@@ -51273,9 +51287,7 @@ var SchemaBuilder = /*#__PURE__*/function () {
51273
51287
  };
51274
51288
  });
51275
51289
  } else {
51276
- fieldSchemaInfo.items.enum = componentElement.props.data.map(function (item) {
51277
- return (item === null || item === void 0 ? void 0 : item[format]) || item;
51278
- });
51290
+ fieldSchemaInfo.items.enum = this.mapEnumData(componentElement.props.data, format);
51279
51291
  }
51280
51292
  break;
51281
51293
  }
@@ -51307,9 +51319,7 @@ var SchemaBuilder = /*#__PURE__*/function () {
51307
51319
  };
51308
51320
  });
51309
51321
  } else {
51310
- fieldSchemaInfo.enum = componentElement.props.data.map(function (item) {
51311
- return (item === null || item === void 0 ? void 0 : item[format]) || item;
51312
- });
51322
+ fieldSchemaInfo.enum = this.mapEnumData(componentElement.props.data, format);
51313
51323
  }
51314
51324
  break;
51315
51325
  }
@@ -73065,7 +73075,7 @@ var upload_interface = __webpack_require__(8821);
73065
73075
 
73066
73076
 
73067
73077
  /* harmony default export */ var src_0 = ({
73068
- version: '3.8.1-beta.7'
73078
+ version: '3.8.2-beta.1'
73069
73079
  });
73070
73080
  }();
73071
73081
  /******/ return __webpack_exports__;