@licklist/design 0.48.1 → 0.48.2

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,7 +1,7 @@
1
1
  import { EventStatistic } from "@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper";
2
2
  export declare function formatContent(content: any, maxSymbols: any): any;
3
3
  export declare const formatContentWithoutTags: (content: any, maxLength?: number) => any;
4
- export declare const EVENT_DESCRIPTION_SIZE = 300;
4
+ export declare const EVENT_DESCRIPTION_SIZE = 350;
5
5
  /**
6
6
  * Calculate the total number of views from the given dates and event statistic.
7
7
  *
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("@licklist/core/dist/Config"),o=require("luxon");var e=300,n=function(t,r){return t.reduce((function(t,o){var e,n;return t+(null!==(n=null===(e=r.views[o])||void 0===e?void 0:e.pageViews)&&void 0!==n?n:0)}),0)},i=function(t,r){var o=0,e=0;return t.forEach((function(t){var n;return Object.values(null!==(n=r.productCategorySummary[t])&&void 0!==n?n:{}).forEach((function(t){var r,n=t.totalPerCategory,i=t.productsSummary;e+=n||0,o+=null!==(r=null==i?void 0:i.reduce((function(t,r){return t+r.productsSold}),0))&&void 0!==r?r:0}))})),[o,e]};exports.EVENT_DESCRIPTION_SIZE=e,exports.calculateTotalSoldAndAmount=i,exports.calculateTotalViews=n,exports.formatContent=function(t,r){return t?t.length>r?"".concat(t.slice(0,r),"..."):t:""},exports.formatContentWithoutTags=function(t,r){if(void 0===r&&(r=e),!t)return"";if(t<r)return t;var o=t.replace(/<[^>]*>/g,"").trim().replace(/&nbsp;|[^a-zA-Z0-9\s]/g,"").replace(/\s\s+/g," ").slice(0,r).split(" "),n=String(t).indexOf(o[o.length-2]);return t.slice(0,n).concat("...")},exports.getStatisticInfo=function(e,u){var a,l;if(!e)return{totalViews:0,totalSold:0,totalAmount:0};var c=o.DateTime.fromISO(u).toUTC().toFormat(r.DATE_FORMAT),s=o.DateTime.fromISO(u).toUTC().toFormat(r.DATE_FORMAT),d=null!==(l=null===(a=Object.keys(null==e?void 0:e.productCategorySummary))||void 0===a?void 0:a.filter((function(t){return o.DateTime.fromFormat(t,r.DATE_TIME_FULL_FORMAT).toFormat(r.DATE_FORMAT)===s})))&&void 0!==l?l:[],f=n([c],e),v=t.__read(i(d,e),2);return{totalViews:f,totalSold:v[0],totalAmount:v[1]}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("@licklist/core/dist/Config"),o=require("luxon");var e=350,n=function(t,r){return t.reduce((function(t,o){var e,n;return t+(null!==(n=null===(e=r.views[o])||void 0===e?void 0:e.pageViews)&&void 0!==n?n:0)}),0)},i=function(t,r){var o=0,e=0;return t.forEach((function(t){var n;return Object.values(null!==(n=r.productCategorySummary[t])&&void 0!==n?n:{}).forEach((function(t){var r,n=t.totalPerCategory,i=t.productsSummary;e+=n||0,o+=null!==(r=null==i?void 0:i.reduce((function(t,r){return t+r.productsSold}),0))&&void 0!==r?r:0}))})),[o,e]};exports.EVENT_DESCRIPTION_SIZE=e,exports.calculateTotalSoldAndAmount=i,exports.calculateTotalViews=n,exports.formatContent=function(t,r){return t?t.length>r?"".concat(t.slice(0,r),"..."):t:""},exports.formatContentWithoutTags=function(t,r){if(void 0===r&&(r=e),!t)return"";if(t<r)return t;var o=t.replace(/<[^>]*>/g,"").trim().replace(/&nbsp;|[^a-zA-Z0-9\s]/g,"").replace(/\s\s+/g," ").slice(0,r).split(" "),n=String(t).indexOf(o[o.length-2]);return t.slice(0,n).concat("...")},exports.getStatisticInfo=function(e,u){var a,l;if(!e)return{totalViews:0,totalSold:0,totalAmount:0};var c=o.DateTime.fromISO(u).toUTC().toFormat(r.DATE_FORMAT),s=o.DateTime.fromISO(u).toUTC().toFormat(r.DATE_FORMAT),d=null!==(l=null===(a=Object.keys(null==e?void 0:e.productCategorySummary))||void 0===a?void 0:a.filter((function(t){return o.DateTime.fromFormat(t,r.DATE_TIME_FULL_FORMAT).toFormat(r.DATE_FORMAT)===s})))&&void 0!==l?l:[],f=n([c],e),v=t.__read(i(d,e),2);return{totalViews:f,totalSold:v[0],totalAmount:v[1]}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.48.1",
3
+ "version": "0.48.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -25,7 +25,7 @@ export const formatContentWithoutTags = (
25
25
  return content.slice(0, index).concat("...");
26
26
  };
27
27
 
28
- export const EVENT_DESCRIPTION_SIZE = 300;
28
+ export const EVENT_DESCRIPTION_SIZE = 350;
29
29
 
30
30
  /**
31
31
  * Calculate the total number of views from the given dates and event statistic.