@redneckz/wildless-cms-uni-blocks 0.14.205 → 0.14.206

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.
@@ -4106,7 +4106,7 @@
4106
4106
  }
4107
4107
  };
4108
4108
 
4109
- const Contacts = JSX(({ className = '', items }) => (jsxs("div", { className: className, children: [items?.length ? items.map(renderContactsGroup) : null, jsx(LinkButton, { version: "primary", className: "w-full", href: "https://beta.rshb.ru/natural/feedback/question", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })] })));
4109
+ const Contacts = JSX(({ className = '', items }) => (jsxs("div", { className: className, children: [items?.length ? items.map(renderContactsGroup) : null, jsx(LinkButton, { version: "primary", className: "w-full", href: "https://www.rshb.ru/natural/feedback/question", target: "_blank", ariaLabel: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C", text: "\u041E\u0431\u0440\u0430\u0442\u043D\u0430\u044F \u0441\u0432\u044F\u0437\u044C" })] })));
4110
4110
  const renderContactsGroup = (item, i) => (jsxs("div", { className: "mb-m space-y-m", children: [jsx("div", { children: jsx(Text, { size: "text-l", font: "font-medium", children: item?.title }) }), jsx("div", { className: "space-y-m", children: item.items?.map(renderContact) })] }, String(i)));
4111
4111
  const renderContact = (item, index) => (jsxs("div", { className: "space-y-2xs", children: [jsx("div", { children: renderText(item.type, item.text) }), jsx(Paragraph, { size: "text-s", font: "font-light", color: "text-secondary-text", children: item.description })] }, String(index)));
4112
4112
  const renderText = (type, text = '') => {
@@ -5882,12 +5882,21 @@
5882
5882
  useEventListener(globalThis, 'click', navigationHandler);
5883
5883
  };
5884
5884
  const navigationHandler = (ev) => {
5885
- const target = ev.target;
5886
- if (target?.tagName === 'A' && isURL(target.href)) {
5885
+ const element = getAnchorElement(ev.target);
5886
+ if (isURL(element?.href)) {
5887
5887
  ev.preventDefault();
5888
- const url = adjustSessionQuery(target.href) || target.href;
5889
- globalThis.location.href = url;
5888
+ const url = adjustSessionQuery(element?.href) || element?.href;
5889
+ if (url) {
5890
+ globalThis.location.href = url;
5891
+ }
5892
+ }
5893
+ };
5894
+ const getAnchorElement = (target) => {
5895
+ let _target = target;
5896
+ while (Boolean(_target) && _target.tagName !== 'A') {
5897
+ _target = _target?.parentNode;
5890
5898
  }
5899
+ return _target;
5891
5900
  };
5892
5901
 
5893
5902
  const COOKIE_DIALOG_ID = 'cookie';
@@ -6040,7 +6049,7 @@
6040
6049
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6041
6050
  });
6042
6051
 
6043
- const packageVersion = "0.14.204";
6052
+ const packageVersion = "0.14.205";
6044
6053
 
6045
6054
  exports.Blocks = Blocks;
6046
6055
  exports.ContentPage = ContentPage;