@gem-sdk/pages 1.63.19 → 2.0.0-dev.161
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/cjs/components/ErrorBoundary.js +1 -0
- package/dist/cjs/components/ErrorFallback.js +1 -0
- package/dist/cjs/components/FacebookPixel.js +7 -9
- package/dist/cjs/components/FooterForPostPurchase.js +1 -0
- package/dist/cjs/components/GoogleAnalytic.js +9 -10
- package/dist/cjs/components/TikTokPixel.js +1 -0
- package/dist/cjs/components/builder/Body.js +1 -0
- package/dist/cjs/components/builder/Footer.js +1 -0
- package/dist/cjs/components/builder/Header.js +4 -5
- package/dist/cjs/components/builder/PopupManager.js +1 -0
- package/dist/cjs/components/builder/SwitchView.js +1 -0
- package/dist/cjs/components/builder/Toolbar.js +1 -0
- package/dist/cjs/components/builder/Toolbox.js +1 -0
- package/dist/cjs/components/image-to-layout/AddSectionImageToLayout.js +1 -0
- package/dist/cjs/components/image-to-layout/DropElement.js +1 -0
- package/dist/cjs/components/image-to-layout/ImageToLayout.js +1 -0
- package/dist/cjs/index.js +12 -14
- package/dist/cjs/layouts/main.js +2 -1
- package/dist/cjs/libs/api/get-builder-props.js +7 -2
- package/dist/cjs/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/cjs/libs/api/get-static-page-props-preview.js +1 -6
- package/dist/cjs/libs/api/get-static-page-props-v2.js +2 -1
- package/dist/cjs/libs/helpers/gen-css.js +1 -1
- package/dist/cjs/libs/helpers/normalize.js +9 -0
- package/dist/cjs/libs/hooks/use-tracking-view.js +1 -0
- package/dist/cjs/libs/parse-html.js +23 -15
- package/dist/cjs/pages/404.js +1 -0
- package/dist/cjs/pages/500.js +1 -0
- package/dist/cjs/pages/CollectionGlobalProvider.js +1 -0
- package/dist/cjs/pages/builder.js +14 -22
- package/dist/cjs/pages/collection-detail.js +31 -40
- package/dist/cjs/pages/preview.js +1 -0
- package/dist/cjs/pages/product-detail.js +18 -29
- package/dist/cjs/pages/static-v2.js +38 -69
- package/dist/cjs/pages/static.js +34 -44
- package/dist/esm/components/ErrorBoundary.js +1 -0
- package/dist/esm/components/ErrorFallback.js +1 -0
- package/dist/esm/components/FacebookPixel.js +7 -9
- package/dist/esm/components/FooterForPostPurchase.js +1 -0
- package/dist/esm/components/GoogleAnalytic.js +9 -10
- package/dist/esm/components/TikTokPixel.js +1 -0
- package/dist/esm/components/builder/Body.js +1 -0
- package/dist/esm/components/builder/Footer.js +1 -0
- package/dist/esm/components/builder/Header.js +4 -5
- package/dist/esm/components/builder/PopupManager.js +1 -0
- package/dist/esm/components/builder/SwitchView.js +1 -0
- package/dist/esm/components/builder/Toolbar.js +1 -0
- package/dist/esm/components/builder/Toolbox.js +1 -0
- package/dist/esm/components/image-to-layout/AddSectionImageToLayout.js +1 -0
- package/dist/esm/components/image-to-layout/DropElement.js +1 -0
- package/dist/esm/components/image-to-layout/ImageToLayout.js +1 -0
- package/dist/esm/index.js +6 -7
- package/dist/esm/layouts/main.js +2 -1
- package/dist/esm/libs/api/get-builder-props.js +8 -3
- package/dist/esm/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/esm/libs/api/get-static-page-props-preview.js +2 -7
- package/dist/esm/libs/api/get-static-page-props-v2.js +3 -2
- package/dist/esm/libs/helpers/gen-css.js +1 -1
- package/dist/esm/libs/helpers/normalize.js +9 -1
- package/dist/esm/libs/hooks/use-tracking-view.js +1 -0
- package/dist/esm/libs/parse-html.js +23 -15
- package/dist/esm/pages/404.js +1 -0
- package/dist/esm/pages/500.js +1 -0
- package/dist/esm/pages/CollectionGlobalProvider.js +1 -0
- package/dist/esm/pages/builder.js +14 -22
- package/dist/esm/pages/collection-detail.js +32 -41
- package/dist/esm/pages/preview.js +1 -0
- package/dist/esm/pages/product-detail.js +19 -30
- package/dist/esm/pages/static-v2.js +39 -70
- package/dist/esm/pages/static.js +35 -45
- package/dist/types/index.d.ts +37 -34
- package/package.json +5 -5
- package/dist/cjs/components/builder/InteractionSelectOnPageHeader.js +0 -191
- package/dist/cjs/libs/helpers/sentry.js +0 -17
- package/dist/esm/components/builder/InteractionSelectOnPageHeader.js +0 -187
- package/dist/esm/libs/helpers/sentry.js +0 -15
package/dist/types/index.d.ts
CHANGED
|
@@ -40,7 +40,12 @@ type PageBuilderProps = {
|
|
|
40
40
|
customCodeBody?: string | null;
|
|
41
41
|
isStorefront?: boolean;
|
|
42
42
|
customFonts?: string | null;
|
|
43
|
-
interaction?: ShopType.Maybe<Pick<ShopType.PublishedPageInteraction,
|
|
43
|
+
interaction?: ShopType.Maybe<Pick<ShopType.PublishedPageInteraction, 'id' | 'value'>>;
|
|
44
|
+
pageBackground?: {
|
|
45
|
+
isUsePageBackground?: boolean;
|
|
46
|
+
background?: string;
|
|
47
|
+
};
|
|
48
|
+
timezone?: string;
|
|
44
49
|
};
|
|
45
50
|
type PageBuilderPropsV2 = {
|
|
46
51
|
builderData?: {
|
|
@@ -118,7 +123,7 @@ declare const usePagePreview: (dataBuilder: ThemePageQueryResponse['themePage'],
|
|
|
118
123
|
pageConfig: {
|
|
119
124
|
mobileOnly: boolean;
|
|
120
125
|
locale: string | null;
|
|
121
|
-
languageIsoCode: ("ID" | "AF" | "AM" | "AR" | "AZ" | "BE" | "BG" | "BM" | "BN" | "BO" | "BR" | "BS" | "CA" | "CU" | "CY" | "DE" | "DZ" | "EE" | "ES" | "ET" | "FI" | "FO" | "FR" | "GA" | "GD" | "GL" | "HR" | "HU" | "IS" | "IT" | "KI" | "KM" | "KN" | "KW" | "KY" | "
|
|
126
|
+
languageIsoCode: ("ID" | "AF" | "AM" | "AR" | "AZ" | "BE" | "BG" | "BM" | "BN" | "BO" | "BR" | "BS" | "CA" | "CU" | "CY" | "DE" | "DZ" | "EE" | "ES" | "ET" | "FI" | "FO" | "FR" | "GA" | "GD" | "GL" | "HR" | "HU" | "IS" | "IT" | "KI" | "KM" | "KN" | "KW" | "KY" | "LB" | "LT" | "LU" | "LV" | "MG" | "MK" | "ML" | "MN" | "MR" | "MS" | "MT" | "MY" | "NE" | "NL" | "NO" | "OM" | "PA" | "PL" | "PS" | "PT" | "RO" | "RU" | "RW" | "SD" | "SE" | "SG" | "SI" | "SK" | "SL" | "SN" | "SO" | "SR" | "SV" | "TA" | "TG" | "TH" | "TK" | "TO" | "TR" | "TT" | "UG" | "UZ" | "AK" | "AS" | "CE" | "CS" | "DA" | "EL" | "EN" | "EO" | "EU" | "FA" | "FF" | "FY" | "GU" | "GV" | "HA" | "HE" | "HI" | "HY" | "IA" | "IG" | "II" | "JA" | "JV" | "KA" | "KK" | "KL" | "KO" | "KS" | "KU" | "LG" | "LN" | "LO" | "MI" | "NB" | "ND" | "NN" | "OR" | "OS" | "PT_BR" | "PT_PT" | "QU" | "RM" | "RN" | "SQ" | "SU" | "SW" | "TE" | "TI" | "UK" | "UR" | "VI" | "VO" | "WO" | "XH" | "YI" | "YO" | "ZH" | "ZH_CN" | "ZH_TW" | "ZU") | null;
|
|
122
127
|
countryIsoCode: ("ID" | "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AN" | "AO" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ") | null;
|
|
123
128
|
moneyFormat: string | null;
|
|
124
129
|
currency: ("AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BYR" | "BZD" | "CAD" | "CDF" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JEP" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KID" | "KMF" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LVL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STD" | "STN" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VED" | "VEF" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "XXX" | "YER" | "ZAR" | "ZMW") | null;
|
|
@@ -157,36 +162,6 @@ type RetryConfig = {
|
|
|
157
162
|
};
|
|
158
163
|
declare const retryWithDelay: <T = unknown>(fn: () => T, config?: RetryConfig) => Promise<T>;
|
|
159
164
|
|
|
160
|
-
type PreviewPageProps = {
|
|
161
|
-
components: Record<string, React.ComponentType<any>>;
|
|
162
|
-
pageType: ShopType.PublishedThemePageType;
|
|
163
|
-
};
|
|
164
|
-
declare const PreviewPage: React.FC<PreviewPageProps>;
|
|
165
|
-
|
|
166
|
-
type StaticPageProps = PageBuilderProps;
|
|
167
|
-
declare const StaticPage: React.FC<StaticPageProps & AdditionalPageBuilderProps>;
|
|
168
|
-
|
|
169
|
-
type BuilderPageProps = {
|
|
170
|
-
components: Record<string, React.ComponentType<any>>;
|
|
171
|
-
seo?: NextSeoProps;
|
|
172
|
-
themeStyle?: string | null;
|
|
173
|
-
fontStyle?: string | null;
|
|
174
|
-
header?: BuilderState;
|
|
175
|
-
footer?: BuilderState;
|
|
176
|
-
sectionData?: Record<string, SectionData$1>;
|
|
177
|
-
storefrontToken?: string | null;
|
|
178
|
-
storefrontHandle?: string | null;
|
|
179
|
-
shopToken?: string | null;
|
|
180
|
-
mode?: RenderMode;
|
|
181
|
-
pageType: ShopType.PublishedThemePageType;
|
|
182
|
-
editorImageToLayout?: boolean;
|
|
183
|
-
isThemeSectionEditor?: boolean;
|
|
184
|
-
hiddenToolbar?: boolean;
|
|
185
|
-
pageName: string;
|
|
186
|
-
isOriginTemplate?: boolean;
|
|
187
|
-
};
|
|
188
|
-
declare const BuilderPage: React.FC<BuilderPageProps>;
|
|
189
|
-
|
|
190
165
|
declare const getStaticPaths: GetStaticPaths;
|
|
191
166
|
|
|
192
167
|
type TypographyV2FontFamilyType = 'google' | 'custom' | 'theme' | 'bunny';
|
|
@@ -257,6 +232,34 @@ type Props = {
|
|
|
257
232
|
};
|
|
258
233
|
declare const TikTokPixel: ({ pixelId }: Props) => react_jsx_runtime.JSX.Element | null;
|
|
259
234
|
|
|
260
|
-
|
|
235
|
+
type PreviewPageProps = {
|
|
236
|
+
components: Record<string, React.ComponentType<any>>;
|
|
237
|
+
pageType: ShopType.PublishedThemePageType;
|
|
238
|
+
};
|
|
239
|
+
declare const PreviewPage: React.FC<PreviewPageProps>;
|
|
240
|
+
|
|
241
|
+
type StaticPageProps = PageBuilderProps;
|
|
242
|
+
declare const StaticPage: React.FC<StaticPageProps & AdditionalPageBuilderProps>;
|
|
243
|
+
|
|
244
|
+
type BuilderPageProps = {
|
|
245
|
+
components: Record<string, React.ComponentType<any>>;
|
|
246
|
+
seo?: NextSeoProps;
|
|
247
|
+
themeStyle?: string | null;
|
|
248
|
+
fontStyle?: string | null;
|
|
249
|
+
header?: BuilderState;
|
|
250
|
+
footer?: BuilderState;
|
|
251
|
+
sectionData?: Record<string, SectionData$1>;
|
|
252
|
+
storefrontToken?: string | null;
|
|
253
|
+
storefrontHandle?: string | null;
|
|
254
|
+
shopToken?: string | null;
|
|
255
|
+
mode?: RenderMode;
|
|
256
|
+
pageType: ShopType.PublishedThemePageType;
|
|
257
|
+
editorImageToLayout?: boolean;
|
|
258
|
+
isThemeSectionEditor?: boolean;
|
|
259
|
+
hiddenToolbar?: boolean;
|
|
260
|
+
pageName: string;
|
|
261
|
+
isOriginTemplate?: boolean;
|
|
262
|
+
};
|
|
263
|
+
declare const BuilderPage: React.FC<BuilderPageProps>;
|
|
261
264
|
|
|
262
|
-
export { AppPropsWithLayout, BuilderPage, CollectionDetailPage, CollectionPageProps, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, NextPageWithLayout, Page404, Page500, PageBuilderProps, PreviewPage, ProductDetailPage, ProductPageProps, StaticPage, StaticPageProps, StaticPagePropsV2, StaticPageV2, TikTokPixel, createAppAPIFetcher, createFetcher, createShopifyFetcher, genCSS, getBuilderProps, getCollectionProps, getFallbackV2, getFontFromGlobalStyle, getFontFromGroupSetting, getFonts, getFontsFromDataBuilder, getHomePageProps, getHomePagePropsV2, getLayout, getPostPurchasePropsPreview, getPreviewProps, getProductProps, getStaticPagePropsPreview, getStaticPagePropsV2, getStaticPaths, getStorefrontApi, isBot, normalizePageSectionResponseV2, parseBuilderTemplateV2,
|
|
265
|
+
export { AppPropsWithLayout, BuilderPage, CollectionDetailPage, CollectionPageProps, ErrorBoundary, ErrorFallback, FacebookPixel, GoogleAnalytic, NextPageWithLayout, Page404, Page500, PageBuilderProps, PageBuilderPropsV2, PreviewPage, ProductDetailPage, ProductPageProps, StaticPage, StaticPageProps, StaticPagePropsV2, StaticPageV2, TikTokPixel, createAppAPIFetcher, createFetcher, createShopifyFetcher, genCSS, getBuilderProps, getCollectionProps, getFallbackV2, getFontFromGlobalStyle, getFontFromGroupSetting, getFonts, getFontsFromDataBuilder, getHomePageProps, getHomePagePropsV2, getLayout, getPostPurchasePropsPreview, getPreviewProps, getProductProps, getStaticPagePropsPreview, getStaticPagePropsV2, getStaticPaths, getStorefrontApi, isBot, normalizePageSectionResponseV2, parseBuilderTemplateV2, retryWithDelay, usePagePreview, useTrackingView };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-dev.161",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"next": "latest"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "
|
|
30
|
-
"@gem-sdk/plugin-cookie-bar": "1.58.0",
|
|
31
|
-
"@gem-sdk/plugin-quick-view": "1.58.0",
|
|
32
|
-
"@gem-sdk/plugin-sticky-add-to-cart": "1.58.0"
|
|
29
|
+
"@gem-sdk/core": "2.0.0-dev.160",
|
|
30
|
+
"@gem-sdk/plugin-cookie-bar": "1.58.0-dev.142",
|
|
31
|
+
"@gem-sdk/plugin-quick-view": "1.58.0-dev.142",
|
|
32
|
+
"@gem-sdk/plugin-sticky-add-to-cart": "1.58.0-dev.142"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"next": ">=13"
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var core = require('@gem-sdk/core');
|
|
7
|
-
var react = require('react');
|
|
8
|
-
|
|
9
|
-
const InteractionSelectOnPageHeader = ()=>{
|
|
10
|
-
const selectType = core.usePageStore((s)=>s.interactionData?.selectType);
|
|
11
|
-
const settingType = core.usePageStore((s)=>s.interactionData?.settingType);
|
|
12
|
-
const setInteractionSelectType = core.usePageStore((s)=>s.setInteractionSelectType);
|
|
13
|
-
const { closeSelectOnPage, changeSelectMode } = core.useInteraction();
|
|
14
|
-
const [hoverOption, setHoverOption] = react.useState(null);
|
|
15
|
-
const [openDropdown, setOpenDropdown] = react.useState(false);
|
|
16
|
-
const popupRef = react.useRef(null);
|
|
17
|
-
const isSelectOnPage = core.usePageStore((s)=>s.interactionData?.isSelectOnPage);
|
|
18
|
-
const handleSetInteraction = (type)=>{
|
|
19
|
-
setOpenDropdown(false);
|
|
20
|
-
setInteractionSelectType(type);
|
|
21
|
-
changeSelectMode(type);
|
|
22
|
-
if (type == 'PAGE') closeSelectOnPage();
|
|
23
|
-
};
|
|
24
|
-
const handleClickOutside = react.useCallback((event)=>{
|
|
25
|
-
if (!openDropdown) return;
|
|
26
|
-
if (popupRef.current && !popupRef.current.contains(event.target)) {
|
|
27
|
-
setOpenDropdown(false);
|
|
28
|
-
}
|
|
29
|
-
}, [
|
|
30
|
-
openDropdown
|
|
31
|
-
]);
|
|
32
|
-
react.useEffect(()=>{
|
|
33
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
34
|
-
return ()=>{
|
|
35
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
36
|
-
};
|
|
37
|
-
}, [
|
|
38
|
-
handleClickOutside
|
|
39
|
-
]);
|
|
40
|
-
const isShowOverlay = react.useMemo(()=>{
|
|
41
|
-
return hoverOption !== 'ELEMENT' && (selectType === 'PAGE' || selectType === 'ELEMENT' && hoverOption === 'PAGE') && settingType === 'TRIGGER';
|
|
42
|
-
}, [
|
|
43
|
-
hoverOption,
|
|
44
|
-
selectType
|
|
45
|
-
]);
|
|
46
|
-
const title = react.useMemo(()=>{
|
|
47
|
-
const type = selectType === 'ELEMENT' ? 'an element' : 'entire page';
|
|
48
|
-
if (settingType === 'TRIGGER') return `Start with triggering ${type}`;
|
|
49
|
-
return `Set ${selectType === 'ELEMENT' ? 'an element' : 'entire page'} as target`;
|
|
50
|
-
}, [
|
|
51
|
-
selectType,
|
|
52
|
-
settingType
|
|
53
|
-
]);
|
|
54
|
-
const renderIconCheckSvg = ()=>{
|
|
55
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
56
|
-
className: "gp-w-[21px]",
|
|
57
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
58
|
-
width: "21",
|
|
59
|
-
height: "20",
|
|
60
|
-
viewBox: "0 0 21 20",
|
|
61
|
-
fill: "none",
|
|
62
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
63
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
64
|
-
fillRule: "evenodd",
|
|
65
|
-
clipRule: "evenodd",
|
|
66
|
-
d: "M16.3415 5.1766C16.5528 5.41207 16.5528 5.79383 16.3415 6.0293L8.45016 14.8234C8.34869 14.9365 8.21107 15 8.06757 15C7.92408 15 7.78645 14.9365 7.68499 14.8234L4.65846 11.4505C4.44717 11.215 4.44718 10.8333 4.65848 10.5978C4.86978 10.3623 5.21236 10.3623 5.42365 10.5978L8.06759 13.5443L15.5764 5.1766C15.7877 4.94113 16.1302 4.94113 16.3415 5.1766Z",
|
|
67
|
-
fill: "#00C853"
|
|
68
|
-
})
|
|
69
|
-
})
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
return isSelectOnPage && /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
73
|
-
children: [
|
|
74
|
-
/*#__PURE__*/ jsxRuntime.jsx("header", {
|
|
75
|
-
className: "gp-flex gp-text-[12px] gp-justify-center gp-items-center gp-h-10 gp-fixed gp-top-0 gp-left-0 gp-w-full gp-z-[1000] gp-bg-[#151515] gp-text-white interaction-select-mode-header",
|
|
76
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("section", {
|
|
77
|
-
className: "gp-flex gp-bg-[#151515]/[0.15] gp-items-center gp-h-full gp-rounded-b-lg gp-pt-1 gp-gap-2",
|
|
78
|
-
children: [
|
|
79
|
-
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
80
|
-
className: "gp-relative",
|
|
81
|
-
children: [
|
|
82
|
-
/*#__PURE__*/ jsxRuntime.jsxs("button", {
|
|
83
|
-
className: `gp-h-full hover:gp-bg-[#7190FF] gp-w-[280px] gp-gap-2 gp-py-2 gp-px-4 gp-items-center gp-justify-center gp-leading-5 gp-font-medium gp-flex gp-rounded-b-[8px] gp-bg-[#3C67FF] gp-text-[#F9F9F9]`,
|
|
84
|
-
onClick: ()=>setOpenDropdown((prev)=>!prev),
|
|
85
|
-
children: [
|
|
86
|
-
/*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
87
|
-
className: "gp-grow",
|
|
88
|
-
children: title
|
|
89
|
-
}),
|
|
90
|
-
settingType === 'TRIGGER' && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
91
|
-
className: "gp-w-[21px]",
|
|
92
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
93
|
-
width: "16",
|
|
94
|
-
height: "16",
|
|
95
|
-
viewBox: "0 0 16 16",
|
|
96
|
-
fill: "currentColor",
|
|
97
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
98
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
99
|
-
fillRule: "evenodd",
|
|
100
|
-
clipRule: "evenodd",
|
|
101
|
-
d: "M4.13017 6.11716C4.30374 5.96095 4.58515 5.96095 4.75871 6.11716L8 9.03431L11.2413 6.11716C11.4149 5.96095 11.6963 5.96095 11.8698 6.11716C12.0434 6.27337 12.0434 6.52663 11.8698 6.68284L8.31427 9.88284C8.1407 10.0391 7.8593 10.0391 7.68573 9.88284L4.13017 6.68284C3.95661 6.52663 3.95661 6.27337 4.13017 6.11716Z",
|
|
102
|
-
fill: "currentColor"
|
|
103
|
-
})
|
|
104
|
-
})
|
|
105
|
-
})
|
|
106
|
-
]
|
|
107
|
-
}),
|
|
108
|
-
openDropdown && settingType === 'TRIGGER' && /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
109
|
-
ref: popupRef,
|
|
110
|
-
className: "gp-p-2 gp-flex gp-flex-col gp-absolute gp-top-[calc(100%_+_4px)] gp-w-[280px] gp-bg-[#151515] gp-rounded-xl gp-text-white",
|
|
111
|
-
children: [
|
|
112
|
-
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
113
|
-
className: "gp-p-2 gp-flex gp-gap-2 gp-cursor-pointer hover:gp-bg-[#3b3b3b] gp-rounded-lg",
|
|
114
|
-
"aria-hidden": true,
|
|
115
|
-
onClick: ()=>handleSetInteraction('ELEMENT'),
|
|
116
|
-
onMouseOver: ()=>setHoverOption('ELEMENT'),
|
|
117
|
-
onFocus: ()=>setHoverOption('ELEMENT'),
|
|
118
|
-
onMouseLeave: ()=>setHoverOption(null),
|
|
119
|
-
children: [
|
|
120
|
-
selectType === 'ELEMENT' ? renderIconCheckSvg() : /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
121
|
-
className: "gp-w-[21px]",
|
|
122
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
123
|
-
width: "18",
|
|
124
|
-
height: "18",
|
|
125
|
-
viewBox: "0 0 18 18",
|
|
126
|
-
fill: "none",
|
|
127
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
128
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
129
|
-
fillRule: "evenodd",
|
|
130
|
-
clipRule: "evenodd",
|
|
131
|
-
d: "M8.99983 0.351562C9.34501 0.351562 9.62483 0.631385 9.62483 0.976562V2.15278C12.923 2.45 15.5496 5.07654 15.8468 8.37476H17.0233C17.3684 8.37476 17.6483 8.65458 17.6483 8.99976C17.6483 9.34493 17.3684 9.62476 17.0233 9.62476H15.8468C15.5496 12.923 12.923 15.5495 9.62483 15.8467V17.0232C9.62483 17.3683 9.34501 17.6482 8.99983 17.6482C8.65465 17.6482 8.37483 17.3683 8.37483 17.0232V15.8467C5.07662 15.5495 2.45007 12.923 2.15286 9.62476H0.976562C0.631385 9.62476 0.351562 9.34493 0.351562 8.99976C0.351562 8.65458 0.631385 8.37476 0.976562 8.37476H2.15286C2.45007 5.07654 5.07662 2.45 8.37483 2.15278V0.976562C8.37483 0.631385 8.65465 0.351562 8.99983 0.351562ZM3.40916 9.62476H5.97656C6.32174 9.62476 6.60156 9.34493 6.60156 8.99976C6.60156 8.65458 6.32174 8.37476 5.97656 8.37476H3.40916C3.69738 5.7675 5.76757 3.6973 8.37483 3.40909V5.97656C8.37483 6.32174 8.65465 6.60156 8.99983 6.60156C9.34501 6.60156 9.62483 6.32174 9.62483 5.97656V3.40909C12.2321 3.6973 14.3023 5.7675 14.5905 8.37476H12.0233C11.6781 8.37476 11.3983 8.65458 11.3983 8.99976C11.3983 9.34493 11.6781 9.62476 12.0233 9.62476H14.5905C14.3023 12.232 12.2321 14.3022 9.62483 14.5904V12.0232C9.62483 11.678 9.34501 11.3982 8.99983 11.3982C8.65465 11.3982 8.37483 11.678 8.37483 12.0232V14.5904C5.76757 14.3022 3.69738 12.232 3.40916 9.62476Z",
|
|
132
|
-
fill: "#AAAAAA"
|
|
133
|
-
})
|
|
134
|
-
})
|
|
135
|
-
}),
|
|
136
|
-
/*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
137
|
-
className: "gp-h-[21px]",
|
|
138
|
-
children: "An element"
|
|
139
|
-
})
|
|
140
|
-
]
|
|
141
|
-
}),
|
|
142
|
-
/*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
143
|
-
className: "gp-p-2 gp-flex gp-gap-2 gp-cursor-pointer hover:gp-bg-[#3b3b3b] gp-rounded-lg",
|
|
144
|
-
onClick: ()=>handleSetInteraction('PAGE'),
|
|
145
|
-
onMouseOver: ()=>setHoverOption('PAGE'),
|
|
146
|
-
onFocus: ()=>setHoverOption('PAGE'),
|
|
147
|
-
onMouseLeave: ()=>setHoverOption(null),
|
|
148
|
-
"aria-hidden": true,
|
|
149
|
-
children: [
|
|
150
|
-
selectType === 'PAGE' ? renderIconCheckSvg() : /*#__PURE__*/ jsxRuntime.jsx("svg", {
|
|
151
|
-
width: "21",
|
|
152
|
-
height: "20",
|
|
153
|
-
viewBox: "0 0 21 20",
|
|
154
|
-
fill: "none",
|
|
155
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
156
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
157
|
-
fillRule: "evenodd",
|
|
158
|
-
clipRule: "evenodd",
|
|
159
|
-
d: "M7.25 4.5C6.55964 4.5 6 5.05964 6 5.75V14.25C6 14.9404 6.55964 15.5 7.25 15.5H13.75C14.4404 15.5 15 14.9404 15 14.25V9.5H11.75C10.7835 9.5 10 8.7165 10 7.75V4.5H7.25ZM11.5 5.56066L13.9393 8H11.75C11.6119 8 11.5 7.88807 11.5 7.75V5.56066ZM4.5 5.75C4.5 4.23122 5.73122 3 7.25 3H10.75C10.9489 3 11.1397 3.07902 11.2803 3.21967L16.2803 8.21967C16.421 8.36032 16.5 8.55109 16.5 8.75V14.25C16.5 15.7688 15.2688 17 13.75 17H7.25C5.73122 17 4.5 15.7688 4.5 14.25V5.75Z",
|
|
160
|
-
fill: "#AAAAAA"
|
|
161
|
-
})
|
|
162
|
-
}),
|
|
163
|
-
/*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
164
|
-
className: "gp-h-[21px]",
|
|
165
|
-
children: "Entire page"
|
|
166
|
-
})
|
|
167
|
-
]
|
|
168
|
-
})
|
|
169
|
-
]
|
|
170
|
-
})
|
|
171
|
-
]
|
|
172
|
-
}),
|
|
173
|
-
/*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
174
|
-
className: "",
|
|
175
|
-
onClick: closeSelectOnPage,
|
|
176
|
-
children: "Cancel"
|
|
177
|
-
})
|
|
178
|
-
]
|
|
179
|
-
})
|
|
180
|
-
}),
|
|
181
|
-
isShowOverlay && /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
182
|
-
className: `gp-w-full gp-fixed gp-top-0 gp-left-0 gp-mt-[40px] gp-z-[999] gp-bg-[#3c67ff]/[0.25] gp-pointer-events-none`,
|
|
183
|
-
style: {
|
|
184
|
-
height: 'calc(100% - 40px)'
|
|
185
|
-
}
|
|
186
|
-
})
|
|
187
|
-
]
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
exports.default = InteractionSelectOnPageHeader;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var nextjs = require('@sentry/nextjs');
|
|
4
|
-
|
|
5
|
-
const sentryCaptureException = (funcName, message, data, options)=>{
|
|
6
|
-
nextjs.withScope((scope)=>{
|
|
7
|
-
scope.setLevel(options?.level ?? 'log');
|
|
8
|
-
if (options?.tag) {
|
|
9
|
-
scope.setTag(options?.tag.key, options?.tag.value);
|
|
10
|
-
}
|
|
11
|
-
scope.setExtra('function', funcName);
|
|
12
|
-
scope.setExtra('data', JSON.stringify(data));
|
|
13
|
-
nextjs.captureMessage(`${funcName}: ${message}`);
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
exports.sentryCaptureException = sentryCaptureException;
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { usePageStore, useInteraction } from '@gem-sdk/core';
|
|
3
|
-
import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
4
|
-
|
|
5
|
-
const InteractionSelectOnPageHeader = ()=>{
|
|
6
|
-
const selectType = usePageStore((s)=>s.interactionData?.selectType);
|
|
7
|
-
const settingType = usePageStore((s)=>s.interactionData?.settingType);
|
|
8
|
-
const setInteractionSelectType = usePageStore((s)=>s.setInteractionSelectType);
|
|
9
|
-
const { closeSelectOnPage, changeSelectMode } = useInteraction();
|
|
10
|
-
const [hoverOption, setHoverOption] = useState(null);
|
|
11
|
-
const [openDropdown, setOpenDropdown] = useState(false);
|
|
12
|
-
const popupRef = useRef(null);
|
|
13
|
-
const isSelectOnPage = usePageStore((s)=>s.interactionData?.isSelectOnPage);
|
|
14
|
-
const handleSetInteraction = (type)=>{
|
|
15
|
-
setOpenDropdown(false);
|
|
16
|
-
setInteractionSelectType(type);
|
|
17
|
-
changeSelectMode(type);
|
|
18
|
-
if (type == 'PAGE') closeSelectOnPage();
|
|
19
|
-
};
|
|
20
|
-
const handleClickOutside = useCallback((event)=>{
|
|
21
|
-
if (!openDropdown) return;
|
|
22
|
-
if (popupRef.current && !popupRef.current.contains(event.target)) {
|
|
23
|
-
setOpenDropdown(false);
|
|
24
|
-
}
|
|
25
|
-
}, [
|
|
26
|
-
openDropdown
|
|
27
|
-
]);
|
|
28
|
-
useEffect(()=>{
|
|
29
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
30
|
-
return ()=>{
|
|
31
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
32
|
-
};
|
|
33
|
-
}, [
|
|
34
|
-
handleClickOutside
|
|
35
|
-
]);
|
|
36
|
-
const isShowOverlay = useMemo(()=>{
|
|
37
|
-
return hoverOption !== 'ELEMENT' && (selectType === 'PAGE' || selectType === 'ELEMENT' && hoverOption === 'PAGE') && settingType === 'TRIGGER';
|
|
38
|
-
}, [
|
|
39
|
-
hoverOption,
|
|
40
|
-
selectType
|
|
41
|
-
]);
|
|
42
|
-
const title = useMemo(()=>{
|
|
43
|
-
const type = selectType === 'ELEMENT' ? 'an element' : 'entire page';
|
|
44
|
-
if (settingType === 'TRIGGER') return `Start with triggering ${type}`;
|
|
45
|
-
return `Set ${selectType === 'ELEMENT' ? 'an element' : 'entire page'} as target`;
|
|
46
|
-
}, [
|
|
47
|
-
selectType,
|
|
48
|
-
settingType
|
|
49
|
-
]);
|
|
50
|
-
const renderIconCheckSvg = ()=>{
|
|
51
|
-
return /*#__PURE__*/ jsx("div", {
|
|
52
|
-
className: "gp-w-[21px]",
|
|
53
|
-
children: /*#__PURE__*/ jsx("svg", {
|
|
54
|
-
width: "21",
|
|
55
|
-
height: "20",
|
|
56
|
-
viewBox: "0 0 21 20",
|
|
57
|
-
fill: "none",
|
|
58
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
59
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
60
|
-
fillRule: "evenodd",
|
|
61
|
-
clipRule: "evenodd",
|
|
62
|
-
d: "M16.3415 5.1766C16.5528 5.41207 16.5528 5.79383 16.3415 6.0293L8.45016 14.8234C8.34869 14.9365 8.21107 15 8.06757 15C7.92408 15 7.78645 14.9365 7.68499 14.8234L4.65846 11.4505C4.44717 11.215 4.44718 10.8333 4.65848 10.5978C4.86978 10.3623 5.21236 10.3623 5.42365 10.5978L8.06759 13.5443L15.5764 5.1766C15.7877 4.94113 16.1302 4.94113 16.3415 5.1766Z",
|
|
63
|
-
fill: "#00C853"
|
|
64
|
-
})
|
|
65
|
-
})
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
return isSelectOnPage && /*#__PURE__*/ jsxs(Fragment, {
|
|
69
|
-
children: [
|
|
70
|
-
/*#__PURE__*/ jsx("header", {
|
|
71
|
-
className: "gp-flex gp-text-[12px] gp-justify-center gp-items-center gp-h-10 gp-fixed gp-top-0 gp-left-0 gp-w-full gp-z-[1000] gp-bg-[#151515] gp-text-white interaction-select-mode-header",
|
|
72
|
-
children: /*#__PURE__*/ jsxs("section", {
|
|
73
|
-
className: "gp-flex gp-bg-[#151515]/[0.15] gp-items-center gp-h-full gp-rounded-b-lg gp-pt-1 gp-gap-2",
|
|
74
|
-
children: [
|
|
75
|
-
/*#__PURE__*/ jsxs("div", {
|
|
76
|
-
className: "gp-relative",
|
|
77
|
-
children: [
|
|
78
|
-
/*#__PURE__*/ jsxs("button", {
|
|
79
|
-
className: `gp-h-full hover:gp-bg-[#7190FF] gp-w-[280px] gp-gap-2 gp-py-2 gp-px-4 gp-items-center gp-justify-center gp-leading-5 gp-font-medium gp-flex gp-rounded-b-[8px] gp-bg-[#3C67FF] gp-text-[#F9F9F9]`,
|
|
80
|
-
onClick: ()=>setOpenDropdown((prev)=>!prev),
|
|
81
|
-
children: [
|
|
82
|
-
/*#__PURE__*/ jsx("p", {
|
|
83
|
-
className: "gp-grow",
|
|
84
|
-
children: title
|
|
85
|
-
}),
|
|
86
|
-
settingType === 'TRIGGER' && /*#__PURE__*/ jsx("div", {
|
|
87
|
-
className: "gp-w-[21px]",
|
|
88
|
-
children: /*#__PURE__*/ jsx("svg", {
|
|
89
|
-
width: "16",
|
|
90
|
-
height: "16",
|
|
91
|
-
viewBox: "0 0 16 16",
|
|
92
|
-
fill: "currentColor",
|
|
93
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
94
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
95
|
-
fillRule: "evenodd",
|
|
96
|
-
clipRule: "evenodd",
|
|
97
|
-
d: "M4.13017 6.11716C4.30374 5.96095 4.58515 5.96095 4.75871 6.11716L8 9.03431L11.2413 6.11716C11.4149 5.96095 11.6963 5.96095 11.8698 6.11716C12.0434 6.27337 12.0434 6.52663 11.8698 6.68284L8.31427 9.88284C8.1407 10.0391 7.8593 10.0391 7.68573 9.88284L4.13017 6.68284C3.95661 6.52663 3.95661 6.27337 4.13017 6.11716Z",
|
|
98
|
-
fill: "currentColor"
|
|
99
|
-
})
|
|
100
|
-
})
|
|
101
|
-
})
|
|
102
|
-
]
|
|
103
|
-
}),
|
|
104
|
-
openDropdown && settingType === 'TRIGGER' && /*#__PURE__*/ jsxs("div", {
|
|
105
|
-
ref: popupRef,
|
|
106
|
-
className: "gp-p-2 gp-flex gp-flex-col gp-absolute gp-top-[calc(100%_+_4px)] gp-w-[280px] gp-bg-[#151515] gp-rounded-xl gp-text-white",
|
|
107
|
-
children: [
|
|
108
|
-
/*#__PURE__*/ jsxs("div", {
|
|
109
|
-
className: "gp-p-2 gp-flex gp-gap-2 gp-cursor-pointer hover:gp-bg-[#3b3b3b] gp-rounded-lg",
|
|
110
|
-
"aria-hidden": true,
|
|
111
|
-
onClick: ()=>handleSetInteraction('ELEMENT'),
|
|
112
|
-
onMouseOver: ()=>setHoverOption('ELEMENT'),
|
|
113
|
-
onFocus: ()=>setHoverOption('ELEMENT'),
|
|
114
|
-
onMouseLeave: ()=>setHoverOption(null),
|
|
115
|
-
children: [
|
|
116
|
-
selectType === 'ELEMENT' ? renderIconCheckSvg() : /*#__PURE__*/ jsx("div", {
|
|
117
|
-
className: "gp-w-[21px]",
|
|
118
|
-
children: /*#__PURE__*/ jsx("svg", {
|
|
119
|
-
width: "18",
|
|
120
|
-
height: "18",
|
|
121
|
-
viewBox: "0 0 18 18",
|
|
122
|
-
fill: "none",
|
|
123
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
124
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
125
|
-
fillRule: "evenodd",
|
|
126
|
-
clipRule: "evenodd",
|
|
127
|
-
d: "M8.99983 0.351562C9.34501 0.351562 9.62483 0.631385 9.62483 0.976562V2.15278C12.923 2.45 15.5496 5.07654 15.8468 8.37476H17.0233C17.3684 8.37476 17.6483 8.65458 17.6483 8.99976C17.6483 9.34493 17.3684 9.62476 17.0233 9.62476H15.8468C15.5496 12.923 12.923 15.5495 9.62483 15.8467V17.0232C9.62483 17.3683 9.34501 17.6482 8.99983 17.6482C8.65465 17.6482 8.37483 17.3683 8.37483 17.0232V15.8467C5.07662 15.5495 2.45007 12.923 2.15286 9.62476H0.976562C0.631385 9.62476 0.351562 9.34493 0.351562 8.99976C0.351562 8.65458 0.631385 8.37476 0.976562 8.37476H2.15286C2.45007 5.07654 5.07662 2.45 8.37483 2.15278V0.976562C8.37483 0.631385 8.65465 0.351562 8.99983 0.351562ZM3.40916 9.62476H5.97656C6.32174 9.62476 6.60156 9.34493 6.60156 8.99976C6.60156 8.65458 6.32174 8.37476 5.97656 8.37476H3.40916C3.69738 5.7675 5.76757 3.6973 8.37483 3.40909V5.97656C8.37483 6.32174 8.65465 6.60156 8.99983 6.60156C9.34501 6.60156 9.62483 6.32174 9.62483 5.97656V3.40909C12.2321 3.6973 14.3023 5.7675 14.5905 8.37476H12.0233C11.6781 8.37476 11.3983 8.65458 11.3983 8.99976C11.3983 9.34493 11.6781 9.62476 12.0233 9.62476H14.5905C14.3023 12.232 12.2321 14.3022 9.62483 14.5904V12.0232C9.62483 11.678 9.34501 11.3982 8.99983 11.3982C8.65465 11.3982 8.37483 11.678 8.37483 12.0232V14.5904C5.76757 14.3022 3.69738 12.232 3.40916 9.62476Z",
|
|
128
|
-
fill: "#AAAAAA"
|
|
129
|
-
})
|
|
130
|
-
})
|
|
131
|
-
}),
|
|
132
|
-
/*#__PURE__*/ jsx("p", {
|
|
133
|
-
className: "gp-h-[21px]",
|
|
134
|
-
children: "An element"
|
|
135
|
-
})
|
|
136
|
-
]
|
|
137
|
-
}),
|
|
138
|
-
/*#__PURE__*/ jsxs("div", {
|
|
139
|
-
className: "gp-p-2 gp-flex gp-gap-2 gp-cursor-pointer hover:gp-bg-[#3b3b3b] gp-rounded-lg",
|
|
140
|
-
onClick: ()=>handleSetInteraction('PAGE'),
|
|
141
|
-
onMouseOver: ()=>setHoverOption('PAGE'),
|
|
142
|
-
onFocus: ()=>setHoverOption('PAGE'),
|
|
143
|
-
onMouseLeave: ()=>setHoverOption(null),
|
|
144
|
-
"aria-hidden": true,
|
|
145
|
-
children: [
|
|
146
|
-
selectType === 'PAGE' ? renderIconCheckSvg() : /*#__PURE__*/ jsx("svg", {
|
|
147
|
-
width: "21",
|
|
148
|
-
height: "20",
|
|
149
|
-
viewBox: "0 0 21 20",
|
|
150
|
-
fill: "none",
|
|
151
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
152
|
-
children: /*#__PURE__*/ jsx("path", {
|
|
153
|
-
fillRule: "evenodd",
|
|
154
|
-
clipRule: "evenodd",
|
|
155
|
-
d: "M7.25 4.5C6.55964 4.5 6 5.05964 6 5.75V14.25C6 14.9404 6.55964 15.5 7.25 15.5H13.75C14.4404 15.5 15 14.9404 15 14.25V9.5H11.75C10.7835 9.5 10 8.7165 10 7.75V4.5H7.25ZM11.5 5.56066L13.9393 8H11.75C11.6119 8 11.5 7.88807 11.5 7.75V5.56066ZM4.5 5.75C4.5 4.23122 5.73122 3 7.25 3H10.75C10.9489 3 11.1397 3.07902 11.2803 3.21967L16.2803 8.21967C16.421 8.36032 16.5 8.55109 16.5 8.75V14.25C16.5 15.7688 15.2688 17 13.75 17H7.25C5.73122 17 4.5 15.7688 4.5 14.25V5.75Z",
|
|
156
|
-
fill: "#AAAAAA"
|
|
157
|
-
})
|
|
158
|
-
}),
|
|
159
|
-
/*#__PURE__*/ jsx("p", {
|
|
160
|
-
className: "gp-h-[21px]",
|
|
161
|
-
children: "Entire page"
|
|
162
|
-
})
|
|
163
|
-
]
|
|
164
|
-
})
|
|
165
|
-
]
|
|
166
|
-
})
|
|
167
|
-
]
|
|
168
|
-
}),
|
|
169
|
-
/*#__PURE__*/ jsx("button", {
|
|
170
|
-
className: "",
|
|
171
|
-
onClick: closeSelectOnPage,
|
|
172
|
-
children: "Cancel"
|
|
173
|
-
})
|
|
174
|
-
]
|
|
175
|
-
})
|
|
176
|
-
}),
|
|
177
|
-
isShowOverlay && /*#__PURE__*/ jsx("div", {
|
|
178
|
-
className: `gp-w-full gp-fixed gp-top-0 gp-left-0 gp-mt-[40px] gp-z-[999] gp-bg-[#3c67ff]/[0.25] gp-pointer-events-none`,
|
|
179
|
-
style: {
|
|
180
|
-
height: 'calc(100% - 40px)'
|
|
181
|
-
}
|
|
182
|
-
})
|
|
183
|
-
]
|
|
184
|
-
});
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
export { InteractionSelectOnPageHeader as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { withScope, captureMessage } from '@sentry/nextjs';
|
|
2
|
-
|
|
3
|
-
const sentryCaptureException = (funcName, message, data, options)=>{
|
|
4
|
-
withScope((scope)=>{
|
|
5
|
-
scope.setLevel(options?.level ?? 'log');
|
|
6
|
-
if (options?.tag) {
|
|
7
|
-
scope.setTag(options?.tag.key, options?.tag.value);
|
|
8
|
-
}
|
|
9
|
-
scope.setExtra('function', funcName);
|
|
10
|
-
scope.setExtra('data', JSON.stringify(data));
|
|
11
|
-
captureMessage(`${funcName}: ${message}`);
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export { sentryCaptureException };
|