@ikas/popup-renderer 1.0.108 → 1.0.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +1 -1
- package/build/popup-renderer/components/form-element-renderer/input-item-view/index.js +1 -1
- package/build/popup-renderer/models/modal/background-settings/index.js +1 -1
- package/build/popup-renderer/models/modal/close-settings/index.js +1 -1
- package/build/popup-renderer/models/modal/index.d.ts +2 -0
- package/build/popup-renderer/models/modal/index.js +1 -1
- package/build/popup-renderer/models/modal/step/elements/image/index.js +1 -1
- package/build/popup-renderer/models/modal/step/elements/image-column/index.js +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as PopupRenderer}from"./popup-renderer/components/index.js";import*as e from"./popup-renderer/helpers/index.js";export{e as PopupHelpers};export{MOBILE_SCREEN_SIZE,Popup,PreviewType}from"./popup-renderer/models/index.js";export{DeviceTypeEnum,PopupSettings}from"./popup-renderer/models/settings/index.js";export{VisibilityTime}from"./popup-renderer/models/settings/visibility-time/index.js";export{VisibilityCondition,VisibilityConditionTypeEnum}from"./popup-renderer/models/settings/visibility-condition/index.js";export{Modal,PopupPositonEnum,PopupTypeEnum}from"./popup-renderer/models/modal/index.js";export{WindowSettings}from"./popup-renderer/models/modal/window-settings/index.js";export{Teaser,VisibilityConditionEnum}from"./popup-renderer/models/modal/teaser/index.js";export{PopupStep}from"./popup-renderer/models/modal/step/index.js";export{BaseElement,ComponentHorizontalAlignmentEnum,ComponentVerticalAlignmentEnum,IkasPopupRendererFontFamily,PopupElementTypeEnum}from"./popup-renderer/models/modal/step/elements/base/index.js";export{ButtonElement}from"./popup-renderer/models/modal/step/elements/button/index.js";export{DividerElement}from"./popup-renderer/models/modal/step/elements/divider/index.js";export{FormColumn,FormElement,FormItemTypeEnum,FormRow,InputLabel,InputPlaceholder,RequiredInput}from"./popup-renderer/models/modal/step/elements/form/index.js";export{CheckboxFormItem,ContactPermission,ContactPermissionTypeEnum}from"./popup-renderer/models/modal/step/elements/form/checkbox/index.js";export{CustomerAttributeFormItem,CustomerAttributeTypeEnum}from"./popup-renderer/models/modal/step/elements/form/customer-attribute/index.js";export{CustomerBirthdayFormItem}from"./popup-renderer/models/modal/step/elements/form/customer-birthday/index.js";export{CustomerEmailFormItem,ValidEmailError}from"./popup-renderer/models/modal/step/elements/form/customer-email/index.js";export{CustomerGenderFormItem,CustomerGenderTypeEnum,GenderType}from"./popup-renderer/models/modal/step/elements/form/customer-gender/index.js";export{CustomerNameFormItem}from"./popup-renderer/models/modal/step/elements/form/customer-name/index.js";export{CustomerPhoneFormItem,ValidPhoneError}from"./popup-renderer/models/modal/step/elements/form/customer-phone/index.js";export{CustomerSurnameFormItem}from"./popup-renderer/models/modal/step/elements/form/customer-surname/index.js";export{FormInputSettings,FormSettings}from"./popup-renderer/models/modal/step/elements/form/form-settings/index.js";export{IMAGE_SIZE,ImageElement,ImageFitEnum,ImagePositionEnum}from"./popup-renderer/models/modal/step/elements/image/index.js";export{ImageColumnElement,ImageColumnPositionEnum,MobileImageColumnPositionEnum}from"./popup-renderer/models/modal/step/elements/image-column/index.js";export{MAX_PRODUCT_COUNT,PopupProduct,PopupVariantPair,ProductListElement,ProductListLayoutEnum,ProductListSortTypeEnum,ProductListTypeEnum}from"./popup-renderer/models/modal/step/elements/product/index.js";export{ProductActionTypeEnum,ProductButtonSettings,ProductDetailSettings,ProductDiscountRatioSettings,ProductImageSettings}from"./popup-renderer/models/modal/step/elements/product/detail-settings/index.js";export{SocialMediaElement,SocialMediaLink,SocialMediaTypeEnum}from"./popup-renderer/models/modal/step/elements/social/index.js";export{SpaceElement}from"./popup-renderer/models/modal/step/elements/space/index.js";export{TextElement}from"./popup-renderer/models/modal/step/elements/text/index.js";export{BackgroundSettings,Border,ButtonBorderStyle,Overlay,Shadow}from"./popup-renderer/models/modal/background-settings/index.js";export{CloseButtonDisplayTypeEnum,CloseButtonPositionTypeEnum,CloseIconSettings,CloseIconTypeEnum,CloseSettings}from"./popup-renderer/models/modal/close-settings/index.js";
|
|
1
|
+
export{default as PopupRenderer}from"./popup-renderer/components/index.js";import*as e from"./popup-renderer/helpers/index.js";export{e as PopupHelpers};export{MOBILE_SCREEN_SIZE,Popup,PreviewType}from"./popup-renderer/models/index.js";export{DeviceTypeEnum,PopupSettings}from"./popup-renderer/models/settings/index.js";export{VisibilityTime}from"./popup-renderer/models/settings/visibility-time/index.js";export{VisibilityCondition,VisibilityConditionTypeEnum}from"./popup-renderer/models/settings/visibility-condition/index.js";export{Modal,POPUP_DEFAULT_IMAGE_PATH,PopupPositonEnum,PopupTypeEnum}from"./popup-renderer/models/modal/index.js";export{WindowSettings}from"./popup-renderer/models/modal/window-settings/index.js";export{Teaser,VisibilityConditionEnum}from"./popup-renderer/models/modal/teaser/index.js";export{PopupStep}from"./popup-renderer/models/modal/step/index.js";export{BaseElement,ComponentHorizontalAlignmentEnum,ComponentVerticalAlignmentEnum,IkasPopupRendererFontFamily,PopupElementTypeEnum}from"./popup-renderer/models/modal/step/elements/base/index.js";export{ButtonElement}from"./popup-renderer/models/modal/step/elements/button/index.js";export{DividerElement}from"./popup-renderer/models/modal/step/elements/divider/index.js";export{FormColumn,FormElement,FormItemTypeEnum,FormRow,InputLabel,InputPlaceholder,RequiredInput}from"./popup-renderer/models/modal/step/elements/form/index.js";export{CheckboxFormItem,ContactPermission,ContactPermissionTypeEnum}from"./popup-renderer/models/modal/step/elements/form/checkbox/index.js";export{CustomerAttributeFormItem,CustomerAttributeTypeEnum}from"./popup-renderer/models/modal/step/elements/form/customer-attribute/index.js";export{CustomerBirthdayFormItem}from"./popup-renderer/models/modal/step/elements/form/customer-birthday/index.js";export{CustomerEmailFormItem,ValidEmailError}from"./popup-renderer/models/modal/step/elements/form/customer-email/index.js";export{CustomerGenderFormItem,CustomerGenderTypeEnum,GenderType}from"./popup-renderer/models/modal/step/elements/form/customer-gender/index.js";export{CustomerNameFormItem}from"./popup-renderer/models/modal/step/elements/form/customer-name/index.js";export{CustomerPhoneFormItem,ValidPhoneError}from"./popup-renderer/models/modal/step/elements/form/customer-phone/index.js";export{CustomerSurnameFormItem}from"./popup-renderer/models/modal/step/elements/form/customer-surname/index.js";export{FormInputSettings,FormSettings}from"./popup-renderer/models/modal/step/elements/form/form-settings/index.js";export{IMAGE_SIZE,ImageElement,ImageFitEnum,ImagePositionEnum}from"./popup-renderer/models/modal/step/elements/image/index.js";export{ImageColumnElement,ImageColumnPositionEnum,MobileImageColumnPositionEnum}from"./popup-renderer/models/modal/step/elements/image-column/index.js";export{MAX_PRODUCT_COUNT,PopupProduct,PopupVariantPair,ProductListElement,ProductListLayoutEnum,ProductListSortTypeEnum,ProductListTypeEnum}from"./popup-renderer/models/modal/step/elements/product/index.js";export{ProductActionTypeEnum,ProductButtonSettings,ProductDetailSettings,ProductDiscountRatioSettings,ProductImageSettings}from"./popup-renderer/models/modal/step/elements/product/detail-settings/index.js";export{SocialMediaElement,SocialMediaLink,SocialMediaTypeEnum}from"./popup-renderer/models/modal/step/elements/social/index.js";export{SpaceElement}from"./popup-renderer/models/modal/step/elements/space/index.js";export{TextElement}from"./popup-renderer/models/modal/step/elements/text/index.js";export{BackgroundSettings,Border,ButtonBorderStyle,Overlay,Shadow}from"./popup-renderer/models/modal/background-settings/index.js";export{CloseButtonDisplayTypeEnum,CloseButtonPositionTypeEnum,CloseIconSettings,CloseIconTypeEnum,CloseSettings}from"./popup-renderer/models/modal/close-settings/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";var r=t((function(t){var r=e.useState(!1),o=r[0],n=r[1];e.useRef(null);var l=t.placeholder,a=t.isRequired,i=t.inputLabel;t.updateCurrentInfo;var c=t.validationErrorMessage,d=t.formInputSettings,u=t.value,p=t.onValueChange,s={width:"100%",backgroundColor:d.bgColor?"".concat(d.bgColor):"transparent",border:"".concat(d.borderWidth,"px solid ").concat(o?d.focusBorderColor:d.borderColor),borderRadius:"".concat(d.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(d.height,"px"),outline:"none"};return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(i||a)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},i&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},i.text),a&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},"*")),a&&a.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},a.validationErrorMessage),!!c&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},c)),e.createElement("input",{type:"text",placeholder:(null==l?void 0:l.text)||"",value:u||"",onChange:function(e){return function(e){p(e),a&&a.hasError&&e.length>0&&(a.hasError=!1)}(e.target.value)},style:s,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)}}))}));export{r as default};
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";var r=t((function(t){var r=e.useState(!1),o=r[0],n=r[1];e.useRef(null);var l=t.placeholder,a=t.isRequired,i=t.inputLabel;t.updateCurrentInfo;var c=t.validationErrorMessage,d=t.formInputSettings,u=t.value,p=t.onValueChange,s={width:"100%",backgroundColor:d.bgColor?"".concat(d.bgColor):"transparent",border:"".concat(d.borderWidth,"px solid ").concat(o?d.focusBorderColor:d.borderColor),borderRadius:"".concat(d.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(d.height,"px"),outline:"none"};return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(i||a)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},i&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},i.text),a&&i&&e.createElement("label",{style:{color:"black",fontSize:"14px"}},"*")),a&&a.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},a.validationErrorMessage),!!c&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},c)),e.createElement("input",{type:"text",placeholder:(null==l?void 0:l.text)||"",value:u||"",onChange:function(e){return function(e){p(e),a&&a.hasError&&e.length>0&&(a.hasError=!1)}(e.target.value)},style:s,onFocus:function(){return n(!0)},onBlur:function(){return n(!1)}}))}));export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as o,observable as r}from"mobx";var t
|
|
1
|
+
import{makeObservable as o,observable as r}from"mobx";var l,t=function(l){this.bgColor=l.bgColor||"#FFFFFF",this.overlay=l.overlay?new i(l.overlay):null,this.shadow=l.shadow?new e(l.shadow):null,this.border=l.border?new h(l.border):null,this.allowScrollingWhenPopupOpen=l.allowScrollingWhenPopupOpen||!1,o(this,{bgColor:r,overlay:r,shadow:r,border:r,allowScrollingWhenPopupOpen:r})},i=function(l){this.bgColor=l.bgColor||"",this.bgOpacity=l.bgOpacity||0,o(this,{bgOpacity:r,bgColor:r})},e=function(l){this.color=l.color||"",this.bgOpacity=l.bgOpacity||0,o(this,{bgOpacity:r,color:r})};!function(o){o.SOLID="solid",o.DASHED="dashed",o.DOTTED="dotted"}(l||(l={}));var h=function(t){this.borderColor=t.borderColor||"",this.borderWidth=t.borderWidth||0,this.borderStyle=t.borderStyle||l.SOLID,o(this,{borderColor:r,borderWidth:r,borderStyle:r})};export{t as BackgroundSettings,h as Border,l as ButtonBorderStyle,i as Overlay,e as Shadow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as o,observable as t}from"mobx";var n
|
|
1
|
+
import{makeObservable as o,observable as t}from"mobx";var i,n;!function(o){o.ALWAYS_VISIBLE="ALWAYS_VISIBLE",o.ALWAYS_HIDDEN="ALWAYS_HIDDEN",o.VISIBLE_ON_HOVER="VISIBLE_ON_HOVER"}(i||(i={})),function(o){o.SHOW_ON_CONTENT="SHOW_ON_CONTENT",o.TAKE_SPACE="TAKE_SPACE"}(n||(n={}));var s,e=function(s){this.closeButtonPositionType=s.closeButtonPositionType||n.SHOW_ON_CONTENT,this.closeButtonDisplayType=s.closeButtonDisplayType||i.ALWAYS_VISIBLE,this.iconSettings=s.iconSettings?new c(s.iconSettings):new c({}),o(this,{closeButtonPositionType:t,closeButtonDisplayType:t,iconSettings:t})};!function(o){o.WITH_BORDER="WITH_BORDER",o.WITHOUT_BORDER="WITHOUT_BORDER"}(s||(s={}));var c=function(i){this.type=i.type||s.WITHOUT_BORDER,this.color=i.color||"",this.backgroundColor=i.backgroundColor||"",0===Object.keys(i).length&&(this.type=s.WITHOUT_BORDER,this.color="#697586",this.backgroundColor="#FFFFFF"),o(this,{type:t,color:t,backgroundColor:t})};export{i as CloseButtonDisplayTypeEnum,n as CloseButtonPositionTypeEnum,c as CloseIconSettings,s as CloseIconTypeEnum,e as CloseSettings};
|
|
@@ -8,6 +8,7 @@ export declare enum PopupTypeEnum {
|
|
|
8
8
|
NOTIFICATION_BAR = "NOTIFICATION_BAR",
|
|
9
9
|
DRAWER = "DRAWER"
|
|
10
10
|
}
|
|
11
|
+
export declare const POPUP_DEFAULT_IMAGE_PATH = "sf/assets/popup";
|
|
11
12
|
export declare enum PopupPositonEnum {
|
|
12
13
|
POPUP_TOP_LEFT = "POPUP_TOP_LEFT",
|
|
13
14
|
POPUP_TOP_CENTER = "POPUP_TOP_CENTER",
|
|
@@ -37,6 +38,7 @@ export declare class Modal {
|
|
|
37
38
|
setInitialSettings(isNotificationPopup?: boolean): void;
|
|
38
39
|
private setInitialPosition;
|
|
39
40
|
private setInitialWindowSettings;
|
|
41
|
+
private setInitialBackgroundSettings;
|
|
40
42
|
get availablePositions(): {
|
|
41
43
|
POPUP: PopupPositonEnum[];
|
|
42
44
|
NOTIFICATION_BAR: PopupPositonEnum[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as t,observable as i,computed as e,action as n}from"mobx";import{PopupStep as
|
|
1
|
+
import{makeObservable as t,observable as i,computed as e,action as n}from"mobx";import{PopupStep as o}from"./step/index.js";import{Teaser as s}from"./teaser/index.js";import{WindowSettings as P}from"./window-settings/index.js";import{Border as r,BackgroundSettings as a,Overlay as O}from"./background-settings/index.js";import{CloseSettings as T}from"./close-settings/index.js";import{Popup as _}from"../index.js";var d;!function(t){t.POPUP="POPUP",t.NOTIFICATION_BAR="NOTIFICATION_BAR",t.DRAWER="DRAWER"}(d||(d={}));var l,I="sf/assets/popup";!function(t){t.POPUP_TOP_LEFT="POPUP_TOP_LEFT",t.POPUP_TOP_CENTER="POPUP_TOP_CENTER",t.POPUP_TOP_RIGHT="POPUP_TOP_RIGHT",t.POPUP_MIDDLE_LEFT="POPUP_MIDDLE_LEFT",t.POPUP_MIDDLE_CENTER="POPUP_MIDDLE_CENTER",t.POPUP_MIDDLE_RIGHT="POPUP_MIDDLE_RIGHT",t.POPUP_BOTTOM_LEFT="POPUP_BOTTOM_LEFT",t.POPUP_BOTTOM_CENTER="POPUP_BOTTOM_CENTER",t.POPUP_BOTTOM_RIGHT="POPUP_BOTTOM_RIGHT",t.NOTIFICATION_BAR_UP="NOTIFICATION_BAR_UP",t.NOTIFICATION_BAR_DOWN="NOTIFICATION_BAR_DOWN",t.DRAWER_RIGHT="DRAWER_RIGHT",t.DRAWER_LEFT="DRAWER_LEFT"}(l||(l={}));var g=function(){function I(r){this.type=r.type||d.POPUP,this.teaser=r.teaser?new s(r.teaser):new s({backgroundSettings:new a({allowScrollingWhenPopupOpen:!0})}),this.windowSettings=r.windowSettings?new P(r.windowSettings):new P({borderRadius:4,outerVerticalPadding:20,outerHorizontalPadding:20,innerVerticalPadding:20,innerHorizontalPadding:20}),this.backgroundSettings=new a(r.backgroundSettings||{}),this.closeSettings=new T(r.closeSettings||{}),this.steps=r.steps&&r.steps.length?r.steps.map((function(t){return new o(t)})):[new o({stepNumber:1,name:_.t("popup:initialClassTranslations.welcome"),isThankYouStep:!1})],this.isVisible=!1,this.selectedStep=this.steps[0],this.position=r.position?r.position:l.POPUP_MIDDLE_CENTER,t(this,{isVisible:i,type:i,position:i,teaser:i,windowSettings:i,backgroundSettings:i,closeSettings:i,steps:i,selectedStep:i,availablePositions:e,setInitialSettings:n.bound,setInitialPosition:n.bound,setInitialWindowSettings:n.bound})}return I.prototype.setInitialSettings=function(t){void 0===t&&(t=!1),this.setInitialPosition(t),this.setInitialWindowSettings(t),this.setInitialBackgroundSettings(t)},I.prototype.setInitialPosition=function(t){switch(this.type){case d.POPUP:this.position=t?l.POPUP_BOTTOM_RIGHT:l.POPUP_MIDDLE_CENTER;break;case d.NOTIFICATION_BAR:this.position=l.NOTIFICATION_BAR_UP;break;case d.DRAWER:this.position=l.DRAWER_RIGHT}},I.prototype.setInitialWindowSettings=function(t){switch(this.type){case d.POPUP:this.windowSettings=new P({borderRadius:4,outerVerticalPadding:20,outerHorizontalPadding:20,innerVerticalPadding:20,innerHorizontalPadding:20}),t&&(this.backgroundSettings.allowScrollingWhenPopupOpen=!0,this.backgroundSettings.overlay=null,this.backgroundSettings.border=new r({borderWidth:1,borderColor:"#E3E8EF"}));break;case d.NOTIFICATION_BAR:this.windowSettings=new P({outerHorizontalPadding:0,outerVerticalPadding:0,borderRadius:4,takeFullWidth:!0});break;case d.DRAWER:this.windowSettings=new P({borderRadius:4,outerHorizontalPadding:0,outerVerticalPadding:0,takeFullHeight:!0})}},I.prototype.setInitialBackgroundSettings=function(t){switch(this.type){case d.POPUP:this.backgroundSettings=new a({allowScrollingWhenPopupOpen:!1,overlay:new O({bgColor:"#364152",bgOpacity:40})}),t&&(this.backgroundSettings.allowScrollingWhenPopupOpen=!0,this.backgroundSettings.overlay=null,this.backgroundSettings.border=new r({borderWidth:1,borderColor:"#E3E8EF"}));break;case d.NOTIFICATION_BAR:case d.DRAWER:this.backgroundSettings=new a({allowScrollingWhenPopupOpen:!0})}},Object.defineProperty(I.prototype,"availablePositions",{get:function(){var t;return(t={})[d.POPUP]=[l.POPUP_TOP_LEFT,l.POPUP_TOP_CENTER,l.POPUP_TOP_RIGHT,l.POPUP_MIDDLE_LEFT,l.POPUP_MIDDLE_CENTER,l.POPUP_MIDDLE_RIGHT,l.POPUP_BOTTOM_LEFT,l.POPUP_BOTTOM_CENTER,l.POPUP_BOTTOM_RIGHT],t[d.NOTIFICATION_BAR]=[l.NOTIFICATION_BAR_UP,l.NOTIFICATION_BAR_DOWN],t[d.DRAWER]=[l.DRAWER_RIGHT,l.DRAWER_LEFT],t},enumerable:!1,configurable:!0}),I}();export{g as Modal,I as POPUP_DEFAULT_IMAGE_PATH,l as PopupPositonEnum,d as PopupTypeEnum};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as i}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as t,observable as
|
|
1
|
+
import{__extends as i}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as t,observable as n,computed as o}from"mobx";import{PopupElementTypeEnum as e,BaseElement as a}from"../base/index.js";import{POPUP_DEFAULT_IMAGE_PATH as d}from"../../../index.js";var r,c,l=1080;!function(i){i.FLOAT_LEFT="FLOAT_LEFT",i.FLOAT_RIGHT="FLOAT_RIGHT",i.DISABLE_FLOAT="DISABLE_FLOAT"}(r||(r={})),function(i){i.CONTAIN="CONTAIN",i.COVER="COVER"}(c||(c={}));var m=function(a){function l(i){var d,l,m,s,g=this;return(g=a.call(this,i)||this).type=e.IMAGE,g.imagePosition=i.imagePosition||r.DISABLE_FLOAT,g.imageId=i.imageId||null,g.bgColor=i.bgColor||"",g.cdnURL=null,g.merchantId=null,g.objectFit=i.objectFit||c.CONTAIN,g.link=i.link||null,g.maxWidth=null!==(d=i.maxWidth)&&void 0!==d?d:100,g.verticalPadding=null!==(l=i.verticalPadding)&&void 0!==l?l:0,g.horizontalPadding=null!==(m=i.horizontalPadding)&&void 0!==m?m:0,g.borderRadius=null!==(s=i.borderRadius)&&void 0!==s?s:0,t(g,{imagePosition:n,imageId:n,bgColor:n,cdnURL:n,merchantId:n,objectFit:n,link:n,maxWidth:n,borderRadius:n,src:o}),g}return i(l,a),Object.defineProperty(l.prototype,"src",{get:function(){if(this.imageId)return this.imageId.includes(d)?"".concat(this.cdnURL,"/").concat(d,"/").concat(this.imageId,".jpg"):this.imageId.includes("/")?"".concat(this.cdnURL,"images/").concat(this.merchantId,"/").concat(this.imageId,"/image_").concat(1080,".jpeg"):void 0},enumerable:!1,configurable:!0}),l}(a);export{l as IMAGE_SIZE,m as ImageElement,c as ImageFitEnum,r as ImagePositionEnum};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as i}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as o,observable as
|
|
1
|
+
import{__extends as i}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as o,observable as t,computed as n}from"mobx";import{PopupElementTypeEnum as e,BaseElement as r}from"../base/index.js";import{IMAGE_SIZE as a,ImageFitEnum as d}from"../image/index.js";import{POPUP_DEFAULT_IMAGE_PATH as c}from"../../../index.js";var l,s;!function(i){i.LEFT_ALIGN="LEFT_ALIGN",i.RIGTH_ALIGN="RIGTH_ALIGN"}(l||(l={})),function(i){i.TOP="TOP",i.BOTTOM="BOTTOM",i.HIDE="HIDE"}(s||(s={}));var m=function(r){function m(i){var a,c,m,g=this;return(g=r.call(this,i)||this).type=e.IMAGE_COLUMN,g.imagePosition=i.imagePosition||l.RIGTH_ALIGN,g.mobilePosition=i.mobilePosition||s.HIDE,g.imageId=i.imageId||null,g.bgColor=i.bgColor||"",g.cdnURL=null,g.merchantId=null,g.objectFit=i.objectFit||d.COVER,g.link=i.link||null,g.verticalPadding=null!==(a=i.verticalPadding)&&void 0!==a?a:0,g.horizontalPadding=null!==(c=i.horizontalPadding)&&void 0!==c?c:0,g.borderRadius=null!==(m=i.borderRadius)&&void 0!==m?m:0,o(g,{imagePosition:t,mobilePosition:t,imageId:t,bgColor:t,cdnURL:t,merchantId:t,objectFit:t,link:t,borderRadius:t,src:n}),g}return i(m,r),Object.defineProperty(m.prototype,"src",{get:function(){if(this.imageId)return this.imageId.includes(c)?"".concat(this.cdnURL,"/").concat(c,"/").concat(this.imageId,".jpg"):this.imageId.includes("/")?"".concat(this.cdnURL,"images/").concat(this.merchantId,"/").concat(this.imageId,"/image_").concat(a,".jpeg"):void 0},enumerable:!1,configurable:!0}),m}(r);export{m as ImageColumnElement,l as ImageColumnPositionEnum,s as MobileImageColumnPositionEnum};
|