@diplodoc/client 2.2.0-beta.0 → 2.3.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.
@@ -49,8 +49,8 @@ var lib = __webpack_require__(3614);
49
49
  var usePopupState = __webpack_require__(806);
50
50
  // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/models/index.js
51
51
  var models = __webpack_require__(8184);
52
- // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/utils/index.js + 59 modules
53
- var utils = __webpack_require__(2898);
52
+ // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/utils/index.js + 61 modules
53
+ var utils = __webpack_require__(4957);
54
54
  ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/Control/Control.css
55
55
  // extracted by mini-css-extract-plugin
56
56
 
@@ -153,7 +153,7 @@ var Control_default = Control;
153
153
 
154
154
  /***/ }),
155
155
 
156
- /***/ 7871:
156
+ /***/ 5379:
157
157
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
158
158
 
159
159
  "use strict";
@@ -191,8 +191,8 @@ var useDirection = __webpack_require__(315);
191
191
  var Popup = __webpack_require__(8234);
192
192
  // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/hooks/usePopper.js
193
193
  var usePopper = __webpack_require__(6591);
194
- // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/utils/index.js + 59 modules
195
- var utils = __webpack_require__(2898);
194
+ // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/utils/index.js + 61 modules
195
+ var utils = __webpack_require__(4957);
196
196
  ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/Subscribe/utils.js
197
197
  // src/components/Subscribe/utils.ts
198
198
 
@@ -11311,7 +11311,6 @@ class AutoSizer extends react.Component {
11311
11311
  defaultWidth,
11312
11312
  disableHeight = false,
11313
11313
  disableWidth = false,
11314
- doNotBailOutOnEmptyChildren = false,
11315
11314
  nonce,
11316
11315
  onResize,
11317
11316
  style = {},
@@ -11352,9 +11351,6 @@ class AutoSizer extends react.Component {
11352
11351
  childParams.width = width;
11353
11352
  childParams.scaledWidth = scaledWidth;
11354
11353
  }
11355
- if (doNotBailOutOnEmptyChildren) {
11356
- bailoutOnChildren = false;
11357
- }
11358
11354
  return (0,react.createElement)(tagName, {
11359
11355
  ref: this._setRef,
11360
11356
  style: {
@@ -14428,8 +14424,12 @@ var langs_default = /*#__PURE__*/__webpack_require__.n(node_modules_langs);
14428
14424
  ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/Controls/Controls.css
14429
14425
  // extracted by mini-css-extract-plugin
14430
14426
 
14431
- ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/Controls/single-controls/LangControl.js
14432
- // src/components/Controls/single-controls/LangControl.tsx
14427
+ ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/Controls/single-controls/LangControl/LangControl.css
14428
+ // extracted by mini-css-extract-plugin
14429
+
14430
+ ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/Controls/single-controls/LangControl/LangControl.js
14431
+ // src/components/Controls/single-controls/LangControl/LangControl.tsx
14432
+
14433
14433
 
14434
14434
 
14435
14435
 
@@ -14682,6 +14682,9 @@ var DividerControl_default = DividerControl;
14682
14682
 
14683
14683
 
14684
14684
  var Controls_b = (0,lib/* default */.A)("dc-controls");
14685
+ function hasLangs(langs) {
14686
+ return (langs == null ? void 0 : langs.length) && langs.length > 1;
14687
+ }
14685
14688
  var Controls = (0,react.memo)((props) => {
14686
14689
  const { isVerticalView } = (0,react.useContext)(ControlsLayout/* ControlsLayoutContext */.s);
14687
14690
  const {
@@ -14715,7 +14718,7 @@ var Controls = (0,react.memo)((props) => {
14715
14718
  const withSettingsControl = Boolean(
14716
14719
  onChangeWideFormat || onChangeTheme || onChangeShowMiniToc || onChangeTextSize
14717
14720
  );
14718
- const withLangControl = Boolean(lang && onChangeLang);
14721
+ const withLangControl = Boolean(lang && hasLangs(langs) && onChangeLang);
14719
14722
  const withSinglePageControl = Boolean(onChangeSinglePage);
14720
14723
  const withPdfControl = Boolean(pdfLink);
14721
14724
  const withEditControl = Boolean(!singlePage && !hideEditControl && vcsUrl);
@@ -15082,8 +15085,8 @@ var useDirection = __webpack_require__(315);
15082
15085
  var Popup = __webpack_require__(8234);
15083
15086
  // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/hooks/usePopper.js
15084
15087
  var usePopper = __webpack_require__(6591);
15085
- // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/utils/index.js + 59 modules
15086
- var utils = __webpack_require__(2898);
15088
+ // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/utils/index.js + 61 modules
15089
+ var utils = __webpack_require__(4957);
15087
15090
  ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/Feedback/controls/DislikeVariantsPopup.js
15088
15091
  var __defProp = Object.defineProperty;
15089
15092
  var __defProps = Object.defineProperties;
@@ -18544,7 +18547,7 @@ var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
18544
18547
 
18545
18548
  /***/ }),
18546
18549
 
18547
- /***/ 2898:
18550
+ /***/ 4957:
18548
18551
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
18549
18552
 
18550
18553
  "use strict";
@@ -18552,6 +18555,7 @@ var DocumentType = /* @__PURE__ */ ((DocumentType2) => {
18552
18555
  // EXPORTS
18553
18556
  __webpack_require__.d(__webpack_exports__, {
18554
18557
  Uj: () => (/* binding */ callSafe),
18558
+ UZ: () => (/* binding */ getLangPath),
18555
18559
  $T: () => (/* binding */ getPageByType),
18556
18560
  M5: () => (/* binding */ getPageType),
18557
18561
  ig: () => (/* binding */ getPopupPosition),
@@ -18606,8 +18610,8 @@ var omit_default = /*#__PURE__*/__webpack_require__.n(omit);
18606
18610
  var usePopper = __webpack_require__(6591);
18607
18611
  // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/components/Controls/ControlsLayout.js
18608
18612
  var ControlsLayout = __webpack_require__(6141);
18609
- // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/components/Controls/Controls.js + 64 modules
18610
- var Controls = __webpack_require__(7871);
18613
+ // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/components/Controls/Controls.js + 65 modules
18614
+ var Controls = __webpack_require__(5379);
18611
18615
  ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/HTML/HTML.js
18612
18616
  // src/components/HTML/HTML.tsx
18613
18617
 
@@ -18753,6 +18757,48 @@ var TocItem_default = TocItem;
18753
18757
 
18754
18758
  //# sourceMappingURL=TocItem.js.map
18755
18759
 
18760
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/theme/useDirection.js + 1 modules
18761
+ var useDirection = __webpack_require__(315);
18762
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/Label/Label.js + 1 modules
18763
+ var Label = __webpack_require__(2768);
18764
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/Popover/Popover.js + 10 modules
18765
+ var Popover = __webpack_require__(7820);
18766
+ ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/TocLable/TocLabel.css
18767
+ // extracted by mini-css-extract-plugin
18768
+
18769
+ ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/TocLable/TocLabel.js
18770
+ // src/components/TocLable/TocLabel.tsx
18771
+
18772
+
18773
+
18774
+
18775
+ var TocLabel_b = (0,lib/* default */.A)("dc-toc-label");
18776
+ var TocLabel = ({ label }) => {
18777
+ const direction = (0,useDirection/* useDirection */.j)();
18778
+ let labelElement = null;
18779
+ if (label == null ? void 0 : label.title) {
18780
+ const hasDescription = Boolean(label.description);
18781
+ labelElement = /* @__PURE__ */ react.createElement(Label/* Label */.J, { size: "xs", theme: label.theme, className: TocLabel_b({ offset: !hasDescription }) }, label.title);
18782
+ if (hasDescription) {
18783
+ const placement = direction === "rtl" ? "left" : "right";
18784
+ labelElement = /* @__PURE__ */ react.createElement(
18785
+ Popover/* Popover */.A,
18786
+ {
18787
+ content: label.description,
18788
+ placement,
18789
+ size: "s",
18790
+ className: TocLabel_b({ offset: true })
18791
+ },
18792
+ labelElement
18793
+ );
18794
+ }
18795
+ }
18796
+ return labelElement;
18797
+ };
18798
+ var TocLabel_default = TocLabel;
18799
+
18800
+ //# sourceMappingURL=TocLabel.js.map
18801
+
18756
18802
  ;// CONCATENATED MODULE: ./node_modules/@diplodoc/components/build/esm/components/Toc/TocItemRegistry.js
18757
18803
  var TocItemRegistry_defProp = Object.defineProperty;
18758
18804
  var TocItemRegistry_defNormalProp = (obj, key, value) => key in obj ? TocItemRegistry_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -18861,6 +18907,7 @@ var Toc_publicField = (obj, key, value) => {
18861
18907
 
18862
18908
 
18863
18909
 
18910
+
18864
18911
  var Toc_b = (0,lib/* default */.A)("dc-toc");
18865
18912
  var HEADER_DEFAULT_HEIGHT = 0;
18866
18913
  function zip(array, fill) {
@@ -19023,7 +19070,7 @@ var Toc = class extends react.Component {
19023
19070
  return /* @__PURE__ */ react.createElement("div", { className: Toc_b("empty") }, text);
19024
19071
  }
19025
19072
  renderTop() {
19026
- const { router, title, href, tocTitleIcon, hideTocHeader, singlePage } = this.props;
19073
+ const { router, title, href, tocTitleIcon, hideTocHeader, singlePage, label } = this.props;
19027
19074
  const { contentScrolled } = this.state;
19028
19075
  let topHeader;
19029
19076
  if (hideTocHeader) {
@@ -19043,7 +19090,7 @@ var Toc = class extends react.Component {
19043
19090
  } else {
19044
19091
  topHeader = /* @__PURE__ */ react.createElement("div", { className: Toc_b("top-header") }, /* @__PURE__ */ react.createElement(HTML, null, title));
19045
19092
  }
19046
- return /* @__PURE__ */ react.createElement("div", { className: Toc_b("top", { scrolled: contentScrolled }), id: this.tocTopId }, tocTitleIcon ? /* @__PURE__ */ react.createElement("div", { className: Toc_b("top-header-icon"), "aria-hidden": "true" }, tocTitleIcon) : null, topHeader);
19093
+ return /* @__PURE__ */ react.createElement("div", { className: Toc_b("top", { scrolled: contentScrolled }), id: this.tocTopId }, tocTitleIcon ? /* @__PURE__ */ react.createElement("div", { className: Toc_b("top-header-icon"), "aria-hidden": "true" }, tocTitleIcon) : null, topHeader, label ? /* @__PURE__ */ react.createElement(TocLabel_default, { label }) : null);
19047
19094
  }
19048
19095
  renderBottom() {
19049
19096
  const { singlePage, onChangeSinglePage, pdfLink } = this.props;
@@ -22070,7 +22117,8 @@ var DocPage_default = withHighlightedSearchWords_default(DocPage);
22070
22117
 
22071
22118
 
22072
22119
  function normalizePath(path) {
22073
- return path == null ? void 0 : path.replace(/\/index$/, "/");
22120
+ var _a;
22121
+ return (_a = path == null ? void 0 : path.replace(/\.html$/, "")) == null ? void 0 : _a.replace(/\/index$/, "/");
22074
22122
  }
22075
22123
  function normalizeHash(hash) {
22076
22124
  if (hash && hash.startsWith("#")) {
@@ -22084,6 +22132,11 @@ function isActiveItem(router, href, singlePage) {
22084
22132
  }
22085
22133
  return normalizePath(router.pathname) === normalizePath((0,external_url_.parse)(href).pathname);
22086
22134
  }
22135
+ function getLangPath(router, lang) {
22136
+ const path = router.hash ? normalizeHash(router.hash) : normalizePath(router.pathname);
22137
+ const route = (path == null ? void 0 : path.split("../")) || [];
22138
+ return `../${lang}/${route[route.length - 1] || ""}`;
22139
+ }
22087
22140
  function isExternalHref(href) {
22088
22141
  return href.startsWith("http") || href.startsWith("//");
22089
22142
  }
@@ -22139,7 +22192,7 @@ function getPageType({
22139
22192
  leading
22140
22193
  }) {
22141
22194
  if (leading && data) {
22142
- return Object.prototype.hasOwnProperty.call(data, "links") ? models/* DocumentType */.KG.Leading : models/* DocumentType */.KG.PageConstructor;
22195
+ return Object.prototype.hasOwnProperty.call(data, "blocks") ? models/* DocumentType */.KG.PageConstructor : models/* DocumentType */.KG.Leading;
22143
22196
  }
22144
22197
  return models/* DocumentType */.KG.Base;
22145
22198
  }
@@ -24705,8 +24758,6 @@ var cn = __webpack_require__(9445);
24705
24758
  var blocks = __webpack_require__(4174);
24706
24759
  // EXTERNAL MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/components/VideoBlock/VideoBlock.js + 4 modules
24707
24760
  var VideoBlock = __webpack_require__(1845);
24708
- // EXTERNAL MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/context/localeContext/localeContext.js
24709
- var localeContext = __webpack_require__(7599);
24710
24761
  // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/utils/addComponentKeysets.js + 8 modules
24711
24762
  var addComponentKeysets = __webpack_require__(892);
24712
24763
  ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/components/Media/DataLens/i18n/en.json
@@ -24734,14 +24785,12 @@ function unifyDataLensToObject(dataLens) {
24734
24785
 
24735
24786
 
24736
24787
 
24737
-
24738
24788
  const b = (0,cn/* block */.om)('media-component-data-lens');
24739
24789
  const DataLens = (props) => {
24740
24790
  const { dataLens } = props;
24741
24791
  const dataLensData = unifyDataLensToObject(dataLens);
24742
- const locale = (0,react.useContext)(localeContext/* LocaleContext */.U);
24743
24792
  return dataLens ? (react.createElement("div", { className: b('wrap') },
24744
- react.createElement("iframe", { src: `https://datalens.yandex/${dataLensData.id}?_embedded=1&_theme=${dataLensData.theme}&_lang=${locale.lang}`, className: b('iframe'), loading: "lazy", title: i18n('iframe-title'), frameBorder: 0 }))) : null;
24793
+ react.createElement("iframe", { src: `https://datalens.yandex/${dataLensData.id}?_embedded=1&_theme=${dataLensData.theme}`, className: b('iframe'), loading: "lazy", title: i18n('iframe-title'), frameBorder: 0 }))) : null;
24745
24794
  };
24746
24795
  /* harmony default export */ const DataLens_DataLens = (DataLens);
24747
24796
 
@@ -30310,7 +30359,7 @@ const BREAKPOINTS = {
30310
30359
 
30311
30360
  /***/ }),
30312
30361
 
30313
- /***/ 155:
30362
+ /***/ 3233:
30314
30363
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30315
30364
 
30316
30365
  "use strict";
@@ -30484,108 +30533,8 @@ function BackLink(props) {
30484
30533
  react.createElement("span", null, title)));
30485
30534
  }
30486
30535
 
30487
- // EXTERNAL MODULE: ./node_modules/@gravity-ui/icons/esm/Xmark.js
30488
- var Xmark = __webpack_require__(3168);
30489
- // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/hooks/useActionHandlers/useActionHandlers.js
30490
- var useActionHandlers = __webpack_require__(5926);
30491
- // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/ClipboardIcon/ClipboardIcon.js + 3 modules
30492
- var ClipboardIcon = __webpack_require__(9671);
30493
- // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/CopyToClipboard/CopyToClipboard.js
30494
- var CopyToClipboard = __webpack_require__(7732);
30495
- // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/utils/cn.js
30496
- var utils_cn = __webpack_require__(9356);
30497
- ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/Label/Label.css
30498
- // extracted by mini-css-extract-plugin
30499
-
30500
- ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/Label/Label.js
30501
-
30502
-
30503
-
30504
-
30505
-
30506
-
30507
-
30508
-
30509
-
30510
- const Label_b = (0,utils_cn/* block */.om)('label');
30511
- const sizeMap = {
30512
- xs: { copyIconSize: 12, closeIconSize: 12, buttonSize: 'xs' },
30513
- s: { copyIconSize: 14, closeIconSize: 14, buttonSize: 's' },
30514
- m: { copyIconSize: 16, closeIconSize: 16, buttonSize: 'm' },
30515
- };
30516
- const commonActionButtonProps = {
30517
- pin: 'brick-round',
30518
- className: Label_b('addon', {
30519
- side: 'right',
30520
- interactive: true,
30521
- }),
30522
- };
30523
- const Label = react.forwardRef(function Label(props, ref) {
30524
- const { type = 'default', theme = 'normal', size = 'xs', icon, children, onCloseClick, className, disabled, copyText, closeButtonLabel, copyButtonLabel, interactive = false, value, onCopy, onClick, qa, } = props;
30525
- const actionButtonRef = react.useRef(null);
30526
- const hasContent = Boolean(children !== '' && react.Children.count(children) > 0);
30527
- const typeClose = type === 'close' && hasContent;
30528
- const typeCopy = type === 'copy' && hasContent;
30529
- const hasOnClick = Boolean(onClick);
30530
- const hasCopy = Boolean(typeCopy && copyText);
30531
- const isInteractive = (hasOnClick || hasCopy || interactive) && !disabled;
30532
- const { copyIconSize, closeIconSize, buttonSize } = sizeMap[size];
30533
- const leftIcon = icon && (react.createElement("div", { className: Label_b('addon', { side: hasContent ? 'left' : undefined }) }, icon));
30534
- const content = hasContent && (react.createElement("div", { className: Label_b('text') },
30535
- react.createElement("div", { className: Label_b('content') }, children),
30536
- Boolean(value) && (react.createElement("div", { className: Label_b('value') },
30537
- react.createElement("div", { className: Label_b('separator') }, ":"),
30538
- react.createElement("div", { className: Label_b('key') }, value)))));
30539
- const handleCloseClick = (event) => {
30540
- if (hasOnClick) {
30541
- /* preventing event from bubbling */
30542
- event.stopPropagation();
30543
- }
30544
- if (onCloseClick) {
30545
- onCloseClick(event);
30546
- }
30547
- };
30548
- const handleClick = (event) => {
30549
- var _a;
30550
- /**
30551
- * Triggered only if the handler was triggered on the element itself, and not on the actionButton
30552
- * It is necessary that keyboard navigation works correctly
30553
- */
30554
- if (!((_a = actionButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
30555
- onClick === null || onClick === void 0 ? void 0 : onClick(event);
30556
- }
30557
- };
30558
- const { onKeyDown } = (0,useActionHandlers/* useActionHandlers */.N)(handleClick);
30559
- const renderLabel = (status) => {
30560
- let actionButton;
30561
- if (typeCopy) {
30562
- actionButton = (react.createElement(Button/* Button */.$, Object.assign({ ref: actionButtonRef, size: buttonSize, extraProps: { 'aria-label': copyButtonLabel || undefined } }, commonActionButtonProps),
30563
- react.createElement(Button/* Button */.$.Icon, null,
30564
- react.createElement(ClipboardIcon/* ClipboardIcon */.u, { status: status || 'pending', size: copyIconSize }))));
30565
- }
30566
- else if (typeClose) {
30567
- actionButton = (react.createElement(Button/* Button */.$, Object.assign({ ref: actionButtonRef, onClick: onCloseClick ? handleCloseClick : undefined, size: buttonSize, extraProps: { 'aria-label': closeButtonLabel || undefined } }, commonActionButtonProps),
30568
- react.createElement(Icon/* Icon */.I, { size: closeIconSize, data: Xmark/* default */.A })));
30569
- }
30570
- return (react.createElement("div", { ref: ref, role: hasOnClick ? 'button' : undefined, tabIndex: hasOnClick ? 0 : undefined, onClick: hasOnClick ? handleClick : undefined, onKeyDown: hasOnClick ? onKeyDown : undefined, className: Label_b({
30571
- theme,
30572
- size,
30573
- type,
30574
- 'is-interactive': isInteractive,
30575
- 'has-right-addon': Boolean(actionButton),
30576
- 'has-left-addon': Boolean(leftIcon),
30577
- disabled,
30578
- }, className), "data-qa": qa },
30579
- leftIcon,
30580
- content,
30581
- actionButton));
30582
- };
30583
- if (hasCopy && copyText && !hasOnClick) {
30584
- return (react.createElement(CopyToClipboard/* CopyToClipboard */.$, { text: copyText, onCopy: onCopy, timeout: 1000 }, (status) => renderLabel(status)));
30585
- }
30586
- return renderLabel();
30587
- });
30588
-
30536
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/Label/Label.js + 1 modules
30537
+ var Label = __webpack_require__(2768);
30589
30538
  ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/components/FileLink/FileLink.css
30590
30539
  // extracted by mini-css-extract-plugin
30591
30540
 
@@ -30634,7 +30583,7 @@ const FileLink = (props) => {
30634
30583
  const labelTheme = (FileExtensionThemes[fileExt] || 'unknown');
30635
30584
  const labelSize = LabelSizeMap[textSize];
30636
30585
  return (react.createElement("div", { className: FileLink_b({ ext: fileExt, type, size: textSize, theme }, className) },
30637
- react.createElement(Label, { className: FileLink_b('file-label'), size: labelSize, theme: labelTheme }, fileExt),
30586
+ react.createElement(Label/* Label */.J, { className: FileLink_b('file-label'), size: labelSize, theme: labelTheme }, fileExt),
30638
30587
  react.createElement("div", { className: FileLink_b('link') },
30639
30588
  react.createElement("a", Object.assign({ href: href, onClick: onClick, tabIndex: tabIndex, title: urlTitle }, (0,utils_url/* getLinkProps */.bI)(href, hostname), extraProps), text))));
30640
30589
  };
@@ -30892,7 +30841,7 @@ const themeMap = {
30892
30841
  'normal-dark': 'outlined-contrast',
30893
30842
  'pseudo-special': 'outlined-contrast',
30894
30843
  };
30895
- const utils_sizeMap = {
30844
+ const sizeMap = {
30896
30845
  xs: 's',
30897
30846
  ns: 's',
30898
30847
  s: 'm',
@@ -30903,7 +30852,7 @@ const utils_sizeMap = {
30903
30852
  promo: 'xl',
30904
30853
  };
30905
30854
  const toCommonView = (theme) => { var _a; return (_a = themeMap[theme]) !== null && _a !== void 0 ? _a : theme; };
30906
- const toCommonSize = (size) => { var _a; return (_a = utils_sizeMap[size]) !== null && _a !== void 0 ? _a : size; };
30855
+ const toCommonSize = (size) => { var _a; return (_a = sizeMap[size]) !== null && _a !== void 0 ? _a : size; };
30907
30856
 
30908
30857
  ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/components/Button/Button.css
30909
30858
  // extracted by mini-css-extract-plugin
@@ -31269,6 +31218,8 @@ const PromoFeaturesBlock = (props) => {
31269
31218
  };
31270
31219
  /* harmony default export */ const PromoFeaturesBlock_PromoFeaturesBlock = (PromoFeaturesBlock);
31271
31220
 
31221
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/hooks/useActionHandlers/useActionHandlers.js
31222
+ var useActionHandlers = __webpack_require__(5926);
31272
31223
  // EXTERNAL MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/components/ToggleArrow/ToggleArrow.js + 3 modules
31273
31224
  var ToggleArrow = __webpack_require__(2789);
31274
31225
  ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/hooks/useHeightCalculator.js
@@ -31800,15 +31751,13 @@ const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered
31800
31751
  }, [minImageHeight]);
31801
31752
  const onSelectTab = (0,react.useCallback)((id, e) => {
31802
31753
  setActiveTab(id);
31754
+ handleImageHeight();
31803
31755
  e.currentTarget.scrollIntoView({
31804
31756
  inline: 'center',
31805
31757
  behavior: 'smooth',
31806
31758
  block: 'nearest',
31807
31759
  });
31808
- }, []);
31809
- (0,react.useEffect)(() => {
31810
- handleImageHeight();
31811
- }, [activeTab, handleImageHeight]);
31760
+ }, [handleImageHeight]);
31812
31761
  if (activeTabData) {
31813
31762
  const themedImage = (0,utils_theme/* getThemedValue */.d)(activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.image, theme);
31814
31763
  imageProps = themedImage && (0,utils/* getMediaImage */.w)(themedImage);
@@ -31826,9 +31775,8 @@ const TabsBlock = ({ items, title, description, animated, tabsColSizes, centered
31826
31775
  all: types/* GridColumnOrderClasses */.lB.Last,
31827
31776
  md: types/* GridColumnOrderClasses */.lB.First,
31828
31777
  }, className: Tabs_b('col', { centered: centered }) },
31829
- (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) && (react.createElement("div", { style: { minHeight: mediaVideoHeight || minImageHeight } },
31830
- react.createElement("div", { ref: ref },
31831
- react.createElement(Media/* default */.A, Object.assign({}, (0,utils_theme/* getThemedValue */.d)(activeTabData.media, theme), { key: activeTab, className: Tabs_b('media', { border }), playVideo: play, height: mediaVideoHeight || undefined, onImageLoad: handleImageHeight }))))),
31778
+ react.createElement("div", { style: { minHeight: mediaVideoHeight || minImageHeight } }, (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.media) && (react.createElement("div", { ref: ref },
31779
+ react.createElement(Media/* default */.A, Object.assign({}, (0,utils_theme/* getThemedValue */.d)(activeTabData.media, theme), { key: activeTab, className: Tabs_b('media', { border }), playVideo: play, height: mediaVideoHeight || undefined, onImageLoad: handleImageHeight }))))),
31832
31780
  imageProps && (react.createElement(react.Fragment, null,
31833
31781
  react.createElement(FullscreenImage/* default */.A, Object.assign({}, imageProps, { imageClassName: Tabs_b('image', { border }) })))),
31834
31782
  (activeTabData === null || activeTabData === void 0 ? void 0 : activeTabData.caption) && (react.createElement("p", { className: Tabs_b('caption'), id: captionId },
@@ -32724,8 +32672,6 @@ const YandexForm = (props) => {
32724
32672
  };
32725
32673
  /* harmony default export */ const YandexForm_YandexForm = (YandexForm);
32726
32674
 
32727
- // EXTERNAL MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/context/formsContext/FormsContext.js
32728
- var FormsContext = __webpack_require__(9629);
32729
32675
  ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/models/guards.js
32730
32676
 
32731
32677
  function isBlock(block) {
@@ -32960,10 +32906,8 @@ HubspotForm.displayName = 'HubspotForm';
32960
32906
 
32961
32907
 
32962
32908
 
32963
-
32964
32909
  const InnerForm = (props) => {
32965
32910
  const { formData, onContentLoad, className } = props;
32966
- const formsConfig = (0,react.useContext)(FormsContext/* FormsContext */.Z);
32967
32911
  (0,react.useEffect)(() => {
32968
32912
  if (isHubspotDataForm(formData)) {
32969
32913
  onContentLoad();
@@ -32972,13 +32916,13 @@ const InnerForm = (props) => {
32972
32916
  if (isYandexDataForm(formData)) {
32973
32917
  const _a = formData.yandex, { onLoad } = _a, rest = (0,tslib_es6/* __rest */.Tt)(_a, ["onLoad"]);
32974
32918
  return (react.createElement("div", { className: className },
32975
- react.createElement(YandexForm_YandexForm, Object.assign({}, formsConfig.yandex, rest, { onLoad: () => {
32919
+ react.createElement(YandexForm_YandexForm, Object.assign({}, rest, { onLoad: () => {
32976
32920
  onContentLoad();
32977
32921
  onLoad === null || onLoad === void 0 ? void 0 : onLoad();
32978
32922
  } }))));
32979
32923
  }
32980
32924
  if (isHubspotDataForm(formData)) {
32981
- return (react.createElement(sub_blocks_HubspotForm, Object.assign({ createDOMElement: true }, formsConfig.hubspot, formData.hubspot)));
32925
+ return react.createElement(sub_blocks_HubspotForm, Object.assign({ createDOMElement: true }, formData.hubspot));
32982
32926
  }
32983
32927
  return null;
32984
32928
  };
@@ -33563,7 +33507,7 @@ const PriceDescription = (props) => {
33563
33507
  const labelTitle = label.text || (labelsDefaultText && labelsDefaultText[label.color]);
33564
33508
  const labelColor = (LabelColorsMapping[label.color] || 'unknown');
33565
33509
  const labelSize = PriceDescription_LabelSizeMap[label.size || descriptionSize];
33566
- return (react.createElement(Label, { className: PriceDescription_b('label', { size: labelSize }), theme: labelColor, size: labelSize }, labelTitle));
33510
+ return (react.createElement(Label/* Label */.J, { className: PriceDescription_b('label', { size: labelSize }), theme: labelColor, size: labelSize }, labelTitle));
33567
33511
  }, [descriptionSize, label, labelsDefaultText]);
33568
33512
  const titleElement = (0,react.useMemo)(() => {
33569
33513
  return (react.createElement("div", { className: PriceDescription_b('title', { size: titleSize }) },
@@ -33793,24 +33737,21 @@ const showFullscreenIcon = ({ youtube }) => !youtube;
33793
33737
 
33794
33738
 
33795
33739
 
33796
-
33797
33740
  const LayoutItem_b = (0,cn/* block */.om)('layout-item');
33798
33741
  const LayoutItem = (_a) => {
33799
33742
  var _b = _a.content, { links, buttons } = _b, content = (0,tslib_es6/* __rest */.Tt)(_b, ["links", "buttons"]), { metaInfo, media, border, fullscreen, icon, className, analyticsEvents, controlPosition = 'content' } = _a;
33800
33743
  const normalizedLinks = (0,react.useMemo)(() => getLayoutItemLinks(links), [links]);
33801
33744
  const areControlsInFooter = controlPosition === 'footer';
33802
- const theme = useTheme();
33803
33745
  const contentProps = Object.assign(Object.assign(Object.assign({}, content), (areControlsInFooter ? {} : { links: normalizedLinks, buttons })), { size: 's', colSizes: { all: 12, md: 12 } });
33804
33746
  const titleId = (0,useUniqId/* useUniqId */.u)();
33805
33747
  const renderMedia = () => {
33806
33748
  if (!media) {
33807
33749
  return null;
33808
33750
  }
33809
- const themedMedia = (0,utils_theme/* getThemedValue */.d)(media, theme);
33810
- return fullscreen && hasFullscreen(themedMedia) ? (react.createElement(FullscreenMedia/* default */.A, { showFullscreenIcon: showFullscreenIcon(themedMedia) }, (_a = {}) => {
33751
+ return fullscreen && hasFullscreen(media) ? (react.createElement(FullscreenMedia/* default */.A, { showFullscreenIcon: showFullscreenIcon(media) }, (_a = {}) => {
33811
33752
  var { className: mediaClassName, fullscreen: _fullscreen } = _a, fullscreenMediaProps = (0,tslib_es6/* __rest */.Tt)(_a, ["className", "fullscreen"]);
33812
- return (react.createElement(Media/* default */.A, Object.assign({}, themedMedia, fullscreenMediaProps, { className: LayoutItem_b('media', { border }, mediaClassName), analyticsEvents: analyticsEvents })));
33813
- })) : (react.createElement(Media/* default */.A, Object.assign({}, themedMedia, { className: LayoutItem_b('media', { border }), analyticsEvents: analyticsEvents })));
33753
+ return (react.createElement(Media/* default */.A, Object.assign({}, media, fullscreenMediaProps, { className: LayoutItem_b('media', { border }, mediaClassName), analyticsEvents: analyticsEvents })));
33754
+ })) : (react.createElement(Media/* default */.A, Object.assign({}, media, { className: LayoutItem_b('media', { border }), analyticsEvents: analyticsEvents })));
33814
33755
  };
33815
33756
  return (react.createElement("div", { className: LayoutItem_b(null, className) },
33816
33757
  renderMedia(),
@@ -34222,6 +34163,8 @@ const Logo = (props) => {
34222
34163
  };
34223
34164
  /* harmony default export */ const Logo_Logo = (Logo);
34224
34165
 
34166
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/icons/esm/Xmark.js
34167
+ var Xmark = __webpack_require__(3168);
34225
34168
  ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/icons/esm/Bars.js
34226
34169
 
34227
34170
  const Bars = (props) => (react.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", viewBox: "0 0 16 16" }, props),
@@ -34372,7 +34315,7 @@ const MobileNavigation = (_a) => {
34372
34315
 
34373
34316
  const Navigation_b = (0,cn/* block */.om)('navigation');
34374
34317
  const Navigation = ({ data, logo, className }) => {
34375
- const { leftItems, rightItems, iconSize = 20, withBorder = false, withBorderOnScroll = true, } = data;
34318
+ const { leftItems, rightItems, iconSize = 20, withBorder = false } = data;
34376
34319
  const [isSidebarOpened, setIsSidebarOpened] = (0,react.useState)(false);
34377
34320
  const [activeItemId, setActiveItemId] = (0,react.useState)(undefined);
34378
34321
  const [showBorder, setShowBorder] = (0,react.useState)(withBorder);
@@ -34384,8 +34327,6 @@ const Navigation = ({ data, logo, className }) => {
34384
34327
  };
34385
34328
  const onSidebarOpenedChange = (isOpen) => setIsSidebarOpened(isOpen);
34386
34329
  (0,react.useEffect)(() => {
34387
- if (!withBorderOnScroll)
34388
- return () => { };
34389
34330
  const showBorderOnScroll = () => {
34390
34331
  if (!showBorder) {
34391
34332
  setShowBorder(window.scrollY > 0);
@@ -34507,17 +34448,15 @@ const PageConstructor = (props) => {
34507
34448
  /* harmony export */ });
34508
34449
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);
34509
34450
  /* harmony import */ var _components_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8592);
34510
- /* harmony import */ var _context_analyticsContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5487);
34511
- /* harmony import */ var _context_formsContext_FormsContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9629);
34512
- /* harmony import */ var _context_imageContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9017);
34513
- /* harmony import */ var _context_localeContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7599);
34514
- /* harmony import */ var _context_locationContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8827);
34451
+ /* harmony import */ var _context_analyticsContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(5487);
34452
+ /* harmony import */ var _context_imageContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9017);
34453
+ /* harmony import */ var _context_localeContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7599);
34454
+ /* harmony import */ var _context_locationContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8827);
34515
34455
  /* harmony import */ var _context_mapsContext_mapsContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8095);
34516
- /* harmony import */ var _context_mobileContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2895);
34517
- /* harmony import */ var _context_projectSettingsContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5032);
34518
- /* harmony import */ var _context_ssrContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(3983);
34519
- /* harmony import */ var _context_theme__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9516);
34520
-
34456
+ /* harmony import */ var _context_mobileContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2895);
34457
+ /* harmony import */ var _context_projectSettingsContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5032);
34458
+ /* harmony import */ var _context_ssrContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(3983);
34459
+ /* harmony import */ var _context_theme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9516);
34521
34460
 
34522
34461
 
34523
34462
 
@@ -34530,19 +34469,18 @@ const PageConstructor = (props) => {
34530
34469
 
34531
34470
 
34532
34471
  const PageConstructorProvider = (props) => {
34533
- const { isMobile, mapsContext = _context_mapsContext_mapsContext__WEBPACK_IMPORTED_MODULE_1__/* .initialMapValue */ .Ul, locale = {}, location = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = _components_constants__WEBPACK_IMPORTED_MODULE_2__/* .DEFAULT_THEME */ .SS, children, image = {}, forms = _context_formsContext_FormsContext__WEBPACK_IMPORTED_MODULE_3__/* .DEFAULT_FORMS_CONTEXT_VALUE */ .s, } = props;
34472
+ const { isMobile, mapsContext = _context_mapsContext_mapsContext__WEBPACK_IMPORTED_MODULE_1__/* .initialMapValue */ .Ul, locale = {}, location = {}, analytics = {}, ssrConfig = {}, projectSettings = {}, theme = _components_constants__WEBPACK_IMPORTED_MODULE_2__/* .DEFAULT_THEME */ .SS, children, image = {}, } = props;
34534
34473
  /* eslint-disable react/jsx-key */
34535
34474
  const context = [
34536
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_theme__WEBPACK_IMPORTED_MODULE_4__/* .ThemeContext */ .D.Provider, { value: { theme } }),
34537
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_projectSettingsContext__WEBPACK_IMPORTED_MODULE_5__/* .ProjectSettingsContext */ .m.Provider, { value: projectSettings }),
34538
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_localeContext__WEBPACK_IMPORTED_MODULE_6__/* .LocaleContext */ .U.Provider, { value: locale }),
34539
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_imageContext__WEBPACK_IMPORTED_MODULE_7__/* .ImageContext */ .Z.Provider, { value: image }),
34540
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_locationContext__WEBPACK_IMPORTED_MODULE_8__/* .LocationContext */ .d.Provider, { value: location }),
34541
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_mobileContext__WEBPACK_IMPORTED_MODULE_9__/* .MobileContext */ .G.Provider, { value: Boolean(isMobile) }),
34475
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_theme__WEBPACK_IMPORTED_MODULE_3__/* .ThemeContext */ .D.Provider, { value: { theme } }),
34476
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_projectSettingsContext__WEBPACK_IMPORTED_MODULE_4__/* .ProjectSettingsContext */ .m.Provider, { value: projectSettings }),
34477
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_localeContext__WEBPACK_IMPORTED_MODULE_5__/* .LocaleContext */ .U.Provider, { value: locale }),
34478
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_imageContext__WEBPACK_IMPORTED_MODULE_6__/* .ImageContext */ .Z.Provider, { value: image }),
34479
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_locationContext__WEBPACK_IMPORTED_MODULE_7__/* .LocationContext */ .d.Provider, { value: location }),
34480
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_mobileContext__WEBPACK_IMPORTED_MODULE_8__/* .MobileContext */ .G.Provider, { value: Boolean(isMobile) }),
34542
34481
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_mapsContext_mapsContext__WEBPACK_IMPORTED_MODULE_1__/* .MapsContext */ .xQ.Provider, { value: mapsContext }),
34543
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_analyticsContext__WEBPACK_IMPORTED_MODULE_10__/* .AnalyticsContext */ .I.Provider, { value: analytics }),
34544
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_formsContext_FormsContext__WEBPACK_IMPORTED_MODULE_3__/* .FormsContext */ .Z.Provider, { value: forms }),
34545
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_ssrContext__WEBPACK_IMPORTED_MODULE_11__/* .SSRContext */ .Y.Provider, { value: { isServer: ssrConfig === null || ssrConfig === void 0 ? void 0 : ssrConfig.isServer } }),
34482
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_analyticsContext__WEBPACK_IMPORTED_MODULE_9__/* .AnalyticsContext */ .I.Provider, { value: analytics }),
34483
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_context_ssrContext__WEBPACK_IMPORTED_MODULE_10__/* .SSRContext */ .Y.Provider, { value: { isServer: ssrConfig === null || ssrConfig === void 0 ? void 0 : ssrConfig.isServer } }),
34546
34484
  ].reduceRight((prev, provider) => react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(provider, {}, prev), children);
34547
34485
  /* eslint-enable react/jsx-key */
34548
34486
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, context);
@@ -34821,22 +34759,6 @@ const AnimateContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext({ animat
34821
34759
  const BlockIdContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext('');
34822
34760
 
34823
34761
 
34824
- /***/ }),
34825
-
34826
- /***/ 9629:
34827
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
34828
-
34829
- "use strict";
34830
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
34831
- /* harmony export */ Z: () => (/* binding */ FormsContext),
34832
- /* harmony export */ s: () => (/* binding */ DEFAULT_FORMS_CONTEXT_VALUE)
34833
- /* harmony export */ });
34834
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6540);
34835
-
34836
- const DEFAULT_FORMS_CONTEXT_VALUE = {};
34837
- const FormsContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(DEFAULT_FORMS_CONTEXT_VALUE);
34838
-
34839
-
34840
34762
  /***/ }),
34841
34763
 
34842
34764
  /***/ 9017:
@@ -36182,6 +36104,127 @@ Icon.displayName = 'Icon';
36182
36104
  Icon.prefix = '';
36183
36105
 
36184
36106
 
36107
+ /***/ }),
36108
+
36109
+ /***/ 2768:
36110
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
36111
+
36112
+ "use strict";
36113
+
36114
+ // EXPORTS
36115
+ __webpack_require__.d(__webpack_exports__, {
36116
+ J: () => (/* binding */ Label)
36117
+ });
36118
+
36119
+ // EXTERNAL MODULE: ./node_modules/react/index.js
36120
+ var react = __webpack_require__(6540);
36121
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/icons/esm/Xmark.js
36122
+ var Xmark = __webpack_require__(3168);
36123
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/hooks/useActionHandlers/useActionHandlers.js
36124
+ var useActionHandlers = __webpack_require__(5926);
36125
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/Button/Button.js + 2 modules
36126
+ var Button = __webpack_require__(5767);
36127
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/ClipboardIcon/ClipboardIcon.js + 3 modules
36128
+ var ClipboardIcon = __webpack_require__(9671);
36129
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/CopyToClipboard/CopyToClipboard.js
36130
+ var CopyToClipboard = __webpack_require__(7732);
36131
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/Icon/Icon.js + 3 modules
36132
+ var Icon = __webpack_require__(9504);
36133
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/utils/cn.js
36134
+ var cn = __webpack_require__(9356);
36135
+ ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/Label/Label.css
36136
+ // extracted by mini-css-extract-plugin
36137
+
36138
+ ;// CONCATENATED MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/Label/Label.js
36139
+
36140
+
36141
+
36142
+
36143
+
36144
+
36145
+
36146
+
36147
+
36148
+ const b = (0,cn/* block */.om)('label');
36149
+ const sizeMap = {
36150
+ xs: { copyIconSize: 12, closeIconSize: 12, buttonSize: 'xs' },
36151
+ s: { copyIconSize: 14, closeIconSize: 14, buttonSize: 's' },
36152
+ m: { copyIconSize: 16, closeIconSize: 16, buttonSize: 'm' },
36153
+ };
36154
+ const commonActionButtonProps = {
36155
+ pin: 'brick-round',
36156
+ className: b('addon', {
36157
+ side: 'right',
36158
+ interactive: true,
36159
+ }),
36160
+ };
36161
+ const Label = react.forwardRef(function Label(props, ref) {
36162
+ const { type = 'default', theme = 'normal', size = 'xs', icon, children, onCloseClick, className, disabled, copyText, closeButtonLabel, copyButtonLabel, interactive = false, value, onCopy, onClick, qa, } = props;
36163
+ const actionButtonRef = react.useRef(null);
36164
+ const hasContent = Boolean(children !== '' && react.Children.count(children) > 0);
36165
+ const typeClose = type === 'close' && hasContent;
36166
+ const typeCopy = type === 'copy' && hasContent;
36167
+ const hasOnClick = Boolean(onClick);
36168
+ const hasCopy = Boolean(typeCopy && copyText);
36169
+ const isInteractive = (hasOnClick || hasCopy || interactive) && !disabled;
36170
+ const { copyIconSize, closeIconSize, buttonSize } = sizeMap[size];
36171
+ const leftIcon = icon && (react.createElement("div", { className: b('addon', { side: hasContent ? 'left' : undefined }) }, icon));
36172
+ const content = hasContent && (react.createElement("div", { className: b('text') },
36173
+ react.createElement("div", { className: b('content') }, children),
36174
+ Boolean(value) && (react.createElement("div", { className: b('value') },
36175
+ react.createElement("div", { className: b('separator') }, ":"),
36176
+ react.createElement("div", { className: b('key') }, value)))));
36177
+ const handleCloseClick = (event) => {
36178
+ if (hasOnClick) {
36179
+ /* preventing event from bubbling */
36180
+ event.stopPropagation();
36181
+ }
36182
+ if (onCloseClick) {
36183
+ onCloseClick(event);
36184
+ }
36185
+ };
36186
+ const handleClick = (event) => {
36187
+ var _a;
36188
+ /**
36189
+ * Triggered only if the handler was triggered on the element itself, and not on the actionButton
36190
+ * It is necessary that keyboard navigation works correctly
36191
+ */
36192
+ if (!((_a = actionButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(event.target))) {
36193
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
36194
+ }
36195
+ };
36196
+ const { onKeyDown } = (0,useActionHandlers/* useActionHandlers */.N)(handleClick);
36197
+ const renderLabel = (status) => {
36198
+ let actionButton;
36199
+ if (typeCopy) {
36200
+ actionButton = (react.createElement(Button/* Button */.$, Object.assign({ ref: actionButtonRef, size: buttonSize, extraProps: { 'aria-label': copyButtonLabel || undefined } }, commonActionButtonProps),
36201
+ react.createElement(Button/* Button */.$.Icon, null,
36202
+ react.createElement(ClipboardIcon/* ClipboardIcon */.u, { status: status || 'pending', size: copyIconSize }))));
36203
+ }
36204
+ else if (typeClose) {
36205
+ actionButton = (react.createElement(Button/* Button */.$, Object.assign({ ref: actionButtonRef, onClick: onCloseClick ? handleCloseClick : undefined, size: buttonSize, extraProps: { 'aria-label': closeButtonLabel || undefined } }, commonActionButtonProps),
36206
+ react.createElement(Icon/* Icon */.I, { size: closeIconSize, data: Xmark/* default */.A })));
36207
+ }
36208
+ return (react.createElement("div", { ref: ref, role: hasOnClick ? 'button' : undefined, tabIndex: hasOnClick ? 0 : undefined, onClick: hasOnClick ? handleClick : undefined, onKeyDown: hasOnClick ? onKeyDown : undefined, className: b({
36209
+ theme,
36210
+ size,
36211
+ type,
36212
+ 'is-interactive': isInteractive,
36213
+ 'has-right-addon': Boolean(actionButton),
36214
+ 'has-left-addon': Boolean(leftIcon),
36215
+ disabled,
36216
+ }, className), "data-qa": qa },
36217
+ leftIcon,
36218
+ content,
36219
+ actionButton));
36220
+ };
36221
+ if (hasCopy && copyText && !hasOnClick) {
36222
+ return (react.createElement(CopyToClipboard/* CopyToClipboard */.$, { text: copyText, onCopy: onCopy, timeout: 1000 }, (status) => renderLabel(status)));
36223
+ }
36224
+ return renderLabel();
36225
+ });
36226
+
36227
+
36185
36228
  /***/ }),
36186
36229
 
36187
36230
  /***/ 4664:
@@ -58565,7 +58608,7 @@ var _typeof = (__webpack_require__(3738)["default"]);
58565
58608
  var toPrimitive = __webpack_require__(9045);
58566
58609
  function toPropertyKey(t) {
58567
58610
  var i = toPrimitive(t, "string");
58568
- return "symbol" == _typeof(i) ? i : i + "";
58611
+ return "symbol" == _typeof(i) ? i : String(i);
58569
58612
  }
58570
58613
  module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
58571
58614
 
@@ -58837,7 +58880,7 @@ function toPrimitive(t, r) {
58837
58880
 
58838
58881
  function toPropertyKey(t) {
58839
58882
  var i = toPrimitive(t, "string");
58840
- return "symbol" == (0,esm_typeof/* default */.A)(i) ? i : i + "";
58883
+ return "symbol" == (0,esm_typeof/* default */.A)(i) ? i : String(i);
58841
58884
  }
58842
58885
 
58843
58886
  /***/ }),