@gem-sdk/pages 1.41.0-dev.19 → 1.41.0-dev.22
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/builder/Footer.js +153 -0
- package/dist/cjs/components/{Header.js → builder/Header.js} +46 -37
- package/dist/cjs/components/builder/SwitchView.js +181 -0
- package/dist/cjs/components/builder/const.js +56 -0
- package/dist/cjs/components/image-to-layout/AddSectionImageToLayout.js +14 -25
- package/dist/cjs/pages/builder.js +2 -2
- package/dist/cjs/pages/static-v2.js +1 -1
- package/dist/esm/components/builder/Footer.js +149 -0
- package/dist/esm/components/{Header.js → builder/Header.js} +46 -37
- package/dist/esm/components/builder/SwitchView.js +177 -0
- package/dist/esm/components/builder/const.js +54 -0
- package/dist/esm/components/image-to-layout/AddSectionImageToLayout.js +14 -25
- package/dist/esm/pages/builder.js +2 -2
- package/dist/esm/pages/static-v2.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/components/Footer.js +0 -150
- package/dist/esm/components/Footer.js +0 -146
|
@@ -14,22 +14,14 @@ const BASE_DATA = [
|
|
|
14
14
|
id: 'gps-add-section-bottom-from-library'
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
title: '
|
|
18
|
-
content: '
|
|
19
|
-
hasAILogo:
|
|
17
|
+
title: 'Generate layout',
|
|
18
|
+
content: 'from URL or image',
|
|
19
|
+
hasAILogo: true,
|
|
20
20
|
id: 'gps-add-section-bottom-from-url'
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
title: '
|
|
24
|
-
content: '
|
|
25
|
-
hasAILogo: false,
|
|
26
|
-
id: 'gps-add-section-bottom-from-image'
|
|
27
|
-
}
|
|
28
|
-
];
|
|
29
|
-
const POST_PURCHASE_PAGE_DATA = [
|
|
30
|
-
{
|
|
31
|
-
title: 'Blank section',
|
|
32
|
-
content: 'to start from scratch',
|
|
23
|
+
title: 'Add blank section',
|
|
24
|
+
content: 'then drag & drop elements',
|
|
33
25
|
hasAILogo: false,
|
|
34
26
|
id: 'gps-add-section-blank'
|
|
35
27
|
}
|
|
@@ -53,10 +45,7 @@ const AddSectionImageToLayout = ({ editorImageToLayout })=>{
|
|
|
53
45
|
'gps-add-section-bottom-from-image',
|
|
54
46
|
'gps-add-section-bottom-from-library'
|
|
55
47
|
];
|
|
56
|
-
ACTIONS_DATA =
|
|
57
|
-
...POST_PURCHASE_PAGE_DATA,
|
|
58
|
-
...BASE_DATA
|
|
59
|
-
].filter((item)=>!dataIdNotPostPurchase.includes(item.id));
|
|
48
|
+
ACTIONS_DATA = BASE_DATA.filter((item)=>!dataIdNotPostPurchase.includes(item.id));
|
|
60
49
|
}
|
|
61
50
|
react.useEffect(()=>{
|
|
62
51
|
if (!isInput || totalSection === 0) {
|
|
@@ -109,26 +98,26 @@ const AddSectionImageToLayout = ({ editorImageToLayout })=>{
|
|
|
109
98
|
children: [
|
|
110
99
|
action.title,
|
|
111
100
|
action.hasAILogo && /*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
112
|
-
width: "
|
|
101
|
+
width: "43",
|
|
113
102
|
height: "20",
|
|
114
|
-
viewBox: "0 0
|
|
103
|
+
viewBox: "0 0 43 20",
|
|
115
104
|
fill: "none",
|
|
116
105
|
xmlns: "http://www.w3.org/2000/svg",
|
|
117
106
|
children: [
|
|
118
107
|
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
119
|
-
d: "M0
|
|
108
|
+
d: "M0 8C0 3.58172 3.58172 0 8 0H35C39.4183 0 43 3.58172 43 8V12C43 16.4183 39.4183 20 35 20H8C3.58172 20 0 16.4183 0 12V8Z",
|
|
120
109
|
fill: "#EBDDF8"
|
|
121
110
|
}),
|
|
122
111
|
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
123
|
-
d: "
|
|
124
|
-
fill: "url(#
|
|
112
|
+
d: "M8.95881 14V5.27273H12.1548C12.7741 5.27273 13.2869 5.375 13.6932 5.57955C14.0994 5.78125 14.4034 6.0554 14.6051 6.40199C14.8068 6.74574 14.9077 7.13352 14.9077 7.56534C14.9077 7.92898 14.8409 8.2358 14.7074 8.4858C14.5739 8.73295 14.3949 8.93182 14.1705 9.08239C13.9489 9.23011 13.7045 9.33807 13.4375 9.40625V9.49148C13.7273 9.50568 14.0099 9.59943 14.2855 9.77273C14.5639 9.94318 14.794 10.1861 14.9759 10.5014C15.1577 10.8168 15.2486 11.2003 15.2486 11.652C15.2486 12.098 15.1435 12.4986 14.9332 12.8537C14.7259 13.206 14.4048 13.4858 13.9702 13.6932C13.5355 13.8977 12.9801 14 12.304 14H8.95881ZM10.2756 12.8707H12.1761C12.8068 12.8707 13.2585 12.7486 13.5312 12.5043C13.804 12.2599 13.9403 11.9545 13.9403 11.5881C13.9403 11.3125 13.8707 11.0597 13.7315 10.8295C13.5923 10.5994 13.3935 10.4162 13.1349 10.2798C12.8793 10.1435 12.5753 10.0753 12.223 10.0753H10.2756V12.8707ZM10.2756 9.0483H12.0398C12.3352 9.0483 12.6009 8.99148 12.8366 8.87784C13.0753 8.7642 13.2642 8.60511 13.4034 8.40057C13.5455 8.19318 13.6165 7.94886 13.6165 7.66761C13.6165 7.30682 13.4901 7.00426 13.2372 6.75994C12.9844 6.51562 12.5966 6.39347 12.0739 6.39347H10.2756V9.0483ZM19.5291 14.1321C18.8842 14.1321 18.3288 13.9943 17.8629 13.7188C17.3999 13.4403 17.0419 13.0497 16.7891 12.5469C16.5391 12.0412 16.4141 11.4489 16.4141 10.7699C16.4141 10.0994 16.5391 9.50852 16.7891 8.99716C17.0419 8.4858 17.3942 8.08665 17.8459 7.79972C18.3004 7.51278 18.8317 7.36932 19.4396 7.36932C19.8089 7.36932 20.1669 7.4304 20.5135 7.55256C20.8601 7.67472 21.1712 7.86648 21.4467 8.12784C21.7223 8.3892 21.9396 8.72869 22.0987 9.14631C22.2578 9.56108 22.3374 10.0653 22.3374 10.6591V11.1108H17.1342V10.1562H21.0888C21.0888 9.82102 21.0206 9.52415 20.8842 9.26562C20.7479 9.00426 20.5561 8.7983 20.3089 8.64773C20.0646 8.49716 19.7777 8.42188 19.4482 8.42188C19.0902 8.42188 18.7777 8.50994 18.5107 8.68608C18.2464 8.85937 18.0419 9.08665 17.897 9.3679C17.755 9.64631 17.6839 9.94886 17.6839 10.2756V11.0213C17.6839 11.4588 17.7607 11.831 17.9141 12.1378C18.0703 12.4446 18.2876 12.679 18.5661 12.8409C18.8445 13 19.1697 13.0795 19.5419 13.0795C19.7834 13.0795 20.0036 13.0455 20.2024 12.9773C20.4013 12.9062 20.5732 12.8011 20.718 12.6619C20.8629 12.5227 20.9737 12.3509 21.0504 12.1463L22.2564 12.3636C22.1598 12.7187 21.9865 13.0298 21.7365 13.2969C21.4893 13.5611 21.1783 13.767 20.8033 13.9148C20.4311 14.0597 20.0064 14.1321 19.5291 14.1321ZM26.8065 7.45455V8.47727H23.2312V7.45455H26.8065ZM24.19 5.88636H25.4641V12.0781C25.4641 12.3253 25.5011 12.5114 25.5749 12.6364C25.6488 12.7585 25.744 12.8423 25.8604 12.8878C25.9798 12.9304 26.109 12.9517 26.2482 12.9517C26.3505 12.9517 26.44 12.9446 26.5167 12.9304C26.5934 12.9162 26.6531 12.9048 26.6957 12.8963L26.9258 13.9489C26.8519 13.9773 26.7468 14.0057 26.6104 14.0341C26.4741 14.0653 26.3036 14.0824 26.0991 14.0852C25.7638 14.0909 25.4513 14.0312 25.1616 13.9062C24.8718 13.7812 24.6374 13.5881 24.4585 13.3267C24.2795 13.0653 24.19 12.7372 24.19 12.3423V5.88636ZM30.1207 14.1449C29.706 14.1449 29.331 14.0682 28.9957 13.9148C28.6605 13.7585 28.3949 13.5327 28.1989 13.2372C28.0057 12.9418 27.9091 12.5795 27.9091 12.1506C27.9091 11.7812 27.9801 11.4773 28.1222 11.2386C28.2642 11 28.456 10.8111 28.6974 10.6719C28.9389 10.5327 29.2088 10.4276 29.5071 10.3565C29.8054 10.2855 30.1094 10.2315 30.419 10.1946C30.8111 10.1491 31.1293 10.1122 31.3736 10.0838C31.6179 10.0526 31.7955 10.0028 31.9062 9.93466C32.017 9.86648 32.0724 9.75568 32.0724 9.60227V9.57244C32.0724 9.20028 31.9673 8.91193 31.7571 8.70739C31.5497 8.50284 31.2401 8.40057 30.8281 8.40057C30.3991 8.40057 30.0611 8.49574 29.8139 8.68608C29.5696 8.87358 29.4006 9.08239 29.3068 9.3125L28.1094 9.03977C28.2514 8.64205 28.4588 8.32102 28.7315 8.0767C29.0071 7.82955 29.3239 7.65057 29.6818 7.53977C30.0398 7.42614 30.4162 7.36932 30.8111 7.36932C31.0724 7.36932 31.3494 7.40057 31.642 7.46307C31.9375 7.52273 32.2131 7.63352 32.4688 7.79545C32.7273 7.95739 32.9389 8.18892 33.1037 8.49006C33.2685 8.78835 33.3509 9.17614 33.3509 9.65341V14H32.1065V13.1051H32.0554C31.973 13.2699 31.8494 13.4318 31.6847 13.5909C31.5199 13.75 31.3082 13.8821 31.0497 13.9872C30.7912 14.0923 30.4815 14.1449 30.1207 14.1449ZM30.3977 13.1222C30.75 13.1222 31.0511 13.0526 31.3011 12.9134C31.554 12.7741 31.7457 12.5923 31.8764 12.3679C32.0099 12.1406 32.0767 11.8977 32.0767 11.6392V10.7955C32.0313 10.8409 31.9432 10.8835 31.8125 10.9233C31.6847 10.9602 31.5384 10.9929 31.3736 11.0213C31.2088 11.0469 31.0483 11.071 30.892 11.0938C30.7358 11.1136 30.6051 11.1307 30.5 11.1449C30.2528 11.1761 30.027 11.2287 29.8224 11.3026C29.6207 11.3764 29.4588 11.483 29.3366 11.6222C29.2173 11.7585 29.1577 11.9403 29.1577 12.1676C29.1577 12.483 29.2741 12.7216 29.5071 12.8835C29.7401 13.0426 30.0369 13.1222 30.3977 13.1222Z",
|
|
113
|
+
fill: "url(#paint0_linear_9312_318)"
|
|
125
114
|
}),
|
|
126
115
|
/*#__PURE__*/ jsxRuntime.jsx("defs", {
|
|
127
116
|
children: /*#__PURE__*/ jsxRuntime.jsxs("linearGradient", {
|
|
128
|
-
id: "
|
|
129
|
-
x1: "
|
|
117
|
+
id: "paint0_linear_9312_318",
|
|
118
|
+
x1: "35",
|
|
130
119
|
y1: "15.2703",
|
|
131
|
-
x2: "
|
|
120
|
+
x2: "7.99944",
|
|
132
121
|
y2: "15.2287",
|
|
133
122
|
gradientUnits: "userSpaceOnUse",
|
|
134
123
|
children: [
|
|
@@ -6,8 +6,8 @@ var nextSeo = require('next-seo');
|
|
|
6
6
|
var Head = require('next/head');
|
|
7
7
|
var react = require('react');
|
|
8
8
|
var Toolbox = require('../components/builder/Toolbox.js');
|
|
9
|
-
var Header = require('../components/Header.js');
|
|
10
|
-
var Footer = require('../components/Footer.js');
|
|
9
|
+
var Header = require('../components/builder/Header.js');
|
|
10
|
+
var Footer = require('../components/builder/Footer.js');
|
|
11
11
|
var CollectionGlobalProvider = require('./CollectionGlobalProvider.js');
|
|
12
12
|
var PopupManager = require('../components/builder/PopupManager.js');
|
|
13
13
|
var ImageToLayout = require('../components/image-to-layout/ImageToLayout.js');
|
|
@@ -7,7 +7,7 @@ var Head = require('next/head');
|
|
|
7
7
|
var router = require('next/router');
|
|
8
8
|
var useTrackingView = require('../libs/hooks/use-tracking-view.js');
|
|
9
9
|
var parseHtml = require('../libs/parse-html.js');
|
|
10
|
-
var Header = require('../components/Header.js');
|
|
10
|
+
var Header = require('../components/builder/Header.js');
|
|
11
11
|
var FooterForPostPurchase = require('../components/FooterForPostPurchase.js');
|
|
12
12
|
|
|
13
13
|
const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, fontStyle, elementFontStyle, customCodeHeader, shopToken, pageHandle, customFonts, isPostPurchase, shopName, productOffers, publicStoreFrontData, isPreview })=>{
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useShopStore, cls, makeStyleResponsive } from '@gem-sdk/core';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
const defaultMargin = {
|
|
6
|
+
desktop: '16px',
|
|
7
|
+
tablet: '16px',
|
|
8
|
+
mobile: '16px'
|
|
9
|
+
};
|
|
10
|
+
const FOOTER_ON_COLOR = '#E2E2E2';
|
|
11
|
+
const FOOTER_OFF_COLOR = '#F4F4F4';
|
|
12
|
+
const Footer = (props)=>{
|
|
13
|
+
const { pageType, isOriginTemplate } = props;
|
|
14
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
15
|
+
const shopName = urlParams.get('storefrontHandle');
|
|
16
|
+
const layoutSetting = useShopStore((s)=>s.layoutSettings);
|
|
17
|
+
const activeFooter = layoutSetting?.showFooter || isOriginTemplate;
|
|
18
|
+
const footerColor = activeFooter ? FOOTER_ON_COLOR : FOOTER_OFF_COLOR;
|
|
19
|
+
const [shouldFixed, setShouldFixed] = useState(false);
|
|
20
|
+
useEffect(()=>{
|
|
21
|
+
const $iframe = parent.document.querySelector('.iframe');
|
|
22
|
+
if (!$iframe) return;
|
|
23
|
+
const $storefront = document.querySelector('#storefront');
|
|
24
|
+
if (!$storefront) return;
|
|
25
|
+
const headerHeight = 40;
|
|
26
|
+
const footerHeight = 48;
|
|
27
|
+
const iframeHeight = $iframe.clientHeight;
|
|
28
|
+
const comparedHeight = layoutSetting?.showHeader ? iframeHeight - headerHeight - footerHeight : iframeHeight - footerHeight;
|
|
29
|
+
const observer = new ResizeObserver((entries)=>{
|
|
30
|
+
// Handle set fixed footer
|
|
31
|
+
const currentEditingFrameHeight = entries[0]?.target.clientHeight;
|
|
32
|
+
if (currentEditingFrameHeight && comparedHeight) setShouldFixed(currentEditingFrameHeight < comparedHeight);
|
|
33
|
+
});
|
|
34
|
+
observer.observe($storefront);
|
|
35
|
+
return ()=>{
|
|
36
|
+
observer.unobserve($storefront);
|
|
37
|
+
};
|
|
38
|
+
}, [
|
|
39
|
+
layoutSetting
|
|
40
|
+
]);
|
|
41
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
42
|
+
children: pageType === 'POST_PURCHASE' ? /*#__PURE__*/ jsx("div", {
|
|
43
|
+
className: cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-bg-white gp-font-sans'),
|
|
44
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
45
|
+
className: "gp-flex gp-flex-1 gp-items-center gp-justify-between gp-py-6",
|
|
46
|
+
style: {
|
|
47
|
+
maxWidth: `var(--g-ct-w, 1200px)`,
|
|
48
|
+
...makeStyleResponsive('ml', defaultMargin),
|
|
49
|
+
...makeStyleResponsive('mr', defaultMargin)
|
|
50
|
+
},
|
|
51
|
+
children: /*#__PURE__*/ jsxs("p", {
|
|
52
|
+
className: "gp-text-lg",
|
|
53
|
+
children: [
|
|
54
|
+
"All rights reserved ",
|
|
55
|
+
shopName
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
}) : /*#__PURE__*/ jsx("div", {
|
|
60
|
+
className: cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-bg-white gp-font-sans', {
|
|
61
|
+
'gp-fixed gp-bottom-0 gp-w-full': shouldFixed
|
|
62
|
+
}),
|
|
63
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
64
|
+
className: "gp-flex gp-h-[40px] gp-flex-1 gp-items-center gp-justify-between",
|
|
65
|
+
style: {
|
|
66
|
+
maxWidth: `var(--g-ct-w)`,
|
|
67
|
+
...makeStyleResponsive('ml', defaultMargin),
|
|
68
|
+
...makeStyleResponsive('mr', defaultMargin)
|
|
69
|
+
},
|
|
70
|
+
children: [
|
|
71
|
+
/*#__PURE__*/ jsxs("svg", {
|
|
72
|
+
width: "68",
|
|
73
|
+
height: "8",
|
|
74
|
+
viewBox: "0 0 68 8",
|
|
75
|
+
fill: "none",
|
|
76
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
77
|
+
children: [
|
|
78
|
+
/*#__PURE__*/ jsx("path", {
|
|
79
|
+
d: "M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4C32 6.20914 30.2091 8 28 8H4C1.79086 8 0 6.20914 0 4Z",
|
|
80
|
+
fill: footerColor
|
|
81
|
+
}),
|
|
82
|
+
/*#__PURE__*/ jsx("path", {
|
|
83
|
+
d: "M36 4C36 1.79086 37.7909 0 40 0H64C66.2091 0 68 1.79086 68 4C68 6.20914 66.2091 8 64 8H40C37.7909 8 36 6.20914 36 4Z",
|
|
84
|
+
fill: footerColor
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
}),
|
|
88
|
+
!isOriginTemplate && /*#__PURE__*/ jsx("div", {
|
|
89
|
+
className: "gp-footer gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px]gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#f4f4f4] group-hover:gp-visible",
|
|
90
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
91
|
+
className: "gp-gap-2 gp-flex gp-px-1 gp-h-[24px] gp-items-center gp-justify-center gp-leading-5 gp-text-xs gp-font-medium gp-text-[#212121]",
|
|
92
|
+
children: [
|
|
93
|
+
/*#__PURE__*/ jsx("span", {
|
|
94
|
+
children: /*#__PURE__*/ jsxs("svg", {
|
|
95
|
+
width: "14",
|
|
96
|
+
height: "14",
|
|
97
|
+
viewBox: "0 0 14 14",
|
|
98
|
+
fill: "none",
|
|
99
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
100
|
+
children: [
|
|
101
|
+
/*#__PURE__*/ jsx("path", {
|
|
102
|
+
fillRule: "evenodd",
|
|
103
|
+
clipRule: "evenodd",
|
|
104
|
+
d: "M6.99985 4.08501C5.38983 4.08501 4.08465 5.39019 4.08465 7.00021C4.08465 8.61023 5.38983 9.9154 6.99985 9.9154C8.60987 9.9154 9.91504 8.61023 9.91504 7.00021C9.91504 5.39019 8.60987 4.08501 6.99985 4.08501ZM5.08465 7.00021C5.08465 5.94247 5.94211 5.08501 6.99985 5.08501C8.05758 5.08501 8.91504 5.94247 8.91504 7.00021C8.91504 8.05794 8.05758 8.9154 6.99985 8.9154C5.94211 8.9154 5.08465 8.05794 5.08465 7.00021Z",
|
|
105
|
+
fill: "#212121"
|
|
106
|
+
}),
|
|
107
|
+
/*#__PURE__*/ jsx("path", {
|
|
108
|
+
fillRule: "evenodd",
|
|
109
|
+
clipRule: "evenodd",
|
|
110
|
+
d: "M5.52351 0.00390625C5.28138 0.00390625 5.07405 0.177388 5.03135 0.415715L4.7415 2.03321C4.40346 2.18248 4.08346 2.36419 3.78558 2.57432L2.18557 2.00147C1.95684 1.91958 1.70235 2.01395 1.58232 2.22517L0.122204 4.79451C0.00217064 5.00572 0.0513362 5.27266 0.238747 5.42725L1.50086 6.46836C1.48358 6.64355 1.47474 6.82106 1.47474 7.00047C1.47474 7.17981 1.48357 7.35726 1.50084 7.53238L0.238747 8.57347C0.0513362 8.72806 0.00217064 8.995 0.122203 9.20622L1.58232 11.7756C1.70235 11.9868 1.95684 12.0811 2.18557 11.9993L3.78537 11.4265C4.08332 11.6367 4.40341 11.8185 4.74155 11.9678L5.03135 13.585C5.07405 13.8233 5.28138 13.9968 5.52351 13.9968H8.47647C8.7186 13.9968 8.92593 13.8233 8.96863 13.585L9.25846 11.9676C9.5965 11.8183 9.91649 11.6365 10.2144 11.4264L11.8144 11.9993C12.0431 12.0811 12.2976 11.9868 12.4177 11.7756L13.8778 9.20622C13.9978 8.995 13.9486 8.72806 13.7612 8.57347L12.4988 7.5321C12.516 7.35706 12.5249 7.17971 12.5249 7.00047C12.5249 6.82116 12.516 6.64375 12.4988 6.46864L13.7612 5.42725C13.9486 5.27266 13.9978 5.00572 13.8778 4.79451L12.4177 2.22517C12.2976 2.01395 12.0431 1.91958 11.8144 2.00147L10.2141 2.57441C9.91636 2.36433 9.59645 2.18264 9.25851 2.0334L8.96863 0.415715C8.92593 0.177389 8.7186 0.00390625 8.47647 0.00390625H5.52351ZM5.67747 2.47943L5.94187 1.00391H8.0581L8.32253 2.47958C8.35348 2.6523 8.47271 2.79616 8.63668 2.85863C9.06768 3.02283 9.46674 3.25007 9.82215 3.5288C9.95734 3.63483 10.1375 3.66402 10.2993 3.6061L11.7559 3.08459L12.8007 4.92323L11.6503 5.8722C11.5145 5.98427 11.4476 6.15956 11.4743 6.33366C11.5076 6.55089 11.5249 6.77354 11.5249 7.00047C11.5249 7.22735 11.5076 7.44993 11.4743 7.66711C11.4476 7.8412 11.5145 8.01648 11.6504 8.12855L12.8007 9.07749L11.7559 10.9161L10.2994 10.3947C10.1377 10.3368 9.95752 10.366 9.82233 10.472C9.46686 10.7508 9.06773 10.9781 8.63664 11.1423C8.47267 11.2048 8.35344 11.3487 8.32249 11.5214L8.0581 12.9968H5.94187L5.67752 11.5215C5.64656 11.3488 5.52732 11.2049 5.36333 11.1425C4.93215 10.9782 4.53292 10.7509 4.17738 10.4721C4.04219 10.3661 3.86203 10.3369 3.70027 10.3948L2.24412 10.9161L1.19924 9.07749L2.34929 8.12883C2.48516 8.01675 2.55204 7.84146 2.52535 7.66736C2.49205 7.4501 2.47474 7.22743 2.47474 7.00047C2.47474 6.77345 2.49206 6.55072 2.52538 6.33341C2.55207 6.15931 2.48519 5.984 2.34932 5.87192L1.19924 4.92323L2.24412 3.08459L3.70047 3.60601C3.86221 3.66392 4.04236 3.63474 4.17755 3.52872C4.53304 3.24994 4.93219 3.02269 5.36329 2.85849C5.52728 2.79603 5.64652 2.65216 5.67747 2.47943Z",
|
|
111
|
+
fill: "#212121"
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
})
|
|
115
|
+
}),
|
|
116
|
+
/*#__PURE__*/ jsx("span", {
|
|
117
|
+
children: "Footer"
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
}),
|
|
122
|
+
/*#__PURE__*/ jsxs("svg", {
|
|
123
|
+
width: "104",
|
|
124
|
+
height: "8",
|
|
125
|
+
viewBox: "0 0 104 8",
|
|
126
|
+
fill: "none",
|
|
127
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
128
|
+
children: [
|
|
129
|
+
/*#__PURE__*/ jsx("path", {
|
|
130
|
+
d: "M0 4C0 1.79086 1.79086 0 4 0H28C30.2091 0 32 1.79086 32 4C32 6.20914 30.2091 8 28 8H4C1.79086 8 0 6.20914 0 4Z",
|
|
131
|
+
fill: footerColor
|
|
132
|
+
}),
|
|
133
|
+
/*#__PURE__*/ jsx("path", {
|
|
134
|
+
d: "M36 4C36 1.79086 37.7909 0 40 0H64C66.2091 0 68 1.79086 68 4C68 6.20914 66.2091 8 64 8H40C37.7909 8 36 6.20914 36 4Z",
|
|
135
|
+
fill: footerColor
|
|
136
|
+
}),
|
|
137
|
+
/*#__PURE__*/ jsx("path", {
|
|
138
|
+
d: "M72 4C72 1.79086 73.7909 0 76 0H100C102.209 0 104 1.79086 104 4C104 6.20914 102.209 8 100 8H76C73.7909 8 72 6.20914 72 4Z",
|
|
139
|
+
fill: footerColor
|
|
140
|
+
})
|
|
141
|
+
]
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export { Footer as default };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useShopStore, cls, makeStyleResponsive } from '@gem-sdk/core';
|
|
3
|
+
import Devices from './SwitchView.js';
|
|
3
4
|
|
|
4
5
|
const defaultMargin = {
|
|
5
|
-
desktop: '
|
|
6
|
-
tablet: '
|
|
7
|
-
mobile: '
|
|
6
|
+
desktop: '16px',
|
|
7
|
+
tablet: '16px',
|
|
8
|
+
mobile: '16px'
|
|
8
9
|
};
|
|
9
|
-
const HEADER_ON_COLOR = '#
|
|
10
|
+
const HEADER_ON_COLOR = '#E2E2E2';
|
|
10
11
|
const HEADER_OFF_COLOR = '#F4F4F4';
|
|
11
12
|
const sizeCheck = {
|
|
12
13
|
desktop: '24px',
|
|
@@ -96,66 +97,74 @@ const Header = (props)=>{
|
|
|
96
97
|
},
|
|
97
98
|
children: [
|
|
98
99
|
/*#__PURE__*/ jsxs("svg", {
|
|
99
|
-
width: "
|
|
100
|
+
width: "60",
|
|
100
101
|
height: "8",
|
|
101
|
-
viewBox: "0 0
|
|
102
|
+
viewBox: "0 0 60 8",
|
|
102
103
|
fill: "none",
|
|
103
104
|
xmlns: "http://www.w3.org/2000/svg",
|
|
104
105
|
children: [
|
|
105
106
|
/*#__PURE__*/ jsx("path", {
|
|
106
|
-
d: "M0 4C0 1.79086 1.79086 0 4
|
|
107
|
-
fill:
|
|
107
|
+
d: "M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4C24 6.20914 22.2091 8 20 8H4C1.79086 8 0 6.20914 0 4Z",
|
|
108
|
+
fill: "#9E9E9E"
|
|
108
109
|
}),
|
|
109
110
|
/*#__PURE__*/ jsx("path", {
|
|
110
|
-
d: "M28 4C28 1.79086 29.7909 0 32
|
|
111
|
+
d: "M28 4C28 1.79086 29.7909 0 32 0H56C58.2091 0 60 1.79086 60 4C60 6.20914 58.2091 8 56 8H32C29.7909 8 28 6.20914 28 4Z",
|
|
111
112
|
fill: headerColor
|
|
112
113
|
})
|
|
113
114
|
]
|
|
114
115
|
}),
|
|
116
|
+
/*#__PURE__*/ jsx(Devices, {}),
|
|
115
117
|
!isOriginTemplate && /*#__PURE__*/ jsx("div", {
|
|
116
|
-
className: "gp-header gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-
|
|
117
|
-
children: /*#__PURE__*/
|
|
118
|
-
className: "gp-flex gp-
|
|
119
|
-
children:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
118
|
+
className: "gp-header gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#f4f4f4] group-hover:gp-visible",
|
|
119
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
120
|
+
className: "gp-gap-2 gp-flex gp-px-1 gp-h-[24px] gp-items-center gp-justify-center gp-leading-5 gp-text-xs gp-font-medium gp-text-[#212121]",
|
|
121
|
+
children: [
|
|
122
|
+
/*#__PURE__*/ jsx("span", {
|
|
123
|
+
children: /*#__PURE__*/ jsxs("svg", {
|
|
124
|
+
width: "14",
|
|
125
|
+
height: "14",
|
|
126
|
+
viewBox: "0 0 14 14",
|
|
127
|
+
fill: "none",
|
|
128
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
129
|
+
children: [
|
|
130
|
+
/*#__PURE__*/ jsx("path", {
|
|
131
|
+
fillRule: "evenodd",
|
|
132
|
+
clipRule: "evenodd",
|
|
133
|
+
d: "M6.99985 4.08501C5.38983 4.08501 4.08465 5.39019 4.08465 7.00021C4.08465 8.61023 5.38983 9.9154 6.99985 9.9154C8.60987 9.9154 9.91504 8.61023 9.91504 7.00021C9.91504 5.39019 8.60987 4.08501 6.99985 4.08501ZM5.08465 7.00021C5.08465 5.94247 5.94211 5.08501 6.99985 5.08501C8.05758 5.08501 8.91504 5.94247 8.91504 7.00021C8.91504 8.05794 8.05758 8.9154 6.99985 8.9154C5.94211 8.9154 5.08465 8.05794 5.08465 7.00021Z",
|
|
134
|
+
fill: "#212121"
|
|
135
|
+
}),
|
|
136
|
+
/*#__PURE__*/ jsx("path", {
|
|
137
|
+
fillRule: "evenodd",
|
|
138
|
+
clipRule: "evenodd",
|
|
139
|
+
d: "M5.52351 0.00390625C5.28138 0.00390625 5.07405 0.177388 5.03135 0.415715L4.7415 2.03321C4.40346 2.18248 4.08346 2.36419 3.78558 2.57432L2.18557 2.00147C1.95684 1.91958 1.70235 2.01395 1.58232 2.22517L0.122204 4.79451C0.00217064 5.00572 0.0513362 5.27266 0.238747 5.42725L1.50086 6.46836C1.48358 6.64355 1.47474 6.82106 1.47474 7.00047C1.47474 7.17981 1.48357 7.35726 1.50084 7.53238L0.238747 8.57347C0.0513362 8.72806 0.00217064 8.995 0.122203 9.20622L1.58232 11.7756C1.70235 11.9868 1.95684 12.0811 2.18557 11.9993L3.78537 11.4265C4.08332 11.6367 4.40341 11.8185 4.74155 11.9678L5.03135 13.585C5.07405 13.8233 5.28138 13.9968 5.52351 13.9968H8.47647C8.7186 13.9968 8.92593 13.8233 8.96863 13.585L9.25846 11.9676C9.5965 11.8183 9.91649 11.6365 10.2144 11.4264L11.8144 11.9993C12.0431 12.0811 12.2976 11.9868 12.4177 11.7756L13.8778 9.20622C13.9978 8.995 13.9486 8.72806 13.7612 8.57347L12.4988 7.5321C12.516 7.35706 12.5249 7.17971 12.5249 7.00047C12.5249 6.82116 12.516 6.64375 12.4988 6.46864L13.7612 5.42725C13.9486 5.27266 13.9978 5.00572 13.8778 4.79451L12.4177 2.22517C12.2976 2.01395 12.0431 1.91958 11.8144 2.00147L10.2141 2.57441C9.91636 2.36433 9.59645 2.18264 9.25851 2.0334L8.96863 0.415715C8.92593 0.177389 8.7186 0.00390625 8.47647 0.00390625H5.52351ZM5.67747 2.47943L5.94187 1.00391H8.0581L8.32253 2.47958C8.35348 2.6523 8.47271 2.79616 8.63668 2.85863C9.06768 3.02283 9.46674 3.25007 9.82215 3.5288C9.95734 3.63483 10.1375 3.66402 10.2993 3.6061L11.7559 3.08459L12.8007 4.92323L11.6503 5.8722C11.5145 5.98427 11.4476 6.15956 11.4743 6.33366C11.5076 6.55089 11.5249 6.77354 11.5249 7.00047C11.5249 7.22735 11.5076 7.44993 11.4743 7.66711C11.4476 7.8412 11.5145 8.01648 11.6504 8.12855L12.8007 9.07749L11.7559 10.9161L10.2994 10.3947C10.1377 10.3368 9.95752 10.366 9.82233 10.472C9.46686 10.7508 9.06773 10.9781 8.63664 11.1423C8.47267 11.2048 8.35344 11.3487 8.32249 11.5214L8.0581 12.9968H5.94187L5.67752 11.5215C5.64656 11.3488 5.52732 11.2049 5.36333 11.1425C4.93215 10.9782 4.53292 10.7509 4.17738 10.4721C4.04219 10.3661 3.86203 10.3369 3.70027 10.3948L2.24412 10.9161L1.19924 9.07749L2.34929 8.12883C2.48516 8.01675 2.55204 7.84146 2.52535 7.66736C2.49205 7.4501 2.47474 7.22743 2.47474 7.00047C2.47474 6.77345 2.49206 6.55072 2.52538 6.33341C2.55207 6.15931 2.48519 5.984 2.34932 5.87192L1.19924 4.92323L2.24412 3.08459L3.70047 3.60601C3.86221 3.66392 4.04236 3.63474 4.17755 3.52872C4.53304 3.24994 4.93219 3.02269 5.36329 2.85849C5.52728 2.79603 5.64652 2.65216 5.67747 2.47943Z",
|
|
140
|
+
fill: "#212121"
|
|
141
|
+
})
|
|
142
|
+
]
|
|
137
143
|
})
|
|
138
|
-
|
|
139
|
-
|
|
144
|
+
}),
|
|
145
|
+
/*#__PURE__*/ jsx("span", {
|
|
146
|
+
children: "Header"
|
|
147
|
+
})
|
|
148
|
+
]
|
|
140
149
|
})
|
|
141
150
|
}),
|
|
142
151
|
/*#__PURE__*/ jsxs("svg", {
|
|
143
|
-
width: "
|
|
152
|
+
width: "80",
|
|
144
153
|
height: "8",
|
|
145
|
-
viewBox: "0 0
|
|
154
|
+
viewBox: "0 0 80 8",
|
|
146
155
|
fill: "none",
|
|
147
156
|
xmlns: "http://www.w3.org/2000/svg",
|
|
148
157
|
children: [
|
|
149
158
|
/*#__PURE__*/ jsx("path", {
|
|
150
|
-
d: "M0 4C0 1.79086 1.79086 0 4
|
|
159
|
+
d: "M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4C24 6.20914 22.2091 8 20 8H4C1.79086 8 0 6.20914 0 4Z",
|
|
151
160
|
fill: headerColor
|
|
152
161
|
}),
|
|
153
162
|
/*#__PURE__*/ jsx("path", {
|
|
154
|
-
d: "
|
|
163
|
+
d: "M28 4C28 1.79086 29.7909 0 32 0H48C50.2091 0 52 1.79086 52 4C52 6.20914 50.2091 8 48 8H32C29.7909 8 28 6.20914 28 4Z",
|
|
155
164
|
fill: headerColor
|
|
156
165
|
}),
|
|
157
166
|
/*#__PURE__*/ jsx("path", {
|
|
158
|
-
d: "
|
|
167
|
+
d: "M56 4C56 1.79086 57.7909 0 60 0H76C78.2091 0 80 1.79086 80 4C80 6.20914 78.2091 8 76 8H60C57.7909 8 56 6.20914 56 4Z",
|
|
159
168
|
fill: headerColor
|
|
160
169
|
})
|
|
161
170
|
]
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useCallback, useEffect, useRef } from 'react';
|
|
3
|
+
import { devices } from './const.js';
|
|
4
|
+
|
|
5
|
+
const Devices = ()=>{
|
|
6
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
7
|
+
const initialDeviceState = {
|
|
8
|
+
width: 0,
|
|
9
|
+
name: '',
|
|
10
|
+
activeId: null
|
|
11
|
+
};
|
|
12
|
+
const [deviceState, setDeviceState] = useState(initialDeviceState);
|
|
13
|
+
const updateDeviceState = useCallback((updates)=>{
|
|
14
|
+
setDeviceState((prevState)=>({
|
|
15
|
+
...prevState,
|
|
16
|
+
...updates
|
|
17
|
+
}));
|
|
18
|
+
}, [
|
|
19
|
+
setDeviceState
|
|
20
|
+
]);
|
|
21
|
+
useEffect(()=>{
|
|
22
|
+
if (!deviceState.name) {
|
|
23
|
+
const activeDevice = devices[0];
|
|
24
|
+
if (activeDevice) {
|
|
25
|
+
updateDeviceState({
|
|
26
|
+
width: activeDevice.width,
|
|
27
|
+
name: activeDevice.name,
|
|
28
|
+
activeId: activeDevice.id
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, [
|
|
33
|
+
deviceState.name,
|
|
34
|
+
updateDeviceState
|
|
35
|
+
]);
|
|
36
|
+
const onHandleClick = (id)=>{
|
|
37
|
+
const activeDevice = devices.find((v)=>v.id === id);
|
|
38
|
+
if (activeDevice) {
|
|
39
|
+
updateDeviceState({
|
|
40
|
+
width: activeDevice.width,
|
|
41
|
+
name: activeDevice.name,
|
|
42
|
+
activeId: activeDevice.id
|
|
43
|
+
});
|
|
44
|
+
emitChangeDevice(activeDevice.id);
|
|
45
|
+
}
|
|
46
|
+
setIsOpen(!isOpen);
|
|
47
|
+
};
|
|
48
|
+
const emitChangeDevice = (id)=>{
|
|
49
|
+
const event = new CustomEvent('editor:change-device', {
|
|
50
|
+
bubbles: true,
|
|
51
|
+
detail: {
|
|
52
|
+
id
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
window.dispatchEvent(event);
|
|
56
|
+
};
|
|
57
|
+
const switchViewRef = useRef(null);
|
|
58
|
+
const onClickOutside = (event)=>{
|
|
59
|
+
if (switchViewRef.current && !switchViewRef.current.contains(event.target)) {
|
|
60
|
+
setIsOpen(false);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const getDisplayName = (width)=>{
|
|
64
|
+
const activeDevice = devices.find((v)=>v.width === width);
|
|
65
|
+
if (activeDevice) return activeDevice.name;
|
|
66
|
+
let displayName = 'Desktop';
|
|
67
|
+
if (width <= 480) return displayName = 'Mobile';
|
|
68
|
+
if (width <= 1025) return displayName = 'Tablet';
|
|
69
|
+
return displayName;
|
|
70
|
+
};
|
|
71
|
+
const onResizePreviewScreen = useCallback((e)=>{
|
|
72
|
+
const detail = e.detail;
|
|
73
|
+
if (!detail) return;
|
|
74
|
+
updateDeviceState({
|
|
75
|
+
width: detail.width,
|
|
76
|
+
name: getDisplayName(detail.width),
|
|
77
|
+
activeId: null
|
|
78
|
+
});
|
|
79
|
+
}, [
|
|
80
|
+
updateDeviceState
|
|
81
|
+
]);
|
|
82
|
+
useEffect(()=>{
|
|
83
|
+
window.addEventListener('mousedown', onClickOutside);
|
|
84
|
+
window.addEventListener('editor:resize-preview-screen', onResizePreviewScreen);
|
|
85
|
+
return ()=>{
|
|
86
|
+
window.removeEventListener('mousedown', onClickOutside);
|
|
87
|
+
window.removeEventListener('editor:resize-preview-screen', onResizePreviewScreen);
|
|
88
|
+
};
|
|
89
|
+
}, [
|
|
90
|
+
onResizePreviewScreen
|
|
91
|
+
]);
|
|
92
|
+
const isActiveDevice = (id)=>{
|
|
93
|
+
return id === deviceState.activeId;
|
|
94
|
+
};
|
|
95
|
+
const handleToggleDropdown = ()=>setIsOpen(!isOpen);
|
|
96
|
+
if (deviceState.width > 1024) return null;
|
|
97
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
98
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
99
|
+
ref: switchViewRef,
|
|
100
|
+
className: `gp-switch-view gp-absolute gp-top-2 gp-transform -gp-translate-x-1/2 gp-left-1/2 gp-z-50 devices-selector gp-bg-[#F4F4F4] gp-gap-2 gp-rounded-md gp-px-2 gp-py-1 hover:gp-bg-[#E2E2E2] gp-items-center gp-justify-center gp-cursor-pointer gp-leading-5 gp-text-xs gp-font-medium gp-text-[#212121]
|
|
101
|
+
${isOpen ? 'gp-border-[1px] gp-border-[#3C67FF]' : ''}`,
|
|
102
|
+
children: [
|
|
103
|
+
/*#__PURE__*/ jsxs("div", {
|
|
104
|
+
className: "gp-flex gp-gap-1 gp-justify-between gp-items-center gp-min-w-[176px]",
|
|
105
|
+
onClick: (e)=>{
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
handleToggleDropdown();
|
|
108
|
+
},
|
|
109
|
+
role: "presentation",
|
|
110
|
+
children: [
|
|
111
|
+
/*#__PURE__*/ jsxs("span", {
|
|
112
|
+
children: [
|
|
113
|
+
deviceState.name,
|
|
114
|
+
" (",
|
|
115
|
+
deviceState.width,
|
|
116
|
+
"px)"
|
|
117
|
+
]
|
|
118
|
+
}),
|
|
119
|
+
/*#__PURE__*/ jsx("span", {
|
|
120
|
+
children: /*#__PURE__*/ jsx("svg", {
|
|
121
|
+
width: "9",
|
|
122
|
+
height: "5",
|
|
123
|
+
viewBox: "0 0 9 5",
|
|
124
|
+
fill: "none",
|
|
125
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
126
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
127
|
+
fillRule: "evenodd",
|
|
128
|
+
clipRule: "evenodd",
|
|
129
|
+
d: "M1.07564 0.775834C1.30995 0.541519 1.68985 0.541519 1.92417 0.775834L4.6999 3.55157L7.47564 0.775834C7.70995 0.541519 8.08985 0.541519 8.32417 0.775834C8.55848 1.01015 8.55848 1.39005 8.32417 1.62436L5.12417 4.82436C4.88985 5.05868 4.50995 5.05868 4.27564 4.82436L1.07564 1.62436C0.841324 1.39005 0.841324 1.01015 1.07564 0.775834Z",
|
|
130
|
+
fill: "#212121"
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
}),
|
|
136
|
+
/*#__PURE__*/ jsx("div", {
|
|
137
|
+
className: `gp-absolute gp-top-8 gp-transform -gp-translate-x-1/2 gp-left-1/2 gp-bg-[#212121] gp-rounded-xl gp-p-2 gp-text-[#F9F9F9] gp-w-[176px] gp-z-50 ${!isOpen ? 'gp-hidden' : ''}`,
|
|
138
|
+
children: devices.map((device)=>/*#__PURE__*/ jsx("div", {
|
|
139
|
+
className: "gp-p-2 hover:gp-bg-[#3E3E3E] gp-rounded-md",
|
|
140
|
+
onClick: (e)=>{
|
|
141
|
+
e.preventDefault();
|
|
142
|
+
e.stopPropagation();
|
|
143
|
+
onHandleClick(device.id);
|
|
144
|
+
},
|
|
145
|
+
role: "presentation",
|
|
146
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
147
|
+
className: 'gp-flex gp-gap-2 gp-w-full gp-text-left gp-justify-space-between gp-cursor-pointer gp-leading-5 gp-text-xs gp-font-regular gp-text-[#212121]"',
|
|
148
|
+
children: [
|
|
149
|
+
/*#__PURE__*/ jsx("span", {
|
|
150
|
+
className: "gp-min-w-[16px]",
|
|
151
|
+
children: isActiveDevice(device.id) && /*#__PURE__*/ jsx("svg", {
|
|
152
|
+
width: "16",
|
|
153
|
+
height: "17",
|
|
154
|
+
viewBox: "0 0 16 17",
|
|
155
|
+
fill: "none",
|
|
156
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
157
|
+
children: /*#__PURE__*/ jsx("path", {
|
|
158
|
+
fillRule: "evenodd",
|
|
159
|
+
clipRule: "evenodd",
|
|
160
|
+
d: "M12.6348 4.89265C12.792 5.07861 12.7878 5.37537 12.6255 5.55547L6.71176 12.118C6.55312 12.294 6.30118 12.294 6.14255 12.118L3.87448 9.60098C3.71219 9.42088 3.70805 9.12412 3.86523 8.93815C4.02241 8.75219 4.2814 8.74744 4.4437 8.92755L6.42716 11.1287L12.0563 4.88203C12.2186 4.70192 12.4776 4.70668 12.6348 4.89265Z",
|
|
161
|
+
fill: "#00C853"
|
|
162
|
+
})
|
|
163
|
+
})
|
|
164
|
+
}),
|
|
165
|
+
/*#__PURE__*/ jsx("span", {
|
|
166
|
+
children: device.name
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
})
|
|
170
|
+
}, device.id))
|
|
171
|
+
})
|
|
172
|
+
]
|
|
173
|
+
})
|
|
174
|
+
});
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export { Devices as default };
|