@luminati-io/uikit 6.2.5 → 6.2.7-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.
@@ -32774,17 +32774,19 @@ __webpack_require__.r(__webpack_exports__);
32774
32774
  /* harmony export */ useDidUpdate: () => (/* reexport safe */ _use_did_update__WEBPACK_IMPORTED_MODULE_1__.useDidUpdate),
32775
32775
  /* harmony export */ useEventListener: () => (/* reexport safe */ _use_event_listener__WEBPACK_IMPORTED_MODULE_2__["default"]),
32776
32776
  /* harmony export */ useLabelId: () => (/* reexport safe */ _use_label_id__WEBPACK_IMPORTED_MODULE_3__["default"]),
32777
- /* harmony export */ useOutsideClick: () => (/* reexport safe */ _use_outside_click__WEBPACK_IMPORTED_MODULE_4__["default"]),
32778
- /* harmony export */ useResize: () => (/* reexport safe */ _use_resize__WEBPACK_IMPORTED_MODULE_5__.useResize),
32779
- /* harmony export */ useScroll: () => (/* reexport safe */ _use_scroll__WEBPACK_IMPORTED_MODULE_6__["default"])
32777
+ /* harmony export */ useMeasure: () => (/* reexport safe */ _use_measure__WEBPACK_IMPORTED_MODULE_4__.useMeasure),
32778
+ /* harmony export */ useOutsideClick: () => (/* reexport safe */ _use_outside_click__WEBPACK_IMPORTED_MODULE_5__["default"]),
32779
+ /* harmony export */ useResize: () => (/* reexport safe */ _use_resize__WEBPACK_IMPORTED_MODULE_6__.useResize),
32780
+ /* harmony export */ useScroll: () => (/* reexport safe */ _use_scroll__WEBPACK_IMPORTED_MODULE_7__["default"])
32780
32781
  /* harmony export */ });
32781
32782
  /* harmony import */ var _use_debounced_callback__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./use_debounced_callback */ "./src/hooks/use_debounced_callback.js");
32782
32783
  /* harmony import */ var _use_did_update__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use_did_update */ "./src/hooks/use_did_update.js");
32783
32784
  /* harmony import */ var _use_event_listener__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use_event_listener */ "./src/hooks/use_event_listener.js");
32784
32785
  /* harmony import */ var _use_label_id__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use_label_id */ "./src/hooks/use_label_id.js");
32785
- /* harmony import */ var _use_outside_click__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./use_outside_click */ "./src/hooks/use_outside_click.js");
32786
- /* harmony import */ var _use_resize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./use_resize */ "./src/hooks/use_resize.js");
32787
- /* harmony import */ var _use_scroll__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./use_scroll */ "./src/hooks/use_scroll.js");
32786
+ /* harmony import */ var _use_measure__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./use_measure */ "./src/hooks/use_measure.js");
32787
+ /* harmony import */ var _use_outside_click__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./use_outside_click */ "./src/hooks/use_outside_click.js");
32788
+ /* harmony import */ var _use_resize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./use_resize */ "./src/hooks/use_resize.js");
32789
+ /* harmony import */ var _use_scroll__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./use_scroll */ "./src/hooks/use_scroll.js");
32788
32790
  // LICENSE_CODE ZON
32789
32791
 
32790
32792
 
@@ -32798,6 +32800,7 @@ __webpack_require__.r(__webpack_exports__);
32798
32800
 
32799
32801
 
32800
32802
 
32803
+
32801
32804
  /***/ }),
32802
32805
 
32803
32806
  /***/ "./src/hooks/use_debounced_callback.js":
@@ -32937,6 +32940,69 @@ var getRandomString = function getRandomString(len) {
32937
32940
 
32938
32941
  /***/ }),
32939
32942
 
32943
+ /***/ "./src/hooks/use_measure.js":
32944
+ /*!**********************************!*\
32945
+ !*** ./src/hooks/use_measure.js ***!
32946
+ \**********************************/
32947
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
32948
+
32949
+ "use strict";
32950
+ __webpack_require__.r(__webpack_exports__);
32951
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
32952
+ /* harmony export */ useMeasure: () => (/* binding */ useMeasure)
32953
+ /* harmony export */ });
32954
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
32955
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
32956
+ /* harmony import */ var resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! resize-observer-polyfill */ "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js");
32957
+ // LICENSE_CODE ZON
32958
+
32959
+
32960
+ /*jslint react:true*/
32961
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
32962
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
32963
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
32964
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
32965
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
32966
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
32967
+
32968
+
32969
+ var useMeasure = function useMeasure() {
32970
+ var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
32971
+ width: null,
32972
+ height: null
32973
+ }),
32974
+ _useState2 = _slicedToArray(_useState, 2),
32975
+ dimensions = _useState2[0],
32976
+ setDimensions = _useState2[1];
32977
+ var previousObserver = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
32978
+ var customRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (node) {
32979
+ if (previousObserver.current) {
32980
+ previousObserver.current.disconnect();
32981
+ previousObserver.current = null;
32982
+ }
32983
+ if ((node === null || node === void 0 ? void 0 : node.nodeType) === Node.ELEMENT_NODE) {
32984
+ var observer = new resize_observer_polyfill__WEBPACK_IMPORTED_MODULE_1__["default"](function (_ref) {
32985
+ var _ref2 = _slicedToArray(_ref, 1),
32986
+ entry = _ref2[0];
32987
+ if (entry && entry.borderBoxSize) {
32988
+ var _entry$borderBoxSize$ = entry.borderBoxSize[0],
32989
+ width = _entry$borderBoxSize$.inlineSize,
32990
+ height = _entry$borderBoxSize$.blockSize;
32991
+ setDimensions({
32992
+ width: width,
32993
+ height: height
32994
+ });
32995
+ }
32996
+ });
32997
+ observer.observe(node);
32998
+ previousObserver.current = observer;
32999
+ }
33000
+ }, []);
33001
+ return [customRef, dimensions];
33002
+ };
33003
+
33004
+ /***/ }),
33005
+
32940
33006
  /***/ "./src/hooks/use_outside_click.js":
32941
33007
  /*!****************************************!*\
32942
33008
  !*** ./src/hooks/use_outside_click.js ***!
@@ -33323,12 +33389,12 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
33323
33389
 
33324
33390
 
33325
33391
 
33326
- var InfoChip = function InfoChip(_ref) {
33327
- var _ref$variant = _ref.variant,
33328
- variant = _ref$variant === void 0 ? 'default' : _ref$variant,
33329
- text = _ref.text,
33330
- icon = _ref.icon,
33331
- rest = _objectWithoutProperties(_ref, _excluded);
33392
+ var InfoChip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forwardRef(function (props, ref) {
33393
+ var _props$variant = props.variant,
33394
+ variant = _props$variant === void 0 ? 'default' : _props$variant,
33395
+ text = props.text,
33396
+ icon = props.icon,
33397
+ rest = _objectWithoutProperties(props, _excluded);
33332
33398
  var iconColor = {
33333
33399
  success: 'text_success',
33334
33400
  alert: 'text_error',
@@ -33343,6 +33409,7 @@ var InfoChip = function InfoChip(_ref) {
33343
33409
  }[variant] || 'icon_accent';
33344
33410
  var commonProps = (0,_util__WEBPACK_IMPORTED_MODULE_6__.getCommonProps)(rest);
33345
33411
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(InfoChipWrapper, _extends({
33412
+ ref: ref,
33346
33413
  $variant: variant
33347
33414
  }, commonProps), icon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon__WEBPACK_IMPORTED_MODULE_3__.Icon, {
33348
33415
  size: "xxs",
@@ -33352,7 +33419,8 @@ var InfoChip = function InfoChip(_ref) {
33352
33419
  variant: "xs",
33353
33420
  color: textColor
33354
33421
  }, text));
33355
- };
33422
+ });
33423
+ InfoChip.displayName = 'InfoChip';
33356
33424
  InfoChip.propTypes = {
33357
33425
  variant: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['default', 'success', 'alert', 'warning', 'info']),
33358
33426
  text: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
@@ -33368,9 +33436,9 @@ var InfoChipWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_
33368
33436
  }).withConfig({
33369
33437
  displayName: "InfoChipWrapper",
33370
33438
  componentId: "sc-qtbg7s-0"
33371
- })(["background-color:", ";border-radius:24px;width:fit-content;min-height:24px;height:24px;"], function (_ref2) {
33372
- var color = _ref2.theme.color,
33373
- $variant = _ref2.$variant;
33439
+ })(["background-color:", ";border-radius:24px;width:fit-content;min-height:24px;height:24px;"], function (_ref) {
33440
+ var color = _ref.theme.color,
33441
+ $variant = _ref.$variant;
33374
33442
  return color[{
33375
33443
  success: 'bg_fill_success_secondary',
33376
33444
  alert: 'bg_fill_error_secondary',
@@ -37234,7 +37302,7 @@ var Phone = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forwardRef
37234
37302
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_shared__WEBPACK_IMPORTED_MODULE_4__.FieldWrapper, _extends({}, rest, {
37235
37303
  ref: ref,
37236
37304
  heightCalculationCallback: heightCalculationCallback,
37237
- autofocus: false,
37305
+ autoFocus: false,
37238
37306
  autoresize: false,
37239
37307
  verticalAlign: "center",
37240
37308
  Field: PhoneField,
@@ -37271,7 +37339,7 @@ Phone.propTypes = {
37271
37339
  helperText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
37272
37340
  inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
37273
37341
  size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg']),
37274
- autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
37342
+ autoFocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
37275
37343
  maxLength: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
37276
37344
  defaultCountry: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
37277
37345
  parsePhoneNumber: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func).isRequired,
@@ -37788,7 +37856,7 @@ __webpack_require__.r(__webpack_exports__);
37788
37856
 
37789
37857
  /*jslint react:true*/
37790
37858
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
37791
- var _excluded = ["id", "name", "value", "leftInnerContent", "leftOuterContent", "rightInnerContent", "rightOuterContent", "heightCalculationCallback", "Field", "fieldRef", "onChange", "onFocus", "onBlur", "onKeyDown", "placeholder", "disabled", "invalid", "autofocus", "helperText", "label", "labelIcon", "labelTooltip", "required", "necessityIndicator", "autoresize", "verticalAlign", "innerWrapper"];
37859
+ var _excluded = ["id", "name", "value", "leftInnerContent", "leftOuterContent", "rightInnerContent", "rightOuterContent", "heightCalculationCallback", "Field", "fieldRef", "onChange", "onFocus", "onBlur", "onKeyDown", "placeholder", "disabled", "invalid", "autoFocus", "helperText", "label", "labelIcon", "labelTooltip", "required", "necessityIndicator", "autoresize", "verticalAlign", "innerWrapper"];
37792
37860
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
37793
37861
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
37794
37862
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -37832,7 +37900,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
37832
37900
  placeholder = props.placeholder,
37833
37901
  disabled = props.disabled,
37834
37902
  invalid = props.invalid,
37835
- autofocus = props.autofocus,
37903
+ autoFocus = props.autoFocus,
37836
37904
  helperText = props.helperText,
37837
37905
  label = props.label,
37838
37906
  labelIcon = props.labelIcon,
@@ -37863,7 +37931,7 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
37863
37931
  };
37864
37932
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
37865
37933
  var _field$current2;
37866
- if (autofocus) field === null || field === void 0 || (_field$current2 = field.current) === null || _field$current2 === void 0 || _field$current2.focus();
37934
+ if (autoFocus) field === null || field === void 0 || (_field$current2 = field.current) === null || _field$current2 === void 0 || _field$current2.focus();
37867
37935
  }, []);
37868
37936
  (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
37869
37937
  // XXX vadimv: hack to autoresize textarea
@@ -37895,7 +37963,8 @@ var FieldWrapper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().for
37895
37963
  $verticalAlign: verticalAlign,
37896
37964
  onClick: onWrapperClick
37897
37965
  }, leftInnerContent, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Field, _extends({
37898
- onKeyDown: onKeyDown
37966
+ onKeyDown: onKeyDown,
37967
+ autoFocus: autoFocus
37899
37968
  }, props.inputProps, {
37900
37969
  ref: setFieldRefs,
37901
37970
  id: id,
@@ -37935,7 +38004,7 @@ FieldWrapper.propTypes = {
37935
38004
  })]),
37936
38005
  required: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
37937
38006
  necessityIndicator: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['asterisk', 'text']),
37938
- autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
38007
+ autoFocus: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
37939
38008
  heightCalculationCallback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
37940
38009
  autoresize: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
37941
38010
  verticalAlign: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
@@ -38222,7 +38291,7 @@ Textarea.propTypes = {
38222
38291
  fieldRef: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
38223
38292
  current: prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Element)
38224
38293
  })]),
38225
- autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
38294
+ autoFocus: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
38226
38295
  rows: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
38227
38296
  maxRows: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
38228
38297
  minLength: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
@@ -38334,7 +38403,7 @@ Textbox.propTypes = {
38334
38403
  helperText: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
38335
38404
  inputProps: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
38336
38405
  size: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(['xs', 'sm', 'md', 'lg']),
38337
- autofocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
38406
+ autoFocus: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
38338
38407
  fieldRef: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().func), prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape({
38339
38408
  current: prop_types__WEBPACK_IMPORTED_MODULE_1___default().instanceOf(Element)
38340
38409
  })]),
@@ -38427,7 +38496,7 @@ var ButtonAddInput = function ButtonAddInput(props) {
38427
38496
  }, [onButtonClick, onInputShow, setError, setShowInput]);
38428
38497
  if (showInput) {
38429
38498
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_textbox__WEBPACK_IMPORTED_MODULE_3__.Textbox, {
38430
- autofocus: true,
38499
+ autoFocus: true,
38431
38500
  className: (0,_util__WEBPACK_IMPORTED_MODULE_2__.classNames)(className, {
38432
38501
  input: true
38433
38502
  }),
@@ -39058,7 +39127,7 @@ Box.displayName = 'Box';
39058
39127
  var StyledBox = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div.withConfig({
39059
39128
  displayName: "StyledBox",
39060
39129
  componentId: "sc-pxszp5-0"
39061
- })(["height:", ";max-height:", ";min-height:", ";width:", ";max-width:", ";min-width:", ";padding:", ";padding-top:", ";padding-right:", ";padding-bottom:", ";padding-left:", ";margin:", ";margin-top:", ";margin-right:", ";margin-bottom:", ";margin-left:", ";flex:", ";flex-grow:", ";flex-shrink:", ";flex-basis:", ";justify-self:", ";align-self:", ";order:", ";box-shadow:", ";"], function (props) {
39130
+ })(["box-sizing:border-box;height:", ";max-height:", ";min-height:", ";width:", ";max-width:", ";min-width:", ";padding:", ";padding-top:", ";padding-right:", ";padding-bottom:", ";padding-left:", ";margin:", ";margin-top:", ";margin-right:", ";margin-bottom:", ";margin-left:", ";flex:", ";flex-grow:", ";flex-shrink:", ";flex-basis:", ";justify-self:", ";align-self:", ";order:", ";box-shadow:", ";"], function (props) {
39062
39131
  return props.$height;
39063
39132
  }, function (props) {
39064
39133
  return props.$maxHeight;
@@ -39865,7 +39934,11 @@ var MenuItemContainer = styled_components__WEBPACK_IMPORTED_MODULE_0___default()
39865
39934
  "use strict";
39866
39935
  __webpack_require__.r(__webpack_exports__);
39867
39936
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39868
- /* harmony export */ ModalBase: () => (/* binding */ ModalBase)
39937
+ /* harmony export */ ModalBase: () => (/* binding */ ModalBase),
39938
+ /* harmony export */ ModalBaseWrapper: () => (/* binding */ ModalBaseWrapper),
39939
+ /* harmony export */ ModalContentWrapper: () => (/* binding */ ModalContentWrapper),
39940
+ /* harmony export */ ModalFooterWrapper: () => (/* binding */ ModalFooterWrapper),
39941
+ /* harmony export */ ModalHeaderWrapper: () => (/* binding */ ModalHeaderWrapper)
39869
39942
  /* harmony export */ });
39870
39943
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types");
39871
39944
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
@@ -39873,13 +39946,12 @@ __webpack_require__.r(__webpack_exports__);
39873
39946
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
39874
39947
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
39875
39948
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
39876
- /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
39877
- /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
39949
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
39878
39950
  // LICENSE_CODE ZON
39879
39951
 
39880
39952
 
39881
39953
  /*jslint react:true*/
39882
- var _excluded = ["className", "header", "content", "footer", "size", "shadow", "borders"];
39954
+ var _excluded = ["className", "header", "content", "footer", "size", "shadow"];
39883
39955
  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); }
39884
39956
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
39885
39957
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
@@ -39887,102 +39959,38 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
39887
39959
 
39888
39960
 
39889
39961
 
39890
-
39891
39962
  var MODAL_WIDTHS = {
39892
39963
  sm: '360px',
39893
39964
  md: '500px',
39894
39965
  lg: '800px',
39895
39966
  full: '90vw'
39896
39967
  };
39897
- var StyledWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_3__.Box).withConfig({
39898
- displayName: "StyledWrapper",
39899
- componentId: "sc-1nggvo0-0"
39900
- })(["background-color:", ";border-radius:", ";display:flex;flex-direction:column;font-family:", ";min-width:200px;max-width:", ";width:", ";"], function (_ref) {
39901
- var color = _ref.theme.color;
39902
- return color.bg;
39903
- }, function (_ref2) {
39904
- var spacing = _ref2.theme.spacing;
39905
- return spacing['02'];
39906
- }, function (_ref3) {
39907
- var font_family = _ref3.theme.font_family;
39908
- return font_family.sans;
39909
- }, MODAL_WIDTHS.full, function (props) {
39910
- return MODAL_WIDTHS[props.$size];
39911
- });
39912
- var StyledHeaderWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_3__.Flex).attrs({
39913
- padding_top: '06',
39914
- padding_right: '05',
39915
- padding_bottom: '0',
39916
- padding_left: '07',
39917
- flex_direction: 'column',
39918
- row_gap: '03'
39919
- }).withConfig({
39920
- displayName: "StyledHeaderWrapper",
39921
- componentId: "sc-1nggvo0-1"
39922
- })([""]);
39923
- var StyledContentWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_3__.Box).attrs({
39924
- padding_right: '07',
39925
- padding_bottom: '08',
39926
- padding_left: '07'
39927
- }).withConfig({
39928
- displayName: "StyledContentWrapper",
39929
- componentId: "sc-1nggvo0-2"
39930
- })(["flex:1;overflow-y:auto;", " ", " ", ""], function (_ref4) {
39931
- var scrollbars = _ref4.theme.scrollbars;
39932
- return scrollbars.thin;
39933
- }, function (_ref5) {
39934
- var $borders = _ref5.$borders,
39935
- color = _ref5.theme.color;
39936
- return $borders && $borders.top ? "border-top: 1px solid ".concat(color.border_secondary, ";") : '';
39937
- }, function (_ref6) {
39938
- var $borders = _ref6.$borders,
39939
- color = _ref6.theme.color;
39940
- return $borders && $borders.bottom ? "border-bottom: 1px solid ".concat(color.border_secondary, ";") : '';
39941
- });
39942
- var StyledFooterWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_3__.Flex).attrs({
39943
- padding_top: '04',
39944
- padding_right: '07',
39945
- padding_bottom: '04',
39946
- padding_left: '07'
39947
- }).withConfig({
39948
- displayName: "StyledFooterWrapper",
39949
- componentId: "sc-1nggvo0-3"
39950
- })([""]);
39951
- var ModalBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_ref7, ref) {
39952
- var className = _ref7.className,
39953
- header = _ref7.header,
39954
- content = _ref7.content,
39955
- footer = _ref7.footer,
39956
- _ref7$size = _ref7.size,
39957
- size = _ref7$size === void 0 ? 'md' : _ref7$size,
39958
- _ref7$shadow = _ref7.shadow,
39959
- shadow = _ref7$shadow === void 0 ? 'md' : _ref7$shadow,
39960
- _ref7$borders = _ref7.borders,
39961
- borders = _ref7$borders === void 0 ? {
39962
- bottom: true
39963
- } : _ref7$borders,
39964
- rest = _objectWithoutProperties(_ref7, _excluded);
39965
- var margin_top = header ? '07' : '0';
39966
- var padding_top = header ? '0' : '07';
39967
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledWrapper, _extends({
39968
+ var ModalBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_ref, ref) {
39969
+ var className = _ref.className,
39970
+ header = _ref.header,
39971
+ content = _ref.content,
39972
+ footer = _ref.footer,
39973
+ _ref$size = _ref.size,
39974
+ size = _ref$size === void 0 ? 'md' : _ref$size,
39975
+ _ref$shadow = _ref.shadow,
39976
+ shadow = _ref$shadow === void 0 ? 'md' : _ref$shadow,
39977
+ rest = _objectWithoutProperties(_ref, _excluded);
39978
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ModalBaseWrapper, _extends({
39968
39979
  ref: ref,
39969
39980
  className: className
39970
- }, (0,_util__WEBPACK_IMPORTED_MODULE_4__.getCommonProps)(rest), {
39981
+ }, (0,_util__WEBPACK_IMPORTED_MODULE_3__.getCommonProps)(rest), {
39971
39982
  $size: size,
39972
- box_shadow: shadow
39973
- }), header && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledHeaderWrapper, {
39974
- className: (0,_util__WEBPACK_IMPORTED_MODULE_4__.classNames)(className, {
39983
+ $shadow: shadow
39984
+ }), header && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ModalHeaderWrapper, {
39985
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
39975
39986
  header: true
39976
39987
  })
39977
- }, header), content && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledContentWrapper, {
39978
- margin_top: margin_top,
39979
- padding_top: padding_top,
39980
- $borders: borders,
39981
- className: (0,_util__WEBPACK_IMPORTED_MODULE_4__.classNames)(className, {
39988
+ }, header), content && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ModalContentWrapper, {
39989
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
39982
39990
  content: true
39983
39991
  })
39984
- }, content), footer && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(StyledFooterWrapper, {
39985
- className: (0,_util__WEBPACK_IMPORTED_MODULE_4__.classNames)(className, {
39992
+ }, content), footer && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ModalFooterWrapper, {
39993
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_3__.classNames)(className, {
39986
39994
  footer: true
39987
39995
  })
39988
39996
  }, footer));
@@ -39990,11 +39998,103 @@ var ModalBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(f
39990
39998
  ModalBase.displayName = 'ModalBase';
39991
39999
  ModalBase.propTypes = {
39992
40000
  size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['sm', 'md', 'lg', 'full']),
39993
- shadow: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['none', 'sm', 'md', 'lg']),
40001
+ shadow: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['none', 'sm', 'md', 'lg', 'small', 'medium', 'large', 'primary', 'success', 'error']),
39994
40002
  header: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
39995
40003
  content: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
39996
40004
  footer: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node)
39997
40005
  };
40006
+ var ModalBaseWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
40007
+ displayName: "ModalBaseWrapper",
40008
+ componentId: "sc-1nggvo0-0"
40009
+ })(["display:flex;flex-direction:column;padding-top:", ";background-color:", ";border-radius:", ";font-family:", ";min-width:200px;max-width:", ";width:", ";box-shadow:", ";"], function (_ref2) {
40010
+ var spacing = _ref2.theme.spacing;
40011
+ return spacing['05'];
40012
+ }, function (_ref3) {
40013
+ var color = _ref3.theme.color;
40014
+ return color.bg;
40015
+ }, function (_ref4) {
40016
+ var spacing = _ref4.theme.spacing;
40017
+ return spacing['02'];
40018
+ }, function (_ref5) {
40019
+ var font_family = _ref5.theme.font_family;
40020
+ return font_family.sans;
40021
+ }, MODAL_WIDTHS.full, function (_ref6) {
40022
+ var $size = _ref6.$size;
40023
+ return MODAL_WIDTHS[$size];
40024
+ }, function (_ref7) {
40025
+ var $shadow = _ref7.$shadow,
40026
+ shadow = _ref7.theme.shadow;
40027
+ var _shadow = $shadow && {
40028
+ sm: 'small',
40029
+ small: 'small',
40030
+ md: 'medium',
40031
+ medium: 'medium',
40032
+ lg: 'large',
40033
+ large: 'large',
40034
+ primary: 'primary',
40035
+ success: 'success',
40036
+ error: 'error'
40037
+ }[$shadow];
40038
+ if (!_shadow) return;
40039
+ return shadow[_shadow];
40040
+ });
40041
+ var ModalHeaderWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
40042
+ displayName: "ModalHeaderWrapper",
40043
+ componentId: "sc-1nggvo0-1"
40044
+ })(["display:flex;flex-direction:column;padding-top:", ";padding-right:", ";padding-bottom:", ";padding-left:", ";gap:", ";"], function (_ref8) {
40045
+ var spacing = _ref8.theme.spacing;
40046
+ return spacing['03'];
40047
+ }, function (_ref9) {
40048
+ var spacing = _ref9.theme.spacing;
40049
+ return spacing['05'];
40050
+ }, function (_ref10) {
40051
+ var spacing = _ref10.theme.spacing;
40052
+ return spacing['03'];
40053
+ }, function (_ref11) {
40054
+ var spacing = _ref11.theme.spacing;
40055
+ return spacing['07'];
40056
+ }, function (_ref12) {
40057
+ var spacing = _ref12.theme.spacing;
40058
+ return spacing['03'];
40059
+ });
40060
+ var ModalContentWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
40061
+ displayName: "ModalContentWrapper",
40062
+ componentId: "sc-1nggvo0-2"
40063
+ })(["flex:1;overflow-y:auto;padding-top:", ";padding-right:", ";padding-bottom:", ";padding-left:", ";", ""], function (_ref13) {
40064
+ var spacing = _ref13.theme.spacing;
40065
+ return spacing['06'];
40066
+ }, function (_ref14) {
40067
+ var spacing = _ref14.theme.spacing;
40068
+ return spacing['07'];
40069
+ }, function (_ref15) {
40070
+ var spacing = _ref15.theme.spacing;
40071
+ return spacing['08'];
40072
+ }, function (_ref16) {
40073
+ var spacing = _ref16.theme.spacing;
40074
+ return spacing['07'];
40075
+ }, function (_ref17) {
40076
+ var scrollbars = _ref17.theme.scrollbars;
40077
+ return scrollbars.thin;
40078
+ });
40079
+ var ModalFooterWrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
40080
+ displayName: "ModalFooterWrapper",
40081
+ componentId: "sc-1nggvo0-3"
40082
+ })(["padding-top:", ";padding-right:", ";padding-bottom:", ";padding-left:", ";border-top:1px solid ", ";"], function (_ref18) {
40083
+ var spacing = _ref18.theme.spacing;
40084
+ return spacing['04'];
40085
+ }, function (_ref19) {
40086
+ var spacing = _ref19.theme.spacing;
40087
+ return spacing['07'];
40088
+ }, function (_ref20) {
40089
+ var spacing = _ref20.theme.spacing;
40090
+ return spacing['04'];
40091
+ }, function (_ref21) {
40092
+ var spacing = _ref21.theme.spacing;
40093
+ return spacing['07'];
40094
+ }, function (_ref22) {
40095
+ var color = _ref22.theme.color;
40096
+ return color.border_secondary;
40097
+ });
39998
40098
 
39999
40099
  /***/ }),
40000
40100
 
@@ -40008,19 +40108,22 @@ ModalBase.propTypes = {
40008
40108
  __webpack_require__.r(__webpack_exports__);
40009
40109
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
40010
40110
  /* harmony export */ Base: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_0__.ModalBase),
40011
- /* harmony export */ Button: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_2__.ModalButton),
40012
- /* harmony export */ CloseButton: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_2__.CloseButton),
40013
- /* harmony export */ Footer: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_2__.ModalFooter),
40014
- /* harmony export */ General: () => (/* reexport safe */ _modal__WEBPACK_IMPORTED_MODULE_1__.General),
40015
- /* harmony export */ Header: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_2__.ModalHeader),
40016
- /* harmony export */ Popup: () => (/* reexport safe */ _modal__WEBPACK_IMPORTED_MODULE_1__.Popup),
40017
- /* harmony export */ Title: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_2__.ModalTitle),
40018
- /* harmony export */ withBackdrop: () => (/* reexport safe */ _with_backdrop__WEBPACK_IMPORTED_MODULE_3__.withBackdrop)
40111
+ /* harmony export */ Button: () => (/* reexport safe */ _modal_button__WEBPACK_IMPORTED_MODULE_1__.ModalButton),
40112
+ /* harmony export */ CloseButton: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_3__.CloseButton),
40113
+ /* harmony export */ Footer: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_3__.ModalFooter),
40114
+ /* harmony export */ General: () => (/* reexport safe */ _modal__WEBPACK_IMPORTED_MODULE_2__.General),
40115
+ /* harmony export */ Header: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_3__.ModalHeader),
40116
+ /* harmony export */ Modal2: () => (/* reexport safe */ _modal2_js__WEBPACK_IMPORTED_MODULE_5__.Modal2),
40117
+ /* harmony export */ Popup: () => (/* reexport safe */ _modal__WEBPACK_IMPORTED_MODULE_2__.Popup),
40118
+ /* harmony export */ Title: () => (/* reexport safe */ _util__WEBPACK_IMPORTED_MODULE_3__.ModalTitle),
40119
+ /* harmony export */ withBackdrop: () => (/* reexport safe */ _with_backdrop__WEBPACK_IMPORTED_MODULE_4__.withBackdrop)
40019
40120
  /* harmony export */ });
40020
40121
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/modal/base.js");
40021
- /* harmony import */ var _modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modal */ "./src/modal/modal.js");
40022
- /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "./src/modal/util.js");
40023
- /* harmony import */ var _with_backdrop__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./with_backdrop */ "./src/modal/with_backdrop.js");
40122
+ /* harmony import */ var _modal_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modal_button */ "./src/modal/modal_button.js");
40123
+ /* harmony import */ var _modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modal */ "./src/modal/modal.js");
40124
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./util */ "./src/modal/util.js");
40125
+ /* harmony import */ var _with_backdrop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./with_backdrop */ "./src/modal/with_backdrop.js");
40126
+ /* harmony import */ var _modal2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modal2.js */ "./src/modal/modal2.js");
40024
40127
  // LICENSE_CODE ZON
40025
40128
 
40026
40129
 
@@ -40030,6 +40133,8 @@ __webpack_require__.r(__webpack_exports__);
40030
40133
 
40031
40134
 
40032
40135
 
40136
+
40137
+
40033
40138
  /***/ }),
40034
40139
 
40035
40140
  /***/ "./src/modal/modal.js":
@@ -40118,6 +40223,313 @@ General.propTypes = {
40118
40223
  var Popup = (0,_with_backdrop__WEBPACK_IMPORTED_MODULE_4__.withBackdrop)(General);
40119
40224
 
40120
40225
 
40226
+ /***/ }),
40227
+
40228
+ /***/ "./src/modal/modal2.js":
40229
+ /*!*****************************!*\
40230
+ !*** ./src/modal/modal2.js ***!
40231
+ \*****************************/
40232
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
40233
+
40234
+ "use strict";
40235
+ __webpack_require__.r(__webpack_exports__);
40236
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
40237
+ /* harmony export */ Modal2: () => (/* binding */ Modal2)
40238
+ /* harmony export */ });
40239
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types");
40240
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
40241
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
40242
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
40243
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
40244
+ /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
40245
+ /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
40246
+ /* harmony import */ var _icon_button_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icon_button.js */ "./src/icon_button.js");
40247
+ /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
40248
+ /* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../hooks */ "./src/hooks/index.js");
40249
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
40250
+ /* harmony import */ var _base_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./base.js */ "./src/modal/base.js");
40251
+ /* harmony import */ var _modal_button_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modal_button.js */ "./src/modal/modal_button.js");
40252
+ /* harmony import */ var _with_backdrop_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./with_backdrop.js */ "./src/modal/with_backdrop.js");
40253
+ // LICENSE_CODE ZON
40254
+
40255
+
40256
+ /*jslint react:true*/
40257
+ var _excluded = ["show", "title", "subtitle", "children", "closable", "closeOnOutsideClick", "onClose", "footer", "okLabel", "onOk", "okProps", "cancelLabel", "onCancel", "cancelProps", "size", "footerVariant"],
40258
+ _excluded2 = ["className", "classNamePrefix", "header", "content", "footer", "footerVariant", "size", "parentDimensions"];
40259
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
40260
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
40261
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
40262
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
40263
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
40264
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
40265
+ 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); }
40266
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
40267
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
40268
+
40269
+
40270
+
40271
+
40272
+
40273
+
40274
+
40275
+
40276
+
40277
+
40278
+
40279
+ var Modal2 = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_ref, ref) {
40280
+ var show = _ref.show,
40281
+ title = _ref.title,
40282
+ subtitle = _ref.subtitle,
40283
+ children = _ref.children,
40284
+ closable = _ref.closable,
40285
+ closeOnOutsideClick = _ref.closeOnOutsideClick,
40286
+ onClose = _ref.onClose,
40287
+ footer = _ref.footer,
40288
+ _ref$okLabel = _ref.okLabel,
40289
+ okLabel = _ref$okLabel === void 0 ? 'OK' : _ref$okLabel,
40290
+ onOk = _ref.onOk,
40291
+ okProps = _ref.okProps,
40292
+ _ref$cancelLabel = _ref.cancelLabel,
40293
+ cancelLabel = _ref$cancelLabel === void 0 ? 'Cancel' : _ref$cancelLabel,
40294
+ onCancel = _ref.onCancel,
40295
+ cancelProps = _ref.cancelProps,
40296
+ _ref$size = _ref.size,
40297
+ size = _ref$size === void 0 ? 'md' : _ref$size,
40298
+ _ref$footerVariant = _ref.footerVariant,
40299
+ footerVariant = _ref$footerVariant === void 0 ? 'horizontal' : _ref$footerVariant,
40300
+ rest = _objectWithoutProperties(_ref, _excluded);
40301
+ var header = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex, {
40302
+ align_items: "center",
40303
+ justify_content: "space-between",
40304
+ width: "100%"
40305
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_3__.Header, {
40306
+ color: "text"
40307
+ }, title), !!closable && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button_js__WEBPACK_IMPORTED_MODULE_4__.IconButton, {
40308
+ size: "xs",
40309
+ icon: "CloseSmall",
40310
+ color: "icon",
40311
+ onClick: onClose,
40312
+ "data-testid": "modal_header_close_button"
40313
+ })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_3__.Label, {
40314
+ padding_right: "04"
40315
+ }, subtitle));
40316
+ var renderCancel = !!(onCancel && cancelLabel);
40317
+ var renderOk = !!(onOk && okLabel);
40318
+ var renderFooter = renderOk || renderCancel;
40319
+ var _footer = (0,_util__WEBPACK_IMPORTED_MODULE_7__.firstDefined)(footer, renderFooter && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, renderCancel && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_modal_button_js__WEBPACK_IMPORTED_MODULE_9__.ModalButton, _extends({
40320
+ size: "sm",
40321
+ text: cancelLabel,
40322
+ hotKey: "Escape",
40323
+ variant: "secondary",
40324
+ onClick: onCancel
40325
+ }, cancelProps, {
40326
+ "data-testid": "modal_footer_cancel_button"
40327
+ })), renderOk && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_modal_button_js__WEBPACK_IMPORTED_MODULE_9__.ModalButton, _extends({
40328
+ size: "sm",
40329
+ text: okLabel,
40330
+ hotKey: "Enter",
40331
+ variant: "primary",
40332
+ onClick: onOk
40333
+ }, okProps, {
40334
+ "data-testid": "modal_footer_ok_button"
40335
+ }))));
40336
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ModalWithBackdrop, _extends({
40337
+ ref: ref,
40338
+ "data-testid": "modal_general",
40339
+ show: show,
40340
+ size: size,
40341
+ onOutsideClick: closeOnOutsideClick && onClose,
40342
+ header: header,
40343
+ content: children,
40344
+ footer: _footer,
40345
+ footerVariant: footerVariant
40346
+ }, rest));
40347
+ });
40348
+ Modal2.displayName = 'Modal2';
40349
+ Modal2.propTypes = {
40350
+ className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
40351
+ classNamePrefix: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
40352
+ size: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['sm', 'md', 'lg', 'full']),
40353
+ footerVariant: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['vertical', 'horizontal', 'horizontal_full']),
40354
+ show: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool).isRequired,
40355
+ closable: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
40356
+ closeOnOutsideClick: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
40357
+ title: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
40358
+ subtitle: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
40359
+ footer: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().node)),
40360
+ onClose: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
40361
+ onBack: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
40362
+ okLabel: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
40363
+ onOk: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
40364
+ okProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
40365
+ cancelLabel: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().node),
40366
+ onCancel: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
40367
+ cancelProps: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
40368
+ };
40369
+ Modal2.Button = _modal_button_js__WEBPACK_IMPORTED_MODULE_9__.ModalButton;
40370
+
40371
+ /**
40372
+ * Internal part of modal without backdrop
40373
+ */
40374
+ var ModalPane = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (_ref2, ref) {
40375
+ var className = _ref2.className,
40376
+ classNamePrefix = _ref2.classNamePrefix,
40377
+ header = _ref2.header,
40378
+ content = _ref2.content,
40379
+ footer = _ref2.footer,
40380
+ footerVariant = _ref2.footerVariant,
40381
+ size = _ref2.size,
40382
+ parentDimensions = _ref2.parentDimensions,
40383
+ rest = _objectWithoutProperties(_ref2, _excluded2);
40384
+ var _useMeasure = (0,_hooks__WEBPACK_IMPORTED_MODULE_6__.useMeasure)(),
40385
+ _useMeasure2 = _slicedToArray(_useMeasure, 2),
40386
+ headerRef = _useMeasure2[0],
40387
+ headerHeight = _useMeasure2[1].height;
40388
+ var _useMeasure3 = (0,_hooks__WEBPACK_IMPORTED_MODULE_6__.useMeasure)(),
40389
+ _useMeasure4 = _slicedToArray(_useMeasure3, 2),
40390
+ footerRef = _useMeasure4[0],
40391
+ footerHeight = _useMeasure4[1].height;
40392
+ var minHeight = 32 + (headerHeight || 0) + (footerHeight || 0);
40393
+ var maxHeight = parentDimensions !== null && parentDimensions !== void 0 && parentDimensions.height ? "".concat(Math.max(parentDimensions.height - 100, minHeight), "px") : undefined;
40394
+ console.log({
40395
+ headerHeight: headerHeight,
40396
+ footerHeight: footerHeight,
40397
+ minHeight: minHeight,
40398
+ maxHeight: maxHeight
40399
+ });
40400
+ var FooterLayout = footerLayout[footerVariant] || FooterHorizontal;
40401
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_base_js__WEBPACK_IMPORTED_MODULE_8__.ModalBaseWrapper, _extends({
40402
+ ref: ref,
40403
+ className: className
40404
+ }, (0,_util__WEBPACK_IMPORTED_MODULE_7__.getCommonProps)(rest), {
40405
+ $size: size,
40406
+ $shadow: "large",
40407
+ $minHeight: "".concat(minHeight, "px"),
40408
+ $maxHeight: maxHeight
40409
+ }), header && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_base_js__WEBPACK_IMPORTED_MODULE_8__.ModalHeaderWrapper, {
40410
+ ref: headerRef,
40411
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_7__.classNames)(classNamePrefix, {
40412
+ header: true
40413
+ })
40414
+ }, header), content && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_base_js__WEBPACK_IMPORTED_MODULE_8__.ModalContentWrapper, {
40415
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_7__.classNames)(classNamePrefix, {
40416
+ content: true
40417
+ })
40418
+ }, content), footer && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_base_js__WEBPACK_IMPORTED_MODULE_8__.ModalFooterWrapper, {
40419
+ ref: footerRef,
40420
+ className: (0,_util__WEBPACK_IMPORTED_MODULE_7__.classNames)(classNamePrefix, {
40421
+ footer: true
40422
+ })
40423
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(FooterLayout, null, footer)));
40424
+ });
40425
+ ModalPane.displayName = 'ModalPane';
40426
+
40427
+ /**
40428
+ * Internal modal wrapped with withBackdrop for
40429
+ * showing and hidding with animation
40430
+ */
40431
+ var ModalWithBackdrop = (0,_with_backdrop_js__WEBPACK_IMPORTED_MODULE_10__.withBackdrop)(ModalPane);
40432
+
40433
+ // victorf: FIX backdrop vertical alignment with
40434
+ // top: 0;
40435
+ // transform: translate(0, ${$show=>$show ? '0': 'calc(50vh - 50%)'});
40436
+
40437
+ var FooterHorizontal = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex).attrs({
40438
+ gap: '04',
40439
+ align_items: 'center',
40440
+ justify_content: 'flex-end'
40441
+ }).withConfig({
40442
+ displayName: "FooterHorizontal",
40443
+ componentId: "sc-1p3wums-0"
40444
+ })([""]);
40445
+ var FooterFullHorizontal = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex).attrs({
40446
+ gap: '04',
40447
+ align_items: 'space-between'
40448
+ }).withConfig({
40449
+ displayName: "FooterFullHorizontal",
40450
+ componentId: "sc-1p3wums-1"
40451
+ })(["button{width:100%;}"]);
40452
+ var FooterVertical = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex).attrs({
40453
+ gap: '04',
40454
+ flex_direction: 'column'
40455
+ }).withConfig({
40456
+ displayName: "FooterVertical",
40457
+ componentId: "sc-1p3wums-2"
40458
+ })([""]);
40459
+ var footerLayout = {
40460
+ horizontal: FooterHorizontal,
40461
+ horizontal_full: FooterFullHorizontal,
40462
+ vertical: FooterVertical
40463
+ };
40464
+
40465
+ /***/ }),
40466
+
40467
+ /***/ "./src/modal/modal_button.js":
40468
+ /*!***********************************!*\
40469
+ !*** ./src/modal/modal_button.js ***!
40470
+ \***********************************/
40471
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
40472
+
40473
+ "use strict";
40474
+ __webpack_require__.r(__webpack_exports__);
40475
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
40476
+ /* harmony export */ ModalButton: () => (/* binding */ ModalButton)
40477
+ /* harmony export */ });
40478
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "prop-types");
40479
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
40480
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
40481
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
40482
+ /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../button */ "./src/button/index.js");
40483
+ /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../util */ "./src/util/index.js");
40484
+ // LICENSE_CODE ZON
40485
+
40486
+
40487
+ /*jslint react:true*/
40488
+ var _excluded = ["onClick", "hotKey", "size"];
40489
+ 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); }
40490
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
40491
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
40492
+
40493
+
40494
+
40495
+
40496
+ var ModalButton = function ModalButton(_ref) {
40497
+ var onClick = _ref.onClick,
40498
+ hotKey = _ref.hotKey,
40499
+ _ref$size = _ref.size,
40500
+ size = _ref$size === void 0 ? 'sm' : _ref$size,
40501
+ rest = _objectWithoutProperties(_ref, _excluded);
40502
+ var icon = (0,_util__WEBPACK_IMPORTED_MODULE_3__.firstDefined)(rest.icon, getHotKeyIcon(hotKey));
40503
+ var iconPlacement = (0,_util__WEBPACK_IMPORTED_MODULE_3__.firstDefined)(rest.iconPlacement, getHotKeyIcon(hotKey) ? 'right' : undefined);
40504
+ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
40505
+ var _document$activeEleme;
40506
+ (_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 || _document$activeEleme.blur();
40507
+ if (!hotKey) return;
40508
+ var handle_key_press = function handle_key_press(e) {
40509
+ if (e.key.toLowerCase() == hotKey.toLowerCase()) onClick === null || onClick === void 0 || onClick(e);
40510
+ };
40511
+ window.addEventListener('keydown', handle_key_press);
40512
+ return function () {
40513
+ return window.removeEventListener('keydown', handle_key_press);
40514
+ };
40515
+ }, [hotKey]);
40516
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_button__WEBPACK_IMPORTED_MODULE_2__.Button, _extends({
40517
+ onClick: onClick
40518
+ }, rest, {
40519
+ iconPlacement: iconPlacement,
40520
+ icon: icon,
40521
+ size: size
40522
+ }));
40523
+ };
40524
+ ModalButton.propTypes = {
40525
+ hotKey: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(['Enter', 'Escape'])
40526
+ };
40527
+ var getHotKeyIcon = function getHotKeyIcon(hotKey) {
40528
+ if (typeof hotKey != 'string') return;
40529
+ if (hotKey.toLowerCase() == 'enter') return 'KeyEnter';
40530
+ if (hotKey.toLowerCase() == 'escape') return 'KeyEscape';
40531
+ };
40532
+
40121
40533
  /***/ }),
40122
40534
 
40123
40535
  /***/ "./src/modal/util.js":
@@ -40131,7 +40543,6 @@ __webpack_require__.r(__webpack_exports__);
40131
40543
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
40132
40544
  /* harmony export */ ButtonsGroup: () => (/* binding */ ButtonsGroup),
40133
40545
  /* harmony export */ CloseButton: () => (/* binding */ CloseButton),
40134
- /* harmony export */ ModalButton: () => (/* binding */ ModalButton),
40135
40546
  /* harmony export */ ModalFooter: () => (/* binding */ ModalFooter),
40136
40547
  /* harmony export */ ModalHeader: () => (/* binding */ ModalHeader),
40137
40548
  /* harmony export */ ModalSubtitle: () => (/* binding */ ModalSubtitle),
@@ -40143,17 +40554,14 @@ __webpack_require__.r(__webpack_exports__);
40143
40554
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
40144
40555
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! styled-components */ "styled-components");
40145
40556
  /* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_2__);
40146
- /* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../button */ "./src/button/index.js");
40147
- /* harmony import */ var _icon_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icon_button */ "./src/icon_button.js");
40148
- /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
40149
- /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
40557
+ /* harmony import */ var _icon_button_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icon_button.js */ "./src/icon_button.js");
40558
+ /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../layout */ "./src/layout/index.js");
40559
+ /* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../typography */ "./src/typography/index.js");
40560
+ /* harmony import */ var _modal_button_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modal_button.js */ "./src/modal/modal_button.js");
40150
40561
  // LICENSE_CODE ZON
40151
40562
 
40152
40563
 
40153
40564
  /*jslint react:true*/
40154
- var _excluded = ["onClick", "hotKey"];
40155
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
40156
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
40157
40565
  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); }
40158
40566
 
40159
40567
 
@@ -40165,11 +40573,11 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
40165
40573
  var ModalTitle = function ModalTitle(_ref) {
40166
40574
  var text = _ref.text,
40167
40575
  children = _ref.children;
40168
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_6__.Header, {
40576
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_typography__WEBPACK_IMPORTED_MODULE_5__.Header, {
40169
40577
  color: "text"
40170
40578
  }, children !== null && children !== void 0 ? children : text);
40171
40579
  };
40172
- var ModalSubtitle = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_6__.Label).withConfig({
40580
+ var ModalSubtitle = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_typography__WEBPACK_IMPORTED_MODULE_5__.Label).withConfig({
40173
40581
  displayName: "ModalSubtitle",
40174
40582
  componentId: "sc-1p9nv3u-0"
40175
40583
  })(["padding-right:", ";color:", ";"], function (_ref2) {
@@ -40180,48 +40588,24 @@ var ModalSubtitle = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_ty
40180
40588
  return color.text_secondary;
40181
40589
  });
40182
40590
  var CloseButton = function CloseButton(props) {
40183
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button__WEBPACK_IMPORTED_MODULE_4__.IconButton, _extends({
40591
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_icon_button_js__WEBPACK_IMPORTED_MODULE_3__.IconButton, _extends({
40184
40592
  icon: "CloseSmall",
40185
40593
  size: "xs"
40186
40594
  }, props));
40187
40595
  };
40188
- var ButtonsGroup = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex).attrs({
40596
+ var ButtonsGroup = styled_components__WEBPACK_IMPORTED_MODULE_2___default()(_layout__WEBPACK_IMPORTED_MODULE_4__.Flex).attrs({
40189
40597
  gap: '04',
40190
40598
  align_items: 'center'
40191
40599
  }).withConfig({
40192
40600
  displayName: "ButtonsGroup",
40193
40601
  componentId: "sc-1p9nv3u-1"
40194
40602
  })([""]);
40195
- var ModalButton = function ModalButton(_ref4) {
40196
- var onClick = _ref4.onClick,
40197
- hotKey = _ref4.hotKey,
40198
- rest = _objectWithoutProperties(_ref4, _excluded);
40199
- var icon = hotKey == 'enter' ? 'KeyEnter' : 'KeyEscape';
40200
- (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
40201
- var _document$activeEleme;
40202
- (_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 || _document$activeEleme.blur();
40203
- if (!hotKey) return;
40204
- var handle_key_press = function handle_key_press(e) {
40205
- if (e.key.toLowerCase() == hotKey.toLowerCase()) onClick === null || onClick === void 0 || onClick();
40206
- };
40207
- window.addEventListener('keydown', handle_key_press);
40208
- return function () {
40209
- return window.removeEventListener('keydown', handle_key_press);
40210
- };
40211
- }, []);
40212
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_button__WEBPACK_IMPORTED_MODULE_3__.Button, _extends({
40213
- size: "sm",
40214
- onClick: onClick,
40215
- iconPlacement: "right",
40216
- icon: hotKey && icon
40217
- }, rest));
40218
- };
40219
- var ModalHeader = function ModalHeader(_ref5) {
40220
- var title = _ref5.title,
40221
- subtitle = _ref5.subtitle,
40222
- onCancel = _ref5.onCancel,
40223
- cancelDisabled = _ref5.cancelDisabled;
40224
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex, {
40603
+ var ModalHeader = function ModalHeader(_ref4) {
40604
+ var title = _ref4.title,
40605
+ subtitle = _ref4.subtitle,
40606
+ onCancel = _ref4.onCancel,
40607
+ cancelDisabled = _ref4.cancelDisabled;
40608
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_4__.Flex, {
40225
40609
  align_items: "center",
40226
40610
  justify_content: "space-between",
40227
40611
  width: "100%"
@@ -40236,31 +40620,31 @@ ModalHeader.propTypes = {
40236
40620
  onCancel: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
40237
40621
  cancelDisabled: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)
40238
40622
  };
40239
- var ModalFooter = function ModalFooter(_ref6) {
40240
- var _ref6$okLabel = _ref6.okLabel,
40241
- okLabel = _ref6$okLabel === void 0 ? 'OK' : _ref6$okLabel,
40242
- _ref6$cancelLabel = _ref6.cancelLabel,
40243
- cancelLabel = _ref6$cancelLabel === void 0 ? 'Cancel' : _ref6$cancelLabel,
40244
- onOk = _ref6.onOk,
40245
- onCancel = _ref6.onCancel,
40246
- okDisabled = _ref6.okDisabled,
40247
- cancelDisabled = _ref6.cancelDisabled;
40248
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_5__.Flex, {
40623
+ var ModalFooter = function ModalFooter(_ref5) {
40624
+ var _ref5$okLabel = _ref5.okLabel,
40625
+ okLabel = _ref5$okLabel === void 0 ? 'OK' : _ref5$okLabel,
40626
+ _ref5$cancelLabel = _ref5.cancelLabel,
40627
+ cancelLabel = _ref5$cancelLabel === void 0 ? 'Cancel' : _ref5$cancelLabel,
40628
+ onOk = _ref5.onOk,
40629
+ onCancel = _ref5.onCancel,
40630
+ okDisabled = _ref5.okDisabled,
40631
+ cancelDisabled = _ref5.cancelDisabled;
40632
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_layout__WEBPACK_IMPORTED_MODULE_4__.Flex, {
40249
40633
  width: "100%",
40250
40634
  justify_content: "flex-end"
40251
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ButtonsGroup, null, onCancel && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ModalButton, {
40635
+ }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ButtonsGroup, null, onCancel && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_modal_button_js__WEBPACK_IMPORTED_MODULE_6__.ModalButton, {
40252
40636
  text: cancelLabel,
40253
40637
  variant: "secondary",
40254
40638
  onClick: onCancel,
40255
40639
  disabled: cancelDisabled,
40256
- hotKey: "escape",
40640
+ hotKey: "Escape",
40257
40641
  "data-testid": "modal_footer_cancel_button"
40258
- }), onOk && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(ModalButton, {
40642
+ }), onOk && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_modal_button_js__WEBPACK_IMPORTED_MODULE_6__.ModalButton, {
40259
40643
  text: okLabel,
40260
40644
  variant: "primary",
40261
40645
  onClick: onOk,
40262
40646
  disabled: okDisabled,
40263
- hotKey: "enter",
40647
+ hotKey: "Enter",
40264
40648
  "data-testid": "modal_footer_ok_button"
40265
40649
  })));
40266
40650
  };
@@ -40640,7 +41024,7 @@ Snackbar.propTypes = {
40640
41024
  var Wrapper = styled_components__WEBPACK_IMPORTED_MODULE_2___default().div.withConfig({
40641
41025
  displayName: "Wrapper",
40642
41026
  componentId: "sc-6ku6mu-0"
40643
- })(["display:flex;flex-direction:row;justify-content:center;align-items:flex-start;padding:16px;gap:16px;border-radius:4px;background-color:", ";"], function (_ref2) {
41027
+ })(["display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;padding:16px;gap:16px;border-radius:4px;background-color:", ";"], function (_ref2) {
40644
41028
  var $type = _ref2.$type,
40645
41029
  color = _ref2.theme.color;
40646
41030
  return {
@@ -44555,6 +44939,9 @@ var RowRenderer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().memo
44555
44939
  var _style = _objectSpread(_objectSpread({}, style), {}, {
44556
44940
  padding: '0.3px 0'
44557
44941
  });
44942
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
44943
+ return cache.current.clear(index);
44944
+ }, [row]);
44558
44945
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_virtualized__WEBPACK_IMPORTED_MODULE_1__.CellMeasurer, {
44559
44946
  cache: cache.current,
44560
44947
  parent: parent,
@@ -44613,13 +45000,14 @@ var renderClone = function renderClone(rows, renderRow) {
44613
45000
  });
44614
45001
  };
44615
45002
  };
44616
- var listRefHandler = function listRefHandler(droppableProvided, setListRef) {
45003
+ var listRefHandler = function listRefHandler(setList, setListDOMRef, droppableProvided) {
44617
45004
  return function (ref) {
44618
45005
  var _ref$Grid;
44619
45006
  if (!ref) return;
45007
+ setList(ref);
44620
45008
  var element = ref === null || ref === void 0 || (_ref$Grid = ref.Grid) === null || _ref$Grid === void 0 ? void 0 : _ref$Grid._scrollingContainer;
44621
45009
  if (element instanceof window.HTMLElement) {
44622
- setListRef(element === null || element === void 0 ? void 0 : element.firstChild);
45010
+ setListDOMRef(element === null || element === void 0 ? void 0 : element.firstChild);
44623
45011
  droppableProvided.innerRef(element);
44624
45012
  }
44625
45013
  };
@@ -44633,21 +45021,28 @@ var VirtualizedBodyComp = function VirtualizedBodyComp(props) {
44633
45021
  maxHeight = _useTableContext.scrollHeight;
44634
45022
  var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),
44635
45023
  _useState2 = _slicedToArray(_useState, 2),
44636
- listRef = _useState2[0],
44637
- setListRef = _useState2[1];
44638
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),
45024
+ listDOMRef = _useState2[0],
45025
+ setListDOMRef = _useState2[1];
45026
+ var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(),
44639
45027
  _useState4 = _slicedToArray(_useState3, 2),
44640
- _height = _useState4[0],
44641
- setHeight = _useState4[1];
45028
+ list = _useState4[0],
45029
+ setList = _useState4[1];
45030
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
45031
+ return list === null || list === void 0 ? void 0 : list.recomputeRowHeights();
45032
+ }, [rows.length]);
45033
+ var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),
45034
+ _useState6 = _slicedToArray(_useState5, 2),
45035
+ _height = _useState6[0],
45036
+ setHeight = _useState6[1];
44642
45037
  var _useRowHoverActions = (0,_row_hover_actions__WEBPACK_IMPORTED_MODULE_5__.useRowHoverActions)(),
44643
45038
  renderHoverActions = _useRowHoverActions.renderHoverActions,
44644
45039
  rowHoverEvents = _useRowHoverActions.rowHoverEvents;
44645
45040
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
44646
- if (listRef) listRef.style.overflow = 'unset';
45041
+ if (listDOMRef) listDOMRef.style.overflow = 'unset';
44647
45042
  setHeight(rows.reduce(function (acc, row, index) {
44648
45043
  return acc += measurerCache.current.getHeight(index, 0);
44649
45044
  }, 0));
44650
- }, [listRef, rows]);
45045
+ }, [listDOMRef, rows]);
44651
45046
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_beautiful_dnd__WEBPACK_IMPORTED_MODULE_6__.Droppable, _extends({}, droppableProps, {
44652
45047
  mode: "virtual",
44653
45048
  renderClone: renderClone(rows, renderRow)
@@ -44664,12 +45059,12 @@ var VirtualizedBodyComp = function VirtualizedBodyComp(props) {
44664
45059
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(StyledList, {
44665
45060
  width: width,
44666
45061
  height: height,
44667
- overscanRowCount: 7,
45062
+ overscanRowCount: 13,
44668
45063
  estimatedRowSize: 30,
44669
45064
  rowHeight: measurerCache.current.rowHeight,
44670
45065
  rowCount: rows.length,
44671
45066
  deferredMeasurementCache: measurerCache.current,
44672
- ref: listRefHandler(provided, setListRef),
45067
+ ref: listRefHandler(setList, setListDOMRef, provided),
44673
45068
  rowRenderer: rowRenderer(rows, measurerCache, renderRow, rowHoverEvents)
44674
45069
  });
44675
45070
  })), renderHoverActions());
@@ -85573,6 +85968,949 @@ function applyMiddleware() {
85573
85968
 
85574
85969
 
85575
85970
 
85971
+ /***/ }),
85972
+
85973
+ /***/ "./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js":
85974
+ /*!*************************************************************************!*\
85975
+ !*** ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js ***!
85976
+ \*************************************************************************/
85977
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
85978
+
85979
+ "use strict";
85980
+ __webpack_require__.r(__webpack_exports__);
85981
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
85982
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
85983
+ /* harmony export */ });
85984
+ /**
85985
+ * A collection of shims that provide minimal functionality of the ES6 collections.
85986
+ *
85987
+ * These implementations are not meant to be used outside of the ResizeObserver
85988
+ * modules as they cover only a limited range of use cases.
85989
+ */
85990
+ /* eslint-disable require-jsdoc, valid-jsdoc */
85991
+ var MapShim = (function () {
85992
+ if (typeof Map !== 'undefined') {
85993
+ return Map;
85994
+ }
85995
+ /**
85996
+ * Returns index in provided array that matches the specified key.
85997
+ *
85998
+ * @param {Array<Array>} arr
85999
+ * @param {*} key
86000
+ * @returns {number}
86001
+ */
86002
+ function getIndex(arr, key) {
86003
+ var result = -1;
86004
+ arr.some(function (entry, index) {
86005
+ if (entry[0] === key) {
86006
+ result = index;
86007
+ return true;
86008
+ }
86009
+ return false;
86010
+ });
86011
+ return result;
86012
+ }
86013
+ return /** @class */ (function () {
86014
+ function class_1() {
86015
+ this.__entries__ = [];
86016
+ }
86017
+ Object.defineProperty(class_1.prototype, "size", {
86018
+ /**
86019
+ * @returns {boolean}
86020
+ */
86021
+ get: function () {
86022
+ return this.__entries__.length;
86023
+ },
86024
+ enumerable: true,
86025
+ configurable: true
86026
+ });
86027
+ /**
86028
+ * @param {*} key
86029
+ * @returns {*}
86030
+ */
86031
+ class_1.prototype.get = function (key) {
86032
+ var index = getIndex(this.__entries__, key);
86033
+ var entry = this.__entries__[index];
86034
+ return entry && entry[1];
86035
+ };
86036
+ /**
86037
+ * @param {*} key
86038
+ * @param {*} value
86039
+ * @returns {void}
86040
+ */
86041
+ class_1.prototype.set = function (key, value) {
86042
+ var index = getIndex(this.__entries__, key);
86043
+ if (~index) {
86044
+ this.__entries__[index][1] = value;
86045
+ }
86046
+ else {
86047
+ this.__entries__.push([key, value]);
86048
+ }
86049
+ };
86050
+ /**
86051
+ * @param {*} key
86052
+ * @returns {void}
86053
+ */
86054
+ class_1.prototype.delete = function (key) {
86055
+ var entries = this.__entries__;
86056
+ var index = getIndex(entries, key);
86057
+ if (~index) {
86058
+ entries.splice(index, 1);
86059
+ }
86060
+ };
86061
+ /**
86062
+ * @param {*} key
86063
+ * @returns {void}
86064
+ */
86065
+ class_1.prototype.has = function (key) {
86066
+ return !!~getIndex(this.__entries__, key);
86067
+ };
86068
+ /**
86069
+ * @returns {void}
86070
+ */
86071
+ class_1.prototype.clear = function () {
86072
+ this.__entries__.splice(0);
86073
+ };
86074
+ /**
86075
+ * @param {Function} callback
86076
+ * @param {*} [ctx=null]
86077
+ * @returns {void}
86078
+ */
86079
+ class_1.prototype.forEach = function (callback, ctx) {
86080
+ if (ctx === void 0) { ctx = null; }
86081
+ for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
86082
+ var entry = _a[_i];
86083
+ callback.call(ctx, entry[1], entry[0]);
86084
+ }
86085
+ };
86086
+ return class_1;
86087
+ }());
86088
+ })();
86089
+
86090
+ /**
86091
+ * Detects whether window and document objects are available in current environment.
86092
+ */
86093
+ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
86094
+
86095
+ // Returns global object of a current environment.
86096
+ var global$1 = (function () {
86097
+ if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Math === Math) {
86098
+ return __webpack_require__.g;
86099
+ }
86100
+ if (typeof self !== 'undefined' && self.Math === Math) {
86101
+ return self;
86102
+ }
86103
+ if (typeof window !== 'undefined' && window.Math === Math) {
86104
+ return window;
86105
+ }
86106
+ // eslint-disable-next-line no-new-func
86107
+ return Function('return this')();
86108
+ })();
86109
+
86110
+ /**
86111
+ * A shim for the requestAnimationFrame which falls back to the setTimeout if
86112
+ * first one is not supported.
86113
+ *
86114
+ * @returns {number} Requests' identifier.
86115
+ */
86116
+ var requestAnimationFrame$1 = (function () {
86117
+ if (typeof requestAnimationFrame === 'function') {
86118
+ // It's required to use a bounded function because IE sometimes throws
86119
+ // an "Invalid calling object" error if rAF is invoked without the global
86120
+ // object on the left hand side.
86121
+ return requestAnimationFrame.bind(global$1);
86122
+ }
86123
+ return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
86124
+ })();
86125
+
86126
+ // Defines minimum timeout before adding a trailing call.
86127
+ var trailingTimeout = 2;
86128
+ /**
86129
+ * Creates a wrapper function which ensures that provided callback will be
86130
+ * invoked only once during the specified delay period.
86131
+ *
86132
+ * @param {Function} callback - Function to be invoked after the delay period.
86133
+ * @param {number} delay - Delay after which to invoke callback.
86134
+ * @returns {Function}
86135
+ */
86136
+ function throttle (callback, delay) {
86137
+ var leadingCall = false, trailingCall = false, lastCallTime = 0;
86138
+ /**
86139
+ * Invokes the original callback function and schedules new invocation if
86140
+ * the "proxy" was called during current request.
86141
+ *
86142
+ * @returns {void}
86143
+ */
86144
+ function resolvePending() {
86145
+ if (leadingCall) {
86146
+ leadingCall = false;
86147
+ callback();
86148
+ }
86149
+ if (trailingCall) {
86150
+ proxy();
86151
+ }
86152
+ }
86153
+ /**
86154
+ * Callback invoked after the specified delay. It will further postpone
86155
+ * invocation of the original function delegating it to the
86156
+ * requestAnimationFrame.
86157
+ *
86158
+ * @returns {void}
86159
+ */
86160
+ function timeoutCallback() {
86161
+ requestAnimationFrame$1(resolvePending);
86162
+ }
86163
+ /**
86164
+ * Schedules invocation of the original function.
86165
+ *
86166
+ * @returns {void}
86167
+ */
86168
+ function proxy() {
86169
+ var timeStamp = Date.now();
86170
+ if (leadingCall) {
86171
+ // Reject immediately following calls.
86172
+ if (timeStamp - lastCallTime < trailingTimeout) {
86173
+ return;
86174
+ }
86175
+ // Schedule new call to be in invoked when the pending one is resolved.
86176
+ // This is important for "transitions" which never actually start
86177
+ // immediately so there is a chance that we might miss one if change
86178
+ // happens amids the pending invocation.
86179
+ trailingCall = true;
86180
+ }
86181
+ else {
86182
+ leadingCall = true;
86183
+ trailingCall = false;
86184
+ setTimeout(timeoutCallback, delay);
86185
+ }
86186
+ lastCallTime = timeStamp;
86187
+ }
86188
+ return proxy;
86189
+ }
86190
+
86191
+ // Minimum delay before invoking the update of observers.
86192
+ var REFRESH_DELAY = 20;
86193
+ // A list of substrings of CSS properties used to find transition events that
86194
+ // might affect dimensions of observed elements.
86195
+ var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
86196
+ // Check if MutationObserver is available.
86197
+ var mutationObserverSupported = typeof MutationObserver !== 'undefined';
86198
+ /**
86199
+ * Singleton controller class which handles updates of ResizeObserver instances.
86200
+ */
86201
+ var ResizeObserverController = /** @class */ (function () {
86202
+ /**
86203
+ * Creates a new instance of ResizeObserverController.
86204
+ *
86205
+ * @private
86206
+ */
86207
+ function ResizeObserverController() {
86208
+ /**
86209
+ * Indicates whether DOM listeners have been added.
86210
+ *
86211
+ * @private {boolean}
86212
+ */
86213
+ this.connected_ = false;
86214
+ /**
86215
+ * Tells that controller has subscribed for Mutation Events.
86216
+ *
86217
+ * @private {boolean}
86218
+ */
86219
+ this.mutationEventsAdded_ = false;
86220
+ /**
86221
+ * Keeps reference to the instance of MutationObserver.
86222
+ *
86223
+ * @private {MutationObserver}
86224
+ */
86225
+ this.mutationsObserver_ = null;
86226
+ /**
86227
+ * A list of connected observers.
86228
+ *
86229
+ * @private {Array<ResizeObserverSPI>}
86230
+ */
86231
+ this.observers_ = [];
86232
+ this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
86233
+ this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
86234
+ }
86235
+ /**
86236
+ * Adds observer to observers list.
86237
+ *
86238
+ * @param {ResizeObserverSPI} observer - Observer to be added.
86239
+ * @returns {void}
86240
+ */
86241
+ ResizeObserverController.prototype.addObserver = function (observer) {
86242
+ if (!~this.observers_.indexOf(observer)) {
86243
+ this.observers_.push(observer);
86244
+ }
86245
+ // Add listeners if they haven't been added yet.
86246
+ if (!this.connected_) {
86247
+ this.connect_();
86248
+ }
86249
+ };
86250
+ /**
86251
+ * Removes observer from observers list.
86252
+ *
86253
+ * @param {ResizeObserverSPI} observer - Observer to be removed.
86254
+ * @returns {void}
86255
+ */
86256
+ ResizeObserverController.prototype.removeObserver = function (observer) {
86257
+ var observers = this.observers_;
86258
+ var index = observers.indexOf(observer);
86259
+ // Remove observer if it's present in registry.
86260
+ if (~index) {
86261
+ observers.splice(index, 1);
86262
+ }
86263
+ // Remove listeners if controller has no connected observers.
86264
+ if (!observers.length && this.connected_) {
86265
+ this.disconnect_();
86266
+ }
86267
+ };
86268
+ /**
86269
+ * Invokes the update of observers. It will continue running updates insofar
86270
+ * it detects changes.
86271
+ *
86272
+ * @returns {void}
86273
+ */
86274
+ ResizeObserverController.prototype.refresh = function () {
86275
+ var changesDetected = this.updateObservers_();
86276
+ // Continue running updates if changes have been detected as there might
86277
+ // be future ones caused by CSS transitions.
86278
+ if (changesDetected) {
86279
+ this.refresh();
86280
+ }
86281
+ };
86282
+ /**
86283
+ * Updates every observer from observers list and notifies them of queued
86284
+ * entries.
86285
+ *
86286
+ * @private
86287
+ * @returns {boolean} Returns "true" if any observer has detected changes in
86288
+ * dimensions of it's elements.
86289
+ */
86290
+ ResizeObserverController.prototype.updateObservers_ = function () {
86291
+ // Collect observers that have active observations.
86292
+ var activeObservers = this.observers_.filter(function (observer) {
86293
+ return observer.gatherActive(), observer.hasActive();
86294
+ });
86295
+ // Deliver notifications in a separate cycle in order to avoid any
86296
+ // collisions between observers, e.g. when multiple instances of
86297
+ // ResizeObserver are tracking the same element and the callback of one
86298
+ // of them changes content dimensions of the observed target. Sometimes
86299
+ // this may result in notifications being blocked for the rest of observers.
86300
+ activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
86301
+ return activeObservers.length > 0;
86302
+ };
86303
+ /**
86304
+ * Initializes DOM listeners.
86305
+ *
86306
+ * @private
86307
+ * @returns {void}
86308
+ */
86309
+ ResizeObserverController.prototype.connect_ = function () {
86310
+ // Do nothing if running in a non-browser environment or if listeners
86311
+ // have been already added.
86312
+ if (!isBrowser || this.connected_) {
86313
+ return;
86314
+ }
86315
+ // Subscription to the "Transitionend" event is used as a workaround for
86316
+ // delayed transitions. This way it's possible to capture at least the
86317
+ // final state of an element.
86318
+ document.addEventListener('transitionend', this.onTransitionEnd_);
86319
+ window.addEventListener('resize', this.refresh);
86320
+ if (mutationObserverSupported) {
86321
+ this.mutationsObserver_ = new MutationObserver(this.refresh);
86322
+ this.mutationsObserver_.observe(document, {
86323
+ attributes: true,
86324
+ childList: true,
86325
+ characterData: true,
86326
+ subtree: true
86327
+ });
86328
+ }
86329
+ else {
86330
+ document.addEventListener('DOMSubtreeModified', this.refresh);
86331
+ this.mutationEventsAdded_ = true;
86332
+ }
86333
+ this.connected_ = true;
86334
+ };
86335
+ /**
86336
+ * Removes DOM listeners.
86337
+ *
86338
+ * @private
86339
+ * @returns {void}
86340
+ */
86341
+ ResizeObserverController.prototype.disconnect_ = function () {
86342
+ // Do nothing if running in a non-browser environment or if listeners
86343
+ // have been already removed.
86344
+ if (!isBrowser || !this.connected_) {
86345
+ return;
86346
+ }
86347
+ document.removeEventListener('transitionend', this.onTransitionEnd_);
86348
+ window.removeEventListener('resize', this.refresh);
86349
+ if (this.mutationsObserver_) {
86350
+ this.mutationsObserver_.disconnect();
86351
+ }
86352
+ if (this.mutationEventsAdded_) {
86353
+ document.removeEventListener('DOMSubtreeModified', this.refresh);
86354
+ }
86355
+ this.mutationsObserver_ = null;
86356
+ this.mutationEventsAdded_ = false;
86357
+ this.connected_ = false;
86358
+ };
86359
+ /**
86360
+ * "Transitionend" event handler.
86361
+ *
86362
+ * @private
86363
+ * @param {TransitionEvent} event
86364
+ * @returns {void}
86365
+ */
86366
+ ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
86367
+ var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
86368
+ // Detect whether transition may affect dimensions of an element.
86369
+ var isReflowProperty = transitionKeys.some(function (key) {
86370
+ return !!~propertyName.indexOf(key);
86371
+ });
86372
+ if (isReflowProperty) {
86373
+ this.refresh();
86374
+ }
86375
+ };
86376
+ /**
86377
+ * Returns instance of the ResizeObserverController.
86378
+ *
86379
+ * @returns {ResizeObserverController}
86380
+ */
86381
+ ResizeObserverController.getInstance = function () {
86382
+ if (!this.instance_) {
86383
+ this.instance_ = new ResizeObserverController();
86384
+ }
86385
+ return this.instance_;
86386
+ };
86387
+ /**
86388
+ * Holds reference to the controller's instance.
86389
+ *
86390
+ * @private {ResizeObserverController}
86391
+ */
86392
+ ResizeObserverController.instance_ = null;
86393
+ return ResizeObserverController;
86394
+ }());
86395
+
86396
+ /**
86397
+ * Defines non-writable/enumerable properties of the provided target object.
86398
+ *
86399
+ * @param {Object} target - Object for which to define properties.
86400
+ * @param {Object} props - Properties to be defined.
86401
+ * @returns {Object} Target object.
86402
+ */
86403
+ var defineConfigurable = (function (target, props) {
86404
+ for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
86405
+ var key = _a[_i];
86406
+ Object.defineProperty(target, key, {
86407
+ value: props[key],
86408
+ enumerable: false,
86409
+ writable: false,
86410
+ configurable: true
86411
+ });
86412
+ }
86413
+ return target;
86414
+ });
86415
+
86416
+ /**
86417
+ * Returns the global object associated with provided element.
86418
+ *
86419
+ * @param {Object} target
86420
+ * @returns {Object}
86421
+ */
86422
+ var getWindowOf = (function (target) {
86423
+ // Assume that the element is an instance of Node, which means that it
86424
+ // has the "ownerDocument" property from which we can retrieve a
86425
+ // corresponding global object.
86426
+ var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
86427
+ // Return the local global object if it's not possible extract one from
86428
+ // provided element.
86429
+ return ownerGlobal || global$1;
86430
+ });
86431
+
86432
+ // Placeholder of an empty content rectangle.
86433
+ var emptyRect = createRectInit(0, 0, 0, 0);
86434
+ /**
86435
+ * Converts provided string to a number.
86436
+ *
86437
+ * @param {number|string} value
86438
+ * @returns {number}
86439
+ */
86440
+ function toFloat(value) {
86441
+ return parseFloat(value) || 0;
86442
+ }
86443
+ /**
86444
+ * Extracts borders size from provided styles.
86445
+ *
86446
+ * @param {CSSStyleDeclaration} styles
86447
+ * @param {...string} positions - Borders positions (top, right, ...)
86448
+ * @returns {number}
86449
+ */
86450
+ function getBordersSize(styles) {
86451
+ var positions = [];
86452
+ for (var _i = 1; _i < arguments.length; _i++) {
86453
+ positions[_i - 1] = arguments[_i];
86454
+ }
86455
+ return positions.reduce(function (size, position) {
86456
+ var value = styles['border-' + position + '-width'];
86457
+ return size + toFloat(value);
86458
+ }, 0);
86459
+ }
86460
+ /**
86461
+ * Extracts paddings sizes from provided styles.
86462
+ *
86463
+ * @param {CSSStyleDeclaration} styles
86464
+ * @returns {Object} Paddings box.
86465
+ */
86466
+ function getPaddings(styles) {
86467
+ var positions = ['top', 'right', 'bottom', 'left'];
86468
+ var paddings = {};
86469
+ for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
86470
+ var position = positions_1[_i];
86471
+ var value = styles['padding-' + position];
86472
+ paddings[position] = toFloat(value);
86473
+ }
86474
+ return paddings;
86475
+ }
86476
+ /**
86477
+ * Calculates content rectangle of provided SVG element.
86478
+ *
86479
+ * @param {SVGGraphicsElement} target - Element content rectangle of which needs
86480
+ * to be calculated.
86481
+ * @returns {DOMRectInit}
86482
+ */
86483
+ function getSVGContentRect(target) {
86484
+ var bbox = target.getBBox();
86485
+ return createRectInit(0, 0, bbox.width, bbox.height);
86486
+ }
86487
+ /**
86488
+ * Calculates content rectangle of provided HTMLElement.
86489
+ *
86490
+ * @param {HTMLElement} target - Element for which to calculate the content rectangle.
86491
+ * @returns {DOMRectInit}
86492
+ */
86493
+ function getHTMLElementContentRect(target) {
86494
+ // Client width & height properties can't be
86495
+ // used exclusively as they provide rounded values.
86496
+ var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
86497
+ // By this condition we can catch all non-replaced inline, hidden and
86498
+ // detached elements. Though elements with width & height properties less
86499
+ // than 0.5 will be discarded as well.
86500
+ //
86501
+ // Without it we would need to implement separate methods for each of
86502
+ // those cases and it's not possible to perform a precise and performance
86503
+ // effective test for hidden elements. E.g. even jQuery's ':visible' filter
86504
+ // gives wrong results for elements with width & height less than 0.5.
86505
+ if (!clientWidth && !clientHeight) {
86506
+ return emptyRect;
86507
+ }
86508
+ var styles = getWindowOf(target).getComputedStyle(target);
86509
+ var paddings = getPaddings(styles);
86510
+ var horizPad = paddings.left + paddings.right;
86511
+ var vertPad = paddings.top + paddings.bottom;
86512
+ // Computed styles of width & height are being used because they are the
86513
+ // only dimensions available to JS that contain non-rounded values. It could
86514
+ // be possible to utilize the getBoundingClientRect if only it's data wasn't
86515
+ // affected by CSS transformations let alone paddings, borders and scroll bars.
86516
+ var width = toFloat(styles.width), height = toFloat(styles.height);
86517
+ // Width & height include paddings and borders when the 'border-box' box
86518
+ // model is applied (except for IE).
86519
+ if (styles.boxSizing === 'border-box') {
86520
+ // Following conditions are required to handle Internet Explorer which
86521
+ // doesn't include paddings and borders to computed CSS dimensions.
86522
+ //
86523
+ // We can say that if CSS dimensions + paddings are equal to the "client"
86524
+ // properties then it's either IE, and thus we don't need to subtract
86525
+ // anything, or an element merely doesn't have paddings/borders styles.
86526
+ if (Math.round(width + horizPad) !== clientWidth) {
86527
+ width -= getBordersSize(styles, 'left', 'right') + horizPad;
86528
+ }
86529
+ if (Math.round(height + vertPad) !== clientHeight) {
86530
+ height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
86531
+ }
86532
+ }
86533
+ // Following steps can't be applied to the document's root element as its
86534
+ // client[Width/Height] properties represent viewport area of the window.
86535
+ // Besides, it's as well not necessary as the <html> itself neither has
86536
+ // rendered scroll bars nor it can be clipped.
86537
+ if (!isDocumentElement(target)) {
86538
+ // In some browsers (only in Firefox, actually) CSS width & height
86539
+ // include scroll bars size which can be removed at this step as scroll
86540
+ // bars are the only difference between rounded dimensions + paddings
86541
+ // and "client" properties, though that is not always true in Chrome.
86542
+ var vertScrollbar = Math.round(width + horizPad) - clientWidth;
86543
+ var horizScrollbar = Math.round(height + vertPad) - clientHeight;
86544
+ // Chrome has a rather weird rounding of "client" properties.
86545
+ // E.g. for an element with content width of 314.2px it sometimes gives
86546
+ // the client width of 315px and for the width of 314.7px it may give
86547
+ // 314px. And it doesn't happen all the time. So just ignore this delta
86548
+ // as a non-relevant.
86549
+ if (Math.abs(vertScrollbar) !== 1) {
86550
+ width -= vertScrollbar;
86551
+ }
86552
+ if (Math.abs(horizScrollbar) !== 1) {
86553
+ height -= horizScrollbar;
86554
+ }
86555
+ }
86556
+ return createRectInit(paddings.left, paddings.top, width, height);
86557
+ }
86558
+ /**
86559
+ * Checks whether provided element is an instance of the SVGGraphicsElement.
86560
+ *
86561
+ * @param {Element} target - Element to be checked.
86562
+ * @returns {boolean}
86563
+ */
86564
+ var isSVGGraphicsElement = (function () {
86565
+ // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
86566
+ // interface.
86567
+ if (typeof SVGGraphicsElement !== 'undefined') {
86568
+ return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
86569
+ }
86570
+ // If it's so, then check that element is at least an instance of the
86571
+ // SVGElement and that it has the "getBBox" method.
86572
+ // eslint-disable-next-line no-extra-parens
86573
+ return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
86574
+ typeof target.getBBox === 'function'); };
86575
+ })();
86576
+ /**
86577
+ * Checks whether provided element is a document element (<html>).
86578
+ *
86579
+ * @param {Element} target - Element to be checked.
86580
+ * @returns {boolean}
86581
+ */
86582
+ function isDocumentElement(target) {
86583
+ return target === getWindowOf(target).document.documentElement;
86584
+ }
86585
+ /**
86586
+ * Calculates an appropriate content rectangle for provided html or svg element.
86587
+ *
86588
+ * @param {Element} target - Element content rectangle of which needs to be calculated.
86589
+ * @returns {DOMRectInit}
86590
+ */
86591
+ function getContentRect(target) {
86592
+ if (!isBrowser) {
86593
+ return emptyRect;
86594
+ }
86595
+ if (isSVGGraphicsElement(target)) {
86596
+ return getSVGContentRect(target);
86597
+ }
86598
+ return getHTMLElementContentRect(target);
86599
+ }
86600
+ /**
86601
+ * Creates rectangle with an interface of the DOMRectReadOnly.
86602
+ * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
86603
+ *
86604
+ * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
86605
+ * @returns {DOMRectReadOnly}
86606
+ */
86607
+ function createReadOnlyRect(_a) {
86608
+ var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
86609
+ // If DOMRectReadOnly is available use it as a prototype for the rectangle.
86610
+ var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
86611
+ var rect = Object.create(Constr.prototype);
86612
+ // Rectangle's properties are not writable and non-enumerable.
86613
+ defineConfigurable(rect, {
86614
+ x: x, y: y, width: width, height: height,
86615
+ top: y,
86616
+ right: x + width,
86617
+ bottom: height + y,
86618
+ left: x
86619
+ });
86620
+ return rect;
86621
+ }
86622
+ /**
86623
+ * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
86624
+ * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
86625
+ *
86626
+ * @param {number} x - X coordinate.
86627
+ * @param {number} y - Y coordinate.
86628
+ * @param {number} width - Rectangle's width.
86629
+ * @param {number} height - Rectangle's height.
86630
+ * @returns {DOMRectInit}
86631
+ */
86632
+ function createRectInit(x, y, width, height) {
86633
+ return { x: x, y: y, width: width, height: height };
86634
+ }
86635
+
86636
+ /**
86637
+ * Class that is responsible for computations of the content rectangle of
86638
+ * provided DOM element and for keeping track of it's changes.
86639
+ */
86640
+ var ResizeObservation = /** @class */ (function () {
86641
+ /**
86642
+ * Creates an instance of ResizeObservation.
86643
+ *
86644
+ * @param {Element} target - Element to be observed.
86645
+ */
86646
+ function ResizeObservation(target) {
86647
+ /**
86648
+ * Broadcasted width of content rectangle.
86649
+ *
86650
+ * @type {number}
86651
+ */
86652
+ this.broadcastWidth = 0;
86653
+ /**
86654
+ * Broadcasted height of content rectangle.
86655
+ *
86656
+ * @type {number}
86657
+ */
86658
+ this.broadcastHeight = 0;
86659
+ /**
86660
+ * Reference to the last observed content rectangle.
86661
+ *
86662
+ * @private {DOMRectInit}
86663
+ */
86664
+ this.contentRect_ = createRectInit(0, 0, 0, 0);
86665
+ this.target = target;
86666
+ }
86667
+ /**
86668
+ * Updates content rectangle and tells whether it's width or height properties
86669
+ * have changed since the last broadcast.
86670
+ *
86671
+ * @returns {boolean}
86672
+ */
86673
+ ResizeObservation.prototype.isActive = function () {
86674
+ var rect = getContentRect(this.target);
86675
+ this.contentRect_ = rect;
86676
+ return (rect.width !== this.broadcastWidth ||
86677
+ rect.height !== this.broadcastHeight);
86678
+ };
86679
+ /**
86680
+ * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
86681
+ * from the corresponding properties of the last observed content rectangle.
86682
+ *
86683
+ * @returns {DOMRectInit} Last observed content rectangle.
86684
+ */
86685
+ ResizeObservation.prototype.broadcastRect = function () {
86686
+ var rect = this.contentRect_;
86687
+ this.broadcastWidth = rect.width;
86688
+ this.broadcastHeight = rect.height;
86689
+ return rect;
86690
+ };
86691
+ return ResizeObservation;
86692
+ }());
86693
+
86694
+ var ResizeObserverEntry = /** @class */ (function () {
86695
+ /**
86696
+ * Creates an instance of ResizeObserverEntry.
86697
+ *
86698
+ * @param {Element} target - Element that is being observed.
86699
+ * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
86700
+ */
86701
+ function ResizeObserverEntry(target, rectInit) {
86702
+ var contentRect = createReadOnlyRect(rectInit);
86703
+ // According to the specification following properties are not writable
86704
+ // and are also not enumerable in the native implementation.
86705
+ //
86706
+ // Property accessors are not being used as they'd require to define a
86707
+ // private WeakMap storage which may cause memory leaks in browsers that
86708
+ // don't support this type of collections.
86709
+ defineConfigurable(this, { target: target, contentRect: contentRect });
86710
+ }
86711
+ return ResizeObserverEntry;
86712
+ }());
86713
+
86714
+ var ResizeObserverSPI = /** @class */ (function () {
86715
+ /**
86716
+ * Creates a new instance of ResizeObserver.
86717
+ *
86718
+ * @param {ResizeObserverCallback} callback - Callback function that is invoked
86719
+ * when one of the observed elements changes it's content dimensions.
86720
+ * @param {ResizeObserverController} controller - Controller instance which
86721
+ * is responsible for the updates of observer.
86722
+ * @param {ResizeObserver} callbackCtx - Reference to the public
86723
+ * ResizeObserver instance which will be passed to callback function.
86724
+ */
86725
+ function ResizeObserverSPI(callback, controller, callbackCtx) {
86726
+ /**
86727
+ * Collection of resize observations that have detected changes in dimensions
86728
+ * of elements.
86729
+ *
86730
+ * @private {Array<ResizeObservation>}
86731
+ */
86732
+ this.activeObservations_ = [];
86733
+ /**
86734
+ * Registry of the ResizeObservation instances.
86735
+ *
86736
+ * @private {Map<Element, ResizeObservation>}
86737
+ */
86738
+ this.observations_ = new MapShim();
86739
+ if (typeof callback !== 'function') {
86740
+ throw new TypeError('The callback provided as parameter 1 is not a function.');
86741
+ }
86742
+ this.callback_ = callback;
86743
+ this.controller_ = controller;
86744
+ this.callbackCtx_ = callbackCtx;
86745
+ }
86746
+ /**
86747
+ * Starts observing provided element.
86748
+ *
86749
+ * @param {Element} target - Element to be observed.
86750
+ * @returns {void}
86751
+ */
86752
+ ResizeObserverSPI.prototype.observe = function (target) {
86753
+ if (!arguments.length) {
86754
+ throw new TypeError('1 argument required, but only 0 present.');
86755
+ }
86756
+ // Do nothing if current environment doesn't have the Element interface.
86757
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
86758
+ return;
86759
+ }
86760
+ if (!(target instanceof getWindowOf(target).Element)) {
86761
+ throw new TypeError('parameter 1 is not of type "Element".');
86762
+ }
86763
+ var observations = this.observations_;
86764
+ // Do nothing if element is already being observed.
86765
+ if (observations.has(target)) {
86766
+ return;
86767
+ }
86768
+ observations.set(target, new ResizeObservation(target));
86769
+ this.controller_.addObserver(this);
86770
+ // Force the update of observations.
86771
+ this.controller_.refresh();
86772
+ };
86773
+ /**
86774
+ * Stops observing provided element.
86775
+ *
86776
+ * @param {Element} target - Element to stop observing.
86777
+ * @returns {void}
86778
+ */
86779
+ ResizeObserverSPI.prototype.unobserve = function (target) {
86780
+ if (!arguments.length) {
86781
+ throw new TypeError('1 argument required, but only 0 present.');
86782
+ }
86783
+ // Do nothing if current environment doesn't have the Element interface.
86784
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
86785
+ return;
86786
+ }
86787
+ if (!(target instanceof getWindowOf(target).Element)) {
86788
+ throw new TypeError('parameter 1 is not of type "Element".');
86789
+ }
86790
+ var observations = this.observations_;
86791
+ // Do nothing if element is not being observed.
86792
+ if (!observations.has(target)) {
86793
+ return;
86794
+ }
86795
+ observations.delete(target);
86796
+ if (!observations.size) {
86797
+ this.controller_.removeObserver(this);
86798
+ }
86799
+ };
86800
+ /**
86801
+ * Stops observing all elements.
86802
+ *
86803
+ * @returns {void}
86804
+ */
86805
+ ResizeObserverSPI.prototype.disconnect = function () {
86806
+ this.clearActive();
86807
+ this.observations_.clear();
86808
+ this.controller_.removeObserver(this);
86809
+ };
86810
+ /**
86811
+ * Collects observation instances the associated element of which has changed
86812
+ * it's content rectangle.
86813
+ *
86814
+ * @returns {void}
86815
+ */
86816
+ ResizeObserverSPI.prototype.gatherActive = function () {
86817
+ var _this = this;
86818
+ this.clearActive();
86819
+ this.observations_.forEach(function (observation) {
86820
+ if (observation.isActive()) {
86821
+ _this.activeObservations_.push(observation);
86822
+ }
86823
+ });
86824
+ };
86825
+ /**
86826
+ * Invokes initial callback function with a list of ResizeObserverEntry
86827
+ * instances collected from active resize observations.
86828
+ *
86829
+ * @returns {void}
86830
+ */
86831
+ ResizeObserverSPI.prototype.broadcastActive = function () {
86832
+ // Do nothing if observer doesn't have active observations.
86833
+ if (!this.hasActive()) {
86834
+ return;
86835
+ }
86836
+ var ctx = this.callbackCtx_;
86837
+ // Create ResizeObserverEntry instance for every active observation.
86838
+ var entries = this.activeObservations_.map(function (observation) {
86839
+ return new ResizeObserverEntry(observation.target, observation.broadcastRect());
86840
+ });
86841
+ this.callback_.call(ctx, entries, ctx);
86842
+ this.clearActive();
86843
+ };
86844
+ /**
86845
+ * Clears the collection of active observations.
86846
+ *
86847
+ * @returns {void}
86848
+ */
86849
+ ResizeObserverSPI.prototype.clearActive = function () {
86850
+ this.activeObservations_.splice(0);
86851
+ };
86852
+ /**
86853
+ * Tells whether observer has active observations.
86854
+ *
86855
+ * @returns {boolean}
86856
+ */
86857
+ ResizeObserverSPI.prototype.hasActive = function () {
86858
+ return this.activeObservations_.length > 0;
86859
+ };
86860
+ return ResizeObserverSPI;
86861
+ }());
86862
+
86863
+ // Registry of internal observers. If WeakMap is not available use current shim
86864
+ // for the Map collection as it has all required methods and because WeakMap
86865
+ // can't be fully polyfilled anyway.
86866
+ var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
86867
+ /**
86868
+ * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
86869
+ * exposing only those methods and properties that are defined in the spec.
86870
+ */
86871
+ var ResizeObserver = /** @class */ (function () {
86872
+ /**
86873
+ * Creates a new instance of ResizeObserver.
86874
+ *
86875
+ * @param {ResizeObserverCallback} callback - Callback that is invoked when
86876
+ * dimensions of the observed elements change.
86877
+ */
86878
+ function ResizeObserver(callback) {
86879
+ if (!(this instanceof ResizeObserver)) {
86880
+ throw new TypeError('Cannot call a class as a function.');
86881
+ }
86882
+ if (!arguments.length) {
86883
+ throw new TypeError('1 argument required, but only 0 present.');
86884
+ }
86885
+ var controller = ResizeObserverController.getInstance();
86886
+ var observer = new ResizeObserverSPI(callback, controller, this);
86887
+ observers.set(this, observer);
86888
+ }
86889
+ return ResizeObserver;
86890
+ }());
86891
+ // Expose public methods of ResizeObserver.
86892
+ [
86893
+ 'observe',
86894
+ 'unobserve',
86895
+ 'disconnect'
86896
+ ].forEach(function (method) {
86897
+ ResizeObserver.prototype[method] = function () {
86898
+ var _a;
86899
+ return (_a = observers.get(this))[method].apply(_a, arguments);
86900
+ };
86901
+ });
86902
+
86903
+ var index = (function () {
86904
+ // Export existing implementation if available.
86905
+ if (typeof global$1.ResizeObserver !== 'undefined') {
86906
+ return global$1.ResizeObserver;
86907
+ }
86908
+ return ResizeObserver;
86909
+ })();
86910
+
86911
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);
86912
+
86913
+
85576
86914
  /***/ }),
85577
86915
 
85578
86916
  /***/ "./node_modules/svg-baker-runtime/browser-symbol.js":