@yext/pages-components 1.0.4 → 1.1.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.
- package/THIRD-PARTY-NOTICES +27 -27
- package/dist/debugger-ChF76rKw.js +295 -0
- package/dist/debugger-DuJtPsjX.cjs +1 -0
- package/dist/index-DB0OPxMr.cjs +47 -0
- package/dist/index-G_YRmAId.js +32745 -0
- package/dist/index-PrX0sK7U.cjs +111 -0
- package/dist/{index-BwdzdvBD.js → index-bjY2y5oj.js} +2235 -2210
- package/dist/index.d.cts +690 -336
- package/dist/index.d.ts +690 -336
- package/dist/pages-components.cjs +1 -1
- package/dist/pages-components.js +16 -17
- package/dist/style.css +1 -1
- package/package.json +17 -13
- package/dist/debugger-D1L4Q0Ym.cjs +0 -1
- package/dist/debugger-Deci89uw.js +0 -286
- package/dist/index-BEwdmdrX.js +0 -32391
- package/dist/index-D48pUOQV.cjs +0 -106
- package/dist/index-DmZ5N0Hz.cjs +0 -45
|
@@ -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-PrX0sK7U.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,
|
|
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-G_YRmAId.js";
|
|
2
2
|
export {
|
|
3
3
|
e as Address,
|
|
4
4
|
t as AddressSchema,
|
|
@@ -16,32 +16,31 @@ export {
|
|
|
16
16
|
S as Event,
|
|
17
17
|
d as FAQPage,
|
|
18
18
|
M as GoogleMaps,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
P as HoursStatus,
|
|
20
|
+
y as HoursTable,
|
|
21
|
+
A as Image,
|
|
22
|
+
L as ImageLayoutOption,
|
|
23
23
|
x as LeafletMaps,
|
|
24
24
|
C as LegacyRichText,
|
|
25
25
|
f as LexicalRichText,
|
|
26
26
|
O as Link,
|
|
27
|
-
T as LinkTypes,
|
|
28
27
|
b as ListingPublisherOption,
|
|
29
28
|
v as LocalBusiness,
|
|
30
29
|
B as LocationMap,
|
|
31
30
|
R as LocationSchema,
|
|
32
|
-
|
|
31
|
+
T as Map,
|
|
33
32
|
D as MapProviderOption,
|
|
34
33
|
H as MapQuestMaps,
|
|
35
34
|
I as MapboxMaps,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
k as Marker,
|
|
36
|
+
w as OfferSchema,
|
|
37
|
+
G as OpeningHoursSchema,
|
|
38
|
+
Q as OrganizationSchema,
|
|
39
|
+
z as PerformerSchema,
|
|
40
|
+
E as PhotoGallerySchema,
|
|
41
|
+
F as PhotoSchema,
|
|
42
|
+
V as Product,
|
|
43
|
+
W as ReviewSchema,
|
|
45
44
|
J as SchemaWrapper,
|
|
46
45
|
K as debuggingParamDetected,
|
|
47
46
|
N as getDirections,
|
|
@@ -51,5 +50,5 @@ export {
|
|
|
51
50
|
Z as useMapContext,
|
|
52
51
|
_ as usePageView,
|
|
53
52
|
$ as useScope,
|
|
54
|
-
|
|
53
|
+
j as useTrack
|
|
55
54
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.address-line abbr{text-decoration:none}._yext-default-richtextv2-theme__ul1_13v3w_17{padding:0;margin:0 0 0 16px;list-style-type:disc;list-style-position:inside}._yext-default-richtextv2-theme__ul2_13v3w_25{padding:0;margin:0 0 0 16px;list-style-type:circle;list-style-position:inside}._yext-default-richtextv2-theme__ul3_13v3w_33{padding:0;margin:0 0 0 16px;list-style-type:square;list-style-position:inside}._yext-default-richtextv2-theme__ltr_13v3w_55{text-align:left}._yext-default-richtextv2-theme__rtl_13v3w_58{text-align:right}._yext-default-richtextv2-theme__paragraph_13v3w_61{font-size:14.67px;font-weight:400;line-height:18.67px;color:#000;margin:0;padding:3px 2px;position:relative}._yext-default-richtextv2-theme__quote_13v3w_70{margin:0 0 10px 20px;font-size:15px;color:#65676b;border-left-color:#ced0d4;border-left-width:4px;border-left-style:solid;padding-left:16px}._yext-default-richtextv2-theme__h1_13v3w_81{font-size:26.67px;font-weight:700;line-height:30.67px;color:#000;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h2_13v3w_89{font-size:21.33px;font-weight:700;line-height:25.33px;color:#000;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h3_13v3w_97{font-size:18.67px;font-weight:400;line-height:22.67px;color:#434343;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h4_13v3w_105{font-size:16px;font-weight:400;line-height:20px;color:#666;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h5_13v3w_113{font-size:14.67px;font-weight:400;line-height:18.67px;color:#666;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h6_13v3w_121{font-size:14.67px;font-weight:400;font-style:italic;line-height:18.67px;color:#666;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__textBold_13v3w_130{font-weight:700}._yext-default-richtextv2-theme__textItalic_13v3w_133{font-style:italic}._yext-default-richtextv2-theme__textUnderline_13v3w_136{text-decoration:underline}._yext-default-richtextv2-theme__textStrikethrough_13v3w_139{text-decoration:line-through}._yext-default-richtextv2-theme__textUnderlineStrikethrough_13v3w_142{text-decoration:underline line-through}._yext-default-richtextv2-theme__textSubscript_13v3w_145{font-size:.8em;vertical-align:sub!important}._yext-default-richtextv2-theme__textSuperscript_13v3w_149{font-size:.8em;vertical-align:super}._yext-default-richtextv2-theme__textCode_13v3w_153{background-color:#f0f2f5;padding:1px .25rem;font-family:Menlo,Consolas,Monaco,monospace;font-size:94%}._yext-default-richtextv2-theme__hashtag_13v3w_159{background-color:#5890ff26;border-bottom:1px solid rgba(88,144,255,.3)}._yext-default-richtextv2-theme__link_13v3w_163{color:#216fdb;text-decoration:none}._yext-default-richtextv2-theme__link_13v3w_163:hover{text-decoration:underline;cursor:pointer}._yext-default-richtextv2-theme__code_13v3w_171{background-color:#f0f2f5;font-family:Menlo,Consolas,Monaco,monospace;display:block;padding:8px 8px 8px 52px;line-height:1.53;font-size:13px;margin:8px 0;-moz-tab-size:2;tab-size:2;overflow-x:auto;position:relative}._yext-default-richtextv2-theme__code_13v3w_171:before{content:attr(data-gutter);position:absolute;background-color:#eee;left:0;top:0;border-right:1px solid #ccc;padding:8px;color:#777;white-space:pre-wrap;text-align:right;min-width:25px}._yext-default-richtextv2-theme__table_13v3w_199{border-collapse:collapse;border-spacing:0;max-width:100%;overflow-y:scroll;table-layout:fixed;width:calc(100% - 25px);margin:30px 0}._yext-default-richtextv2-theme__tableCell_13v3w_208{border:1px solid #bbb;min-width:75px;vertical-align:top;text-align:start;padding:6px 8px;position:relative;cursor:default;outline:none}._yext-default-richtextv2-theme__tableCellHeader_13v3w_218{background-color:#f2f3f5;text-align:start}._yext-default-richtextv2-theme__characterLimit_13v3w_222{display:inline;background-color:#fbb!important}._yext-default-richtextv2-theme__ol1_13v3w_226{padding:0;margin:0 0 0 16px;list-style-type:decimal;list-style-position:inside}._yext-default-richtextv2-theme__ol2_13v3w_233{padding:0;margin:0 0 0 16px;list-style-type:upper-alpha;list-style-position:inside}._yext-default-richtextv2-theme__ol3_13v3w_240{padding:0;margin:0 0 0 16px;list-style-type:lower-alpha;list-style-position:inside}._yext-default-richtextv2-theme__ol4_13v3w_247{padding:0;margin:0 0 0 16px;list-style-type:upper-roman;list-style-position:inside}._yext-default-richtextv2-theme__ol5_13v3w_254{padding:0;margin:0 0 0 16px;list-style-type:lower-roman;list-style-position:inside}._yext-default-richtextv2-theme__ul_13v3w_17{padding:0;margin:0 0 0 16px;list-style-position:inside}._yext-default-richtextv2-theme__listItem_13v3w_267{margin:0 32px}._yext-default-richtextv2-theme__listItemChecked_13v3w_270,._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271{position:relative;margin-left:8px;margin-right:8px;padding-left:24px;padding-right:24px;list-style-type:none;outline:none}._yext-default-richtextv2-theme__listItemChecked_13v3w_270{text-decoration:line-through}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271:before,._yext-default-richtextv2-theme__listItemChecked_13v3w_270:before{content:"";width:16px;height:16px;top:2px;left:0;cursor:pointer;display:block;background-size:cover;position:absolute}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271._rtl_13v3w_295:before,._yext-default-richtextv2-theme__listItemChecked_13v3w_270._rtl_13v3w_295:before{left:auto;right:0}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271:focus:before,._yext-default-richtextv2-theme__listItemChecked_13v3w_270:focus:before{box-shadow:0 0 0 2px #a6cdfe;border-radius:2px}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271:before{border:1px solid #999;border-radius:2px}._yext-default-richtextv2-theme__listItemChecked_13v3w_270:before{border:1px solid rgb(61,135,245);border-radius:2px;background-color:#3d87f5;background-repeat:no-repeat}._yext-default-richtextv2-theme__listItemChecked_13v3w_270:after{content:"";cursor:pointer;border-color:#fff;border-style:solid;position:absolute;display:block;top:6px;width:3px;left:7px;right:7px;height:6px;transform:rotate(45deg);border-width:0 2px 2px 0}._yext-default-richtextv2-theme__nestedListItem_13v3w_330{list-style-type:none}._yext-default-richtextv2-theme__nestedListItem_13v3w_330:before,._yext-default-richtextv2-theme__nestedListItem_13v3w_330:after{display:none}._yext-default-richtextv2-theme__tokenComment_13v3w_337{color:#708090}._yext-default-richtextv2-theme__tokenPunctuation_13v3w_340{color:#999}._yext-default-richtextv2-theme__tokenProperty_13v3w_343{color:#905}._yext-default-richtextv2-theme__tokenSelector_13v3w_346{color:#690}._yext-default-richtextv2-theme__tokenOperator_13v3w_349{color:#9a6e3a}._yext-default-richtextv2-theme__tokenAttr_13v3w_352{color:#07a}._yext-default-richtextv2-theme__tokenVariable_13v3w_355{color:#e90}._yext-default-richtextv2-theme__tokenFunction_13v3w_358{color:#dd4a68}._yext-default-richtextv2-theme__mark_13v3w_361{background:#ffd40024;border-bottom:2px solid rgba(255,212,0,.3);padding-bottom:2px}._yext-default-richtextv2-theme__markOverlap_13v3w_366{background:#ffd4004d;border-bottom:2px solid rgba(255,212,0,.7)}._yext-default-richtextv2-theme__mark_13v3w_361._selected_13v3w_370{background:#ffd40080;border-bottom:2px solid rgba(255,212,0,1)}._yext-default-richtextv2-theme__markOverlap_13v3w_366._selected_13v3w_370{background:#ffd400b3;border-bottom:2px solid rgba(255,212,0,.7)}._yext-default-richtextv2-theme__embedBlock_13v3w_378{-webkit-user-select:none;user-select:none}._yext-default-richtextv2-theme__embedBlockFocus_13v3w_381{outline:2px solid rgb(60,132,244)}span._yext-default-richtextv2-theme__image_13v3w_385{cursor:default;display:inline-block;position:relative;-webkit-user-select:none;user-select:none}._editor-inner_1mmqo_6{position:relative}._no-border_1mmqo_10{border:none}html{--yxt-hoursTable-col1-width: 128px;--yxt-hoursTable-col2-width: 256px}.HoursTable-row{display:flex}.HoursTable-day{flex:0 0 var(--yxt-hoursTable-col1-width)}.HoursTable-intervals{display:flex;flex-direction:column;flex:0 0 var(--yxt-hoursTable-col2-width)}.xYextDebug{@keyframes pulse{0%{background:transparent}50%{background:#00000026}to{background:transparent}}}.xYextDebug [data-ya-track]{outline:1px dashed blue;scroll-margin:32px}.xYextDebug [data-ya-track].analytics-event-highlight{animation-name:pulse;animation-duration:2s;animation-iteration-count:infinite;outline:2px dashed black;padding:8px 16px}.xYextDebug [data-ya-scope]{outline:1px dashed green;position:relative}.xYextDebug [data-ya-scope]:after{content:attr(data-ya-scope);top:0;left:0;color:#000;display:block;position:absolute;padding:10px;outline:1px solid #178acd;background:#00000073;color:#fff;z-index:2147483647}.xYextDebug .analytics-debugger{position:fixed;height:80%;top:10%;bottom:10%;right:0;transition:right .3s ease-out;color:#fff;display:flex!important;z-index:99999}.xYextDebug .analytics-debugger-toggles{width:100px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#000000bf;margin:auto;display:flex;flex-direction:column;border-right:1px solid white}.xYextDebug .analytics-debugger-toggle{outline:none;text-align:center;padding:10px;cursor:pointer}.xYextDebug .analytics-debugger-toggle.is-active{background:#178acd}.xYextDebug .analytics-debugger-toggle:first-child{border-top-left-radius:4px}.xYextDebug .analytics-debugger-toggle:last-child{border-bottom-left-radius:4px}.xYextDebug .analytics-debugger-toggle:not(:last-child){border-bottom:1px solid white}.xYextDebug .analytics-debugger-toggle:hover{background:#178acd}.xYextDebug .analytics-debugger-tabs{width:250px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#000000bf}.xYextDebug .analytics-debugger-tab{display:flex;flex-direction:column;height:100%}.xYextDebug .analytics-debugger-tab-title{background:#178acd;color:#fff;padding:20px;border-bottom:1px solid white;border-top-left-radius:4px}.xYextDebug .analytics-debugger-list{overflow-y:scroll;flex-grow:1}.xYextDebug .analytics-debugger-listItem{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.xYextDebug .analytics-debugger-listItem:not(:last-child){border-bottom:1px solid white}.xYextDebug .analytics-debugger-button{padding:10px 20px;text-align:left;width:100%}.xYextDebug .analytics-debugger-button.is-active{background:#178acd}.xYextDebug .analytics-debugger-button:hover:not(.is-active){background:#ffffff4d;cursor:pointer}.xYextDebug .analytics-debugger-tooltip{background:#178acd;border:1px solid #178acd;color:#fff;position:absolute;padding:5px 10px;border-radius:4px;font-size:12px;z-index:99998}.xYextDebug .analytics-debugger-tooltip:hover{z-index:99999;border:1px solid black}
|
|
1
|
+
.address-line abbr{text-decoration:none}._yext-default-richtextv2-theme__ul1_13v3w_17{padding:0;margin:0 0 0 16px;list-style-type:disc;list-style-position:inside}._yext-default-richtextv2-theme__ul2_13v3w_25{padding:0;margin:0 0 0 16px;list-style-type:circle;list-style-position:inside}._yext-default-richtextv2-theme__ul3_13v3w_33{padding:0;margin:0 0 0 16px;list-style-type:square;list-style-position:inside}._yext-default-richtextv2-theme__ltr_13v3w_55{text-align:left}._yext-default-richtextv2-theme__rtl_13v3w_58{text-align:right}._yext-default-richtextv2-theme__paragraph_13v3w_61{font-size:14.67px;font-weight:400;line-height:18.67px;color:#000;margin:0;padding:3px 2px;position:relative}._yext-default-richtextv2-theme__quote_13v3w_70{margin:0 0 10px 20px;font-size:15px;color:#65676b;border-left-color:#ced0d4;border-left-width:4px;border-left-style:solid;padding-left:16px}._yext-default-richtextv2-theme__h1_13v3w_81{font-size:26.67px;font-weight:700;line-height:30.67px;color:#000;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h2_13v3w_89{font-size:21.33px;font-weight:700;line-height:25.33px;color:#000;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h3_13v3w_97{font-size:18.67px;font-weight:400;line-height:22.67px;color:#434343;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h4_13v3w_105{font-size:16px;font-weight:400;line-height:20px;color:#666;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h5_13v3w_113{font-size:14.67px;font-weight:400;line-height:18.67px;color:#666;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__h6_13v3w_121{font-size:14.67px;font-weight:400;font-style:italic;line-height:18.67px;color:#666;margin:0;padding:3px 2px}._yext-default-richtextv2-theme__textBold_13v3w_130{font-weight:700}._yext-default-richtextv2-theme__textItalic_13v3w_133{font-style:italic}._yext-default-richtextv2-theme__textUnderline_13v3w_136{text-decoration:underline}._yext-default-richtextv2-theme__textStrikethrough_13v3w_139{text-decoration:line-through}._yext-default-richtextv2-theme__textUnderlineStrikethrough_13v3w_142{text-decoration:underline line-through}._yext-default-richtextv2-theme__textSubscript_13v3w_145{font-size:.8em;vertical-align:sub!important}._yext-default-richtextv2-theme__textSuperscript_13v3w_149{font-size:.8em;vertical-align:super}._yext-default-richtextv2-theme__textCode_13v3w_153{background-color:#f0f2f5;padding:1px .25rem;font-family:Menlo,Consolas,Monaco,monospace;font-size:94%}._yext-default-richtextv2-theme__hashtag_13v3w_159{background-color:#5890ff26;border-bottom:1px solid rgba(88,144,255,.3)}._yext-default-richtextv2-theme__link_13v3w_163{color:#216fdb;text-decoration:none}._yext-default-richtextv2-theme__link_13v3w_163:hover{text-decoration:underline;cursor:pointer}._yext-default-richtextv2-theme__code_13v3w_171{background-color:#f0f2f5;font-family:Menlo,Consolas,Monaco,monospace;display:block;padding:8px 8px 8px 52px;line-height:1.53;font-size:13px;margin:8px 0;-moz-tab-size:2;tab-size:2;overflow-x:auto;position:relative}._yext-default-richtextv2-theme__code_13v3w_171:before{content:attr(data-gutter);position:absolute;background-color:#eee;left:0;top:0;border-right:1px solid #ccc;padding:8px;color:#777;white-space:pre-wrap;text-align:right;min-width:25px}._yext-default-richtextv2-theme__table_13v3w_199{border-collapse:collapse;border-spacing:0;max-width:100%;overflow-y:scroll;table-layout:fixed;width:calc(100% - 25px);margin:30px 0}._yext-default-richtextv2-theme__tableCell_13v3w_208{border:1px solid #bbb;min-width:75px;vertical-align:top;text-align:start;padding:6px 8px;position:relative;cursor:default;outline:none}._yext-default-richtextv2-theme__tableCellHeader_13v3w_218{background-color:#f2f3f5;text-align:start}._yext-default-richtextv2-theme__characterLimit_13v3w_222{display:inline;background-color:#fbb!important}._yext-default-richtextv2-theme__ol1_13v3w_226{padding:0;margin:0 0 0 16px;list-style-type:decimal;list-style-position:inside}._yext-default-richtextv2-theme__ol2_13v3w_233{padding:0;margin:0 0 0 16px;list-style-type:upper-alpha;list-style-position:inside}._yext-default-richtextv2-theme__ol3_13v3w_240{padding:0;margin:0 0 0 16px;list-style-type:lower-alpha;list-style-position:inside}._yext-default-richtextv2-theme__ol4_13v3w_247{padding:0;margin:0 0 0 16px;list-style-type:upper-roman;list-style-position:inside}._yext-default-richtextv2-theme__ol5_13v3w_254{padding:0;margin:0 0 0 16px;list-style-type:lower-roman;list-style-position:inside}._yext-default-richtextv2-theme__ul_13v3w_17{padding:0;margin:0 0 0 16px;list-style-position:inside}._yext-default-richtextv2-theme__listItem_13v3w_267{margin:0 32px}._yext-default-richtextv2-theme__listItemChecked_13v3w_270,._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271{position:relative;margin-left:8px;margin-right:8px;padding-left:24px;padding-right:24px;list-style-type:none;outline:none}._yext-default-richtextv2-theme__listItemChecked_13v3w_270{text-decoration:line-through}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271:before,._yext-default-richtextv2-theme__listItemChecked_13v3w_270:before{content:"";width:16px;height:16px;top:2px;left:0;cursor:pointer;display:block;background-size:cover;position:absolute}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271._rtl_13v3w_295:before,._yext-default-richtextv2-theme__listItemChecked_13v3w_270._rtl_13v3w_295:before{left:auto;right:0}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271:focus:before,._yext-default-richtextv2-theme__listItemChecked_13v3w_270:focus:before{box-shadow:0 0 0 2px #a6cdfe;border-radius:2px}._yext-default-richtextv2-theme__listItemUnchecked_13v3w_271:before{border:1px solid #999;border-radius:2px}._yext-default-richtextv2-theme__listItemChecked_13v3w_270:before{border:1px solid rgb(61,135,245);border-radius:2px;background-color:#3d87f5;background-repeat:no-repeat}._yext-default-richtextv2-theme__listItemChecked_13v3w_270:after{content:"";cursor:pointer;border-color:#fff;border-style:solid;position:absolute;display:block;top:6px;width:3px;left:7px;right:7px;height:6px;transform:rotate(45deg);border-width:0 2px 2px 0}._yext-default-richtextv2-theme__nestedListItem_13v3w_330{list-style-type:none}._yext-default-richtextv2-theme__nestedListItem_13v3w_330:before,._yext-default-richtextv2-theme__nestedListItem_13v3w_330:after{display:none}._yext-default-richtextv2-theme__tokenComment_13v3w_337{color:#708090}._yext-default-richtextv2-theme__tokenPunctuation_13v3w_340{color:#999}._yext-default-richtextv2-theme__tokenProperty_13v3w_343{color:#905}._yext-default-richtextv2-theme__tokenSelector_13v3w_346{color:#690}._yext-default-richtextv2-theme__tokenOperator_13v3w_349{color:#9a6e3a}._yext-default-richtextv2-theme__tokenAttr_13v3w_352{color:#07a}._yext-default-richtextv2-theme__tokenVariable_13v3w_355{color:#e90}._yext-default-richtextv2-theme__tokenFunction_13v3w_358{color:#dd4a68}._yext-default-richtextv2-theme__mark_13v3w_361{background:#ffd40024;border-bottom:2px solid rgba(255,212,0,.3);padding-bottom:2px}._yext-default-richtextv2-theme__markOverlap_13v3w_366{background:#ffd4004d;border-bottom:2px solid rgba(255,212,0,.7)}._yext-default-richtextv2-theme__mark_13v3w_361._selected_13v3w_370{background:#ffd40080;border-bottom:2px solid rgba(255,212,0,1)}._yext-default-richtextv2-theme__markOverlap_13v3w_366._selected_13v3w_370{background:#ffd400b3;border-bottom:2px solid rgba(255,212,0,.7)}._yext-default-richtextv2-theme__embedBlock_13v3w_378{-webkit-user-select:none;user-select:none}._yext-default-richtextv2-theme__embedBlockFocus_13v3w_381{outline:2px solid rgb(60,132,244)}span._yext-default-richtextv2-theme__image_13v3w_385{cursor:default;display:inline-block;position:relative;-webkit-user-select:none;user-select:none}._editor-inner_1mmqo_6{position:relative}._no-border_1mmqo_10{border:none}html{--yxt-hoursTable-col1-width: 128px;--yxt-hoursTable-col2-width: 256px}.HoursTable-row{display:flex}.HoursTable-day{flex:0 0 var(--yxt-hoursTable-col1-width)}.HoursTable-intervals{display:flex;flex-direction:column;flex:0 0 var(--yxt-hoursTable-col2-width)}.xYextDebug{@keyframes pulse{0%{background:transparent}50%{background:#00000026}to{background:transparent}}}.xYextDebug [data-ya-track]{outline:1px dashed blue;scroll-margin:32px}.xYextDebug [data-ya-track].analytics-event-highlight{animation-name:pulse;animation-duration:2s;animation-iteration-count:infinite;outline:2px dashed black;padding:8px 16px}.xYextDebug [data-ya-scope]{outline:1px dashed green;position:relative}.xYextDebug [data-ya-scope]:after{content:attr(data-ya-scope);top:0;left:0;color:#000;display:block;position:absolute;padding:10px;outline:1px solid #178acd;background:#00000073;color:#fff;z-index:2147483647}.xYextDebug .analytics-debugger{position:fixed;height:80%;top:10%;bottom:10%;right:0;transition:right .3s ease-out;color:#fff;display:flex!important;z-index:99999}.xYextDebug .analytics-debugger-toggles{width:100px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#000000bf;margin:auto;display:flex;flex-direction:column;border-right:1px solid white}.xYextDebug .analytics-debugger-toggle{outline:none;text-align:center;padding:10px;cursor:pointer}.xYextDebug .analytics-debugger-toggle.is-active{background:#178acd}.xYextDebug .analytics-debugger-toggle:first-child{border-top-left-radius:4px}.xYextDebug .analytics-debugger-toggle:last-child{border-bottom-left-radius:4px}.xYextDebug .analytics-debugger-toggle:not(:last-child){border-bottom:1px solid white}.xYextDebug .analytics-debugger-toggle:hover{background:#178acd}.xYextDebug .analytics-debugger-tabs{width:250px;border-top-left-radius:4px;border-bottom-left-radius:4px;background:#000000bf}.xYextDebug .analytics-debugger-tab{display:flex;flex-direction:column;height:100%}.xYextDebug .analytics-debugger-tab-title{background:#178acd;color:#fff;padding:20px;border-bottom:1px solid white;border-top-left-radius:4px}.xYextDebug .analytics-debugger-list{overflow-y:auto;flex-grow:1}.xYextDebug .analytics-debugger-listItem{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.xYextDebug .analytics-debugger-listItem:not(:last-child){border-bottom:1px solid white}.xYextDebug .analytics-debugger-button{padding:10px 20px;text-align:left;width:100%}.xYextDebug .analytics-debugger-button.is-active{background:#178acd}.xYextDebug .analytics-debugger-button:hover:not(.is-active){background:#ffffff4d;cursor:pointer}.xYextDebug .analytics-debugger-tooltip{background:#178acd;border:1px solid #178acd;color:#fff;position:absolute;padding:5px 10px;border-radius:4px;font-size:12px;z-index:99998}.xYextDebug .analytics-debugger-tooltip:hover{z-index:99999;border:1px solid black}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yext/pages-components",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A React component library that supports Yext Pages development",
|
|
5
5
|
"author": "sumo@yext.com",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"types": "dist/index.d.ts",
|
|
33
33
|
"engines": {
|
|
34
|
-
"node": "^
|
|
34
|
+
"node": "^18 || ^20 || ^22"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"dev": "pnpm run storybook",
|
|
@@ -49,18 +49,22 @@
|
|
|
49
49
|
"react-dom": "^17.0.2 || ^18.2.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@storybook/addon-a11y": "^8.
|
|
53
|
-
"@storybook/addon-essentials": "^8.
|
|
54
|
-
"@storybook/addon-interactions": "^8.
|
|
55
|
-
"@storybook/addon-links": "^8.
|
|
56
|
-
"@storybook/blocks": "^8.
|
|
57
|
-
"@storybook/react": "^8.
|
|
58
|
-
"@storybook/react-vite": "^8.
|
|
59
|
-
"@storybook/test-runner": "^0.
|
|
52
|
+
"@storybook/addon-a11y": "^8.5.8",
|
|
53
|
+
"@storybook/addon-essentials": "^8.5.8",
|
|
54
|
+
"@storybook/addon-interactions": "^8.5.8",
|
|
55
|
+
"@storybook/addon-links": "^8.5.8",
|
|
56
|
+
"@storybook/blocks": "^8.5.8",
|
|
57
|
+
"@storybook/react": "^8.5.8",
|
|
58
|
+
"@storybook/react-vite": "^8.5.8",
|
|
59
|
+
"@storybook/test-runner": "^0.21.3",
|
|
60
60
|
"@storybook/testing-library": "^0.2.2",
|
|
61
61
|
"@testing-library/react": "^14.1.2",
|
|
62
62
|
"@testing-library/user-event": "^14.5.1",
|
|
63
|
+
"@types/bingmaps": "^0.0.1",
|
|
64
|
+
"@types/google.maps": "^3.58.1",
|
|
63
65
|
"@types/jest-image-snapshot": "^6.4.0",
|
|
66
|
+
"@types/leaflet": "^1.9.12",
|
|
67
|
+
"@types/mapbox-gl": "^3.4.0",
|
|
64
68
|
"@types/mdast": "3.0.10",
|
|
65
69
|
"@types/node": "^20.10.4",
|
|
66
70
|
"@types/react": "^18.2.45",
|
|
@@ -76,12 +80,12 @@
|
|
|
76
80
|
"prop-types": "^15.8.1",
|
|
77
81
|
"react": "^18.2.0",
|
|
78
82
|
"react-dom": "^18.2.0",
|
|
79
|
-
"storybook": "^8.
|
|
83
|
+
"storybook": "^8.5.8",
|
|
80
84
|
"tsup": "^8.0.1",
|
|
81
85
|
"typescript": "^5.3.3",
|
|
82
86
|
"vite": "^5.4.11",
|
|
83
87
|
"vite-tsconfig-paths": "^4.2.2",
|
|
84
|
-
"vitest": "^
|
|
88
|
+
"vitest": "^3.0.5"
|
|
85
89
|
},
|
|
86
90
|
"dependencies": {
|
|
87
91
|
"@lexical/code": "^0.12.5",
|
|
@@ -92,7 +96,7 @@
|
|
|
92
96
|
"@lexical/rich-text": "^0.12.5",
|
|
93
97
|
"@lexical/table": "^0.12.5",
|
|
94
98
|
"@lexical/utils": "^0.12.5",
|
|
95
|
-
"@yext/analytics": "1.0.0
|
|
99
|
+
"@yext/analytics": "^1.0.0",
|
|
96
100
|
"browser-or-node": "^2.1.1",
|
|
97
101
|
"classnames": "^2.3.2",
|
|
98
102
|
"cross-fetch": "^4.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-D48pUOQV.cjs"),x=require("react"),N=require("react-dom");function k(){return i.getRuntime().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,N.createPortal(i.jsxRuntimeExports.jsx(w,{}),document.body))}const S=(e,n)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,c=e.dataset.yaEventname,a=t||n;return{action:s,originalEventName:a?`${a}_${c}`:c,scope:a}},C=(e,n)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(n),t&&s.push(t);return s},m={},R="YA_NO_SCOPE",y=(e,n,s,t)=>{m.hasOwnProperty(e)?m[e].events.map(c=>c.el).includes(t)||(m[e].events=[...m[e].events,{eventData:n,el:t}]):m[e]={scopeEl:s||t,events:[{eventData:n,el:t}]}};function w(){const[e,n]=x.useState(),[s,t]=x.useState([]),[c,a]=x.useState(!1),o=l=>{n(e===l?void 0:l)};return x.useEffect(()=>(document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((r,d)=>{const u=r.closest("[data-ya-scope]"),v=u==null?void 0:u.dataset.yaScope,g=S(r,v);r.addEventListener("mouseenter",()=>{t([{elem:r,key:`${g.originalEventName}_${d}`,action:g.action,originalEventName:g.originalEventName,scope:g.scope}])}),r.addEventListener("mouseleave",()=>{t([])});const b=r.dataset.yaScopeoverride;b?y(b,g,u,r):[v,...C(r,"[data-ya-scope]").map(p=>p.dataset.yaScope)].forEach(p=>{y(p||R,g,u,r)})}),a(!0),()=>{document.documentElement.classList.remove("xYextDebug")}),[]),c?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:m,setTooltips:t}):i.jsxRuntimeExports.jsx(Y,{data:m,setTooltips:t})})]}),i.jsxRuntimeExports.jsx(T,{tooltips:s})]}):null}const B=()=>{const e=[];return Object.entries(m).map(([n,s])=>s.events.map(t=>{e.map(c=>c.eventData.originalEventName).includes(t.eventData.originalEventName)||e.push(t)})),e};function O(e){const{setTooltips:n}=e,[s,t]=x.useState(),[c,a]=x.useState(""),o=(l,r,d)=>{l.scrollIntoView({behavior:"smooth",block:"nearest"}),s&&s.classList.remove("analytics-event-highlight"),t(l),l.classList.add("analytics-event-highlight"),a(d),n([{elem:l,key:d,action:r.action,originalEventName:r.originalEventName,scope:r.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:B().map((l,r)=>{const d=l.eventData,u=`${d.originalEventName}_${r}`;return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":u===c}),onClick:()=>o(l.el,d,u),children:d.originalEventName})},u)})})]})}function Y(e){const{data:n,setTooltips:s}=e,[t,c]=x.useState(""),a=o=>{const l=n[o];l.scopeEl&&(l.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),c(o),s(l.events.map((r,d)=>{const u=r.eventData;return{elem:r.el,key:`${u.originalEventName}_${d}`,action:u.action,originalEventName:u.originalEventName,scope:u.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,l)=>{if(o!==R)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:()=>a(o),children:o})},o+l)})})]})}function T(e){const n=x.useRef({});return x.useEffect(()=>{if(n.current)for(const s of Object.values(n.current)){const t=Object.values(n.current).map(c=>c.el).filter(c=>c!==s.el);$(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 $(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 a=!0;for(let o=0;o<n.length;o++){const l=n[o];D(e.el,l)&&(a=!1)}if(a)break}}function D(e,n){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,c=s+e.clientHeight,a=t+e.clientWidth,o=n.getBoundingClientRect().top+window.scrollY,l=n.getBoundingClientRect().left,r=o+n.clientHeight,d=l+n.clientWidth,u=(v,g,b,h,p,j,E,f)=>b<=p&&p<=E&&h<=j&&j<=f||b<=v&&v<=E&&h<=g&&g<=f||b<=v&&v<=E&&h<=j&&j<=f||b<=p&&p<=E&&h<=g&&g<=f;return u(t,s,l,o,a,c,d,r)||u(l,o,t,s,d,r,a,c)}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,c=n.clientWidth;let a,o;switch(s){case 0:{o=window.scrollY+e.top-t+"px",a=e.left-c+"px";break}case 1:{o=window.scrollY+e.top-t+"px",a=e.left+"px";break}case 2:{o=window.scrollY+e.top-t+"px",a=e.right+"px";break}case 3:{o=window.scrollY+e.top-t+"px",a=e.right-c+"px";break}case 4:{o=window.scrollY+e.bottom+"px",a=e.left-c+"px";break}case 5:{o=window.scrollY+e.bottom+"px",a=e.left+"px";break}case 6:{o=window.scrollY+e.bottom+"px",a=e.right-c+"px";break}case 7:{o=window.scrollY+e.bottom+"px",a=e.right+"px";break}default:o=0,a=0}return{top:o,left:a}}exports.AnalyticsDebuggerInternal=w;exports.default=k;
|
|
@@ -1,286 +0,0 @@
|
|
|
1
|
-
import { g as C, j as o, c as j } from "./index-BEwdmdrX.js";
|
|
2
|
-
import { useState as b, useEffect as N, useRef as B } from "react";
|
|
3
|
-
import { createPortal as S } from "react-dom";
|
|
4
|
-
function q() {
|
|
5
|
-
return C().name !== "browser" || window.hasOwnProperty("debuggerInitialized") ? null : (window.debuggerInitialized = !0, S(/* @__PURE__ */ o.jsx(R, {}), document.body));
|
|
6
|
-
}
|
|
7
|
-
const Y = (e, s) => {
|
|
8
|
-
const n = e.dataset.yaAction, t = e.dataset.yaScopeoverride, c = e.dataset.yaEventname, a = t || s;
|
|
9
|
-
return {
|
|
10
|
-
action: n,
|
|
11
|
-
originalEventName: a ? `${a}_${c}` : c,
|
|
12
|
-
scope: a
|
|
13
|
-
};
|
|
14
|
-
}, O = (e, s) => {
|
|
15
|
-
const n = [];
|
|
16
|
-
let t = e;
|
|
17
|
-
for (; t != null && t.parentElement; )
|
|
18
|
-
t = t.parentElement.closest(s), t && n.push(t);
|
|
19
|
-
return n;
|
|
20
|
-
}, p = {}, k = "YA_NO_SCOPE", E = (e, s, n, t) => {
|
|
21
|
-
p.hasOwnProperty(e) ? p[e].events.map((c) => c.el).includes(t) || (p[e].events = [
|
|
22
|
-
...p[e].events,
|
|
23
|
-
{
|
|
24
|
-
eventData: s,
|
|
25
|
-
el: t
|
|
26
|
-
}
|
|
27
|
-
]) : p[e] = {
|
|
28
|
-
scopeEl: n || t,
|
|
29
|
-
// overidden scopes still need an element
|
|
30
|
-
events: [
|
|
31
|
-
{
|
|
32
|
-
eventData: s,
|
|
33
|
-
el: t
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
function R() {
|
|
39
|
-
const [e, s] = b(), [n, t] = b([]), [c, a] = b(!1), i = (l) => {
|
|
40
|
-
s(e === l ? void 0 : l);
|
|
41
|
-
};
|
|
42
|
-
return N(() => (document.documentElement.classList.add("xYextDebug"), document.querySelectorAll(
|
|
43
|
-
"[data-ya-eventname]"
|
|
44
|
-
).forEach((r, u) => {
|
|
45
|
-
const d = r.closest("[data-ya-scope]"), v = d == null ? void 0 : d.dataset.yaScope, g = Y(r, v);
|
|
46
|
-
r.addEventListener("mouseenter", () => {
|
|
47
|
-
t([
|
|
48
|
-
{
|
|
49
|
-
elem: r,
|
|
50
|
-
key: `${g.originalEventName}_${u}`,
|
|
51
|
-
action: g.action,
|
|
52
|
-
originalEventName: g.originalEventName,
|
|
53
|
-
scope: g.scope
|
|
54
|
-
}
|
|
55
|
-
]);
|
|
56
|
-
}), r.addEventListener("mouseleave", () => {
|
|
57
|
-
t([]);
|
|
58
|
-
});
|
|
59
|
-
const h = r.dataset.yaScopeoverride;
|
|
60
|
-
h ? E(h, g, d, r) : [
|
|
61
|
-
v,
|
|
62
|
-
...O(r, "[data-ya-scope]").map(
|
|
63
|
-
(m) => m.dataset.yaScope
|
|
64
|
-
)
|
|
65
|
-
].forEach((m) => {
|
|
66
|
-
E(m || k, g, d, r);
|
|
67
|
-
});
|
|
68
|
-
}), a(!0), () => {
|
|
69
|
-
document.documentElement.classList.remove("xYextDebug");
|
|
70
|
-
}), []), c ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
71
|
-
/* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger", children: [
|
|
72
|
-
/* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger-toggles", children: [
|
|
73
|
-
/* @__PURE__ */ o.jsx(
|
|
74
|
-
"button",
|
|
75
|
-
{
|
|
76
|
-
className: j("analytics-debugger-toggle", {
|
|
77
|
-
"is-active": e === "Events"
|
|
78
|
-
}),
|
|
79
|
-
onClick: () => i("Events"),
|
|
80
|
-
children: "Events"
|
|
81
|
-
}
|
|
82
|
-
),
|
|
83
|
-
/* @__PURE__ */ o.jsx(
|
|
84
|
-
"button",
|
|
85
|
-
{
|
|
86
|
-
className: j("analytics-debugger-toggle", {
|
|
87
|
-
"is-active": e === "Scopes"
|
|
88
|
-
}),
|
|
89
|
-
onClick: () => i("Scopes"),
|
|
90
|
-
children: "Scopes"
|
|
91
|
-
}
|
|
92
|
-
)
|
|
93
|
-
] }),
|
|
94
|
-
e && /* @__PURE__ */ o.jsx("div", { className: "analytics-debugger-tabs", children: e === "Events" ? /* @__PURE__ */ o.jsx(D, { data: p, setTooltips: t }) : /* @__PURE__ */ o.jsx(A, { data: p, setTooltips: t }) })
|
|
95
|
-
] }),
|
|
96
|
-
/* @__PURE__ */ o.jsx($, { tooltips: n })
|
|
97
|
-
] }) : null;
|
|
98
|
-
}
|
|
99
|
-
const T = () => {
|
|
100
|
-
const e = [];
|
|
101
|
-
return Object.entries(p).map(
|
|
102
|
-
([s, n]) => n.events.map((t) => {
|
|
103
|
-
e.map((c) => c.eventData.originalEventName).includes(t.eventData.originalEventName) || e.push(t);
|
|
104
|
-
})
|
|
105
|
-
), e;
|
|
106
|
-
};
|
|
107
|
-
function D(e) {
|
|
108
|
-
const { setTooltips: s } = e, [n, t] = b(), [c, a] = b(""), i = (l, r, u) => {
|
|
109
|
-
l.scrollIntoView({ behavior: "smooth", block: "nearest" }), n && n.classList.remove("analytics-event-highlight"), t(l), l.classList.add("analytics-event-highlight"), a(u), s([
|
|
110
|
-
{
|
|
111
|
-
elem: l,
|
|
112
|
-
key: u,
|
|
113
|
-
action: r.action,
|
|
114
|
-
originalEventName: r.originalEventName,
|
|
115
|
-
scope: r.scope
|
|
116
|
-
}
|
|
117
|
-
]);
|
|
118
|
-
};
|
|
119
|
-
return /* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger-tab", children: [
|
|
120
|
-
/* @__PURE__ */ o.jsx("h2", { className: "analytics-debugger-tab-title", children: "Event Names" }),
|
|
121
|
-
/* @__PURE__ */ o.jsx("ul", { className: "analytics-debugger-list", children: T().map((l, r) => {
|
|
122
|
-
const u = l.eventData, d = `${u.originalEventName}_${r}`;
|
|
123
|
-
return /* @__PURE__ */ o.jsx("li", { className: "analytics-debugger-listItem", children: /* @__PURE__ */ o.jsx(
|
|
124
|
-
"button",
|
|
125
|
-
{
|
|
126
|
-
className: j("analytics-debugger-button", {
|
|
127
|
-
"is-active": d === c
|
|
128
|
-
}),
|
|
129
|
-
onClick: () => i(l.el, u, d),
|
|
130
|
-
children: u.originalEventName
|
|
131
|
-
}
|
|
132
|
-
) }, d);
|
|
133
|
-
}) })
|
|
134
|
-
] });
|
|
135
|
-
}
|
|
136
|
-
function A(e) {
|
|
137
|
-
const { data: s, setTooltips: n } = e, [t, c] = b(""), a = (i) => {
|
|
138
|
-
const l = s[i];
|
|
139
|
-
l.scopeEl && (l.scopeEl.scrollIntoView({
|
|
140
|
-
behavior: "smooth",
|
|
141
|
-
block: "nearest"
|
|
142
|
-
}), c(i), n(
|
|
143
|
-
l.events.map((r, u) => {
|
|
144
|
-
const d = r.eventData;
|
|
145
|
-
return {
|
|
146
|
-
elem: r.el,
|
|
147
|
-
key: `${d.originalEventName}_${u}`,
|
|
148
|
-
action: d.action,
|
|
149
|
-
originalEventName: d.originalEventName,
|
|
150
|
-
scope: d.scope
|
|
151
|
-
};
|
|
152
|
-
})
|
|
153
|
-
));
|
|
154
|
-
};
|
|
155
|
-
return /* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger-tab", children: [
|
|
156
|
-
/* @__PURE__ */ o.jsx("h2", { className: "analytics-debugger-tab-title", children: "Scope Names" }),
|
|
157
|
-
/* @__PURE__ */ o.jsx("ul", { className: "analytics-debugger-list", children: Object.keys(s).map((i, l) => {
|
|
158
|
-
if (i !== k)
|
|
159
|
-
return /* @__PURE__ */ o.jsx("li", { className: "analytics-debugger-listItem", children: /* @__PURE__ */ o.jsx(
|
|
160
|
-
"button",
|
|
161
|
-
{
|
|
162
|
-
className: j("analytics-debugger-button", {
|
|
163
|
-
"is-active": i === t
|
|
164
|
-
}),
|
|
165
|
-
onClick: () => a(i),
|
|
166
|
-
children: i
|
|
167
|
-
}
|
|
168
|
-
) }, i + l);
|
|
169
|
-
}) })
|
|
170
|
-
] });
|
|
171
|
-
}
|
|
172
|
-
function $(e) {
|
|
173
|
-
const s = B({});
|
|
174
|
-
return N(() => {
|
|
175
|
-
if (s.current)
|
|
176
|
-
for (const n of Object.values(s.current)) {
|
|
177
|
-
const t = Object.values(s.current).map((c) => c.el).filter((c) => c !== n.el);
|
|
178
|
-
L(n, t), n.el.style.visibility = "visible";
|
|
179
|
-
}
|
|
180
|
-
}, [e.tooltips]), /* @__PURE__ */ o.jsx(o.Fragment, { children: e.tooltips.map((n) => /* @__PURE__ */ o.jsxs(
|
|
181
|
-
"div",
|
|
182
|
-
{
|
|
183
|
-
style: { visibility: "hidden" },
|
|
184
|
-
className: "analytics-debugger-tooltip",
|
|
185
|
-
ref: (t) => {
|
|
186
|
-
t ? s.current[n.key] = {
|
|
187
|
-
el: t,
|
|
188
|
-
tooltip: n
|
|
189
|
-
} : delete s.current[n.key];
|
|
190
|
-
},
|
|
191
|
-
children: [
|
|
192
|
-
/* @__PURE__ */ o.jsxs("span", { children: [
|
|
193
|
-
"Action: ",
|
|
194
|
-
n.action
|
|
195
|
-
] }),
|
|
196
|
-
/* @__PURE__ */ o.jsx("br", {}),
|
|
197
|
-
/* @__PURE__ */ o.jsxs("span", { children: [
|
|
198
|
-
"Scope: ",
|
|
199
|
-
n.scope
|
|
200
|
-
] }),
|
|
201
|
-
/* @__PURE__ */ o.jsx("br", {}),
|
|
202
|
-
/* @__PURE__ */ o.jsxs("span", { children: [
|
|
203
|
-
"Original Event Name: ",
|
|
204
|
-
n.originalEventName
|
|
205
|
-
] })
|
|
206
|
-
]
|
|
207
|
-
},
|
|
208
|
-
n.key
|
|
209
|
-
)) });
|
|
210
|
-
}
|
|
211
|
-
function L(e, s) {
|
|
212
|
-
for (let n = 0; n < 9; n++) {
|
|
213
|
-
const t = P(
|
|
214
|
-
e.tooltip.elem.getBoundingClientRect(),
|
|
215
|
-
e.el,
|
|
216
|
-
n
|
|
217
|
-
);
|
|
218
|
-
if (e.el.style.inset = `${t.top} auto auto ${t.left}`, !!I(
|
|
219
|
-
e.el.getBoundingClientRect().left,
|
|
220
|
-
e.el.getBoundingClientRect().top + window.scrollY,
|
|
221
|
-
e.el.getBoundingClientRect().right,
|
|
222
|
-
e.el.getBoundingClientRect().bottom + window.scrollY
|
|
223
|
-
)) continue;
|
|
224
|
-
let a = !0;
|
|
225
|
-
for (let i = 0; i < s.length; i++) {
|
|
226
|
-
const l = s[i];
|
|
227
|
-
_(e.el, l) && (a = !1);
|
|
228
|
-
}
|
|
229
|
-
if (a) break;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
function _(e, s) {
|
|
233
|
-
const n = e.getBoundingClientRect().top + window.scrollY, t = e.getBoundingClientRect().left, c = n + e.clientHeight, a = t + e.clientWidth, i = s.getBoundingClientRect().top + window.scrollY, l = s.getBoundingClientRect().left, r = i + s.clientHeight, u = l + s.clientWidth, d = (v, g, h, f, m, x, w, y) => h <= m && m <= w && f <= x && x <= y || h <= v && v <= w && f <= g && g <= y || h <= v && v <= w && f <= x && x <= y || h <= m && m <= w && f <= g && g <= y;
|
|
234
|
-
return d(t, n, l, i, a, c, u, r) || d(l, i, t, n, u, r, a, c);
|
|
235
|
-
}
|
|
236
|
-
function I(e, s, n, t) {
|
|
237
|
-
return e < 0 || n > window.innerWidth || s < 0 || t > document.documentElement.scrollHeight;
|
|
238
|
-
}
|
|
239
|
-
function P(e, s, n) {
|
|
240
|
-
const t = s.clientHeight, c = s.clientWidth;
|
|
241
|
-
let a, i;
|
|
242
|
-
switch (n) {
|
|
243
|
-
case 0: {
|
|
244
|
-
i = window.scrollY + e.top - t + "px", a = e.left - c + "px";
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
case 1: {
|
|
248
|
-
i = window.scrollY + e.top - t + "px", a = e.left + "px";
|
|
249
|
-
break;
|
|
250
|
-
}
|
|
251
|
-
case 2: {
|
|
252
|
-
i = window.scrollY + e.top - t + "px", a = e.right + "px";
|
|
253
|
-
break;
|
|
254
|
-
}
|
|
255
|
-
case 3: {
|
|
256
|
-
i = window.scrollY + e.top - t + "px", a = e.right - c + "px";
|
|
257
|
-
break;
|
|
258
|
-
}
|
|
259
|
-
case 4: {
|
|
260
|
-
i = window.scrollY + e.bottom + "px", a = e.left - c + "px";
|
|
261
|
-
break;
|
|
262
|
-
}
|
|
263
|
-
case 5: {
|
|
264
|
-
i = window.scrollY + e.bottom + "px", a = e.left + "px";
|
|
265
|
-
break;
|
|
266
|
-
}
|
|
267
|
-
case 6: {
|
|
268
|
-
i = window.scrollY + e.bottom + "px", a = e.right - c + "px";
|
|
269
|
-
break;
|
|
270
|
-
}
|
|
271
|
-
case 7: {
|
|
272
|
-
i = window.scrollY + e.bottom + "px", a = e.right + "px";
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
default:
|
|
276
|
-
i = 0, a = 0;
|
|
277
|
-
}
|
|
278
|
-
return {
|
|
279
|
-
top: i,
|
|
280
|
-
left: a
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
export {
|
|
284
|
-
R as AnalyticsDebuggerInternal,
|
|
285
|
-
q as default
|
|
286
|
-
};
|