@yext/pages-components 1.0.7 → 1.0.8

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-Bunl_w4Q.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:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-CMl7zBKp.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)"}/*!
package/dist/index.d.cts CHANGED
@@ -1571,8 +1571,8 @@ interface WeekType {
1571
1571
  sunday?: DayType;
1572
1572
  }
1573
1573
  interface DayType {
1574
- isClosed: boolean;
1575
- openIntervals: IntervalType[];
1574
+ isClosed?: boolean;
1575
+ openIntervals?: IntervalType[];
1576
1576
  }
1577
1577
  interface HolidayType extends DayType {
1578
1578
  date: string;
@@ -1686,82 +1686,10 @@ declare const SchemaWrapper: (json: any) => string;
1686
1686
  declare const BaseSchema: (document: Record<string, any>, schemaType: string) => {
1687
1687
  "@context": string;
1688
1688
  "@type": string;
1689
- name: any;
1690
- };
1689
+ name: string;
1690
+ } | undefined;
1691
1691
 
1692
- declare const Event: (document: Record<string, any>, schemaType?: string) => {
1693
- offers?: {
1694
- "@type": string;
1695
- url: string | undefined;
1696
- priceCurrency: string | undefined;
1697
- price: string | undefined;
1698
- priceValidUntil: string | undefined;
1699
- itemCondition: string | undefined;
1700
- availability: string | undefined;
1701
- } | undefined;
1702
- organizer?: {
1703
- "@type": string;
1704
- name: string | undefined;
1705
- url: string | undefined;
1706
- } | undefined;
1707
- performer?: {
1708
- "@type": string;
1709
- name: string;
1710
- } | undefined;
1711
- startDate: any;
1712
- endDate: any;
1713
- description: any;
1714
- eventAttendanceMode: any;
1715
- eventStatus: any;
1716
- address?: {
1717
- "@type": string;
1718
- streetAddress: string;
1719
- addressLocality: string;
1720
- addressRegion: string | undefined;
1721
- postalCode: string;
1722
- addressCountry: string;
1723
- } | undefined;
1724
- "@type": string;
1725
- name: any;
1726
- image?: undefined;
1727
- "@context": string;
1728
- } | {
1729
- offers?: {
1730
- "@type": string;
1731
- url: string | undefined;
1732
- priceCurrency: string | undefined;
1733
- price: string | undefined;
1734
- priceValidUntil: string | undefined;
1735
- itemCondition: string | undefined;
1736
- availability: string | undefined;
1737
- } | undefined;
1738
- organizer?: {
1739
- "@type": string;
1740
- name: string | undefined;
1741
- url: string | undefined;
1742
- } | undefined;
1743
- performer?: {
1744
- "@type": string;
1745
- name: string;
1746
- } | undefined;
1747
- startDate: any;
1748
- endDate: any;
1749
- description: any;
1750
- eventAttendanceMode: any;
1751
- eventStatus: any;
1752
- address?: {
1753
- "@type": string;
1754
- streetAddress: string;
1755
- addressLocality: string;
1756
- addressRegion: string | undefined;
1757
- postalCode: string;
1758
- addressCountry: string;
1759
- } | undefined;
1760
- "@type": string;
1761
- name: any;
1762
- image: string[];
1763
- "@context": string;
1764
- };
1692
+ declare const Event: (document: Record<string, any>, schemaType?: string) => any;
1765
1693
 
1766
1694
  declare const LocalBusiness: (document: Record<string, any>, schemaType?: string) => {
1767
1695
  description: any;
@@ -1777,9 +1705,9 @@ declare const LocalBusiness: (document: Record<string, any>, schemaType?: string
1777
1705
  postalCode: string;
1778
1706
  addressCountry: string;
1779
1707
  } | undefined;
1780
- "@context": string;
1781
- "@type": string;
1782
- name: any;
1708
+ "@context"?: string | undefined;
1709
+ "@type"?: string | undefined;
1710
+ name?: string | undefined;
1783
1711
  } | {
1784
1712
  description: any;
1785
1713
  telephone: any;
@@ -1794,9 +1722,9 @@ declare const LocalBusiness: (document: Record<string, any>, schemaType?: string
1794
1722
  postalCode: string;
1795
1723
  addressCountry: string;
1796
1724
  } | undefined;
1797
- "@context": string;
1798
- "@type": string;
1799
- name: any;
1725
+ "@context"?: string | undefined;
1726
+ "@type"?: string | undefined;
1727
+ name?: string | undefined;
1800
1728
  } | {
1801
1729
  description: any;
1802
1730
  telephone: any;
@@ -1811,9 +1739,9 @@ declare const LocalBusiness: (document: Record<string, any>, schemaType?: string
1811
1739
  postalCode: string;
1812
1740
  addressCountry: string;
1813
1741
  } | undefined;
1814
- "@context": string;
1815
- "@type": string;
1816
- name: any;
1742
+ "@context"?: string | undefined;
1743
+ "@type"?: string | undefined;
1744
+ name?: string | undefined;
1817
1745
  } | {
1818
1746
  description: any;
1819
1747
  telephone: any;
@@ -1828,88 +1756,12 @@ declare const LocalBusiness: (document: Record<string, any>, schemaType?: string
1828
1756
  postalCode: string;
1829
1757
  addressCountry: string;
1830
1758
  } | undefined;
1831
- "@context": string;
1832
- "@type": string;
1833
- name: any;
1759
+ "@context"?: string | undefined;
1760
+ "@type"?: string | undefined;
1761
+ name?: string | undefined;
1834
1762
  };
1835
1763
 
1836
- declare const Product: (document: Record<string, any>, schemaType?: string) => {
1837
- description: any;
1838
- sku: any;
1839
- mpn: any;
1840
- brand: {
1841
- "@type": string;
1842
- name: any;
1843
- };
1844
- offers?: {
1845
- "@type": string;
1846
- url: string | undefined;
1847
- priceCurrency: string | undefined;
1848
- price: string | undefined;
1849
- priceValidUntil: string | undefined;
1850
- itemCondition: string | undefined;
1851
- availability: string | undefined;
1852
- } | undefined;
1853
- aggregateRating?: {
1854
- "@type": string;
1855
- ratingValue: string | undefined;
1856
- reviewCount: string | undefined;
1857
- } | undefined;
1858
- review?: {
1859
- "@type": string;
1860
- reviewRating: {
1861
- "@type": string;
1862
- ratingValue: string | undefined;
1863
- bestRating: string | undefined;
1864
- };
1865
- author: {
1866
- "@type": string;
1867
- name: string | undefined;
1868
- };
1869
- } | undefined;
1870
- image?: undefined;
1871
- "@context": string;
1872
- "@type": string;
1873
- name: any;
1874
- } | {
1875
- description: any;
1876
- sku: any;
1877
- mpn: any;
1878
- brand: {
1879
- "@type": string;
1880
- name: any;
1881
- };
1882
- offers?: {
1883
- "@type": string;
1884
- url: string | undefined;
1885
- priceCurrency: string | undefined;
1886
- price: string | undefined;
1887
- priceValidUntil: string | undefined;
1888
- itemCondition: string | undefined;
1889
- availability: string | undefined;
1890
- } | undefined;
1891
- aggregateRating?: {
1892
- "@type": string;
1893
- ratingValue: string | undefined;
1894
- reviewCount: string | undefined;
1895
- } | undefined;
1896
- review?: {
1897
- "@type": string;
1898
- reviewRating: {
1899
- "@type": string;
1900
- ratingValue: string | undefined;
1901
- bestRating: string | undefined;
1902
- };
1903
- author: {
1904
- "@type": string;
1905
- name: string | undefined;
1906
- };
1907
- } | undefined;
1908
- image: string[];
1909
- "@context": string;
1910
- "@type": string;
1911
- name: any;
1912
- };
1764
+ declare const Product: (document: Record<string, any>, schemaType?: string) => any;
1913
1765
 
1914
1766
  type RTF2 = {
1915
1767
  json?: Record<string, any>;
@@ -1923,6 +1775,7 @@ type RichTextFAQ = {
1923
1775
  question: string;
1924
1776
  answerV2: RTF2;
1925
1777
  };
1778
+ declare function getRichTextContent(answer: RTF2): string;
1926
1779
  declare const FAQPage: (data: FAQ[]) => {
1927
1780
  "@context": string;
1928
1781
  "@type": string;
@@ -1934,7 +1787,7 @@ declare const FAQPage: (data: FAQ[]) => {
1934
1787
  text: string;
1935
1788
  };
1936
1789
  } | undefined)[];
1937
- };
1790
+ } | undefined;
1938
1791
 
1939
1792
  type Location = {
1940
1793
  name?: string;
@@ -1975,8 +1828,9 @@ type Offer = {
1975
1828
  price?: string;
1976
1829
  priceValidUntil?: string;
1977
1830
  itemCondition?: string;
1978
- availability?: string;
1831
+ availability?: (typeof availabilityOptions)[number];
1979
1832
  };
1833
+ declare const availabilityOptions: string[];
1980
1834
  declare const OfferSchema: (offer?: Offer) => false | {
1981
1835
  offers: {
1982
1836
  "@type": string;
@@ -2001,9 +1855,9 @@ declare const PerformerSchema: (performers?: string[]) => false | {
2001
1855
  };
2002
1856
  declare const OrganizationSchema: (org?: Organization) => false | {
2003
1857
  organizer: {
1858
+ url?: string | undefined;
2004
1859
  "@type": string;
2005
1860
  name: string | undefined;
2006
- url: string | undefined;
2007
1861
  };
2008
1862
  };
2009
1863
 
@@ -2031,16 +1885,16 @@ type AggregateRating = {
2031
1885
  };
2032
1886
  declare const ReviewSchema: (review?: Review) => false | {
2033
1887
  review: {
1888
+ author?: {
1889
+ "@type": string;
1890
+ name: string;
1891
+ } | undefined;
2034
1892
  "@type": string;
2035
1893
  reviewRating: {
2036
1894
  "@type": string;
2037
1895
  ratingValue: string | undefined;
2038
1896
  bestRating: string | undefined;
2039
1897
  };
2040
- author: {
2041
- "@type": string;
2042
- name: string | undefined;
2043
- };
2044
1898
  };
2045
1899
  };
2046
1900
  declare const AggregateRatingSchema: (rating?: AggregateRating) => {
@@ -2063,4 +1917,4 @@ declare const LeafletMaps: MapProvider;
2063
1917
 
2064
1918
  declare const MapQuestMaps: MapProvider;
2065
1919
 
2066
- export { Address, type AddressLine, type AddressLineProps, type AddressProps, AddressSchema, type AddressType, type AggregateRating, AggregateRatingSchema, Analytics, AnalyticsContext, AnalyticsProvider, AnalyticsScopeProvider, BaiduMaps, BaseSchema, BingMaps, type CTA, type CTAWithChildrenLinkProps, type CTAWithoutChildrenLinkProps, type ClusterTemplateProps, Clusterer, type ClustererContextType, type ClustererProps, type ComplexImageType, type Coordinate, Coordinate$1 as CoordinateClass, Day, type DayOfWeekNames, type DayType, type DirectionCoordinate, Event, FAQPage, type GetDirectionsConfig, GoogleMaps, type HREFLinkProps, type HolidayType, HoursStatus, HoursTable, type HoursTableDayData, type HoursTableProps, type HoursType, Image, type ImageLayout, ImageLayoutOption, type ImageProps, type ImageType, type IntervalType, LeafletMaps, LegacyRichText, LexicalRichText, type LexicalRichTextProps, Link, type LinkProps, type LinkType, LinkTypes, type ListingPublisher, ListingPublisherOption, type ListingType, LocalBusiness, type Location, LocationMap, type LocationMapProps, LocationSchema, Map, type MapContextType, type MapProps, type MapProvider$1 as MapProvider, MapProviderOption, MapQuestMaps, MapboxMaps, Marker, type MarkerProps, type Offer, OfferSchema, OpeningHoursSchema, type Organization, OrganizationSchema, PerformerSchema, type PhotoGallery, PhotoGallerySchema, PhotoSchema, type PinStoreType, Product, type Review, ReviewSchema, SchemaWrapper, type ThumbnailType, type WeekType, debuggingParamDetected, getDirections, useAnalytics, useClusterContext, useIdentify, useMapContext, usePageView, useScope, useTrack };
1920
+ export { Address, type AddressLine, type AddressLineProps, type AddressProps, AddressSchema, type AddressType, type AggregateRating, AggregateRatingSchema, Analytics, AnalyticsContext, AnalyticsProvider, AnalyticsScopeProvider, BaiduMaps, BaseSchema, BingMaps, type CTA, type CTAWithChildrenLinkProps, type CTAWithoutChildrenLinkProps, type ClusterTemplateProps, Clusterer, type ClustererContextType, type ClustererProps, type ComplexImageType, type Coordinate, Coordinate$1 as CoordinateClass, Day, type DayOfWeekNames, type DayType, type DirectionCoordinate, Event, FAQPage, type GetDirectionsConfig, GoogleMaps, type HREFLinkProps, type HolidayType, HoursStatus, HoursTable, type HoursTableDayData, type HoursTableProps, type HoursType, Image, type ImageLayout, ImageLayoutOption, type ImageProps, type ImageType, type IntervalType, LeafletMaps, LegacyRichText, LexicalRichText, type LexicalRichTextProps, Link, type LinkProps, type LinkType, LinkTypes, type ListingPublisher, ListingPublisherOption, type ListingType, LocalBusiness, type Location, LocationMap, type LocationMapProps, LocationSchema, Map, type MapContextType, type MapProps, type MapProvider$1 as MapProvider, MapProviderOption, MapQuestMaps, MapboxMaps, Marker, type MarkerProps, type Offer, OfferSchema, OpeningHoursSchema, type Organization, OrganizationSchema, PerformerSchema, type PhotoGallery, PhotoGallerySchema, PhotoSchema, type PinStoreType, Product, type Review, ReviewSchema, SchemaWrapper, type ThumbnailType, type WeekType, debuggingParamDetected, getDirections, getRichTextContent, useAnalytics, useClusterContext, useIdentify, useMapContext, usePageView, useScope, useTrack };
package/dist/index.d.ts CHANGED
@@ -1571,8 +1571,8 @@ interface WeekType {
1571
1571
  sunday?: DayType;
1572
1572
  }
1573
1573
  interface DayType {
1574
- isClosed: boolean;
1575
- openIntervals: IntervalType[];
1574
+ isClosed?: boolean;
1575
+ openIntervals?: IntervalType[];
1576
1576
  }
1577
1577
  interface HolidayType extends DayType {
1578
1578
  date: string;
@@ -1686,82 +1686,10 @@ declare const SchemaWrapper: (json: any) => string;
1686
1686
  declare const BaseSchema: (document: Record<string, any>, schemaType: string) => {
1687
1687
  "@context": string;
1688
1688
  "@type": string;
1689
- name: any;
1690
- };
1689
+ name: string;
1690
+ } | undefined;
1691
1691
 
1692
- declare const Event: (document: Record<string, any>, schemaType?: string) => {
1693
- offers?: {
1694
- "@type": string;
1695
- url: string | undefined;
1696
- priceCurrency: string | undefined;
1697
- price: string | undefined;
1698
- priceValidUntil: string | undefined;
1699
- itemCondition: string | undefined;
1700
- availability: string | undefined;
1701
- } | undefined;
1702
- organizer?: {
1703
- "@type": string;
1704
- name: string | undefined;
1705
- url: string | undefined;
1706
- } | undefined;
1707
- performer?: {
1708
- "@type": string;
1709
- name: string;
1710
- } | undefined;
1711
- startDate: any;
1712
- endDate: any;
1713
- description: any;
1714
- eventAttendanceMode: any;
1715
- eventStatus: any;
1716
- address?: {
1717
- "@type": string;
1718
- streetAddress: string;
1719
- addressLocality: string;
1720
- addressRegion: string | undefined;
1721
- postalCode: string;
1722
- addressCountry: string;
1723
- } | undefined;
1724
- "@type": string;
1725
- name: any;
1726
- image?: undefined;
1727
- "@context": string;
1728
- } | {
1729
- offers?: {
1730
- "@type": string;
1731
- url: string | undefined;
1732
- priceCurrency: string | undefined;
1733
- price: string | undefined;
1734
- priceValidUntil: string | undefined;
1735
- itemCondition: string | undefined;
1736
- availability: string | undefined;
1737
- } | undefined;
1738
- organizer?: {
1739
- "@type": string;
1740
- name: string | undefined;
1741
- url: string | undefined;
1742
- } | undefined;
1743
- performer?: {
1744
- "@type": string;
1745
- name: string;
1746
- } | undefined;
1747
- startDate: any;
1748
- endDate: any;
1749
- description: any;
1750
- eventAttendanceMode: any;
1751
- eventStatus: any;
1752
- address?: {
1753
- "@type": string;
1754
- streetAddress: string;
1755
- addressLocality: string;
1756
- addressRegion: string | undefined;
1757
- postalCode: string;
1758
- addressCountry: string;
1759
- } | undefined;
1760
- "@type": string;
1761
- name: any;
1762
- image: string[];
1763
- "@context": string;
1764
- };
1692
+ declare const Event: (document: Record<string, any>, schemaType?: string) => any;
1765
1693
 
1766
1694
  declare const LocalBusiness: (document: Record<string, any>, schemaType?: string) => {
1767
1695
  description: any;
@@ -1777,9 +1705,9 @@ declare const LocalBusiness: (document: Record<string, any>, schemaType?: string
1777
1705
  postalCode: string;
1778
1706
  addressCountry: string;
1779
1707
  } | undefined;
1780
- "@context": string;
1781
- "@type": string;
1782
- name: any;
1708
+ "@context"?: string | undefined;
1709
+ "@type"?: string | undefined;
1710
+ name?: string | undefined;
1783
1711
  } | {
1784
1712
  description: any;
1785
1713
  telephone: any;
@@ -1794,9 +1722,9 @@ declare const LocalBusiness: (document: Record<string, any>, schemaType?: string
1794
1722
  postalCode: string;
1795
1723
  addressCountry: string;
1796
1724
  } | undefined;
1797
- "@context": string;
1798
- "@type": string;
1799
- name: any;
1725
+ "@context"?: string | undefined;
1726
+ "@type"?: string | undefined;
1727
+ name?: string | undefined;
1800
1728
  } | {
1801
1729
  description: any;
1802
1730
  telephone: any;
@@ -1811,9 +1739,9 @@ declare const LocalBusiness: (document: Record<string, any>, schemaType?: string
1811
1739
  postalCode: string;
1812
1740
  addressCountry: string;
1813
1741
  } | undefined;
1814
- "@context": string;
1815
- "@type": string;
1816
- name: any;
1742
+ "@context"?: string | undefined;
1743
+ "@type"?: string | undefined;
1744
+ name?: string | undefined;
1817
1745
  } | {
1818
1746
  description: any;
1819
1747
  telephone: any;
@@ -1828,88 +1756,12 @@ declare const LocalBusiness: (document: Record<string, any>, schemaType?: string
1828
1756
  postalCode: string;
1829
1757
  addressCountry: string;
1830
1758
  } | undefined;
1831
- "@context": string;
1832
- "@type": string;
1833
- name: any;
1759
+ "@context"?: string | undefined;
1760
+ "@type"?: string | undefined;
1761
+ name?: string | undefined;
1834
1762
  };
1835
1763
 
1836
- declare const Product: (document: Record<string, any>, schemaType?: string) => {
1837
- description: any;
1838
- sku: any;
1839
- mpn: any;
1840
- brand: {
1841
- "@type": string;
1842
- name: any;
1843
- };
1844
- offers?: {
1845
- "@type": string;
1846
- url: string | undefined;
1847
- priceCurrency: string | undefined;
1848
- price: string | undefined;
1849
- priceValidUntil: string | undefined;
1850
- itemCondition: string | undefined;
1851
- availability: string | undefined;
1852
- } | undefined;
1853
- aggregateRating?: {
1854
- "@type": string;
1855
- ratingValue: string | undefined;
1856
- reviewCount: string | undefined;
1857
- } | undefined;
1858
- review?: {
1859
- "@type": string;
1860
- reviewRating: {
1861
- "@type": string;
1862
- ratingValue: string | undefined;
1863
- bestRating: string | undefined;
1864
- };
1865
- author: {
1866
- "@type": string;
1867
- name: string | undefined;
1868
- };
1869
- } | undefined;
1870
- image?: undefined;
1871
- "@context": string;
1872
- "@type": string;
1873
- name: any;
1874
- } | {
1875
- description: any;
1876
- sku: any;
1877
- mpn: any;
1878
- brand: {
1879
- "@type": string;
1880
- name: any;
1881
- };
1882
- offers?: {
1883
- "@type": string;
1884
- url: string | undefined;
1885
- priceCurrency: string | undefined;
1886
- price: string | undefined;
1887
- priceValidUntil: string | undefined;
1888
- itemCondition: string | undefined;
1889
- availability: string | undefined;
1890
- } | undefined;
1891
- aggregateRating?: {
1892
- "@type": string;
1893
- ratingValue: string | undefined;
1894
- reviewCount: string | undefined;
1895
- } | undefined;
1896
- review?: {
1897
- "@type": string;
1898
- reviewRating: {
1899
- "@type": string;
1900
- ratingValue: string | undefined;
1901
- bestRating: string | undefined;
1902
- };
1903
- author: {
1904
- "@type": string;
1905
- name: string | undefined;
1906
- };
1907
- } | undefined;
1908
- image: string[];
1909
- "@context": string;
1910
- "@type": string;
1911
- name: any;
1912
- };
1764
+ declare const Product: (document: Record<string, any>, schemaType?: string) => any;
1913
1765
 
1914
1766
  type RTF2 = {
1915
1767
  json?: Record<string, any>;
@@ -1923,6 +1775,7 @@ type RichTextFAQ = {
1923
1775
  question: string;
1924
1776
  answerV2: RTF2;
1925
1777
  };
1778
+ declare function getRichTextContent(answer: RTF2): string;
1926
1779
  declare const FAQPage: (data: FAQ[]) => {
1927
1780
  "@context": string;
1928
1781
  "@type": string;
@@ -1934,7 +1787,7 @@ declare const FAQPage: (data: FAQ[]) => {
1934
1787
  text: string;
1935
1788
  };
1936
1789
  } | undefined)[];
1937
- };
1790
+ } | undefined;
1938
1791
 
1939
1792
  type Location = {
1940
1793
  name?: string;
@@ -1975,8 +1828,9 @@ type Offer = {
1975
1828
  price?: string;
1976
1829
  priceValidUntil?: string;
1977
1830
  itemCondition?: string;
1978
- availability?: string;
1831
+ availability?: (typeof availabilityOptions)[number];
1979
1832
  };
1833
+ declare const availabilityOptions: string[];
1980
1834
  declare const OfferSchema: (offer?: Offer) => false | {
1981
1835
  offers: {
1982
1836
  "@type": string;
@@ -2001,9 +1855,9 @@ declare const PerformerSchema: (performers?: string[]) => false | {
2001
1855
  };
2002
1856
  declare const OrganizationSchema: (org?: Organization) => false | {
2003
1857
  organizer: {
1858
+ url?: string | undefined;
2004
1859
  "@type": string;
2005
1860
  name: string | undefined;
2006
- url: string | undefined;
2007
1861
  };
2008
1862
  };
2009
1863
 
@@ -2031,16 +1885,16 @@ type AggregateRating = {
2031
1885
  };
2032
1886
  declare const ReviewSchema: (review?: Review) => false | {
2033
1887
  review: {
1888
+ author?: {
1889
+ "@type": string;
1890
+ name: string;
1891
+ } | undefined;
2034
1892
  "@type": string;
2035
1893
  reviewRating: {
2036
1894
  "@type": string;
2037
1895
  ratingValue: string | undefined;
2038
1896
  bestRating: string | undefined;
2039
1897
  };
2040
- author: {
2041
- "@type": string;
2042
- name: string | undefined;
2043
- };
2044
1898
  };
2045
1899
  };
2046
1900
  declare const AggregateRatingSchema: (rating?: AggregateRating) => {
@@ -2063,4 +1917,4 @@ declare const LeafletMaps: MapProvider;
2063
1917
 
2064
1918
  declare const MapQuestMaps: MapProvider;
2065
1919
 
2066
- export { Address, type AddressLine, type AddressLineProps, type AddressProps, AddressSchema, type AddressType, type AggregateRating, AggregateRatingSchema, Analytics, AnalyticsContext, AnalyticsProvider, AnalyticsScopeProvider, BaiduMaps, BaseSchema, BingMaps, type CTA, type CTAWithChildrenLinkProps, type CTAWithoutChildrenLinkProps, type ClusterTemplateProps, Clusterer, type ClustererContextType, type ClustererProps, type ComplexImageType, type Coordinate, Coordinate$1 as CoordinateClass, Day, type DayOfWeekNames, type DayType, type DirectionCoordinate, Event, FAQPage, type GetDirectionsConfig, GoogleMaps, type HREFLinkProps, type HolidayType, HoursStatus, HoursTable, type HoursTableDayData, type HoursTableProps, type HoursType, Image, type ImageLayout, ImageLayoutOption, type ImageProps, type ImageType, type IntervalType, LeafletMaps, LegacyRichText, LexicalRichText, type LexicalRichTextProps, Link, type LinkProps, type LinkType, LinkTypes, type ListingPublisher, ListingPublisherOption, type ListingType, LocalBusiness, type Location, LocationMap, type LocationMapProps, LocationSchema, Map, type MapContextType, type MapProps, type MapProvider$1 as MapProvider, MapProviderOption, MapQuestMaps, MapboxMaps, Marker, type MarkerProps, type Offer, OfferSchema, OpeningHoursSchema, type Organization, OrganizationSchema, PerformerSchema, type PhotoGallery, PhotoGallerySchema, PhotoSchema, type PinStoreType, Product, type Review, ReviewSchema, SchemaWrapper, type ThumbnailType, type WeekType, debuggingParamDetected, getDirections, useAnalytics, useClusterContext, useIdentify, useMapContext, usePageView, useScope, useTrack };
1920
+ export { Address, type AddressLine, type AddressLineProps, type AddressProps, AddressSchema, type AddressType, type AggregateRating, AggregateRatingSchema, Analytics, AnalyticsContext, AnalyticsProvider, AnalyticsScopeProvider, BaiduMaps, BaseSchema, BingMaps, type CTA, type CTAWithChildrenLinkProps, type CTAWithoutChildrenLinkProps, type ClusterTemplateProps, Clusterer, type ClustererContextType, type ClustererProps, type ComplexImageType, type Coordinate, Coordinate$1 as CoordinateClass, Day, type DayOfWeekNames, type DayType, type DirectionCoordinate, Event, FAQPage, type GetDirectionsConfig, GoogleMaps, type HREFLinkProps, type HolidayType, HoursStatus, HoursTable, type HoursTableDayData, type HoursTableProps, type HoursType, Image, type ImageLayout, ImageLayoutOption, type ImageProps, type ImageType, type IntervalType, LeafletMaps, LegacyRichText, LexicalRichText, type LexicalRichTextProps, Link, type LinkProps, type LinkType, LinkTypes, type ListingPublisher, ListingPublisherOption, type ListingType, LocalBusiness, type Location, LocationMap, type LocationMapProps, LocationSchema, Map, type MapContextType, type MapProps, type MapProvider$1 as MapProvider, MapProviderOption, MapQuestMaps, MapboxMaps, Marker, type MarkerProps, type Offer, OfferSchema, OpeningHoursSchema, type Organization, OrganizationSchema, PerformerSchema, type PhotoGallery, PhotoGallerySchema, PhotoSchema, type PinStoreType, Product, type Review, ReviewSchema, SchemaWrapper, type ThumbnailType, type WeekType, debuggingParamDetected, getDirections, getRichTextContent, useAnalytics, useClusterContext, useIdentify, useMapContext, usePageView, useScope, useTrack };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Bunl_w4Q.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.LinkTypes=e.LinkTypes;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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CMl7zBKp.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.LinkTypes=e.LinkTypes;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.getRichTextContent=e.getRichTextContent;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;
@@ -1,4 +1,4 @@
1
- import { A as e, a3 as t, ac as i, x as o, y as r, E as c, H as n, ad as p, _ as u, ae as g, R as h, aj as m, Y as l, $ as S, a2 as d, af as M, W as y, X as P, I as L, J as A, ah as x, V as C, U as f, K as O, N as T, L as b, a0 as v, T as B, a4 as R, O as k, M as D, ai as H, ag as I, Q as w, a6 as G, a5 as Q, a8 as z, a7 as E, a9 as F, aa as V, a1 as W, ab as j, Z as J, F as K, w as N, z as U, S as X, D as Y, P as Z, C as _, G as $, B as q } from "./index-1vQ0rgr7.js";
1
+ import { A as e, a4 as t, ac as i, x as o, y as r, E as c, H as n, ae as p, _ as g, af as u, R as h, ak as m, Y as l, $ as S, a2 as d, ag as M, W as y, X as P, I as L, J as x, ai as A, V as C, U as f, K as O, N as T, L as R, a0 as b, T as k, a5 as v, O as B, M as D, aj as H, ah as I, Q as w, a7 as G, a6 as Q, a9 as z, a8 as E, aa as F, ab as V, a1 as W, ad as j, Z as J, F as K, w as N, a3 as U, z as X, S as Y, D as Z, P as _, C as $, G as q, B as aa } from "./index-DmrYUFTF.js";
2
2
  export {
3
3
  e as Address,
4
4
  t as AddressSchema,
@@ -8,8 +8,8 @@ export {
8
8
  c as AnalyticsProvider,
9
9
  n as AnalyticsScopeProvider,
10
10
  p as BaiduMaps,
11
- u as BaseSchema,
12
- g as BingMaps,
11
+ g as BaseSchema,
12
+ u as BingMaps,
13
13
  h as Clusterer,
14
14
  m as CoordinateClass,
15
15
  l as Day,
@@ -19,17 +19,17 @@ export {
19
19
  y as HoursStatus,
20
20
  P as HoursTable,
21
21
  L as Image,
22
- A as ImageLayoutOption,
23
- x as LeafletMaps,
22
+ x as ImageLayoutOption,
23
+ A as LeafletMaps,
24
24
  C as LegacyRichText,
25
25
  f as LexicalRichText,
26
26
  O as Link,
27
27
  T as LinkTypes,
28
- b as ListingPublisherOption,
29
- v as LocalBusiness,
30
- B as LocationMap,
31
- R as LocationSchema,
32
- k as Map,
28
+ R as ListingPublisherOption,
29
+ b as LocalBusiness,
30
+ k as LocationMap,
31
+ v as LocationSchema,
32
+ B as Map,
33
33
  D as MapProviderOption,
34
34
  H as MapQuestMaps,
35
35
  I as MapboxMaps,
@@ -45,11 +45,12 @@ export {
45
45
  J as SchemaWrapper,
46
46
  K as debuggingParamDetected,
47
47
  N as getDirections,
48
- U as useAnalytics,
49
- X as useClusterContext,
50
- Y as useIdentify,
51
- Z as useMapContext,
52
- _ as usePageView,
53
- $ as useScope,
54
- q as useTrack
48
+ U as getRichTextContent,
49
+ X as useAnalytics,
50
+ Y as useClusterContext,
51
+ Z as useIdentify,
52
+ _ as useMapContext,
53
+ $ as usePageView,
54
+ q as useScope,
55
+ aa as useTrack
55
56
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yext/pages-components",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "A React component library that supports Yext Pages development",
5
5
  "author": "sumo@yext.com",
6
6
  "license": "BSD-3-Clause",