@gem-sdk/components 21.0.0 → 21.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../../common/helpers.js");const t=[{id:"setting",controls:[{id:"layout",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:"Layout",enableItemOpacity:!0,options:[{label:"Icon & Text",value:"icon-and-text",type:"p-image-layout",iconName:"gp-stock-counter-icon-and-text"},{label:"Text only",value:"text-only",type:"p-image-layout",iconName:"gp-stock-counter-text-only"}],default:"
|
|
1
|
+
"use strict";var e=require("../../common/helpers.js");const t=[{id:"setting",controls:[{id:"layout",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:"Layout",enableItemOpacity:!0,options:[{label:"Icon & Text",value:"icon-and-text",type:"p-image-layout",iconName:"gp-stock-counter-icon-and-text"},{label:"Text only",value:"text-only",type:"p-image-layout",iconName:"gp-stock-counter-text-only"}],default:"icon-and-text"},{id:"displayCondition",label:"Display Condition",type:"group",controls:[{id:"displayByDefault",label:"Display By Default",type:"select",options:[{label:"Always show",value:!0},{label:"Show if under",value:!1}],default:!0},{id:"scarcityThreshold",label:"Scarcity Threshold",type:"input:stepper",default:e.DEFAULT_SCARCITY_THRESHOLD,info:"Only show if inventory quantity less than or equal to the above number."}]},{id:"oosIcon",label:"",type:"icon",default:'<svg data-name="package-regular" style="width: 100%; height: 100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32l80.34,44-29.77,16.3-80.35-44ZM128,120,47.66,76l33.9-18.56,80.34,44ZM40,90l80,43.78v85.79L40,175.82Zm176,85.78h0l-80,43.79V133.82l32-17.51V152a8,8,0,0,0,16,0V107.55L216,90v85.77Z"></path></svg>'},{id:"hiddenCounterWhenOutOfStock",type:"select",options:[{value:!1,label:"Show message"},{value:!0,label:"Hide counter"}],default:!1},{id:"message",label:"Message",type:"group",controls:[{id:"template",label:"Template",type:"textarea",autoHeight:!0,showPlusBtn:!0,default:`Only ${e.DEFAULT_QUANTITY_TEMPLATE} left`,info:`Use ${e.DEFAULT_QUANTITY_TEMPLATE} to represent remaining number`,minHeight:56,suggestContents:[{message:"%number%",eg:"E.g: Only 2 left"}]},{id:"outOfStockMessage",label:"Out Of Stock Message",type:"input",default:"OUT OF STOCK"},{id:"continueSelling",label:"Continue Selling When Out Of Stock Message",type:"textarea",autoHeight:!0,default:"Restock soon! PREORDER NOW",info:"Turn out-of-stock productions into pre-orders"},{id:"unlimitedQuantityMessage",label:"Unlimited Quantity Message",type:"textarea",autoHeight:!0,default:"Hurry! LET BUY NOW"}]},{id:"icon",label:"Icon",type:"group",controls:[{id:"showIcon",label:"Show Icon",type:"toggle",default:!0},{id:"icon",label:"",type:"icon",default:`<svg height="20px" width="20px" data-name="lightning-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817742720598376">
|
|
2
2
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"></path></svg>`}]},{id:"progressBarPosition",type:"option:value",options:[{value:"top",label:"Top"},{value:"bottom",label:"Bottom"}],default:"bottom"},{id:"iconPosition",type:"option:value",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}],default:"left"},{id:"iconSize",type:"input:stepper",allowEmptyValue:!0,placeholder:"Enter size",devices:{desktop:{default:16}}},{id:"remainingPercentage",label:"Remaining Percentage (%)",type:"input:slider",default:e.DEFAULT_REMAINING_PERCENT,min:e.MIN_REMAINING_PERCENT,max:e.MAX_REMAINING_PERCENT,step:e.DEFAULT_RANGE_STEP,units:["%"],showDefaultUnit:!0,isNumber:!0,useOnlyUnitInit:!0}]},{id:"style",controls:[{id:"dimension",label:"Dimension",type:"group",controls:[{id:"fullWidth",label:"Full width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"100%"}}},{id:"alignment",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"display",label:"Display",type:"group",controls:[{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColor",label:"Text Color",type:"color-picker-v2",default:"text-2"},{id:"color",label:"Color",type:"color-picker-v2",default:"line-3"},{id:"iconColor",label:"Color",type:"color-picker-v2",default:"text-2"},{id:"oosIconColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"},{id:"oosTextColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"}]},{id:"progressBar",label:"Progress Bar",type:"group",controls:[{id:"displayProgressBar",label:"Display",type:"toggle",default:!0},{id:"progressBarHeight",type:"input:stepper",min:5,max:20,devices:{desktop:{default:10}}},{id:"roundedBorder",label:"Rounded Border",type:"toggle",default:!0},{id:"effect",label:"Effect",type:"toggle",default:!0}]},{id:"borderRadius",type:"corner-v2",default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"},compoDefaultValue:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}]}];exports.StockCounterSettingsV2=t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{DEFAULT_SCARCITY_THRESHOLD as e,DEFAULT_QUANTITY_TEMPLATE as t,DEFAULT_RANGE_STEP as l,MAX_REMAINING_PERCENT as o,MIN_REMAINING_PERCENT as a,DEFAULT_REMAINING_PERCENT as i}from"../../common/helpers.js";let n=[{id:"setting",controls:[{id:"layout",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:"Layout",enableItemOpacity:!0,options:[{label:"Icon & Text",value:"icon-and-text",type:"p-image-layout",iconName:"gp-stock-counter-icon-and-text"},{label:"Text only",value:"text-only",type:"p-image-layout",iconName:"gp-stock-counter-text-only"}],default:"
|
|
1
|
+
import{DEFAULT_SCARCITY_THRESHOLD as e,DEFAULT_QUANTITY_TEMPLATE as t,DEFAULT_RANGE_STEP as l,MAX_REMAINING_PERCENT as o,MIN_REMAINING_PERCENT as a,DEFAULT_REMAINING_PERCENT as i}from"../../common/helpers.js";let n=[{id:"setting",controls:[{id:"layout",label:"layout",type:"layout-selector",iconViewBox:"0 0 72 72",enableItemBackground:!0,itemPerRow:2,itemSpacing:"large",popoverLabel:"Layout",enableItemOpacity:!0,options:[{label:"Icon & Text",value:"icon-and-text",type:"p-image-layout",iconName:"gp-stock-counter-icon-and-text"},{label:"Text only",value:"text-only",type:"p-image-layout",iconName:"gp-stock-counter-text-only"}],default:"icon-and-text"},{id:"displayCondition",label:"Display Condition",type:"group",controls:[{id:"displayByDefault",label:"Display By Default",type:"select",options:[{label:"Always show",value:!0},{label:"Show if under",value:!1}],default:!0},{id:"scarcityThreshold",label:"Scarcity Threshold",type:"input:stepper",default:e,info:"Only show if inventory quantity less than or equal to the above number."}]},{id:"oosIcon",label:"",type:"icon",default:'<svg data-name="package-regular" style="width: 100%; height: 100%" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32l80.34,44-29.77,16.3-80.35-44ZM128,120,47.66,76l33.9-18.56,80.34,44ZM40,90l80,43.78v85.79L40,175.82Zm176,85.78h0l-80,43.79V133.82l32-17.51V152a8,8,0,0,0,16,0V107.55L216,90v85.77Z"></path></svg>'},{id:"hiddenCounterWhenOutOfStock",type:"select",options:[{value:!1,label:"Show message"},{value:!0,label:"Hide counter"}],default:!1},{id:"message",label:"Message",type:"group",controls:[{id:"template",label:"Template",type:"textarea",autoHeight:!0,showPlusBtn:!0,default:`Only ${t} left`,info:`Use ${t} to represent remaining number`,minHeight:56,suggestContents:[{message:"%number%",eg:"E.g: Only 2 left"}]},{id:"outOfStockMessage",label:"Out Of Stock Message",type:"input",default:"OUT OF STOCK"},{id:"continueSelling",label:"Continue Selling When Out Of Stock Message",type:"textarea",autoHeight:!0,default:"Restock soon! PREORDER NOW",info:"Turn out-of-stock productions into pre-orders"},{id:"unlimitedQuantityMessage",label:"Unlimited Quantity Message",type:"textarea",autoHeight:!0,default:"Hurry! LET BUY NOW"}]},{id:"icon",label:"Icon",type:"group",controls:[{id:"showIcon",label:"Show Icon",type:"toggle",default:!0},{id:"icon",label:"",type:"icon",default:`<svg height="20px" width="20px" data-name="lightning-filled" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508817742720598376">
|
|
2
2
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"></path></svg>`}]},{id:"progressBarPosition",type:"option:value",options:[{value:"top",label:"Top"},{value:"bottom",label:"Bottom"}],default:"bottom"},{id:"iconPosition",type:"option:value",options:[{value:"left",label:"Left"},{value:"right",label:"Right"}],default:"left"},{id:"iconSize",type:"input:stepper",allowEmptyValue:!0,placeholder:"Enter size",devices:{desktop:{default:16}}},{id:"remainingPercentage",label:"Remaining Percentage (%)",type:"input:slider",default:i,min:a,max:o,step:l,units:["%"],showDefaultUnit:!0,isNumber:!0,useOnlyUnitInit:!0}]},{id:"style",controls:[{id:"dimension",label:"Dimension",type:"group",controls:[{id:"fullWidth",label:"Full width",type:"toggle",devices:{desktop:{default:!0}}},{id:"width",label:"Width",type:"input:unit",units:["px","%"],devices:{desktop:{default:"100%"}}},{id:"alignment",label:"Alignment",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"left"}}}]},{id:"display",label:"Display",type:"group",controls:[{id:"typo",type:"typography-v2",label:"Typography",default:{type:"paragraph-1",attrs:{color:"text-1"}},ignoreReRender:!0,hiddenSetting:{textAlign:!0}},{id:"textColor",label:"Text Color",type:"color-picker-v2",default:"text-2"},{id:"color",label:"Color",type:"color-picker-v2",default:"line-3"},{id:"iconColor",label:"Color",type:"color-picker-v2",default:"text-2"},{id:"oosIconColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"},{id:"oosTextColor",label:"Color",type:"color-picker-v2",default:"#DDDDDD"}]},{id:"progressBar",label:"Progress Bar",type:"group",controls:[{id:"displayProgressBar",label:"Display",type:"toggle",default:!0},{id:"progressBarHeight",type:"input:stepper",min:5,max:20,devices:{desktop:{default:10}}},{id:"roundedBorder",label:"Rounded Border",type:"toggle",default:!0},{id:"effect",label:"Effect",type:"toggle",default:!0}]},{id:"borderRadius",type:"corner-v2",default:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"},compoDefaultValue:{btrr:"99999px",bblr:"99999px",bbrr:"99999px",btlr:"99999px",radiusType:"circle"}}]}];export{n as StockCounterSettingsV2};
|