linkmore-design 1.0.16 → 1.0.19
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/index.umd.js +262 -774
- package/dist/index.umd.min.js +6 -6
- package/es/Button/style/style.css +2 -2
- package/es/CkFilter/components/Controls.js +3 -1
- package/es/CkFilter/components/filterTypes.js +23 -19
- package/es/CkFilter/style/style.css +8 -2
- package/es/LeftTable/style/style.css +2 -1
- package/es/ProTable/Table.js +7 -6
- package/es/ProTable/style/style.css +0 -3
- package/lib/Button/style/style.css +2 -2
- package/lib/CkFilter/components/Controls.js +3 -1
- package/lib/CkFilter/components/filterTypes.js +23 -19
- package/lib/CkFilter/style/style.css +8 -2
- package/lib/LeftTable/style/style.css +2 -1
- package/lib/ProTable/Table.js +7 -6
- package/lib/ProTable/style/style.css +0 -3
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -26301,7 +26301,7 @@
|
|
|
26301
26301
|
|
|
26302
26302
|
var handleSure = function handleSure() {
|
|
26303
26303
|
setFilterValue(checkedValues);
|
|
26304
|
-
}; //
|
|
26304
|
+
}; // 取消
|
|
26305
26305
|
|
|
26306
26306
|
|
|
26307
26307
|
var handleReset = function handleReset() {
|
|
@@ -26370,12 +26370,12 @@
|
|
|
26370
26370
|
}, item.label));
|
|
26371
26371
|
}), !options.length && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26372
26372
|
className: "filter_empty"
|
|
26373
|
-
}, "\u6682\u65E0\u6570\u636E")),
|
|
26373
|
+
}, "\u6682\u65E0\u6570\u636E")), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26374
26374
|
className: "filter_footer"
|
|
26375
26375
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26376
26376
|
className: "footer_clear",
|
|
26377
26377
|
onClick: handleReset
|
|
26378
|
-
}, "\
|
|
26378
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React__default['default'].createElement(linkmoreDesign.Button, {
|
|
26379
26379
|
type: "primary",
|
|
26380
26380
|
disabled: !checkedValues.length,
|
|
26381
26381
|
size: "small",
|
|
@@ -26602,29 +26602,34 @@
|
|
|
26602
26602
|
var _useState15 = React.useState(getFilterValue || itemProps.multiple ? [] : ''),
|
|
26603
26603
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
26604
26604
|
checkedValues = _useState16[0],
|
|
26605
|
-
setCheckedValues = _useState16[1];
|
|
26605
|
+
setCheckedValues = _useState16[1]; // const isSearch = useMemo(() => filters.length > 8, [filters.length]);
|
|
26606
26606
|
|
|
26607
|
-
var isSearch = React.useMemo(function () {
|
|
26608
|
-
return filters.length > 8;
|
|
26609
|
-
}, [filters.length]);
|
|
26610
26607
|
|
|
26611
26608
|
var handleFilter = function handleFilter(val) {
|
|
26612
26609
|
setOptions(filters.filter(function (v) {
|
|
26613
26610
|
return v.label.indexOf(val) > -1;
|
|
26614
26611
|
}));
|
|
26615
|
-
};
|
|
26612
|
+
}; // 重置级联弹框
|
|
26613
|
+
|
|
26616
26614
|
|
|
26617
26615
|
var dropdownRender = function dropdownRender(menus) {
|
|
26618
26616
|
var inputRef = React.useRef(null); // 确定
|
|
26619
26617
|
|
|
26620
26618
|
var handleSure = function handleSure() {
|
|
26621
|
-
setFilterValue(checkedValues)
|
|
26622
|
-
|
|
26619
|
+
setFilterValue(itemProps.multiple ? checkedValues.map(function (v) {
|
|
26620
|
+
return v[v.length - 1];
|
|
26621
|
+
}) : checkedValues);
|
|
26622
|
+
setVisible(false);
|
|
26623
|
+
}; // 取消
|
|
26623
26624
|
|
|
26624
26625
|
|
|
26625
26626
|
var handleReset = function handleReset() {
|
|
26626
|
-
inputRef.current
|
|
26627
|
+
if (inputRef.current) {
|
|
26628
|
+
inputRef.current.input.value = '';
|
|
26629
|
+
}
|
|
26630
|
+
|
|
26627
26631
|
setFilterValue(undefined);
|
|
26632
|
+
setCheckedValues(itemProps.multiple ? [] : '');
|
|
26628
26633
|
};
|
|
26629
26634
|
|
|
26630
26635
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
@@ -26640,15 +26645,16 @@
|
|
|
26640
26645
|
onChange: lodash.debounce(function (e) {
|
|
26641
26646
|
return handleFilter(e.target.value);
|
|
26642
26647
|
}, 500)
|
|
26643
|
-
})), menus,
|
|
26648
|
+
})), menus, itemProps.multiple && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26644
26649
|
className: "filter_footer"
|
|
26645
26650
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26646
26651
|
className: "footer_clear",
|
|
26647
26652
|
onClick: handleReset
|
|
26648
|
-
}, "\
|
|
26653
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React__default['default'].createElement(linkmoreDesign.Button, {
|
|
26649
26654
|
type: "primary",
|
|
26650
26655
|
size: "small",
|
|
26651
|
-
onClick: handleSure
|
|
26656
|
+
onClick: handleSure,
|
|
26657
|
+
disabled: !(checkedValues === null || checkedValues === void 0 ? void 0 : checkedValues.length)
|
|
26652
26658
|
}, "\u786E\u5B9A")));
|
|
26653
26659
|
};
|
|
26654
26660
|
|
|
@@ -26671,9 +26677,6 @@
|
|
|
26671
26677
|
});
|
|
26672
26678
|
var showLabel = arr.length < 3 ? arr.join('、') : "".concat(arr[0], "\u3001+").concat(arr.length);
|
|
26673
26679
|
setText(showLabel);
|
|
26674
|
-
setFilterValue(item.map(function (v) {
|
|
26675
|
-
return v[v.length - 1];
|
|
26676
|
-
}));
|
|
26677
26680
|
setCheckedValues(item);
|
|
26678
26681
|
} else {
|
|
26679
26682
|
setText(selectedOptions.map(function (v) {
|
|
@@ -26697,7 +26700,8 @@
|
|
|
26697
26700
|
options: options,
|
|
26698
26701
|
value: checkedValues,
|
|
26699
26702
|
onChange: onChange,
|
|
26700
|
-
|
|
26703
|
+
open: visible // showCheckedStrategy="Cascader.SHOW_CHILD"
|
|
26704
|
+
,
|
|
26701
26705
|
dropdownRender: dropdownRender,
|
|
26702
26706
|
onDropdownVisibleChange: function onDropdownVisibleChange(v) {
|
|
26703
26707
|
return setVisible(v);
|
|
@@ -26713,7 +26717,7 @@
|
|
|
26713
26717
|
className: "filter_item_value"
|
|
26714
26718
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26715
26719
|
className: "checked"
|
|
26716
|
-
}, text), /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
26720
|
+
}, isFiltering ? text : '全部'), /*#__PURE__*/React__default['default'].createElement(IconFont, {
|
|
26717
26721
|
type: isFiltering ? 'lmweb-close-circle-fill' : 'lmweb-down',
|
|
26718
26722
|
className: "addonAfter",
|
|
26719
26723
|
onClick: handleClear
|
|
@@ -27722,7 +27726,9 @@
|
|
|
27722
27726
|
'cascader': /*#__PURE__*/React__default['default'].createElement(CascaderFilter$1, _extends({
|
|
27723
27727
|
options: options
|
|
27724
27728
|
}, resetProps)),
|
|
27725
|
-
'input': /*#__PURE__*/React__default['default'].createElement(_Input__default['default'],
|
|
27729
|
+
'input': /*#__PURE__*/React__default['default'].createElement(_Input__default['default'], _extends({
|
|
27730
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
27731
|
+
}, resetProps))
|
|
27726
27732
|
};
|
|
27727
27733
|
return obj[type] || null;
|
|
27728
27734
|
};
|
|
@@ -65214,159 +65220,105 @@
|
|
|
65214
65220
|
|
|
65215
65221
|
ProviderWarp.Summary = _Table__default['default'].Summary;
|
|
65216
65222
|
|
|
65217
|
-
var classCallCheck =
|
|
65218
|
-
function _classCallCheck(instance, Constructor) {
|
|
65223
|
+
var classCallCheck = function (instance, Constructor) {
|
|
65219
65224
|
if (!(instance instanceof Constructor)) {
|
|
65220
65225
|
throw new TypeError("Cannot call a class as a function");
|
|
65221
65226
|
}
|
|
65222
|
-
}
|
|
65223
|
-
|
|
65224
|
-
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
65225
|
-
});
|
|
65226
|
-
|
|
65227
|
-
var _classCallCheck$7 = /*@__PURE__*/getDefaultExportFromCjs(classCallCheck);
|
|
65227
|
+
};
|
|
65228
65228
|
|
|
65229
|
-
var createClass =
|
|
65230
|
-
|
|
65231
|
-
|
|
65232
|
-
|
|
65233
|
-
|
|
65234
|
-
|
|
65235
|
-
|
|
65236
|
-
|
|
65229
|
+
var createClass = function () {
|
|
65230
|
+
function defineProperties(target, props) {
|
|
65231
|
+
for (var i = 0; i < props.length; i++) {
|
|
65232
|
+
var descriptor = props[i];
|
|
65233
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
65234
|
+
descriptor.configurable = true;
|
|
65235
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
65236
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
65237
|
+
}
|
|
65237
65238
|
}
|
|
65238
|
-
}
|
|
65239
65239
|
|
|
65240
|
-
|
|
65241
|
-
|
|
65242
|
-
|
|
65243
|
-
|
|
65244
|
-
|
|
65245
|
-
|
|
65246
|
-
return Constructor;
|
|
65247
|
-
}
|
|
65248
|
-
|
|
65249
|
-
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
65250
|
-
});
|
|
65240
|
+
return function (Constructor, protoProps, staticProps) {
|
|
65241
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
65242
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
|
65243
|
+
return Constructor;
|
|
65244
|
+
};
|
|
65245
|
+
}();
|
|
65251
65246
|
|
|
65252
|
-
var
|
|
65247
|
+
var _extends$7 = Object.assign || function (target) {
|
|
65248
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
65249
|
+
var source = arguments[i];
|
|
65253
65250
|
|
|
65254
|
-
|
|
65255
|
-
|
|
65256
|
-
|
|
65257
|
-
|
|
65258
|
-
|
|
65259
|
-
}
|
|
65260
|
-
return _setPrototypeOf(o, p);
|
|
65261
|
-
}
|
|
65251
|
+
for (var key in source) {
|
|
65252
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
65253
|
+
target[key] = source[key];
|
|
65254
|
+
}
|
|
65255
|
+
}
|
|
65256
|
+
}
|
|
65262
65257
|
|
|
65263
|
-
|
|
65264
|
-
}
|
|
65258
|
+
return target;
|
|
65259
|
+
};
|
|
65265
65260
|
|
|
65266
|
-
var inherits =
|
|
65267
|
-
function _inherits(subClass, superClass) {
|
|
65261
|
+
var inherits = function (subClass, superClass) {
|
|
65268
65262
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
65269
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
65263
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
65270
65264
|
}
|
|
65271
65265
|
|
|
65272
65266
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
65273
65267
|
constructor: {
|
|
65274
65268
|
value: subClass,
|
|
65269
|
+
enumerable: false,
|
|
65275
65270
|
writable: true,
|
|
65276
65271
|
configurable: true
|
|
65277
65272
|
}
|
|
65278
65273
|
});
|
|
65279
|
-
Object.
|
|
65280
|
-
|
|
65281
|
-
});
|
|
65282
|
-
if (superClass) setPrototypeOf(subClass, superClass);
|
|
65283
|
-
}
|
|
65284
|
-
|
|
65285
|
-
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
65286
|
-
});
|
|
65287
|
-
|
|
65288
|
-
var _inherits$7 = /*@__PURE__*/getDefaultExportFromCjs(inherits);
|
|
65289
|
-
|
|
65290
|
-
var getPrototypeOf = createCommonjsModule(function (module) {
|
|
65291
|
-
function _getPrototypeOf(o) {
|
|
65292
|
-
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
65293
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
65294
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
65295
|
-
return _getPrototypeOf(o);
|
|
65296
|
-
}
|
|
65297
|
-
|
|
65298
|
-
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
65299
|
-
});
|
|
65300
|
-
|
|
65301
|
-
var isNativeReflectConstruct = createCommonjsModule(function (module) {
|
|
65302
|
-
function _isNativeReflectConstruct() {
|
|
65303
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
65304
|
-
if (Reflect.construct.sham) return false;
|
|
65305
|
-
if (typeof Proxy === "function") return true;
|
|
65306
|
-
|
|
65307
|
-
try {
|
|
65308
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
65309
|
-
return true;
|
|
65310
|
-
} catch (e) {
|
|
65311
|
-
return false;
|
|
65312
|
-
}
|
|
65313
|
-
}
|
|
65314
|
-
|
|
65315
|
-
module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
65316
|
-
});
|
|
65274
|
+
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
65275
|
+
};
|
|
65317
65276
|
|
|
65318
|
-
var
|
|
65319
|
-
|
|
65320
|
-
if (self === void 0) {
|
|
65277
|
+
var possibleConstructorReturn = function (self, call) {
|
|
65278
|
+
if (!self) {
|
|
65321
65279
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
65322
65280
|
}
|
|
65323
65281
|
|
|
65324
|
-
return self;
|
|
65325
|
-
}
|
|
65326
|
-
|
|
65327
|
-
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
65328
|
-
});
|
|
65282
|
+
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
65283
|
+
};
|
|
65329
65284
|
|
|
65330
|
-
var
|
|
65331
|
-
|
|
65285
|
+
var slicedToArray$1 = function () {
|
|
65286
|
+
function sliceIterator(arr, i) {
|
|
65287
|
+
var _arr = [];
|
|
65288
|
+
var _n = true;
|
|
65289
|
+
var _d = false;
|
|
65290
|
+
var _e = undefined;
|
|
65332
65291
|
|
|
65292
|
+
try {
|
|
65293
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
65294
|
+
_arr.push(_s.value);
|
|
65333
65295
|
|
|
65296
|
+
if (i && _arr.length === i) break;
|
|
65297
|
+
}
|
|
65298
|
+
} catch (err) {
|
|
65299
|
+
_d = true;
|
|
65300
|
+
_e = err;
|
|
65301
|
+
} finally {
|
|
65302
|
+
try {
|
|
65303
|
+
if (!_n && _i["return"]) _i["return"]();
|
|
65304
|
+
} finally {
|
|
65305
|
+
if (_d) throw _e;
|
|
65306
|
+
}
|
|
65307
|
+
}
|
|
65334
65308
|
|
|
65335
|
-
|
|
65336
|
-
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
65337
|
-
return call;
|
|
65338
|
-
} else if (call !== void 0) {
|
|
65339
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
65309
|
+
return _arr;
|
|
65340
65310
|
}
|
|
65341
65311
|
|
|
65342
|
-
return
|
|
65343
|
-
|
|
65344
|
-
|
|
65345
|
-
|
|
65346
|
-
|
|
65347
|
-
|
|
65348
|
-
var createSuper = createCommonjsModule(function (module) {
|
|
65349
|
-
function _createSuper(Derived) {
|
|
65350
|
-
var hasNativeReflectConstruct = isNativeReflectConstruct();
|
|
65351
|
-
return function _createSuperInternal() {
|
|
65352
|
-
var Super = getPrototypeOf(Derived),
|
|
65353
|
-
result;
|
|
65354
|
-
|
|
65355
|
-
if (hasNativeReflectConstruct) {
|
|
65356
|
-
var NewTarget = getPrototypeOf(this).constructor;
|
|
65357
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
65312
|
+
return function (arr, i) {
|
|
65313
|
+
if (Array.isArray(arr)) {
|
|
65314
|
+
return arr;
|
|
65315
|
+
} else if (Symbol.iterator in Object(arr)) {
|
|
65316
|
+
return sliceIterator(arr, i);
|
|
65358
65317
|
} else {
|
|
65359
|
-
|
|
65318
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
65360
65319
|
}
|
|
65361
|
-
|
|
65362
|
-
return possibleConstructorReturn(this, result);
|
|
65363
65320
|
};
|
|
65364
|
-
}
|
|
65365
|
-
|
|
65366
|
-
module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
65367
|
-
});
|
|
65368
|
-
|
|
65369
|
-
var _createSuper$7 = /*@__PURE__*/getDefaultExportFromCjs(createSuper);
|
|
65321
|
+
}();
|
|
65370
65322
|
|
|
65371
65323
|
/**
|
|
65372
65324
|
* Detect Element Resize.
|
|
@@ -65374,47 +65326,83 @@
|
|
|
65374
65326
|
* Sebastian Decima
|
|
65375
65327
|
*
|
|
65376
65328
|
* Forked from version 0.5.3; includes the following modifications:
|
|
65377
|
-
* 1)
|
|
65378
|
-
* 2)
|
|
65329
|
+
* 1) Guard against unsafe 'window' and 'document' references (to support SSR).
|
|
65330
|
+
* 2) Defer initialization code via a top-level function wrapper (to support SSR).
|
|
65379
65331
|
* 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.
|
|
65380
65332
|
* 4) Add nonce for style element.
|
|
65381
|
-
* 5) Added support for injecting custom window object
|
|
65382
65333
|
**/
|
|
65383
|
-
function createDetectElementResize(nonce, hostWindow) {
|
|
65384
|
-
// Check `document` and `window` in case of server-side rendering
|
|
65385
|
-
var _window;
|
|
65386
|
-
|
|
65387
|
-
if (typeof hostWindow !== 'undefined') {
|
|
65388
|
-
_window = hostWindow;
|
|
65389
|
-
} else if (typeof window !== 'undefined') {
|
|
65390
|
-
_window = window;
|
|
65391
|
-
} else if (typeof self !== 'undefined') {
|
|
65392
|
-
_window = self;
|
|
65393
|
-
} else {
|
|
65394
|
-
_window = global;
|
|
65395
|
-
}
|
|
65396
65334
|
|
|
65397
|
-
|
|
65335
|
+
// Check `document` and `window` in case of server-side rendering
|
|
65336
|
+
var windowObject = void 0;
|
|
65337
|
+
if (typeof window !== 'undefined') {
|
|
65338
|
+
windowObject = window;
|
|
65398
65339
|
|
|
65399
|
-
|
|
65400
|
-
|
|
65401
|
-
|
|
65402
|
-
|
|
65403
|
-
|
|
65340
|
+
// eslint-disable-next-line no-restricted-globals
|
|
65341
|
+
} else if (typeof self !== 'undefined') {
|
|
65342
|
+
// eslint-disable-next-line no-restricted-globals
|
|
65343
|
+
windowObject = self;
|
|
65344
|
+
} else {
|
|
65345
|
+
windowObject = global;
|
|
65346
|
+
}
|
|
65404
65347
|
|
|
65405
|
-
|
|
65406
|
-
|
|
65407
|
-
};
|
|
65408
|
-
}();
|
|
65348
|
+
var cancelFrame = null;
|
|
65349
|
+
var requestFrame = null;
|
|
65409
65350
|
|
|
65410
|
-
|
|
65411
|
-
var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;
|
|
65412
|
-
return function (id) {
|
|
65413
|
-
return cancel(id);
|
|
65414
|
-
};
|
|
65415
|
-
}();
|
|
65351
|
+
var TIMEOUT_DURATION = 20;
|
|
65416
65352
|
|
|
65417
|
-
|
|
65353
|
+
var clearTimeoutFn = windowObject.clearTimeout;
|
|
65354
|
+
var setTimeoutFn = windowObject.setTimeout;
|
|
65355
|
+
|
|
65356
|
+
var cancelAnimationFrameFn = windowObject.cancelAnimationFrame || windowObject.mozCancelAnimationFrame || windowObject.webkitCancelAnimationFrame;
|
|
65357
|
+
|
|
65358
|
+
var requestAnimationFrameFn = windowObject.requestAnimationFrame || windowObject.mozRequestAnimationFrame || windowObject.webkitRequestAnimationFrame;
|
|
65359
|
+
|
|
65360
|
+
if (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {
|
|
65361
|
+
// For environments that don't support animation frame,
|
|
65362
|
+
// fallback to a setTimeout based approach.
|
|
65363
|
+
cancelFrame = clearTimeoutFn;
|
|
65364
|
+
requestFrame = function requestAnimationFrameViaSetTimeout(callback) {
|
|
65365
|
+
return setTimeoutFn(callback, TIMEOUT_DURATION);
|
|
65366
|
+
};
|
|
65367
|
+
} else {
|
|
65368
|
+
// Counter intuitively, environments that support animation frames can be trickier.
|
|
65369
|
+
// Chrome's "Throttle non-visible cross-origin iframes" flag can prevent rAFs from being called.
|
|
65370
|
+
// In this case, we should fallback to a setTimeout() implementation.
|
|
65371
|
+
cancelFrame = function cancelFrame(_ref) {
|
|
65372
|
+
var _ref2 = slicedToArray$1(_ref, 2),
|
|
65373
|
+
animationFrameID = _ref2[0],
|
|
65374
|
+
timeoutID = _ref2[1];
|
|
65375
|
+
|
|
65376
|
+
cancelAnimationFrameFn(animationFrameID);
|
|
65377
|
+
clearTimeoutFn(timeoutID);
|
|
65378
|
+
};
|
|
65379
|
+
requestFrame = function requestAnimationFrameWithSetTimeoutFallback(callback) {
|
|
65380
|
+
var animationFrameID = requestAnimationFrameFn(function animationFrameCallback() {
|
|
65381
|
+
clearTimeoutFn(timeoutID);
|
|
65382
|
+
callback();
|
|
65383
|
+
});
|
|
65384
|
+
|
|
65385
|
+
var timeoutID = setTimeoutFn(function timeoutCallback() {
|
|
65386
|
+
cancelAnimationFrameFn(animationFrameID);
|
|
65387
|
+
callback();
|
|
65388
|
+
}, TIMEOUT_DURATION);
|
|
65389
|
+
|
|
65390
|
+
return [animationFrameID, timeoutID];
|
|
65391
|
+
};
|
|
65392
|
+
}
|
|
65393
|
+
|
|
65394
|
+
function createDetectElementResize(nonce) {
|
|
65395
|
+
var animationKeyframes = void 0;
|
|
65396
|
+
var animationName = void 0;
|
|
65397
|
+
var animationStartEvent = void 0;
|
|
65398
|
+
var animationStyle = void 0;
|
|
65399
|
+
var checkTriggers = void 0;
|
|
65400
|
+
var resetTriggers = void 0;
|
|
65401
|
+
var scrollListener = void 0;
|
|
65402
|
+
|
|
65403
|
+
var attachEvent = typeof document !== 'undefined' && document.attachEvent;
|
|
65404
|
+
if (!attachEvent) {
|
|
65405
|
+
resetTriggers = function resetTriggers(element) {
|
|
65418
65406
|
var triggers = element.__resizeTriggers__,
|
|
65419
65407
|
expand = triggers.firstElementChild,
|
|
65420
65408
|
contract = triggers.lastElementChild,
|
|
@@ -65427,11 +65415,11 @@
|
|
|
65427
65415
|
expand.scrollTop = expand.scrollHeight;
|
|
65428
65416
|
};
|
|
65429
65417
|
|
|
65430
|
-
|
|
65431
|
-
return element.offsetWidth
|
|
65418
|
+
checkTriggers = function checkTriggers(element) {
|
|
65419
|
+
return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
|
|
65432
65420
|
};
|
|
65433
65421
|
|
|
65434
|
-
|
|
65422
|
+
scrollListener = function scrollListener(e) {
|
|
65435
65423
|
// Don't measure (which forces) reflow for scrolls that happen inside of children!
|
|
65436
65424
|
if (e.target.className && typeof e.target.className.indexOf === 'function' && e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {
|
|
65437
65425
|
return;
|
|
@@ -65439,34 +65427,29 @@
|
|
|
65439
65427
|
|
|
65440
65428
|
var element = this;
|
|
65441
65429
|
resetTriggers(this);
|
|
65442
|
-
|
|
65443
65430
|
if (this.__resizeRAF__) {
|
|
65444
65431
|
cancelFrame(this.__resizeRAF__);
|
|
65445
65432
|
}
|
|
65446
|
-
|
|
65447
|
-
this.__resizeRAF__ = requestFrame(function () {
|
|
65433
|
+
this.__resizeRAF__ = requestFrame(function animationFrame() {
|
|
65448
65434
|
if (checkTriggers(element)) {
|
|
65449
65435
|
element.__resizeLast__.width = element.offsetWidth;
|
|
65450
65436
|
element.__resizeLast__.height = element.offsetHeight;
|
|
65451
|
-
|
|
65452
|
-
element.__resizeListeners__.forEach(function (fn) {
|
|
65437
|
+
element.__resizeListeners__.forEach(function forEachResizeListener(fn) {
|
|
65453
65438
|
fn.call(element, e);
|
|
65454
65439
|
});
|
|
65455
65440
|
}
|
|
65456
65441
|
});
|
|
65457
65442
|
};
|
|
65458
|
-
/* Detect CSS Animations support to detect element display/re-attach */
|
|
65459
65443
|
|
|
65460
|
-
|
|
65461
|
-
var animation = false
|
|
65462
|
-
|
|
65463
|
-
|
|
65464
|
-
|
|
65465
|
-
|
|
65466
|
-
|
|
65444
|
+
/* Detect CSS Animations support to detect element display/re-attach */
|
|
65445
|
+
var animation = false;
|
|
65446
|
+
var keyframeprefix = '';
|
|
65447
|
+
animationStartEvent = 'animationstart';
|
|
65448
|
+
var domPrefixes = 'Webkit Moz O ms'.split(' ');
|
|
65449
|
+
var startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' ');
|
|
65450
|
+
var pfx = '';
|
|
65467
65451
|
{
|
|
65468
|
-
var elm =
|
|
65469
|
-
|
|
65452
|
+
var elm = document.createElement('fakeelement');
|
|
65470
65453
|
if (elm.style.animationName !== undefined) {
|
|
65471
65454
|
animation = true;
|
|
65472
65455
|
}
|
|
@@ -65476,16 +65459,17 @@
|
|
|
65476
65459
|
if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
|
|
65477
65460
|
pfx = domPrefixes[i];
|
|
65478
65461
|
keyframeprefix = '-' + pfx.toLowerCase() + '-';
|
|
65479
|
-
|
|
65462
|
+
animationStartEvent = startEvents[i];
|
|
65480
65463
|
animation = true;
|
|
65481
65464
|
break;
|
|
65482
65465
|
}
|
|
65483
65466
|
}
|
|
65484
65467
|
}
|
|
65485
65468
|
}
|
|
65486
|
-
|
|
65487
|
-
|
|
65488
|
-
|
|
65469
|
+
|
|
65470
|
+
animationName = 'resizeanim';
|
|
65471
|
+
animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';
|
|
65472
|
+
animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
|
|
65489
65473
|
}
|
|
65490
65474
|
|
|
65491
65475
|
var createStyles = function createStyles(doc) {
|
|
@@ -65494,6 +65478,7 @@
|
|
|
65494
65478
|
var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
|
|
65495
65479
|
head = doc.head || doc.getElementsByTagName('head')[0],
|
|
65496
65480
|
style = doc.createElement('style');
|
|
65481
|
+
|
|
65497
65482
|
style.id = 'detectElementResize';
|
|
65498
65483
|
style.type = 'text/css';
|
|
65499
65484
|
|
|
@@ -65517,13 +65502,10 @@
|
|
|
65517
65502
|
} else {
|
|
65518
65503
|
if (!element.__resizeTriggers__) {
|
|
65519
65504
|
var doc = element.ownerDocument;
|
|
65520
|
-
|
|
65521
|
-
|
|
65522
|
-
|
|
65523
|
-
if (elementStyle && elementStyle.position == 'static') {
|
|
65505
|
+
var elementStyle = windowObject.getComputedStyle(element);
|
|
65506
|
+
if (elementStyle && elementStyle.position === 'static') {
|
|
65524
65507
|
element.style.position = 'relative';
|
|
65525
65508
|
}
|
|
65526
|
-
|
|
65527
65509
|
createStyles(doc);
|
|
65528
65510
|
element.__resizeLast__ = {};
|
|
65529
65511
|
element.__resizeListeners__ = [];
|
|
@@ -65533,27 +65515,22 @@
|
|
|
65533
65515
|
expandTrigger.appendChild(doc.createElement('div'));
|
|
65534
65516
|
var contractTrigger = doc.createElement('div');
|
|
65535
65517
|
contractTrigger.className = 'contract-trigger';
|
|
65536
|
-
|
|
65537
65518
|
element.__resizeTriggers__.appendChild(expandTrigger);
|
|
65538
|
-
|
|
65539
65519
|
element.__resizeTriggers__.appendChild(contractTrigger);
|
|
65540
|
-
|
|
65541
65520
|
element.appendChild(element.__resizeTriggers__);
|
|
65542
65521
|
resetTriggers(element);
|
|
65543
65522
|
element.addEventListener('scroll', scrollListener, true);
|
|
65544
|
-
/* Listen for a css animation to detect element display/re-attach */
|
|
65545
65523
|
|
|
65546
|
-
|
|
65524
|
+
/* Listen for a css animation to detect element display/re-attach */
|
|
65525
|
+
if (animationStartEvent) {
|
|
65547
65526
|
element.__resizeTriggers__.__animationListener__ = function animationListener(e) {
|
|
65548
|
-
if (e.animationName
|
|
65527
|
+
if (e.animationName === animationName) {
|
|
65549
65528
|
resetTriggers(element);
|
|
65550
65529
|
}
|
|
65551
65530
|
};
|
|
65552
|
-
|
|
65553
|
-
element.__resizeTriggers__.addEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);
|
|
65531
|
+
element.__resizeTriggers__.addEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);
|
|
65554
65532
|
}
|
|
65555
65533
|
}
|
|
65556
|
-
|
|
65557
65534
|
element.__resizeListeners__.push(fn);
|
|
65558
65535
|
}
|
|
65559
65536
|
};
|
|
@@ -65563,19 +65540,16 @@
|
|
|
65563
65540
|
element.detachEvent('onresize', fn);
|
|
65564
65541
|
} else {
|
|
65565
65542
|
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
|
65566
|
-
|
|
65567
65543
|
if (!element.__resizeListeners__.length) {
|
|
65568
65544
|
element.removeEventListener('scroll', scrollListener, true);
|
|
65569
|
-
|
|
65570
65545
|
if (element.__resizeTriggers__.__animationListener__) {
|
|
65571
|
-
element.__resizeTriggers__.removeEventListener(
|
|
65572
|
-
|
|
65546
|
+
element.__resizeTriggers__.removeEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);
|
|
65573
65547
|
element.__resizeTriggers__.__animationListener__ = null;
|
|
65574
65548
|
}
|
|
65575
|
-
|
|
65576
65549
|
try {
|
|
65577
65550
|
element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
|
|
65578
|
-
} catch (e) {
|
|
65551
|
+
} catch (e) {
|
|
65552
|
+
// Preact compat; see developit/preact-compat/issues/228
|
|
65579
65553
|
}
|
|
65580
65554
|
}
|
|
65581
65555
|
}
|
|
@@ -65587,77 +65561,63 @@
|
|
|
65587
65561
|
};
|
|
65588
65562
|
}
|
|
65589
65563
|
|
|
65590
|
-
var AutoSizer =
|
|
65591
|
-
|
|
65592
|
-
|
|
65593
|
-
var _super = _createSuper$7(AutoSizer);
|
|
65564
|
+
var AutoSizer = function (_React$PureComponent) {
|
|
65565
|
+
inherits(AutoSizer, _React$PureComponent);
|
|
65594
65566
|
|
|
65595
65567
|
function AutoSizer() {
|
|
65596
|
-
var
|
|
65568
|
+
var _ref;
|
|
65569
|
+
|
|
65570
|
+
var _temp, _this, _ret;
|
|
65597
65571
|
|
|
65598
|
-
|
|
65572
|
+
classCallCheck(this, AutoSizer);
|
|
65599
65573
|
|
|
65600
|
-
for (var _len = arguments.length, args =
|
|
65574
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
65601
65575
|
args[_key] = arguments[_key];
|
|
65602
65576
|
}
|
|
65603
65577
|
|
|
65604
|
-
_this =
|
|
65605
|
-
_this.state = {
|
|
65578
|
+
return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = AutoSizer.__proto__ || Object.getPrototypeOf(AutoSizer)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
|
|
65606
65579
|
height: _this.props.defaultHeight || 0,
|
|
65607
65580
|
width: _this.props.defaultWidth || 0
|
|
65608
|
-
}
|
|
65609
|
-
_this._parentNode = void 0;
|
|
65610
|
-
_this._autoSizer = void 0;
|
|
65611
|
-
_this._window = void 0;
|
|
65612
|
-
_this._detectElementResize = void 0;
|
|
65613
|
-
|
|
65614
|
-
_this._onResize = function () {
|
|
65615
|
-
console.log(11);
|
|
65581
|
+
}, _this._onResize = function () {
|
|
65616
65582
|
var _this$props = _this.props,
|
|
65617
65583
|
disableHeight = _this$props.disableHeight,
|
|
65618
65584
|
disableWidth = _this$props.disableWidth,
|
|
65619
65585
|
onResize = _this$props.onResize;
|
|
65620
65586
|
|
|
65587
|
+
|
|
65621
65588
|
if (_this._parentNode) {
|
|
65622
65589
|
// Guard against AutoSizer component being removed from the DOM immediately after being added.
|
|
65623
65590
|
// This can result in invalid style values which can result in NaN values if we don't handle them.
|
|
65624
65591
|
// See issue #150 for more context.
|
|
65625
|
-
|
|
65626
|
-
var
|
|
65627
|
-
var
|
|
65628
|
-
|
|
65629
|
-
var
|
|
65630
|
-
var
|
|
65631
|
-
var
|
|
65632
|
-
var
|
|
65633
|
-
var
|
|
65634
|
-
|
|
65592
|
+
|
|
65593
|
+
var _height = _this._parentNode.offsetHeight || 0;
|
|
65594
|
+
var _width = _this._parentNode.offsetWidth || 0;
|
|
65595
|
+
|
|
65596
|
+
var _style = window.getComputedStyle(_this._parentNode) || {};
|
|
65597
|
+
var paddingLeft = parseInt(_style.paddingLeft, 10) || 0;
|
|
65598
|
+
var paddingRight = parseInt(_style.paddingRight, 10) || 0;
|
|
65599
|
+
var paddingTop = parseInt(_style.paddingTop, 10) || 0;
|
|
65600
|
+
var paddingBottom = parseInt(_style.paddingBottom, 10) || 0;
|
|
65601
|
+
|
|
65602
|
+
var newHeight = _height - paddingTop - paddingBottom;
|
|
65603
|
+
var newWidth = _width - paddingLeft - paddingRight;
|
|
65635
65604
|
|
|
65636
65605
|
if (!disableHeight && _this.state.height !== newHeight || !disableWidth && _this.state.width !== newWidth) {
|
|
65637
65606
|
_this.setState({
|
|
65638
|
-
height:
|
|
65639
|
-
width:
|
|
65607
|
+
height: _height - paddingTop - paddingBottom,
|
|
65608
|
+
width: _width - paddingLeft - paddingRight
|
|
65640
65609
|
});
|
|
65641
65610
|
|
|
65642
|
-
onResize({
|
|
65643
|
-
height: height,
|
|
65644
|
-
width: width
|
|
65645
|
-
});
|
|
65611
|
+
onResize({ height: _height, width: _width });
|
|
65646
65612
|
}
|
|
65647
65613
|
}
|
|
65648
|
-
}
|
|
65649
|
-
|
|
65650
|
-
_this.handleResize = lodash.debounce(_this._onResize, 800);
|
|
65651
|
-
|
|
65652
|
-
_this._setRef = function (autoSizer) {
|
|
65614
|
+
}, _this._setRef = function (autoSizer) {
|
|
65653
65615
|
_this._autoSizer = autoSizer;
|
|
65654
|
-
};
|
|
65655
|
-
|
|
65656
|
-
return _this;
|
|
65616
|
+
}, _temp), possibleConstructorReturn(_this, _ret);
|
|
65657
65617
|
}
|
|
65658
65618
|
|
|
65659
|
-
|
|
65660
|
-
key:
|
|
65619
|
+
createClass(AutoSizer, [{
|
|
65620
|
+
key: 'componentDidMount',
|
|
65661
65621
|
value: function componentDidMount() {
|
|
65662
65622
|
var nonce = this.props.nonce;
|
|
65663
65623
|
|
|
@@ -65666,65 +65626,75 @@
|
|
|
65666
65626
|
// This handles edge-cases where the component has already been unmounted before its ref has been set,
|
|
65667
65627
|
// As well as libraries like react-lite which have a slightly different lifecycle.
|
|
65668
65628
|
this._parentNode = this._autoSizer.parentNode;
|
|
65669
|
-
this._window = this._autoSizer.parentNode.ownerDocument.defaultView; // Defer requiring resize handler in order to support server-side rendering.
|
|
65670
|
-
// See issue #41
|
|
65671
|
-
|
|
65672
|
-
this._detectElementResize = createDetectElementResize(nonce, this._window);
|
|
65673
65629
|
|
|
65674
|
-
|
|
65675
|
-
|
|
65676
|
-
|
|
65630
|
+
// Defer requiring resize handler in order to support server-side rendering.
|
|
65631
|
+
// See issue #41
|
|
65632
|
+
this._detectElementResize = createDetectElementResize(nonce);
|
|
65633
|
+
this._detectElementResize.addResizeListener(this._parentNode, this._onResize);
|
|
65677
65634
|
|
|
65678
65635
|
this._onResize();
|
|
65679
65636
|
}
|
|
65680
65637
|
}
|
|
65681
65638
|
}, {
|
|
65682
|
-
key:
|
|
65639
|
+
key: 'componentWillUnmount',
|
|
65683
65640
|
value: function componentWillUnmount() {
|
|
65684
65641
|
if (this._detectElementResize && this._parentNode) {
|
|
65685
65642
|
this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
|
|
65686
65643
|
}
|
|
65687
65644
|
}
|
|
65688
65645
|
}, {
|
|
65689
|
-
key:
|
|
65646
|
+
key: 'render',
|
|
65690
65647
|
value: function render() {
|
|
65691
|
-
var
|
|
65692
|
-
children =
|
|
65693
|
-
className =
|
|
65694
|
-
disableHeight =
|
|
65695
|
-
disableWidth =
|
|
65696
|
-
style =
|
|
65697
|
-
var
|
|
65698
|
-
height =
|
|
65699
|
-
width =
|
|
65648
|
+
var _props = this.props,
|
|
65649
|
+
children = _props.children,
|
|
65650
|
+
className = _props.className,
|
|
65651
|
+
disableHeight = _props.disableHeight,
|
|
65652
|
+
disableWidth = _props.disableWidth,
|
|
65653
|
+
style = _props.style;
|
|
65654
|
+
var _state = this.state,
|
|
65655
|
+
height = _state.height,
|
|
65656
|
+
width = _state.width;
|
|
65657
|
+
|
|
65658
|
+
// Outer div should not force width/height since that may prevent containers from shrinking.
|
|
65700
65659
|
// Inner component should overflow and use calculated width/height.
|
|
65701
65660
|
// See issue #68 for more information.
|
|
65702
65661
|
|
|
65703
|
-
var outerStyle = {
|
|
65704
|
-
overflow: 'visible'
|
|
65705
|
-
};
|
|
65662
|
+
var outerStyle = { overflow: 'visible' };
|
|
65706
65663
|
var childParams = {};
|
|
65707
65664
|
|
|
65665
|
+
// Avoid rendering children before the initial measurements have been collected.
|
|
65666
|
+
// At best this would just be wasting cycles.
|
|
65667
|
+
var bailoutOnChildren = false;
|
|
65668
|
+
|
|
65708
65669
|
if (!disableHeight) {
|
|
65670
|
+
if (height === 0) {
|
|
65671
|
+
bailoutOnChildren = true;
|
|
65672
|
+
}
|
|
65709
65673
|
outerStyle.height = 0;
|
|
65710
65674
|
childParams.height = height;
|
|
65711
65675
|
}
|
|
65712
65676
|
|
|
65713
65677
|
if (!disableWidth) {
|
|
65678
|
+
if (width === 0) {
|
|
65679
|
+
bailoutOnChildren = true;
|
|
65680
|
+
}
|
|
65714
65681
|
outerStyle.width = 0;
|
|
65715
65682
|
childParams.width = width;
|
|
65716
65683
|
}
|
|
65717
65684
|
|
|
65718
|
-
return
|
|
65719
|
-
|
|
65720
|
-
|
|
65721
|
-
|
|
65722
|
-
|
|
65685
|
+
return React.createElement(
|
|
65686
|
+
'div',
|
|
65687
|
+
{
|
|
65688
|
+
className: className,
|
|
65689
|
+
ref: this._setRef,
|
|
65690
|
+
style: _extends$7({}, outerStyle, style)
|
|
65691
|
+
},
|
|
65692
|
+
!bailoutOnChildren && children(childParams)
|
|
65693
|
+
);
|
|
65723
65694
|
}
|
|
65724
65695
|
}]);
|
|
65725
|
-
|
|
65726
65696
|
return AutoSizer;
|
|
65727
|
-
}(
|
|
65697
|
+
}(React.PureComponent);
|
|
65728
65698
|
|
|
65729
65699
|
AutoSizer.defaultProps = {
|
|
65730
65700
|
onResize: function onResize() {},
|
|
@@ -68705,7 +68675,7 @@
|
|
|
68705
68675
|
editConfig: editConfig
|
|
68706
68676
|
};
|
|
68707
68677
|
|
|
68708
|
-
var _excluded$14 = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "customCheck"];
|
|
68678
|
+
var _excluded$14 = ["dataSource", "autoSize", "columns", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "customCheck"];
|
|
68709
68679
|
var Summary = ProviderWarp.Summary;
|
|
68710
68680
|
var ResetTable = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
68711
68681
|
var dataSource = props.dataSource,
|
|
@@ -68718,6 +68688,8 @@
|
|
|
68718
68688
|
pagination = props.pagination,
|
|
68719
68689
|
hiddenPage = props.hiddenPage,
|
|
68720
68690
|
loading = props.loading,
|
|
68691
|
+
_props$virtual = props.virtual,
|
|
68692
|
+
virtual = _props$virtual === void 0 ? true : _props$virtual,
|
|
68721
68693
|
customCheck = props.customCheck,
|
|
68722
68694
|
resetProps = _objectWithoutProperties(props, _excluded$14);
|
|
68723
68695
|
|
|
@@ -68951,7 +68923,7 @@
|
|
|
68951
68923
|
}, /*#__PURE__*/React__default['default'].createElement(ProviderWarp, _extends({}, config, {
|
|
68952
68924
|
loading: loading,
|
|
68953
68925
|
dataSource: dataSource,
|
|
68954
|
-
components: vComponents,
|
|
68926
|
+
components: virtual ? vComponents : null,
|
|
68955
68927
|
tableClassName: "lm_protable",
|
|
68956
68928
|
summary: function summary(pageData) {
|
|
68957
68929
|
return _summary && _summary(pageData, resultColumns);
|
|
@@ -68997,496 +68969,12 @@
|
|
|
68997
68969
|
style: {
|
|
68998
68970
|
width: '100%',
|
|
68999
68971
|
height: '100%'
|
|
69000
|
-
}
|
|
69001
|
-
disableWidth: true
|
|
68972
|
+
}
|
|
69002
68973
|
}, throttleSize));
|
|
69003
68974
|
});
|
|
69004
68975
|
|
|
69005
68976
|
var Context$4 = /*#__PURE__*/React.createContext();
|
|
69006
68977
|
|
|
69007
|
-
var classCallCheck$1 = function (instance, Constructor) {
|
|
69008
|
-
if (!(instance instanceof Constructor)) {
|
|
69009
|
-
throw new TypeError("Cannot call a class as a function");
|
|
69010
|
-
}
|
|
69011
|
-
};
|
|
69012
|
-
|
|
69013
|
-
var createClass$1 = function () {
|
|
69014
|
-
function defineProperties(target, props) {
|
|
69015
|
-
for (var i = 0; i < props.length; i++) {
|
|
69016
|
-
var descriptor = props[i];
|
|
69017
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
69018
|
-
descriptor.configurable = true;
|
|
69019
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
69020
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
69021
|
-
}
|
|
69022
|
-
}
|
|
69023
|
-
|
|
69024
|
-
return function (Constructor, protoProps, staticProps) {
|
|
69025
|
-
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
69026
|
-
if (staticProps) defineProperties(Constructor, staticProps);
|
|
69027
|
-
return Constructor;
|
|
69028
|
-
};
|
|
69029
|
-
}();
|
|
69030
|
-
|
|
69031
|
-
var _extends$7 = Object.assign || function (target) {
|
|
69032
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
69033
|
-
var source = arguments[i];
|
|
69034
|
-
|
|
69035
|
-
for (var key in source) {
|
|
69036
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
69037
|
-
target[key] = source[key];
|
|
69038
|
-
}
|
|
69039
|
-
}
|
|
69040
|
-
}
|
|
69041
|
-
|
|
69042
|
-
return target;
|
|
69043
|
-
};
|
|
69044
|
-
|
|
69045
|
-
var inherits$1 = function (subClass, superClass) {
|
|
69046
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
69047
|
-
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
|
69048
|
-
}
|
|
69049
|
-
|
|
69050
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
69051
|
-
constructor: {
|
|
69052
|
-
value: subClass,
|
|
69053
|
-
enumerable: false,
|
|
69054
|
-
writable: true,
|
|
69055
|
-
configurable: true
|
|
69056
|
-
}
|
|
69057
|
-
});
|
|
69058
|
-
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
69059
|
-
};
|
|
69060
|
-
|
|
69061
|
-
var possibleConstructorReturn$1 = function (self, call) {
|
|
69062
|
-
if (!self) {
|
|
69063
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
69064
|
-
}
|
|
69065
|
-
|
|
69066
|
-
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
|
69067
|
-
};
|
|
69068
|
-
|
|
69069
|
-
var slicedToArray$1 = function () {
|
|
69070
|
-
function sliceIterator(arr, i) {
|
|
69071
|
-
var _arr = [];
|
|
69072
|
-
var _n = true;
|
|
69073
|
-
var _d = false;
|
|
69074
|
-
var _e = undefined;
|
|
69075
|
-
|
|
69076
|
-
try {
|
|
69077
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
69078
|
-
_arr.push(_s.value);
|
|
69079
|
-
|
|
69080
|
-
if (i && _arr.length === i) break;
|
|
69081
|
-
}
|
|
69082
|
-
} catch (err) {
|
|
69083
|
-
_d = true;
|
|
69084
|
-
_e = err;
|
|
69085
|
-
} finally {
|
|
69086
|
-
try {
|
|
69087
|
-
if (!_n && _i["return"]) _i["return"]();
|
|
69088
|
-
} finally {
|
|
69089
|
-
if (_d) throw _e;
|
|
69090
|
-
}
|
|
69091
|
-
}
|
|
69092
|
-
|
|
69093
|
-
return _arr;
|
|
69094
|
-
}
|
|
69095
|
-
|
|
69096
|
-
return function (arr, i) {
|
|
69097
|
-
if (Array.isArray(arr)) {
|
|
69098
|
-
return arr;
|
|
69099
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
69100
|
-
return sliceIterator(arr, i);
|
|
69101
|
-
} else {
|
|
69102
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
69103
|
-
}
|
|
69104
|
-
};
|
|
69105
|
-
}();
|
|
69106
|
-
|
|
69107
|
-
/**
|
|
69108
|
-
* Detect Element Resize.
|
|
69109
|
-
* https://github.com/sdecima/javascript-detect-element-resize
|
|
69110
|
-
* Sebastian Decima
|
|
69111
|
-
*
|
|
69112
|
-
* Forked from version 0.5.3; includes the following modifications:
|
|
69113
|
-
* 1) Guard against unsafe 'window' and 'document' references (to support SSR).
|
|
69114
|
-
* 2) Defer initialization code via a top-level function wrapper (to support SSR).
|
|
69115
|
-
* 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.
|
|
69116
|
-
* 4) Add nonce for style element.
|
|
69117
|
-
**/
|
|
69118
|
-
|
|
69119
|
-
// Check `document` and `window` in case of server-side rendering
|
|
69120
|
-
var windowObject = void 0;
|
|
69121
|
-
if (typeof window !== 'undefined') {
|
|
69122
|
-
windowObject = window;
|
|
69123
|
-
|
|
69124
|
-
// eslint-disable-next-line no-restricted-globals
|
|
69125
|
-
} else if (typeof self !== 'undefined') {
|
|
69126
|
-
// eslint-disable-next-line no-restricted-globals
|
|
69127
|
-
windowObject = self;
|
|
69128
|
-
} else {
|
|
69129
|
-
windowObject = global;
|
|
69130
|
-
}
|
|
69131
|
-
|
|
69132
|
-
var cancelFrame = null;
|
|
69133
|
-
var requestFrame = null;
|
|
69134
|
-
|
|
69135
|
-
var TIMEOUT_DURATION = 20;
|
|
69136
|
-
|
|
69137
|
-
var clearTimeoutFn = windowObject.clearTimeout;
|
|
69138
|
-
var setTimeoutFn = windowObject.setTimeout;
|
|
69139
|
-
|
|
69140
|
-
var cancelAnimationFrameFn = windowObject.cancelAnimationFrame || windowObject.mozCancelAnimationFrame || windowObject.webkitCancelAnimationFrame;
|
|
69141
|
-
|
|
69142
|
-
var requestAnimationFrameFn = windowObject.requestAnimationFrame || windowObject.mozRequestAnimationFrame || windowObject.webkitRequestAnimationFrame;
|
|
69143
|
-
|
|
69144
|
-
if (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {
|
|
69145
|
-
// For environments that don't support animation frame,
|
|
69146
|
-
// fallback to a setTimeout based approach.
|
|
69147
|
-
cancelFrame = clearTimeoutFn;
|
|
69148
|
-
requestFrame = function requestAnimationFrameViaSetTimeout(callback) {
|
|
69149
|
-
return setTimeoutFn(callback, TIMEOUT_DURATION);
|
|
69150
|
-
};
|
|
69151
|
-
} else {
|
|
69152
|
-
// Counter intuitively, environments that support animation frames can be trickier.
|
|
69153
|
-
// Chrome's "Throttle non-visible cross-origin iframes" flag can prevent rAFs from being called.
|
|
69154
|
-
// In this case, we should fallback to a setTimeout() implementation.
|
|
69155
|
-
cancelFrame = function cancelFrame(_ref) {
|
|
69156
|
-
var _ref2 = slicedToArray$1(_ref, 2),
|
|
69157
|
-
animationFrameID = _ref2[0],
|
|
69158
|
-
timeoutID = _ref2[1];
|
|
69159
|
-
|
|
69160
|
-
cancelAnimationFrameFn(animationFrameID);
|
|
69161
|
-
clearTimeoutFn(timeoutID);
|
|
69162
|
-
};
|
|
69163
|
-
requestFrame = function requestAnimationFrameWithSetTimeoutFallback(callback) {
|
|
69164
|
-
var animationFrameID = requestAnimationFrameFn(function animationFrameCallback() {
|
|
69165
|
-
clearTimeoutFn(timeoutID);
|
|
69166
|
-
callback();
|
|
69167
|
-
});
|
|
69168
|
-
|
|
69169
|
-
var timeoutID = setTimeoutFn(function timeoutCallback() {
|
|
69170
|
-
cancelAnimationFrameFn(animationFrameID);
|
|
69171
|
-
callback();
|
|
69172
|
-
}, TIMEOUT_DURATION);
|
|
69173
|
-
|
|
69174
|
-
return [animationFrameID, timeoutID];
|
|
69175
|
-
};
|
|
69176
|
-
}
|
|
69177
|
-
|
|
69178
|
-
function createDetectElementResize$1(nonce) {
|
|
69179
|
-
var animationKeyframes = void 0;
|
|
69180
|
-
var animationName = void 0;
|
|
69181
|
-
var animationStartEvent = void 0;
|
|
69182
|
-
var animationStyle = void 0;
|
|
69183
|
-
var checkTriggers = void 0;
|
|
69184
|
-
var resetTriggers = void 0;
|
|
69185
|
-
var scrollListener = void 0;
|
|
69186
|
-
|
|
69187
|
-
var attachEvent = typeof document !== 'undefined' && document.attachEvent;
|
|
69188
|
-
if (!attachEvent) {
|
|
69189
|
-
resetTriggers = function resetTriggers(element) {
|
|
69190
|
-
var triggers = element.__resizeTriggers__,
|
|
69191
|
-
expand = triggers.firstElementChild,
|
|
69192
|
-
contract = triggers.lastElementChild,
|
|
69193
|
-
expandChild = expand.firstElementChild;
|
|
69194
|
-
contract.scrollLeft = contract.scrollWidth;
|
|
69195
|
-
contract.scrollTop = contract.scrollHeight;
|
|
69196
|
-
expandChild.style.width = expand.offsetWidth + 1 + 'px';
|
|
69197
|
-
expandChild.style.height = expand.offsetHeight + 1 + 'px';
|
|
69198
|
-
expand.scrollLeft = expand.scrollWidth;
|
|
69199
|
-
expand.scrollTop = expand.scrollHeight;
|
|
69200
|
-
};
|
|
69201
|
-
|
|
69202
|
-
checkTriggers = function checkTriggers(element) {
|
|
69203
|
-
return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;
|
|
69204
|
-
};
|
|
69205
|
-
|
|
69206
|
-
scrollListener = function scrollListener(e) {
|
|
69207
|
-
// Don't measure (which forces) reflow for scrolls that happen inside of children!
|
|
69208
|
-
if (e.target.className && typeof e.target.className.indexOf === 'function' && e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {
|
|
69209
|
-
return;
|
|
69210
|
-
}
|
|
69211
|
-
|
|
69212
|
-
var element = this;
|
|
69213
|
-
resetTriggers(this);
|
|
69214
|
-
if (this.__resizeRAF__) {
|
|
69215
|
-
cancelFrame(this.__resizeRAF__);
|
|
69216
|
-
}
|
|
69217
|
-
this.__resizeRAF__ = requestFrame(function animationFrame() {
|
|
69218
|
-
if (checkTriggers(element)) {
|
|
69219
|
-
element.__resizeLast__.width = element.offsetWidth;
|
|
69220
|
-
element.__resizeLast__.height = element.offsetHeight;
|
|
69221
|
-
element.__resizeListeners__.forEach(function forEachResizeListener(fn) {
|
|
69222
|
-
fn.call(element, e);
|
|
69223
|
-
});
|
|
69224
|
-
}
|
|
69225
|
-
});
|
|
69226
|
-
};
|
|
69227
|
-
|
|
69228
|
-
/* Detect CSS Animations support to detect element display/re-attach */
|
|
69229
|
-
var animation = false;
|
|
69230
|
-
var keyframeprefix = '';
|
|
69231
|
-
animationStartEvent = 'animationstart';
|
|
69232
|
-
var domPrefixes = 'Webkit Moz O ms'.split(' ');
|
|
69233
|
-
var startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' ');
|
|
69234
|
-
var pfx = '';
|
|
69235
|
-
{
|
|
69236
|
-
var elm = document.createElement('fakeelement');
|
|
69237
|
-
if (elm.style.animationName !== undefined) {
|
|
69238
|
-
animation = true;
|
|
69239
|
-
}
|
|
69240
|
-
|
|
69241
|
-
if (animation === false) {
|
|
69242
|
-
for (var i = 0; i < domPrefixes.length; i++) {
|
|
69243
|
-
if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {
|
|
69244
|
-
pfx = domPrefixes[i];
|
|
69245
|
-
keyframeprefix = '-' + pfx.toLowerCase() + '-';
|
|
69246
|
-
animationStartEvent = startEvents[i];
|
|
69247
|
-
animation = true;
|
|
69248
|
-
break;
|
|
69249
|
-
}
|
|
69250
|
-
}
|
|
69251
|
-
}
|
|
69252
|
-
}
|
|
69253
|
-
|
|
69254
|
-
animationName = 'resizeanim';
|
|
69255
|
-
animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';
|
|
69256
|
-
animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
|
|
69257
|
-
}
|
|
69258
|
-
|
|
69259
|
-
var createStyles = function createStyles(doc) {
|
|
69260
|
-
if (!doc.getElementById('detectElementResize')) {
|
|
69261
|
-
//opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
|
|
69262
|
-
var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
|
|
69263
|
-
head = doc.head || doc.getElementsByTagName('head')[0],
|
|
69264
|
-
style = doc.createElement('style');
|
|
69265
|
-
|
|
69266
|
-
style.id = 'detectElementResize';
|
|
69267
|
-
style.type = 'text/css';
|
|
69268
|
-
|
|
69269
|
-
if (nonce != null) {
|
|
69270
|
-
style.setAttribute('nonce', nonce);
|
|
69271
|
-
}
|
|
69272
|
-
|
|
69273
|
-
if (style.styleSheet) {
|
|
69274
|
-
style.styleSheet.cssText = css;
|
|
69275
|
-
} else {
|
|
69276
|
-
style.appendChild(doc.createTextNode(css));
|
|
69277
|
-
}
|
|
69278
|
-
|
|
69279
|
-
head.appendChild(style);
|
|
69280
|
-
}
|
|
69281
|
-
};
|
|
69282
|
-
|
|
69283
|
-
var addResizeListener = function addResizeListener(element, fn) {
|
|
69284
|
-
if (attachEvent) {
|
|
69285
|
-
element.attachEvent('onresize', fn);
|
|
69286
|
-
} else {
|
|
69287
|
-
if (!element.__resizeTriggers__) {
|
|
69288
|
-
var doc = element.ownerDocument;
|
|
69289
|
-
var elementStyle = windowObject.getComputedStyle(element);
|
|
69290
|
-
if (elementStyle && elementStyle.position === 'static') {
|
|
69291
|
-
element.style.position = 'relative';
|
|
69292
|
-
}
|
|
69293
|
-
createStyles(doc);
|
|
69294
|
-
element.__resizeLast__ = {};
|
|
69295
|
-
element.__resizeListeners__ = [];
|
|
69296
|
-
(element.__resizeTriggers__ = doc.createElement('div')).className = 'resize-triggers';
|
|
69297
|
-
var expandTrigger = doc.createElement('div');
|
|
69298
|
-
expandTrigger.className = 'expand-trigger';
|
|
69299
|
-
expandTrigger.appendChild(doc.createElement('div'));
|
|
69300
|
-
var contractTrigger = doc.createElement('div');
|
|
69301
|
-
contractTrigger.className = 'contract-trigger';
|
|
69302
|
-
element.__resizeTriggers__.appendChild(expandTrigger);
|
|
69303
|
-
element.__resizeTriggers__.appendChild(contractTrigger);
|
|
69304
|
-
element.appendChild(element.__resizeTriggers__);
|
|
69305
|
-
resetTriggers(element);
|
|
69306
|
-
element.addEventListener('scroll', scrollListener, true);
|
|
69307
|
-
|
|
69308
|
-
/* Listen for a css animation to detect element display/re-attach */
|
|
69309
|
-
if (animationStartEvent) {
|
|
69310
|
-
element.__resizeTriggers__.__animationListener__ = function animationListener(e) {
|
|
69311
|
-
if (e.animationName === animationName) {
|
|
69312
|
-
resetTriggers(element);
|
|
69313
|
-
}
|
|
69314
|
-
};
|
|
69315
|
-
element.__resizeTriggers__.addEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);
|
|
69316
|
-
}
|
|
69317
|
-
}
|
|
69318
|
-
element.__resizeListeners__.push(fn);
|
|
69319
|
-
}
|
|
69320
|
-
};
|
|
69321
|
-
|
|
69322
|
-
var removeResizeListener = function removeResizeListener(element, fn) {
|
|
69323
|
-
if (attachEvent) {
|
|
69324
|
-
element.detachEvent('onresize', fn);
|
|
69325
|
-
} else {
|
|
69326
|
-
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
|
69327
|
-
if (!element.__resizeListeners__.length) {
|
|
69328
|
-
element.removeEventListener('scroll', scrollListener, true);
|
|
69329
|
-
if (element.__resizeTriggers__.__animationListener__) {
|
|
69330
|
-
element.__resizeTriggers__.removeEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);
|
|
69331
|
-
element.__resizeTriggers__.__animationListener__ = null;
|
|
69332
|
-
}
|
|
69333
|
-
try {
|
|
69334
|
-
element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
|
|
69335
|
-
} catch (e) {
|
|
69336
|
-
// Preact compat; see developit/preact-compat/issues/228
|
|
69337
|
-
}
|
|
69338
|
-
}
|
|
69339
|
-
}
|
|
69340
|
-
};
|
|
69341
|
-
|
|
69342
|
-
return {
|
|
69343
|
-
addResizeListener: addResizeListener,
|
|
69344
|
-
removeResizeListener: removeResizeListener
|
|
69345
|
-
};
|
|
69346
|
-
}
|
|
69347
|
-
|
|
69348
|
-
var AutoSizer$1 = function (_React$PureComponent) {
|
|
69349
|
-
inherits$1(AutoSizer, _React$PureComponent);
|
|
69350
|
-
|
|
69351
|
-
function AutoSizer() {
|
|
69352
|
-
var _ref;
|
|
69353
|
-
|
|
69354
|
-
var _temp, _this, _ret;
|
|
69355
|
-
|
|
69356
|
-
classCallCheck$1(this, AutoSizer);
|
|
69357
|
-
|
|
69358
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
69359
|
-
args[_key] = arguments[_key];
|
|
69360
|
-
}
|
|
69361
|
-
|
|
69362
|
-
return _ret = (_temp = (_this = possibleConstructorReturn$1(this, (_ref = AutoSizer.__proto__ || Object.getPrototypeOf(AutoSizer)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
|
|
69363
|
-
height: _this.props.defaultHeight || 0,
|
|
69364
|
-
width: _this.props.defaultWidth || 0
|
|
69365
|
-
}, _this._onResize = function () {
|
|
69366
|
-
var _this$props = _this.props,
|
|
69367
|
-
disableHeight = _this$props.disableHeight,
|
|
69368
|
-
disableWidth = _this$props.disableWidth,
|
|
69369
|
-
onResize = _this$props.onResize;
|
|
69370
|
-
|
|
69371
|
-
|
|
69372
|
-
if (_this._parentNode) {
|
|
69373
|
-
// Guard against AutoSizer component being removed from the DOM immediately after being added.
|
|
69374
|
-
// This can result in invalid style values which can result in NaN values if we don't handle them.
|
|
69375
|
-
// See issue #150 for more context.
|
|
69376
|
-
|
|
69377
|
-
var _height = _this._parentNode.offsetHeight || 0;
|
|
69378
|
-
var _width = _this._parentNode.offsetWidth || 0;
|
|
69379
|
-
|
|
69380
|
-
var _style = window.getComputedStyle(_this._parentNode) || {};
|
|
69381
|
-
var paddingLeft = parseInt(_style.paddingLeft, 10) || 0;
|
|
69382
|
-
var paddingRight = parseInt(_style.paddingRight, 10) || 0;
|
|
69383
|
-
var paddingTop = parseInt(_style.paddingTop, 10) || 0;
|
|
69384
|
-
var paddingBottom = parseInt(_style.paddingBottom, 10) || 0;
|
|
69385
|
-
|
|
69386
|
-
var newHeight = _height - paddingTop - paddingBottom;
|
|
69387
|
-
var newWidth = _width - paddingLeft - paddingRight;
|
|
69388
|
-
|
|
69389
|
-
if (!disableHeight && _this.state.height !== newHeight || !disableWidth && _this.state.width !== newWidth) {
|
|
69390
|
-
_this.setState({
|
|
69391
|
-
height: _height - paddingTop - paddingBottom,
|
|
69392
|
-
width: _width - paddingLeft - paddingRight
|
|
69393
|
-
});
|
|
69394
|
-
|
|
69395
|
-
onResize({ height: _height, width: _width });
|
|
69396
|
-
}
|
|
69397
|
-
}
|
|
69398
|
-
}, _this._setRef = function (autoSizer) {
|
|
69399
|
-
_this._autoSizer = autoSizer;
|
|
69400
|
-
}, _temp), possibleConstructorReturn$1(_this, _ret);
|
|
69401
|
-
}
|
|
69402
|
-
|
|
69403
|
-
createClass$1(AutoSizer, [{
|
|
69404
|
-
key: 'componentDidMount',
|
|
69405
|
-
value: function componentDidMount() {
|
|
69406
|
-
var nonce = this.props.nonce;
|
|
69407
|
-
|
|
69408
|
-
if (this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement) {
|
|
69409
|
-
// Delay access of parentNode until mount.
|
|
69410
|
-
// This handles edge-cases where the component has already been unmounted before its ref has been set,
|
|
69411
|
-
// As well as libraries like react-lite which have a slightly different lifecycle.
|
|
69412
|
-
this._parentNode = this._autoSizer.parentNode;
|
|
69413
|
-
|
|
69414
|
-
// Defer requiring resize handler in order to support server-side rendering.
|
|
69415
|
-
// See issue #41
|
|
69416
|
-
this._detectElementResize = createDetectElementResize$1(nonce);
|
|
69417
|
-
this._detectElementResize.addResizeListener(this._parentNode, this._onResize);
|
|
69418
|
-
|
|
69419
|
-
this._onResize();
|
|
69420
|
-
}
|
|
69421
|
-
}
|
|
69422
|
-
}, {
|
|
69423
|
-
key: 'componentWillUnmount',
|
|
69424
|
-
value: function componentWillUnmount() {
|
|
69425
|
-
if (this._detectElementResize && this._parentNode) {
|
|
69426
|
-
this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);
|
|
69427
|
-
}
|
|
69428
|
-
}
|
|
69429
|
-
}, {
|
|
69430
|
-
key: 'render',
|
|
69431
|
-
value: function render() {
|
|
69432
|
-
var _props = this.props,
|
|
69433
|
-
children = _props.children,
|
|
69434
|
-
className = _props.className,
|
|
69435
|
-
disableHeight = _props.disableHeight,
|
|
69436
|
-
disableWidth = _props.disableWidth,
|
|
69437
|
-
style = _props.style;
|
|
69438
|
-
var _state = this.state,
|
|
69439
|
-
height = _state.height,
|
|
69440
|
-
width = _state.width;
|
|
69441
|
-
|
|
69442
|
-
// Outer div should not force width/height since that may prevent containers from shrinking.
|
|
69443
|
-
// Inner component should overflow and use calculated width/height.
|
|
69444
|
-
// See issue #68 for more information.
|
|
69445
|
-
|
|
69446
|
-
var outerStyle = { overflow: 'visible' };
|
|
69447
|
-
var childParams = {};
|
|
69448
|
-
|
|
69449
|
-
// Avoid rendering children before the initial measurements have been collected.
|
|
69450
|
-
// At best this would just be wasting cycles.
|
|
69451
|
-
var bailoutOnChildren = false;
|
|
69452
|
-
|
|
69453
|
-
if (!disableHeight) {
|
|
69454
|
-
if (height === 0) {
|
|
69455
|
-
bailoutOnChildren = true;
|
|
69456
|
-
}
|
|
69457
|
-
outerStyle.height = 0;
|
|
69458
|
-
childParams.height = height;
|
|
69459
|
-
}
|
|
69460
|
-
|
|
69461
|
-
if (!disableWidth) {
|
|
69462
|
-
if (width === 0) {
|
|
69463
|
-
bailoutOnChildren = true;
|
|
69464
|
-
}
|
|
69465
|
-
outerStyle.width = 0;
|
|
69466
|
-
childParams.width = width;
|
|
69467
|
-
}
|
|
69468
|
-
|
|
69469
|
-
return React.createElement(
|
|
69470
|
-
'div',
|
|
69471
|
-
{
|
|
69472
|
-
className: className,
|
|
69473
|
-
ref: this._setRef,
|
|
69474
|
-
style: _extends$7({}, outerStyle, style)
|
|
69475
|
-
},
|
|
69476
|
-
!bailoutOnChildren && children(childParams)
|
|
69477
|
-
);
|
|
69478
|
-
}
|
|
69479
|
-
}]);
|
|
69480
|
-
return AutoSizer;
|
|
69481
|
-
}(React.PureComponent);
|
|
69482
|
-
|
|
69483
|
-
AutoSizer$1.defaultProps = {
|
|
69484
|
-
onResize: function onResize() {},
|
|
69485
|
-
disableHeight: false,
|
|
69486
|
-
disableWidth: false,
|
|
69487
|
-
style: {}
|
|
69488
|
-
};
|
|
69489
|
-
|
|
69490
68978
|
function _inheritsLoose$1(subClass, superClass) {
|
|
69491
68979
|
subClass.prototype = Object.create(superClass.prototype);
|
|
69492
68980
|
subClass.prototype.constructor = subClass;
|
|
@@ -70952,7 +70440,7 @@
|
|
|
70952
70440
|
|
|
70953
70441
|
|
|
70954
70442
|
var ResizeSize$1 = function ResizeSize(props) {
|
|
70955
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(AutoSizer
|
|
70443
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(AutoSizer, {
|
|
70956
70444
|
style: {
|
|
70957
70445
|
width: '100%'
|
|
70958
70446
|
}
|