@antscorp/antsomi-ui 1.3.5-beta.837 → 1.3.5-beta.839
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/es/components/molecules/ThumbnailCard/ThumbnailCard.js +1 -1
- package/es/components/organism/ActivityTimeline/ActivityTimeline.js +3 -3
- package/es/components/organism/ActivityTimeline/styled.js +1 -0
- package/es/components/organism/ActivityTimeline/utils.js +13 -4
- package/es/locales/en/google-sheet.json +4 -1
- package/es/locales/i18n.d.ts +6 -0
- package/es/locales/ja/google-sheet.json +1771 -1771
- package/es/locales/vi/google-sheet.json +64 -61
- package/es/utils/date.d.ts +1 -0
- package/es/utils/date.js +5 -0
- package/es/utils/portal.js +2 -2
- package/package.json +1 -1
|
@@ -78,7 +78,7 @@ export const ThumbnailCard = (props) => {
|
|
|
78
78
|
})
|
|
79
79
|
.filter(Boolean);
|
|
80
80
|
};
|
|
81
|
-
return (_jsxs(Flex, { gap: 10, vertical: true, ...restOfProps, style: { width, ...restOfProps.style }, children: [_jsxs(ThumbnailCardWrapper, { "$showSkeleton": showSkeletonMemo, style: { height, cursor: actionAvailable ? 'default' : 'pointer' }, onClick: handleWrapperClick, "data-test": "thumbnail", children: [_jsx("div", { className: "screen", children: thumbnail && (_jsx("img", { src: getUrlNoCache(thumbnail, thumbnailCacheValue), alt: "", style: { objectFit: thumbnailFit }, onError: e => {
|
|
81
|
+
return (_jsxs(Flex, { gap: 10, vertical: true, ...restOfProps, style: { width, ...restOfProps.style }, "data-test": "template", children: [_jsxs(ThumbnailCardWrapper, { "$showSkeleton": showSkeletonMemo, style: { height, cursor: actionAvailable ? 'default' : 'pointer' }, onClick: handleWrapperClick, "data-test": "thumbnail", children: [_jsx("div", { className: "screen", children: thumbnail && (_jsx("img", { src: getUrlNoCache(thumbnail, thumbnailCacheValue), alt: "", style: { objectFit: thumbnailFit }, onError: e => {
|
|
82
82
|
e.currentTarget.style.display = 'none';
|
|
83
83
|
} })) }), actionAvailable && !loading && (_jsxs(_Fragment, { children: [_jsxs(Flex, { className: "center-action", align: "center", gap: 10, vertical: true, children: [showEditBtn && (_jsx(Button, { type: "primary", className: "animate__animated animate__fadeIn", ...restOfEditBtnProps, onClick: e => {
|
|
84
84
|
e.stopPropagation();
|
|
@@ -7,7 +7,7 @@ import { ItemEvent, TimeLineTitle, ItemGroupEvent } from './components';
|
|
|
7
7
|
import { useInView } from 'react-intersection-observer';
|
|
8
8
|
import { translate, translations } from '@antscorp/antsomi-locales';
|
|
9
9
|
import { isEmpty } from 'lodash';
|
|
10
|
-
import { differenceInMonths,
|
|
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
13
|
export const ActivityTimeline = (props) => {
|
|
@@ -36,7 +36,7 @@ export const ActivityTimeline = (props) => {
|
|
|
36
36
|
const result = [];
|
|
37
37
|
if (timelines.length > 0) {
|
|
38
38
|
const startDate = startOfMonth(new Date()).getTime();
|
|
39
|
-
let firstDateEvent = startOfMonth(new Date(
|
|
39
|
+
let firstDateEvent = startOfMonth(new Date(formatUTCDateTZ(timelines[0].trackedDateTimeUTC, 'MM/DD/YYYY', timezone))).getTime();
|
|
40
40
|
let diffTempt = differenceInMonths(new Date(startDate), new Date(firstDateEvent));
|
|
41
41
|
if (diffTempt === 0) {
|
|
42
42
|
result.push(_jsx(TimeLineTitle, { type: "label", data: { date: firstDateEvent } }, `time-heading--${startDate}`));
|
|
@@ -51,7 +51,7 @@ export const ActivityTimeline = (props) => {
|
|
|
51
51
|
result.push(_jsx(TimeLineTitle, { type: "label", data: { date: firstDateEvent } }, `time-heading--v2-${firstDateEvent}`));
|
|
52
52
|
}
|
|
53
53
|
timelines.forEach((item, index) => {
|
|
54
|
-
const firstDateEventTempt = startOfMonth(new Date(
|
|
54
|
+
const firstDateEventTempt = startOfMonth(new Date(formatUTCDateTZ(item.trackedDateTimeUTC, 'MM/DD/YYYY', timezone))).getTime();
|
|
55
55
|
if (firstDateEvent !== firstDateEventTempt) {
|
|
56
56
|
diffTempt = differenceInMonths(new Date(firstDateEvent), new Date(firstDateEventTempt));
|
|
57
57
|
if (diffTempt === 0) {
|
|
@@ -4,7 +4,7 @@ import { get } from 'lodash';
|
|
|
4
4
|
import { ENV } from '../../..';
|
|
5
5
|
import { translate, translations } from '@antscorp/antsomi-ui/es/locales';
|
|
6
6
|
import { safeParse } from '@antscorp/antsomi-ui/es/utils';
|
|
7
|
-
import { formatDate,
|
|
7
|
+
import { formatDate, formatUTCDateTZ } from '@antscorp/antsomi-ui/es/utils/date';
|
|
8
8
|
import { getPortalFormatDateTimeLong, getPortalTimeZone, } from '@antscorp/antsomi-ui/es/utils/portal';
|
|
9
9
|
import { CDP_ROUTE } from '@antscorp/antsomi-ui/es/constants';
|
|
10
10
|
const translateAt = translate(translations._INFO_LOCATION, 'at');
|
|
@@ -371,10 +371,19 @@ export const getInfoEvent = (eType, itemEvent, eventTracking, customerName, conf
|
|
|
371
371
|
};
|
|
372
372
|
};
|
|
373
373
|
export function formatDateHeader(timestamp, timezone = getPortalTimeZone()) {
|
|
374
|
-
|
|
375
|
-
|
|
374
|
+
let value = '';
|
|
375
|
+
try {
|
|
376
|
+
if (typeof timestamp === 'string') {
|
|
377
|
+
value = formatUTCDateTZ(timestamp, getPortalFormatDateTimeLong(), timezone);
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
value = formatUTCDateTZ(timestamp, getPortalFormatDateTimeLong(), timezone);
|
|
381
|
+
}
|
|
382
|
+
return value;
|
|
383
|
+
}
|
|
384
|
+
catch (error) {
|
|
385
|
+
return '';
|
|
376
386
|
}
|
|
377
|
-
return formatDateTZ(timestamp, getPortalFormatDateTimeLong(), timezone);
|
|
378
387
|
}
|
|
379
388
|
export const checkShowRedeem = (data) => {
|
|
380
389
|
const validateData = safeParse(data, {});
|
|
@@ -1288,7 +1288,7 @@
|
|
|
1288
1288
|
"_TITL_TOTAL_TESTING_INPUT": "Total testing input",
|
|
1289
1289
|
"_TITL_TRACKED_TIME": "Tracked time",
|
|
1290
1290
|
"_TITL_TREAT_AS_CONVERSION_OBECJT": "Treat as Conversion Object",
|
|
1291
|
-
"_TOOLTIP__TITL_TREAT_AS_CONVERSION_OBECJT": "
|
|
1291
|
+
"_TOOLTIP__TITL_TREAT_AS_CONVERSION_OBECJT": "Loading...",
|
|
1292
1292
|
"_TITL_TRIGGER_EVENT": "{{trigger_event_name}}, where:",
|
|
1293
1293
|
"_TITL_TRIGGER_TIME": "Trigger time",
|
|
1294
1294
|
"_TITL_UNTITLED_MEASURE": "Untitled Measure",
|
|
@@ -2257,6 +2257,9 @@
|
|
|
2257
2257
|
"_ZALO_ACTION_SMS": "Open SMS",
|
|
2258
2258
|
"_ZALO_ACTION_PHONE": "Open Phone",
|
|
2259
2259
|
"_ZALO_RICH_TIME_LIMIT_DES": "This template could only be sent from 06:00 AM to 10:00 PM everyday. To prevent sending message unsuccessfully, make sure you choose the appropriate time range in Step 1 - Settings.",
|
|
2260
|
+
"_CONTENT_TABL": "Additional Content",
|
|
2261
|
+
"_CONTENT_TABL_KEY": "Label",
|
|
2262
|
+
"_CONTENT_TABL_VALUE": "Content",
|
|
2260
2263
|
"_CONTENT_TABL_ERR_MESS": "The label could not be duplicates",
|
|
2261
2264
|
"_CONTENT_TABL_HINT": "Label, Content must not exceed 25, 100 characters correspondingly",
|
|
2262
2265
|
"_ZNS_NO_TEMP": "No templates available for this destination",
|
package/es/locales/i18n.d.ts
CHANGED
|
@@ -2259,6 +2259,9 @@ export declare const translationsJson: {
|
|
|
2259
2259
|
_ZALO_ACTION_SMS: string;
|
|
2260
2260
|
_ZALO_ACTION_PHONE: string;
|
|
2261
2261
|
_ZALO_RICH_TIME_LIMIT_DES: string;
|
|
2262
|
+
_CONTENT_TABL: string;
|
|
2263
|
+
_CONTENT_TABL_KEY: string;
|
|
2264
|
+
_CONTENT_TABL_VALUE: string;
|
|
2262
2265
|
_CONTENT_TABL_ERR_MESS: string;
|
|
2263
2266
|
_CONTENT_TABL_HINT: string;
|
|
2264
2267
|
_ZNS_NO_TEMP: string;
|
|
@@ -5630,6 +5633,9 @@ export declare const translationsJson: {
|
|
|
5630
5633
|
_ZALO_ACTION_SMS: string;
|
|
5631
5634
|
_ZALO_ACTION_PHONE: string;
|
|
5632
5635
|
_ZALO_RICH_TIME_LIMIT_DES: string;
|
|
5636
|
+
_CONTENT_TABL: string;
|
|
5637
|
+
_CONTENT_TABL_KEY: string;
|
|
5638
|
+
_CONTENT_TABL_VALUE: string;
|
|
5633
5639
|
_CONTENT_TABL_ERR_MESS: string;
|
|
5634
5640
|
_CONTENT_TABL_HINT: string;
|
|
5635
5641
|
_ZNS_NO_TEMP: string;
|