shineout 3.8.1-beta.6 → 3.8.1-fix.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.6'
525
+ version: '3.8.1-fix.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.6');
12389
+ /* harmony default export */ var version = ('3.8.1-fix.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,
@@ -36225,19 +36227,18 @@ function useInputAble(props) {
36225
36227
  var render = useRender(syncValue);
36226
36228
  var shouldUseState = delay || !control;
36227
36229
  var value = shouldUseState ? stateValue : valuePo;
36228
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
36229
- if (context.timer) {
36230
- clearTimeout(context.timer);
36231
- context.timer = null;
36232
- }
36230
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
36233
36231
  if (delay && control && props.value !== stateValue) {
36234
36232
  changeStateValue(props.value);
36233
+ } else if (context.timer) {
36234
+ clearTimeout(context.timer);
36235
+ context.timer = null;
36235
36236
  }
36236
36237
  }, [props.value, delay, control]);
36237
36238
  var forceDelayChange = use_persist_fn(function () {
36238
- if (context.timer && context.delayChange) {
36239
+ if (context.delayChange) context.delayChange();
36240
+ if (context.timer) {
36239
36241
  clearTimeout(context.timer);
36240
- context.delayChange();
36241
36242
  context.timer = null;
36242
36243
  context.delayChange = null;
36243
36244
  }
@@ -43920,23 +43921,26 @@ var FormField = function FormField(props) {
43920
43921
  var _useContext3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemContext),
43921
43922
  label = _useContext3.label;
43922
43923
  var finalFieldId = formFieldId || fieldId || fieldsetPathId;
43923
-
43924
- // 只有当 formConfig.formName 存在时才运行 schema 逻辑
43925
- if (formConfig.formName && formSchema && finalFieldId) {
43926
- var schemaFields = finalFieldId.split(separator) || [];
43927
- var schemaMeta = formSchema.buildSchemaFromComponent({
43928
- componentElement: finalChildren,
43929
- rules: props.rules,
43930
- label: label,
43931
- finalFieldId: finalFieldId,
43932
- separator: separator
43933
- });
43934
- schemaFields.forEach(function (field) {
43935
- formSchema.updateSchema({
43936
- path: getOriginField(field, formConfig.formName),
43937
- meta: schemaMeta
43924
+ try {
43925
+ // 只有当 formConfig.formName 存在时才运行 schema 逻辑
43926
+ if (formConfig.formName && formSchema && finalFieldId) {
43927
+ var schemaFields = finalFieldId.split(separator) || [];
43928
+ var schemaMeta = formSchema.buildSchemaFromComponent({
43929
+ componentElement: finalChildren,
43930
+ rules: props.rules,
43931
+ label: label,
43932
+ finalFieldId: finalFieldId,
43933
+ separator: separator
43938
43934
  });
43939
- });
43935
+ schemaFields.forEach(function (field) {
43936
+ formSchema.updateSchema({
43937
+ path: getOriginField(field, formConfig.formName),
43938
+ meta: schemaMeta
43939
+ });
43940
+ });
43941
+ }
43942
+ } catch (error) {
43943
+ if (false) {}
43940
43944
  }
43941
43945
  return /*#__PURE__*/(0,jsx_runtime.jsx)(FormFieldContext.Provider, {
43942
43946
  value: {
@@ -51179,7 +51183,7 @@ var SchemaBuilder = /*#__PURE__*/function () {
51179
51183
  if (typeof format === 'string') {
51180
51184
  var _data$;
51181
51185
  itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]) === 'object' ? typeof_default()(data === null || data === void 0 || (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$[format]) : typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
51182
- } else if (typeof format === 'function') {
51186
+ } else if (typeof format === 'function' && data !== null && data !== void 0 && data[0]) {
51183
51187
  itemType = typeof_default()(format(data === null || data === void 0 ? void 0 : data[0]));
51184
51188
  } else {
51185
51189
  itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
@@ -51248,7 +51252,7 @@ var SchemaBuilder = /*#__PURE__*/function () {
51248
51252
  if (typeof format === 'string') {
51249
51253
  var _data$2;
51250
51254
  itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]) === 'object' ? typeof_default()(data === null || data === void 0 || (_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : _data$2[format]) : typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
51251
- } else if (typeof format === 'function') {
51255
+ } else if (typeof format === 'function' && data !== null && data !== void 0 && data[0]) {
51252
51256
  itemType = typeof_default()(format(data === null || data === void 0 ? void 0 : data[0]));
51253
51257
  } else {
51254
51258
  itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
@@ -51283,7 +51287,7 @@ var SchemaBuilder = /*#__PURE__*/function () {
51283
51287
  if (typeof format === 'string') {
51284
51288
  var _data$3;
51285
51289
  itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]) === 'object' ? typeof_default()(data === null || data === void 0 || (_data$3 = data[0]) === null || _data$3 === void 0 ? void 0 : _data$3[format]) : typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
51286
- } else if (typeof format === 'function') {
51290
+ } else if (typeof format === 'function' && data !== null && data !== void 0 && data[0]) {
51287
51291
  itemType = typeof_default()(format(data === null || data === void 0 ? void 0 : data[0]));
51288
51292
  } else {
51289
51293
  itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
@@ -51291,7 +51295,9 @@ var SchemaBuilder = /*#__PURE__*/function () {
51291
51295
  } else {
51292
51296
  itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
51293
51297
  }
51294
- fieldSchemaInfo.type = itemType;
51298
+ if (itemType !== 'undefined') {
51299
+ fieldSchemaInfo.type = itemType;
51300
+ }
51295
51301
 
51296
51302
  // ShineoutRadioGroup 有 data 时(单选的)
51297
51303
  if (itemType === 'object') {
@@ -73060,7 +73066,7 @@ var upload_interface = __webpack_require__(8821);
73060
73066
 
73061
73067
 
73062
73068
  /* harmony default export */ var src_0 = ({
73063
- version: '3.8.1-beta.6'
73069
+ version: '3.8.1-fix.1'
73064
73070
  });
73065
73071
  }();
73066
73072
  /******/ return __webpack_exports__;