@douyinfe/semi-ui 2.53.3-alpha.1 → 2.54.0-beta.0

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.
Files changed (39) hide show
  1. package/dist/css/semi.css +9 -0
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +603 -438
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/cascader/index.d.ts +3 -0
  8. package/lib/cjs/cascader/index.js +11 -4
  9. package/lib/cjs/collapsible/index.d.ts +1 -0
  10. package/lib/cjs/collapsible/index.js +4 -3
  11. package/lib/cjs/descriptions/descriptions-context.d.ts +2 -0
  12. package/lib/cjs/descriptions/index.d.ts +17 -4
  13. package/lib/cjs/descriptions/index.js +52 -16
  14. package/lib/cjs/descriptions/item.d.ts +1 -0
  15. package/lib/cjs/descriptions/item.js +20 -13
  16. package/lib/cjs/image/interface.d.ts +1 -0
  17. package/lib/cjs/image/previewInner.js +6 -0
  18. package/lib/cjs/modal/Modal.d.ts +4 -4
  19. package/lib/cjs/modal/Modal.js +12 -11
  20. package/lib/cjs/modal/confirm.d.ts +1 -1
  21. package/lib/cjs/toast/index.js +3 -0
  22. package/lib/cjs/typography/base.js +3 -3
  23. package/lib/es/cascader/index.d.ts +3 -0
  24. package/lib/es/cascader/index.js +11 -4
  25. package/lib/es/collapsible/index.d.ts +1 -0
  26. package/lib/es/collapsible/index.js +4 -3
  27. package/lib/es/descriptions/descriptions-context.d.ts +2 -0
  28. package/lib/es/descriptions/index.d.ts +17 -4
  29. package/lib/es/descriptions/index.js +52 -14
  30. package/lib/es/descriptions/item.d.ts +1 -0
  31. package/lib/es/descriptions/item.js +20 -13
  32. package/lib/es/image/interface.d.ts +1 -0
  33. package/lib/es/image/previewInner.js +6 -0
  34. package/lib/es/modal/Modal.d.ts +4 -4
  35. package/lib/es/modal/Modal.js +12 -11
  36. package/lib/es/modal/confirm.d.ts +1 -1
  37. package/lib/es/toast/index.js +3 -0
  38. package/lib/es/typography/base.js +3 -3
  39. package/package.json +8 -8
@@ -3062,367 +3062,6 @@ function toDate(argument) {
3062
3062
  }
3063
3063
  module.exports = exports.default;
3064
3064
 
3065
- /***/ }),
3066
-
3067
- /***/ "Q0m1":
3068
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
3069
-
3070
- (function (global, factory) {
3071
- true ? module.exports = factory() :
3072
- 0;
3073
- })(this, (function () { 'use strict';
3074
-
3075
- var toStringFunction = Function.prototype.toString;
3076
- var create = Object.create, defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols, getPrototypeOf$1 = Object.getPrototypeOf;
3077
- var _a = Object.prototype, hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
3078
- var SYMBOL_PROPERTIES = typeof getOwnPropertySymbols === 'function';
3079
- var WEAK_MAP = typeof WeakMap === 'function';
3080
- /**
3081
- * @function createCache
3082
- *
3083
- * @description
3084
- * get a new cache object to prevent circular references
3085
- *
3086
- * @returns the new cache object
3087
- */
3088
- var createCache = (function () {
3089
- if (WEAK_MAP) {
3090
- return function () { return new WeakMap(); };
3091
- }
3092
- var Cache = /** @class */ (function () {
3093
- function Cache() {
3094
- this._keys = [];
3095
- this._values = [];
3096
- }
3097
- Cache.prototype.has = function (key) {
3098
- return !!~this._keys.indexOf(key);
3099
- };
3100
- Cache.prototype.get = function (key) {
3101
- return this._values[this._keys.indexOf(key)];
3102
- };
3103
- Cache.prototype.set = function (key, value) {
3104
- this._keys.push(key);
3105
- this._values.push(value);
3106
- };
3107
- return Cache;
3108
- }());
3109
- return function () { return new Cache(); };
3110
- })();
3111
- /**
3112
- * @function getCleanClone
3113
- *
3114
- * @description
3115
- * get an empty version of the object with the same prototype it has
3116
- *
3117
- * @param object the object to build a clean clone from
3118
- * @param realm the realm the object resides in
3119
- * @returns the empty cloned object
3120
- */
3121
- var getCleanClone = function (object, realm) {
3122
- var prototype = object.__proto__ || getPrototypeOf$1(object);
3123
- if (!prototype) {
3124
- return create(null);
3125
- }
3126
- var Constructor = prototype.constructor;
3127
- if (Constructor === realm.Object) {
3128
- return prototype === realm.Object.prototype ? {} : create(prototype);
3129
- }
3130
- if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
3131
- try {
3132
- return new Constructor();
3133
- }
3134
- catch (_a) { }
3135
- }
3136
- return create(prototype);
3137
- };
3138
- /**
3139
- * @function getObjectCloneLoose
3140
- *
3141
- * @description
3142
- * get a copy of the object based on loose rules, meaning all enumerable keys
3143
- * and symbols are copied, but property descriptors are not considered
3144
- *
3145
- * @param object the object to clone
3146
- * @param realm the realm the object resides in
3147
- * @param handleCopy the function that handles copying the object
3148
- * @returns the copied object
3149
- */
3150
- var getObjectCloneLoose = function (object, realm, handleCopy, cache) {
3151
- var clone = getCleanClone(object, realm);
3152
- // set in the cache immediately to be able to reuse the object recursively
3153
- cache.set(object, clone);
3154
- for (var key in object) {
3155
- if (hasOwnProperty.call(object, key)) {
3156
- clone[key] = handleCopy(object[key], cache);
3157
- }
3158
- }
3159
- if (SYMBOL_PROPERTIES) {
3160
- var symbols = getOwnPropertySymbols(object);
3161
- for (var index = 0, length_1 = symbols.length, symbol = void 0; index < length_1; ++index) {
3162
- symbol = symbols[index];
3163
- if (propertyIsEnumerable.call(object, symbol)) {
3164
- clone[symbol] = handleCopy(object[symbol], cache);
3165
- }
3166
- }
3167
- }
3168
- return clone;
3169
- };
3170
- /**
3171
- * @function getObjectCloneStrict
3172
- *
3173
- * @description
3174
- * get a copy of the object based on strict rules, meaning all keys and symbols
3175
- * are copied based on the original property descriptors
3176
- *
3177
- * @param object the object to clone
3178
- * @param realm the realm the object resides in
3179
- * @param handleCopy the function that handles copying the object
3180
- * @returns the copied object
3181
- */
3182
- var getObjectCloneStrict = function (object, realm, handleCopy, cache) {
3183
- var clone = getCleanClone(object, realm);
3184
- // set in the cache immediately to be able to reuse the object recursively
3185
- cache.set(object, clone);
3186
- var properties = SYMBOL_PROPERTIES
3187
- ? getOwnPropertyNames(object).concat(getOwnPropertySymbols(object))
3188
- : getOwnPropertyNames(object);
3189
- for (var index = 0, length_2 = properties.length, property = void 0, descriptor = void 0; index < length_2; ++index) {
3190
- property = properties[index];
3191
- if (property !== 'callee' && property !== 'caller') {
3192
- descriptor = getOwnPropertyDescriptor(object, property);
3193
- if (descriptor) {
3194
- // Only clone the value if actually a value, not a getter / setter.
3195
- if (!descriptor.get && !descriptor.set) {
3196
- descriptor.value = handleCopy(object[property], cache);
3197
- }
3198
- try {
3199
- defineProperty(clone, property, descriptor);
3200
- }
3201
- catch (error) {
3202
- // Tee above can fail on node in edge cases, so fall back to the loose assignment.
3203
- clone[property] = descriptor.value;
3204
- }
3205
- }
3206
- else {
3207
- // In extra edge cases where the property descriptor cannot be retrived, fall back to
3208
- // the loose assignment.
3209
- clone[property] = handleCopy(object[property], cache);
3210
- }
3211
- }
3212
- }
3213
- return clone;
3214
- };
3215
- /**
3216
- * @function getRegExpFlags
3217
- *
3218
- * @description
3219
- * get the flags to apply to the copied regexp
3220
- *
3221
- * @param regExp the regexp to get the flags of
3222
- * @returns the flags for the regexp
3223
- */
3224
- var getRegExpFlags = function (regExp) {
3225
- var flags = '';
3226
- if (regExp.global) {
3227
- flags += 'g';
3228
- }
3229
- if (regExp.ignoreCase) {
3230
- flags += 'i';
3231
- }
3232
- if (regExp.multiline) {
3233
- flags += 'm';
3234
- }
3235
- if (regExp.unicode) {
3236
- flags += 'u';
3237
- }
3238
- if (regExp.sticky) {
3239
- flags += 'y';
3240
- }
3241
- return flags;
3242
- };
3243
-
3244
- // utils
3245
- var isArray = Array.isArray;
3246
- var getPrototypeOf = Object.getPrototypeOf;
3247
- var GLOBAL_THIS = (function () {
3248
- if (typeof globalThis !== 'undefined') {
3249
- return globalThis;
3250
- }
3251
- if (typeof self !== 'undefined') {
3252
- return self;
3253
- }
3254
- if (typeof window !== 'undefined') {
3255
- return window;
3256
- }
3257
- if (typeof __webpack_require__.g !== 'undefined') {
3258
- return __webpack_require__.g;
3259
- }
3260
- if (console && console.error) {
3261
- console.error('Unable to locate global object, returning "this".');
3262
- }
3263
- return this;
3264
- })();
3265
- /**
3266
- * @function copy
3267
- *
3268
- * @description
3269
- * copy an value deeply as much as possible
3270
- *
3271
- * If `strict` is applied, then all properties (including non-enumerable ones)
3272
- * are copied with their original property descriptors on both objects and arrays.
3273
- *
3274
- * The value is compared to the global constructors in the `realm` provided,
3275
- * and the native constructor is always used to ensure that extensions of native
3276
- * objects (allows in ES2015+) are maintained.
3277
- *
3278
- * @param value the value to copy
3279
- * @param [options] the options for copying with
3280
- * @param [options.isStrict] should the copy be strict
3281
- * @param [options.realm] the realm (this) value the value is copied from
3282
- * @returns the copied value
3283
- */
3284
- function copy(value, options) {
3285
- // manually coalesced instead of default parameters for performance
3286
- var isStrict = !!(options && options.isStrict);
3287
- var realm = (options && options.realm) || GLOBAL_THIS;
3288
- var getObjectClone = isStrict ? getObjectCloneStrict : getObjectCloneLoose;
3289
- /**
3290
- * @function handleCopy
3291
- *
3292
- * @description
3293
- * copy the value recursively based on its type
3294
- *
3295
- * @param value the value to copy
3296
- * @returns the copied value
3297
- */
3298
- var handleCopy = function (value, cache) {
3299
- if (!value || typeof value !== 'object') {
3300
- return value;
3301
- }
3302
- if (cache.has(value)) {
3303
- return cache.get(value);
3304
- }
3305
- var prototype = value.__proto__ || getPrototypeOf(value);
3306
- var Constructor = prototype && prototype.constructor;
3307
- // plain objects
3308
- if (!Constructor || Constructor === realm.Object) {
3309
- return getObjectClone(value, realm, handleCopy, cache);
3310
- }
3311
- var clone;
3312
- // arrays
3313
- if (isArray(value)) {
3314
- // if strict, include non-standard properties
3315
- if (isStrict) {
3316
- return getObjectCloneStrict(value, realm, handleCopy, cache);
3317
- }
3318
- clone = new Constructor();
3319
- cache.set(value, clone);
3320
- for (var index = 0, length_1 = value.length; index < length_1; ++index) {
3321
- clone[index] = handleCopy(value[index], cache);
3322
- }
3323
- return clone;
3324
- }
3325
- // dates
3326
- if (value instanceof realm.Date) {
3327
- return new Constructor(value.getTime());
3328
- }
3329
- // regexps
3330
- if (value instanceof realm.RegExp) {
3331
- clone = new Constructor(value.source, value.flags || getRegExpFlags(value));
3332
- clone.lastIndex = value.lastIndex;
3333
- return clone;
3334
- }
3335
- // maps
3336
- if (realm.Map && value instanceof realm.Map) {
3337
- clone = new Constructor();
3338
- cache.set(value, clone);
3339
- value.forEach(function (value, key) {
3340
- clone.set(key, handleCopy(value, cache));
3341
- });
3342
- return clone;
3343
- }
3344
- // sets
3345
- if (realm.Set && value instanceof realm.Set) {
3346
- clone = new Constructor();
3347
- cache.set(value, clone);
3348
- value.forEach(function (value) {
3349
- clone.add(handleCopy(value, cache));
3350
- });
3351
- return clone;
3352
- }
3353
- // blobs
3354
- if (realm.Blob && value instanceof realm.Blob) {
3355
- return value.slice(0, value.size, value.type);
3356
- }
3357
- // buffers (node-only)
3358
- if (realm.Buffer && realm.Buffer.isBuffer(value)) {
3359
- clone = realm.Buffer.allocUnsafe
3360
- ? realm.Buffer.allocUnsafe(value.length)
3361
- : new Constructor(value.length);
3362
- cache.set(value, clone);
3363
- value.copy(clone);
3364
- return clone;
3365
- }
3366
- // arraybuffers / dataviews
3367
- if (realm.ArrayBuffer) {
3368
- // dataviews
3369
- if (realm.ArrayBuffer.isView(value)) {
3370
- clone = new Constructor(value.buffer.slice(0));
3371
- cache.set(value, clone);
3372
- return clone;
3373
- }
3374
- // arraybuffers
3375
- if (value instanceof realm.ArrayBuffer) {
3376
- clone = value.slice(0);
3377
- cache.set(value, clone);
3378
- return clone;
3379
- }
3380
- }
3381
- // if the value cannot / should not be cloned, don't
3382
- if (
3383
- // promise-like
3384
- typeof value.then === 'function' ||
3385
- // errors
3386
- value instanceof Error ||
3387
- // weakmaps
3388
- (realm.WeakMap && value instanceof realm.WeakMap) ||
3389
- // weaksets
3390
- (realm.WeakSet && value instanceof realm.WeakSet)) {
3391
- return value;
3392
- }
3393
- // assume anything left is a custom constructor
3394
- return getObjectClone(value, realm, handleCopy, cache);
3395
- };
3396
- return handleCopy(value, createCache());
3397
- }
3398
- // Adding reference to allow usage in CommonJS libraries compiled using TSC, which
3399
- // expects there to be a default property on the exported value. See
3400
- // [#37](https://github.com/planttheidea/fast-copy/issues/37) for details.
3401
- copy.default = copy;
3402
- /**
3403
- * @function strictCopy
3404
- *
3405
- * @description
3406
- * copy the value with `strict` option pre-applied
3407
- *
3408
- * @param value the value to copy
3409
- * @param [options] the options for copying with
3410
- * @param [options.realm] the realm (this) value the value is copied from
3411
- * @returns the copied value
3412
- */
3413
- copy.strict = function strictCopy(value, options) {
3414
- return copy(value, {
3415
- isStrict: true,
3416
- realm: options ? options.realm : void 0,
3417
- });
3418
- };
3419
-
3420
- return copy;
3421
-
3422
- }));
3423
- //# sourceMappingURL=fast-copy.js.map
3424
-
3425
-
3426
3065
  /***/ }),
3427
3066
 
3428
3067
  /***/ "QF3D":
@@ -17522,7 +17161,7 @@ module.exports = exports.default;
17522
17161
  /******/ };
17523
17162
  /******/
17524
17163
  /******/ // Execute the module function
17525
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
17164
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
17526
17165
  /******/
17527
17166
  /******/ // Flag the module as loaded
17528
17167
  /******/ module.loaded = true;
@@ -23622,7 +23261,7 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
23622
23261
  ellipsisContent: props.children,
23623
23262
  expanded: false,
23624
23263
  // if text is truncated with js
23625
- isTruncated: true,
23264
+ isTruncated: false,
23626
23265
  prevChildren: null
23627
23266
  };
23628
23267
  this.wrapperRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();
@@ -23643,10 +23282,10 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
23643
23282
  newState.prevChildren = props.children;
23644
23283
  if (props.ellipsis && prevChildren !== props.children) {
23645
23284
  // reset ellipsis state if children update
23646
- newState.isOverflowed = true;
23285
+ newState.isOverflowed = false;
23647
23286
  newState.ellipsisContent = props.children;
23648
23287
  newState.expanded = false;
23649
- newState.isTruncated = true;
23288
+ newState.isTruncated = false;
23650
23289
  }
23651
23290
  return newState;
23652
23291
  }
@@ -36747,7 +36386,9 @@ const cascader_constants_strings = {
36747
36386
  /* Merge Type */
36748
36387
  LEAF_ONLY_MERGE_TYPE: 'leafOnly',
36749
36388
  AUTO_MERGE_VALUE_MERGE_TYPE: 'autoMergeValue',
36750
- NONE_MERGE_TYPE: 'none'
36389
+ NONE_MERGE_TYPE: 'none',
36390
+ SEARCH_POSITION_TRIGGER: 'trigger',
36391
+ SEARCH_POSITION_CUSTOM: 'custom'
36751
36392
  };
36752
36393
  const cascader_constants_numbers = {};
36753
36394
 
@@ -47408,6 +47049,10 @@ const resetkey = 0;
47408
47049
  class Cascader extends BaseComponent {
47409
47050
  constructor(props) {
47410
47051
  super(props);
47052
+ // ref method
47053
+ this.search = value => {
47054
+ this.handleInputChange(value);
47055
+ };
47411
47056
  this.handleInputChange = value => {
47412
47057
  this.foundation.handleInputChange(value);
47413
47058
  };
@@ -47594,12 +47239,13 @@ class Cascader extends BaseComponent {
47594
47239
  const {
47595
47240
  placeholder,
47596
47241
  filterTreeNode,
47597
- multiple
47242
+ multiple,
47243
+ searchPosition
47598
47244
  } = this.props;
47599
47245
  const {
47600
47246
  checkedKeys
47601
47247
  } = this.state;
47602
- const searchable = Boolean(filterTreeNode);
47248
+ const searchable = Boolean(filterTreeNode) && searchPosition === cascader_constants_strings.SEARCH_POSITION_TRIGGER;
47603
47249
  if (!searchable) {
47604
47250
  if (multiple) {
47605
47251
  if (checkedKeys.size === 0) {
@@ -48359,7 +48005,8 @@ Cascader.propTypes = {
48359
48005
  leafOnly: (prop_types_default()).bool,
48360
48006
  enableLeafClick: (prop_types_default()).bool,
48361
48007
  preventScroll: (prop_types_default()).bool,
48362
- position: (prop_types_default()).string
48008
+ position: (prop_types_default()).string,
48009
+ searchPosition: (prop_types_default()).string
48363
48010
  };
48364
48011
  Cascader.defaultProps = getDefaultPropsFromGlobalConfig(Cascader.__SemiComponentName__, {
48365
48012
  borderless: false,
@@ -48390,7 +48037,8 @@ Cascader.defaultProps = getDefaultPropsFromGlobalConfig(Cascader.__SemiComponent
48390
48037
  onDropdownVisibleChange: (noop_default()),
48391
48038
  onListScroll: (noop_default()),
48392
48039
  enableLeafClick: false,
48393
- 'aria-label': 'Cascader'
48040
+ 'aria-label': 'Cascader',
48041
+ searchPosition: cascader_constants_strings.SEARCH_POSITION_TRIGGER
48394
48042
  });
48395
48043
  /* harmony default export */ const cascader_0 = (Cascader);
48396
48044
  ;// CONCATENATED MODULE: ../semi-foundation/collapse/constants.ts
@@ -48503,9 +48151,8 @@ class Collapsible extends BaseComponent {
48503
48151
  this.isChildrenInRenderTree = () => {
48504
48152
  if (this.domRef.current) {
48505
48153
  return this.domRef.current.offsetHeight > 0;
48506
- } else {
48507
- return false;
48508
48154
  }
48155
+ return false;
48509
48156
  };
48510
48157
  this.state = {
48511
48158
  domInRenderTree: false,
@@ -48589,6 +48236,7 @@ class Collapsible extends BaseComponent {
48589
48236
  const wrapperCls = classnames_default()(`${collapsible_constants_cssClasses.PREFIX}-wrapper`, {
48590
48237
  [`${collapsible_constants_cssClasses.PREFIX}-transition`]: this.props.motion && this.state.isTransitioning
48591
48238
  }, this.props.className);
48239
+ const shouldRender = this.props.keepDOM && !this.props.lazyRender || this.props.collapseHeight !== 0 || this.state.visible || this.props.isOpen;
48592
48240
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({
48593
48241
  className: wrapperCls,
48594
48242
  style: wrapperStyle,
@@ -48607,7 +48255,7 @@ class Collapsible extends BaseComponent {
48607
48255
  overflow: 'hidden'
48608
48256
  },
48609
48257
  id: this.props.id
48610
- }, (this.props.keepDOM || this.props.collapseHeight !== 0 || this.state.visible || this.props.isOpen) && this.props.children));
48258
+ }, shouldRender && this.props.children));
48611
48259
  }
48612
48260
  }
48613
48261
  Collapsible.__SemiComponentName__ = "Collapsible";
@@ -48616,6 +48264,7 @@ Collapsible.defaultProps = getDefaultPropsFromGlobalConfig(Collapsible.__SemiCom
48616
48264
  duration: 250,
48617
48265
  motion: true,
48618
48266
  keepDOM: false,
48267
+ lazyRender: true,
48619
48268
  collapseHeight: 0,
48620
48269
  fade: false
48621
48270
  });
@@ -54350,9 +53999,406 @@ function getDefaultPickerDate(options) {
54350
53999
  nextDate: nextDate
54351
54000
  };
54352
54001
  }
54353
- // EXTERNAL MODULE: ../../node_modules/fast-copy/dist/fast-copy.js
54354
- var fast_copy = __webpack_require__("Q0m1");
54355
- var fast_copy_default = /*#__PURE__*/__webpack_require__.n(fast_copy);
54002
+ ;// CONCATENATED MODULE: ../../node_modules/fast-copy/dist/esm/index.mjs
54003
+ var toStringFunction = Function.prototype.toString;
54004
+ var create = Object.create;
54005
+ var toStringObject = Object.prototype.toString;
54006
+ /**
54007
+ * @classdesc Fallback cache for when WeakMap is not natively supported
54008
+ */
54009
+ var LegacyCache = /** @class */ (function () {
54010
+ function LegacyCache() {
54011
+ this._keys = [];
54012
+ this._values = [];
54013
+ }
54014
+ LegacyCache.prototype.has = function (key) {
54015
+ return !!~this._keys.indexOf(key);
54016
+ };
54017
+ LegacyCache.prototype.get = function (key) {
54018
+ return this._values[this._keys.indexOf(key)];
54019
+ };
54020
+ LegacyCache.prototype.set = function (key, value) {
54021
+ this._keys.push(key);
54022
+ this._values.push(value);
54023
+ };
54024
+ return LegacyCache;
54025
+ }());
54026
+ function createCacheLegacy() {
54027
+ return new LegacyCache();
54028
+ }
54029
+ function createCacheModern() {
54030
+ return new WeakMap();
54031
+ }
54032
+ /**
54033
+ * Get a new cache object to prevent circular references.
54034
+ */
54035
+ var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
54036
+ /**
54037
+ * Get an empty version of the object with the same prototype it has.
54038
+ */
54039
+ function getCleanClone(prototype) {
54040
+ if (!prototype) {
54041
+ return create(null);
54042
+ }
54043
+ var Constructor = prototype.constructor;
54044
+ if (Constructor === Object) {
54045
+ return prototype === Object.prototype ? {} : create(prototype);
54046
+ }
54047
+ if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
54048
+ try {
54049
+ return new Constructor();
54050
+ }
54051
+ catch (_a) { }
54052
+ }
54053
+ return create(prototype);
54054
+ }
54055
+ function getRegExpFlagsLegacy(regExp) {
54056
+ var flags = '';
54057
+ if (regExp.global) {
54058
+ flags += 'g';
54059
+ }
54060
+ if (regExp.ignoreCase) {
54061
+ flags += 'i';
54062
+ }
54063
+ if (regExp.multiline) {
54064
+ flags += 'm';
54065
+ }
54066
+ if (regExp.unicode) {
54067
+ flags += 'u';
54068
+ }
54069
+ if (regExp.sticky) {
54070
+ flags += 'y';
54071
+ }
54072
+ return flags;
54073
+ }
54074
+ function getRegExpFlagsModern(regExp) {
54075
+ return regExp.flags;
54076
+ }
54077
+ /**
54078
+ * Get the flags to apply to the copied regexp.
54079
+ */
54080
+ var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
54081
+ function getTagLegacy(value) {
54082
+ var type = toStringObject.call(value);
54083
+ return type.substring(8, type.length - 1);
54084
+ }
54085
+ function getTagModern(value) {
54086
+ return value[Symbol.toStringTag] || getTagLegacy(value);
54087
+ }
54088
+ /**
54089
+ * Get the tag of the value passed, so that the correct copier can be used.
54090
+ */
54091
+ var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
54092
+
54093
+ var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
54094
+ var _a = Object.prototype, esm_hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
54095
+ var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
54096
+ function getStrictPropertiesModern(object) {
54097
+ return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
54098
+ }
54099
+ /**
54100
+ * Get the properites used when copying objects strictly. This includes both keys and symbols.
54101
+ */
54102
+ var getStrictProperties = SUPPORTS_SYMBOL
54103
+ ? getStrictPropertiesModern
54104
+ : getOwnPropertyNames;
54105
+ /**
54106
+ * Striclty copy all properties contained on the object.
54107
+ */
54108
+ function copyOwnPropertiesStrict(value, clone, state) {
54109
+ var properties = getStrictProperties(value);
54110
+ for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
54111
+ property = properties[index];
54112
+ if (property === 'callee' || property === 'caller') {
54113
+ continue;
54114
+ }
54115
+ descriptor = getOwnPropertyDescriptor(value, property);
54116
+ if (!descriptor) {
54117
+ // In extra edge cases where the property descriptor cannot be retrived, fall back to
54118
+ // the loose assignment.
54119
+ clone[property] = state.copier(value[property], state);
54120
+ continue;
54121
+ }
54122
+ // Only clone the value if actually a value, not a getter / setter.
54123
+ if (!descriptor.get && !descriptor.set) {
54124
+ descriptor.value = state.copier(descriptor.value, state);
54125
+ }
54126
+ try {
54127
+ defineProperty(clone, property, descriptor);
54128
+ }
54129
+ catch (error) {
54130
+ // Tee above can fail on node in edge cases, so fall back to the loose assignment.
54131
+ clone[property] = descriptor.value;
54132
+ }
54133
+ }
54134
+ return clone;
54135
+ }
54136
+ /**
54137
+ * Deeply copy the indexed values in the array.
54138
+ */
54139
+ function copyArrayLoose(array, state) {
54140
+ var clone = new state.Constructor();
54141
+ // set in the cache immediately to be able to reuse the object recursively
54142
+ state.cache.set(array, clone);
54143
+ for (var index = 0, length_2 = array.length; index < length_2; ++index) {
54144
+ clone[index] = state.copier(array[index], state);
54145
+ }
54146
+ return clone;
54147
+ }
54148
+ /**
54149
+ * Deeply copy the indexed values in the array, as well as any custom properties.
54150
+ */
54151
+ function copyArrayStrict(array, state) {
54152
+ var clone = new state.Constructor();
54153
+ // set in the cache immediately to be able to reuse the object recursively
54154
+ state.cache.set(array, clone);
54155
+ return copyOwnPropertiesStrict(array, clone, state);
54156
+ }
54157
+ /**
54158
+ * Copy the contents of the ArrayBuffer.
54159
+ */
54160
+ function copyArrayBuffer(arrayBuffer, _state) {
54161
+ return arrayBuffer.slice(0);
54162
+ }
54163
+ /**
54164
+ * Create a new Blob with the contents of the original.
54165
+ */
54166
+ function copyBlob(blob, _state) {
54167
+ return blob.slice(0, blob.size, blob.type);
54168
+ }
54169
+ /**
54170
+ * Create a new DataView with the contents of the original.
54171
+ */
54172
+ function copyDataView(dataView, state) {
54173
+ return new state.Constructor(copyArrayBuffer(dataView.buffer));
54174
+ }
54175
+ /**
54176
+ * Create a new Date based on the time of the original.
54177
+ */
54178
+ function copyDate(date, state) {
54179
+ return new state.Constructor(date.getTime());
54180
+ }
54181
+ /**
54182
+ * Deeply copy the keys and values of the original.
54183
+ */
54184
+ function copyMapLoose(map, state) {
54185
+ var clone = new state.Constructor();
54186
+ // set in the cache immediately to be able to reuse the object recursively
54187
+ state.cache.set(map, clone);
54188
+ map.forEach(function (value, key) {
54189
+ clone.set(key, state.copier(value, state));
54190
+ });
54191
+ return clone;
54192
+ }
54193
+ /**
54194
+ * Deeply copy the keys and values of the original, as well as any custom properties.
54195
+ */
54196
+ function copyMapStrict(map, state) {
54197
+ return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
54198
+ }
54199
+ function copyObjectLooseLegacy(object, state) {
54200
+ var clone = getCleanClone(state.prototype);
54201
+ // set in the cache immediately to be able to reuse the object recursively
54202
+ state.cache.set(object, clone);
54203
+ for (var key in object) {
54204
+ if (esm_hasOwnProperty.call(object, key)) {
54205
+ clone[key] = state.copier(object[key], state);
54206
+ }
54207
+ }
54208
+ return clone;
54209
+ }
54210
+ function copyObjectLooseModern(object, state) {
54211
+ var clone = getCleanClone(state.prototype);
54212
+ // set in the cache immediately to be able to reuse the object recursively
54213
+ state.cache.set(object, clone);
54214
+ for (var key in object) {
54215
+ if (esm_hasOwnProperty.call(object, key)) {
54216
+ clone[key] = state.copier(object[key], state);
54217
+ }
54218
+ }
54219
+ var symbols = getOwnPropertySymbols(object);
54220
+ for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
54221
+ symbol = symbols[index];
54222
+ if (propertyIsEnumerable.call(object, symbol)) {
54223
+ clone[symbol] = state.copier(object[symbol], state);
54224
+ }
54225
+ }
54226
+ return clone;
54227
+ }
54228
+ /**
54229
+ * Deeply copy the properties (keys and symbols) and values of the original.
54230
+ */
54231
+ var copyObjectLoose = SUPPORTS_SYMBOL
54232
+ ? copyObjectLooseModern
54233
+ : copyObjectLooseLegacy;
54234
+ /**
54235
+ * Deeply copy the properties (keys and symbols) and values of the original, as well
54236
+ * as any hidden or non-enumerable properties.
54237
+ */
54238
+ function copyObjectStrict(object, state) {
54239
+ var clone = getCleanClone(state.prototype);
54240
+ // set in the cache immediately to be able to reuse the object recursively
54241
+ state.cache.set(object, clone);
54242
+ return copyOwnPropertiesStrict(object, clone, state);
54243
+ }
54244
+ /**
54245
+ * Create a new primitive wrapper from the value of the original.
54246
+ */
54247
+ function copyPrimitiveWrapper(primitiveObject, state) {
54248
+ return new state.Constructor(primitiveObject.valueOf());
54249
+ }
54250
+ /**
54251
+ * Create a new RegExp based on the value and flags of the original.
54252
+ */
54253
+ function copyRegExp(regExp, state) {
54254
+ var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
54255
+ clone.lastIndex = regExp.lastIndex;
54256
+ return clone;
54257
+ }
54258
+ /**
54259
+ * Return the original value (an identity function).
54260
+ *
54261
+ * @note
54262
+ * THis is used for objects that cannot be copied, such as WeakMap.
54263
+ */
54264
+ function copySelf(value, _state) {
54265
+ return value;
54266
+ }
54267
+ /**
54268
+ * Deeply copy the values of the original.
54269
+ */
54270
+ function copySetLoose(set, state) {
54271
+ var clone = new state.Constructor();
54272
+ // set in the cache immediately to be able to reuse the object recursively
54273
+ state.cache.set(set, clone);
54274
+ set.forEach(function (value) {
54275
+ clone.add(state.copier(value, state));
54276
+ });
54277
+ return clone;
54278
+ }
54279
+ /**
54280
+ * Deeply copy the values of the original, as well as any custom properties.
54281
+ */
54282
+ function copySetStrict(set, state) {
54283
+ return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
54284
+ }
54285
+
54286
+ var esm_isArray = Array.isArray;
54287
+ var esm_assign = Object.assign;
54288
+ var getPrototypeOf = Object.getPrototypeOf || (function (obj) { return obj.__proto__; });
54289
+ var DEFAULT_LOOSE_OPTIONS = {
54290
+ array: copyArrayLoose,
54291
+ arrayBuffer: copyArrayBuffer,
54292
+ blob: copyBlob,
54293
+ dataView: copyDataView,
54294
+ date: copyDate,
54295
+ error: copySelf,
54296
+ map: copyMapLoose,
54297
+ object: copyObjectLoose,
54298
+ regExp: copyRegExp,
54299
+ set: copySetLoose,
54300
+ };
54301
+ var DEFAULT_STRICT_OPTIONS = esm_assign({}, DEFAULT_LOOSE_OPTIONS, {
54302
+ array: copyArrayStrict,
54303
+ map: copyMapStrict,
54304
+ object: copyObjectStrict,
54305
+ set: copySetStrict,
54306
+ });
54307
+ /**
54308
+ * Get the copiers used for each specific object tag.
54309
+ */
54310
+ function getTagSpecificCopiers(options) {
54311
+ return {
54312
+ Arguments: options.object,
54313
+ Array: options.array,
54314
+ ArrayBuffer: options.arrayBuffer,
54315
+ Blob: options.blob,
54316
+ Boolean: copyPrimitiveWrapper,
54317
+ DataView: options.dataView,
54318
+ Date: options.date,
54319
+ Error: options.error,
54320
+ Float32Array: options.arrayBuffer,
54321
+ Float64Array: options.arrayBuffer,
54322
+ Int8Array: options.arrayBuffer,
54323
+ Int16Array: options.arrayBuffer,
54324
+ Int32Array: options.arrayBuffer,
54325
+ Map: options.map,
54326
+ Number: copyPrimitiveWrapper,
54327
+ Object: options.object,
54328
+ Promise: copySelf,
54329
+ RegExp: options.regExp,
54330
+ Set: options.set,
54331
+ String: copyPrimitiveWrapper,
54332
+ WeakMap: copySelf,
54333
+ WeakSet: copySelf,
54334
+ Uint8Array: options.arrayBuffer,
54335
+ Uint8ClampedArray: options.arrayBuffer,
54336
+ Uint16Array: options.arrayBuffer,
54337
+ Uint32Array: options.arrayBuffer,
54338
+ Uint64Array: options.arrayBuffer,
54339
+ };
54340
+ }
54341
+ /**
54342
+ * Create a custom copier based on the object-specific copy methods passed.
54343
+ */
54344
+ function createCopier(options) {
54345
+ var normalizedOptions = esm_assign({}, DEFAULT_LOOSE_OPTIONS, options);
54346
+ var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
54347
+ var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
54348
+ function copier(value, state) {
54349
+ state.prototype = state.Constructor = undefined;
54350
+ if (!value || typeof value !== 'object') {
54351
+ return value;
54352
+ }
54353
+ if (state.cache.has(value)) {
54354
+ return state.cache.get(value);
54355
+ }
54356
+ state.prototype = getPrototypeOf(value);
54357
+ state.Constructor = state.prototype && state.prototype.constructor;
54358
+ // plain objects
54359
+ if (!state.Constructor || state.Constructor === Object) {
54360
+ return object(value, state);
54361
+ }
54362
+ // arrays
54363
+ if (esm_isArray(value)) {
54364
+ return array(value, state);
54365
+ }
54366
+ var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
54367
+ if (tagSpecificCopier) {
54368
+ return tagSpecificCopier(value, state);
54369
+ }
54370
+ return typeof value.then === 'function' ? value : object(value, state);
54371
+ }
54372
+ return function copy(value) {
54373
+ return copier(value, {
54374
+ Constructor: undefined,
54375
+ cache: createCache(),
54376
+ copier: copier,
54377
+ prototype: undefined,
54378
+ });
54379
+ };
54380
+ }
54381
+ /**
54382
+ * Create a custom copier based on the object-specific copy methods passed, defaulting to the
54383
+ * same internals as `copyStrict`.
54384
+ */
54385
+ function createStrictCopier(options) {
54386
+ return createCopier(esm_assign({}, DEFAULT_STRICT_OPTIONS, options));
54387
+ }
54388
+ /**
54389
+ * Copy an value deeply as much as possible, where strict recreation of object properties
54390
+ * are maintained. All properties (including non-enumerable ones) are copied with their
54391
+ * original property descriptors on both objects and arrays.
54392
+ */
54393
+ var copyStrict = createStrictCopier({});
54394
+ /**
54395
+ * Copy an value deeply as much as possible.
54396
+ */
54397
+ var index = createCopier({});
54398
+
54399
+
54400
+ //# sourceMappingURL=index.mjs.map
54401
+
54356
54402
  ;// CONCATENATED MODULE: ../semi-foundation/datePicker/inputFoundation.ts
54357
54403
 
54358
54404
 
@@ -54469,7 +54515,7 @@ class inputFoundation_InputFoundation extends foundation {
54469
54515
  type,
54470
54516
  format
54471
54517
  });
54472
- const newInsetInputValue = set_default()(fast_copy_default()(insetInputValue), valuePath, value);
54518
+ const newInsetInputValue = set_default()(index(insetInputValue), valuePath, value);
54473
54519
  const insetInputStr = this.concatInsetInputValue({
54474
54520
  insetInputValue: newInsetInputValue
54475
54521
  });
@@ -54503,7 +54549,7 @@ class inputFoundation_InputFoundation extends foundation {
54503
54549
  defaultPickerValue,
54504
54550
  dateFnsLocale
54505
54551
  } = this._adapter.getProps();
54506
- const insetInputValueWithTime = fast_copy_default()(insetInputValue);
54552
+ const insetInputValueWithTime = index(insetInputValue);
54507
54553
  const {
54508
54554
  nowDate,
54509
54555
  nextDate
@@ -58624,7 +58670,7 @@ class YearAndMonthFoundation extends foundation {
58624
58670
  } = this.getProps();
58625
58671
  const left = datePicker_constants_strings.PANEL_TYPE_LEFT;
58626
58672
  const right = datePicker_constants_strings.PANEL_TYPE_RIGHT;
58627
- const year = fast_copy_default()(currentYear);
58673
+ const year = index(currentYear);
58628
58674
  year[panelType] = item.value;
58629
58675
  // make sure the right panel time is always less than the left panel time
58630
58676
  if (type === 'monthRange') {
@@ -58651,7 +58697,7 @@ class YearAndMonthFoundation extends foundation {
58651
58697
  } = this.getProps();
58652
58698
  const left = datePicker_constants_strings.PANEL_TYPE_LEFT;
58653
58699
  const right = datePicker_constants_strings.PANEL_TYPE_RIGHT;
58654
- const month = fast_copy_default()(currentMonth);
58700
+ const month = index(currentMonth);
58655
58701
  month[panelType] = item.month;
58656
58702
  // make sure the right panel time is always less than the left panel time
58657
58703
  if (type === 'monthRange' && panelType === left && currentYear[left] === currentYear[right] && item.value > month[right]) {
@@ -58698,7 +58744,7 @@ class YearAndMonthFoundation extends foundation {
58698
58744
  });
58699
58745
  }
58700
58746
  if (validMonth) {
58701
- const month = fast_copy_default()(currentMonth);
58747
+ const month = index(currentMonth);
58702
58748
  month[panelType] = validMonth.month;
58703
58749
  // change year and month same time
58704
58750
  this._adapter.setCurrentYearAndMonth(year, month);
@@ -60732,7 +60778,8 @@ const descriptions_constants_cssClasses = {
60732
60778
  };
60733
60779
  const descriptions_constants_strings = {
60734
60780
  ALIGN_SET: ['left', 'justify', 'plain', 'center'],
60735
- SIZE_SET: ['small', 'medium', 'large']
60781
+ SIZE_SET: ['small', 'medium', 'large'],
60782
+ LAYOUT_SET: ['horizontal', 'vertical']
60736
60783
  };
60737
60784
  const descriptions_constants_numbers = {};
60738
60785
 
@@ -60767,38 +60814,45 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
60767
60814
  itemKey,
60768
60815
  hidden,
60769
60816
  className,
60817
+ span,
60770
60818
  style,
60771
60819
  children
60772
60820
  } = _a,
60773
- rest = descriptions_item_rest(_a, ["itemKey", "hidden", "className", "style", "children"]);
60821
+ rest = descriptions_item_rest(_a, ["itemKey", "hidden", "className", "span", "style", "children"]);
60774
60822
  const {
60775
- align
60823
+ align,
60824
+ layout
60776
60825
  } = this.context;
60777
60826
  if (hidden) {
60778
60827
  return null;
60779
60828
  }
60780
- const item = align === 'plain' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tr", Object.assign({
60781
- className: className,
60782
- style: style
60783
- }, getDataAttr(rest)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("td", {
60784
- className: `${item_prefixCls}-item`
60829
+ const plainItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("td", {
60830
+ className: `${item_prefixCls}-item`,
60831
+ colSpan: span || 1
60785
60832
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
60786
60833
  className: keyCls
60787
60834
  }, itemKey, ":"), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
60788
60835
  className: valCls
60789
- }, typeof children === 'function' ? children() : children))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tr", Object.assign({
60790
- className: className,
60791
- style: style
60792
- }, getDataAttr(rest)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("th", {
60836
+ }, typeof children === 'function' ? children() : children));
60837
+ const alignItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("th", {
60793
60838
  className: `${item_prefixCls}-item ${item_prefixCls}-item-th`
60794
60839
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
60795
60840
  className: keyCls
60796
60841
  }, itemKey)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("td", {
60797
- className: `${item_prefixCls}-item ${item_prefixCls}-item-td`
60842
+ className: `${item_prefixCls}-item ${item_prefixCls}-item-td`,
60843
+ colSpan: span || 1
60798
60844
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
60799
60845
  className: valCls
60800
60846
  }, typeof children === 'function' ? children() : children)));
60801
- return item;
60847
+ const item = align === 'plain' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tr", Object.assign({
60848
+ className: className,
60849
+ style: style
60850
+ }, getDataAttr(rest)), plainItem) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tr", Object.assign({
60851
+ className: className,
60852
+ style: style
60853
+ }, getDataAttr(rest)), alignItem);
60854
+ const horizontalItem = align === 'plain' ? plainItem : alignItem;
60855
+ return layout === 'horizontal' ? horizontalItem : item;
60802
60856
  }
60803
60857
  }
60804
60858
  item_Item.propTypes = {
@@ -60808,6 +60862,44 @@ item_Item.propTypes = {
60808
60862
  style: (prop_types_default()).object
60809
60863
  };
60810
60864
  item_Item.contextType = descriptions_context;
60865
+ ;// CONCATENATED MODULE: ../semi-foundation/descriptions/foundation.ts
60866
+
60867
+ class DescriptionsFoundation extends foundation {
60868
+ constructor(adapter) {
60869
+ super(Object.assign({}, adapter));
60870
+ }
60871
+ getHorizontalList() {
60872
+ const {
60873
+ column,
60874
+ data,
60875
+ children
60876
+ } = this.getProps();
60877
+ let columns;
60878
+ if (data === null || data === void 0 ? void 0 : data.length) {
60879
+ columns = data || [];
60880
+ } else {
60881
+ columns = (children === null || children === void 0 ? void 0 : children.map(item => Object.assign({
60882
+ value: item.props.children
60883
+ }, item.props))) || [];
60884
+ }
60885
+ const horizontalList = [];
60886
+ const curSpan = {
60887
+ totalSpan: 0,
60888
+ itemList: []
60889
+ };
60890
+ for (const item of columns) {
60891
+ curSpan.totalSpan += item.span || 1;
60892
+ curSpan.itemList.push(item);
60893
+ if (curSpan.totalSpan >= column) {
60894
+ horizontalList.push(curSpan.itemList);
60895
+ curSpan.itemList = [];
60896
+ curSpan.totalSpan = 0;
60897
+ }
60898
+ }
60899
+ if (curSpan.itemList.length != 0) horizontalList.push(curSpan.itemList);
60900
+ return horizontalList;
60901
+ }
60902
+ }
60811
60903
  ;// CONCATENATED MODULE: ./descriptions/index.tsx
60812
60904
 
60813
60905
  var descriptions_rest = undefined && undefined.__rest || function (s, e) {
@@ -60826,8 +60918,43 @@ var descriptions_rest = undefined && undefined.__rest || function (s, e) {
60826
60918
 
60827
60919
 
60828
60920
 
60921
+
60922
+
60829
60923
  const descriptions_prefixCls = descriptions_constants_cssClasses.PREFIX;
60830
- class Descriptions extends external_root_React_commonjs2_react_commonjs_react_amd_react_.PureComponent {
60924
+ class Descriptions extends BaseComponent {
60925
+ constructor(props) {
60926
+ super(props);
60927
+ this.renderChildrenList = () => {
60928
+ const props = this.props;
60929
+ const {
60930
+ layout,
60931
+ data,
60932
+ children
60933
+ } = props;
60934
+ if (layout === 'horizontal') {
60935
+ const horizontalList = this.foundation.getHorizontalList();
60936
+ return horizontalList.map((row, index) => {
60937
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tr", {
60938
+ key: index
60939
+ }, row.map((item, itemIndex) => isPlainObject_default()(item) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(item_Item, Object.assign({
60940
+ itemKey: item.key
60941
+ }, item, {
60942
+ key: index + '-' + itemIndex
60943
+ }), item.value) : null));
60944
+ });
60945
+ } else {
60946
+ return data && data.length ? data.map((item, index) => isPlainObject_default()(item) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(item_Item, Object.assign({
60947
+ itemKey: item.key
60948
+ }, item, {
60949
+ key: index
60950
+ }), item.value) : null) : children;
60951
+ }
60952
+ };
60953
+ this.foundation = new DescriptionsFoundation(this.adapter);
60954
+ }
60955
+ get adapter() {
60956
+ return Object.assign({}, super.adapter);
60957
+ }
60831
60958
  render() {
60832
60959
  const _a = this.props,
60833
60960
  {
@@ -60837,27 +60964,26 @@ class Descriptions extends external_root_React_commonjs2_react_commonjs_react_am
60837
60964
  className,
60838
60965
  style,
60839
60966
  children,
60840
- data
60967
+ data,
60968
+ layout
60841
60969
  } = _a,
60842
- rest = descriptions_rest(_a, ["align", "row", "size", "className", "style", "children", "data"]);
60970
+ rest = descriptions_rest(_a, ["align", "row", "size", "className", "style", "children", "data", "layout"]);
60843
60971
  const classNames = classnames_default()(descriptions_prefixCls, className, {
60844
60972
  [`${descriptions_prefixCls}-${align}`]: !row,
60845
60973
  [`${descriptions_prefixCls}-double`]: row,
60846
- [`${descriptions_prefixCls}-double-${size}`]: row
60974
+ [`${descriptions_prefixCls}-double-${size}`]: row,
60975
+ [`${descriptions_prefixCls}-horizontal`]: layout === 'horizontal',
60976
+ [`${descriptions_prefixCls}-vertical`]: layout === 'vertical'
60847
60977
  });
60848
- const childrenList = data && data.length ? data.map((item, index) => isPlainObject_default()(item) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(item_Item, Object.assign({
60849
- itemKey: item.key
60850
- }, item, {
60851
- key: index
60852
- }), item.value) : null) : children;
60853
60978
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", Object.assign({
60854
60979
  className: classNames,
60855
60980
  style: style
60856
60981
  }, getDataAttr(rest)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("table", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("tbody", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(descriptions_context.Provider, {
60857
60982
  value: {
60858
- align
60983
+ align,
60984
+ layout
60859
60985
  }
60860
- }, childrenList))));
60986
+ }, this.renderChildrenList()))));
60861
60987
  }
60862
60988
  }
60863
60989
  Descriptions.Item = item_Item;
@@ -60874,13 +61000,17 @@ Descriptions.propTypes = {
60874
61000
  hidden: (prop_types_default()).bool,
60875
61001
  className: (prop_types_default()).string,
60876
61002
  style: (prop_types_default()).object
60877
- }))
61003
+ })),
61004
+ layout: prop_types_default().oneOf(descriptions_constants_strings.LAYOUT_SET),
61005
+ column: (prop_types_default()).number
60878
61006
  };
60879
61007
  Descriptions.defaultProps = {
60880
61008
  align: 'center',
60881
61009
  row: false,
60882
61010
  size: 'medium',
60883
- data: []
61011
+ data: [],
61012
+ layout: 'vertical',
61013
+ column: 3
60884
61014
  };
60885
61015
  /* harmony default export */ const descriptions_0 = (Descriptions);
60886
61016
  ;// CONCATENATED MODULE: ../semi-foundation/divider/constants.ts
@@ -61996,7 +62126,7 @@ var Modal_rest = undefined && undefined.__rest || function (s, e) {
61996
62126
 
61997
62127
 
61998
62128
 
61999
- const destroyFns = [];
62129
+ let destroyFns = [];
62000
62130
  class Modal extends BaseComponent {
62001
62131
  constructor(props) {
62002
62132
  super(props);
@@ -62323,12 +62453,13 @@ Modal.confirm = function (props) {
62323
62453
  return confirm_confirm(withConfirm(props));
62324
62454
  };
62325
62455
  Modal.destroyAll = function destroyAllFn() {
62326
- while (destroyFns.length) {
62327
- const close = destroyFns.pop();
62456
+ for (let i = 0, len = destroyFns.length; i < len; i++) {
62457
+ const close = destroyFns[i];
62328
62458
  if (close) {
62329
62459
  close();
62330
62460
  }
62331
62461
  }
62462
+ destroyFns = [];
62332
62463
  };
62333
62464
  /* harmony default export */ const modal_Modal = (Modal);
62334
62465
  ;// CONCATENATED MODULE: ./modal/index.tsx
@@ -68195,7 +68326,7 @@ class OverflowListFoundation extends foundation {
68195
68326
  const {
68196
68327
  items
68197
68328
  } = this.getProps();
68198
- return fast_copy_default()(items).reverse();
68329
+ return index(items).reverse();
68199
68330
  };
68200
68331
  }
68201
68332
  getOverflowItem() {
@@ -68223,7 +68354,7 @@ class OverflowListFoundation extends foundation {
68223
68354
  return overflowList;
68224
68355
  }
68225
68356
  handleIntersect(entries) {
68226
- const visibleState = fast_copy_default()(this.getState('visibleState'));
68357
+ const visibleState = index(this.getState('visibleState'));
68227
68358
  const res = {};
68228
68359
  entries.forEach(entry => {
68229
68360
  const itemKey = get_default()(entry, 'target.dataset.scrollkey');
@@ -87371,6 +87502,9 @@ const createBaseToast = () => {
87371
87502
  ToastList.defaultOpts[pos] = opts[pos];
87372
87503
  }
87373
87504
  });
87505
+ if (typeof opts.theme === 'string' && toast_constants_strings.themes.includes(opts.theme)) {
87506
+ ToastList.defaultOpts.theme = opts.theme;
87507
+ }
87374
87508
  if (typeof opts.zIndex === 'number') {
87375
87509
  ToastList.defaultOpts.zIndex = opts.zIndex;
87376
87510
  }
@@ -96759,7 +96893,7 @@ function mergeProps(props) {
96759
96893
  delete rest.defaultValue;
96760
96894
  delete rest.checked;
96761
96895
  if (typeof initValue !== 'undefined') {
96762
- initValue = fast_copy_default()(initValue);
96896
+ initValue = index(initValue);
96763
96897
  }
96764
96898
  const required = isRequired(rules);
96765
96899
  emptyValue = typeof emptyValue !== 'undefined' ? emptyValue : '';
@@ -98908,8 +99042,8 @@ class ArrayFieldComponent extends external_root_React_commonjs2_react_commonjs_r
98908
99042
  // whether the fields inside arrayField should use props.initValue in current render process
98909
99043
  this.shouldUseInitValue = !context.getArrayField(field);
98910
99044
  // Separate the arrays that reset and the usual add and remove modify, otherwise they will affect each other
98911
- const initValueCopyForFormState = fast_copy_default()(initValue);
98912
- const initValueCopyForReset = fast_copy_default()(initValue);
99045
+ const initValueCopyForFormState = index(initValue);
99046
+ const initValueCopyForReset = index(initValue);
98913
99047
  context.registerArrayField(field, initValueCopyForReset);
98914
99048
  // register ArrayField will update state.updateKey to render, So there is no need to execute forceUpdate here
98915
99049
  context.updateStateValue(field, initValueCopyForFormState, {
@@ -100083,6 +100217,33 @@ PreviewImage.defaultProps = {
100083
100217
  zoom: undefined
100084
100218
  };
100085
100219
  ;// CONCATENATED MODULE: ../semi-foundation/image/utils.ts
100220
+ var image_utils_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
100221
+ function adopt(value) {
100222
+ return value instanceof P ? value : new P(function (resolve) {
100223
+ resolve(value);
100224
+ });
100225
+ }
100226
+ return new (P || (P = Promise))(function (resolve, reject) {
100227
+ function fulfilled(value) {
100228
+ try {
100229
+ step(generator.next(value));
100230
+ } catch (e) {
100231
+ reject(e);
100232
+ }
100233
+ }
100234
+ function rejected(value) {
100235
+ try {
100236
+ step(generator["throw"](value));
100237
+ } catch (e) {
100238
+ reject(e);
100239
+ }
100240
+ }
100241
+ function step(result) {
100242
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
100243
+ }
100244
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
100245
+ });
100246
+ };
100086
100247
  const isTargetEmit = (event, targetClasses) => {
100087
100248
  // event.path usage is discouraged, use event.composedPath() as it's standard and is more future-proof
100088
100249
  // path is the event-triggered bubbling path, which stores each node through which bubbling passes.
@@ -100096,27 +100257,25 @@ const isTargetEmit = (event, targetClasses) => {
100096
100257
  });
100097
100258
  return isTarget;
100098
100259
  };
100099
- const downloadImage = (src, filename) => {
100100
- const image = new Image();
100101
- image.src = src;
100102
- image.crossOrigin = "anonymous";
100103
- image.onload = e => {
100104
- const eleLink = document.createElement("a");
100105
- eleLink.download = filename;
100106
- eleLink.style.display = "none";
100107
- eleLink.download = filename;
100108
- eleLink.href = src;
100109
- const canvas = document.createElement("canvas");
100110
- canvas.width = image.width;
100111
- canvas.height = image.height;
100112
- const context = canvas.getContext("2d");
100113
- context.drawImage(image, 0, 0, image.width, image.height);
100114
- eleLink.href = canvas.toDataURL("image/jpeg");
100115
- document.body.appendChild(eleLink);
100116
- eleLink.click();
100117
- document.body.removeChild(eleLink);
100118
- };
100119
- };
100260
+ const downloadImage = (src, filename, downloadErrorCb) => image_utils_awaiter(void 0, void 0, void 0, function* () {
100261
+ try {
100262
+ const response = yield fetch(src);
100263
+ if (response.ok) {
100264
+ const blob = yield response.blob();
100265
+ const url = URL.createObjectURL(blob);
100266
+ const link = document.createElement('a');
100267
+ link.href = url;
100268
+ link.download = filename;
100269
+ link.click();
100270
+ URL.revokeObjectURL(url);
100271
+ link.remove();
100272
+ } else {
100273
+ downloadErrorCb(src);
100274
+ }
100275
+ } catch (error) {
100276
+ downloadErrorCb(src);
100277
+ }
100278
+ });
100120
100279
  const crossMerge = function () {
100121
100280
  let leftArr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
100122
100281
  let rightArr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
@@ -100339,7 +100498,7 @@ class PreviewInnerFoundation extends foundation {
100339
100498
  const setDownloadName = this._adapter.getSetDownloadFunc();
100340
100499
  const downloadSrc = imgSrc[currentIndex];
100341
100500
  const downloadName = setDownloadName ? setDownloadName(downloadSrc) : downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1).split('?')[0];
100342
- downloadImage(downloadSrc, downloadName);
100501
+ downloadImage(downloadSrc, downloadName, this._adapter.notifyDownloadError);
100343
100502
  this._adapter.notifyDownload(downloadSrc, currentIndex);
100344
100503
  };
100345
100504
  this.handlePreviewClose = e => {
@@ -100596,6 +100755,12 @@ class PreviewInner extends BaseComponent {
100596
100755
  } = this.props;
100597
100756
  isFunction_default()(onDownload) && onDownload(src, index);
100598
100757
  },
100758
+ notifyDownloadError: src => {
100759
+ const {
100760
+ onDownloadError
100761
+ } = this.props;
100762
+ isFunction_default()(onDownloadError) && onDownloadError(src);
100763
+ },
100599
100764
  registerKeyDownListener: () => {
100600
100765
  window && window.addEventListener("keydown", this.handleKeyDown);
100601
100766
  },