@yext/pages-components 1.1.5 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/debugger-3RbOKIha.cjs +1 -0
- package/dist/{debugger-rlNxnZtt.js → debugger-DrRgTaNB.js} +123 -102
- package/dist/{index-BsTia22i.js → index-59MyeK1e.js} +528 -523
- package/dist/{index-BqwUybQE.js → index-B5KCvNJE.js} +1 -1
- package/dist/{index-BsYy4LPR.cjs → index-COhY74cc.cjs} +41 -41
- package/dist/{index-DmzJWbSH.cjs → index-DjKBlVXj.cjs} +1 -1
- package/dist/pages-components.cjs +1 -1
- package/dist/pages-components.js +1 -1
- package/package.json +1 -1
- package/dist/debugger-C8RcTf7G.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-COhY74cc.cjs");function er(n){const t=[];let e=-1;for(;++e<n.footnoteOrder.length;){const r=n.footnoteById[n.footnoteOrder[e]];if(!r)continue;const i=n.all(r),l=String(r.identifier).toUpperCase(),o=m.normalizeUri(l.toLowerCase());let a=0;const s=[];for(;++a<=n.footnoteCounts[l];){const p={type:"element",tagName:"a",properties:{href:"#"+n.clobberPrefix+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:n.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(p)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const p=c.children[c.children.length-1];p&&p.type==="text"?p.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else i.push(...s);const d={type:"element",tagName:"li",properties:{id:n.clobberPrefix+"fn-"+o},children:n.wrap(i,!0)};n.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:n.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(n.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:n.footnoteLabel}]},{type:"text",value:`
|
|
2
2
|
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(t,!0)},{type:"text",value:`
|
|
3
3
|
`}]}}function yt(n,t){const e=m.createState(n,t),r=e.one(n,null),i=er(e);return i&&r.children.push({type:"text",value:`
|
|
4
4
|
`},i),Array.isArray(r)?{type:"root",children:r}:r}const tr=function(n,t){return n&&"run"in n?rr(n,t):ir(n||t)};function rr(n,t){return(e,r,i)=>{n.run(yt(e,t),r,l=>{i(l)})}}function ir(n){return t=>yt(t,n)}const Pe=["http","https","mailto","tel"];function xt(n){const t=(n||"").trim(),e=t.charAt(0);if(e==="#"||e==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<Pe.length;){const l=Pe[i];if(r===l.length&&t.slice(0,l.length).toLowerCase()===l)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*!
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-COhY74cc.cjs");exports.Address=e.Address;exports.AddressSchema=e.AddressSchema;exports.AggregateRatingSchema=e.AggregateRatingSchema;exports.Analytics=e.Analytics;exports.AnalyticsContext=e.AnalyticsContext;exports.AnalyticsProvider=e.AnalyticsProvider;exports.AnalyticsScopeProvider=e.AnalyticsScopeProvider;exports.BaiduMaps=e.BaiduMaps;exports.BaseSchema=e.BaseSchema;exports.BingMaps=e.BingMaps;exports.Clusterer=e.Clusterer;exports.CoordinateClass=e.Coordinate;exports.Day=e.Day;exports.Event=e.Event;exports.FAQPage=e.FAQPage;exports.GoogleMaps=e.GoogleMaps;exports.HoursStatus=e.HoursStatus;exports.HoursTable=e.HoursTable;exports.Image=e.Image;exports.ImageLayoutOption=e.ImageLayoutOption;exports.LeafletMaps=e.LeafletMaps;exports.LegacyRichText=e.LegacyRichText;exports.LexicalRichText=e.LexicalRichText;exports.Link=e.Link;exports.ListingPublisherOption=e.ListingPublisherOption;exports.LocalBusiness=e.LocalBusiness;exports.LocationMap=e.LocationMap;exports.LocationSchema=e.LocationSchema;exports.Map=e.Map;exports.MapProviderOption=e.MapProviderOption;exports.MapQuestMaps=e.MapQuestMaps;exports.MapboxMaps=e.MapboxMaps;exports.Marker=e.Marker;exports.OfferSchema=e.OfferSchema;exports.OpeningHoursSchema=e.OpeningHoursSchema;exports.OrganizationSchema=e.OrganizationSchema;exports.PerformerSchema=e.PerformerSchema;exports.PhotoGallerySchema=e.PhotoGallerySchema;exports.PhotoSchema=e.PhotoSchema;exports.Product=e.Product;exports.ReviewSchema=e.ReviewSchema;exports.SchemaWrapper=e.SchemaWrapper;exports.debuggingParamDetected=e.debuggingParamDetected;exports.getDirections=e.getDirections;exports.useAnalytics=e.useAnalytics;exports.useClusterContext=e.useClusterContext;exports.useIdentify=e.useIdentify;exports.useMapContext=e.useMapContext;exports.usePageView=e.usePageView;exports.useScope=e.useScope;exports.useTrack=e.useTrack;
|
package/dist/pages-components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, a2 as t, ab as i, x as o, y as r, E as c, H as n, ac as p, Z as u, ad as g, Q as h, ai as m, X as l, _ as S, a1 as d, ae as M, V as P, W as y, I as A, J as L, ag as x, U as C, T as f, K as O, L as b, $ as v, S as B, a3 as R, N as T, M as D, ah as H, af as I, P as k, a5 as w, a4 as G, a7 as Q, a6 as z, a8 as E, a9 as F, a0 as V, aa as W, Y as J, F as K, w as N, z as U, R as X, D as Y, O as Z, C as _, G as $, B as j } from "./index-
|
|
1
|
+
import { A as e, a2 as t, ab as i, x as o, y as r, E as c, H as n, ac as p, Z as u, ad as g, Q as h, ai as m, X as l, _ as S, a1 as d, ae as M, V as P, W as y, I as A, J as L, ag as x, U as C, T as f, K as O, L as b, $ as v, S as B, a3 as R, N as T, M as D, ah as H, af as I, P as k, a5 as w, a4 as G, a7 as Q, a6 as z, a8 as E, a9 as F, a0 as V, aa as W, Y as J, F as K, w as N, z as U, R as X, D as Y, O as Z, C as _, G as $, B as j } from "./index-59MyeK1e.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Address,
|
|
4
4
|
t as AddressSchema,
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-BsYy4LPR.cjs"),p=require("react"),k=require("react-dom");function N(){return i.getRuntime().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,k.createPortal(i.jsxRuntimeExports.jsx(R,{}),document.body))}const S=(e,n)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,l=e.dataset.yaEventname,c=t||n;return{action:s,originalEventName:c?`${c}_${l}`:l,scope:c}},B=(e,n)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(n),t&&s.push(t);return s},h={},w="YA_NO_SCOPE",y=(e,n,s,t)=>{h.hasOwnProperty(e)?h[e].events.map(l=>l.el).includes(t)||(h[e].events=[...h[e].events,{eventData:n,el:t}]):h[e]={scopeEl:s||t,events:[{eventData:n,el:t}]}};function R(){const[e,n]=p.useState(),[s,t]=p.useState([]),[l,c]=p.useState(!1),o=r=>{n(e===r?void 0:r)};return p.useEffect(()=>(document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((u,g)=>{const a=u.closest("[data-ya-scope]"),x=a==null?void 0:a.dataset.yaScope,d=S(u,x);u.addEventListener("mouseenter",()=>{t([{elem:u,key:`${d.originalEventName}_${g}`,action:d.action,originalEventName:d.originalEventName,scope:d.scope}])}),u.addEventListener("mouseleave",()=>{t([])});const b=u.dataset.yaScopeoverride;b?y(b,d,a,u):[x,...B(u,"[data-ya-scope]").map(m=>m.dataset.yaScope)].forEach(m=>{y(m||w,d,a,u)})}),c(!0),()=>{document.documentElement.classList.remove("xYextDebug")}),[]),l?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger",children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-toggles",children:[i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>o("Events"),children:"Events"}),i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>o("Scopes"),children:"Scopes"})]}),e&&i.jsxRuntimeExports.jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?i.jsxRuntimeExports.jsx(O,{data:h,setTooltips:t}):i.jsxRuntimeExports.jsx($,{data:h,setTooltips:t})})]}),i.jsxRuntimeExports.jsx(D,{tooltips:s})]}):null}const C=()=>{const e={};return Object.values(h).forEach(n=>{n.events.forEach(s=>{const{originalEventName:t}=s.eventData;e[t]||(e[t]=[]),!e[t].find(l=>l.el===s.el)&&e[t].push(s)})}),e};function O(e){const{setTooltips:n}=e,[s,t]=p.useState([]),[l,c]=p.useState(""),o=(r,u)=>{s.forEach(a=>a.classList.remove("analytics-event-highlight"));const g=r.map(a=>(a.el.scrollIntoView({behavior:"smooth",block:"nearest"}),a.el.classList.add("analytics-event-highlight"),a.el));t(g),c(u),n(r.map((a,x)=>({elem:a.el,key:`${a.eventData.originalEventName}_${x}`,action:a.eventData.action,originalEventName:a.eventData.originalEventName,scope:a.eventData.scope})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.entries(C()).map(([r,u],g)=>{const a=`${r}_${g}`;return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":a===l}),onClick:()=>o(u,a),children:r})},a)})})]})}function $(e){const{data:n,setTooltips:s}=e,[t,l]=p.useState(""),c=o=>{const r=n[o];r.scopeEl&&(r.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),l(o),s(r.events.map((u,g)=>{const a=u.eventData;return{elem:u.el,key:`${a.originalEventName}_${g}`,action:a.action,originalEventName:a.originalEventName,scope:a.scope}})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.keys(n).map((o,r)=>{if(o!==w)return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":o===t}),onClick:()=>c(o),children:o})},o+r)})})]})}function D(e){const n=p.useRef({});return p.useEffect(()=>{if(n.current)for(const s of Object.values(n.current)){const t=Object.values(n.current).map(l=>l.el).filter(l=>l!==s.el);Y(s,t),s.el.style.visibility="visible"}},[e.tooltips]),i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:e.tooltips.map(s=>i.jsxRuntimeExports.jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?n.current[s.key]={el:t,tooltip:s}:delete n.current[s.key]},children:[i.jsxRuntimeExports.jsxs("span",{children:["Action: ",s.action]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Scope: ",s.scope]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Original Event Name: ",s.originalEventName]})]},s.key))})}function Y(e,n){for(let s=0;s<9;s++){const t=I(e.tooltip.elem.getBoundingClientRect(),e.el,s);if(e.el.style.inset=`${t.top} auto auto ${t.left}`,!!A(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let c=!0;for(let o=0;o<n.length;o++){const r=n[o];T(e.el,r)&&(c=!1)}if(c)break}}function T(e,n){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,l=s+e.clientHeight,c=t+e.clientWidth,o=n.getBoundingClientRect().top+window.scrollY,r=n.getBoundingClientRect().left,u=o+n.clientHeight,g=r+n.clientWidth,a=(x,d,b,E,m,j,v,f)=>b<=m&&m<=v&&E<=j&&j<=f||b<=x&&x<=v&&E<=d&&d<=f||b<=x&&x<=v&&E<=j&&j<=f||b<=m&&m<=v&&E<=d&&d<=f;return a(t,s,r,o,c,l,g,u)||a(r,o,t,s,g,u,c,l)}function A(e,n,s,t){return e<0||s>window.innerWidth||n<0||t>document.documentElement.scrollHeight}function I(e,n,s){const t=n.clientHeight,l=n.clientWidth;let c,o;switch(s){case 0:{o=window.scrollY+e.top-t+"px",c=e.left-l+"px";break}case 1:{o=window.scrollY+e.top-t+"px",c=e.left+"px";break}case 2:{o=window.scrollY+e.top-t+"px",c=e.right+"px";break}case 3:{o=window.scrollY+e.top-t+"px",c=e.right-l+"px";break}case 4:{o=window.scrollY+e.bottom+"px",c=e.left-l+"px";break}case 5:{o=window.scrollY+e.bottom+"px",c=e.left+"px";break}case 6:{o=window.scrollY+e.bottom+"px",c=e.right-l+"px";break}case 7:{o=window.scrollY+e.bottom+"px",c=e.right+"px";break}default:o=0,c=0}return{top:o,left:c}}exports.AnalyticsDebuggerInternal=R;exports.default=N;
|