@douyinfe/semi-ui 2.52.0 → 2.53.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.
- package/dist/umd/semi-ui.js +787 -1188
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/_utils/index.d.ts +2 -0
- package/lib/cjs/_utils/index.js +77 -0
- package/lib/cjs/_utils/semi-global.d.ts +46 -0
- package/lib/cjs/_utils/semi-global.js +13 -0
- package/lib/cjs/autoComplete/index.d.ts +2 -25
- package/lib/cjs/autoComplete/index.js +4 -2
- package/lib/cjs/avatar/index.d.ts +2 -10
- package/lib/cjs/avatar/index.js +4 -2
- package/lib/cjs/backtop/index.d.ts +2 -5
- package/lib/cjs/backtop/index.js +4 -2
- package/lib/cjs/button/Button.d.ts +1 -1
- package/lib/cjs/button/index.d.ts +3 -1
- package/lib/cjs/button/index.js +3 -0
- package/lib/cjs/carousel/index.d.ts +2 -2
- package/lib/cjs/cascader/index.d.ts +2 -31
- package/lib/cjs/cascader/index.js +3 -2
- package/lib/cjs/collapse/index.d.ts +2 -7
- package/lib/cjs/collapse/index.js +4 -2
- package/lib/cjs/collapsible/index.d.ts +3 -9
- package/lib/cjs/collapsible/index.js +4 -2
- package/lib/cjs/configProvider/index.d.ts +2 -1
- package/lib/cjs/configProvider/index.js +5 -2
- package/lib/cjs/datePicker/datePicker.d.ts +2 -44
- package/lib/cjs/datePicker/datePicker.js +4 -2
- package/lib/cjs/dropdown/index.d.ts +2 -12
- package/lib/cjs/dropdown/index.js +4 -2
- package/lib/cjs/form/arrayField.js +3 -3
- package/lib/cjs/modal/Modal.d.ts +2 -20
- package/lib/cjs/modal/Modal.js +3 -2
- package/lib/cjs/modal/confirm.d.ts +14 -14
- package/lib/cjs/navigation/index.d.ts +2 -15
- package/lib/cjs/navigation/index.js +4 -2
- package/lib/cjs/notification/notice.d.ts +2 -12
- package/lib/cjs/notification/notice.js +3 -2
- package/lib/cjs/overflowList/index.d.ts +2 -9
- package/lib/cjs/overflowList/index.js +3 -2
- package/lib/cjs/popconfirm/index.d.ts +2 -15
- package/lib/cjs/popconfirm/index.js +4 -2
- package/lib/cjs/popover/index.d.ts +2 -23
- package/lib/cjs/popover/index.js +4 -2
- package/lib/cjs/resizeObserver/index.d.ts +14 -2
- package/lib/cjs/resizeObserver/index.js +66 -32
- package/lib/cjs/select/index.d.ts +1 -0
- package/lib/cjs/select/index.js +3 -2
- package/lib/cjs/sideSheet/index.d.ts +1 -0
- package/lib/cjs/sideSheet/index.js +3 -2
- package/lib/cjs/tabs/index.d.ts +1 -0
- package/lib/cjs/tabs/index.js +4 -2
- package/lib/cjs/timePicker/index.d.ts +2 -34
- package/lib/cjs/timePicker/index.js +3 -1
- package/lib/cjs/toast/toast.d.ts +2 -11
- package/lib/cjs/toast/toast.js +3 -2
- package/lib/cjs/tooltip/index.d.ts +2 -32
- package/lib/cjs/tooltip/index.js +3 -2
- package/lib/cjs/typography/base.d.ts +7 -4
- package/lib/cjs/typography/base.js +127 -64
- package/lib/cjs/typography/numeral.d.ts +1 -1
- package/lib/cjs/typography/paragraph.d.ts +1 -1
- package/lib/cjs/typography/text.d.ts +1 -1
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/es/_utils/index.d.ts +2 -0
- package/lib/es/_utils/index.js +75 -0
- package/lib/es/_utils/semi-global.d.ts +46 -0
- package/lib/es/_utils/semi-global.js +6 -0
- package/lib/es/autoComplete/index.d.ts +2 -25
- package/lib/es/autoComplete/index.js +4 -2
- package/lib/es/avatar/index.d.ts +2 -10
- package/lib/es/avatar/index.js +4 -2
- package/lib/es/backtop/index.d.ts +2 -5
- package/lib/es/backtop/index.js +4 -2
- package/lib/es/button/Button.d.ts +1 -1
- package/lib/es/button/index.d.ts +3 -1
- package/lib/es/button/index.js +3 -0
- package/lib/es/carousel/index.d.ts +2 -2
- package/lib/es/cascader/index.d.ts +2 -31
- package/lib/es/cascader/index.js +4 -3
- package/lib/es/collapse/index.d.ts +2 -7
- package/lib/es/collapse/index.js +4 -2
- package/lib/es/collapsible/index.d.ts +3 -9
- package/lib/es/collapsible/index.js +4 -2
- package/lib/es/configProvider/index.d.ts +2 -1
- package/lib/es/configProvider/index.js +5 -2
- package/lib/es/datePicker/datePicker.d.ts +2 -44
- package/lib/es/datePicker/datePicker.js +4 -2
- package/lib/es/dropdown/index.d.ts +2 -12
- package/lib/es/dropdown/index.js +4 -2
- package/lib/es/form/arrayField.js +3 -3
- package/lib/es/modal/Modal.d.ts +2 -20
- package/lib/es/modal/Modal.js +4 -3
- package/lib/es/modal/confirm.d.ts +14 -14
- package/lib/es/navigation/index.d.ts +2 -15
- package/lib/es/navigation/index.js +4 -2
- package/lib/es/notification/notice.d.ts +2 -12
- package/lib/es/notification/notice.js +4 -3
- package/lib/es/overflowList/index.d.ts +2 -9
- package/lib/es/overflowList/index.js +4 -3
- package/lib/es/popconfirm/index.d.ts +2 -15
- package/lib/es/popconfirm/index.js +4 -2
- package/lib/es/popover/index.d.ts +2 -23
- package/lib/es/popover/index.js +4 -2
- package/lib/es/resizeObserver/index.d.ts +14 -2
- package/lib/es/resizeObserver/index.js +64 -31
- package/lib/es/select/index.d.ts +1 -0
- package/lib/es/select/index.js +4 -3
- package/lib/es/sideSheet/index.d.ts +1 -0
- package/lib/es/sideSheet/index.js +4 -3
- package/lib/es/tabs/index.d.ts +1 -0
- package/lib/es/tabs/index.js +4 -2
- package/lib/es/timePicker/index.d.ts +2 -34
- package/lib/es/timePicker/index.js +3 -1
- package/lib/es/toast/toast.d.ts +2 -11
- package/lib/es/toast/toast.js +4 -3
- package/lib/es/tooltip/index.d.ts +2 -32
- package/lib/es/tooltip/index.js +4 -3
- package/lib/es/typography/base.d.ts +7 -4
- package/lib/es/typography/base.js +128 -65
- package/lib/es/typography/numeral.d.ts +1 -1
- package/lib/es/typography/paragraph.d.ts +1 -1
- package/lib/es/typography/text.d.ts +1 -1
- package/lib/es/typography/title.d.ts +1 -1
- package/package.json +9 -9
package/dist/umd/semi-ui.js
CHANGED
|
@@ -9125,42 +9125,6 @@ function clone(value) {
|
|
|
9125
9125
|
module.exports = clone;
|
|
9126
9126
|
|
|
9127
9127
|
|
|
9128
|
-
/***/ }),
|
|
9129
|
-
|
|
9130
|
-
/***/ "c2re":
|
|
9131
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9132
|
-
|
|
9133
|
-
var baseClone = __webpack_require__("kn3Q");
|
|
9134
|
-
|
|
9135
|
-
/** Used to compose bitmasks for cloning. */
|
|
9136
|
-
var CLONE_DEEP_FLAG = 1,
|
|
9137
|
-
CLONE_SYMBOLS_FLAG = 4;
|
|
9138
|
-
|
|
9139
|
-
/**
|
|
9140
|
-
* This method is like `_.clone` except that it recursively clones `value`.
|
|
9141
|
-
*
|
|
9142
|
-
* @static
|
|
9143
|
-
* @memberOf _
|
|
9144
|
-
* @since 1.0.0
|
|
9145
|
-
* @category Lang
|
|
9146
|
-
* @param {*} value The value to recursively clone.
|
|
9147
|
-
* @returns {*} Returns the deep cloned value.
|
|
9148
|
-
* @see _.clone
|
|
9149
|
-
* @example
|
|
9150
|
-
*
|
|
9151
|
-
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
|
9152
|
-
*
|
|
9153
|
-
* var deep = _.cloneDeep(objects);
|
|
9154
|
-
* console.log(deep[0] === objects[0]);
|
|
9155
|
-
* // => false
|
|
9156
|
-
*/
|
|
9157
|
-
function cloneDeep(value) {
|
|
9158
|
-
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
9159
|
-
}
|
|
9160
|
-
|
|
9161
|
-
module.exports = cloneDeep;
|
|
9162
|
-
|
|
9163
|
-
|
|
9164
9128
|
/***/ }),
|
|
9165
9129
|
|
|
9166
9130
|
/***/ "NdXQ":
|
|
@@ -19585,10 +19549,45 @@ const findAll = _ref4 => {
|
|
|
19585
19549
|
return result;
|
|
19586
19550
|
};
|
|
19587
19551
|
|
|
19552
|
+
;// CONCATENATED MODULE: ./_utils/semi-global.ts
|
|
19553
|
+
class SemiGlobal {
|
|
19554
|
+
constructor() {
|
|
19555
|
+
this.config = {};
|
|
19556
|
+
}
|
|
19557
|
+
}
|
|
19558
|
+
/* harmony default export */ const semi_global = (new SemiGlobal());
|
|
19588
19559
|
;// CONCATENATED MODULE: ./_utils/index.tsx
|
|
19589
19560
|
|
|
19590
19561
|
|
|
19591
19562
|
|
|
19563
|
+
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
19564
|
+
function adopt(value) {
|
|
19565
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
19566
|
+
resolve(value);
|
|
19567
|
+
});
|
|
19568
|
+
}
|
|
19569
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19570
|
+
function fulfilled(value) {
|
|
19571
|
+
try {
|
|
19572
|
+
step(generator.next(value));
|
|
19573
|
+
} catch (e) {
|
|
19574
|
+
reject(e);
|
|
19575
|
+
}
|
|
19576
|
+
}
|
|
19577
|
+
function rejected(value) {
|
|
19578
|
+
try {
|
|
19579
|
+
step(generator["throw"](value));
|
|
19580
|
+
} catch (e) {
|
|
19581
|
+
reject(e);
|
|
19582
|
+
}
|
|
19583
|
+
}
|
|
19584
|
+
function step(result) {
|
|
19585
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
19586
|
+
}
|
|
19587
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19588
|
+
});
|
|
19589
|
+
};
|
|
19590
|
+
|
|
19592
19591
|
|
|
19593
19592
|
|
|
19594
19593
|
|
|
@@ -19742,12 +19741,59 @@ function getFocusableElements(node) {
|
|
|
19742
19741
|
const focusableElements = Array.from(node.querySelectorAll(focusableSelectorsStr));
|
|
19743
19742
|
return focusableElements;
|
|
19744
19743
|
}
|
|
19744
|
+
function runAfterTicks(func, numberOfTicks) {
|
|
19745
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19746
|
+
if (numberOfTicks === 0) {
|
|
19747
|
+
yield func();
|
|
19748
|
+
return;
|
|
19749
|
+
} else {
|
|
19750
|
+
yield new Promise(resolve => {
|
|
19751
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
19752
|
+
yield runAfterTicks(func, numberOfTicks - 1);
|
|
19753
|
+
resolve();
|
|
19754
|
+
}), 0);
|
|
19755
|
+
});
|
|
19756
|
+
return;
|
|
19757
|
+
}
|
|
19758
|
+
});
|
|
19759
|
+
}
|
|
19745
19760
|
function getScrollbarWidth() {
|
|
19746
19761
|
if (globalThis && Object.prototype.toString.call(globalThis) === '[object Window]') {
|
|
19747
19762
|
return window.innerWidth - document.documentElement.clientWidth;
|
|
19748
19763
|
}
|
|
19749
19764
|
return 0;
|
|
19750
19765
|
}
|
|
19766
|
+
function getDefaultPropsFromGlobalConfig(componentName) {
|
|
19767
|
+
let semiDefaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
19768
|
+
const getFromGlobalConfig = () => {
|
|
19769
|
+
var _a, _b;
|
|
19770
|
+
return ((_b = (_a = semi_global === null || semi_global === void 0 ? void 0 : semi_global.config) === null || _a === void 0 ? void 0 : _a.overrideDefaultProps) === null || _b === void 0 ? void 0 : _b[componentName]) || {};
|
|
19771
|
+
};
|
|
19772
|
+
return new Proxy(Object.assign({}, semiDefaultProps), {
|
|
19773
|
+
get(target, key, receiver) {
|
|
19774
|
+
const defaultPropsFromGlobal = getFromGlobalConfig();
|
|
19775
|
+
if (key in defaultPropsFromGlobal) {
|
|
19776
|
+
return defaultPropsFromGlobal[key];
|
|
19777
|
+
}
|
|
19778
|
+
return Reflect.get(target, key, receiver);
|
|
19779
|
+
},
|
|
19780
|
+
set(target, key, value, receiver) {
|
|
19781
|
+
return Reflect.set(target, key, value, receiver);
|
|
19782
|
+
},
|
|
19783
|
+
ownKeys() {
|
|
19784
|
+
const defaultPropsFromGlobal = getFromGlobalConfig();
|
|
19785
|
+
return Array.from(new Set([...Reflect.ownKeys(semiDefaultProps), ...Object.keys(defaultPropsFromGlobal)]));
|
|
19786
|
+
},
|
|
19787
|
+
getOwnPropertyDescriptor(target, key) {
|
|
19788
|
+
const defaultPropsFromGlobal = getFromGlobalConfig();
|
|
19789
|
+
if (key in defaultPropsFromGlobal) {
|
|
19790
|
+
return Reflect.getOwnPropertyDescriptor(defaultPropsFromGlobal, key);
|
|
19791
|
+
} else {
|
|
19792
|
+
return Reflect.getOwnPropertyDescriptor(target, key);
|
|
19793
|
+
}
|
|
19794
|
+
}
|
|
19795
|
+
});
|
|
19796
|
+
}
|
|
19751
19797
|
;// CONCATENATED MODULE: ./configProvider/context.tsx
|
|
19752
19798
|
|
|
19753
19799
|
const ConfigContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
|
|
@@ -20721,7 +20767,8 @@ Tooltip.propTypes = {
|
|
|
20721
20767
|
preventScroll: (prop_types_default()).bool,
|
|
20722
20768
|
keepDOM: (prop_types_default()).bool
|
|
20723
20769
|
};
|
|
20724
|
-
Tooltip.
|
|
20770
|
+
Tooltip.__SemiComponentName__ = "Tooltip";
|
|
20771
|
+
Tooltip.defaultProps = getDefaultPropsFromGlobalConfig(Tooltip.__SemiComponentName__, {
|
|
20725
20772
|
arrowBounding: numbers.ARROW_BOUNDING,
|
|
20726
20773
|
autoAdjustOverflow: true,
|
|
20727
20774
|
arrowPointAtCenter: true,
|
|
@@ -20747,7 +20794,7 @@ Tooltip.defaultProps = {
|
|
|
20747
20794
|
disableFocusListener: false,
|
|
20748
20795
|
disableArrowKeyDown: false,
|
|
20749
20796
|
keepDOM: false
|
|
20750
|
-
};
|
|
20797
|
+
});
|
|
20751
20798
|
// EXTERNAL MODULE: ../../node_modules/copy-text-to-clipboard/index.js
|
|
20752
20799
|
var copy_text_to_clipboard = __webpack_require__("HDX/");
|
|
20753
20800
|
var copy_text_to_clipboard_default = /*#__PURE__*/__webpack_require__.n(copy_text_to_clipboard);
|
|
@@ -22387,6 +22434,7 @@ var popover_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
22387
22434
|
|
|
22388
22435
|
|
|
22389
22436
|
|
|
22437
|
+
|
|
22390
22438
|
const popover_positionSet = popover_constants_strings.POSITION_SET;
|
|
22391
22439
|
const popover_triggerSet = popover_constants_strings.TRIGGER_SET;
|
|
22392
22440
|
class Popover extends (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent {
|
|
@@ -22510,7 +22558,8 @@ Popover.propTypes = {
|
|
|
22510
22558
|
guardFocus: (prop_types_default()).bool,
|
|
22511
22559
|
disableArrowKeyDown: (prop_types_default()).bool
|
|
22512
22560
|
};
|
|
22513
|
-
Popover.
|
|
22561
|
+
Popover.__SemiComponentName__ = "Popover";
|
|
22562
|
+
Popover.defaultProps = getDefaultPropsFromGlobalConfig(Popover.__SemiComponentName__, {
|
|
22514
22563
|
arrowBounding: constants_numbers.ARROW_BOUNDING,
|
|
22515
22564
|
showArrow: false,
|
|
22516
22565
|
autoAdjustOverflow: true,
|
|
@@ -22527,7 +22576,7 @@ Popover.defaultProps = {
|
|
|
22527
22576
|
returnFocusOnClose: true,
|
|
22528
22577
|
guardFocus: true,
|
|
22529
22578
|
disableFocusListener: true
|
|
22530
|
-
};
|
|
22579
|
+
});
|
|
22531
22580
|
/* harmony default export */ const popover_0 = (Popover);
|
|
22532
22581
|
;// CONCATENATED MODULE: ./typography/util.tsx
|
|
22533
22582
|
|
|
@@ -22659,945 +22708,23 @@ const getRenderText = function (originEle, rows) {
|
|
|
22659
22708
|
return resText;
|
|
22660
22709
|
};
|
|
22661
22710
|
/* harmony default export */ const util = (getRenderText);
|
|
22662
|
-
;// CONCATENATED MODULE: ../../node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
22663
|
-
/**
|
|
22664
|
-
* A collection of shims that provide minimal functionality of the ES6 collections.
|
|
22665
|
-
*
|
|
22666
|
-
* These implementations are not meant to be used outside of the ResizeObserver
|
|
22667
|
-
* modules as they cover only a limited range of use cases.
|
|
22668
|
-
*/
|
|
22669
|
-
/* eslint-disable require-jsdoc, valid-jsdoc */
|
|
22670
|
-
var MapShim = (function () {
|
|
22671
|
-
if (typeof Map !== 'undefined') {
|
|
22672
|
-
return Map;
|
|
22673
|
-
}
|
|
22674
|
-
/**
|
|
22675
|
-
* Returns index in provided array that matches the specified key.
|
|
22676
|
-
*
|
|
22677
|
-
* @param {Array<Array>} arr
|
|
22678
|
-
* @param {*} key
|
|
22679
|
-
* @returns {number}
|
|
22680
|
-
*/
|
|
22681
|
-
function getIndex(arr, key) {
|
|
22682
|
-
var result = -1;
|
|
22683
|
-
arr.some(function (entry, index) {
|
|
22684
|
-
if (entry[0] === key) {
|
|
22685
|
-
result = index;
|
|
22686
|
-
return true;
|
|
22687
|
-
}
|
|
22688
|
-
return false;
|
|
22689
|
-
});
|
|
22690
|
-
return result;
|
|
22691
|
-
}
|
|
22692
|
-
return /** @class */ (function () {
|
|
22693
|
-
function class_1() {
|
|
22694
|
-
this.__entries__ = [];
|
|
22695
|
-
}
|
|
22696
|
-
Object.defineProperty(class_1.prototype, "size", {
|
|
22697
|
-
/**
|
|
22698
|
-
* @returns {boolean}
|
|
22699
|
-
*/
|
|
22700
|
-
get: function () {
|
|
22701
|
-
return this.__entries__.length;
|
|
22702
|
-
},
|
|
22703
|
-
enumerable: true,
|
|
22704
|
-
configurable: true
|
|
22705
|
-
});
|
|
22706
|
-
/**
|
|
22707
|
-
* @param {*} key
|
|
22708
|
-
* @returns {*}
|
|
22709
|
-
*/
|
|
22710
|
-
class_1.prototype.get = function (key) {
|
|
22711
|
-
var index = getIndex(this.__entries__, key);
|
|
22712
|
-
var entry = this.__entries__[index];
|
|
22713
|
-
return entry && entry[1];
|
|
22714
|
-
};
|
|
22715
|
-
/**
|
|
22716
|
-
* @param {*} key
|
|
22717
|
-
* @param {*} value
|
|
22718
|
-
* @returns {void}
|
|
22719
|
-
*/
|
|
22720
|
-
class_1.prototype.set = function (key, value) {
|
|
22721
|
-
var index = getIndex(this.__entries__, key);
|
|
22722
|
-
if (~index) {
|
|
22723
|
-
this.__entries__[index][1] = value;
|
|
22724
|
-
}
|
|
22725
|
-
else {
|
|
22726
|
-
this.__entries__.push([key, value]);
|
|
22727
|
-
}
|
|
22728
|
-
};
|
|
22729
|
-
/**
|
|
22730
|
-
* @param {*} key
|
|
22731
|
-
* @returns {void}
|
|
22732
|
-
*/
|
|
22733
|
-
class_1.prototype.delete = function (key) {
|
|
22734
|
-
var entries = this.__entries__;
|
|
22735
|
-
var index = getIndex(entries, key);
|
|
22736
|
-
if (~index) {
|
|
22737
|
-
entries.splice(index, 1);
|
|
22738
|
-
}
|
|
22739
|
-
};
|
|
22740
|
-
/**
|
|
22741
|
-
* @param {*} key
|
|
22742
|
-
* @returns {void}
|
|
22743
|
-
*/
|
|
22744
|
-
class_1.prototype.has = function (key) {
|
|
22745
|
-
return !!~getIndex(this.__entries__, key);
|
|
22746
|
-
};
|
|
22747
|
-
/**
|
|
22748
|
-
* @returns {void}
|
|
22749
|
-
*/
|
|
22750
|
-
class_1.prototype.clear = function () {
|
|
22751
|
-
this.__entries__.splice(0);
|
|
22752
|
-
};
|
|
22753
|
-
/**
|
|
22754
|
-
* @param {Function} callback
|
|
22755
|
-
* @param {*} [ctx=null]
|
|
22756
|
-
* @returns {void}
|
|
22757
|
-
*/
|
|
22758
|
-
class_1.prototype.forEach = function (callback, ctx) {
|
|
22759
|
-
if (ctx === void 0) { ctx = null; }
|
|
22760
|
-
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
|
|
22761
|
-
var entry = _a[_i];
|
|
22762
|
-
callback.call(ctx, entry[1], entry[0]);
|
|
22763
|
-
}
|
|
22764
|
-
};
|
|
22765
|
-
return class_1;
|
|
22766
|
-
}());
|
|
22767
|
-
})();
|
|
22768
|
-
|
|
22769
|
-
/**
|
|
22770
|
-
* Detects whether window and document objects are available in current environment.
|
|
22771
|
-
*/
|
|
22772
|
-
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
|
|
22773
|
-
|
|
22774
|
-
// Returns global object of a current environment.
|
|
22775
|
-
var global$1 = (function () {
|
|
22776
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Math === Math) {
|
|
22777
|
-
return __webpack_require__.g;
|
|
22778
|
-
}
|
|
22779
|
-
if (typeof self !== 'undefined' && self.Math === Math) {
|
|
22780
|
-
return self;
|
|
22781
|
-
}
|
|
22782
|
-
if (typeof window !== 'undefined' && window.Math === Math) {
|
|
22783
|
-
return window;
|
|
22784
|
-
}
|
|
22785
|
-
// eslint-disable-next-line no-new-func
|
|
22786
|
-
return Function('return this')();
|
|
22787
|
-
})();
|
|
22788
|
-
|
|
22789
|
-
/**
|
|
22790
|
-
* A shim for the requestAnimationFrame which falls back to the setTimeout if
|
|
22791
|
-
* first one is not supported.
|
|
22792
|
-
*
|
|
22793
|
-
* @returns {number} Requests' identifier.
|
|
22794
|
-
*/
|
|
22795
|
-
var requestAnimationFrame$1 = (function () {
|
|
22796
|
-
if (typeof requestAnimationFrame === 'function') {
|
|
22797
|
-
// It's required to use a bounded function because IE sometimes throws
|
|
22798
|
-
// an "Invalid calling object" error if rAF is invoked without the global
|
|
22799
|
-
// object on the left hand side.
|
|
22800
|
-
return requestAnimationFrame.bind(global$1);
|
|
22801
|
-
}
|
|
22802
|
-
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
|
|
22803
|
-
})();
|
|
22804
|
-
|
|
22805
|
-
// Defines minimum timeout before adding a trailing call.
|
|
22806
|
-
var trailingTimeout = 2;
|
|
22807
|
-
/**
|
|
22808
|
-
* Creates a wrapper function which ensures that provided callback will be
|
|
22809
|
-
* invoked only once during the specified delay period.
|
|
22810
|
-
*
|
|
22811
|
-
* @param {Function} callback - Function to be invoked after the delay period.
|
|
22812
|
-
* @param {number} delay - Delay after which to invoke callback.
|
|
22813
|
-
* @returns {Function}
|
|
22814
|
-
*/
|
|
22815
|
-
function ResizeObserver_es_throttle (callback, delay) {
|
|
22816
|
-
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
22817
|
-
/**
|
|
22818
|
-
* Invokes the original callback function and schedules new invocation if
|
|
22819
|
-
* the "proxy" was called during current request.
|
|
22820
|
-
*
|
|
22821
|
-
* @returns {void}
|
|
22822
|
-
*/
|
|
22823
|
-
function resolvePending() {
|
|
22824
|
-
if (leadingCall) {
|
|
22825
|
-
leadingCall = false;
|
|
22826
|
-
callback();
|
|
22827
|
-
}
|
|
22828
|
-
if (trailingCall) {
|
|
22829
|
-
proxy();
|
|
22830
|
-
}
|
|
22831
|
-
}
|
|
22832
|
-
/**
|
|
22833
|
-
* Callback invoked after the specified delay. It will further postpone
|
|
22834
|
-
* invocation of the original function delegating it to the
|
|
22835
|
-
* requestAnimationFrame.
|
|
22836
|
-
*
|
|
22837
|
-
* @returns {void}
|
|
22838
|
-
*/
|
|
22839
|
-
function timeoutCallback() {
|
|
22840
|
-
requestAnimationFrame$1(resolvePending);
|
|
22841
|
-
}
|
|
22842
|
-
/**
|
|
22843
|
-
* Schedules invocation of the original function.
|
|
22844
|
-
*
|
|
22845
|
-
* @returns {void}
|
|
22846
|
-
*/
|
|
22847
|
-
function proxy() {
|
|
22848
|
-
var timeStamp = Date.now();
|
|
22849
|
-
if (leadingCall) {
|
|
22850
|
-
// Reject immediately following calls.
|
|
22851
|
-
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
22852
|
-
return;
|
|
22853
|
-
}
|
|
22854
|
-
// Schedule new call to be in invoked when the pending one is resolved.
|
|
22855
|
-
// This is important for "transitions" which never actually start
|
|
22856
|
-
// immediately so there is a chance that we might miss one if change
|
|
22857
|
-
// happens amids the pending invocation.
|
|
22858
|
-
trailingCall = true;
|
|
22859
|
-
}
|
|
22860
|
-
else {
|
|
22861
|
-
leadingCall = true;
|
|
22862
|
-
trailingCall = false;
|
|
22863
|
-
setTimeout(timeoutCallback, delay);
|
|
22864
|
-
}
|
|
22865
|
-
lastCallTime = timeStamp;
|
|
22866
|
-
}
|
|
22867
|
-
return proxy;
|
|
22868
|
-
}
|
|
22869
|
-
|
|
22870
|
-
// Minimum delay before invoking the update of observers.
|
|
22871
|
-
var REFRESH_DELAY = 20;
|
|
22872
|
-
// A list of substrings of CSS properties used to find transition events that
|
|
22873
|
-
// might affect dimensions of observed elements.
|
|
22874
|
-
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
|
|
22875
|
-
// Check if MutationObserver is available.
|
|
22876
|
-
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
|
|
22877
|
-
/**
|
|
22878
|
-
* Singleton controller class which handles updates of ResizeObserver instances.
|
|
22879
|
-
*/
|
|
22880
|
-
var ResizeObserverController = /** @class */ (function () {
|
|
22881
|
-
/**
|
|
22882
|
-
* Creates a new instance of ResizeObserverController.
|
|
22883
|
-
*
|
|
22884
|
-
* @private
|
|
22885
|
-
*/
|
|
22886
|
-
function ResizeObserverController() {
|
|
22887
|
-
/**
|
|
22888
|
-
* Indicates whether DOM listeners have been added.
|
|
22889
|
-
*
|
|
22890
|
-
* @private {boolean}
|
|
22891
|
-
*/
|
|
22892
|
-
this.connected_ = false;
|
|
22893
|
-
/**
|
|
22894
|
-
* Tells that controller has subscribed for Mutation Events.
|
|
22895
|
-
*
|
|
22896
|
-
* @private {boolean}
|
|
22897
|
-
*/
|
|
22898
|
-
this.mutationEventsAdded_ = false;
|
|
22899
|
-
/**
|
|
22900
|
-
* Keeps reference to the instance of MutationObserver.
|
|
22901
|
-
*
|
|
22902
|
-
* @private {MutationObserver}
|
|
22903
|
-
*/
|
|
22904
|
-
this.mutationsObserver_ = null;
|
|
22905
|
-
/**
|
|
22906
|
-
* A list of connected observers.
|
|
22907
|
-
*
|
|
22908
|
-
* @private {Array<ResizeObserverSPI>}
|
|
22909
|
-
*/
|
|
22910
|
-
this.observers_ = [];
|
|
22911
|
-
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
22912
|
-
this.refresh = ResizeObserver_es_throttle(this.refresh.bind(this), REFRESH_DELAY);
|
|
22913
|
-
}
|
|
22914
|
-
/**
|
|
22915
|
-
* Adds observer to observers list.
|
|
22916
|
-
*
|
|
22917
|
-
* @param {ResizeObserverSPI} observer - Observer to be added.
|
|
22918
|
-
* @returns {void}
|
|
22919
|
-
*/
|
|
22920
|
-
ResizeObserverController.prototype.addObserver = function (observer) {
|
|
22921
|
-
if (!~this.observers_.indexOf(observer)) {
|
|
22922
|
-
this.observers_.push(observer);
|
|
22923
|
-
}
|
|
22924
|
-
// Add listeners if they haven't been added yet.
|
|
22925
|
-
if (!this.connected_) {
|
|
22926
|
-
this.connect_();
|
|
22927
|
-
}
|
|
22928
|
-
};
|
|
22929
|
-
/**
|
|
22930
|
-
* Removes observer from observers list.
|
|
22931
|
-
*
|
|
22932
|
-
* @param {ResizeObserverSPI} observer - Observer to be removed.
|
|
22933
|
-
* @returns {void}
|
|
22934
|
-
*/
|
|
22935
|
-
ResizeObserverController.prototype.removeObserver = function (observer) {
|
|
22936
|
-
var observers = this.observers_;
|
|
22937
|
-
var index = observers.indexOf(observer);
|
|
22938
|
-
// Remove observer if it's present in registry.
|
|
22939
|
-
if (~index) {
|
|
22940
|
-
observers.splice(index, 1);
|
|
22941
|
-
}
|
|
22942
|
-
// Remove listeners if controller has no connected observers.
|
|
22943
|
-
if (!observers.length && this.connected_) {
|
|
22944
|
-
this.disconnect_();
|
|
22945
|
-
}
|
|
22946
|
-
};
|
|
22947
|
-
/**
|
|
22948
|
-
* Invokes the update of observers. It will continue running updates insofar
|
|
22949
|
-
* it detects changes.
|
|
22950
|
-
*
|
|
22951
|
-
* @returns {void}
|
|
22952
|
-
*/
|
|
22953
|
-
ResizeObserverController.prototype.refresh = function () {
|
|
22954
|
-
var changesDetected = this.updateObservers_();
|
|
22955
|
-
// Continue running updates if changes have been detected as there might
|
|
22956
|
-
// be future ones caused by CSS transitions.
|
|
22957
|
-
if (changesDetected) {
|
|
22958
|
-
this.refresh();
|
|
22959
|
-
}
|
|
22960
|
-
};
|
|
22961
|
-
/**
|
|
22962
|
-
* Updates every observer from observers list and notifies them of queued
|
|
22963
|
-
* entries.
|
|
22964
|
-
*
|
|
22965
|
-
* @private
|
|
22966
|
-
* @returns {boolean} Returns "true" if any observer has detected changes in
|
|
22967
|
-
* dimensions of it's elements.
|
|
22968
|
-
*/
|
|
22969
|
-
ResizeObserverController.prototype.updateObservers_ = function () {
|
|
22970
|
-
// Collect observers that have active observations.
|
|
22971
|
-
var activeObservers = this.observers_.filter(function (observer) {
|
|
22972
|
-
return observer.gatherActive(), observer.hasActive();
|
|
22973
|
-
});
|
|
22974
|
-
// Deliver notifications in a separate cycle in order to avoid any
|
|
22975
|
-
// collisions between observers, e.g. when multiple instances of
|
|
22976
|
-
// ResizeObserver are tracking the same element and the callback of one
|
|
22977
|
-
// of them changes content dimensions of the observed target. Sometimes
|
|
22978
|
-
// this may result in notifications being blocked for the rest of observers.
|
|
22979
|
-
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
|
|
22980
|
-
return activeObservers.length > 0;
|
|
22981
|
-
};
|
|
22982
|
-
/**
|
|
22983
|
-
* Initializes DOM listeners.
|
|
22984
|
-
*
|
|
22985
|
-
* @private
|
|
22986
|
-
* @returns {void}
|
|
22987
|
-
*/
|
|
22988
|
-
ResizeObserverController.prototype.connect_ = function () {
|
|
22989
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
22990
|
-
// have been already added.
|
|
22991
|
-
if (!isBrowser || this.connected_) {
|
|
22992
|
-
return;
|
|
22993
|
-
}
|
|
22994
|
-
// Subscription to the "Transitionend" event is used as a workaround for
|
|
22995
|
-
// delayed transitions. This way it's possible to capture at least the
|
|
22996
|
-
// final state of an element.
|
|
22997
|
-
document.addEventListener('transitionend', this.onTransitionEnd_);
|
|
22998
|
-
window.addEventListener('resize', this.refresh);
|
|
22999
|
-
if (mutationObserverSupported) {
|
|
23000
|
-
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
23001
|
-
this.mutationsObserver_.observe(document, {
|
|
23002
|
-
attributes: true,
|
|
23003
|
-
childList: true,
|
|
23004
|
-
characterData: true,
|
|
23005
|
-
subtree: true
|
|
23006
|
-
});
|
|
23007
|
-
}
|
|
23008
|
-
else {
|
|
23009
|
-
document.addEventListener('DOMSubtreeModified', this.refresh);
|
|
23010
|
-
this.mutationEventsAdded_ = true;
|
|
23011
|
-
}
|
|
23012
|
-
this.connected_ = true;
|
|
23013
|
-
};
|
|
23014
|
-
/**
|
|
23015
|
-
* Removes DOM listeners.
|
|
23016
|
-
*
|
|
23017
|
-
* @private
|
|
23018
|
-
* @returns {void}
|
|
23019
|
-
*/
|
|
23020
|
-
ResizeObserverController.prototype.disconnect_ = function () {
|
|
23021
|
-
// Do nothing if running in a non-browser environment or if listeners
|
|
23022
|
-
// have been already removed.
|
|
23023
|
-
if (!isBrowser || !this.connected_) {
|
|
23024
|
-
return;
|
|
23025
|
-
}
|
|
23026
|
-
document.removeEventListener('transitionend', this.onTransitionEnd_);
|
|
23027
|
-
window.removeEventListener('resize', this.refresh);
|
|
23028
|
-
if (this.mutationsObserver_) {
|
|
23029
|
-
this.mutationsObserver_.disconnect();
|
|
23030
|
-
}
|
|
23031
|
-
if (this.mutationEventsAdded_) {
|
|
23032
|
-
document.removeEventListener('DOMSubtreeModified', this.refresh);
|
|
23033
|
-
}
|
|
23034
|
-
this.mutationsObserver_ = null;
|
|
23035
|
-
this.mutationEventsAdded_ = false;
|
|
23036
|
-
this.connected_ = false;
|
|
23037
|
-
};
|
|
23038
|
-
/**
|
|
23039
|
-
* "Transitionend" event handler.
|
|
23040
|
-
*
|
|
23041
|
-
* @private
|
|
23042
|
-
* @param {TransitionEvent} event
|
|
23043
|
-
* @returns {void}
|
|
23044
|
-
*/
|
|
23045
|
-
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
|
|
23046
|
-
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
|
|
23047
|
-
// Detect whether transition may affect dimensions of an element.
|
|
23048
|
-
var isReflowProperty = transitionKeys.some(function (key) {
|
|
23049
|
-
return !!~propertyName.indexOf(key);
|
|
23050
|
-
});
|
|
23051
|
-
if (isReflowProperty) {
|
|
23052
|
-
this.refresh();
|
|
23053
|
-
}
|
|
23054
|
-
};
|
|
23055
|
-
/**
|
|
23056
|
-
* Returns instance of the ResizeObserverController.
|
|
23057
|
-
*
|
|
23058
|
-
* @returns {ResizeObserverController}
|
|
23059
|
-
*/
|
|
23060
|
-
ResizeObserverController.getInstance = function () {
|
|
23061
|
-
if (!this.instance_) {
|
|
23062
|
-
this.instance_ = new ResizeObserverController();
|
|
23063
|
-
}
|
|
23064
|
-
return this.instance_;
|
|
23065
|
-
};
|
|
23066
|
-
/**
|
|
23067
|
-
* Holds reference to the controller's instance.
|
|
23068
|
-
*
|
|
23069
|
-
* @private {ResizeObserverController}
|
|
23070
|
-
*/
|
|
23071
|
-
ResizeObserverController.instance_ = null;
|
|
23072
|
-
return ResizeObserverController;
|
|
23073
|
-
}());
|
|
23074
|
-
|
|
23075
|
-
/**
|
|
23076
|
-
* Defines non-writable/enumerable properties of the provided target object.
|
|
23077
|
-
*
|
|
23078
|
-
* @param {Object} target - Object for which to define properties.
|
|
23079
|
-
* @param {Object} props - Properties to be defined.
|
|
23080
|
-
* @returns {Object} Target object.
|
|
23081
|
-
*/
|
|
23082
|
-
var defineConfigurable = (function (target, props) {
|
|
23083
|
-
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
|
|
23084
|
-
var key = _a[_i];
|
|
23085
|
-
Object.defineProperty(target, key, {
|
|
23086
|
-
value: props[key],
|
|
23087
|
-
enumerable: false,
|
|
23088
|
-
writable: false,
|
|
23089
|
-
configurable: true
|
|
23090
|
-
});
|
|
23091
|
-
}
|
|
23092
|
-
return target;
|
|
23093
|
-
});
|
|
23094
|
-
|
|
23095
|
-
/**
|
|
23096
|
-
* Returns the global object associated with provided element.
|
|
23097
|
-
*
|
|
23098
|
-
* @param {Object} target
|
|
23099
|
-
* @returns {Object}
|
|
23100
|
-
*/
|
|
23101
|
-
var getWindowOf = (function (target) {
|
|
23102
|
-
// Assume that the element is an instance of Node, which means that it
|
|
23103
|
-
// has the "ownerDocument" property from which we can retrieve a
|
|
23104
|
-
// corresponding global object.
|
|
23105
|
-
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
23106
|
-
// Return the local global object if it's not possible extract one from
|
|
23107
|
-
// provided element.
|
|
23108
|
-
return ownerGlobal || global$1;
|
|
23109
|
-
});
|
|
23110
|
-
|
|
23111
|
-
// Placeholder of an empty content rectangle.
|
|
23112
|
-
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
23113
|
-
/**
|
|
23114
|
-
* Converts provided string to a number.
|
|
23115
|
-
*
|
|
23116
|
-
* @param {number|string} value
|
|
23117
|
-
* @returns {number}
|
|
23118
|
-
*/
|
|
23119
|
-
function toFloat(value) {
|
|
23120
|
-
return parseFloat(value) || 0;
|
|
23121
|
-
}
|
|
23122
|
-
/**
|
|
23123
|
-
* Extracts borders size from provided styles.
|
|
23124
|
-
*
|
|
23125
|
-
* @param {CSSStyleDeclaration} styles
|
|
23126
|
-
* @param {...string} positions - Borders positions (top, right, ...)
|
|
23127
|
-
* @returns {number}
|
|
23128
|
-
*/
|
|
23129
|
-
function getBordersSize(styles) {
|
|
23130
|
-
var positions = [];
|
|
23131
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
23132
|
-
positions[_i - 1] = arguments[_i];
|
|
23133
|
-
}
|
|
23134
|
-
return positions.reduce(function (size, position) {
|
|
23135
|
-
var value = styles['border-' + position + '-width'];
|
|
23136
|
-
return size + toFloat(value);
|
|
23137
|
-
}, 0);
|
|
23138
|
-
}
|
|
23139
|
-
/**
|
|
23140
|
-
* Extracts paddings sizes from provided styles.
|
|
23141
|
-
*
|
|
23142
|
-
* @param {CSSStyleDeclaration} styles
|
|
23143
|
-
* @returns {Object} Paddings box.
|
|
23144
|
-
*/
|
|
23145
|
-
function getPaddings(styles) {
|
|
23146
|
-
var positions = ['top', 'right', 'bottom', 'left'];
|
|
23147
|
-
var paddings = {};
|
|
23148
|
-
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
23149
|
-
var position = positions_1[_i];
|
|
23150
|
-
var value = styles['padding-' + position];
|
|
23151
|
-
paddings[position] = toFloat(value);
|
|
23152
|
-
}
|
|
23153
|
-
return paddings;
|
|
23154
|
-
}
|
|
23155
|
-
/**
|
|
23156
|
-
* Calculates content rectangle of provided SVG element.
|
|
23157
|
-
*
|
|
23158
|
-
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
|
|
23159
|
-
* to be calculated.
|
|
23160
|
-
* @returns {DOMRectInit}
|
|
23161
|
-
*/
|
|
23162
|
-
function getSVGContentRect(target) {
|
|
23163
|
-
var bbox = target.getBBox();
|
|
23164
|
-
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
23165
|
-
}
|
|
23166
|
-
/**
|
|
23167
|
-
* Calculates content rectangle of provided HTMLElement.
|
|
23168
|
-
*
|
|
23169
|
-
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
|
|
23170
|
-
* @returns {DOMRectInit}
|
|
23171
|
-
*/
|
|
23172
|
-
function getHTMLElementContentRect(target) {
|
|
23173
|
-
// Client width & height properties can't be
|
|
23174
|
-
// used exclusively as they provide rounded values.
|
|
23175
|
-
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
23176
|
-
// By this condition we can catch all non-replaced inline, hidden and
|
|
23177
|
-
// detached elements. Though elements with width & height properties less
|
|
23178
|
-
// than 0.5 will be discarded as well.
|
|
23179
|
-
//
|
|
23180
|
-
// Without it we would need to implement separate methods for each of
|
|
23181
|
-
// those cases and it's not possible to perform a precise and performance
|
|
23182
|
-
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
|
|
23183
|
-
// gives wrong results for elements with width & height less than 0.5.
|
|
23184
|
-
if (!clientWidth && !clientHeight) {
|
|
23185
|
-
return emptyRect;
|
|
23186
|
-
}
|
|
23187
|
-
var styles = getWindowOf(target).getComputedStyle(target);
|
|
23188
|
-
var paddings = getPaddings(styles);
|
|
23189
|
-
var horizPad = paddings.left + paddings.right;
|
|
23190
|
-
var vertPad = paddings.top + paddings.bottom;
|
|
23191
|
-
// Computed styles of width & height are being used because they are the
|
|
23192
|
-
// only dimensions available to JS that contain non-rounded values. It could
|
|
23193
|
-
// be possible to utilize the getBoundingClientRect if only it's data wasn't
|
|
23194
|
-
// affected by CSS transformations let alone paddings, borders and scroll bars.
|
|
23195
|
-
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
23196
|
-
// Width & height include paddings and borders when the 'border-box' box
|
|
23197
|
-
// model is applied (except for IE).
|
|
23198
|
-
if (styles.boxSizing === 'border-box') {
|
|
23199
|
-
// Following conditions are required to handle Internet Explorer which
|
|
23200
|
-
// doesn't include paddings and borders to computed CSS dimensions.
|
|
23201
|
-
//
|
|
23202
|
-
// We can say that if CSS dimensions + paddings are equal to the "client"
|
|
23203
|
-
// properties then it's either IE, and thus we don't need to subtract
|
|
23204
|
-
// anything, or an element merely doesn't have paddings/borders styles.
|
|
23205
|
-
if (Math.round(width + horizPad) !== clientWidth) {
|
|
23206
|
-
width -= getBordersSize(styles, 'left', 'right') + horizPad;
|
|
23207
|
-
}
|
|
23208
|
-
if (Math.round(height + vertPad) !== clientHeight) {
|
|
23209
|
-
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
|
|
23210
|
-
}
|
|
23211
|
-
}
|
|
23212
|
-
// Following steps can't be applied to the document's root element as its
|
|
23213
|
-
// client[Width/Height] properties represent viewport area of the window.
|
|
23214
|
-
// Besides, it's as well not necessary as the <html> itself neither has
|
|
23215
|
-
// rendered scroll bars nor it can be clipped.
|
|
23216
|
-
if (!isDocumentElement(target)) {
|
|
23217
|
-
// In some browsers (only in Firefox, actually) CSS width & height
|
|
23218
|
-
// include scroll bars size which can be removed at this step as scroll
|
|
23219
|
-
// bars are the only difference between rounded dimensions + paddings
|
|
23220
|
-
// and "client" properties, though that is not always true in Chrome.
|
|
23221
|
-
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
23222
|
-
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
23223
|
-
// Chrome has a rather weird rounding of "client" properties.
|
|
23224
|
-
// E.g. for an element with content width of 314.2px it sometimes gives
|
|
23225
|
-
// the client width of 315px and for the width of 314.7px it may give
|
|
23226
|
-
// 314px. And it doesn't happen all the time. So just ignore this delta
|
|
23227
|
-
// as a non-relevant.
|
|
23228
|
-
if (Math.abs(vertScrollbar) !== 1) {
|
|
23229
|
-
width -= vertScrollbar;
|
|
23230
|
-
}
|
|
23231
|
-
if (Math.abs(horizScrollbar) !== 1) {
|
|
23232
|
-
height -= horizScrollbar;
|
|
23233
|
-
}
|
|
23234
|
-
}
|
|
23235
|
-
return createRectInit(paddings.left, paddings.top, width, height);
|
|
23236
|
-
}
|
|
23237
|
-
/**
|
|
23238
|
-
* Checks whether provided element is an instance of the SVGGraphicsElement.
|
|
23239
|
-
*
|
|
23240
|
-
* @param {Element} target - Element to be checked.
|
|
23241
|
-
* @returns {boolean}
|
|
23242
|
-
*/
|
|
23243
|
-
var isSVGGraphicsElement = (function () {
|
|
23244
|
-
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
|
|
23245
|
-
// interface.
|
|
23246
|
-
if (typeof SVGGraphicsElement !== 'undefined') {
|
|
23247
|
-
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
|
|
23248
|
-
}
|
|
23249
|
-
// If it's so, then check that element is at least an instance of the
|
|
23250
|
-
// SVGElement and that it has the "getBBox" method.
|
|
23251
|
-
// eslint-disable-next-line no-extra-parens
|
|
23252
|
-
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
|
|
23253
|
-
typeof target.getBBox === 'function'); };
|
|
23254
|
-
})();
|
|
23255
|
-
/**
|
|
23256
|
-
* Checks whether provided element is a document element (<html>).
|
|
23257
|
-
*
|
|
23258
|
-
* @param {Element} target - Element to be checked.
|
|
23259
|
-
* @returns {boolean}
|
|
23260
|
-
*/
|
|
23261
|
-
function isDocumentElement(target) {
|
|
23262
|
-
return target === getWindowOf(target).document.documentElement;
|
|
23263
|
-
}
|
|
23264
|
-
/**
|
|
23265
|
-
* Calculates an appropriate content rectangle for provided html or svg element.
|
|
23266
|
-
*
|
|
23267
|
-
* @param {Element} target - Element content rectangle of which needs to be calculated.
|
|
23268
|
-
* @returns {DOMRectInit}
|
|
23269
|
-
*/
|
|
23270
|
-
function getContentRect(target) {
|
|
23271
|
-
if (!isBrowser) {
|
|
23272
|
-
return emptyRect;
|
|
23273
|
-
}
|
|
23274
|
-
if (isSVGGraphicsElement(target)) {
|
|
23275
|
-
return getSVGContentRect(target);
|
|
23276
|
-
}
|
|
23277
|
-
return getHTMLElementContentRect(target);
|
|
23278
|
-
}
|
|
23279
|
-
/**
|
|
23280
|
-
* Creates rectangle with an interface of the DOMRectReadOnly.
|
|
23281
|
-
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
|
|
23282
|
-
*
|
|
23283
|
-
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
|
|
23284
|
-
* @returns {DOMRectReadOnly}
|
|
23285
|
-
*/
|
|
23286
|
-
function createReadOnlyRect(_a) {
|
|
23287
|
-
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
|
|
23288
|
-
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
|
|
23289
|
-
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
|
|
23290
|
-
var rect = Object.create(Constr.prototype);
|
|
23291
|
-
// Rectangle's properties are not writable and non-enumerable.
|
|
23292
|
-
defineConfigurable(rect, {
|
|
23293
|
-
x: x, y: y, width: width, height: height,
|
|
23294
|
-
top: y,
|
|
23295
|
-
right: x + width,
|
|
23296
|
-
bottom: height + y,
|
|
23297
|
-
left: x
|
|
23298
|
-
});
|
|
23299
|
-
return rect;
|
|
23300
|
-
}
|
|
23301
|
-
/**
|
|
23302
|
-
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
|
|
23303
|
-
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
|
|
23304
|
-
*
|
|
23305
|
-
* @param {number} x - X coordinate.
|
|
23306
|
-
* @param {number} y - Y coordinate.
|
|
23307
|
-
* @param {number} width - Rectangle's width.
|
|
23308
|
-
* @param {number} height - Rectangle's height.
|
|
23309
|
-
* @returns {DOMRectInit}
|
|
23310
|
-
*/
|
|
23311
|
-
function createRectInit(x, y, width, height) {
|
|
23312
|
-
return { x: x, y: y, width: width, height: height };
|
|
23313
|
-
}
|
|
23314
|
-
|
|
23315
|
-
/**
|
|
23316
|
-
* Class that is responsible for computations of the content rectangle of
|
|
23317
|
-
* provided DOM element and for keeping track of it's changes.
|
|
23318
|
-
*/
|
|
23319
|
-
var ResizeObservation = /** @class */ (function () {
|
|
23320
|
-
/**
|
|
23321
|
-
* Creates an instance of ResizeObservation.
|
|
23322
|
-
*
|
|
23323
|
-
* @param {Element} target - Element to be observed.
|
|
23324
|
-
*/
|
|
23325
|
-
function ResizeObservation(target) {
|
|
23326
|
-
/**
|
|
23327
|
-
* Broadcasted width of content rectangle.
|
|
23328
|
-
*
|
|
23329
|
-
* @type {number}
|
|
23330
|
-
*/
|
|
23331
|
-
this.broadcastWidth = 0;
|
|
23332
|
-
/**
|
|
23333
|
-
* Broadcasted height of content rectangle.
|
|
23334
|
-
*
|
|
23335
|
-
* @type {number}
|
|
23336
|
-
*/
|
|
23337
|
-
this.broadcastHeight = 0;
|
|
23338
|
-
/**
|
|
23339
|
-
* Reference to the last observed content rectangle.
|
|
23340
|
-
*
|
|
23341
|
-
* @private {DOMRectInit}
|
|
23342
|
-
*/
|
|
23343
|
-
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
23344
|
-
this.target = target;
|
|
23345
|
-
}
|
|
23346
|
-
/**
|
|
23347
|
-
* Updates content rectangle and tells whether it's width or height properties
|
|
23348
|
-
* have changed since the last broadcast.
|
|
23349
|
-
*
|
|
23350
|
-
* @returns {boolean}
|
|
23351
|
-
*/
|
|
23352
|
-
ResizeObservation.prototype.isActive = function () {
|
|
23353
|
-
var rect = getContentRect(this.target);
|
|
23354
|
-
this.contentRect_ = rect;
|
|
23355
|
-
return (rect.width !== this.broadcastWidth ||
|
|
23356
|
-
rect.height !== this.broadcastHeight);
|
|
23357
|
-
};
|
|
23358
|
-
/**
|
|
23359
|
-
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
|
|
23360
|
-
* from the corresponding properties of the last observed content rectangle.
|
|
23361
|
-
*
|
|
23362
|
-
* @returns {DOMRectInit} Last observed content rectangle.
|
|
23363
|
-
*/
|
|
23364
|
-
ResizeObservation.prototype.broadcastRect = function () {
|
|
23365
|
-
var rect = this.contentRect_;
|
|
23366
|
-
this.broadcastWidth = rect.width;
|
|
23367
|
-
this.broadcastHeight = rect.height;
|
|
23368
|
-
return rect;
|
|
23369
|
-
};
|
|
23370
|
-
return ResizeObservation;
|
|
23371
|
-
}());
|
|
23372
|
-
|
|
23373
|
-
var ResizeObserverEntry = /** @class */ (function () {
|
|
23374
|
-
/**
|
|
23375
|
-
* Creates an instance of ResizeObserverEntry.
|
|
23376
|
-
*
|
|
23377
|
-
* @param {Element} target - Element that is being observed.
|
|
23378
|
-
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
|
|
23379
|
-
*/
|
|
23380
|
-
function ResizeObserverEntry(target, rectInit) {
|
|
23381
|
-
var contentRect = createReadOnlyRect(rectInit);
|
|
23382
|
-
// According to the specification following properties are not writable
|
|
23383
|
-
// and are also not enumerable in the native implementation.
|
|
23384
|
-
//
|
|
23385
|
-
// Property accessors are not being used as they'd require to define a
|
|
23386
|
-
// private WeakMap storage which may cause memory leaks in browsers that
|
|
23387
|
-
// don't support this type of collections.
|
|
23388
|
-
defineConfigurable(this, { target: target, contentRect: contentRect });
|
|
23389
|
-
}
|
|
23390
|
-
return ResizeObserverEntry;
|
|
23391
|
-
}());
|
|
23392
|
-
|
|
23393
|
-
var ResizeObserverSPI = /** @class */ (function () {
|
|
23394
|
-
/**
|
|
23395
|
-
* Creates a new instance of ResizeObserver.
|
|
23396
|
-
*
|
|
23397
|
-
* @param {ResizeObserverCallback} callback - Callback function that is invoked
|
|
23398
|
-
* when one of the observed elements changes it's content dimensions.
|
|
23399
|
-
* @param {ResizeObserverController} controller - Controller instance which
|
|
23400
|
-
* is responsible for the updates of observer.
|
|
23401
|
-
* @param {ResizeObserver} callbackCtx - Reference to the public
|
|
23402
|
-
* ResizeObserver instance which will be passed to callback function.
|
|
23403
|
-
*/
|
|
23404
|
-
function ResizeObserverSPI(callback, controller, callbackCtx) {
|
|
23405
|
-
/**
|
|
23406
|
-
* Collection of resize observations that have detected changes in dimensions
|
|
23407
|
-
* of elements.
|
|
23408
|
-
*
|
|
23409
|
-
* @private {Array<ResizeObservation>}
|
|
23410
|
-
*/
|
|
23411
|
-
this.activeObservations_ = [];
|
|
23412
|
-
/**
|
|
23413
|
-
* Registry of the ResizeObservation instances.
|
|
23414
|
-
*
|
|
23415
|
-
* @private {Map<Element, ResizeObservation>}
|
|
23416
|
-
*/
|
|
23417
|
-
this.observations_ = new MapShim();
|
|
23418
|
-
if (typeof callback !== 'function') {
|
|
23419
|
-
throw new TypeError('The callback provided as parameter 1 is not a function.');
|
|
23420
|
-
}
|
|
23421
|
-
this.callback_ = callback;
|
|
23422
|
-
this.controller_ = controller;
|
|
23423
|
-
this.callbackCtx_ = callbackCtx;
|
|
23424
|
-
}
|
|
23425
|
-
/**
|
|
23426
|
-
* Starts observing provided element.
|
|
23427
|
-
*
|
|
23428
|
-
* @param {Element} target - Element to be observed.
|
|
23429
|
-
* @returns {void}
|
|
23430
|
-
*/
|
|
23431
|
-
ResizeObserverSPI.prototype.observe = function (target) {
|
|
23432
|
-
if (!arguments.length) {
|
|
23433
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
23434
|
-
}
|
|
23435
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
23436
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
23437
|
-
return;
|
|
23438
|
-
}
|
|
23439
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
23440
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
23441
|
-
}
|
|
23442
|
-
var observations = this.observations_;
|
|
23443
|
-
// Do nothing if element is already being observed.
|
|
23444
|
-
if (observations.has(target)) {
|
|
23445
|
-
return;
|
|
23446
|
-
}
|
|
23447
|
-
observations.set(target, new ResizeObservation(target));
|
|
23448
|
-
this.controller_.addObserver(this);
|
|
23449
|
-
// Force the update of observations.
|
|
23450
|
-
this.controller_.refresh();
|
|
23451
|
-
};
|
|
23452
|
-
/**
|
|
23453
|
-
* Stops observing provided element.
|
|
23454
|
-
*
|
|
23455
|
-
* @param {Element} target - Element to stop observing.
|
|
23456
|
-
* @returns {void}
|
|
23457
|
-
*/
|
|
23458
|
-
ResizeObserverSPI.prototype.unobserve = function (target) {
|
|
23459
|
-
if (!arguments.length) {
|
|
23460
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
23461
|
-
}
|
|
23462
|
-
// Do nothing if current environment doesn't have the Element interface.
|
|
23463
|
-
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
|
|
23464
|
-
return;
|
|
23465
|
-
}
|
|
23466
|
-
if (!(target instanceof getWindowOf(target).Element)) {
|
|
23467
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
23468
|
-
}
|
|
23469
|
-
var observations = this.observations_;
|
|
23470
|
-
// Do nothing if element is not being observed.
|
|
23471
|
-
if (!observations.has(target)) {
|
|
23472
|
-
return;
|
|
23473
|
-
}
|
|
23474
|
-
observations.delete(target);
|
|
23475
|
-
if (!observations.size) {
|
|
23476
|
-
this.controller_.removeObserver(this);
|
|
23477
|
-
}
|
|
23478
|
-
};
|
|
23479
|
-
/**
|
|
23480
|
-
* Stops observing all elements.
|
|
23481
|
-
*
|
|
23482
|
-
* @returns {void}
|
|
23483
|
-
*/
|
|
23484
|
-
ResizeObserverSPI.prototype.disconnect = function () {
|
|
23485
|
-
this.clearActive();
|
|
23486
|
-
this.observations_.clear();
|
|
23487
|
-
this.controller_.removeObserver(this);
|
|
23488
|
-
};
|
|
23489
|
-
/**
|
|
23490
|
-
* Collects observation instances the associated element of which has changed
|
|
23491
|
-
* it's content rectangle.
|
|
23492
|
-
*
|
|
23493
|
-
* @returns {void}
|
|
23494
|
-
*/
|
|
23495
|
-
ResizeObserverSPI.prototype.gatherActive = function () {
|
|
23496
|
-
var _this = this;
|
|
23497
|
-
this.clearActive();
|
|
23498
|
-
this.observations_.forEach(function (observation) {
|
|
23499
|
-
if (observation.isActive()) {
|
|
23500
|
-
_this.activeObservations_.push(observation);
|
|
23501
|
-
}
|
|
23502
|
-
});
|
|
23503
|
-
};
|
|
23504
|
-
/**
|
|
23505
|
-
* Invokes initial callback function with a list of ResizeObserverEntry
|
|
23506
|
-
* instances collected from active resize observations.
|
|
23507
|
-
*
|
|
23508
|
-
* @returns {void}
|
|
23509
|
-
*/
|
|
23510
|
-
ResizeObserverSPI.prototype.broadcastActive = function () {
|
|
23511
|
-
// Do nothing if observer doesn't have active observations.
|
|
23512
|
-
if (!this.hasActive()) {
|
|
23513
|
-
return;
|
|
23514
|
-
}
|
|
23515
|
-
var ctx = this.callbackCtx_;
|
|
23516
|
-
// Create ResizeObserverEntry instance for every active observation.
|
|
23517
|
-
var entries = this.activeObservations_.map(function (observation) {
|
|
23518
|
-
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
23519
|
-
});
|
|
23520
|
-
this.callback_.call(ctx, entries, ctx);
|
|
23521
|
-
this.clearActive();
|
|
23522
|
-
};
|
|
23523
|
-
/**
|
|
23524
|
-
* Clears the collection of active observations.
|
|
23525
|
-
*
|
|
23526
|
-
* @returns {void}
|
|
23527
|
-
*/
|
|
23528
|
-
ResizeObserverSPI.prototype.clearActive = function () {
|
|
23529
|
-
this.activeObservations_.splice(0);
|
|
23530
|
-
};
|
|
23531
|
-
/**
|
|
23532
|
-
* Tells whether observer has active observations.
|
|
23533
|
-
*
|
|
23534
|
-
* @returns {boolean}
|
|
23535
|
-
*/
|
|
23536
|
-
ResizeObserverSPI.prototype.hasActive = function () {
|
|
23537
|
-
return this.activeObservations_.length > 0;
|
|
23538
|
-
};
|
|
23539
|
-
return ResizeObserverSPI;
|
|
23540
|
-
}());
|
|
23541
|
-
|
|
23542
|
-
// Registry of internal observers. If WeakMap is not available use current shim
|
|
23543
|
-
// for the Map collection as it has all required methods and because WeakMap
|
|
23544
|
-
// can't be fully polyfilled anyway.
|
|
23545
|
-
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
|
|
23546
|
-
/**
|
|
23547
|
-
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
|
|
23548
|
-
* exposing only those methods and properties that are defined in the spec.
|
|
23549
|
-
*/
|
|
23550
|
-
var ResizeObserver_es_ResizeObserver = /** @class */ (function () {
|
|
23551
|
-
/**
|
|
23552
|
-
* Creates a new instance of ResizeObserver.
|
|
23553
|
-
*
|
|
23554
|
-
* @param {ResizeObserverCallback} callback - Callback that is invoked when
|
|
23555
|
-
* dimensions of the observed elements change.
|
|
23556
|
-
*/
|
|
23557
|
-
function ResizeObserver(callback) {
|
|
23558
|
-
if (!(this instanceof ResizeObserver)) {
|
|
23559
|
-
throw new TypeError('Cannot call a class as a function.');
|
|
23560
|
-
}
|
|
23561
|
-
if (!arguments.length) {
|
|
23562
|
-
throw new TypeError('1 argument required, but only 0 present.');
|
|
23563
|
-
}
|
|
23564
|
-
var controller = ResizeObserverController.getInstance();
|
|
23565
|
-
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
23566
|
-
observers.set(this, observer);
|
|
23567
|
-
}
|
|
23568
|
-
return ResizeObserver;
|
|
23569
|
-
}());
|
|
23570
|
-
// Expose public methods of ResizeObserver.
|
|
23571
|
-
[
|
|
23572
|
-
'observe',
|
|
23573
|
-
'unobserve',
|
|
23574
|
-
'disconnect'
|
|
23575
|
-
].forEach(function (method) {
|
|
23576
|
-
ResizeObserver_es_ResizeObserver.prototype[method] = function () {
|
|
23577
|
-
var _a;
|
|
23578
|
-
return (_a = observers.get(this))[method].apply(_a, arguments);
|
|
23579
|
-
};
|
|
23580
|
-
});
|
|
23581
|
-
|
|
23582
|
-
var index = (function () {
|
|
23583
|
-
// Export existing implementation if available.
|
|
23584
|
-
if (typeof global$1.ResizeObserver !== 'undefined') {
|
|
23585
|
-
return global$1.ResizeObserver;
|
|
23586
|
-
}
|
|
23587
|
-
return ResizeObserver_es_ResizeObserver;
|
|
23588
|
-
})();
|
|
23589
|
-
|
|
23590
|
-
/* harmony default export */ const ResizeObserver_es = (index);
|
|
23591
|
-
|
|
23592
22711
|
;// CONCATENATED MODULE: ./resizeObserver/index.tsx
|
|
23593
22712
|
|
|
23594
22713
|
|
|
23595
22714
|
|
|
23596
22715
|
|
|
23597
|
-
|
|
22716
|
+
var ObserverProperty;
|
|
22717
|
+
(function (ObserverProperty) {
|
|
22718
|
+
ObserverProperty["Width"] = "width";
|
|
22719
|
+
ObserverProperty["Height"] = "height";
|
|
22720
|
+
ObserverProperty["All"] = "all";
|
|
22721
|
+
})(ObserverProperty || (ObserverProperty = {}));
|
|
23598
22722
|
class ReactResizeObserver extends BaseComponent {
|
|
23599
22723
|
constructor(props) {
|
|
22724
|
+
var _this;
|
|
23600
22725
|
super(props);
|
|
22726
|
+
_this = this;
|
|
22727
|
+
this.formerPropertyValue = new Map();
|
|
23601
22728
|
this.getElement = () => {
|
|
23602
22729
|
try {
|
|
23603
22730
|
// using findDOMNode for two reasons:
|
|
@@ -23609,6 +22736,54 @@ class ReactResizeObserver extends BaseComponent {
|
|
|
23609
22736
|
return null;
|
|
23610
22737
|
}
|
|
23611
22738
|
};
|
|
22739
|
+
this.handleResizeEventTriggered = entries => {
|
|
22740
|
+
if (this.props.observerProperty === ObserverProperty.All) {
|
|
22741
|
+
this.props.onResize(entries);
|
|
22742
|
+
} else {
|
|
22743
|
+
const finalEntries = [];
|
|
22744
|
+
for (const entry of entries) {
|
|
22745
|
+
if (this.formerPropertyValue.has(entry.target)) {
|
|
22746
|
+
if (entry.contentRect[this.props.observerProperty] !== this.formerPropertyValue.get(entry.target)) {
|
|
22747
|
+
this.formerPropertyValue.set(entry.target, entry.contentRect[this.props.observerProperty]);
|
|
22748
|
+
finalEntries.push(entry);
|
|
22749
|
+
}
|
|
22750
|
+
} else {
|
|
22751
|
+
this.formerPropertyValue.set(entry.target, entry.contentRect[this.props.observerProperty]);
|
|
22752
|
+
finalEntries.push(entry);
|
|
22753
|
+
}
|
|
22754
|
+
}
|
|
22755
|
+
if (finalEntries.length > 0) {
|
|
22756
|
+
this.props.onResize(finalEntries);
|
|
22757
|
+
}
|
|
22758
|
+
}
|
|
22759
|
+
};
|
|
22760
|
+
this.observeElement = function () {
|
|
22761
|
+
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
22762
|
+
const element = _this.getElement();
|
|
22763
|
+
if (!_this.observer) {
|
|
22764
|
+
_this.observer = new ResizeObserver(_this.handleResizeEventTriggered);
|
|
22765
|
+
}
|
|
22766
|
+
if (!(element && element instanceof Element)) {
|
|
22767
|
+
// stop everything if not defined
|
|
22768
|
+
_this.observer.disconnect();
|
|
22769
|
+
return;
|
|
22770
|
+
}
|
|
22771
|
+
if (element === _this.element && !force) {
|
|
22772
|
+
// abort if given same element -- nothing to update (unless forced)
|
|
22773
|
+
return;
|
|
22774
|
+
} else {
|
|
22775
|
+
// clear observer list if new element
|
|
22776
|
+
_this.observer.disconnect();
|
|
22777
|
+
// remember element reference for next time
|
|
22778
|
+
_this.element = element;
|
|
22779
|
+
}
|
|
22780
|
+
// observer callback is invoked immediately when observing new elements
|
|
22781
|
+
_this.observer.observe(element);
|
|
22782
|
+
if (_this.props.observeParent && element.parentNode && element.parentNode.ownerDocument && element.parentNode.ownerDocument.defaultView && element.parentNode instanceof element.parentNode.ownerDocument.defaultView.HTMLElement) {
|
|
22783
|
+
_this._parentNode = element.parentNode;
|
|
22784
|
+
_this.observer.observe(_this._parentNode);
|
|
22785
|
+
}
|
|
22786
|
+
};
|
|
23612
22787
|
this.mergeRef = (ref, node) => {
|
|
23613
22788
|
this.childNode = node;
|
|
23614
22789
|
if (typeof ref === 'function') {
|
|
@@ -23617,7 +22792,7 @@ class ReactResizeObserver extends BaseComponent {
|
|
|
23617
22792
|
ref.current = node;
|
|
23618
22793
|
}
|
|
23619
22794
|
};
|
|
23620
|
-
this.observer = new
|
|
22795
|
+
this.observer = new ResizeObserver(this.handleResizeEventTriggered);
|
|
23621
22796
|
}
|
|
23622
22797
|
componentDidMount() {
|
|
23623
22798
|
this.observeElement();
|
|
@@ -23632,33 +22807,6 @@ class ReactResizeObserver extends BaseComponent {
|
|
|
23632
22807
|
this.element = null;
|
|
23633
22808
|
}
|
|
23634
22809
|
}
|
|
23635
|
-
observeElement() {
|
|
23636
|
-
let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
23637
|
-
const element = this.getElement();
|
|
23638
|
-
if (!this.observer) {
|
|
23639
|
-
this.observer = new ResizeObserver_es(this.props.onResize);
|
|
23640
|
-
}
|
|
23641
|
-
if (!(element && element instanceof Element)) {
|
|
23642
|
-
// stop everything if not defined
|
|
23643
|
-
this.observer.disconnect();
|
|
23644
|
-
return;
|
|
23645
|
-
}
|
|
23646
|
-
if (element === this.element && !force) {
|
|
23647
|
-
// abort if given same element -- nothing to update (unless forced)
|
|
23648
|
-
return;
|
|
23649
|
-
} else {
|
|
23650
|
-
// clear observer list if new element
|
|
23651
|
-
this.observer.disconnect();
|
|
23652
|
-
// remember element reference for next time
|
|
23653
|
-
this.element = element;
|
|
23654
|
-
}
|
|
23655
|
-
// observer callback is invoked immediately when observing new elements
|
|
23656
|
-
this.observer.observe(element);
|
|
23657
|
-
if (this.props.observeParent && element.parentNode && element.parentNode.ownerDocument && element.parentNode.ownerDocument.defaultView && element.parentNode instanceof element.parentNode.ownerDocument.defaultView.HTMLElement) {
|
|
23658
|
-
this._parentNode = element.parentNode;
|
|
23659
|
-
this.observer.observe(this._parentNode);
|
|
23660
|
-
}
|
|
23661
|
-
}
|
|
23662
22810
|
render() {
|
|
23663
22811
|
const child = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.only(this.props.children);
|
|
23664
22812
|
const {
|
|
@@ -23671,11 +22819,15 @@ class ReactResizeObserver extends BaseComponent {
|
|
|
23671
22819
|
}
|
|
23672
22820
|
ReactResizeObserver.propTypes = {
|
|
23673
22821
|
onResize: (prop_types_default()).func,
|
|
23674
|
-
observeParent: (prop_types_default()).bool
|
|
22822
|
+
observeParent: (prop_types_default()).bool,
|
|
22823
|
+
observerProperty: (prop_types_default()).string,
|
|
22824
|
+
delayTick: (prop_types_default()).number
|
|
23675
22825
|
};
|
|
23676
22826
|
ReactResizeObserver.defaultProps = {
|
|
23677
22827
|
onResize: () => {},
|
|
23678
|
-
observeParent: false
|
|
22828
|
+
observeParent: false,
|
|
22829
|
+
observerProperty: "all",
|
|
22830
|
+
delayTick: 0
|
|
23679
22831
|
};
|
|
23680
22832
|
;// CONCATENATED MODULE: ./typography/base.tsx
|
|
23681
22833
|
|
|
@@ -23684,6 +22836,33 @@ ReactResizeObserver.defaultProps = {
|
|
|
23684
22836
|
|
|
23685
22837
|
|
|
23686
22838
|
|
|
22839
|
+
var base_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
22840
|
+
function adopt(value) {
|
|
22841
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
22842
|
+
resolve(value);
|
|
22843
|
+
});
|
|
22844
|
+
}
|
|
22845
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
22846
|
+
function fulfilled(value) {
|
|
22847
|
+
try {
|
|
22848
|
+
step(generator.next(value));
|
|
22849
|
+
} catch (e) {
|
|
22850
|
+
reject(e);
|
|
22851
|
+
}
|
|
22852
|
+
}
|
|
22853
|
+
function rejected(value) {
|
|
22854
|
+
try {
|
|
22855
|
+
step(generator["throw"](value));
|
|
22856
|
+
} catch (e) {
|
|
22857
|
+
reject(e);
|
|
22858
|
+
}
|
|
22859
|
+
}
|
|
22860
|
+
function step(result) {
|
|
22861
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
22862
|
+
}
|
|
22863
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22864
|
+
});
|
|
22865
|
+
};
|
|
23687
22866
|
var base_rest = undefined && undefined.__rest || function (s, e) {
|
|
23688
22867
|
var t = {};
|
|
23689
22868
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -23739,12 +22918,18 @@ const wrapperDecorations = (props, content) => {
|
|
|
23739
22918
|
class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_.Component {
|
|
23740
22919
|
constructor(props) {
|
|
23741
22920
|
super(props);
|
|
23742
|
-
this.
|
|
22921
|
+
this.observerTakingEffect = false;
|
|
22922
|
+
this.onResize = entries => base_awaiter(this, void 0, void 0, function* () {
|
|
23743
22923
|
if (this.rafId) {
|
|
23744
22924
|
window.cancelAnimationFrame(this.rafId);
|
|
23745
22925
|
}
|
|
23746
|
-
|
|
23747
|
-
|
|
22926
|
+
return new Promise(resolve => {
|
|
22927
|
+
this.rafId = window.requestAnimationFrame(() => base_awaiter(this, void 0, void 0, function* () {
|
|
22928
|
+
yield this.getEllipsisState();
|
|
22929
|
+
resolve();
|
|
22930
|
+
}));
|
|
22931
|
+
});
|
|
22932
|
+
});
|
|
23748
22933
|
// if it needs to use js overflowed:
|
|
23749
22934
|
// 1. text is expandable 2. expandText need to be shown 3. has extra operation 4. text need to ellipse from mid
|
|
23750
22935
|
this.canUseCSSEllipsis = () => {
|
|
@@ -23814,6 +22999,80 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
23814
22999
|
}
|
|
23815
23000
|
return defaultOpts;
|
|
23816
23001
|
};
|
|
23002
|
+
this.onHover = () => {
|
|
23003
|
+
const canUseCSSEllipsis = this.canUseCSSEllipsis();
|
|
23004
|
+
if (canUseCSSEllipsis) {
|
|
23005
|
+
const {
|
|
23006
|
+
rows,
|
|
23007
|
+
suffix,
|
|
23008
|
+
pos
|
|
23009
|
+
} = this.getEllipsisOpt();
|
|
23010
|
+
const updateOverflow = this.shouldTruncated(rows);
|
|
23011
|
+
// isOverflowed needs to be updated to show tooltip when using css ellipsis
|
|
23012
|
+
this.setState({
|
|
23013
|
+
isOverflowed: updateOverflow,
|
|
23014
|
+
isTruncated: false
|
|
23015
|
+
});
|
|
23016
|
+
return undefined;
|
|
23017
|
+
}
|
|
23018
|
+
};
|
|
23019
|
+
this.getEllipsisState = () => base_awaiter(this, void 0, void 0, function* () {
|
|
23020
|
+
const {
|
|
23021
|
+
rows,
|
|
23022
|
+
suffix,
|
|
23023
|
+
pos
|
|
23024
|
+
} = this.getEllipsisOpt();
|
|
23025
|
+
const {
|
|
23026
|
+
children
|
|
23027
|
+
} = this.props;
|
|
23028
|
+
// wait until element mounted
|
|
23029
|
+
if (!this.wrapperRef || !this.wrapperRef.current) {
|
|
23030
|
+
yield this.onResize();
|
|
23031
|
+
return;
|
|
23032
|
+
}
|
|
23033
|
+
const {
|
|
23034
|
+
expanded
|
|
23035
|
+
} = this.state;
|
|
23036
|
+
const canUseCSSEllipsis = this.canUseCSSEllipsis();
|
|
23037
|
+
if (canUseCSSEllipsis) {
|
|
23038
|
+
// const updateOverflow = this.shouldTruncated(rows);
|
|
23039
|
+
// // isOverflowed needs to be updated to show tooltip when using css ellipsis
|
|
23040
|
+
// this.setState({
|
|
23041
|
+
// isOverflowed: updateOverflow,
|
|
23042
|
+
// isTruncated: false
|
|
23043
|
+
// });
|
|
23044
|
+
return;
|
|
23045
|
+
}
|
|
23046
|
+
// If children is null, css/js truncated flag isTruncate is false
|
|
23047
|
+
if (isNull_default()(children)) {
|
|
23048
|
+
return new Promise(resolve => {
|
|
23049
|
+
this.setState({
|
|
23050
|
+
isTruncated: false,
|
|
23051
|
+
isOverflowed: false
|
|
23052
|
+
}, resolve);
|
|
23053
|
+
});
|
|
23054
|
+
}
|
|
23055
|
+
// Currently only text truncation is supported, if there is non-text,
|
|
23056
|
+
// both css truncation and js truncation should throw a warning
|
|
23057
|
+
warning('children' in this.props && typeof children !== 'string', "[Semi Typography] Only children with pure text could be used with ellipsis at this moment.");
|
|
23058
|
+
if (!rows || rows < 0 || expanded) {
|
|
23059
|
+
return;
|
|
23060
|
+
}
|
|
23061
|
+
const extraNode = {
|
|
23062
|
+
expand: this.expandRef.current,
|
|
23063
|
+
copy: this.copyRef && this.copyRef.current
|
|
23064
|
+
};
|
|
23065
|
+
const content = util(this.wrapperRef.current, rows,
|
|
23066
|
+
// Perform type conversion on children to prevent component crash due to non-string type of children
|
|
23067
|
+
String(children), extraNode, ELLIPSIS_STR, suffix, pos);
|
|
23068
|
+
return new Promise(resolve => {
|
|
23069
|
+
this.setState({
|
|
23070
|
+
isOverflowed: false,
|
|
23071
|
+
ellipsisContent: content,
|
|
23072
|
+
isTruncated: children !== content
|
|
23073
|
+
}, resolve);
|
|
23074
|
+
});
|
|
23075
|
+
});
|
|
23817
23076
|
/**
|
|
23818
23077
|
* Triggered when the fold button is clicked to save the latest expanded state
|
|
23819
23078
|
* @param {Event} e
|
|
@@ -23980,9 +23239,13 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
23980
23239
|
ellipsisContent
|
|
23981
23240
|
} = this.state;
|
|
23982
23241
|
if (expanded || !isTruncated) {
|
|
23983
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(
|
|
23242
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
23243
|
+
onMouseEnter: this.onHover
|
|
23244
|
+
}, children, suffix && suffix.length ? suffix : null);
|
|
23984
23245
|
}
|
|
23985
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span",
|
|
23246
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
23247
|
+
onMouseEnter: this.onHover
|
|
23248
|
+
}, ellipsisContent, suffix);
|
|
23986
23249
|
};
|
|
23987
23250
|
this.state = {
|
|
23988
23251
|
editable: false,
|
|
@@ -24002,7 +23265,8 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
24002
23265
|
}
|
|
24003
23266
|
componentDidMount() {
|
|
24004
23267
|
if (this.props.ellipsis) {
|
|
24005
|
-
|
|
23268
|
+
// runAfterTicks: make sure start observer on the next tick
|
|
23269
|
+
this.onResize().then(() => runAfterTicks(() => this.observerTakingEffect = true, 1));
|
|
24006
23270
|
}
|
|
24007
23271
|
}
|
|
24008
23272
|
static getDerivedStateFromProps(props, prevState) {
|
|
@@ -24034,61 +23298,6 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
24034
23298
|
window.cancelAnimationFrame(this.rafId);
|
|
24035
23299
|
}
|
|
24036
23300
|
}
|
|
24037
|
-
getEllipsisState() {
|
|
24038
|
-
const {
|
|
24039
|
-
rows,
|
|
24040
|
-
suffix,
|
|
24041
|
-
pos
|
|
24042
|
-
} = this.getEllipsisOpt();
|
|
24043
|
-
const {
|
|
24044
|
-
children
|
|
24045
|
-
} = this.props;
|
|
24046
|
-
// wait until element mounted
|
|
24047
|
-
if (!this.wrapperRef || !this.wrapperRef.current) {
|
|
24048
|
-
this.onResize();
|
|
24049
|
-
return false;
|
|
24050
|
-
}
|
|
24051
|
-
const {
|
|
24052
|
-
expanded
|
|
24053
|
-
} = this.state;
|
|
24054
|
-
const canUseCSSEllipsis = this.canUseCSSEllipsis();
|
|
24055
|
-
// If children is null, css/js truncated flag isTruncate is false
|
|
24056
|
-
if (isNull_default()(children)) {
|
|
24057
|
-
this.setState({
|
|
24058
|
-
isTruncated: false,
|
|
24059
|
-
isOverflowed: false
|
|
24060
|
-
});
|
|
24061
|
-
return undefined;
|
|
24062
|
-
}
|
|
24063
|
-
// Currently only text truncation is supported, if there is non-text,
|
|
24064
|
-
// both css truncation and js truncation should throw a warning
|
|
24065
|
-
warning('children' in this.props && typeof children !== 'string', "[Semi Typography] Only children with pure text could be used with ellipsis at this moment.");
|
|
24066
|
-
if (!rows || rows < 0 || expanded) {
|
|
24067
|
-
return undefined;
|
|
24068
|
-
}
|
|
24069
|
-
if (canUseCSSEllipsis) {
|
|
24070
|
-
const updateOverflow = this.shouldTruncated(rows);
|
|
24071
|
-
// isOverflowed needs to be updated to show tooltip when using css ellipsis
|
|
24072
|
-
this.setState({
|
|
24073
|
-
isOverflowed: updateOverflow,
|
|
24074
|
-
isTruncated: false
|
|
24075
|
-
});
|
|
24076
|
-
return undefined;
|
|
24077
|
-
}
|
|
24078
|
-
const extraNode = {
|
|
24079
|
-
expand: this.expandRef.current,
|
|
24080
|
-
copy: this.copyRef && this.copyRef.current
|
|
24081
|
-
};
|
|
24082
|
-
const content = util(this.wrapperRef.current, rows,
|
|
24083
|
-
// Perform type conversion on children to prevent component crash due to non-string type of children
|
|
24084
|
-
String(children), extraNode, ELLIPSIS_STR, suffix, pos);
|
|
24085
|
-
this.setState({
|
|
24086
|
-
isOverflowed: false,
|
|
24087
|
-
ellipsisContent: content,
|
|
24088
|
-
isTruncated: children !== content
|
|
24089
|
-
});
|
|
24090
|
-
return undefined;
|
|
24091
|
-
}
|
|
24092
23301
|
renderOperations() {
|
|
24093
23302
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, this.renderExpandable(), this.renderCopy());
|
|
24094
23303
|
}
|
|
@@ -24230,6 +23439,7 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
24230
23439
|
}
|
|
24231
23440
|
}
|
|
24232
23441
|
render() {
|
|
23442
|
+
var _this = this;
|
|
24233
23443
|
const content = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(LocaleConsumer, {
|
|
24234
23444
|
componentName: "Typography"
|
|
24235
23445
|
}, locale => {
|
|
@@ -24239,8 +23449,13 @@ class Base extends external_root_React_commonjs2_react_commonjs_react_amd_react_
|
|
|
24239
23449
|
});
|
|
24240
23450
|
if (this.props.ellipsis) {
|
|
24241
23451
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ReactResizeObserver, {
|
|
24242
|
-
onResize:
|
|
24243
|
-
|
|
23452
|
+
onResize: function () {
|
|
23453
|
+
if (_this.observerTakingEffect) {
|
|
23454
|
+
_this.onResize(...arguments);
|
|
23455
|
+
}
|
|
23456
|
+
},
|
|
23457
|
+
observeParent: true,
|
|
23458
|
+
observerProperty: ObserverProperty.Width
|
|
24244
23459
|
}, content);
|
|
24245
23460
|
}
|
|
24246
23461
|
return content;
|
|
@@ -26887,6 +26102,7 @@ var autoComplete = __webpack_require__("PyaV");
|
|
|
26887
26102
|
|
|
26888
26103
|
|
|
26889
26104
|
|
|
26105
|
+
|
|
26890
26106
|
const autoComplete_prefixCls = autoComplete_constants_cssClasses.PREFIX;
|
|
26891
26107
|
const autoComplete_sizeSet = autoComplete_constants_strings.SIZE;
|
|
26892
26108
|
const autoComplete_positionSet = autoComplete_constants_strings.POSITION;
|
|
@@ -27257,7 +26473,8 @@ AutoComplete.propTypes = {
|
|
|
27257
26473
|
zIndex: (prop_types_default()).number
|
|
27258
26474
|
};
|
|
27259
26475
|
AutoComplete.Option = autoComplete_option;
|
|
27260
|
-
AutoComplete.
|
|
26476
|
+
AutoComplete.__SemiComponentName__ = "AutoComplete";
|
|
26477
|
+
AutoComplete.defaultProps = getDefaultPropsFromGlobalConfig(AutoComplete.__SemiComponentName__, {
|
|
27261
26478
|
stopPropagation: true,
|
|
27262
26479
|
motion: true,
|
|
27263
26480
|
zIndex: constants_numbers.DEFAULT_Z_INDEX,
|
|
@@ -27283,7 +26500,7 @@ AutoComplete.defaultProps = {
|
|
|
27283
26500
|
onKeyDown: (noop_default())
|
|
27284
26501
|
// onPressEnter: () => undefined,
|
|
27285
26502
|
// defaultOpen: false,
|
|
27286
|
-
};
|
|
26503
|
+
});
|
|
27287
26504
|
|
|
27288
26505
|
/* harmony default export */ const autoComplete_0 = (AutoComplete);
|
|
27289
26506
|
;// CONCATENATED MODULE: ../semi-foundation/avatar/constants.ts
|
|
@@ -27445,6 +26662,7 @@ var avatar_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
27445
26662
|
|
|
27446
26663
|
|
|
27447
26664
|
|
|
26665
|
+
|
|
27448
26666
|
const avatar_sizeSet = avatar_constants_strings.SIZE;
|
|
27449
26667
|
const shapeSet = avatar_constants_strings.SHAPE;
|
|
27450
26668
|
const colorSet = avatar_constants_strings.COLOR;
|
|
@@ -27774,7 +26992,8 @@ class Avatar extends BaseComponent {
|
|
|
27774
26992
|
}
|
|
27775
26993
|
}
|
|
27776
26994
|
}
|
|
27777
|
-
Avatar.
|
|
26995
|
+
Avatar.__SemiComponentName__ = "Avatar";
|
|
26996
|
+
Avatar.defaultProps = getDefaultPropsFromGlobalConfig(Avatar.__SemiComponentName__, {
|
|
27778
26997
|
size: 'medium',
|
|
27779
26998
|
color: 'grey',
|
|
27780
26999
|
shape: 'circle',
|
|
@@ -27782,7 +27001,7 @@ Avatar.defaultProps = {
|
|
|
27782
27001
|
onClick: function_noop,
|
|
27783
27002
|
onMouseEnter: function_noop,
|
|
27784
27003
|
onMouseLeave: function_noop
|
|
27785
|
-
};
|
|
27004
|
+
});
|
|
27786
27005
|
Avatar.propTypes = {
|
|
27787
27006
|
children: (prop_types_default()).node,
|
|
27788
27007
|
color: prop_types_default().oneOf(colorSet),
|
|
@@ -28873,6 +28092,7 @@ var backtop_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
28873
28092
|
|
|
28874
28093
|
|
|
28875
28094
|
|
|
28095
|
+
|
|
28876
28096
|
const backtop_prefixCls = backtop_constants_cssClasses.PREFIX;
|
|
28877
28097
|
const getDefaultTarget = () => window;
|
|
28878
28098
|
class BackTop extends BaseComponent {
|
|
@@ -28948,11 +28168,12 @@ class BackTop extends BaseComponent {
|
|
|
28948
28168
|
return content;
|
|
28949
28169
|
}
|
|
28950
28170
|
}
|
|
28951
|
-
BackTop.
|
|
28171
|
+
BackTop.__SemiComponentName__ = "BackTop";
|
|
28172
|
+
BackTop.defaultProps = getDefaultPropsFromGlobalConfig(BackTop.__SemiComponentName__, {
|
|
28952
28173
|
visibilityHeight: 400,
|
|
28953
28174
|
target: getDefaultTarget,
|
|
28954
28175
|
duration: 450
|
|
28955
|
-
};
|
|
28176
|
+
});
|
|
28956
28177
|
BackTop.propTypes = {
|
|
28957
28178
|
target: (prop_types_default()).func,
|
|
28958
28179
|
visibilityHeight: (prop_types_default()).number,
|
|
@@ -29864,6 +29085,7 @@ Breadcrumb.defaultProps = {
|
|
|
29864
29085
|
|
|
29865
29086
|
|
|
29866
29087
|
|
|
29088
|
+
|
|
29867
29089
|
class Button extends (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent {
|
|
29868
29090
|
constructor() {
|
|
29869
29091
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -29881,7 +29103,9 @@ class Button extends (external_root_React_commonjs2_react_commonjs_react_amd_rea
|
|
|
29881
29103
|
}
|
|
29882
29104
|
}
|
|
29883
29105
|
}
|
|
29106
|
+
Button.__SemiComponentName__ = "Button";
|
|
29884
29107
|
Button.propTypes = Object.assign(Object.assign({}, Button_Button.propTypes), iconButton_0.propTypes);
|
|
29108
|
+
Button.defaultProps = getDefaultPropsFromGlobalConfig(Button.__SemiComponentName__);
|
|
29885
29109
|
Button.elementType = 'Button';
|
|
29886
29110
|
/* harmony default export */ const button_0 = (Button);
|
|
29887
29111
|
;// CONCATENATED MODULE: ./button/buttonGroup.tsx
|
|
@@ -36494,9 +35718,6 @@ var isSet_default = /*#__PURE__*/__webpack_require__.n(isSet);
|
|
|
36494
35718
|
// EXTERNAL MODULE: ../../node_modules/lodash/includes.js
|
|
36495
35719
|
var includes = __webpack_require__("qYhz");
|
|
36496
35720
|
var includes_default = /*#__PURE__*/__webpack_require__.n(includes);
|
|
36497
|
-
// EXTERNAL MODULE: ../../node_modules/lodash/cloneDeep.js
|
|
36498
|
-
var lodash_cloneDeep = __webpack_require__("c2re");
|
|
36499
|
-
var cloneDeep_default = /*#__PURE__*/__webpack_require__.n(lodash_cloneDeep);
|
|
36500
35721
|
// EXTERNAL MODULE: ../../node_modules/lodash/assign.js
|
|
36501
35722
|
var lodash_assign = __webpack_require__("whR3");
|
|
36502
35723
|
var assign_default = /*#__PURE__*/__webpack_require__.n(lodash_assign);
|
|
@@ -37313,7 +36534,6 @@ function calcMergeType(autoMergeValue, leafOnly) {
|
|
|
37313
36534
|
|
|
37314
36535
|
|
|
37315
36536
|
|
|
37316
|
-
|
|
37317
36537
|
class CascaderFoundation extends foundation {
|
|
37318
36538
|
constructor(adapter) {
|
|
37319
36539
|
super(Object.assign({}, adapter));
|
|
@@ -37406,13 +36626,6 @@ class CascaderFoundation extends foundation {
|
|
|
37406
36626
|
const isDisabled = findAncestorKeys([key], keyEntities, true).some(item => keyEntities[item].data.disabled);
|
|
37407
36627
|
return isDisabled;
|
|
37408
36628
|
}
|
|
37409
|
-
getCopyFromState(items) {
|
|
37410
|
-
const res = {};
|
|
37411
|
-
util_normalizedArr(items).forEach(key => {
|
|
37412
|
-
res[key] = cloneDeep_default()(this.getState(key));
|
|
37413
|
-
});
|
|
37414
|
-
return res;
|
|
37415
|
-
}
|
|
37416
36629
|
// prop: is array, return all data
|
|
37417
36630
|
getItemPropPath(selectedKey, prop, keyEntities) {
|
|
37418
36631
|
const searchMap = keyEntities || this.getState('keyEntities');
|
|
@@ -37789,8 +37002,8 @@ class CascaderFoundation extends foundation {
|
|
|
37789
37002
|
data,
|
|
37790
37003
|
key
|
|
37791
37004
|
} = item;
|
|
37792
|
-
const prevLoadingKeys =
|
|
37793
|
-
const prevLoadedKeys =
|
|
37005
|
+
const prevLoadingKeys = new Set(this._adapter.getLoadingKeyRefValue());
|
|
37006
|
+
const prevLoadedKeys = new Set(this._adapter.getLoadedKeyRefValue());
|
|
37794
37007
|
const newLoadedKeys = prevLoadedKeys.add(key);
|
|
37795
37008
|
const newLoadingKeys = new Set([...prevLoadingKeys]);
|
|
37796
37009
|
newLoadingKeys.delete(key);
|
|
@@ -37813,7 +37026,7 @@ class CascaderFoundation extends foundation {
|
|
|
37813
37026
|
});
|
|
37814
37027
|
if (!data.isLeaf && !data.children && this.getProp('loadData')) {
|
|
37815
37028
|
const loadedKeys = this._adapter.getLoadedKeyRefValue();
|
|
37816
|
-
const loadingKeys =
|
|
37029
|
+
const loadingKeys = new Set(this._adapter.getLoadingKeyRefValue());
|
|
37817
37030
|
if (loadedKeys.has(key) || loadingKeys.has(key)) {
|
|
37818
37031
|
return;
|
|
37819
37032
|
}
|
|
@@ -37973,9 +37186,7 @@ class CascaderFoundation extends foundation {
|
|
|
37973
37186
|
keyEntities,
|
|
37974
37187
|
disabledKeys
|
|
37975
37188
|
} = this.getStates();
|
|
37976
|
-
const
|
|
37977
|
-
checkedKeys
|
|
37978
|
-
} = this.getCopyFromState(['checkedKeys']);
|
|
37189
|
+
const checkedKeys = new Set(this.getState('checkedKeys'));
|
|
37979
37190
|
const descendantKeys = normalizeKeyList(findDescendantKeys([eventKey], keyEntities, false), keyEntities, true);
|
|
37980
37191
|
const hasDisabled = descendantKeys.some(key => disabledKeys.has(key));
|
|
37981
37192
|
if (!hasDisabled) {
|
|
@@ -38025,10 +37236,8 @@ class CascaderFoundation extends foundation {
|
|
|
38025
37236
|
const {
|
|
38026
37237
|
keyEntities
|
|
38027
37238
|
} = this.getStates();
|
|
38028
|
-
const
|
|
38029
|
-
|
|
38030
|
-
halfCheckedKeys
|
|
38031
|
-
} = this.getCopyFromState(['checkedKeys', 'halfCheckedKeys']);
|
|
37239
|
+
const checkedKeys = new Set(this.getState('checkedKeys'));
|
|
37240
|
+
const halfCheckedKeys = new Set(this.getState('halfCheckedKeys'));
|
|
38032
37241
|
return curCheckedStatus ? calcCheckedKeysForChecked(key, keyEntities, checkedKeys, halfCheckedKeys) : calcCheckedKeysForUnchecked(key, keyEntities, checkedKeys, halfCheckedKeys);
|
|
38033
37242
|
}
|
|
38034
37243
|
handleInputChange(sugInput) {
|
|
@@ -48707,6 +47916,7 @@ class Cascader extends BaseComponent {
|
|
|
48707
47916
|
}, selection);
|
|
48708
47917
|
}
|
|
48709
47918
|
}
|
|
47919
|
+
Cascader.__SemiComponentName__ = "Cascader";
|
|
48710
47920
|
Cascader.contextType = context;
|
|
48711
47921
|
Cascader.propTypes = {
|
|
48712
47922
|
'aria-labelledby': (prop_types_default()).string,
|
|
@@ -48785,7 +47995,7 @@ Cascader.propTypes = {
|
|
|
48785
47995
|
preventScroll: (prop_types_default()).bool,
|
|
48786
47996
|
position: (prop_types_default()).string
|
|
48787
47997
|
};
|
|
48788
|
-
Cascader.defaultProps = {
|
|
47998
|
+
Cascader.defaultProps = getDefaultPropsFromGlobalConfig(Cascader.__SemiComponentName__, {
|
|
48789
47999
|
borderless: false,
|
|
48790
48000
|
leafOnly: false,
|
|
48791
48001
|
arrowIcon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(IconChevronDown, null),
|
|
@@ -48815,7 +48025,7 @@ Cascader.defaultProps = {
|
|
|
48815
48025
|
onListScroll: (noop_default()),
|
|
48816
48026
|
enableLeafClick: false,
|
|
48817
48027
|
'aria-label': 'Cascader'
|
|
48818
|
-
};
|
|
48028
|
+
});
|
|
48819
48029
|
/* harmony default export */ const cascader_0 = (Cascader);
|
|
48820
48030
|
;// CONCATENATED MODULE: ../semi-foundation/collapse/constants.ts
|
|
48821
48031
|
|
|
@@ -48911,6 +48121,7 @@ var collapsible = __webpack_require__("v967");
|
|
|
48911
48121
|
|
|
48912
48122
|
|
|
48913
48123
|
|
|
48124
|
+
|
|
48914
48125
|
class Collapsible extends BaseComponent {
|
|
48915
48126
|
constructor(props) {
|
|
48916
48127
|
super(props);
|
|
@@ -49033,14 +48244,15 @@ class Collapsible extends BaseComponent {
|
|
|
49033
48244
|
}, (this.props.keepDOM || this.props.collapseHeight !== 0 || this.state.visible || this.props.isOpen) && this.props.children));
|
|
49034
48245
|
}
|
|
49035
48246
|
}
|
|
49036
|
-
Collapsible.
|
|
48247
|
+
Collapsible.__SemiComponentName__ = "Collapsible";
|
|
48248
|
+
Collapsible.defaultProps = getDefaultPropsFromGlobalConfig(Collapsible.__SemiComponentName__, {
|
|
49037
48249
|
isOpen: false,
|
|
49038
48250
|
duration: 250,
|
|
49039
48251
|
motion: true,
|
|
49040
48252
|
keepDOM: false,
|
|
49041
48253
|
collapseHeight: 0,
|
|
49042
48254
|
fade: false
|
|
49043
|
-
};
|
|
48255
|
+
});
|
|
49044
48256
|
Collapsible.getEntryInfo = entry => {
|
|
49045
48257
|
//judge whether parent or self display none
|
|
49046
48258
|
let inRenderTree;
|
|
@@ -49238,6 +48450,7 @@ var collapse_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
49238
48450
|
|
|
49239
48451
|
|
|
49240
48452
|
|
|
48453
|
+
|
|
49241
48454
|
class Collapse extends BaseComponent {
|
|
49242
48455
|
constructor(props) {
|
|
49243
48456
|
super(props);
|
|
@@ -49327,12 +48540,13 @@ Collapse.propTypes = {
|
|
|
49327
48540
|
motion: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).func, (prop_types_default()).object]),
|
|
49328
48541
|
expandIconPosition: prop_types_default().oneOf(collapse_constants_strings.iconPosition)
|
|
49329
48542
|
};
|
|
49330
|
-
Collapse.
|
|
48543
|
+
Collapse.__SemiComponentName__ = "Collapse";
|
|
48544
|
+
Collapse.defaultProps = getDefaultPropsFromGlobalConfig(Collapse.__SemiComponentName__, {
|
|
49331
48545
|
defaultActiveKey: '',
|
|
49332
48546
|
clickHeaderToExpand: true,
|
|
49333
48547
|
onChange: function_noop,
|
|
49334
48548
|
expandIconPosition: 'right'
|
|
49335
|
-
};
|
|
48549
|
+
});
|
|
49336
48550
|
/* harmony default export */ const collapse_0 = (Collapse);
|
|
49337
48551
|
;// CONCATENATED MODULE: ./configProvider/index.tsx
|
|
49338
48552
|
var configProvider_rest = undefined && undefined.__rest || function (s, e) {
|
|
@@ -49349,7 +48563,10 @@ var configProvider_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
49349
48563
|
|
|
49350
48564
|
|
|
49351
48565
|
class ConfigProvider extends (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Component {
|
|
49352
|
-
|
|
48566
|
+
constructor(props) {
|
|
48567
|
+
super(props);
|
|
48568
|
+
}
|
|
48569
|
+
renderChildren() {
|
|
49353
48570
|
const {
|
|
49354
48571
|
direction,
|
|
49355
48572
|
children
|
|
@@ -49372,7 +48589,7 @@ class ConfigProvider extends (external_root_React_commonjs2_react_commonjs_react
|
|
|
49372
48589
|
value: Object.assign({
|
|
49373
48590
|
direction
|
|
49374
48591
|
}, rest)
|
|
49375
|
-
}, this.
|
|
48592
|
+
}, this.renderChildren());
|
|
49376
48593
|
}
|
|
49377
48594
|
}
|
|
49378
48595
|
ConfigProvider.propTypes = {
|
|
@@ -54767,6 +53984,406 @@ function getDefaultPickerDate(options) {
|
|
|
54767
53984
|
nextDate: nextDate
|
|
54768
53985
|
};
|
|
54769
53986
|
}
|
|
53987
|
+
;// CONCATENATED MODULE: ../../node_modules/fast-copy/dist/esm/index.mjs
|
|
53988
|
+
var toStringFunction = Function.prototype.toString;
|
|
53989
|
+
var create = Object.create;
|
|
53990
|
+
var toStringObject = Object.prototype.toString;
|
|
53991
|
+
/**
|
|
53992
|
+
* @classdesc Fallback cache for when WeakMap is not natively supported
|
|
53993
|
+
*/
|
|
53994
|
+
var LegacyCache = /** @class */ (function () {
|
|
53995
|
+
function LegacyCache() {
|
|
53996
|
+
this._keys = [];
|
|
53997
|
+
this._values = [];
|
|
53998
|
+
}
|
|
53999
|
+
LegacyCache.prototype.has = function (key) {
|
|
54000
|
+
return !!~this._keys.indexOf(key);
|
|
54001
|
+
};
|
|
54002
|
+
LegacyCache.prototype.get = function (key) {
|
|
54003
|
+
return this._values[this._keys.indexOf(key)];
|
|
54004
|
+
};
|
|
54005
|
+
LegacyCache.prototype.set = function (key, value) {
|
|
54006
|
+
this._keys.push(key);
|
|
54007
|
+
this._values.push(value);
|
|
54008
|
+
};
|
|
54009
|
+
return LegacyCache;
|
|
54010
|
+
}());
|
|
54011
|
+
function createCacheLegacy() {
|
|
54012
|
+
return new LegacyCache();
|
|
54013
|
+
}
|
|
54014
|
+
function createCacheModern() {
|
|
54015
|
+
return new WeakMap();
|
|
54016
|
+
}
|
|
54017
|
+
/**
|
|
54018
|
+
* Get a new cache object to prevent circular references.
|
|
54019
|
+
*/
|
|
54020
|
+
var createCache = typeof WeakMap !== 'undefined' ? createCacheModern : createCacheLegacy;
|
|
54021
|
+
/**
|
|
54022
|
+
* Get an empty version of the object with the same prototype it has.
|
|
54023
|
+
*/
|
|
54024
|
+
function getCleanClone(prototype) {
|
|
54025
|
+
if (!prototype) {
|
|
54026
|
+
return create(null);
|
|
54027
|
+
}
|
|
54028
|
+
var Constructor = prototype.constructor;
|
|
54029
|
+
if (Constructor === Object) {
|
|
54030
|
+
return prototype === Object.prototype ? {} : create(prototype);
|
|
54031
|
+
}
|
|
54032
|
+
if (~toStringFunction.call(Constructor).indexOf('[native code]')) {
|
|
54033
|
+
try {
|
|
54034
|
+
return new Constructor();
|
|
54035
|
+
}
|
|
54036
|
+
catch (_a) { }
|
|
54037
|
+
}
|
|
54038
|
+
return create(prototype);
|
|
54039
|
+
}
|
|
54040
|
+
function getRegExpFlagsLegacy(regExp) {
|
|
54041
|
+
var flags = '';
|
|
54042
|
+
if (regExp.global) {
|
|
54043
|
+
flags += 'g';
|
|
54044
|
+
}
|
|
54045
|
+
if (regExp.ignoreCase) {
|
|
54046
|
+
flags += 'i';
|
|
54047
|
+
}
|
|
54048
|
+
if (regExp.multiline) {
|
|
54049
|
+
flags += 'm';
|
|
54050
|
+
}
|
|
54051
|
+
if (regExp.unicode) {
|
|
54052
|
+
flags += 'u';
|
|
54053
|
+
}
|
|
54054
|
+
if (regExp.sticky) {
|
|
54055
|
+
flags += 'y';
|
|
54056
|
+
}
|
|
54057
|
+
return flags;
|
|
54058
|
+
}
|
|
54059
|
+
function getRegExpFlagsModern(regExp) {
|
|
54060
|
+
return regExp.flags;
|
|
54061
|
+
}
|
|
54062
|
+
/**
|
|
54063
|
+
* Get the flags to apply to the copied regexp.
|
|
54064
|
+
*/
|
|
54065
|
+
var getRegExpFlags = /test/g.flags === 'g' ? getRegExpFlagsModern : getRegExpFlagsLegacy;
|
|
54066
|
+
function getTagLegacy(value) {
|
|
54067
|
+
var type = toStringObject.call(value);
|
|
54068
|
+
return type.substring(8, type.length - 1);
|
|
54069
|
+
}
|
|
54070
|
+
function getTagModern(value) {
|
|
54071
|
+
return value[Symbol.toStringTag] || getTagLegacy(value);
|
|
54072
|
+
}
|
|
54073
|
+
/**
|
|
54074
|
+
* Get the tag of the value passed, so that the correct copier can be used.
|
|
54075
|
+
*/
|
|
54076
|
+
var getTag = typeof Symbol !== 'undefined' ? getTagModern : getTagLegacy;
|
|
54077
|
+
|
|
54078
|
+
var defineProperty = Object.defineProperty, getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, getOwnPropertyNames = Object.getOwnPropertyNames, getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
54079
|
+
var _a = Object.prototype, esm_hasOwnProperty = _a.hasOwnProperty, propertyIsEnumerable = _a.propertyIsEnumerable;
|
|
54080
|
+
var SUPPORTS_SYMBOL = typeof getOwnPropertySymbols === 'function';
|
|
54081
|
+
function getStrictPropertiesModern(object) {
|
|
54082
|
+
return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
|
|
54083
|
+
}
|
|
54084
|
+
/**
|
|
54085
|
+
* Get the properites used when copying objects strictly. This includes both keys and symbols.
|
|
54086
|
+
*/
|
|
54087
|
+
var getStrictProperties = SUPPORTS_SYMBOL
|
|
54088
|
+
? getStrictPropertiesModern
|
|
54089
|
+
: getOwnPropertyNames;
|
|
54090
|
+
/**
|
|
54091
|
+
* Striclty copy all properties contained on the object.
|
|
54092
|
+
*/
|
|
54093
|
+
function copyOwnPropertiesStrict(value, clone, state) {
|
|
54094
|
+
var properties = getStrictProperties(value);
|
|
54095
|
+
for (var index = 0, length_1 = properties.length, property = void 0, descriptor = void 0; index < length_1; ++index) {
|
|
54096
|
+
property = properties[index];
|
|
54097
|
+
if (property === 'callee' || property === 'caller') {
|
|
54098
|
+
continue;
|
|
54099
|
+
}
|
|
54100
|
+
descriptor = getOwnPropertyDescriptor(value, property);
|
|
54101
|
+
if (!descriptor) {
|
|
54102
|
+
// In extra edge cases where the property descriptor cannot be retrived, fall back to
|
|
54103
|
+
// the loose assignment.
|
|
54104
|
+
clone[property] = state.copier(value[property], state);
|
|
54105
|
+
continue;
|
|
54106
|
+
}
|
|
54107
|
+
// Only clone the value if actually a value, not a getter / setter.
|
|
54108
|
+
if (!descriptor.get && !descriptor.set) {
|
|
54109
|
+
descriptor.value = state.copier(descriptor.value, state);
|
|
54110
|
+
}
|
|
54111
|
+
try {
|
|
54112
|
+
defineProperty(clone, property, descriptor);
|
|
54113
|
+
}
|
|
54114
|
+
catch (error) {
|
|
54115
|
+
// Tee above can fail on node in edge cases, so fall back to the loose assignment.
|
|
54116
|
+
clone[property] = descriptor.value;
|
|
54117
|
+
}
|
|
54118
|
+
}
|
|
54119
|
+
return clone;
|
|
54120
|
+
}
|
|
54121
|
+
/**
|
|
54122
|
+
* Deeply copy the indexed values in the array.
|
|
54123
|
+
*/
|
|
54124
|
+
function copyArrayLoose(array, state) {
|
|
54125
|
+
var clone = new state.Constructor();
|
|
54126
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
54127
|
+
state.cache.set(array, clone);
|
|
54128
|
+
for (var index = 0, length_2 = array.length; index < length_2; ++index) {
|
|
54129
|
+
clone[index] = state.copier(array[index], state);
|
|
54130
|
+
}
|
|
54131
|
+
return clone;
|
|
54132
|
+
}
|
|
54133
|
+
/**
|
|
54134
|
+
* Deeply copy the indexed values in the array, as well as any custom properties.
|
|
54135
|
+
*/
|
|
54136
|
+
function copyArrayStrict(array, state) {
|
|
54137
|
+
var clone = new state.Constructor();
|
|
54138
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
54139
|
+
state.cache.set(array, clone);
|
|
54140
|
+
return copyOwnPropertiesStrict(array, clone, state);
|
|
54141
|
+
}
|
|
54142
|
+
/**
|
|
54143
|
+
* Copy the contents of the ArrayBuffer.
|
|
54144
|
+
*/
|
|
54145
|
+
function copyArrayBuffer(arrayBuffer, _state) {
|
|
54146
|
+
return arrayBuffer.slice(0);
|
|
54147
|
+
}
|
|
54148
|
+
/**
|
|
54149
|
+
* Create a new Blob with the contents of the original.
|
|
54150
|
+
*/
|
|
54151
|
+
function copyBlob(blob, _state) {
|
|
54152
|
+
return blob.slice(0, blob.size, blob.type);
|
|
54153
|
+
}
|
|
54154
|
+
/**
|
|
54155
|
+
* Create a new DataView with the contents of the original.
|
|
54156
|
+
*/
|
|
54157
|
+
function copyDataView(dataView, state) {
|
|
54158
|
+
return new state.Constructor(copyArrayBuffer(dataView.buffer));
|
|
54159
|
+
}
|
|
54160
|
+
/**
|
|
54161
|
+
* Create a new Date based on the time of the original.
|
|
54162
|
+
*/
|
|
54163
|
+
function copyDate(date, state) {
|
|
54164
|
+
return new state.Constructor(date.getTime());
|
|
54165
|
+
}
|
|
54166
|
+
/**
|
|
54167
|
+
* Deeply copy the keys and values of the original.
|
|
54168
|
+
*/
|
|
54169
|
+
function copyMapLoose(map, state) {
|
|
54170
|
+
var clone = new state.Constructor();
|
|
54171
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
54172
|
+
state.cache.set(map, clone);
|
|
54173
|
+
map.forEach(function (value, key) {
|
|
54174
|
+
clone.set(key, state.copier(value, state));
|
|
54175
|
+
});
|
|
54176
|
+
return clone;
|
|
54177
|
+
}
|
|
54178
|
+
/**
|
|
54179
|
+
* Deeply copy the keys and values of the original, as well as any custom properties.
|
|
54180
|
+
*/
|
|
54181
|
+
function copyMapStrict(map, state) {
|
|
54182
|
+
return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state);
|
|
54183
|
+
}
|
|
54184
|
+
function copyObjectLooseLegacy(object, state) {
|
|
54185
|
+
var clone = getCleanClone(state.prototype);
|
|
54186
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
54187
|
+
state.cache.set(object, clone);
|
|
54188
|
+
for (var key in object) {
|
|
54189
|
+
if (esm_hasOwnProperty.call(object, key)) {
|
|
54190
|
+
clone[key] = state.copier(object[key], state);
|
|
54191
|
+
}
|
|
54192
|
+
}
|
|
54193
|
+
return clone;
|
|
54194
|
+
}
|
|
54195
|
+
function copyObjectLooseModern(object, state) {
|
|
54196
|
+
var clone = getCleanClone(state.prototype);
|
|
54197
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
54198
|
+
state.cache.set(object, clone);
|
|
54199
|
+
for (var key in object) {
|
|
54200
|
+
if (esm_hasOwnProperty.call(object, key)) {
|
|
54201
|
+
clone[key] = state.copier(object[key], state);
|
|
54202
|
+
}
|
|
54203
|
+
}
|
|
54204
|
+
var symbols = getOwnPropertySymbols(object);
|
|
54205
|
+
for (var index = 0, length_3 = symbols.length, symbol = void 0; index < length_3; ++index) {
|
|
54206
|
+
symbol = symbols[index];
|
|
54207
|
+
if (propertyIsEnumerable.call(object, symbol)) {
|
|
54208
|
+
clone[symbol] = state.copier(object[symbol], state);
|
|
54209
|
+
}
|
|
54210
|
+
}
|
|
54211
|
+
return clone;
|
|
54212
|
+
}
|
|
54213
|
+
/**
|
|
54214
|
+
* Deeply copy the properties (keys and symbols) and values of the original.
|
|
54215
|
+
*/
|
|
54216
|
+
var copyObjectLoose = SUPPORTS_SYMBOL
|
|
54217
|
+
? copyObjectLooseModern
|
|
54218
|
+
: copyObjectLooseLegacy;
|
|
54219
|
+
/**
|
|
54220
|
+
* Deeply copy the properties (keys and symbols) and values of the original, as well
|
|
54221
|
+
* as any hidden or non-enumerable properties.
|
|
54222
|
+
*/
|
|
54223
|
+
function copyObjectStrict(object, state) {
|
|
54224
|
+
var clone = getCleanClone(state.prototype);
|
|
54225
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
54226
|
+
state.cache.set(object, clone);
|
|
54227
|
+
return copyOwnPropertiesStrict(object, clone, state);
|
|
54228
|
+
}
|
|
54229
|
+
/**
|
|
54230
|
+
* Create a new primitive wrapper from the value of the original.
|
|
54231
|
+
*/
|
|
54232
|
+
function copyPrimitiveWrapper(primitiveObject, state) {
|
|
54233
|
+
return new state.Constructor(primitiveObject.valueOf());
|
|
54234
|
+
}
|
|
54235
|
+
/**
|
|
54236
|
+
* Create a new RegExp based on the value and flags of the original.
|
|
54237
|
+
*/
|
|
54238
|
+
function copyRegExp(regExp, state) {
|
|
54239
|
+
var clone = new state.Constructor(regExp.source, getRegExpFlags(regExp));
|
|
54240
|
+
clone.lastIndex = regExp.lastIndex;
|
|
54241
|
+
return clone;
|
|
54242
|
+
}
|
|
54243
|
+
/**
|
|
54244
|
+
* Return the original value (an identity function).
|
|
54245
|
+
*
|
|
54246
|
+
* @note
|
|
54247
|
+
* THis is used for objects that cannot be copied, such as WeakMap.
|
|
54248
|
+
*/
|
|
54249
|
+
function copySelf(value, _state) {
|
|
54250
|
+
return value;
|
|
54251
|
+
}
|
|
54252
|
+
/**
|
|
54253
|
+
* Deeply copy the values of the original.
|
|
54254
|
+
*/
|
|
54255
|
+
function copySetLoose(set, state) {
|
|
54256
|
+
var clone = new state.Constructor();
|
|
54257
|
+
// set in the cache immediately to be able to reuse the object recursively
|
|
54258
|
+
state.cache.set(set, clone);
|
|
54259
|
+
set.forEach(function (value) {
|
|
54260
|
+
clone.add(state.copier(value, state));
|
|
54261
|
+
});
|
|
54262
|
+
return clone;
|
|
54263
|
+
}
|
|
54264
|
+
/**
|
|
54265
|
+
* Deeply copy the values of the original, as well as any custom properties.
|
|
54266
|
+
*/
|
|
54267
|
+
function copySetStrict(set, state) {
|
|
54268
|
+
return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
|
|
54269
|
+
}
|
|
54270
|
+
|
|
54271
|
+
var esm_isArray = Array.isArray;
|
|
54272
|
+
var esm_assign = Object.assign;
|
|
54273
|
+
var getPrototypeOf = Object.getPrototypeOf || (function (obj) { return obj.__proto__; });
|
|
54274
|
+
var DEFAULT_LOOSE_OPTIONS = {
|
|
54275
|
+
array: copyArrayLoose,
|
|
54276
|
+
arrayBuffer: copyArrayBuffer,
|
|
54277
|
+
blob: copyBlob,
|
|
54278
|
+
dataView: copyDataView,
|
|
54279
|
+
date: copyDate,
|
|
54280
|
+
error: copySelf,
|
|
54281
|
+
map: copyMapLoose,
|
|
54282
|
+
object: copyObjectLoose,
|
|
54283
|
+
regExp: copyRegExp,
|
|
54284
|
+
set: copySetLoose,
|
|
54285
|
+
};
|
|
54286
|
+
var DEFAULT_STRICT_OPTIONS = esm_assign({}, DEFAULT_LOOSE_OPTIONS, {
|
|
54287
|
+
array: copyArrayStrict,
|
|
54288
|
+
map: copyMapStrict,
|
|
54289
|
+
object: copyObjectStrict,
|
|
54290
|
+
set: copySetStrict,
|
|
54291
|
+
});
|
|
54292
|
+
/**
|
|
54293
|
+
* Get the copiers used for each specific object tag.
|
|
54294
|
+
*/
|
|
54295
|
+
function getTagSpecificCopiers(options) {
|
|
54296
|
+
return {
|
|
54297
|
+
Arguments: options.object,
|
|
54298
|
+
Array: options.array,
|
|
54299
|
+
ArrayBuffer: options.arrayBuffer,
|
|
54300
|
+
Blob: options.blob,
|
|
54301
|
+
Boolean: copyPrimitiveWrapper,
|
|
54302
|
+
DataView: options.dataView,
|
|
54303
|
+
Date: options.date,
|
|
54304
|
+
Error: options.error,
|
|
54305
|
+
Float32Array: options.arrayBuffer,
|
|
54306
|
+
Float64Array: options.arrayBuffer,
|
|
54307
|
+
Int8Array: options.arrayBuffer,
|
|
54308
|
+
Int16Array: options.arrayBuffer,
|
|
54309
|
+
Int32Array: options.arrayBuffer,
|
|
54310
|
+
Map: options.map,
|
|
54311
|
+
Number: copyPrimitiveWrapper,
|
|
54312
|
+
Object: options.object,
|
|
54313
|
+
Promise: copySelf,
|
|
54314
|
+
RegExp: options.regExp,
|
|
54315
|
+
Set: options.set,
|
|
54316
|
+
String: copyPrimitiveWrapper,
|
|
54317
|
+
WeakMap: copySelf,
|
|
54318
|
+
WeakSet: copySelf,
|
|
54319
|
+
Uint8Array: options.arrayBuffer,
|
|
54320
|
+
Uint8ClampedArray: options.arrayBuffer,
|
|
54321
|
+
Uint16Array: options.arrayBuffer,
|
|
54322
|
+
Uint32Array: options.arrayBuffer,
|
|
54323
|
+
Uint64Array: options.arrayBuffer,
|
|
54324
|
+
};
|
|
54325
|
+
}
|
|
54326
|
+
/**
|
|
54327
|
+
* Create a custom copier based on the object-specific copy methods passed.
|
|
54328
|
+
*/
|
|
54329
|
+
function createCopier(options) {
|
|
54330
|
+
var normalizedOptions = esm_assign({}, DEFAULT_LOOSE_OPTIONS, options);
|
|
54331
|
+
var tagSpecificCopiers = getTagSpecificCopiers(normalizedOptions);
|
|
54332
|
+
var array = tagSpecificCopiers.Array, object = tagSpecificCopiers.Object;
|
|
54333
|
+
function copier(value, state) {
|
|
54334
|
+
state.prototype = state.Constructor = undefined;
|
|
54335
|
+
if (!value || typeof value !== 'object') {
|
|
54336
|
+
return value;
|
|
54337
|
+
}
|
|
54338
|
+
if (state.cache.has(value)) {
|
|
54339
|
+
return state.cache.get(value);
|
|
54340
|
+
}
|
|
54341
|
+
state.prototype = getPrototypeOf(value);
|
|
54342
|
+
state.Constructor = state.prototype && state.prototype.constructor;
|
|
54343
|
+
// plain objects
|
|
54344
|
+
if (!state.Constructor || state.Constructor === Object) {
|
|
54345
|
+
return object(value, state);
|
|
54346
|
+
}
|
|
54347
|
+
// arrays
|
|
54348
|
+
if (esm_isArray(value)) {
|
|
54349
|
+
return array(value, state);
|
|
54350
|
+
}
|
|
54351
|
+
var tagSpecificCopier = tagSpecificCopiers[getTag(value)];
|
|
54352
|
+
if (tagSpecificCopier) {
|
|
54353
|
+
return tagSpecificCopier(value, state);
|
|
54354
|
+
}
|
|
54355
|
+
return typeof value.then === 'function' ? value : object(value, state);
|
|
54356
|
+
}
|
|
54357
|
+
return function copy(value) {
|
|
54358
|
+
return copier(value, {
|
|
54359
|
+
Constructor: undefined,
|
|
54360
|
+
cache: createCache(),
|
|
54361
|
+
copier: copier,
|
|
54362
|
+
prototype: undefined,
|
|
54363
|
+
});
|
|
54364
|
+
};
|
|
54365
|
+
}
|
|
54366
|
+
/**
|
|
54367
|
+
* Create a custom copier based on the object-specific copy methods passed, defaulting to the
|
|
54368
|
+
* same internals as `copyStrict`.
|
|
54369
|
+
*/
|
|
54370
|
+
function createStrictCopier(options) {
|
|
54371
|
+
return createCopier(esm_assign({}, DEFAULT_STRICT_OPTIONS, options));
|
|
54372
|
+
}
|
|
54373
|
+
/**
|
|
54374
|
+
* Copy an value deeply as much as possible, where strict recreation of object properties
|
|
54375
|
+
* are maintained. All properties (including non-enumerable ones) are copied with their
|
|
54376
|
+
* original property descriptors on both objects and arrays.
|
|
54377
|
+
*/
|
|
54378
|
+
var copyStrict = createStrictCopier({});
|
|
54379
|
+
/**
|
|
54380
|
+
* Copy an value deeply as much as possible.
|
|
54381
|
+
*/
|
|
54382
|
+
var index = createCopier({});
|
|
54383
|
+
|
|
54384
|
+
|
|
54385
|
+
//# sourceMappingURL=index.mjs.map
|
|
54386
|
+
|
|
54770
54387
|
;// CONCATENATED MODULE: ../semi-foundation/datePicker/inputFoundation.ts
|
|
54771
54388
|
|
|
54772
54389
|
|
|
@@ -54883,7 +54500,7 @@ class inputFoundation_InputFoundation extends foundation {
|
|
|
54883
54500
|
type,
|
|
54884
54501
|
format
|
|
54885
54502
|
});
|
|
54886
|
-
const newInsetInputValue = set_default()(
|
|
54503
|
+
const newInsetInputValue = set_default()(index(insetInputValue), valuePath, value);
|
|
54887
54504
|
const insetInputStr = this.concatInsetInputValue({
|
|
54888
54505
|
insetInputValue: newInsetInputValue
|
|
54889
54506
|
});
|
|
@@ -54917,7 +54534,7 @@ class inputFoundation_InputFoundation extends foundation {
|
|
|
54917
54534
|
defaultPickerValue,
|
|
54918
54535
|
dateFnsLocale
|
|
54919
54536
|
} = this._adapter.getProps();
|
|
54920
|
-
const insetInputValueWithTime =
|
|
54537
|
+
const insetInputValueWithTime = index(insetInputValue);
|
|
54921
54538
|
const {
|
|
54922
54539
|
nowDate,
|
|
54923
54540
|
nextDate
|
|
@@ -59038,7 +58655,7 @@ class YearAndMonthFoundation extends foundation {
|
|
|
59038
58655
|
} = this.getProps();
|
|
59039
58656
|
const left = datePicker_constants_strings.PANEL_TYPE_LEFT;
|
|
59040
58657
|
const right = datePicker_constants_strings.PANEL_TYPE_RIGHT;
|
|
59041
|
-
const year =
|
|
58658
|
+
const year = index(currentYear);
|
|
59042
58659
|
year[panelType] = item.value;
|
|
59043
58660
|
// make sure the right panel time is always less than the left panel time
|
|
59044
58661
|
if (type === 'monthRange') {
|
|
@@ -59065,7 +58682,7 @@ class YearAndMonthFoundation extends foundation {
|
|
|
59065
58682
|
} = this.getProps();
|
|
59066
58683
|
const left = datePicker_constants_strings.PANEL_TYPE_LEFT;
|
|
59067
58684
|
const right = datePicker_constants_strings.PANEL_TYPE_RIGHT;
|
|
59068
|
-
const month =
|
|
58685
|
+
const month = index(currentMonth);
|
|
59069
58686
|
month[panelType] = item.month;
|
|
59070
58687
|
// make sure the right panel time is always less than the left panel time
|
|
59071
58688
|
if (type === 'monthRange' && panelType === left && currentYear[left] === currentYear[right] && item.value > month[right]) {
|
|
@@ -59112,7 +58729,7 @@ class YearAndMonthFoundation extends foundation {
|
|
|
59112
58729
|
});
|
|
59113
58730
|
}
|
|
59114
58731
|
if (validMonth) {
|
|
59115
|
-
const month =
|
|
58732
|
+
const month = index(currentMonth);
|
|
59116
58733
|
month[panelType] = validMonth.month;
|
|
59117
58734
|
// change year and month same time
|
|
59118
58735
|
this._adapter.setCurrentYearAndMonth(year, month);
|
|
@@ -60232,6 +59849,7 @@ var datePicker_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
60232
59849
|
|
|
60233
59850
|
|
|
60234
59851
|
|
|
59852
|
+
|
|
60235
59853
|
class DatePicker extends BaseComponent {
|
|
60236
59854
|
constructor(props) {
|
|
60237
59855
|
var _this;
|
|
@@ -61039,7 +60657,8 @@ DatePicker.propTypes = {
|
|
|
61039
60657
|
yearAndMonthOpts: (prop_types_default()).object,
|
|
61040
60658
|
onClickOutSide: (prop_types_default()).func
|
|
61041
60659
|
};
|
|
61042
|
-
DatePicker.
|
|
60660
|
+
DatePicker.__SemiComponentName__ = "DatePicker";
|
|
60661
|
+
DatePicker.defaultProps = getDefaultPropsFromGlobalConfig(DatePicker.__SemiComponentName__, {
|
|
61043
60662
|
onChangeWithDateFirst: true,
|
|
61044
60663
|
borderless: false,
|
|
61045
60664
|
autoAdjustOverflow: true,
|
|
@@ -61077,7 +60696,7 @@ DatePicker.defaultProps = {
|
|
|
61077
60696
|
rangeSeparator: datePicker_constants_strings.DEFAULT_SEPARATOR_RANGE,
|
|
61078
60697
|
insetInput: false,
|
|
61079
60698
|
onClickOutSide: (noop_default())
|
|
61080
|
-
};
|
|
60699
|
+
});
|
|
61081
60700
|
;// CONCATENATED MODULE: ./datePicker/index.tsx
|
|
61082
60701
|
|
|
61083
60702
|
|
|
@@ -62697,7 +62316,8 @@ Modal.propTypes = {
|
|
|
62697
62316
|
fullScreen: (prop_types_default()).bool,
|
|
62698
62317
|
footerFill: (prop_types_default()).bool
|
|
62699
62318
|
};
|
|
62700
|
-
Modal.
|
|
62319
|
+
Modal.__SemiComponentName__ = "Modal";
|
|
62320
|
+
Modal.defaultProps = getDefaultPropsFromGlobalConfig(Modal.__SemiComponentName__, {
|
|
62701
62321
|
zIndex: 1000,
|
|
62702
62322
|
motion: true,
|
|
62703
62323
|
mask: true,
|
|
@@ -62716,7 +62336,7 @@ Modal.defaultProps = {
|
|
|
62716
62336
|
keepDOM: false,
|
|
62717
62337
|
lazyRender: true,
|
|
62718
62338
|
fullScreen: false
|
|
62719
|
-
};
|
|
62339
|
+
});
|
|
62720
62340
|
Modal.useModal = useModal;
|
|
62721
62341
|
Modal.info = function (props) {
|
|
62722
62342
|
return confirm_confirm(withInfo(props));
|
|
@@ -63137,6 +62757,7 @@ var dropdown_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
63137
62757
|
|
|
63138
62758
|
|
|
63139
62759
|
|
|
62760
|
+
|
|
63140
62761
|
const dropdown_positionSet = dropdown_constants_strings.POSITION_SET;
|
|
63141
62762
|
const dropdown_triggerSet = dropdown_constants_strings.TRIGGER_SET;
|
|
63142
62763
|
class Dropdown extends BaseComponent {
|
|
@@ -63344,7 +62965,8 @@ Dropdown.propTypes = {
|
|
|
63344
62965
|
visible: (prop_types_default()).bool,
|
|
63345
62966
|
zIndex: (prop_types_default()).number
|
|
63346
62967
|
};
|
|
63347
|
-
Dropdown.
|
|
62968
|
+
Dropdown.__SemiComponentName__ = "Dropdown";
|
|
62969
|
+
Dropdown.defaultProps = getDefaultPropsFromGlobalConfig(Dropdown.__SemiComponentName__, {
|
|
63348
62970
|
onVisibleChange: (noop_default()),
|
|
63349
62971
|
prefixCls: dropdown_constants_cssClasses.PREFIX,
|
|
63350
62972
|
zIndex: numbers.DEFAULT_Z_INDEX,
|
|
@@ -63355,7 +62977,7 @@ Dropdown.defaultProps = {
|
|
|
63355
62977
|
showTick: false,
|
|
63356
62978
|
closeOnEsc: true,
|
|
63357
62979
|
onEscKeyDown: (noop_default())
|
|
63358
|
-
};
|
|
62980
|
+
});
|
|
63359
62981
|
/* harmony default export */ const dropdown_0 = (Dropdown);
|
|
63360
62982
|
;// CONCATENATED MODULE: ../semi-foundation/grid/constants.ts
|
|
63361
62983
|
|
|
@@ -67402,6 +67024,7 @@ var navigation_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
67402
67024
|
|
|
67403
67025
|
|
|
67404
67026
|
|
|
67027
|
+
|
|
67405
67028
|
function createAddKeysFn(context, keyName) {
|
|
67406
67029
|
return function addKeys() {
|
|
67407
67030
|
const handleKeys = new Set(context.state[keyName]);
|
|
@@ -67739,7 +67362,8 @@ Nav.propTypes = {
|
|
|
67739
67362
|
limitIndent: (prop_types_default()).bool,
|
|
67740
67363
|
getPopupContainer: (prop_types_default()).func
|
|
67741
67364
|
};
|
|
67742
|
-
Nav.
|
|
67365
|
+
Nav.__SemiComponentName__ = "Navigation";
|
|
67366
|
+
Nav.defaultProps = getDefaultPropsFromGlobalConfig(Nav.__SemiComponentName__, {
|
|
67743
67367
|
subNavCloseDelay: navigation_constants_numbers.DEFAULT_SUBNAV_CLOSE_DELAY,
|
|
67744
67368
|
subNavOpenDelay: navigation_constants_numbers.DEFAULT_SUBNAV_OPEN_DELAY,
|
|
67745
67369
|
tooltipHideDelay: navigation_constants_numbers.DEFAULT_TOOLTIP_HIDE_DELAY,
|
|
@@ -67757,7 +67381,7 @@ Nav.defaultProps = {
|
|
|
67757
67381
|
// defaultOpenKeys: [],
|
|
67758
67382
|
// defaultSelectedKeys: [],
|
|
67759
67383
|
// items: [],
|
|
67760
|
-
};
|
|
67384
|
+
});
|
|
67761
67385
|
|
|
67762
67386
|
/* harmony default export */ const navigation_0 = (Nav);
|
|
67763
67387
|
;// CONCATENATED MODULE: ../semi-foundation/notification/notificationListFoundation.ts
|
|
@@ -68045,7 +67669,8 @@ Notice.propTypes = {
|
|
|
68045
67669
|
close: (prop_types_default()).func,
|
|
68046
67670
|
direction: prop_types_default().oneOf(notice_directions)
|
|
68047
67671
|
};
|
|
68048
|
-
Notice.
|
|
67672
|
+
Notice.__SemiComponentName__ = "Notification";
|
|
67673
|
+
Notice.defaultProps = getDefaultPropsFromGlobalConfig(Notice.__SemiComponentName__, {
|
|
68049
67674
|
duration,
|
|
68050
67675
|
id: '',
|
|
68051
67676
|
close: (noop_default()),
|
|
@@ -68056,7 +67681,7 @@ Notice.defaultProps = {
|
|
|
68056
67681
|
title: '',
|
|
68057
67682
|
showClose: true,
|
|
68058
67683
|
theme: 'normal'
|
|
68059
|
-
};
|
|
67684
|
+
});
|
|
68060
67685
|
/* harmony default export */ const notification_notice = (Notice);
|
|
68061
67686
|
// EXTERNAL MODULE: ../semi-foundation/notification/notification.scss
|
|
68062
67687
|
var notification = __webpack_require__("x46V");
|
|
@@ -68601,7 +68226,7 @@ class OverflowListFoundation extends foundation {
|
|
|
68601
68226
|
const {
|
|
68602
68227
|
items
|
|
68603
68228
|
} = this.getProps();
|
|
68604
|
-
return
|
|
68229
|
+
return index(items).reverse();
|
|
68605
68230
|
};
|
|
68606
68231
|
}
|
|
68607
68232
|
getOverflowItem() {
|
|
@@ -68629,7 +68254,7 @@ class OverflowListFoundation extends foundation {
|
|
|
68629
68254
|
return overflowList;
|
|
68630
68255
|
}
|
|
68631
68256
|
handleIntersect(entries) {
|
|
68632
|
-
const visibleState =
|
|
68257
|
+
const visibleState = index(this.getState('visibleState'));
|
|
68633
68258
|
const res = {};
|
|
68634
68259
|
entries.forEach(entry => {
|
|
68635
68260
|
const itemKey = get_default()(entry, 'target.dataset.scrollkey');
|
|
@@ -68989,7 +68614,8 @@ class OverflowList extends BaseComponent {
|
|
|
68989
68614
|
}, list);
|
|
68990
68615
|
}
|
|
68991
68616
|
}
|
|
68992
|
-
OverflowList.
|
|
68617
|
+
OverflowList.__SemiComponentName__ = "OverflowList";
|
|
68618
|
+
OverflowList.defaultProps = getDefaultPropsFromGlobalConfig(OverflowList.__SemiComponentName__, {
|
|
68993
68619
|
collapseFrom: 'end',
|
|
68994
68620
|
minVisibleItems: 0,
|
|
68995
68621
|
overflowRenderer: () => null,
|
|
@@ -68997,7 +68623,7 @@ OverflowList.defaultProps = {
|
|
|
68997
68623
|
threshold: 0.75,
|
|
68998
68624
|
visibleItemRenderer: () => null,
|
|
68999
68625
|
onOverflow: () => null
|
|
69000
|
-
};
|
|
68626
|
+
});
|
|
69001
68627
|
OverflowList.propTypes = {
|
|
69002
68628
|
// if render in scroll mode, key is required in items
|
|
69003
68629
|
className: (prop_types_default()).string,
|
|
@@ -72245,7 +71871,8 @@ Select.propTypes = {
|
|
|
72245
71871
|
// tagClosable: PropTypes.bool,
|
|
72246
71872
|
};
|
|
72247
71873
|
|
|
72248
|
-
Select.
|
|
71874
|
+
Select.__SemiComponentName__ = "Select";
|
|
71875
|
+
Select.defaultProps = getDefaultPropsFromGlobalConfig(Select.__SemiComponentName__, {
|
|
72249
71876
|
stopPropagation: true,
|
|
72250
71877
|
motion: true,
|
|
72251
71878
|
borderless: false,
|
|
@@ -72290,7 +71917,7 @@ Select.defaultProps = {
|
|
|
72290
71917
|
// renderSelectedItem: (optionNode) => optionNode.label,
|
|
72291
71918
|
// The default creator rendering is related to i18, so it is not declared here
|
|
72292
71919
|
// renderCreateItem: (input) => input
|
|
72293
|
-
};
|
|
71920
|
+
});
|
|
72294
71921
|
|
|
72295
71922
|
/* harmony default export */ const select_0 = (Select);
|
|
72296
71923
|
;// CONCATENATED MODULE: ./pagination/index.tsx
|
|
@@ -72870,6 +72497,7 @@ var popconfirm_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
72870
72497
|
|
|
72871
72498
|
|
|
72872
72499
|
|
|
72500
|
+
|
|
72873
72501
|
class Popconfirm extends BaseComponent {
|
|
72874
72502
|
constructor(props) {
|
|
72875
72503
|
super(props);
|
|
@@ -73101,7 +72729,8 @@ Popconfirm.propTypes = {
|
|
|
73101
72729
|
trigger: (prop_types_default()).string,
|
|
73102
72730
|
position: (prop_types_default()).string
|
|
73103
72731
|
};
|
|
73104
|
-
Popconfirm.
|
|
72732
|
+
Popconfirm.__SemiComponentName__ = "Popconfirm";
|
|
72733
|
+
Popconfirm.defaultProps = getDefaultPropsFromGlobalConfig(Popconfirm.__SemiComponentName__, {
|
|
73105
72734
|
stopPropagation: true,
|
|
73106
72735
|
trigger: 'click',
|
|
73107
72736
|
// position: 'bottomLeft',
|
|
@@ -73118,7 +72747,7 @@ Popconfirm.defaultProps = {
|
|
|
73118
72747
|
onCancel: (noop_default()),
|
|
73119
72748
|
onConfirm: (noop_default()),
|
|
73120
72749
|
onClickOutSide: (noop_default())
|
|
73121
|
-
};
|
|
72750
|
+
});
|
|
73122
72751
|
;// CONCATENATED MODULE: ../semi-foundation/progress/constants.ts
|
|
73123
72752
|
|
|
73124
72753
|
const progress_constants_cssClasses = {
|
|
@@ -75718,7 +75347,8 @@ SideSheet.propTypes = {
|
|
|
75718
75347
|
keepDOM: (prop_types_default()).bool,
|
|
75719
75348
|
'aria-label': (prop_types_default()).string
|
|
75720
75349
|
};
|
|
75721
|
-
SideSheet.
|
|
75350
|
+
SideSheet.__SemiComponentName__ = "SideSheet";
|
|
75351
|
+
SideSheet.defaultProps = getDefaultPropsFromGlobalConfig(SideSheet.__SemiComponentName__, {
|
|
75722
75352
|
visible: false,
|
|
75723
75353
|
motion: true,
|
|
75724
75354
|
mask: true,
|
|
@@ -75732,7 +75362,7 @@ SideSheet.defaultProps = {
|
|
|
75732
75362
|
closeOnEsc: false,
|
|
75733
75363
|
afterVisibleChange: (noop_default()),
|
|
75734
75364
|
keepDOM: false
|
|
75735
|
-
};
|
|
75365
|
+
});
|
|
75736
75366
|
;// CONCATENATED MODULE: ../semi-foundation/slider/constants.ts
|
|
75737
75367
|
|
|
75738
75368
|
const slider_constants_cssClasses = {
|
|
@@ -85458,6 +85088,7 @@ var tabs_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
85458
85088
|
|
|
85459
85089
|
|
|
85460
85090
|
|
|
85091
|
+
|
|
85461
85092
|
const panePickKeys = ['className', 'style', 'disabled', 'itemKey', 'tab', 'icon'];
|
|
85462
85093
|
|
|
85463
85094
|
class Tabs extends BaseComponent {
|
|
@@ -85758,7 +85389,8 @@ Tabs.propTypes = {
|
|
|
85758
85389
|
onTabClose: (prop_types_default()).func,
|
|
85759
85390
|
preventScroll: (prop_types_default()).bool
|
|
85760
85391
|
};
|
|
85761
|
-
Tabs.
|
|
85392
|
+
Tabs.__SemiComponentName__ = "Tabs";
|
|
85393
|
+
Tabs.defaultProps = getDefaultPropsFromGlobalConfig(Tabs.__SemiComponentName__, {
|
|
85762
85394
|
children: [],
|
|
85763
85395
|
collapsible: false,
|
|
85764
85396
|
keepDOM: true,
|
|
@@ -85770,7 +85402,7 @@ Tabs.defaultProps = {
|
|
|
85770
85402
|
tabPosition: 'top',
|
|
85771
85403
|
type: 'line',
|
|
85772
85404
|
onTabClose: () => undefined
|
|
85773
|
-
};
|
|
85405
|
+
});
|
|
85774
85406
|
/* harmony default export */ const tabs_0 = (Tabs);
|
|
85775
85407
|
// EXTERNAL MODULE: ../semi-foundation/timeline/timeline.scss
|
|
85776
85408
|
var timeline = __webpack_require__("9ff2");
|
|
@@ -87157,6 +86789,7 @@ TimePicker.defaultProps = Object.assign({
|
|
|
87157
86789
|
|
|
87158
86790
|
|
|
87159
86791
|
|
|
86792
|
+
|
|
87160
86793
|
class LocaleTimePicker extends (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).PureComponent {
|
|
87161
86794
|
render() {
|
|
87162
86795
|
const {
|
|
@@ -87180,7 +86813,8 @@ class LocaleTimePicker extends (external_root_React_commonjs2_react_commonjs_rea
|
|
|
87180
86813
|
}
|
|
87181
86814
|
}
|
|
87182
86815
|
LocaleTimePicker.propTypes = TimePicker.propTypes;
|
|
87183
|
-
LocaleTimePicker.
|
|
86816
|
+
LocaleTimePicker.__SemiComponentName__ = "TimePicker";
|
|
86817
|
+
LocaleTimePicker.defaultProps = getDefaultPropsFromGlobalConfig(LocaleTimePicker.__SemiComponentName__, TimePicker.defaultProps);
|
|
87184
86818
|
;// CONCATENATED MODULE: ../semi-foundation/toast/toastListFoundation.ts
|
|
87185
86819
|
|
|
87186
86820
|
class ToastListFoundation extends foundation {
|
|
@@ -87455,7 +87089,8 @@ Toast.propTypes = {
|
|
|
87455
87089
|
icon: (prop_types_default()).node,
|
|
87456
87090
|
direction: prop_types_default().oneOf(toast_constants_strings.directions)
|
|
87457
87091
|
};
|
|
87458
|
-
Toast.
|
|
87092
|
+
Toast.__SemiComponentName__ = "Toast";
|
|
87093
|
+
Toast.defaultProps = getDefaultPropsFromGlobalConfig(Toast.__SemiComponentName__, {
|
|
87459
87094
|
onClose: (noop_default()),
|
|
87460
87095
|
content: '',
|
|
87461
87096
|
close: (noop_default()),
|
|
@@ -87465,7 +87100,7 @@ Toast.defaultProps = {
|
|
|
87465
87100
|
stack: false,
|
|
87466
87101
|
stackExpanded: false,
|
|
87467
87102
|
theme: 'normal'
|
|
87468
|
-
};
|
|
87103
|
+
});
|
|
87469
87104
|
/* harmony default export */ const toast = (Toast);
|
|
87470
87105
|
// EXTERNAL MODULE: ../semi-foundation/toast/toast.scss
|
|
87471
87106
|
var toast_toast = __webpack_require__("Ybhv");
|
|
@@ -87876,7 +87511,6 @@ class ToastFactory {
|
|
|
87876
87511
|
|
|
87877
87512
|
|
|
87878
87513
|
|
|
87879
|
-
|
|
87880
87514
|
/**
|
|
87881
87515
|
* The drag and drop handler implementation is referenced from rc-tree
|
|
87882
87516
|
* https://github.com/react-component/tree
|
|
@@ -87922,13 +87556,6 @@ class TreeFoundation extends foundation {
|
|
|
87922
87556
|
} = this.getProps();
|
|
87923
87557
|
return Boolean(inputValue) && showFilteredOnly;
|
|
87924
87558
|
}
|
|
87925
|
-
getCopyFromState(items) {
|
|
87926
|
-
const res = {};
|
|
87927
|
-
normalizedArr(items).forEach(key => {
|
|
87928
|
-
res[key] = cloneDeep_default()(this.getState(key));
|
|
87929
|
-
});
|
|
87930
|
-
return res;
|
|
87931
|
-
}
|
|
87932
87559
|
getTreeNodeProps(key) {
|
|
87933
87560
|
const {
|
|
87934
87561
|
expandedKeys = new Set([]),
|
|
@@ -88097,9 +87724,7 @@ class TreeFoundation extends foundation {
|
|
|
88097
87724
|
this._adapter.notifyDoubleClick(e, treeNode.data);
|
|
88098
87725
|
}
|
|
88099
87726
|
handleSingleSelect(e, treeNode) {
|
|
88100
|
-
let
|
|
88101
|
-
selectedKeys
|
|
88102
|
-
} = this.getCopyFromState('selectedKeys');
|
|
87727
|
+
let selectedKeys = [...this.getState('selectedKeys')];
|
|
88103
87728
|
const {
|
|
88104
87729
|
selected,
|
|
88105
87730
|
eventKey,
|
|
@@ -88124,10 +87749,8 @@ class TreeFoundation extends foundation {
|
|
|
88124
87749
|
const {
|
|
88125
87750
|
keyEntities
|
|
88126
87751
|
} = this.getStates();
|
|
88127
|
-
const
|
|
88128
|
-
|
|
88129
|
-
halfCheckedKeys
|
|
88130
|
-
} = this.getCopyFromState(['checkedKeys', 'halfCheckedKeys']);
|
|
87752
|
+
const checkedKeys = new Set(this.getState('checkedKeys'));
|
|
87753
|
+
const halfCheckedKeys = new Set(this.getState('halfCheckedKeys'));
|
|
88131
87754
|
return targetStatus ? calcCheckedKeysForChecked(eventKey, keyEntities, checkedKeys, halfCheckedKeys) : calcCheckedKeysForUnchecked(eventKey, keyEntities, checkedKeys, halfCheckedKeys);
|
|
88132
87755
|
}
|
|
88133
87756
|
/*
|
|
@@ -88163,9 +87786,7 @@ class TreeFoundation extends foundation {
|
|
|
88163
87786
|
keyEntities,
|
|
88164
87787
|
disabledKeys
|
|
88165
87788
|
} = this.getStates();
|
|
88166
|
-
const
|
|
88167
|
-
checkedKeys
|
|
88168
|
-
} = this.getCopyFromState(['checkedKeys']);
|
|
87789
|
+
const checkedKeys = new Set(this.getState('checkedKeys'));
|
|
88169
87790
|
const descendantKeys = normalizeKeyList(findDescendantKeys([eventKey], keyEntities, false), keyEntities, true);
|
|
88170
87791
|
const hasDisabled = descendantKeys.some(key => disabledKeys.has(key));
|
|
88171
87792
|
// If none of the descendant nodes are disabled, follow the normal logic
|
|
@@ -88240,7 +87861,7 @@ class TreeFoundation extends foundation {
|
|
|
88240
87861
|
const isSearching = Boolean(inputValue);
|
|
88241
87862
|
const showFilteredOnly = this._showFilteredOnly();
|
|
88242
87863
|
const expandedStateKey = isSearching ? 'filteredExpandedKeys' : 'expandedKeys';
|
|
88243
|
-
const expandedKeys = this.
|
|
87864
|
+
const expandedKeys = new Set(this.getState(expandedStateKey));
|
|
88244
87865
|
let motionType = 'show';
|
|
88245
87866
|
const {
|
|
88246
87867
|
eventKey,
|
|
@@ -88301,10 +87922,8 @@ class TreeFoundation extends foundation {
|
|
|
88301
87922
|
}
|
|
88302
87923
|
// Process the loaded data
|
|
88303
87924
|
loadData(data).then(() => {
|
|
88304
|
-
const
|
|
88305
|
-
|
|
88306
|
-
loadingKeys: prevLoadingKeys
|
|
88307
|
-
} = this.getCopyFromState(['loadedKeys', 'loadingKeys']);
|
|
87925
|
+
const prevLoadedKeys = new Set(this.getState('loadedKeys'));
|
|
87926
|
+
const prevLoadingKeys = new Set(this.getState('loadingKeys'));
|
|
88308
87927
|
const newLoadedKeys = prevLoadedKeys.add(key);
|
|
88309
87928
|
const newLoadingKeys = new Set([...prevLoadingKeys]);
|
|
88310
87929
|
newLoadingKeys.delete(key);
|
|
@@ -90111,7 +89730,6 @@ const treeSelect_constants_numbers = {};
|
|
|
90111
89730
|
|
|
90112
89731
|
|
|
90113
89732
|
|
|
90114
|
-
|
|
90115
89733
|
class TreeSelectFoundation extends foundation {
|
|
90116
89734
|
constructor(adapter) {
|
|
90117
89735
|
super(Object.assign({}, adapter));
|
|
@@ -90234,13 +89852,6 @@ class TreeSelectFoundation extends foundation {
|
|
|
90234
89852
|
return this.constructDataForValue(value);
|
|
90235
89853
|
}
|
|
90236
89854
|
}
|
|
90237
|
-
getCopyFromState(items) {
|
|
90238
|
-
const res = {};
|
|
90239
|
-
normalizedArr(items).forEach(key => {
|
|
90240
|
-
res[key] = cloneDeep_default()(this.getState(key));
|
|
90241
|
-
});
|
|
90242
|
-
return res;
|
|
90243
|
-
}
|
|
90244
89855
|
getTreeNodeProps(key) {
|
|
90245
89856
|
const {
|
|
90246
89857
|
expandedKeys = new Set([]),
|
|
@@ -90306,10 +89917,8 @@ class TreeSelectFoundation extends foundation {
|
|
|
90306
89917
|
return {};
|
|
90307
89918
|
}
|
|
90308
89919
|
loadData(data).then(() => {
|
|
90309
|
-
const
|
|
90310
|
-
|
|
90311
|
-
loadingKeys: prevLoadingKeys
|
|
90312
|
-
} = this.getCopyFromState(['loadedKeys', 'loadingKeys']);
|
|
89920
|
+
const prevLoadedKeys = new Set(this.getState('loadedKeys'));
|
|
89921
|
+
const prevLoadingKeys = new Set(this.getState('loadingKeys'));
|
|
90313
89922
|
const newLoadedKeys = prevLoadedKeys.add(key);
|
|
90314
89923
|
const newLoadingKeys = new Set([...prevLoadingKeys]);
|
|
90315
89924
|
newLoadingKeys.delete(key);
|
|
@@ -90622,9 +90231,7 @@ class TreeSelectFoundation extends foundation {
|
|
|
90622
90231
|
}
|
|
90623
90232
|
}
|
|
90624
90233
|
handleSingleSelect(e, treeNode) {
|
|
90625
|
-
let
|
|
90626
|
-
selectedKeys
|
|
90627
|
-
} = this.getCopyFromState('selectedKeys');
|
|
90234
|
+
let selectedKeys = [...this.getState('selectedKeys')];
|
|
90628
90235
|
const {
|
|
90629
90236
|
clickToHide
|
|
90630
90237
|
} = this.getProps();
|
|
@@ -90652,10 +90259,8 @@ class TreeSelectFoundation extends foundation {
|
|
|
90652
90259
|
const {
|
|
90653
90260
|
keyEntities
|
|
90654
90261
|
} = this.getStates();
|
|
90655
|
-
const
|
|
90656
|
-
|
|
90657
|
-
halfCheckedKeys
|
|
90658
|
-
} = this.getCopyFromState(['checkedKeys', 'halfCheckedKeys']);
|
|
90262
|
+
const checkedKeys = new Set(this.getState('checkedKeys'));
|
|
90263
|
+
const halfCheckedKeys = new Set(this.getState('halfCheckedKeys'));
|
|
90659
90264
|
if (targetStatus) {
|
|
90660
90265
|
return calcCheckedKeysForChecked(eventKey, keyEntities, checkedKeys, halfCheckedKeys);
|
|
90661
90266
|
} else {
|
|
@@ -90722,9 +90327,7 @@ class TreeSelectFoundation extends foundation {
|
|
|
90722
90327
|
keyEntities,
|
|
90723
90328
|
disabledKeys
|
|
90724
90329
|
} = this.getStates();
|
|
90725
|
-
const
|
|
90726
|
-
checkedKeys
|
|
90727
|
-
} = this.getCopyFromState(['checkedKeys']);
|
|
90330
|
+
const checkedKeys = new Set(this.getState('checkedKeys'));
|
|
90728
90331
|
const descendantKeys = normalizeKeyList(findDescendantKeys([eventKey], keyEntities, false), keyEntities, true);
|
|
90729
90332
|
const hasDisabled = descendantKeys.some(key => disabledKeys.has(key));
|
|
90730
90333
|
if (!hasDisabled) {
|
|
@@ -90761,9 +90364,7 @@ class TreeSelectFoundation extends foundation {
|
|
|
90761
90364
|
} = this.getStates();
|
|
90762
90365
|
const showFilteredOnly = this._showFilteredOnly();
|
|
90763
90366
|
// clone otherwise will be modified unexpectedly
|
|
90764
|
-
const
|
|
90765
|
-
filteredExpandedKeys
|
|
90766
|
-
} = this.getCopyFromState('filteredExpandedKeys');
|
|
90367
|
+
const filteredExpandedKeys = new Set(this.getState('filteredExpandedKeys'));
|
|
90767
90368
|
let motionType = 'show';
|
|
90768
90369
|
const {
|
|
90769
90370
|
eventKey,
|
|
@@ -90819,9 +90420,7 @@ class TreeSelectFoundation extends foundation {
|
|
|
90819
90420
|
treeData
|
|
90820
90421
|
} = this.getStates();
|
|
90821
90422
|
// clone otherwise will be modified unexpectedly
|
|
90822
|
-
const
|
|
90823
|
-
expandedKeys
|
|
90824
|
-
} = this.getCopyFromState('expandedKeys');
|
|
90423
|
+
const expandedKeys = new Set(this.getState('expandedKeys'));
|
|
90825
90424
|
let motionType = 'show';
|
|
90826
90425
|
const {
|
|
90827
90426
|
eventKey,
|
|
@@ -92357,7 +91956,7 @@ const upload_constants_numbers = {
|
|
|
92357
91956
|
};
|
|
92358
91957
|
|
|
92359
91958
|
;// CONCATENATED MODULE: ../semi-foundation/upload/utils.ts
|
|
92360
|
-
var
|
|
91959
|
+
var utils_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
92361
91960
|
function adopt(value) {
|
|
92362
91961
|
return value instanceof P ? value : new P(function (resolve) {
|
|
92363
91962
|
resolve(value);
|
|
@@ -92400,7 +91999,7 @@ function endsWith(str, suffix) {
|
|
|
92400
91999
|
return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
|
92401
92000
|
}
|
|
92402
92001
|
function loopFiles(item) {
|
|
92403
|
-
return
|
|
92002
|
+
return utils_awaiter(this, void 0, void 0, function* () {
|
|
92404
92003
|
return new Promise((res, rej) => {
|
|
92405
92004
|
const dirReader = item.createReader();
|
|
92406
92005
|
let fileList = [];
|
|
@@ -92422,9 +92021,9 @@ function loopFiles(item) {
|
|
|
92422
92021
|
});
|
|
92423
92022
|
}
|
|
92424
92023
|
function mapFileTree(items) {
|
|
92425
|
-
return
|
|
92024
|
+
return utils_awaiter(this, void 0, void 0, function* () {
|
|
92426
92025
|
const promises = [];
|
|
92427
|
-
const _traverseFileTree = (item, path) =>
|
|
92026
|
+
const _traverseFileTree = (item, path) => utils_awaiter(this, void 0, void 0, function* () {
|
|
92428
92027
|
path = path || '';
|
|
92429
92028
|
//@ts-ignore add path property into item
|
|
92430
92029
|
item.path = path;
|
|
@@ -97019,7 +96618,6 @@ Schema.validators = validators;
|
|
|
97019
96618
|
|
|
97020
96619
|
;// CONCATENATED MODULE: ../semi-foundation/form/utils.ts
|
|
97021
96620
|
|
|
97022
|
-
|
|
97023
96621
|
var form_utils_rest = undefined && undefined.__rest || function (s, e) {
|
|
97024
96622
|
var t = {};
|
|
97025
96623
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
@@ -97030,6 +96628,7 @@ var form_utils_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
97030
96628
|
};
|
|
97031
96629
|
|
|
97032
96630
|
|
|
96631
|
+
|
|
97033
96632
|
/**
|
|
97034
96633
|
*
|
|
97035
96634
|
* @param WrappedComponent React.ComponentType | any
|
|
@@ -97187,7 +96786,7 @@ function mergeProps(props) {
|
|
|
97187
96786
|
delete rest.defaultValue;
|
|
97188
96787
|
delete rest.checked;
|
|
97189
96788
|
if (typeof initValue !== 'undefined') {
|
|
97190
|
-
initValue =
|
|
96789
|
+
initValue = index(initValue);
|
|
97191
96790
|
}
|
|
97192
96791
|
const required = isRequired(rules);
|
|
97193
96792
|
emptyValue = typeof emptyValue !== 'undefined' ? emptyValue : '';
|
|
@@ -99336,8 +98935,8 @@ class ArrayFieldComponent extends external_root_React_commonjs2_react_commonjs_r
|
|
|
99336
98935
|
// whether the fields inside arrayField should use props.initValue in current render process
|
|
99337
98936
|
this.shouldUseInitValue = !context.getArrayField(field);
|
|
99338
98937
|
// Separate the arrays that reset and the usual add and remove modify, otherwise they will affect each other
|
|
99339
|
-
const initValueCopyForFormState =
|
|
99340
|
-
const initValueCopyForReset =
|
|
98938
|
+
const initValueCopyForFormState = index(initValue);
|
|
98939
|
+
const initValueCopyForReset = index(initValue);
|
|
99341
98940
|
context.registerArrayField(field, initValueCopyForReset);
|
|
99342
98941
|
// register ArrayField will update state.updateKey to render, So there is no need to execute forceUpdate here
|
|
99343
98942
|
context.updateStateValue(field, initValueCopyForFormState, {
|