@ikas/popup-renderer 0.0.15 → 0.0.17

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.
@@ -57,6 +57,7 @@ export declare class PopupProduct {
57
57
  name: string;
58
58
  price: string;
59
59
  discountPrice: string | null;
60
+ discountRatio: string | null;
60
61
  imageURL: string | null;
61
62
  url: string | null;
62
63
  constructor(data?: Partial<PopupProduct>);
@@ -1 +1 @@
1
- import{__extends as t}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as i,observable as o}from"mobx";import{PopupElementTypeEnum as e,BaseElement as n}from"../base/index.js";import{ProductDetailSettings as r}from"./detail-settings/index.js";import{ButtonElement as d}from"../button/index.js";var u,a,E;!function(t){t.ASC_AVERAGE_RATING="ASC_AVERAGE_RATING",t.DESC_AVERAGE_RATING="DESC_AVERAGE_RATING",t.ASC_CREATED_AT="ASC_CREATED_AT",t.DESC_CREATED_AT="DESC_CREATED_AT",t.ASC_DISCOUNT_RATIO="ASC_DISCOUNT_RATIO",t.DESC_DISCOUNT_RATIO="DESC_DISCOUNT_RATIO",t.ASC_NAME="ASC_NAME",t.DESC_NAME="DESC_NAME",t.ASC_PRICE="ASC_PRICE",t.DESC_PRICE="DESC_PRICE",t.ASC_REVIEW_COUNT="ASC_REVIEW_COUNT",t.DESC_REVIEW_COUNT="DESC_REVIEW_COUNT",t.ASC_SALE_COUNT="ASC_SALE_COUNT",t.DESC_SALE_COUNT="DESC_SALE_COUNT"}(u||(u={})),function(t){t.ALL="ALL",t.SPECIFIC="SPECIFIC",t.CATEGORY="CATEGORY",t.LAST_VIEWED="LAST_VIEWED"}(a||(a={})),function(t){t.ONE_COLUMN="ONE_COLUMN",t.TWO_COLUMN="TWO_COLUMN",t.THREE_COLUMN="THREE_COLUMN"}(E||(E={}));var C=10,l=function(n){function C(t){void 0===t&&(t={});var C,l,s,_,c,A,S,T,I=this;return(I=n.call(this,t)||this).type=e.PRODUCT_LIST,I.listType=t.listType||a.ALL,I.sortType=t.sortType||u.ASC_CREATED_AT,I.maxProductsToShow=null!==(C=t.maxProductsToShow)&&void 0!==C?C:10,I.categoryId=null!==(l=t.categoryId)&&void 0!==l?l:null,I.variantPairs=null!==(s=t.variantPairs)&&void 0!==s?s:null,I.layout=null!==(_=t.layout)&&void 0!==_?_:E.TWO_COLUMN,I.productDetailSettings=t.productDetailSettings?new r(t.productDetailSettings):new r,I.buttonSettings=t.buttonSettings?new d(t.buttonSettings):new d({outerHorizontalPadding:0}),I.productBgColor=t.productBgColor||"#FFFFFF",I.gapBetweenProductElements=null!==(c=t.gapBetweenProductElements)&&void 0!==c?c:12,I.gapBetweenProducts=null!==(A=t.gapBetweenProducts)&&void 0!==A?A:12,I.verticalPadding=null!==(S=t.verticalPadding)&&void 0!==S?S:12,I.horizontalPadding=null!==(T=t.horizontalPadding)&&void 0!==T?T:12,i(I,{type:o,listType:o,sortType:o,maxProductsToShow:o,categoryId:o,variantPairs:o,layout:o,productDetailSettings:o,buttonSettings:o,productBgColor:o,gapBetweenProductElements:o,gapBetweenProducts:o}),I}return t(C,n),C}(n),s=function(t){var e;this.productId=t.productId,this.variantId=t.variantId,this.order=null!==(e=t.order)&&void 0!==e?e:0,this.productListElementId=t.productListElementId,i(this,{productId:o,variantId:o,order:o,productListElementId:o})},_=function(){function t(t){void 0===t&&(t={}),this.productId=t.productId||Date.now().toString(),this.variantId=t.variantId||Date.now().toString(),this.name=t.name||"",this.price=t.price||"",this.discountPrice=t.discountPrice||null,this.imageURL=t.imageURL?"".concat(t.imageURL,"/image_").concat(1080,".jpeg"):null,this.url=t.url||null,i(this,{productId:o,variantId:o,name:o,price:o,discountPrice:o,imageURL:o,url:o})}return Object.defineProperty(t.prototype,"$discountRatio",{get:function(){return this.discountPrice?"%"+this.discountPrice:null},enumerable:!1,configurable:!0}),t}();export{C as MAX_PRODUCT_COUNT,_ as PopupProduct,s as PopupVariantPair,l as ProductListElement,E as ProductListLayoutEnum,u as ProductListSortTypeEnum,a as ProductListTypeEnum};
1
+ import{__extends as t}from'./../../../../../../ext/tslib/tslib.es6.mjs.js';import{makeObservable as i,observable as o}from"mobx";import{PopupElementTypeEnum as n,BaseElement as e}from"../base/index.js";import{ProductDetailSettings as r}from"./detail-settings/index.js";import{ButtonElement as d}from"../button/index.js";var u,a,E;!function(t){t.ASC_AVERAGE_RATING="ASC_AVERAGE_RATING",t.DESC_AVERAGE_RATING="DESC_AVERAGE_RATING",t.ASC_CREATED_AT="ASC_CREATED_AT",t.DESC_CREATED_AT="DESC_CREATED_AT",t.ASC_DISCOUNT_RATIO="ASC_DISCOUNT_RATIO",t.DESC_DISCOUNT_RATIO="DESC_DISCOUNT_RATIO",t.ASC_NAME="ASC_NAME",t.DESC_NAME="DESC_NAME",t.ASC_PRICE="ASC_PRICE",t.DESC_PRICE="DESC_PRICE",t.ASC_REVIEW_COUNT="ASC_REVIEW_COUNT",t.DESC_REVIEW_COUNT="DESC_REVIEW_COUNT",t.ASC_SALE_COUNT="ASC_SALE_COUNT",t.DESC_SALE_COUNT="DESC_SALE_COUNT"}(u||(u={})),function(t){t.ALL="ALL",t.SPECIFIC="SPECIFIC",t.CATEGORY="CATEGORY",t.LAST_VIEWED="LAST_VIEWED"}(a||(a={})),function(t){t.ONE_COLUMN="ONE_COLUMN",t.TWO_COLUMN="TWO_COLUMN",t.THREE_COLUMN="THREE_COLUMN"}(E||(E={}));var s=10,l=function(e){function s(t){void 0===t&&(t={});var s,l,C,_,c,A,S,T,I=this;return(I=e.call(this,t)||this).type=n.PRODUCT_LIST,I.listType=t.listType||a.ALL,I.sortType=t.sortType||u.ASC_CREATED_AT,I.maxProductsToShow=null!==(s=t.maxProductsToShow)&&void 0!==s?s:10,I.categoryId=null!==(l=t.categoryId)&&void 0!==l?l:null,I.variantPairs=null!==(C=t.variantPairs)&&void 0!==C?C:null,I.layout=null!==(_=t.layout)&&void 0!==_?_:E.TWO_COLUMN,I.productDetailSettings=t.productDetailSettings?new r(t.productDetailSettings):new r,I.buttonSettings=t.buttonSettings?new d(t.buttonSettings):new d({outerHorizontalPadding:0}),I.productBgColor=t.productBgColor||"#FFFFFF",I.gapBetweenProductElements=null!==(c=t.gapBetweenProductElements)&&void 0!==c?c:12,I.gapBetweenProducts=null!==(A=t.gapBetweenProducts)&&void 0!==A?A:12,I.verticalPadding=null!==(S=t.verticalPadding)&&void 0!==S?S:12,I.horizontalPadding=null!==(T=t.horizontalPadding)&&void 0!==T?T:12,i(I,{type:o,listType:o,sortType:o,maxProductsToShow:o,categoryId:o,variantPairs:o,layout:o,productDetailSettings:o,buttonSettings:o,productBgColor:o,gapBetweenProductElements:o,gapBetweenProducts:o}),I}return t(s,e),s}(e),C=function(t){var n;this.productId=t.productId,this.variantId=t.variantId,this.order=null!==(n=t.order)&&void 0!==n?n:0,this.productListElementId=t.productListElementId,i(this,{productId:o,variantId:o,order:o,productListElementId:o})},_=function(){function t(t){void 0===t&&(t={}),this.productId=t.productId||Date.now().toString(),this.variantId=t.variantId||Date.now().toString(),this.name=t.name||"",this.price=t.price||"",this.discountPrice=t.discountPrice||null,this.discountRatio=t.discountRatio||null,this.imageURL=t.imageURL?"".concat(t.imageURL,"/image_").concat(1080,".jpeg"):null,this.url=t.url||null,i(this,{productId:o,variantId:o,name:o,price:o,discountPrice:o,discountRatio:o,imageURL:o,url:o})}return Object.defineProperty(t.prototype,"$discountRatio",{get:function(){return this.discountRatio?"%"+this.discountRatio:null},enumerable:!1,configurable:!0}),t}();export{s as MAX_PRODUCT_COUNT,_ as PopupProduct,C as PopupVariantPair,l as ProductListElement,E as ProductListLayoutEnum,u as ProductListSortTypeEnum,a as ProductListTypeEnum};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/popup-renderer",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "",
5
5
  "author": "ucy",
6
6
  "license": "ISC",