@capillarytech/blaze-ui 5.11.6 → 5.11.7

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.
@@ -8340,13 +8340,15 @@ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(31601);
8340
8340
  var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(76314);
8341
8341
  var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
8342
8342
  // Module
8343
- ___CSS_LOADER_EXPORT___.push([module.id, `@keyframes errorBoundarySlide{from{transform:translateY(30%)}to{transform:translateY(0%)}}.illustrationAnimation{position:relative;animation:errorBoundarySlide .3s ease}.slideBox .cap-slide-box-v2-container .slidebox-content-container{overflow:hidden}.illustrationContainer{height:100%;width:100%}`, ""]);
8343
+ ___CSS_LOADER_EXPORT___.push([module.id, `@keyframes errorBoundarySlide{from{transform:translateY(30%)}to{transform:translateY(0%)}}.cap-error-boundary-illustration-animation{position:relative;animation:errorBoundarySlide .3s ease}.cap-error-boundary-slide-box .cap-slide-box-v2-container .slidebox-content-container{overflow:hidden}.cap-error-boundary-illustration-container{height:100%;width:100%}`, ""]);
8344
8344
  // Exports
8345
8345
  ___CSS_LOADER_EXPORT___.locals = {
8346
- "illustrationAnimation": `illustrationAnimation`,
8346
+ "cap-error-boundary-illustration-animation": `cap-error-boundary-illustration-animation`,
8347
8347
  "errorBoundarySlide": `errorBoundarySlide`,
8348
- "slideBox": `slideBox`,
8349
- "illustrationContainer": `illustrationContainer`
8348
+ "cap-error-boundary-slide-box": `cap-error-boundary-slide-box`,
8349
+ "cap-slide-box-v2-container": `cap-slide-box-v2-container`,
8350
+ "slidebox-content-container": `slidebox-content-container`,
8351
+ "cap-error-boundary-illustration-container": `cap-error-boundary-illustration-container`
8350
8352
  };
8351
8353
  module.exports = ___CSS_LOADER_EXPORT___;
8352
8354
 
@@ -16847,15 +16849,15 @@ var exports = __webpack_exports__;
16847
16849
  exports.__esModule = true;
16848
16850
  exports["default"] = void 0;
16849
16851
  var _classnames = _interopRequireDefault(__webpack_require__(46942));
16852
+ var _propTypes = _interopRequireDefault(__webpack_require__(43363));
16850
16853
  var _react = _interopRequireWildcard(__webpack_require__(9206));
16851
16854
  var _reactErrorBoundary = __webpack_require__(59263);
16852
16855
  var _CapErrorStateIllustration = _interopRequireDefault(__webpack_require__(30988));
16853
16856
  var _CapRow = _interopRequireDefault(__webpack_require__(69813));
16854
16857
  var _CapSlideBox = _interopRequireDefault(__webpack_require__(70225));
16855
- var _styles = _interopRequireDefault(__webpack_require__(26909));
16858
+ __webpack_require__(26909);
16856
16859
  var _jsxRuntime = __webpack_require__(74848);
16857
- const _excluded = ["children", "className", "isExpired", "isApiError", "refreshText", "expiryTitle", "refreshTitle", "useSlideBox", "header", "errorHandler", "slideBoxProps", "onRefreshClick", "onCloseSlideBox", "refreshThreshold", "expiryDescription", "isApiErrorBoundary", "showIllustrationImage", "prefix", "suffix", "showAnimation"],
16858
- _excluded2 = ["className", "header"];
16860
+ const _excluded = ["children", "className", "isExpired", "isApiError", "refreshText", "expiryTitle", "useSlideBox", "refreshTitle", "errorHandler", "slideBoxProps", "onRefreshClick", "onCloseSlideBox", "refreshThreshold", "expiryDescription", "isApiErrorBoundary", "showIllustrationImage", "prefix", "suffix", "showAnimation"];
16859
16861
  /**
16860
16862
  *
16861
16863
  * CapErrorBoundary
@@ -16868,25 +16870,24 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
16868
16870
  const CapErrorBoundary = _ref => {
16869
16871
  let {
16870
16872
  children,
16871
- className = '',
16872
- isExpired = false,
16873
- isApiError = false,
16874
- refreshText = '',
16875
- expiryTitle = '',
16876
- refreshTitle = '',
16877
- useSlideBox = false,
16878
- header,
16879
- errorHandler = () => {},
16880
- slideBoxProps = {},
16881
- onRefreshClick = () => {},
16882
- onCloseSlideBox = () => {},
16883
- refreshThreshold = 3,
16884
- expiryDescription = '',
16885
- isApiErrorBoundary = false,
16886
- showIllustrationImage = true,
16887
- prefix = '',
16888
- suffix = '',
16889
- showAnimation = true
16873
+ className,
16874
+ isExpired,
16875
+ isApiError,
16876
+ refreshText,
16877
+ expiryTitle,
16878
+ useSlideBox,
16879
+ refreshTitle,
16880
+ errorHandler,
16881
+ slideBoxProps,
16882
+ onRefreshClick,
16883
+ onCloseSlideBox,
16884
+ refreshThreshold,
16885
+ expiryDescription,
16886
+ isApiErrorBoundary,
16887
+ showIllustrationImage,
16888
+ prefix,
16889
+ suffix,
16890
+ showAnimation
16890
16891
  } = _ref,
16891
16892
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
16892
16893
  const [refreshCount, setRefreshCount] = (0, _react.useState)(0);
@@ -16899,10 +16900,10 @@ const CapErrorBoundary = _ref => {
16899
16900
  }
16900
16901
  };
16901
16902
  const errorStateIllustration = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
16902
- className: (0, _classnames.default)(_styles.default.illustrationContainer, className),
16903
+ className: (0, _classnames.default)('cap-error-boundary-illustration-container', className),
16903
16904
  children: [prefix, /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapErrorStateIllustration.default, _extends({
16904
16905
  className: (0, _classnames.default)({
16905
- [_styles.default.illustrationAnimation]: showAnimation
16906
+ 'cap-error-boundary-illustration-animation': showAnimation
16906
16907
  }),
16907
16908
  refreshText: refreshText,
16908
16909
  expiryTitle: expiryTitle,
@@ -16919,22 +16920,15 @@ const CapErrorBoundary = _ref => {
16919
16920
  } = _ref2;
16920
16921
  errorHandler(error);
16921
16922
  if (useSlideBox) {
16922
- const _ref3 = slideBoxProps,
16923
- {
16924
- className: slideBoxClassName,
16925
- header: slideBoxHeaderProp = ''
16926
- } = _ref3,
16927
- restSlideBoxProps = _objectWithoutPropertiesLoose(_ref3, _excluded2);
16928
- // Priority: 1) header prop, 2) slideBoxProps.header, 3) undefined if both not found
16929
- const slideBoxHeader = header !== undefined ? header : slideBoxHeaderProp;
16923
+ const {
16924
+ className: slideBoxClassName
16925
+ } = slideBoxProps || {};
16930
16926
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSlideBox.default, _extends({
16931
16927
  show: true,
16932
- header: slideBoxHeader //added header here because header is required prop in CapSlideBox
16933
- ,
16934
16928
  content: errorStateIllustration,
16935
16929
  handleClose: onCloseSlideBox,
16936
- className: (0, _classnames.default)(_styles.default.slideBox, slideBoxClassName)
16937
- }, restSlideBoxProps));
16930
+ className: (0, _classnames.default)('cap-error-boundary-slide-box', slideBoxClassName)
16931
+ }, slideBoxProps));
16938
16932
  }
16939
16933
  return errorStateIllustration;
16940
16934
  };
@@ -16945,6 +16939,47 @@ const CapErrorBoundary = _ref => {
16945
16939
  }), isApiErrorBoundary && (isApiError ? errorStateIllustration : children)]
16946
16940
  }, updatedKey);
16947
16941
  };
16942
+ CapErrorBoundary.defaultProps = {
16943
+ className: '',
16944
+ refreshText: '',
16945
+ expiryTitle: '',
16946
+ refreshTitle: '',
16947
+ isExpired: false,
16948
+ isApiError: false,
16949
+ slideBoxProps: {},
16950
+ useSlideBox: false,
16951
+ refreshThreshold: 3,
16952
+ expiryDescription: '',
16953
+ errorHandler: () => {},
16954
+ onRefreshClick: () => {},
16955
+ onCloseSlideBox: () => {},
16956
+ isApiErrorBoundary: false,
16957
+ showIllustrationImage: true,
16958
+ prefix: '',
16959
+ suffix: '',
16960
+ showAnimation: true
16961
+ };
16962
+ CapErrorBoundary.propTypes = {
16963
+ children: _propTypes.default.node,
16964
+ isExpired: _propTypes.default.bool,
16965
+ isApiError: _propTypes.default.bool,
16966
+ className: _propTypes.default.string,
16967
+ useSlideBox: _propTypes.default.bool,
16968
+ errorHandler: _propTypes.default.func,
16969
+ onRefreshClick: _propTypes.default.func,
16970
+ onCloseSlideBox: _propTypes.default.func,
16971
+ slideBoxProps: _propTypes.default.object,
16972
+ refreshThreshold: _propTypes.default.number,
16973
+ isApiErrorBoundary: _propTypes.default.bool,
16974
+ showIllustrationImage: _propTypes.default.bool,
16975
+ showAnimation: _propTypes.default.bool,
16976
+ refreshText: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
16977
+ expiryTitle: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
16978
+ refreshTitle: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
16979
+ expiryDescription: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
16980
+ prefix: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
16981
+ suffix: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node])
16982
+ };
16948
16983
  var _default = exports["default"] = CapErrorBoundary;
16949
16984
  })();
16950
16985