@gem-sdk/components 2.0.0-dev.845 → 2.0.0-dev.848

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Text=require("../../text/components/Text.js");const CollectionTitle=({setting:e})=>{let t=core.useCollection();return jsxRuntime.jsx(Text.default,{styles:e,setting:{text:t?.title??"Collection title",excludeFlex:!0}})};exports.default=CollectionTitle;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),Text=require("../../text/components/Text.js");const CollectionTitle=({setting:e})=>{let t=core.useCollection(),l=e?.htmlTag;return jsxRuntime.jsx(Text.default,{styles:e,setting:{text:t?.title??"Collection title",excludeFlex:!0,htmlTag:l}})};exports.default=CollectionTitle;
@@ -2,7 +2,7 @@
2
2
  <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M8.66634 5.16663C8.20611 5.16663 7.83301 5.53973 7.83301 5.99996V9.99996C7.83301 10.4602 8.20611 10.8333 8.66634 10.8333H9.99967C10.4599 10.8333 10.833 10.4602 10.833 9.99996V8.16663H18.4997V31.8333H16.6663C16.2062 31.8333 15.833 32.2064 15.833 32.6666V34C15.833 34.4601 16.2062 34.8333 16.6663 34.8333H23.333C23.7932 34.8333 24.1663 34.4601 24.1663 34V32.6666C24.1663 32.2064 23.7932 31.8333 23.333 31.8333H21.4997V8.16663H29.1663V9.99996C29.1663 10.4602 29.5395 10.8333 29.9997 10.8333H31.333C31.7932 10.8333 32.1663 10.4602 32.1663 9.99996V5.99996C32.1663 5.53972 31.7932 5.16663 31.333 5.16663H8.66634Z" fill="currentColor"/>
4
4
  </svg>
5
- `,settings:[{id:"setting",controls:[{id:"groupLineClamp",type:"group",label:"Title text",controls:[{id:"typo",type:"typography-v2",label:"Text Style",default:{type:"heading-1",attrs:{color:"text-2"}},ignoreReRender:!0}]},{id:"textAlign",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}}]}],ui:[{label:{en:"Text"},type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",label:{en:"Align"},setting:{id:"textAlign"}}],editorConfigs:{placeholder:{flowPage:"GP_COLLECTION"}},presets:[{id:"collection-title",name:{en:"Collection Title"},icon:{desktop:`
5
+ `,settings:[{id:"setting",controls:[{id:"groupLineClamp",type:"group",label:"Title text",controls:[{id:"typo",type:"typography-v2",label:"Text Style",default:{type:"heading-1",attrs:{color:"text-2"}},ignoreReRender:!0}]},{id:"textAlign",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"h1",label:"H1"},{value:"h2",label:"H2"},{value:"h3",label:"H3"},{value:"h4",label:"H4"},{value:"h5",label:"H5"},{value:"h6",label:"H6"},{value:"div",label:"Div"}],default:"h1"}]}],ui:[{label:{en:"Text"},type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",label:{en:"Align"},setting:{id:"textAlign"}},{type:"group",label:{en:"SEO"},controls:[{type:"control",label:{en:"HTML tag"},setting:{id:"htmlTag"}}]}],editorConfigs:{placeholder:{flowPage:"GP_COLLECTION"}},presets:[{id:"collection-title",name:{en:"Collection Title"},icon:{desktop:`
6
6
  <svg width="94" height="48" viewBox="0 0 94 48" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <path d="M20.951 10.1477H19.1783C19.1101 9.76894 18.9832 9.43561 18.7976 9.14773C18.612 8.85985 18.3847 8.61553 18.1158 8.41477C17.8468 8.21401 17.5457 8.0625 17.2124 7.96023C16.8828 7.85795 16.5324 7.80682 16.1612 7.80682C15.4908 7.80682 14.8904 7.97538 14.3601 8.3125C13.8336 8.64962 13.4169 9.14394 13.1101 9.79545C12.8071 10.447 12.6555 11.2424 12.6555 12.1818C12.6555 13.1288 12.8071 13.928 13.1101 14.5795C13.4169 15.2311 13.8355 15.7235 14.3658 16.0568C14.8961 16.3902 15.4927 16.5568 16.1555 16.5568C16.523 16.5568 16.8714 16.5076 17.201 16.4091C17.5343 16.3068 17.8355 16.1572 18.1044 15.9602C18.3733 15.7633 18.6006 15.5227 18.7862 15.2386C18.9756 14.9508 19.1063 14.6212 19.1783 14.25L20.951 14.2557C20.8563 14.8277 20.6726 15.3542 20.3999 15.8352C20.1309 16.3125 19.7843 16.7254 19.3601 17.0739C18.9396 17.4186 18.4586 17.6856 17.9169 17.875C17.3752 18.0644 16.7843 18.1591 16.1442 18.1591C15.1366 18.1591 14.2389 17.9205 13.451 17.4432C12.6631 16.9621 12.0419 16.2746 11.5874 15.3807C11.1366 14.4867 10.9112 13.4205 10.9112 12.1818C10.9112 10.9394 11.1385 9.87311 11.593 8.98295C12.0476 8.08901 12.6688 7.40341 13.4567 6.92614C14.2446 6.44508 15.1404 6.20455 16.1442 6.20455C16.7616 6.20455 17.3374 6.29356 17.8714 6.47159C18.4093 6.64583 18.8923 6.90341 19.3203 7.24432C19.7483 7.58144 20.1025 7.99432 20.3828 8.48295C20.6631 8.9678 20.8525 9.52273 20.951 10.1477ZM26.5916 18.1761C25.7734 18.1761 25.0594 17.9886 24.4496 17.6136C23.8397 17.2386 23.3662 16.714 23.0291 16.0398C22.692 15.3655 22.5234 14.5777 22.5234 13.6761C22.5234 12.7708 22.692 11.9792 23.0291 11.3011C23.3662 10.6231 23.8397 10.0966 24.4496 9.72159C25.0594 9.34659 25.7734 9.15909 26.5916 9.15909C27.4098 9.15909 28.1238 9.34659 28.7337 9.72159C29.3435 10.0966 29.817 10.6231 30.1541 11.3011C30.4912 11.9792 30.6598 12.7708 30.6598 13.6761C30.6598 14.5777 30.4912 15.3655 30.1541 16.0398C29.817 16.714 29.3435 17.2386 28.7337 17.6136C28.1238 17.9886 27.4098 18.1761 26.5916 18.1761ZM26.5973 16.75C27.1276 16.75 27.567 16.6098 27.9155 16.3295C28.264 16.0492 28.5215 15.6761 28.6882 15.2102C28.8587 14.7443 28.9439 14.2311 28.9439 13.6705C28.9439 13.1136 28.8587 12.6023 28.6882 12.1364C28.5215 11.6667 28.264 11.2898 27.9155 11.0057C27.567 10.7216 27.1276 10.5795 26.5973 10.5795C26.0632 10.5795 25.62 10.7216 25.2678 11.0057C24.9193 11.2898 24.6598 11.6667 24.4893 12.1364C24.3227 12.6023 24.2393 13.1136 24.2393 13.6705C24.2393 14.2311 24.3227 14.7443 24.4893 15.2102C24.6598 15.6761 24.9193 16.0492 25.2678 16.3295C25.62 16.6098 26.0632 16.75 26.5973 16.75ZM34.255 6.36364V18H32.5561V6.36364H34.255ZM38.2393 6.36364V18H36.5405V6.36364H38.2393ZM44.2862 18.1761C43.4264 18.1761 42.6858 17.9924 42.0646 17.625C41.4472 17.2538 40.9699 16.733 40.6328 16.0625C40.2995 15.3883 40.1328 14.5985 40.1328 13.6932C40.1328 12.7992 40.2995 12.0114 40.6328 11.3295C40.9699 10.6477 41.4396 10.1155 42.0419 9.73295C42.648 9.35038 43.3563 9.15909 44.1669 9.15909C44.6593 9.15909 45.1366 9.24053 45.5987 9.40341C46.0608 9.56629 46.4756 9.82197 46.843 10.1705C47.2105 10.5189 47.5002 10.9716 47.7124 11.5284C47.9245 12.0814 48.0305 12.7538 48.0305 13.5455V14.1477H41.093V12.875H46.3658C46.3658 12.428 46.2749 12.0322 46.093 11.6875C45.9112 11.339 45.6555 11.0644 45.326 10.8636C45.0002 10.6629 44.6177 10.5625 44.1783 10.5625C43.701 10.5625 43.2843 10.6799 42.9283 10.9148C42.576 11.1458 42.3033 11.4489 42.1101 11.8239C41.9207 12.1951 41.826 12.5985 41.826 13.0341V14.0284C41.826 14.6117 41.9283 15.108 42.1328 15.517C42.3411 15.9261 42.6309 16.2386 43.0021 16.4545C43.3733 16.6667 43.8071 16.7727 44.3033 16.7727C44.6252 16.7727 44.9188 16.7273 45.1839 16.6364C45.4491 16.5417 45.6783 16.4015 45.8714 16.2159C46.0646 16.0303 46.2124 15.8011 46.3146 15.5284L47.9226 15.8182C47.7938 16.2917 47.5627 16.7064 47.2294 17.0625C46.8999 17.4148 46.4851 17.6894 45.9851 17.8864C45.4889 18.0795 44.9226 18.1761 44.2862 18.1761ZM53.5916 18.1761C52.7469 18.1761 52.0196 17.9848 51.4098 17.6023C50.8037 17.2159 50.3378 16.6837 50.0121 16.0057C49.6863 15.3277 49.5234 14.5511 49.5234 13.6761C49.5234 12.7898 49.6901 12.0076 50.0234 11.3295C50.3568 10.6477 50.8265 10.1155 51.4325 9.73295C52.0386 9.35038 52.7526 9.15909 53.5746 9.15909C54.2375 9.15909 54.8284 9.2822 55.3473 9.52841C55.8662 9.77083 56.2848 10.1117 56.603 10.5511C56.925 10.9905 57.1162 11.5038 57.1768 12.0909H55.5234C55.4325 11.6818 55.2242 11.3295 54.8984 11.0341C54.5765 10.7386 54.1446 10.5909 53.603 10.5909C53.1295 10.5909 52.7147 10.7159 52.3587 10.9659C52.0064 11.2121 51.7318 11.5644 51.5348 12.0227C51.3378 12.4773 51.2393 13.0152 51.2393 13.6364C51.2393 14.2727 51.3359 14.822 51.5291 15.2841C51.7223 15.7462 51.995 16.1042 52.3473 16.358C52.7034 16.6117 53.1219 16.7386 53.603 16.7386C53.925 16.7386 54.2166 16.6799 54.478 16.5625C54.7431 16.4413 54.9647 16.2689 55.1428 16.0455C55.3246 15.822 55.4515 15.553 55.5234 15.2386H57.1768C57.1162 15.803 56.9325 16.3068 56.6257 16.75C56.3189 17.1932 55.9079 17.5417 55.3928 17.7955C54.8814 18.0492 54.281 18.1761 53.5916 18.1761ZM63.0675 9.27273V10.6364H58.3004V9.27273H63.0675ZM59.5788 7.18182H61.2777V15.4375C61.2777 15.767 61.3269 16.0152 61.4254 16.1818C61.5239 16.3447 61.6508 16.4564 61.8061 16.517C61.9652 16.5739 62.1375 16.6023 62.3232 16.6023C62.4595 16.6023 62.5788 16.5928 62.6811 16.5739C62.7834 16.5549 62.8629 16.5398 62.9197 16.5284L63.2266 17.9318C63.1281 17.9697 62.9879 18.0076 62.8061 18.0455C62.6243 18.0871 62.397 18.1098 62.1243 18.1136C61.6773 18.1212 61.2607 18.0417 60.8743 17.875C60.4879 17.7083 60.1754 17.4508 59.9368 17.1023C59.6982 16.7538 59.5788 16.3163 59.5788 15.7898V7.18182ZM64.9467 18V9.27273H66.6456V18H64.9467ZM65.8047 7.92614C65.5092 7.92614 65.2554 7.82765 65.0433 7.63068C64.835 7.42992 64.7308 7.19129 64.7308 6.91477C64.7308 6.63447 64.835 6.39583 65.0433 6.19886C65.2554 5.99811 65.5092 5.89773 65.8047 5.89773C66.1001 5.89773 66.352 5.99811 66.5604 6.19886C66.7725 6.39583 66.8786 6.63447 66.8786 6.91477C66.8786 7.19129 66.7725 7.42992 66.5604 7.63068C66.352 7.82765 66.1001 7.92614 65.8047 7.92614ZM72.6072 18.1761C71.7891 18.1761 71.075 17.9886 70.4652 17.6136C69.8554 17.2386 69.3819 16.714 69.0447 16.0398C68.7076 15.3655 68.5391 14.5777 68.5391 13.6761C68.5391 12.7708 68.7076 11.9792 69.0447 11.3011C69.3819 10.6231 69.8554 10.0966 70.4652 9.72159C71.075 9.34659 71.7891 9.15909 72.6072 9.15909C73.4254 9.15909 74.1394 9.34659 74.7493 9.72159C75.3591 10.0966 75.8326 10.6231 76.1697 11.3011C76.5069 11.9792 76.6754 12.7708 76.6754 13.6761C76.6754 14.5777 76.5069 15.3655 76.1697 16.0398C75.8326 16.714 75.3591 17.2386 74.7493 17.6136C74.1394 17.9886 73.4254 18.1761 72.6072 18.1761ZM72.6129 16.75C73.1432 16.75 73.5826 16.6098 73.9311 16.3295C74.2796 16.0492 74.5372 15.6761 74.7038 15.2102C74.8743 14.7443 74.9595 14.2311 74.9595 13.6705C74.9595 13.1136 74.8743 12.6023 74.7038 12.1364C74.5372 11.6667 74.2796 11.2898 73.9311 11.0057C73.5826 10.7216 73.1432 10.5795 72.6129 10.5795C72.0788 10.5795 71.6357 10.7216 71.2834 11.0057C70.9349 11.2898 70.6754 11.6667 70.505 12.1364C70.3383 12.6023 70.255 13.1136 70.255 13.6705C70.255 14.2311 70.3383 14.7443 70.505 15.2102C70.6754 15.6761 70.9349 16.0492 71.2834 16.3295C71.6357 16.6098 72.0788 16.75 72.6129 16.75ZM80.2706 12.8182V18H78.5717V9.27273H80.2024V10.6932H80.3104C80.5111 10.2311 80.8255 9.85985 81.2536 9.57955C81.6854 9.29924 82.2289 9.15909 82.8842 9.15909C83.4789 9.15909 83.9998 9.28409 84.4467 9.53409C84.8937 9.7803 85.2403 10.1477 85.4865 10.6364C85.7327 11.125 85.8558 11.7292 85.8558 12.4489V18H84.157V12.6534C84.157 12.0208 83.9922 11.5265 83.6626 11.1705C83.3331 10.8106 82.8804 10.6307 82.3047 10.6307C81.9107 10.6307 81.5604 10.7159 81.2536 10.8864C80.9505 11.0568 80.71 11.3068 80.532 11.6364C80.3577 11.9621 80.2706 12.3561 80.2706 12.8182ZM32.2436 31.875V30.3636H41.2493V31.875H37.6186V42H35.8686V31.875H32.2436ZM43.103 42V33.2727H44.8018V42H43.103ZM43.9609 31.9261C43.6655 31.9261 43.4117 31.8277 43.1996 31.6307C42.9912 31.4299 42.8871 31.1913 42.8871 30.9148C42.8871 30.6345 42.9912 30.3958 43.1996 30.1989C43.4117 29.9981 43.6655 29.8977 43.9609 29.8977C44.2564 29.8977 44.5083 29.9981 44.7166 30.1989C44.9287 30.3958 45.0348 30.6345 45.0348 30.9148C45.0348 31.1913 44.9287 31.4299 44.7166 31.6307C44.5083 31.8277 44.2564 31.9261 43.9609 31.9261ZM51.1612 33.2727V34.6364H46.3942V33.2727H51.1612ZM47.6726 31.1818H49.3714V39.4375C49.3714 39.767 49.4207 40.0152 49.5192 40.1818C49.6177 40.3447 49.7446 40.4564 49.8999 40.517C50.0589 40.5739 50.2313 40.6023 50.4169 40.6023C50.5533 40.6023 50.6726 40.5928 50.7749 40.5739C50.8771 40.5549 50.9567 40.5398 51.0135 40.5284L51.3203 41.9318C51.2218 41.9697 51.0817 42.0076 50.8999 42.0455C50.718 42.0871 50.4908 42.1098 50.218 42.1136C49.7711 42.1212 49.3544 42.0417 48.968 41.875C48.5817 41.7083 48.2692 41.4508 48.0305 41.1023C47.7919 40.7538 47.6726 40.3163 47.6726 39.7898V31.1818ZM54.9268 30.3636V42H53.228V30.3636H54.9268ZM60.9737 42.1761C60.1139 42.1761 59.3733 41.9924 58.7521 41.625C58.1347 41.2538 57.6574 40.733 57.3203 40.0625C56.987 39.3883 56.8203 38.5985 56.8203 37.6932C56.8203 36.7992 56.987 36.0114 57.3203 35.3295C57.6574 34.6477 58.1271 34.1155 58.7294 33.733C59.3355 33.3504 60.0438 33.1591 60.8544 33.1591C61.3468 33.1591 61.8241 33.2405 62.2862 33.4034C62.7483 33.5663 63.1631 33.822 63.5305 34.1705C63.898 34.5189 64.1877 34.9716 64.3999 35.5284C64.612 36.0814 64.718 36.7538 64.718 37.5455V38.1477H57.7805V36.875H63.0533C63.0533 36.428 62.9624 36.0322 62.7805 35.6875C62.5987 35.339 62.343 35.0644 62.0135 34.8636C61.6877 34.6629 61.3052 34.5625 60.8658 34.5625C60.3885 34.5625 59.9718 34.6799 59.6158 34.9148C59.2635 35.1458 58.9908 35.4489 58.7976 35.8239C58.6082 36.1951 58.5135 36.5985 58.5135 37.0341V38.0284C58.5135 38.6117 58.6158 39.108 58.8203 39.517C59.0286 39.9261 59.3184 40.2386 59.6896 40.4545C60.0608 40.6667 60.4946 40.7727 60.9908 40.7727C61.3127 40.7727 61.6063 40.7273 61.8714 40.6364C62.1366 40.5417 62.3658 40.4015 62.5589 40.2159C62.7521 40.0303 62.8999 39.8011 63.0021 39.5284L64.6101 39.8182C64.4813 40.2917 64.2502 40.7064 63.9169 41.0625C63.5874 41.4148 63.1726 41.6894 62.6726 41.8864C62.1764 42.0795 61.6101 42.1761 60.9737 42.1761Z" fill="#F9F9F9"/>
8
8
  </svg>
@@ -1 +1 @@
1
- "use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),Text=require("../../text/Text.js"),useCountdownTimer=require("../hooks/useCountdownTimer.js");const TextCountdown=e=>{let{dateTime:t,setting:r,styles:u}=e,{typo:n,textAlign:o}=u||{},{conditionText:s,expiredText:i}=r||{},{minutes:x,seconds:T}=useCountdownTimer.useCountdown(t),d=react.useMemo(()=>{let e={typo:n,textAlign:o};return e},[o,n]),m=react.useMemo(()=>x+T<=0?i:`${s} ${x}:${T<10?0:""}${T}`,[x,T,s,i]);return jsxRuntime.jsx(Text.default,{setting:{text:m},styles:d})};exports.TextCountdown=TextCountdown;
1
+ "use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react"),Text=require("../../text/Text.js"),useCountdownTimer=require("../hooks/useCountdownTimer.js");const TextCountdown=e=>{let{dateTime:t,setting:r,styles:u}=e,{typo:n,textAlign:o}=u||{},{conditionText:s,expiredText:i}=r||{},{format:x,isExpried:T}=useCountdownTimer.useCountdown(t),d=react.useMemo(()=>{let e={typo:n,textAlign:o};return e},[o,n]),m=react.useMemo(()=>T?i:`${s} ${x}`,[T,x,s,i]);return jsxRuntime.jsx(Text.default,{setting:{text:m},styles:d})};exports.TextCountdown=TextCountdown;
@@ -1 +1 @@
1
- "use strict";var react=require("react");const getCountDownTime=e=>new Date(e).getTime()-new Date().getTime(),useCountdown=e=>{let[t,n]=react.useState(getCountDownTime(e));return react.useEffect(()=>{let r=null;return t>0&&(r=setInterval(()=>{t>0?n(getCountDownTime(e)):r&&(clearInterval(r),r=null)},1e3)),()=>{r&&clearInterval(r)}},[t,e]),react.useEffect(()=>{n(getCountDownTime(e))},[e]),getReturnValues(t)},getReturnValues=e=>{let t=Math.floor(e/864e5),n=Math.floor(e%864e5/36e5),r=Math.floor(e%36e5/6e4),o=Math.floor(e%6e4/1e3);return{days:t,hours:n,minutes:r,seconds:o}};exports.useCountdown=useCountdown;
1
+ "use strict";var react=require("react");const getCountDownTime=e=>new Date(e).getTime()-new Date().getTime(),useCountdown=e=>{let[t,n]=react.useState(getCountDownTime(e));return react.useEffect(()=>{let r=null;return t>0&&(r=setInterval(()=>{t>0?n(getCountDownTime(e)):r&&(clearInterval(r),r=null)},1e3)),()=>{r&&clearInterval(r)}},[t,e]),react.useEffect(()=>{n(getCountDownTime(e))},[e]),getReturnValues(t)},getReturnValues=e=>{let t=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3),r=`${t<10?"0":""}${t}:${n<10?"0":""}${n}`;return{isExpried:t+n<=0,format:r}};exports.useCountdown=useCountdown;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const config={tag:"PostPurchaseCountdownTimer",label:"Countdown Timer",icon:`<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path opacity="0.96" d="M6.66797 28.1193C6.02592 28.1193 5.47905 27.9446 5.02734 27.5952C4.57564 27.2429 4.23047 26.733 3.99183 26.0653C3.7532 25.3949 3.63388 24.5852 3.63388 23.6364C3.63388 22.6932 3.7532 21.8878 3.99183 21.2202C4.23331 20.5497 4.5799 20.0384 5.03161 19.6861C5.48615 19.331 6.03161 19.1534 6.66797 19.1534C7.30433 19.1534 7.84837 19.331 8.30007 19.6861C8.75462 20.0384 9.10121 20.5497 9.33984 21.2202C9.58132 21.8878 9.70206 22.6932 9.70206 23.6364C9.70206 24.5852 9.58274 25.3949 9.34411 26.0653C9.10547 26.733 8.7603 27.2429 8.30859 27.5952C7.85689 27.9446 7.31001 28.1193 6.66797 28.1193ZM6.66797 27.1818C7.30433 27.1818 7.79865 26.875 8.15092 26.2614C8.5032 25.6477 8.67933 24.7727 8.67933 23.6364C8.67933 22.8807 8.59837 22.2372 8.43643 21.706C8.27734 21.1747 8.04723 20.7699 7.74609 20.4915C7.4478 20.2131 7.08842 20.0739 6.66797 20.0739C6.03729 20.0739 5.54439 20.3849 5.18928 21.0071C4.83416 21.6264 4.65661 22.5028 4.65661 23.6364C4.65661 24.392 4.73615 25.0341 4.89524 25.5625C5.05433 26.0909 5.28303 26.4929 5.58132 26.7685C5.88246 27.044 6.24467 27.1818 6.66797 27.1818ZM14.168 28.1193C13.5259 28.1193 12.979 27.9446 12.5273 27.5952C12.0756 27.2429 11.7305 26.733 11.4918 26.0653C11.2532 25.3949 11.1339 24.5852 11.1339 23.6364C11.1339 22.6932 11.2532 21.8878 11.4918 21.2202C11.7333 20.5497 12.0799 20.0384 12.5316 19.6861C12.9862 19.331 13.5316 19.1534 14.168 19.1534C14.8043 19.1534 15.3484 19.331 15.8001 19.6861C16.2546 20.0384 16.6012 20.5497 16.8398 21.2202C17.0813 21.8878 17.2021 22.6932 17.2021 23.6364C17.2021 24.5852 17.0827 25.3949 16.8441 26.0653C16.6055 26.733 16.2603 27.2429 15.8086 27.5952C15.3569 27.9446 14.81 28.1193 14.168 28.1193ZM14.168 27.1818C14.8043 27.1818 15.2987 26.875 15.6509 26.2614C16.0032 25.6477 16.1793 24.7727 16.1793 23.6364C16.1793 22.8807 16.0984 22.2372 15.9364 21.706C15.7773 21.1747 15.5472 20.7699 15.2461 20.4915C14.9478 20.2131 14.5884 20.0739 14.168 20.0739C13.5373 20.0739 13.0444 20.3849 12.6893 21.0071C12.3342 21.6264 12.1566 22.5028 12.1566 23.6364C12.1566 24.392 12.2362 25.0341 12.3952 25.5625C12.5543 26.0909 12.783 26.4929 13.0813 26.7685C13.3825 27.044 13.7447 27.1818 14.168 27.1818ZM22.9464 26.8835C22.7362 26.8835 22.5558 26.8082 22.4052 26.6577C22.2546 26.5071 22.1793 26.3267 22.1793 26.1165C22.1793 25.9062 22.2546 25.7259 22.4052 25.5753C22.5558 25.4247 22.7362 25.3494 22.9464 25.3494C23.1566 25.3494 23.337 25.4247 23.4876 25.5753C23.6381 25.7259 23.7134 25.9062 23.7134 26.1165C23.7134 26.2557 23.6779 26.3835 23.6069 26.5C23.5387 26.6165 23.4464 26.7102 23.3299 26.7812C23.2163 26.8494 23.0884 26.8835 22.9464 26.8835ZM22.9464 22.4688C22.7362 22.4688 22.5558 22.3935 22.4052 22.2429C22.2546 22.0923 22.1793 21.9119 22.1793 21.7017C22.1793 21.4915 22.2546 21.3111 22.4052 21.1605C22.5558 21.0099 22.7362 20.9347 22.9464 20.9347C23.1566 20.9347 23.337 21.0099 23.4876 21.1605C23.6381 21.3111 23.7134 21.4915 23.7134 21.7017C23.7134 21.8409 23.6779 21.9688 23.6069 22.0852C23.5387 22.2017 23.4464 22.2955 23.3299 22.3665C23.2163 22.4347 23.0884 22.4688 22.9464 22.4688ZM31.7227 28.1193C31.0806 28.1193 30.5337 27.9446 30.082 27.5952C29.6303 27.2429 29.2852 26.733 29.0465 26.0653C28.8079 25.3949 28.6886 24.5852 28.6886 23.6364C28.6886 22.6932 28.8079 21.8878 29.0465 21.2202C29.288 20.5497 29.6346 20.0384 30.0863 19.6861C30.5408 19.331 31.0863 19.1534 31.7227 19.1534C32.359 19.1534 32.9031 19.331 33.3548 19.6861C33.8093 20.0384 34.1559 20.5497 34.3945 21.2202C34.636 21.8878 34.7567 22.6932 34.7567 23.6364C34.7567 24.5852 34.6374 25.3949 34.3988 26.0653C34.1602 26.733 33.815 27.2429 33.3633 27.5952C32.9116 27.9446 32.3647 28.1193 31.7227 28.1193ZM31.7227 27.1818C32.359 27.1818 32.8533 26.875 33.2056 26.2614C33.5579 25.6477 33.734 24.7727 33.734 23.6364C33.734 22.8807 33.6531 22.2372 33.4911 21.706C33.332 21.1747 33.1019 20.7699 32.8008 20.4915C32.5025 20.2131 32.1431 20.0739 31.7227 20.0739C31.092 20.0739 30.5991 20.3849 30.244 21.0071C29.8888 21.6264 29.7113 22.5028 29.7113 23.6364C29.7113 24.392 29.7908 25.0341 29.9499 25.5625C30.109 26.0909 30.3377 26.4929 30.636 26.7685C30.9371 27.044 31.2994 27.1818 31.7227 27.1818ZM39.2227 28.1193C38.5806 28.1193 38.0337 27.9446 37.582 27.5952C37.1303 27.2429 36.7852 26.733 36.5465 26.0653C36.3079 25.3949 36.1886 24.5852 36.1886 23.6364C36.1886 22.6932 36.3079 21.8878 36.5465 21.2202C36.788 20.5497 37.1346 20.0384 37.5863 19.6861C38.0408 19.331 38.5863 19.1534 39.2227 19.1534C39.859 19.1534 40.4031 19.331 40.8548 19.6861C41.3093 20.0384 41.6559 20.5497 41.8945 21.2202C42.136 21.8878 42.2567 22.6932 42.2567 23.6364C42.2567 24.5852 42.1374 25.3949 41.8988 26.0653C41.6602 26.733 41.315 27.2429 40.8633 27.5952C40.4116 27.9446 39.8647 28.1193 39.2227 28.1193ZM39.2227 27.1818C39.859 27.1818 40.3533 26.875 40.7056 26.2614C41.0579 25.6477 41.234 24.7727 41.234 23.6364C41.234 22.8807 41.1531 22.2372 40.9911 21.706C40.832 21.1747 40.6019 20.7699 40.3008 20.4915C40.0025 20.2131 39.6431 20.0739 39.2227 20.0739C38.592 20.0739 38.0991 20.3849 37.744 21.0071C37.3888 21.6264 37.2113 22.5028 37.2113 23.6364C37.2113 24.392 37.2908 25.0341 37.4499 25.5625C37.609 26.0909 37.8377 26.4929 38.136 26.7685C38.4371 27.044 38.7994 27.1818 39.2227 27.1818ZM48.0011 26.8835C47.7908 26.8835 47.6104 26.8082 47.4599 26.6577C47.3093 26.5071 47.234 26.3267 47.234 26.1165C47.234 25.9062 47.3093 25.7259 47.4599 25.5753C47.6104 25.4247 47.7908 25.3494 48.0011 25.3494C48.2113 25.3494 48.3917 25.4247 48.5423 25.5753C48.6928 25.7259 48.7681 25.9062 48.7681 26.1165C48.7681 26.2557 48.7326 26.3835 48.6616 26.5C48.5934 26.6165 48.5011 26.7102 48.3846 26.7812C48.271 26.8494 48.1431 26.8835 48.0011 26.8835ZM48.0011 22.4688C47.7908 22.4688 47.6104 22.3935 47.4599 22.2429C47.3093 22.0923 47.234 21.9119 47.234 21.7017C47.234 21.4915 47.3093 21.3111 47.4599 21.1605C47.6104 21.0099 47.7908 20.9347 48.0011 20.9347C48.2113 20.9347 48.3917 21.0099 48.5423 21.1605C48.6928 21.3111 48.7681 21.4915 48.7681 21.7017C48.7681 21.8409 48.7326 21.9688 48.6616 22.0852C48.5934 22.2017 48.5011 22.2955 48.3846 22.3665C48.271 22.4347 48.1431 22.4688 48.0011 22.4688ZM56.7773 28.1193C56.1353 28.1193 55.5884 27.9446 55.1367 27.5952C54.685 27.2429 54.3398 26.733 54.1012 26.0653C53.8626 25.3949 53.7433 24.5852 53.7433 23.6364C53.7433 22.6932 53.8626 21.8878 54.1012 21.2202C54.3427 20.5497 54.6893 20.0384 55.141 19.6861C55.5955 19.331 56.141 19.1534 56.7773 19.1534C57.4137 19.1534 57.9577 19.331 58.4094 19.6861C58.864 20.0384 59.2106 20.5497 59.4492 21.2202C59.6907 21.8878 59.8114 22.6932 59.8114 23.6364C59.8114 24.5852 59.6921 25.3949 59.4535 26.0653C59.2148 26.733 58.8697 27.2429 58.418 27.5952C57.9663 27.9446 57.4194 28.1193 56.7773 28.1193ZM56.7773 27.1818C57.4137 27.1818 57.908 26.875 58.2603 26.2614C58.6126 25.6477 58.7887 24.7727 58.7887 23.6364C58.7887 22.8807 58.7077 22.2372 58.5458 21.706C58.3867 21.1747 58.1566 20.7699 57.8555 20.4915C57.5572 20.2131 57.1978 20.0739 56.7773 20.0739C56.1467 20.0739 55.6538 20.3849 55.2987 21.0071C54.9435 21.6264 54.766 22.5028 54.766 23.6364C54.766 24.392 54.8455 25.0341 55.0046 25.5625C55.1637 26.0909 55.3924 26.4929 55.6907 26.7685C55.9918 27.044 56.354 27.1818 56.7773 27.1818ZM64.2773 28.1193C63.6353 28.1193 63.0884 27.9446 62.6367 27.5952C62.185 27.2429 61.8398 26.733 61.6012 26.0653C61.3626 25.3949 61.2433 24.5852 61.2433 23.6364C61.2433 22.6932 61.3626 21.8878 61.6012 21.2202C61.8427 20.5497 62.1893 20.0384 62.641 19.6861C63.0955 19.331 63.641 19.1534 64.2773 19.1534C64.9137 19.1534 65.4577 19.331 65.9094 19.6861C66.364 20.0384 66.7106 20.5497 66.9492 21.2202C67.1907 21.8878 67.3114 22.6932 67.3114 23.6364C67.3114 24.5852 67.1921 25.3949 66.9535 26.0653C66.7148 26.733 66.3697 27.2429 65.918 27.5952C65.4663 27.9446 64.9194 28.1193 64.2773 28.1193ZM64.2773 27.1818C64.9137 27.1818 65.408 26.875 65.7603 26.2614C66.1126 25.6477 66.2887 24.7727 66.2887 23.6364C66.2887 22.8807 66.2077 22.2372 66.0458 21.706C65.8867 21.1747 65.6566 20.7699 65.3555 20.4915C65.0572 20.2131 64.6978 20.0739 64.2773 20.0739C63.6467 20.0739 63.1538 20.3849 62.7987 21.0071C62.4435 21.6264 62.266 22.5028 62.266 23.6364C62.266 24.392 62.3455 25.0341 62.5046 25.5625C62.6637 26.0909 62.8924 26.4929 63.1907 26.7685C63.4918 27.044 63.854 27.1818 64.2773 27.1818ZM73.0558 26.8835C72.8455 26.8835 72.6651 26.8082 72.5146 26.6577C72.364 26.5071 72.2887 26.3267 72.2887 26.1165C72.2887 25.9062 72.364 25.7259 72.5146 25.5753C72.6651 25.4247 72.8455 25.3494 73.0558 25.3494C73.266 25.3494 73.4464 25.4247 73.5969 25.5753C73.7475 25.7259 73.8228 25.9062 73.8228 26.1165C73.8228 26.2557 73.7873 26.3835 73.7163 26.5C73.6481 26.6165 73.5558 26.7102 73.4393 26.7812C73.3256 26.8494 73.1978 26.8835 73.0558 26.8835ZM73.0558 22.4688C72.8455 22.4688 72.6651 22.3935 72.5146 22.2429C72.364 22.0923 72.2887 21.9119 72.2887 21.7017C72.2887 21.4915 72.364 21.3111 72.5146 21.1605C72.6651 21.0099 72.8455 20.9347 73.0558 20.9347C73.266 20.9347 73.4464 21.0099 73.5969 21.1605C73.7475 21.3111 73.8228 21.4915 73.8228 21.7017C73.8228 21.8409 73.7873 21.9688 73.7163 22.0852C73.6481 22.2017 73.5558 22.2955 73.4393 22.3665C73.3256 22.4347 73.1978 22.4688 73.0558 22.4688ZM81.832 28.1193C81.19 28.1193 80.6431 27.9446 80.1914 27.5952C79.7397 27.2429 79.3945 26.733 79.1559 26.0653C78.9173 25.3949 78.7979 24.5852 78.7979 23.6364C78.7979 22.6932 78.9173 21.8878 79.1559 21.2202C79.3974 20.5497 79.744 20.0384 80.1957 19.6861C80.6502 19.331 81.1957 19.1534 81.832 19.1534C82.4684 19.1534 83.0124 19.331 83.4641 19.6861C83.9187 20.0384 84.2653 20.5497 84.5039 21.2202C84.7454 21.8878 84.8661 22.6932 84.8661 23.6364C84.8661 24.5852 84.7468 25.3949 84.5082 26.0653C84.2695 26.733 83.9244 27.2429 83.4727 27.5952C83.021 27.9446 82.4741 28.1193 81.832 28.1193ZM81.832 27.1818C82.4684 27.1818 82.9627 26.875 83.315 26.2614C83.6673 25.6477 83.8434 24.7727 83.8434 23.6364C83.8434 22.8807 83.7624 22.2372 83.6005 21.706C83.4414 21.1747 83.2113 20.7699 82.9102 20.4915C82.6119 20.2131 82.2525 20.0739 81.832 20.0739C81.2013 20.0739 80.7085 20.3849 80.3533 21.0071C79.9982 21.6264 79.8207 22.5028 79.8207 23.6364C79.8207 24.392 79.9002 25.0341 80.0593 25.5625C80.2184 26.0909 80.4471 26.4929 80.7454 26.7685C81.0465 27.044 81.4087 27.1818 81.832 27.1818ZM89.332 28.1193C88.69 28.1193 88.1431 27.9446 87.6914 27.5952C87.2397 27.2429 86.8945 26.733 86.6559 26.0653C86.4173 25.3949 86.2979 24.5852 86.2979 23.6364C86.2979 22.6932 86.4173 21.8878 86.6559 21.2202C86.8974 20.5497 87.244 20.0384 87.6957 19.6861C88.1502 19.331 88.6957 19.1534 89.332 19.1534C89.9684 19.1534 90.5124 19.331 90.9641 19.6861C91.4187 20.0384 91.7653 20.5497 92.0039 21.2202C92.2454 21.8878 92.3661 22.6932 92.3661 23.6364C92.3661 24.5852 92.2468 25.3949 92.0082 26.0653C91.7695 26.733 91.4244 27.2429 90.9727 27.5952C90.521 27.9446 89.9741 28.1193 89.332 28.1193ZM89.332 27.1818C89.9684 27.1818 90.4627 26.875 90.815 26.2614C91.1673 25.6477 91.3434 24.7727 91.3434 23.6364C91.3434 22.8807 91.2624 22.2372 91.1005 21.706C90.9414 21.1747 90.7113 20.7699 90.4102 20.4915C90.1119 20.2131 89.7525 20.0739 89.332 20.0739C88.7013 20.0739 88.2085 20.3849 87.8533 21.0071C87.4982 21.6264 87.3207 22.5028 87.3207 23.6364C87.3207 24.392 87.4002 25.0341 87.5593 25.5625C87.7184 26.0909 87.9471 26.4929 88.2454 26.7685C88.5465 27.044 88.9087 27.1818 89.332 27.1818Z" fill="#F9F9F9"></path>
3
- </svg>`,settings:[{id:"setting",controls:[{id:"conditionGroup",type:"group",label:"Condition",controls:[{id:"conditionText",label:"Message",type:"input",default:"Offer expires in:"},{id:"expired",label:"Expired after",type:"input:unit",units:["min"],useOnlyUnitInit:!0,default:"1",max:60}]},{id:"expiredGroup",type:"group",label:"After expiry",controls:[{id:"expiredText",label:"Message",type:"input",default:"Offer expired"},{id:"whenTimeOut",label:"When time out",type:"select",options:[{value:"next-offer",label:"Show next offer"},{value:"hide-offer",label:"Hide offer"},{value:"thank-you",label:"Go to thank you"}],default:"next-offer"}]}]},{id:"style",controls:[{id:"bgColor",label:"Background color",type:"select",options:[{label:"Blue",value:"info",svgIcon:`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ </svg>`,settings:[{id:"setting",controls:[{id:"conditionGroup",type:"group",label:"Condition",controls:[{id:"conditionText",label:"Message",type:"input",default:"Offer expires in:"},{id:"expired",label:"Expired after",type:"input:unit",units:["min"],useOnlyUnitInit:!0,default:"1"}]},{id:"expiredGroup",type:"group",label:"After expiry",controls:[{id:"expiredText",label:"Message",type:"input",default:"Offer expired"},{id:"whenTimeOut",label:"When time out",type:"select",options:[{value:"next-offer",label:"Show next offer"},{value:"hide-offer",label:"Hide offer"},{value:"thank-you",label:"Go to thank you"}],default:"next-offer"}]}]},{id:"style",controls:[{id:"bgColor",label:"Background color",type:"select",options:[{label:"Blue",value:"info",svgIcon:`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
4
4
  <circle cx="10" cy="9.99994" r="10" fill="#D1E6F5"/>
5
5
  <circle cx="10" cy="9.99994" r="9.5" stroke="white" stroke-opacity="0.2"/>
6
6
  </svg>
@@ -16,7 +16,7 @@
16
16
  <circle cx="10" cy="9.99994" r="10" fill="#FFF8E0"/>
17
17
  <circle cx="10" cy="9.99994" r="9.5" stroke="white" stroke-opacity="0.2"/>
18
18
  </svg>
19
- `}],default:"default"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"xlarge",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"left"},{id:"width",type:"input:unit-width",label:"Width",min:0,units:["px","%"],devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",icon:`<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
19
+ `}],default:"info"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"xlarge",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"left"},{id:"width",type:"input:unit-width",label:"Width",min:0,units:["px","%"],devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",icon:`<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
20
20
  <path d="M3.47916 1.25C3.82434 1.25 4.10416 1.52982 4.10416 1.875L4.10416 18.125C4.10416 18.4702 3.82434 18.75 3.47916 18.75C3.13399 18.75 2.85416 18.4702 2.85416 18.125L2.85416 1.875C2.85416 1.52982 3.13399 1.25 3.47916 1.25Z" fill="currentColor"/>
21
21
  <path fill-rule="evenodd" clip-rule="evenodd" d="M4.72916 6.25C4.72916 5.21447 5.56863 4.375 6.60416 4.375H12.8542C13.8897 4.375 14.7292 5.21447 14.7292 6.25V7.5C14.7292 8.53553 13.8897 9.375 12.8542 9.375H6.60416C5.56863 9.375 4.72916 8.53553 4.72916 7.5V6.25ZM6.60416 5.625C6.25899 5.625 5.97916 5.90482 5.97916 6.25V7.5C5.97916 7.84518 6.25899 8.125 6.60416 8.125H12.8542C13.1993 8.125 13.4792 7.84518 13.4792 7.5V6.25C13.4792 5.90482 13.1993 5.625 12.8542 5.625H6.60416Z" fill="currentColor"/>
22
22
  <path fill-rule="evenodd" clip-rule="evenodd" d="M6.60416 10.625C5.56863 10.625 4.72916 11.4645 4.72916 12.5V13.75C4.72916 14.7855 5.56863 15.625 6.60416 15.625H16.6042C17.6397 15.625 18.4792 14.7855 18.4792 13.75V12.5C18.4792 11.4645 17.6397 10.625 16.6042 10.625H6.60416ZM5.97916 12.5C5.97916 12.1548 6.25899 11.875 6.60416 11.875H16.6042C16.9493 11.875 17.2292 12.1548 17.2292 12.5V13.75C17.2292 14.0952 16.9493 14.375 16.6042 14.375H6.60416C6.25899 14.375 5.97916 14.0952 5.97916 13.75V12.5Z" fill="currentColor"/>
@@ -67,7 +67,7 @@ ${core.RenderIf(core.isLocalEnv,'<script src="{{ \'gp-product.v2.js\' | asset_ur
67
67
  assign target_collection = null
68
68
  assign productSrc = '${u}'
69
69
  assign c = 0
70
- assign limit = ${f&&"latest"==p?a?.numOfSelectedProducts||4:m}
70
+ assign limit = ${f&&"latest"===p?"RelatedProduct"===u?m:a?.numOfSelectedProducts||4:m}
71
71
  if request.page_type == 'collection' or preview_page_type == 'collection'
72
72
  assign target_collection = collection
73
73
  if target_collection == empty or target_collection == null
@@ -94,86 +94,90 @@ ${core.RenderIf(core.isLocalEnv,'<script src="{{ \'gp-product.v2.js\' | asset_ur
94
94
  assign idAssignProduct = assignProduct.id
95
95
  assign allProducts = collections.all.products
96
96
 
97
- if relatedTag == 'collection'
98
- for collection in collections
99
- assign collectionId = collection.id
100
- assign isInCollection = false
101
- assign collectionsAssignProduct = assignProduct.collections
102
- for item in collectionsAssignProduct
103
- if item.id == collectionId
104
- assign isInCollection = true
97
+ if relatedTag == 'collection'
98
+ for collection in collections
99
+ assign collectionId = collection.id
100
+ assign isInCollection = false
101
+ assign collectionsAssignProduct = assignProduct.collections
102
+ for item in collectionsAssignProduct
103
+ if item.id == collectionId
104
+ assign isInCollection = true
105
+ endif
106
+ endfor
107
+ if isInCollection
108
+ for item in allProducts
109
+ assign handle = item.handle
110
+ assign productF = all_products[handle] | sort
111
+ assign idOfProduct = all_products[handle].id
112
+ for product in collection.products
113
+ assign productCollectionId = product.id
114
+ unless arrayListProducts contains handle
115
+ if productCollectionId == idOfProduct and idAssignProduct != idOfProduct
116
+ assign products = products | concat: productF
117
+ if stringListProducts.size > 0
118
+ assign stringListProducts = stringListProducts | append: ', '
119
+ endif
120
+ assign stringListProducts = stringListProducts | append: handle
121
+ assign arrayListProducts = stringListProducts | split: ", "
122
+ endif
123
+ endunless
124
+ endfor
125
+ endfor
105
126
  endif
106
127
  endfor
107
- if isInCollection
108
- for item in allProducts
109
- assign handle = item.handle
110
- assign productF = all_products[handle] | sort
111
- assign idOfProduct = all_products[handle].id
112
- for product in collection.products
113
- assign productCollectionId = product.id
114
- unless arrayListProducts contains handle
115
- if productCollectionId == idOfProduct and idAssignProduct != idOfProduct
116
- assign products = products | concat: productF
117
- if stringListProducts.size > 0
118
- assign stringListProducts = stringListProducts | append: ', '
119
- endif
120
- assign stringListProducts = stringListProducts | append: handle
121
- assign arrayListProducts = stringListProducts | split: ", "
122
- endif
123
- endunless
124
- endfor
125
- endfor
126
- endif
127
- endfor
128
- endif
129
-
130
- if relatedTag == 'vendor'
131
- assign vendorAssignProduct = assignProduct.vendor
132
- for item in allProducts
133
- assign handle = item.handle
134
- assign productF = all_products[handle] | sort
135
- assign vendorOfProduct = all_products[handle].vendor
136
- assign idOfProduct = all_products[handle].id
137
- if vendorOfProduct == vendorAssignProduct and idAssignProduct != idOfProduct
138
- assign products = products | concat: productF
139
- endif
140
- endfor
141
- endif
128
+ endif
142
129
 
143
- if relatedTag == 'production-type'
144
- assign typeAssignProduct = assignProduct.type
145
- for item in allProducts
146
- assign handle = item.handle
147
- assign productF = all_products[handle] | sort
148
- assign typeOfProduct = all_products[handle].type
149
- assign idOfProduct = all_products[handle].id
150
- if typeOfProduct == typeAssignProduct and idAssignProduct != idOfProduct
151
- assign products = products | concat: productF
152
- endif
153
- endfor
154
- endif
155
- if relatedTag == 'tags'
156
- assign tagsAssignProduct = assignProduct.tags
157
- for item in allProducts
158
- assign handle = item.handle
159
- assign productF = all_products[handle] | sort
160
- assign tagsOfProduct = all_products[handle].tags
130
+ if relatedTag == 'vendor'
131
+ assign vendorAssignProduct = assignProduct.vendor
132
+ for item in allProducts
133
+ assign handle = item.handle
134
+ assign productF = all_products[handle] | sort
135
+ assign vendorOfProduct = all_products[handle].vendor
161
136
  assign idOfProduct = all_products[handle].id
162
- for tag in tagsAssignProduct
163
- assign tagItem = tag
164
- unless arrayListProducts contains handle
165
- if tagsOfProduct contains tagItem and idAssignProduct != idOfProduct
166
- assign products = products | concat: productF
167
- if stringListProducts.size > 0
168
- assign stringListProducts = stringListProducts | append: ', '
169
- endif
170
- assign stringListProducts = stringListProducts | append: handle
171
- assign arrayListProducts = stringListProducts | split: ", "
172
- endif
173
- endunless
174
- endfor
175
- endfor
176
- endif
137
+ if vendorOfProduct == vendorAssignProduct and idAssignProduct != idOfProduct
138
+ assign products = products | concat: productF
139
+ endif
140
+ endfor
141
+ endif
142
+
143
+ if relatedTag == 'production-type'
144
+ assign typeAssignProduct = assignProduct.type
145
+ for item in allProducts
146
+ assign handle = item.handle
147
+ assign productF = all_products[handle] | sort
148
+ assign typeOfProduct = all_products[handle].type
149
+ assign idOfProduct = all_products[handle].id
150
+ if typeOfProduct == typeAssignProduct and idAssignProduct != idOfProduct
151
+ assign products = products | concat: productF
152
+ endif
153
+ endfor
154
+ endif
155
+
156
+ if relatedTag == 'tags'
157
+ assign tagsAssignProduct = assignProduct.tags
158
+ for item in allProducts
159
+ assign handle = item.handle
160
+ assign productF = all_products[handle] | sort
161
+ assign tagsOfProduct = all_products[handle].tags
162
+ assign idOfProduct = all_products[handle].id
163
+ for tag in tagsAssignProduct
164
+ assign tagItem = tag
165
+ unless arrayListProducts contains handle
166
+ if tagsOfProduct contains tagItem and idAssignProduct != idOfProduct
167
+ assign products = products | concat: productF
168
+ if stringListProducts.size > 0
169
+ assign stringListProducts = stringListProducts | append: ', '
170
+ endif
171
+ assign stringListProducts = stringListProducts | append: handle
172
+ assign arrayListProducts = stringListProducts | split: ", "
173
+ endif
174
+ endunless
175
+ endfor
176
+ endfor
177
+ endif
178
+ paginate products by ${m||4}
179
+ assign products = products
180
+ endpaginate
177
181
  else if productSrc == 'PickProduct'
178
182
  unless ${g}
179
183
  assign products = null | sort
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useCollection as e}from"@gem-sdk/core";import l from"../../text/components/Text.js";let CollectionTitle=({setting:o})=>{let i=e();return t(l,{styles:o,setting:{text:i?.title??"Collection title",excludeFlex:!0}})};export{CollectionTitle as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{useCollection as e}from"@gem-sdk/core";import l from"../../text/components/Text.js";let CollectionTitle=({setting:o})=>{let i=e(),r=o?.htmlTag;return t(l,{styles:o,setting:{text:i?.title??"Collection title",excludeFlex:!0,htmlTag:r}})};export{CollectionTitle as default};
@@ -2,7 +2,7 @@ let config={tag:"CollectionTitle",label:"Collection Title",icon:`
2
2
  <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M8.66634 5.16663C8.20611 5.16663 7.83301 5.53973 7.83301 5.99996V9.99996C7.83301 10.4602 8.20611 10.8333 8.66634 10.8333H9.99967C10.4599 10.8333 10.833 10.4602 10.833 9.99996V8.16663H18.4997V31.8333H16.6663C16.2062 31.8333 15.833 32.2064 15.833 32.6666V34C15.833 34.4601 16.2062 34.8333 16.6663 34.8333H23.333C23.7932 34.8333 24.1663 34.4601 24.1663 34V32.6666C24.1663 32.2064 23.7932 31.8333 23.333 31.8333H21.4997V8.16663H29.1663V9.99996C29.1663 10.4602 29.5395 10.8333 29.9997 10.8333H31.333C31.7932 10.8333 32.1663 10.4602 32.1663 9.99996V5.99996C32.1663 5.53972 31.7932 5.16663 31.333 5.16663H8.66634Z" fill="currentColor"/>
4
4
  </svg>
5
- `,settings:[{id:"setting",controls:[{id:"groupLineClamp",type:"group",label:"Title text",controls:[{id:"typo",type:"typography-v2",label:"Text Style",default:{type:"heading-1",attrs:{color:"text-2"}},ignoreReRender:!0}]},{id:"textAlign",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}}]}],ui:[{label:{en:"Text"},type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",label:{en:"Align"},setting:{id:"textAlign"}}],editorConfigs:{placeholder:{flowPage:"GP_COLLECTION"}},presets:[{id:"collection-title",name:{en:"Collection Title"},icon:{desktop:`
5
+ `,settings:[{id:"setting",controls:[{id:"groupLineClamp",type:"group",label:"Title text",controls:[{id:"typo",type:"typography-v2",label:"Text Style",default:{type:"heading-1",attrs:{color:"text-2"}},ignoreReRender:!0}]},{id:"textAlign",label:"Align",type:"segment",options:[{label:"Left",value:"left",type:"text",tooltip:"Align left"},{label:"Center",value:"center",type:"text",tooltip:"Align center"},{label:"Right",value:"right",type:"text",tooltip:"Align right"},{label:"Justify",value:"justify",type:"text",tooltip:"Align justify"}],devices:{desktop:{default:"left"}}},{id:"htmlTag",label:"HTML Tag",type:"select",options:[{value:"h1",label:"H1"},{value:"h2",label:"H2"},{value:"h3",label:"H3"},{value:"h4",label:"H4"},{value:"h5",label:"H5"},{value:"h6",label:"H6"},{value:"div",label:"Div"}],default:"h1"}]}],ui:[{label:{en:"Text"},type:"control",setting:{id:"typo"},layout:"vertical"},{type:"control",label:{en:"Align"},setting:{id:"textAlign"}},{type:"group",label:{en:"SEO"},controls:[{type:"control",label:{en:"HTML tag"},setting:{id:"htmlTag"}}]}],editorConfigs:{placeholder:{flowPage:"GP_COLLECTION"}},presets:[{id:"collection-title",name:{en:"Collection Title"},icon:{desktop:`
6
6
  <svg width="94" height="48" viewBox="0 0 94 48" fill="none" xmlns="http://www.w3.org/2000/svg">
7
7
  <path d="M20.951 10.1477H19.1783C19.1101 9.76894 18.9832 9.43561 18.7976 9.14773C18.612 8.85985 18.3847 8.61553 18.1158 8.41477C17.8468 8.21401 17.5457 8.0625 17.2124 7.96023C16.8828 7.85795 16.5324 7.80682 16.1612 7.80682C15.4908 7.80682 14.8904 7.97538 14.3601 8.3125C13.8336 8.64962 13.4169 9.14394 13.1101 9.79545C12.8071 10.447 12.6555 11.2424 12.6555 12.1818C12.6555 13.1288 12.8071 13.928 13.1101 14.5795C13.4169 15.2311 13.8355 15.7235 14.3658 16.0568C14.8961 16.3902 15.4927 16.5568 16.1555 16.5568C16.523 16.5568 16.8714 16.5076 17.201 16.4091C17.5343 16.3068 17.8355 16.1572 18.1044 15.9602C18.3733 15.7633 18.6006 15.5227 18.7862 15.2386C18.9756 14.9508 19.1063 14.6212 19.1783 14.25L20.951 14.2557C20.8563 14.8277 20.6726 15.3542 20.3999 15.8352C20.1309 16.3125 19.7843 16.7254 19.3601 17.0739C18.9396 17.4186 18.4586 17.6856 17.9169 17.875C17.3752 18.0644 16.7843 18.1591 16.1442 18.1591C15.1366 18.1591 14.2389 17.9205 13.451 17.4432C12.6631 16.9621 12.0419 16.2746 11.5874 15.3807C11.1366 14.4867 10.9112 13.4205 10.9112 12.1818C10.9112 10.9394 11.1385 9.87311 11.593 8.98295C12.0476 8.08901 12.6688 7.40341 13.4567 6.92614C14.2446 6.44508 15.1404 6.20455 16.1442 6.20455C16.7616 6.20455 17.3374 6.29356 17.8714 6.47159C18.4093 6.64583 18.8923 6.90341 19.3203 7.24432C19.7483 7.58144 20.1025 7.99432 20.3828 8.48295C20.6631 8.9678 20.8525 9.52273 20.951 10.1477ZM26.5916 18.1761C25.7734 18.1761 25.0594 17.9886 24.4496 17.6136C23.8397 17.2386 23.3662 16.714 23.0291 16.0398C22.692 15.3655 22.5234 14.5777 22.5234 13.6761C22.5234 12.7708 22.692 11.9792 23.0291 11.3011C23.3662 10.6231 23.8397 10.0966 24.4496 9.72159C25.0594 9.34659 25.7734 9.15909 26.5916 9.15909C27.4098 9.15909 28.1238 9.34659 28.7337 9.72159C29.3435 10.0966 29.817 10.6231 30.1541 11.3011C30.4912 11.9792 30.6598 12.7708 30.6598 13.6761C30.6598 14.5777 30.4912 15.3655 30.1541 16.0398C29.817 16.714 29.3435 17.2386 28.7337 17.6136C28.1238 17.9886 27.4098 18.1761 26.5916 18.1761ZM26.5973 16.75C27.1276 16.75 27.567 16.6098 27.9155 16.3295C28.264 16.0492 28.5215 15.6761 28.6882 15.2102C28.8587 14.7443 28.9439 14.2311 28.9439 13.6705C28.9439 13.1136 28.8587 12.6023 28.6882 12.1364C28.5215 11.6667 28.264 11.2898 27.9155 11.0057C27.567 10.7216 27.1276 10.5795 26.5973 10.5795C26.0632 10.5795 25.62 10.7216 25.2678 11.0057C24.9193 11.2898 24.6598 11.6667 24.4893 12.1364C24.3227 12.6023 24.2393 13.1136 24.2393 13.6705C24.2393 14.2311 24.3227 14.7443 24.4893 15.2102C24.6598 15.6761 24.9193 16.0492 25.2678 16.3295C25.62 16.6098 26.0632 16.75 26.5973 16.75ZM34.255 6.36364V18H32.5561V6.36364H34.255ZM38.2393 6.36364V18H36.5405V6.36364H38.2393ZM44.2862 18.1761C43.4264 18.1761 42.6858 17.9924 42.0646 17.625C41.4472 17.2538 40.9699 16.733 40.6328 16.0625C40.2995 15.3883 40.1328 14.5985 40.1328 13.6932C40.1328 12.7992 40.2995 12.0114 40.6328 11.3295C40.9699 10.6477 41.4396 10.1155 42.0419 9.73295C42.648 9.35038 43.3563 9.15909 44.1669 9.15909C44.6593 9.15909 45.1366 9.24053 45.5987 9.40341C46.0608 9.56629 46.4756 9.82197 46.843 10.1705C47.2105 10.5189 47.5002 10.9716 47.7124 11.5284C47.9245 12.0814 48.0305 12.7538 48.0305 13.5455V14.1477H41.093V12.875H46.3658C46.3658 12.428 46.2749 12.0322 46.093 11.6875C45.9112 11.339 45.6555 11.0644 45.326 10.8636C45.0002 10.6629 44.6177 10.5625 44.1783 10.5625C43.701 10.5625 43.2843 10.6799 42.9283 10.9148C42.576 11.1458 42.3033 11.4489 42.1101 11.8239C41.9207 12.1951 41.826 12.5985 41.826 13.0341V14.0284C41.826 14.6117 41.9283 15.108 42.1328 15.517C42.3411 15.9261 42.6309 16.2386 43.0021 16.4545C43.3733 16.6667 43.8071 16.7727 44.3033 16.7727C44.6252 16.7727 44.9188 16.7273 45.1839 16.6364C45.4491 16.5417 45.6783 16.4015 45.8714 16.2159C46.0646 16.0303 46.2124 15.8011 46.3146 15.5284L47.9226 15.8182C47.7938 16.2917 47.5627 16.7064 47.2294 17.0625C46.8999 17.4148 46.4851 17.6894 45.9851 17.8864C45.4889 18.0795 44.9226 18.1761 44.2862 18.1761ZM53.5916 18.1761C52.7469 18.1761 52.0196 17.9848 51.4098 17.6023C50.8037 17.2159 50.3378 16.6837 50.0121 16.0057C49.6863 15.3277 49.5234 14.5511 49.5234 13.6761C49.5234 12.7898 49.6901 12.0076 50.0234 11.3295C50.3568 10.6477 50.8265 10.1155 51.4325 9.73295C52.0386 9.35038 52.7526 9.15909 53.5746 9.15909C54.2375 9.15909 54.8284 9.2822 55.3473 9.52841C55.8662 9.77083 56.2848 10.1117 56.603 10.5511C56.925 10.9905 57.1162 11.5038 57.1768 12.0909H55.5234C55.4325 11.6818 55.2242 11.3295 54.8984 11.0341C54.5765 10.7386 54.1446 10.5909 53.603 10.5909C53.1295 10.5909 52.7147 10.7159 52.3587 10.9659C52.0064 11.2121 51.7318 11.5644 51.5348 12.0227C51.3378 12.4773 51.2393 13.0152 51.2393 13.6364C51.2393 14.2727 51.3359 14.822 51.5291 15.2841C51.7223 15.7462 51.995 16.1042 52.3473 16.358C52.7034 16.6117 53.1219 16.7386 53.603 16.7386C53.925 16.7386 54.2166 16.6799 54.478 16.5625C54.7431 16.4413 54.9647 16.2689 55.1428 16.0455C55.3246 15.822 55.4515 15.553 55.5234 15.2386H57.1768C57.1162 15.803 56.9325 16.3068 56.6257 16.75C56.3189 17.1932 55.9079 17.5417 55.3928 17.7955C54.8814 18.0492 54.281 18.1761 53.5916 18.1761ZM63.0675 9.27273V10.6364H58.3004V9.27273H63.0675ZM59.5788 7.18182H61.2777V15.4375C61.2777 15.767 61.3269 16.0152 61.4254 16.1818C61.5239 16.3447 61.6508 16.4564 61.8061 16.517C61.9652 16.5739 62.1375 16.6023 62.3232 16.6023C62.4595 16.6023 62.5788 16.5928 62.6811 16.5739C62.7834 16.5549 62.8629 16.5398 62.9197 16.5284L63.2266 17.9318C63.1281 17.9697 62.9879 18.0076 62.8061 18.0455C62.6243 18.0871 62.397 18.1098 62.1243 18.1136C61.6773 18.1212 61.2607 18.0417 60.8743 17.875C60.4879 17.7083 60.1754 17.4508 59.9368 17.1023C59.6982 16.7538 59.5788 16.3163 59.5788 15.7898V7.18182ZM64.9467 18V9.27273H66.6456V18H64.9467ZM65.8047 7.92614C65.5092 7.92614 65.2554 7.82765 65.0433 7.63068C64.835 7.42992 64.7308 7.19129 64.7308 6.91477C64.7308 6.63447 64.835 6.39583 65.0433 6.19886C65.2554 5.99811 65.5092 5.89773 65.8047 5.89773C66.1001 5.89773 66.352 5.99811 66.5604 6.19886C66.7725 6.39583 66.8786 6.63447 66.8786 6.91477C66.8786 7.19129 66.7725 7.42992 66.5604 7.63068C66.352 7.82765 66.1001 7.92614 65.8047 7.92614ZM72.6072 18.1761C71.7891 18.1761 71.075 17.9886 70.4652 17.6136C69.8554 17.2386 69.3819 16.714 69.0447 16.0398C68.7076 15.3655 68.5391 14.5777 68.5391 13.6761C68.5391 12.7708 68.7076 11.9792 69.0447 11.3011C69.3819 10.6231 69.8554 10.0966 70.4652 9.72159C71.075 9.34659 71.7891 9.15909 72.6072 9.15909C73.4254 9.15909 74.1394 9.34659 74.7493 9.72159C75.3591 10.0966 75.8326 10.6231 76.1697 11.3011C76.5069 11.9792 76.6754 12.7708 76.6754 13.6761C76.6754 14.5777 76.5069 15.3655 76.1697 16.0398C75.8326 16.714 75.3591 17.2386 74.7493 17.6136C74.1394 17.9886 73.4254 18.1761 72.6072 18.1761ZM72.6129 16.75C73.1432 16.75 73.5826 16.6098 73.9311 16.3295C74.2796 16.0492 74.5372 15.6761 74.7038 15.2102C74.8743 14.7443 74.9595 14.2311 74.9595 13.6705C74.9595 13.1136 74.8743 12.6023 74.7038 12.1364C74.5372 11.6667 74.2796 11.2898 73.9311 11.0057C73.5826 10.7216 73.1432 10.5795 72.6129 10.5795C72.0788 10.5795 71.6357 10.7216 71.2834 11.0057C70.9349 11.2898 70.6754 11.6667 70.505 12.1364C70.3383 12.6023 70.255 13.1136 70.255 13.6705C70.255 14.2311 70.3383 14.7443 70.505 15.2102C70.6754 15.6761 70.9349 16.0492 71.2834 16.3295C71.6357 16.6098 72.0788 16.75 72.6129 16.75ZM80.2706 12.8182V18H78.5717V9.27273H80.2024V10.6932H80.3104C80.5111 10.2311 80.8255 9.85985 81.2536 9.57955C81.6854 9.29924 82.2289 9.15909 82.8842 9.15909C83.4789 9.15909 83.9998 9.28409 84.4467 9.53409C84.8937 9.7803 85.2403 10.1477 85.4865 10.6364C85.7327 11.125 85.8558 11.7292 85.8558 12.4489V18H84.157V12.6534C84.157 12.0208 83.9922 11.5265 83.6626 11.1705C83.3331 10.8106 82.8804 10.6307 82.3047 10.6307C81.9107 10.6307 81.5604 10.7159 81.2536 10.8864C80.9505 11.0568 80.71 11.3068 80.532 11.6364C80.3577 11.9621 80.2706 12.3561 80.2706 12.8182ZM32.2436 31.875V30.3636H41.2493V31.875H37.6186V42H35.8686V31.875H32.2436ZM43.103 42V33.2727H44.8018V42H43.103ZM43.9609 31.9261C43.6655 31.9261 43.4117 31.8277 43.1996 31.6307C42.9912 31.4299 42.8871 31.1913 42.8871 30.9148C42.8871 30.6345 42.9912 30.3958 43.1996 30.1989C43.4117 29.9981 43.6655 29.8977 43.9609 29.8977C44.2564 29.8977 44.5083 29.9981 44.7166 30.1989C44.9287 30.3958 45.0348 30.6345 45.0348 30.9148C45.0348 31.1913 44.9287 31.4299 44.7166 31.6307C44.5083 31.8277 44.2564 31.9261 43.9609 31.9261ZM51.1612 33.2727V34.6364H46.3942V33.2727H51.1612ZM47.6726 31.1818H49.3714V39.4375C49.3714 39.767 49.4207 40.0152 49.5192 40.1818C49.6177 40.3447 49.7446 40.4564 49.8999 40.517C50.0589 40.5739 50.2313 40.6023 50.4169 40.6023C50.5533 40.6023 50.6726 40.5928 50.7749 40.5739C50.8771 40.5549 50.9567 40.5398 51.0135 40.5284L51.3203 41.9318C51.2218 41.9697 51.0817 42.0076 50.8999 42.0455C50.718 42.0871 50.4908 42.1098 50.218 42.1136C49.7711 42.1212 49.3544 42.0417 48.968 41.875C48.5817 41.7083 48.2692 41.4508 48.0305 41.1023C47.7919 40.7538 47.6726 40.3163 47.6726 39.7898V31.1818ZM54.9268 30.3636V42H53.228V30.3636H54.9268ZM60.9737 42.1761C60.1139 42.1761 59.3733 41.9924 58.7521 41.625C58.1347 41.2538 57.6574 40.733 57.3203 40.0625C56.987 39.3883 56.8203 38.5985 56.8203 37.6932C56.8203 36.7992 56.987 36.0114 57.3203 35.3295C57.6574 34.6477 58.1271 34.1155 58.7294 33.733C59.3355 33.3504 60.0438 33.1591 60.8544 33.1591C61.3468 33.1591 61.8241 33.2405 62.2862 33.4034C62.7483 33.5663 63.1631 33.822 63.5305 34.1705C63.898 34.5189 64.1877 34.9716 64.3999 35.5284C64.612 36.0814 64.718 36.7538 64.718 37.5455V38.1477H57.7805V36.875H63.0533C63.0533 36.428 62.9624 36.0322 62.7805 35.6875C62.5987 35.339 62.343 35.0644 62.0135 34.8636C61.6877 34.6629 61.3052 34.5625 60.8658 34.5625C60.3885 34.5625 59.9718 34.6799 59.6158 34.9148C59.2635 35.1458 58.9908 35.4489 58.7976 35.8239C58.6082 36.1951 58.5135 36.5985 58.5135 37.0341V38.0284C58.5135 38.6117 58.6158 39.108 58.8203 39.517C59.0286 39.9261 59.3184 40.2386 59.6896 40.4545C60.0608 40.6667 60.4946 40.7727 60.9908 40.7727C61.3127 40.7727 61.6063 40.7273 61.8714 40.6364C62.1366 40.5417 62.3658 40.4015 62.5589 40.2159C62.7521 40.0303 62.8999 39.8011 63.0021 39.5284L64.6101 39.8182C64.4813 40.2917 64.2502 40.7064 63.9169 41.0625C63.5874 41.4148 63.1726 41.6894 62.6726 41.8864C62.1764 42.0795 61.6101 42.1761 60.9737 42.1761Z" fill="#F9F9F9"/>
8
8
  </svg>
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import o from"../../text/Text.js";import{useCountdown as r}from"../hooks/useCountdownTimer.js";let TextCountdown=m=>{let{dateTime:n,setting:s,styles:i}=m,{typo:u,textAlign:x}=i||{},{conditionText:p,expiredText:f}=s||{},{minutes:l,seconds:T}=r(n),$=e(()=>{let t={typo:u,textAlign:x};return t},[x,u]),d=e(()=>l+T<=0?f:`${p} ${l}:${T<10?0:""}${T}`,[l,T,p,f]);return t(o,{setting:{text:d},styles:$})};export{TextCountdown};
1
+ import{jsx as t}from"react/jsx-runtime";import{useMemo as e}from"react";import o from"../../text/Text.js";import{useCountdown as r}from"../hooks/useCountdownTimer.js";let TextCountdown=m=>{let{dateTime:n,setting:s,styles:i}=m,{typo:u,textAlign:x}=i||{},{conditionText:p,expiredText:f}=s||{},{format:l,isExpried:T}=r(n),d=e(()=>{let t={typo:u,textAlign:x};return t},[x,u]),j=e(()=>T?f:`${p} ${l}`,[T,l,p,f]);return t(o,{setting:{text:j},styles:d})};export{TextCountdown};
@@ -1 +1 @@
1
- import{useState as e,useEffect as t}from"react";let getCountDownTime=e=>new Date(e).getTime()-new Date().getTime(),useCountdown=n=>{let[o,r]=e(getCountDownTime(n));return t(()=>{let e=null;return o>0&&(e=setInterval(()=>{o>0?r(getCountDownTime(n)):e&&(clearInterval(e),e=null)},1e3)),()=>{e&&clearInterval(e)}},[o,n]),t(()=>{r(getCountDownTime(n))},[n]),getReturnValues(o)},getReturnValues=e=>{let t=Math.floor(e/864e5),n=Math.floor(e%864e5/36e5),o=Math.floor(e%36e5/6e4),r=Math.floor(e%6e4/1e3);return{days:t,hours:n,minutes:o,seconds:r}};export{useCountdown};
1
+ import{useState as e,useEffect as t}from"react";let getCountDownTime=e=>new Date(e).getTime()-new Date().getTime(),useCountdown=n=>{let[r,o]=e(getCountDownTime(n));return t(()=>{let e=null;return r>0&&(e=setInterval(()=>{r>0?o(getCountDownTime(n)):e&&(clearInterval(e),e=null)},1e3)),()=>{e&&clearInterval(e)}},[r,n]),t(()=>{o(getCountDownTime(n))},[n]),getReturnValues(r)},getReturnValues=e=>{let t=Math.floor(e/6e4),n=Math.floor(e%6e4/1e3),r=`${t<10?"0":""}${t}:${n<10?"0":""}${n}`;return{isExpried:t+n<=0,format:r}};export{useCountdown};
@@ -1,6 +1,6 @@
1
1
  let config={tag:"PostPurchaseCountdownTimer",label:"Countdown Timer",icon:`<svg width="96" height="48" viewBox="0 0 96 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path opacity="0.96" d="M6.66797 28.1193C6.02592 28.1193 5.47905 27.9446 5.02734 27.5952C4.57564 27.2429 4.23047 26.733 3.99183 26.0653C3.7532 25.3949 3.63388 24.5852 3.63388 23.6364C3.63388 22.6932 3.7532 21.8878 3.99183 21.2202C4.23331 20.5497 4.5799 20.0384 5.03161 19.6861C5.48615 19.331 6.03161 19.1534 6.66797 19.1534C7.30433 19.1534 7.84837 19.331 8.30007 19.6861C8.75462 20.0384 9.10121 20.5497 9.33984 21.2202C9.58132 21.8878 9.70206 22.6932 9.70206 23.6364C9.70206 24.5852 9.58274 25.3949 9.34411 26.0653C9.10547 26.733 8.7603 27.2429 8.30859 27.5952C7.85689 27.9446 7.31001 28.1193 6.66797 28.1193ZM6.66797 27.1818C7.30433 27.1818 7.79865 26.875 8.15092 26.2614C8.5032 25.6477 8.67933 24.7727 8.67933 23.6364C8.67933 22.8807 8.59837 22.2372 8.43643 21.706C8.27734 21.1747 8.04723 20.7699 7.74609 20.4915C7.4478 20.2131 7.08842 20.0739 6.66797 20.0739C6.03729 20.0739 5.54439 20.3849 5.18928 21.0071C4.83416 21.6264 4.65661 22.5028 4.65661 23.6364C4.65661 24.392 4.73615 25.0341 4.89524 25.5625C5.05433 26.0909 5.28303 26.4929 5.58132 26.7685C5.88246 27.044 6.24467 27.1818 6.66797 27.1818ZM14.168 28.1193C13.5259 28.1193 12.979 27.9446 12.5273 27.5952C12.0756 27.2429 11.7305 26.733 11.4918 26.0653C11.2532 25.3949 11.1339 24.5852 11.1339 23.6364C11.1339 22.6932 11.2532 21.8878 11.4918 21.2202C11.7333 20.5497 12.0799 20.0384 12.5316 19.6861C12.9862 19.331 13.5316 19.1534 14.168 19.1534C14.8043 19.1534 15.3484 19.331 15.8001 19.6861C16.2546 20.0384 16.6012 20.5497 16.8398 21.2202C17.0813 21.8878 17.2021 22.6932 17.2021 23.6364C17.2021 24.5852 17.0827 25.3949 16.8441 26.0653C16.6055 26.733 16.2603 27.2429 15.8086 27.5952C15.3569 27.9446 14.81 28.1193 14.168 28.1193ZM14.168 27.1818C14.8043 27.1818 15.2987 26.875 15.6509 26.2614C16.0032 25.6477 16.1793 24.7727 16.1793 23.6364C16.1793 22.8807 16.0984 22.2372 15.9364 21.706C15.7773 21.1747 15.5472 20.7699 15.2461 20.4915C14.9478 20.2131 14.5884 20.0739 14.168 20.0739C13.5373 20.0739 13.0444 20.3849 12.6893 21.0071C12.3342 21.6264 12.1566 22.5028 12.1566 23.6364C12.1566 24.392 12.2362 25.0341 12.3952 25.5625C12.5543 26.0909 12.783 26.4929 13.0813 26.7685C13.3825 27.044 13.7447 27.1818 14.168 27.1818ZM22.9464 26.8835C22.7362 26.8835 22.5558 26.8082 22.4052 26.6577C22.2546 26.5071 22.1793 26.3267 22.1793 26.1165C22.1793 25.9062 22.2546 25.7259 22.4052 25.5753C22.5558 25.4247 22.7362 25.3494 22.9464 25.3494C23.1566 25.3494 23.337 25.4247 23.4876 25.5753C23.6381 25.7259 23.7134 25.9062 23.7134 26.1165C23.7134 26.2557 23.6779 26.3835 23.6069 26.5C23.5387 26.6165 23.4464 26.7102 23.3299 26.7812C23.2163 26.8494 23.0884 26.8835 22.9464 26.8835ZM22.9464 22.4688C22.7362 22.4688 22.5558 22.3935 22.4052 22.2429C22.2546 22.0923 22.1793 21.9119 22.1793 21.7017C22.1793 21.4915 22.2546 21.3111 22.4052 21.1605C22.5558 21.0099 22.7362 20.9347 22.9464 20.9347C23.1566 20.9347 23.337 21.0099 23.4876 21.1605C23.6381 21.3111 23.7134 21.4915 23.7134 21.7017C23.7134 21.8409 23.6779 21.9688 23.6069 22.0852C23.5387 22.2017 23.4464 22.2955 23.3299 22.3665C23.2163 22.4347 23.0884 22.4688 22.9464 22.4688ZM31.7227 28.1193C31.0806 28.1193 30.5337 27.9446 30.082 27.5952C29.6303 27.2429 29.2852 26.733 29.0465 26.0653C28.8079 25.3949 28.6886 24.5852 28.6886 23.6364C28.6886 22.6932 28.8079 21.8878 29.0465 21.2202C29.288 20.5497 29.6346 20.0384 30.0863 19.6861C30.5408 19.331 31.0863 19.1534 31.7227 19.1534C32.359 19.1534 32.9031 19.331 33.3548 19.6861C33.8093 20.0384 34.1559 20.5497 34.3945 21.2202C34.636 21.8878 34.7567 22.6932 34.7567 23.6364C34.7567 24.5852 34.6374 25.3949 34.3988 26.0653C34.1602 26.733 33.815 27.2429 33.3633 27.5952C32.9116 27.9446 32.3647 28.1193 31.7227 28.1193ZM31.7227 27.1818C32.359 27.1818 32.8533 26.875 33.2056 26.2614C33.5579 25.6477 33.734 24.7727 33.734 23.6364C33.734 22.8807 33.6531 22.2372 33.4911 21.706C33.332 21.1747 33.1019 20.7699 32.8008 20.4915C32.5025 20.2131 32.1431 20.0739 31.7227 20.0739C31.092 20.0739 30.5991 20.3849 30.244 21.0071C29.8888 21.6264 29.7113 22.5028 29.7113 23.6364C29.7113 24.392 29.7908 25.0341 29.9499 25.5625C30.109 26.0909 30.3377 26.4929 30.636 26.7685C30.9371 27.044 31.2994 27.1818 31.7227 27.1818ZM39.2227 28.1193C38.5806 28.1193 38.0337 27.9446 37.582 27.5952C37.1303 27.2429 36.7852 26.733 36.5465 26.0653C36.3079 25.3949 36.1886 24.5852 36.1886 23.6364C36.1886 22.6932 36.3079 21.8878 36.5465 21.2202C36.788 20.5497 37.1346 20.0384 37.5863 19.6861C38.0408 19.331 38.5863 19.1534 39.2227 19.1534C39.859 19.1534 40.4031 19.331 40.8548 19.6861C41.3093 20.0384 41.6559 20.5497 41.8945 21.2202C42.136 21.8878 42.2567 22.6932 42.2567 23.6364C42.2567 24.5852 42.1374 25.3949 41.8988 26.0653C41.6602 26.733 41.315 27.2429 40.8633 27.5952C40.4116 27.9446 39.8647 28.1193 39.2227 28.1193ZM39.2227 27.1818C39.859 27.1818 40.3533 26.875 40.7056 26.2614C41.0579 25.6477 41.234 24.7727 41.234 23.6364C41.234 22.8807 41.1531 22.2372 40.9911 21.706C40.832 21.1747 40.6019 20.7699 40.3008 20.4915C40.0025 20.2131 39.6431 20.0739 39.2227 20.0739C38.592 20.0739 38.0991 20.3849 37.744 21.0071C37.3888 21.6264 37.2113 22.5028 37.2113 23.6364C37.2113 24.392 37.2908 25.0341 37.4499 25.5625C37.609 26.0909 37.8377 26.4929 38.136 26.7685C38.4371 27.044 38.7994 27.1818 39.2227 27.1818ZM48.0011 26.8835C47.7908 26.8835 47.6104 26.8082 47.4599 26.6577C47.3093 26.5071 47.234 26.3267 47.234 26.1165C47.234 25.9062 47.3093 25.7259 47.4599 25.5753C47.6104 25.4247 47.7908 25.3494 48.0011 25.3494C48.2113 25.3494 48.3917 25.4247 48.5423 25.5753C48.6928 25.7259 48.7681 25.9062 48.7681 26.1165C48.7681 26.2557 48.7326 26.3835 48.6616 26.5C48.5934 26.6165 48.5011 26.7102 48.3846 26.7812C48.271 26.8494 48.1431 26.8835 48.0011 26.8835ZM48.0011 22.4688C47.7908 22.4688 47.6104 22.3935 47.4599 22.2429C47.3093 22.0923 47.234 21.9119 47.234 21.7017C47.234 21.4915 47.3093 21.3111 47.4599 21.1605C47.6104 21.0099 47.7908 20.9347 48.0011 20.9347C48.2113 20.9347 48.3917 21.0099 48.5423 21.1605C48.6928 21.3111 48.7681 21.4915 48.7681 21.7017C48.7681 21.8409 48.7326 21.9688 48.6616 22.0852C48.5934 22.2017 48.5011 22.2955 48.3846 22.3665C48.271 22.4347 48.1431 22.4688 48.0011 22.4688ZM56.7773 28.1193C56.1353 28.1193 55.5884 27.9446 55.1367 27.5952C54.685 27.2429 54.3398 26.733 54.1012 26.0653C53.8626 25.3949 53.7433 24.5852 53.7433 23.6364C53.7433 22.6932 53.8626 21.8878 54.1012 21.2202C54.3427 20.5497 54.6893 20.0384 55.141 19.6861C55.5955 19.331 56.141 19.1534 56.7773 19.1534C57.4137 19.1534 57.9577 19.331 58.4094 19.6861C58.864 20.0384 59.2106 20.5497 59.4492 21.2202C59.6907 21.8878 59.8114 22.6932 59.8114 23.6364C59.8114 24.5852 59.6921 25.3949 59.4535 26.0653C59.2148 26.733 58.8697 27.2429 58.418 27.5952C57.9663 27.9446 57.4194 28.1193 56.7773 28.1193ZM56.7773 27.1818C57.4137 27.1818 57.908 26.875 58.2603 26.2614C58.6126 25.6477 58.7887 24.7727 58.7887 23.6364C58.7887 22.8807 58.7077 22.2372 58.5458 21.706C58.3867 21.1747 58.1566 20.7699 57.8555 20.4915C57.5572 20.2131 57.1978 20.0739 56.7773 20.0739C56.1467 20.0739 55.6538 20.3849 55.2987 21.0071C54.9435 21.6264 54.766 22.5028 54.766 23.6364C54.766 24.392 54.8455 25.0341 55.0046 25.5625C55.1637 26.0909 55.3924 26.4929 55.6907 26.7685C55.9918 27.044 56.354 27.1818 56.7773 27.1818ZM64.2773 28.1193C63.6353 28.1193 63.0884 27.9446 62.6367 27.5952C62.185 27.2429 61.8398 26.733 61.6012 26.0653C61.3626 25.3949 61.2433 24.5852 61.2433 23.6364C61.2433 22.6932 61.3626 21.8878 61.6012 21.2202C61.8427 20.5497 62.1893 20.0384 62.641 19.6861C63.0955 19.331 63.641 19.1534 64.2773 19.1534C64.9137 19.1534 65.4577 19.331 65.9094 19.6861C66.364 20.0384 66.7106 20.5497 66.9492 21.2202C67.1907 21.8878 67.3114 22.6932 67.3114 23.6364C67.3114 24.5852 67.1921 25.3949 66.9535 26.0653C66.7148 26.733 66.3697 27.2429 65.918 27.5952C65.4663 27.9446 64.9194 28.1193 64.2773 28.1193ZM64.2773 27.1818C64.9137 27.1818 65.408 26.875 65.7603 26.2614C66.1126 25.6477 66.2887 24.7727 66.2887 23.6364C66.2887 22.8807 66.2077 22.2372 66.0458 21.706C65.8867 21.1747 65.6566 20.7699 65.3555 20.4915C65.0572 20.2131 64.6978 20.0739 64.2773 20.0739C63.6467 20.0739 63.1538 20.3849 62.7987 21.0071C62.4435 21.6264 62.266 22.5028 62.266 23.6364C62.266 24.392 62.3455 25.0341 62.5046 25.5625C62.6637 26.0909 62.8924 26.4929 63.1907 26.7685C63.4918 27.044 63.854 27.1818 64.2773 27.1818ZM73.0558 26.8835C72.8455 26.8835 72.6651 26.8082 72.5146 26.6577C72.364 26.5071 72.2887 26.3267 72.2887 26.1165C72.2887 25.9062 72.364 25.7259 72.5146 25.5753C72.6651 25.4247 72.8455 25.3494 73.0558 25.3494C73.266 25.3494 73.4464 25.4247 73.5969 25.5753C73.7475 25.7259 73.8228 25.9062 73.8228 26.1165C73.8228 26.2557 73.7873 26.3835 73.7163 26.5C73.6481 26.6165 73.5558 26.7102 73.4393 26.7812C73.3256 26.8494 73.1978 26.8835 73.0558 26.8835ZM73.0558 22.4688C72.8455 22.4688 72.6651 22.3935 72.5146 22.2429C72.364 22.0923 72.2887 21.9119 72.2887 21.7017C72.2887 21.4915 72.364 21.3111 72.5146 21.1605C72.6651 21.0099 72.8455 20.9347 73.0558 20.9347C73.266 20.9347 73.4464 21.0099 73.5969 21.1605C73.7475 21.3111 73.8228 21.4915 73.8228 21.7017C73.8228 21.8409 73.7873 21.9688 73.7163 22.0852C73.6481 22.2017 73.5558 22.2955 73.4393 22.3665C73.3256 22.4347 73.1978 22.4688 73.0558 22.4688ZM81.832 28.1193C81.19 28.1193 80.6431 27.9446 80.1914 27.5952C79.7397 27.2429 79.3945 26.733 79.1559 26.0653C78.9173 25.3949 78.7979 24.5852 78.7979 23.6364C78.7979 22.6932 78.9173 21.8878 79.1559 21.2202C79.3974 20.5497 79.744 20.0384 80.1957 19.6861C80.6502 19.331 81.1957 19.1534 81.832 19.1534C82.4684 19.1534 83.0124 19.331 83.4641 19.6861C83.9187 20.0384 84.2653 20.5497 84.5039 21.2202C84.7454 21.8878 84.8661 22.6932 84.8661 23.6364C84.8661 24.5852 84.7468 25.3949 84.5082 26.0653C84.2695 26.733 83.9244 27.2429 83.4727 27.5952C83.021 27.9446 82.4741 28.1193 81.832 28.1193ZM81.832 27.1818C82.4684 27.1818 82.9627 26.875 83.315 26.2614C83.6673 25.6477 83.8434 24.7727 83.8434 23.6364C83.8434 22.8807 83.7624 22.2372 83.6005 21.706C83.4414 21.1747 83.2113 20.7699 82.9102 20.4915C82.6119 20.2131 82.2525 20.0739 81.832 20.0739C81.2013 20.0739 80.7085 20.3849 80.3533 21.0071C79.9982 21.6264 79.8207 22.5028 79.8207 23.6364C79.8207 24.392 79.9002 25.0341 80.0593 25.5625C80.2184 26.0909 80.4471 26.4929 80.7454 26.7685C81.0465 27.044 81.4087 27.1818 81.832 27.1818ZM89.332 28.1193C88.69 28.1193 88.1431 27.9446 87.6914 27.5952C87.2397 27.2429 86.8945 26.733 86.6559 26.0653C86.4173 25.3949 86.2979 24.5852 86.2979 23.6364C86.2979 22.6932 86.4173 21.8878 86.6559 21.2202C86.8974 20.5497 87.244 20.0384 87.6957 19.6861C88.1502 19.331 88.6957 19.1534 89.332 19.1534C89.9684 19.1534 90.5124 19.331 90.9641 19.6861C91.4187 20.0384 91.7653 20.5497 92.0039 21.2202C92.2454 21.8878 92.3661 22.6932 92.3661 23.6364C92.3661 24.5852 92.2468 25.3949 92.0082 26.0653C91.7695 26.733 91.4244 27.2429 90.9727 27.5952C90.521 27.9446 89.9741 28.1193 89.332 28.1193ZM89.332 27.1818C89.9684 27.1818 90.4627 26.875 90.815 26.2614C91.1673 25.6477 91.3434 24.7727 91.3434 23.6364C91.3434 22.8807 91.2624 22.2372 91.1005 21.706C90.9414 21.1747 90.7113 20.7699 90.4102 20.4915C90.1119 20.2131 89.7525 20.0739 89.332 20.0739C88.7013 20.0739 88.2085 20.3849 87.8533 21.0071C87.4982 21.6264 87.3207 22.5028 87.3207 23.6364C87.3207 24.392 87.4002 25.0341 87.5593 25.5625C87.7184 26.0909 87.9471 26.4929 88.2454 26.7685C88.5465 27.044 88.9087 27.1818 89.332 27.1818Z" fill="#F9F9F9"></path>
3
- </svg>`,settings:[{id:"setting",controls:[{id:"conditionGroup",type:"group",label:"Condition",controls:[{id:"conditionText",label:"Message",type:"input",default:"Offer expires in:"},{id:"expired",label:"Expired after",type:"input:unit",units:["min"],useOnlyUnitInit:!0,default:"1",max:60}]},{id:"expiredGroup",type:"group",label:"After expiry",controls:[{id:"expiredText",label:"Message",type:"input",default:"Offer expired"},{id:"whenTimeOut",label:"When time out",type:"select",options:[{value:"next-offer",label:"Show next offer"},{value:"hide-offer",label:"Hide offer"},{value:"thank-you",label:"Go to thank you"}],default:"next-offer"}]}]},{id:"style",controls:[{id:"bgColor",label:"Background color",type:"select",options:[{label:"Blue",value:"info",svgIcon:`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ </svg>`,settings:[{id:"setting",controls:[{id:"conditionGroup",type:"group",label:"Condition",controls:[{id:"conditionText",label:"Message",type:"input",default:"Offer expires in:"},{id:"expired",label:"Expired after",type:"input:unit",units:["min"],useOnlyUnitInit:!0,default:"1"}]},{id:"expiredGroup",type:"group",label:"After expiry",controls:[{id:"expiredText",label:"Message",type:"input",default:"Offer expired"},{id:"whenTimeOut",label:"When time out",type:"select",options:[{value:"next-offer",label:"Show next offer"},{value:"hide-offer",label:"Hide offer"},{value:"thank-you",label:"Go to thank you"}],default:"next-offer"}]}]},{id:"style",controls:[{id:"bgColor",label:"Background color",type:"select",options:[{label:"Blue",value:"info",svgIcon:`<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
4
4
  <circle cx="10" cy="9.99994" r="10" fill="#D1E6F5"/>
5
5
  <circle cx="10" cy="9.99994" r="9.5" stroke="white" stroke-opacity="0.2"/>
6
6
  </svg>
@@ -16,7 +16,7 @@ let config={tag:"PostPurchaseCountdownTimer",label:"Countdown Timer",icon:`<svg
16
16
  <circle cx="10" cy="9.99994" r="10" fill="#FFF8E0"/>
17
17
  <circle cx="10" cy="9.99994" r="9.5" stroke="white" stroke-opacity="0.2"/>
18
18
  </svg>
19
- `}],default:"default"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"xlarge",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"left"},{id:"width",type:"input:unit-width",label:"Width",min:0,units:["px","%"],devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",icon:`<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
19
+ `}],default:"info"},{id:"typo",label:"Label",type:"typography-post-purchase",default:{fontSize:"xlarge",textColor:"default",fontWeight:"bold",textTransform:"none"}},{id:"textAlign",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left"},{label:"Center",value:"center",type:"align",tooltip:"Align center"},{label:"Right",value:"right",type:"align",tooltip:"Align right"}],default:"left"},{id:"width",type:"input:unit-width",label:"Width",min:0,units:["px","%"],devices:{desktop:{default:"100%"},tablet:{default:"100%"},mobile:{default:"100%"}}},{id:"align",label:"Alignment",type:"segment",options:[{label:"Left",value:"left",type:"align",icon:`<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
20
20
  <path d="M3.47916 1.25C3.82434 1.25 4.10416 1.52982 4.10416 1.875L4.10416 18.125C4.10416 18.4702 3.82434 18.75 3.47916 18.75C3.13399 18.75 2.85416 18.4702 2.85416 18.125L2.85416 1.875C2.85416 1.52982 3.13399 1.25 3.47916 1.25Z" fill="currentColor"/>
21
21
  <path fill-rule="evenodd" clip-rule="evenodd" d="M4.72916 6.25C4.72916 5.21447 5.56863 4.375 6.60416 4.375H12.8542C13.8897 4.375 14.7292 5.21447 14.7292 6.25V7.5C14.7292 8.53553 13.8897 9.375 12.8542 9.375H6.60416C5.56863 9.375 4.72916 8.53553 4.72916 7.5V6.25ZM6.60416 5.625C6.25899 5.625 5.97916 5.90482 5.97916 6.25V7.5C5.97916 7.84518 6.25899 8.125 6.60416 8.125H12.8542C13.1993 8.125 13.4792 7.84518 13.4792 7.5V6.25C13.4792 5.90482 13.1993 5.625 12.8542 5.625H6.60416Z" fill="currentColor"/>
22
22
  <path fill-rule="evenodd" clip-rule="evenodd" d="M6.60416 10.625C5.56863 10.625 4.72916 11.4645 4.72916 12.5V13.75C4.72916 14.7855 5.56863 15.625 6.60416 15.625H16.6042C17.6397 15.625 18.4792 14.7855 18.4792 13.75V12.5C18.4792 11.4645 17.6397 10.625 16.6042 10.625H6.60416ZM5.97916 12.5C5.97916 12.1548 6.25899 11.875 6.60416 11.875H16.6042C16.9493 11.875 17.2292 12.1548 17.2292 12.5V13.75C17.2292 14.0952 16.9493 14.375 16.6042 14.375H6.60416C6.25899 14.375 5.97916 14.0952 5.97916 13.75V12.5Z" fill="currentColor"/>
@@ -67,7 +67,7 @@ ${s(i,'<script src="{{ \'gp-product.v2.js\' | asset_url }}" defer="defer"></scri
67
67
  assign target_collection = null
68
68
  assign productSrc = '${O}'
69
69
  assign c = 0
70
- assign limit = ${k&&"latest"==T?b?.numOfSelectedProducts||4:A}
70
+ assign limit = ${k&&"latest"===T?"RelatedProduct"===O?A:b?.numOfSelectedProducts||4:A}
71
71
  if request.page_type == 'collection' or preview_page_type == 'collection'
72
72
  assign target_collection = collection
73
73
  if target_collection == empty or target_collection == null
@@ -94,86 +94,90 @@ ${s(i,'<script src="{{ \'gp-product.v2.js\' | asset_url }}" defer="defer"></scri
94
94
  assign idAssignProduct = assignProduct.id
95
95
  assign allProducts = collections.all.products
96
96
 
97
- if relatedTag == 'collection'
98
- for collection in collections
99
- assign collectionId = collection.id
100
- assign isInCollection = false
101
- assign collectionsAssignProduct = assignProduct.collections
102
- for item in collectionsAssignProduct
103
- if item.id == collectionId
104
- assign isInCollection = true
97
+ if relatedTag == 'collection'
98
+ for collection in collections
99
+ assign collectionId = collection.id
100
+ assign isInCollection = false
101
+ assign collectionsAssignProduct = assignProduct.collections
102
+ for item in collectionsAssignProduct
103
+ if item.id == collectionId
104
+ assign isInCollection = true
105
+ endif
106
+ endfor
107
+ if isInCollection
108
+ for item in allProducts
109
+ assign handle = item.handle
110
+ assign productF = all_products[handle] | sort
111
+ assign idOfProduct = all_products[handle].id
112
+ for product in collection.products
113
+ assign productCollectionId = product.id
114
+ unless arrayListProducts contains handle
115
+ if productCollectionId == idOfProduct and idAssignProduct != idOfProduct
116
+ assign products = products | concat: productF
117
+ if stringListProducts.size > 0
118
+ assign stringListProducts = stringListProducts | append: ', '
119
+ endif
120
+ assign stringListProducts = stringListProducts | append: handle
121
+ assign arrayListProducts = stringListProducts | split: ", "
122
+ endif
123
+ endunless
124
+ endfor
125
+ endfor
105
126
  endif
106
127
  endfor
107
- if isInCollection
108
- for item in allProducts
109
- assign handle = item.handle
110
- assign productF = all_products[handle] | sort
111
- assign idOfProduct = all_products[handle].id
112
- for product in collection.products
113
- assign productCollectionId = product.id
114
- unless arrayListProducts contains handle
115
- if productCollectionId == idOfProduct and idAssignProduct != idOfProduct
116
- assign products = products | concat: productF
117
- if stringListProducts.size > 0
118
- assign stringListProducts = stringListProducts | append: ', '
119
- endif
120
- assign stringListProducts = stringListProducts | append: handle
121
- assign arrayListProducts = stringListProducts | split: ", "
122
- endif
123
- endunless
124
- endfor
125
- endfor
126
- endif
127
- endfor
128
- endif
129
-
130
- if relatedTag == 'vendor'
131
- assign vendorAssignProduct = assignProduct.vendor
132
- for item in allProducts
133
- assign handle = item.handle
134
- assign productF = all_products[handle] | sort
135
- assign vendorOfProduct = all_products[handle].vendor
136
- assign idOfProduct = all_products[handle].id
137
- if vendorOfProduct == vendorAssignProduct and idAssignProduct != idOfProduct
138
- assign products = products | concat: productF
139
- endif
140
- endfor
141
- endif
128
+ endif
142
129
 
143
- if relatedTag == 'production-type'
144
- assign typeAssignProduct = assignProduct.type
145
- for item in allProducts
146
- assign handle = item.handle
147
- assign productF = all_products[handle] | sort
148
- assign typeOfProduct = all_products[handle].type
149
- assign idOfProduct = all_products[handle].id
150
- if typeOfProduct == typeAssignProduct and idAssignProduct != idOfProduct
151
- assign products = products | concat: productF
152
- endif
153
- endfor
154
- endif
155
- if relatedTag == 'tags'
156
- assign tagsAssignProduct = assignProduct.tags
157
- for item in allProducts
158
- assign handle = item.handle
159
- assign productF = all_products[handle] | sort
160
- assign tagsOfProduct = all_products[handle].tags
130
+ if relatedTag == 'vendor'
131
+ assign vendorAssignProduct = assignProduct.vendor
132
+ for item in allProducts
133
+ assign handle = item.handle
134
+ assign productF = all_products[handle] | sort
135
+ assign vendorOfProduct = all_products[handle].vendor
161
136
  assign idOfProduct = all_products[handle].id
162
- for tag in tagsAssignProduct
163
- assign tagItem = tag
164
- unless arrayListProducts contains handle
165
- if tagsOfProduct contains tagItem and idAssignProduct != idOfProduct
166
- assign products = products | concat: productF
167
- if stringListProducts.size > 0
168
- assign stringListProducts = stringListProducts | append: ', '
169
- endif
170
- assign stringListProducts = stringListProducts | append: handle
171
- assign arrayListProducts = stringListProducts | split: ", "
172
- endif
173
- endunless
174
- endfor
175
- endfor
176
- endif
137
+ if vendorOfProduct == vendorAssignProduct and idAssignProduct != idOfProduct
138
+ assign products = products | concat: productF
139
+ endif
140
+ endfor
141
+ endif
142
+
143
+ if relatedTag == 'production-type'
144
+ assign typeAssignProduct = assignProduct.type
145
+ for item in allProducts
146
+ assign handle = item.handle
147
+ assign productF = all_products[handle] | sort
148
+ assign typeOfProduct = all_products[handle].type
149
+ assign idOfProduct = all_products[handle].id
150
+ if typeOfProduct == typeAssignProduct and idAssignProduct != idOfProduct
151
+ assign products = products | concat: productF
152
+ endif
153
+ endfor
154
+ endif
155
+
156
+ if relatedTag == 'tags'
157
+ assign tagsAssignProduct = assignProduct.tags
158
+ for item in allProducts
159
+ assign handle = item.handle
160
+ assign productF = all_products[handle] | sort
161
+ assign tagsOfProduct = all_products[handle].tags
162
+ assign idOfProduct = all_products[handle].id
163
+ for tag in tagsAssignProduct
164
+ assign tagItem = tag
165
+ unless arrayListProducts contains handle
166
+ if tagsOfProduct contains tagItem and idAssignProduct != idOfProduct
167
+ assign products = products | concat: productF
168
+ if stringListProducts.size > 0
169
+ assign stringListProducts = stringListProducts | append: ', '
170
+ endif
171
+ assign stringListProducts = stringListProducts | append: handle
172
+ assign arrayListProducts = stringListProducts | split: ", "
173
+ endif
174
+ endunless
175
+ endfor
176
+ endfor
177
+ endif
178
+ paginate products by ${A||4}
179
+ assign products = products
180
+ endpaginate
177
181
  else if productSrc == 'PickProduct'
178
182
  unless ${I}
179
183
  assign products = null | sort
@@ -613,6 +613,7 @@ type CollectionBannerProps = BasePropsWrap<Setting$7> & {
613
613
  declare const CollectionBanner$1: ({ builderAttrs, builderProps, setting, style, children, }: CollectionBannerProps) => React.JSX.Element;
614
614
 
615
615
  type CollectionTitleProps = BaseProps<{
616
+ htmlTag?: React.ElementType;
616
617
  textAlign?: ObjectDevices<AlignProp>;
617
618
  /**
618
619
  * @deprecated please use color inside `typo` instead
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "2.0.0-dev.845",
3
+ "version": "2.0.0-dev.848",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",