@roottale/cms-renderer-next 0.45.0 → 0.47.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.
@@ -22,7 +22,10 @@ import {
22
22
  Marquee,
23
23
  StaggerGroup,
24
24
  StaggerItem
25
- } from "./chunk-Z3ZSCPG4.js";
25
+ } from "./chunk-ZL2NA3QT.js";
26
+ import {
27
+ LeadFormMeta
28
+ } from "./chunk-VG6UUF4D.js";
26
29
  import {
27
30
  collectCategories,
28
31
  collectCategoriesWithCounts,
@@ -32,7 +35,7 @@ import {
32
35
  } from "./chunk-FUA5H6JE.js";
33
36
  import {
34
37
  SectionSchema
35
- } from "./chunk-GUV5WHD5.js";
38
+ } from "./chunk-UM37DOIK.js";
36
39
  import {
37
40
  HeroCarouselViewport
38
41
  } from "./chunk-OMXEU4LS.js";
@@ -126,6 +129,7 @@ function RootTaleLeadForm(props) {
126
129
  "data-roottale-cms": "lead-form",
127
130
  className: formClass,
128
131
  children: [
132
+ /* @__PURE__ */ jsx(LeadFormMeta, { formId: "contact" }),
129
133
  heading ? /* @__PURE__ */ jsx("h2", { className: "rt-cms-lead-heading", children: heading }) : null,
130
134
  description ? /* @__PURE__ */ jsx("p", { className: "rt-cms-lead-description", children: description }) : null,
131
135
  redirectUrl ? /* @__PURE__ */ jsx("input", { type: "hidden", name: "_redirect_url", value: redirectUrl }) : null,
@@ -270,7 +274,7 @@ function RootTaleLeadForm(props) {
270
274
  /* @__PURE__ */ jsx("strong", { children: "(\uD544\uC218)" }),
271
275
  " \uAC1C\uC778\uC815\uBCF4 \uC218\uC9D1\xB7\uC774\uC6A9\uC5D0 \uB3D9\uC758\uD569\uB2C8\uB2E4. (\uC218\uC9D1 \uD56D\uBAA9:",
272
276
  " ",
273
- isMedical ? "\uC774\uB984\xB7\uC5F0\uB77D\uCC98\xB7\uC774\uBA54\uC77C\xB7\uC0C1\uB2F4 \uB0B4\uC6A9(\uC791\uC131 \uC2DC)" : "\uC774\uB984\xB7\uC5F0\uB77D\uCC98\xB7\uC774\uBA54\uC77C\xB7\uC0AC\uC5C5\uCCB4\uBA85",
277
+ isMedical ? "\uC774\uB984\xB7\uC5F0\uB77D\uCC98\xB7\uC774\uBA54\uC77C\xB7\uC0C1\uB2F4 \uB0B4\uC6A9(\uC791\uC131 \uC2DC)\xB7\uC0AC\uC774\uD2B8 \uC774\uC6A9 \uAE30\uB85D(\uBC29\uBB38 \uD398\uC774\uC9C0\xB7\uC0C1\uD638\uC791\uC6A9)" : "\uC774\uB984\xB7\uC5F0\uB77D\uCC98\xB7\uC774\uBA54\uC77C\xB7\uC0AC\uC5C5\uCCB4\uBA85\xB7\uC0AC\uC774\uD2B8 \uC774\uC6A9 \uAE30\uB85D(\uBC29\uBB38 \uD398\uC774\uC9C0\xB7\uC0C1\uD638\uC791\uC6A9)",
274
278
  ". \uBCF4\uAD00 \uAE30\uAC04: \uBB38\uC758 \uC885\uB8CC \uD6C4 3\uB144)"
275
279
  ] })
276
280
  ] }),
@@ -364,6 +368,11 @@ function CtaLink({
364
368
  function ctaTrackForHref(href) {
365
369
  return href.startsWith("tel:") ? "cta_banner" : "cta_hero";
366
370
  }
371
+ function contactHrefTrack(href) {
372
+ if (href.startsWith("tel:")) return "phone_click";
373
+ if (href.startsWith("mailto:")) return "email_click";
374
+ return void 0;
375
+ }
367
376
  function TemplateHeroProof({
368
377
  proofMetrics
369
378
  }) {
@@ -813,8 +822,24 @@ function FooterContact({
813
822
  }
814
823
  return /* @__PURE__ */ jsxs2("address", { className: "rt-tpl-footer-contact", children: [
815
824
  contactInfo.address ? /* @__PURE__ */ jsx2("span", { children: contactInfo.address }) : null,
816
- contactInfo.phone ? /* @__PURE__ */ jsx2("a", { href: telHref(contactInfo.phone), children: contactInfo.phone }) : null,
817
- contactInfo.email ? /* @__PURE__ */ jsx2("a", { href: `mailto:${contactInfo.email}`, children: contactInfo.email }) : null
825
+ contactInfo.phone ? /* @__PURE__ */ jsx2(
826
+ "a",
827
+ {
828
+ href: telHref(contactInfo.phone),
829
+ "data-track": "phone_click",
830
+ "data-track-placement": "footer",
831
+ children: contactInfo.phone
832
+ }
833
+ ) : null,
834
+ contactInfo.email ? /* @__PURE__ */ jsx2(
835
+ "a",
836
+ {
837
+ href: `mailto:${contactInfo.email}`,
838
+ "data-track": "email_click",
839
+ "data-track-placement": "footer",
840
+ children: contactInfo.email
841
+ }
842
+ ) : null
818
843
  ] });
819
844
  }
820
845
  function FooterLegal(section) {
@@ -1631,7 +1656,18 @@ function ContactActions({
1631
1656
  actions
1632
1657
  }) {
1633
1658
  if (!actions || actions.length === 0) return null;
1634
- return /* @__PURE__ */ jsx2("ul", { className: "rt-tpl-contact-actions", children: actions.map((action) => /* @__PURE__ */ jsx2("li", { "data-kind": action.kind, children: /* @__PURE__ */ jsx2("a", { href: action.href, children: action.label }) }, `${action.label}-${action.href}`)) });
1659
+ return /* @__PURE__ */ jsx2("ul", { className: "rt-tpl-contact-actions", children: actions.map((action) => {
1660
+ const track = contactHrefTrack(action.href);
1661
+ return /* @__PURE__ */ jsx2("li", { "data-kind": action.kind, children: /* @__PURE__ */ jsx2(
1662
+ "a",
1663
+ {
1664
+ href: action.href,
1665
+ "data-track": track,
1666
+ "data-track-placement": track ? "contact_actions" : void 0,
1667
+ children: action.label
1668
+ }
1669
+ ) }, `${action.label}-${action.href}`);
1670
+ }) });
1635
1671
  }
1636
1672
  function TemplateContactChannelCards(section) {
1637
1673
  const { heading, channels, map, mapEmbedUrl, actions } = section.props;
@@ -1673,7 +1709,8 @@ function TemplateContactChannelCards(section) {
1673
1709
  {
1674
1710
  className: "rt-tpl-contact-channel-card",
1675
1711
  href: channel.href,
1676
- "data-track": channel.href.startsWith("tel:") ? "cta_call" : "cta_banner",
1712
+ "data-track": channel.href.startsWith("tel:") ? "cta_call" : channel.href.startsWith("mailto:") ? "email_click" : "cta_banner",
1713
+ "data-track-placement": channel.href.startsWith("mailto:") ? "contact_channels" : void 0,
1677
1714
  children: content
1678
1715
  }
1679
1716
  ) : /* @__PURE__ */ jsx2("div", { className: "rt-tpl-contact-channel-card", children: content })
@@ -1731,7 +1768,16 @@ function TemplateContactVisitBand(section) {
1731
1768
  /* @__PURE__ */ jsx2("h3", { className: "rt-tpl-contact-visit-title", children: "\uC624\uC2DC\uB294 \uAE38" }),
1732
1769
  /* @__PURE__ */ jsx2(ContactMapBlock, { map, mapEmbedUrl }),
1733
1770
  address ? /* @__PURE__ */ jsx2("address", { className: "rt-tpl-contact-visit-address", children: address }) : null,
1734
- mapAction ? /* @__PURE__ */ jsx2("a", { className: "rt-tpl-contact-visit-link", href: mapAction.href, children: mapAction.label }) : null
1771
+ mapAction ? /* @__PURE__ */ jsx2(
1772
+ "a",
1773
+ {
1774
+ className: "rt-tpl-contact-visit-link",
1775
+ href: mapAction.href,
1776
+ "data-track": contactHrefTrack(mapAction.href),
1777
+ "data-track-placement": contactHrefTrack(mapAction.href) ? "visit" : void 0,
1778
+ children: mapAction.label
1779
+ }
1780
+ ) : null
1735
1781
  ] }),
1736
1782
  /* @__PURE__ */ jsxs2("section", { className: "rt-tpl-contact-visit-panel", "aria-label": "\uC804\uD654", children: [
1737
1783
  /* @__PURE__ */ jsx2("h3", { className: "rt-tpl-contact-visit-title", children: "\uC804\uD654" }),
@@ -1745,7 +1791,16 @@ function TemplateContactVisitBand(section) {
1745
1791
  }
1746
1792
  ) : null,
1747
1793
  hours ? /* @__PURE__ */ jsx2(ContactHoursSummary, { hours: hours.slice(0, 2) }) : null,
1748
- ctaAction ? /* @__PURE__ */ jsx2("a", { className: "rt-tpl-btn rt-tpl-btn--primary", href: ctaAction.href, children: ctaAction.label }) : null
1794
+ ctaAction ? /* @__PURE__ */ jsx2(
1795
+ "a",
1796
+ {
1797
+ className: "rt-tpl-btn rt-tpl-btn--primary",
1798
+ href: ctaAction.href,
1799
+ "data-track": contactHrefTrack(ctaAction.href),
1800
+ "data-track-placement": contactHrefTrack(ctaAction.href) ? "visit" : void 0,
1801
+ children: ctaAction.label
1802
+ }
1803
+ ) : null
1749
1804
  ] })
1750
1805
  ] })
1751
1806
  ] })
@@ -3102,7 +3157,7 @@ function archiveGroupTitle(group) {
3102
3157
  }
3103
3158
  function archivePostHref(collectionKey, slug, collections) {
3104
3159
  const collection = collections?.find((item) => item.key === collectionKey);
3105
- const basePath = collection?.basePath ?? defaultArchiveBasePath(collectionKey);
3160
+ const basePath = collection?.basePath || defaultArchiveBasePath(collectionKey);
3106
3161
  const trimmedBase = basePath.replace(/\/+$/, "");
3107
3162
  if (collection?.detail === false) return trimmedBase;
3108
3163
  return `${trimmedBase}/${slug}`;
@@ -3234,7 +3289,9 @@ function makeCollectionPostHref(collections) {
3234
3289
  const path = resolvePostPath(post, collections);
3235
3290
  if (path) return path;
3236
3291
  const collection = resolvePostCollection(post, collections);
3237
- if (collection && collection.detail === false) return collection.basePath;
3292
+ if (collection && collection.detail === false && collection.basePath) {
3293
+ return collection.basePath;
3294
+ }
3238
3295
  return defaultPostHref(post);
3239
3296
  };
3240
3297
  }
@@ -3524,4 +3581,4 @@ export {
3524
3581
  RootTalePage,
3525
3582
  RenderTiptap
3526
3583
  };
3527
- //# sourceMappingURL=chunk-45KYMMDY.js.map
3584
+ //# sourceMappingURL=chunk-ZHXYCABN.js.map