@capillarytech/blaze-ui 4.13.0 → 4.13.1-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.
@@ -485,28 +485,38 @@ var _default = exports["default"] = LogoBackground;
485
485
  exports.__esModule = true;
486
486
  exports["default"] = void 0;
487
487
  var _classnames = _interopRequireDefault(__webpack_require__(46942));
488
- var _propTypes = _interopRequireDefault(__webpack_require__(43363));
489
488
  var _react = _interopRequireDefault(__webpack_require__(9206));
489
+ var _reactIntl = __webpack_require__(46407);
490
490
  var _CapLabel = _interopRequireDefault(__webpack_require__(92675));
491
491
  var _CapRow = _interopRequireDefault(__webpack_require__(69813));
492
492
  var _CapTooltip = _interopRequireDefault(__webpack_require__(85684));
493
- var _LocaleHoc = _interopRequireDefault(__webpack_require__(39879));
493
+ var _messages = _interopRequireDefault(__webpack_require__(74891));
494
494
  var _jsxRuntime = __webpack_require__(74848);
495
+ const _excluded = ["intl", "list", "showNumber", "capLabelType", "more", "showTooltip", "truncateToWidth", "className"];
495
496
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
496
- const CapTruncateList = props => {
497
- const {
498
- list,
499
- showNumber = 1,
500
- capLabelType,
501
- more: moreMsg,
502
- showTooltip,
503
- truncateToWidth
504
- } = props;
497
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
498
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
499
+ const CapTruncateList = _ref => {
500
+ let {
501
+ intl: {
502
+ formatMessage
503
+ },
504
+ list = [],
505
+ showNumber = 1,
506
+ capLabelType = 'label1',
507
+ more,
508
+ showTooltip = true,
509
+ truncateToWidth = false,
510
+ className
511
+ } = _ref,
512
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
505
513
  const visibleList = list.slice(0, showNumber);
506
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
514
+ const moreMessage = more || formatMessage(_messages.default.more);
515
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, _extends({
507
516
  type: "flex",
508
517
  align: "middle",
509
- className: "cap-truncate-list",
518
+ className: (0, _classnames.default)('cap-truncate-list', className)
519
+ }, rest, {
510
520
  children: [visibleList.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
511
521
  className: (0, _classnames.default)({
512
522
  'truncate-text': truncateToWidth,
@@ -527,33 +537,16 @@ const CapTruncateList = props => {
527
537
  title: list.slice(showNumber).join(', '),
528
538
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
529
539
  type: capLabelType,
530
- children: "+" + (list.length - visibleList.length) + " " + moreMsg
540
+ children: "+" + (list.length - visibleList.length) + " " + moreMessage
531
541
  })
532
542
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
533
543
  type: capLabelType,
534
- children: "+" + (list.length - visibleList.length) + " " + moreMsg
544
+ children: "+" + (list.length - visibleList.length) + " " + moreMessage
535
545
  })
536
546
  }) : null]
537
- });
538
- };
539
- CapTruncateList.defaultProps = {
540
- list: [],
541
- showNumber: 1,
542
- capLabelType: 'label1',
543
- showTooltip: true,
544
- truncateToWidth: false
545
- };
546
- CapTruncateList.propTypes = {
547
- list: _propTypes.default.array,
548
- showNumber: _propTypes.default.number,
549
- capLabelType: _propTypes.default.string,
550
- more: _propTypes.default.string,
551
- showTooltip: _propTypes.default.bool,
552
- truncateToWidth: _propTypes.default.bool
547
+ }));
553
548
  };
554
- var _default = exports["default"] = (0, _LocaleHoc.default)(CapTruncateList, {
555
- key: 'CapTruncateList'
556
- });
549
+ var _default = exports["default"] = (0, _reactIntl.injectIntl)(CapTruncateList);
557
550
 
558
551
  /***/ }),
559
552
 
@@ -3595,6 +3588,25 @@ if (true) {
3595
3588
  {}
3596
3589
 
3597
3590
 
3591
+ /***/ }),
3592
+
3593
+ /***/ 74891:
3594
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3595
+
3596
+ "use strict";
3597
+
3598
+
3599
+ exports.__esModule = true;
3600
+ exports["default"] = void 0;
3601
+ var _reactIntl = __webpack_require__(46407);
3602
+ const scope = 'app.commonUtils.capUiLibrary.CapTruncateList';
3603
+ var _default = exports["default"] = (0, _reactIntl.defineMessages)({
3604
+ more: {
3605
+ id: scope + ".more",
3606
+ defaultMessage: 'more'
3607
+ }
3608
+ });
3609
+
3598
3610
  /***/ }),
3599
3611
 
3600
3612
  /***/ 76314: