@antscorp/antsomi-ui 1.3.5-beta.922 → 1.3.5-beta.923

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.
@@ -10,6 +10,7 @@ import { isEmpty } from 'lodash';
10
10
  import { differenceInMonths, formatUTCDateTZ, startOfMonth, subMonths, } from '@antscorp/antsomi-ui/es/utils/date';
11
11
  import { getPortalTimeZone } from '@antscorp/antsomi-ui/es/utils/portal';
12
12
  import { EmptyData } from '../../molecules';
13
+ import clsx from 'clsx';
13
14
  export const ActivityTimeline = (props) => {
14
15
  const { timelines = [], isLoading = false, title = translate(translations._BLOCK_TIMELINE_CUS), timezone = getPortalTimeZone(), objectName = '_THIS_PERSON_UPPERCASE', onFetchMore, eventTracking: eventTrackingProp = [], header, className, } = props;
15
16
  let { timelineAvailable } = props;
@@ -96,5 +97,5 @@ export const ActivityTimeline = (props) => {
96
97
  }
97
98
  return (_jsxs(_Fragment, { children: [header, showMainContent(timelines, objectName), showBottomComponent()] }));
98
99
  };
99
- return (_jsxs(StyledRoot, { className: className, children: [_jsx(StyldTitle, { children: title }), renderContent()] }));
100
+ return (_jsxs(StyledRoot, { className: clsx(className, 'activity-timeline'), children: [_jsx(StyldTitle, { children: title }), renderContent()] }));
100
101
  };
@@ -40,21 +40,12 @@ export const getValuesReplace = (objectReplace, data) => {
40
40
  return values;
41
41
  };
42
42
  const parseUrl = (params) => {
43
- const { name = 'N/A', positionSlice = 0 } = params;
43
+ const { name = 'N/A' } = params;
44
44
  const validateName = name.replace(/https|http|www|\/\/|:/gi, '');
45
- if (positionSlice === 0 && validateName !== 'N/A') {
45
+ if (validateName !== 'N/A') {
46
46
  return validateName;
47
47
  }
48
- if (positionSlice === 0 ||
49
- validateName === 'N/A' ||
50
- (positionSlice > validateName.length && validateName !== 'N/A') ||
51
- positionSlice === validateName.length) {
52
- return name;
53
- }
54
- if (validateName[positionSlice] === ' ') {
55
- return `${validateName.slice(0, positionSlice - 1)}...`;
56
- }
57
- return `${validateName.slice(0, positionSlice)}...`;
48
+ return name;
58
49
  };
59
50
  export const getStringHtmlByType = (item, eType = 'product') => {
60
51
  const validateDate = item || {};
@@ -183,6 +174,7 @@ export const getInfoEvent = (eType, itemEvent, eventTracking, customerName, conf
183
174
  itemEvent.pageType === 'view' ||
184
175
  itemEvent.pageType === 'add_to_cart') {
185
176
  // PAGETYPE CLICK OR VIEW
177
+ // eslint-disable-next-line no-console
186
178
  console.log('itemEvent.items[0]', itemEvent);
187
179
  data.product_name = getStringHtmlByType(itemEvent.items[0], eType);
188
180
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.922",
3
+ "version": "1.3.5-beta.923",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",