@antscorp/antsomi-ui 2.0.76 → 2.0.78

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.
@@ -1478,6 +1478,9 @@ export declare const mapTranslateCode: {
1478
1478
  11: {
1479
1479
  translateLabel: string;
1480
1480
  };
1481
+ 13: {
1482
+ translateLabel: string;
1483
+ };
1481
1484
  6: {
1482
1485
  translateLabel: string;
1483
1486
  };
@@ -527,6 +527,7 @@ export const mapTranslateCode = {
527
527
  9: { translateLabel: translations._EVENT_CODE_SENT_VIBER },
528
528
  7: { translateLabel: translations._EVENT_CODE_SENT_SMS },
529
529
  11: { translateLabel: translations._EVENT_CODE_SENT_FILE_TRANSFER },
530
+ 13: { translateLabel: translations._EVENT_CODE_SENT_WHATSAPP },
530
531
  6: { translateLabel: translations._EVENT_CODE_SENT_WEBHOOK },
531
532
  },
532
533
  viewable_advertising: {
@@ -35,7 +35,6 @@ const Loading = ({ isLoading, height, width }) => isLoading && (_jsx(WrapperLoad
35
35
  const Help = props => {
36
36
  const { configs, triggerType, buttonProps, boundsDraggable, isShowResizeHover, children } = props;
37
37
  const { apiKey, domainPlatform, appCode, domain, portalId, token, userId, config, domainTicket, domainUpload, avatar, } = configs;
38
- console.log('🚀 ~ domainUpload:', domainUpload);
39
38
  // const [isOpenDropdown, setIsOpenDropdown] = useState<boolean>(false);
40
39
  const [defaultPositionDrawActions, setDefaultPositionDrawActions] = useState(DEFAULT_POSITIONS.capture);
41
40
  const [defaultPositionRecordActions, setDefaultPositionRecordActions] = useState(DEFAULT_POSITIONS.record);
@@ -262,6 +262,7 @@ const Content = ({ portalId, token, action, ticketId, listUsers, domainTicket, d
262
262
  followers: [],
263
263
  submitterId: null,
264
264
  ownerId: null,
265
+ submitterEmail: '',
265
266
  properties: {},
266
267
  message: '',
267
268
  attachmentsZendesk: [],
@@ -275,7 +276,7 @@ const Content = ({ portalId, token, action, ticketId, listUsers, domainTicket, d
275
276
  };
276
277
  }
277
278
  params.submitterId = userId;
278
- params.submitterEmail = listUsers?.find(user => user.userId === userId)?.email;
279
+ params.submitterEmail = listUsers?.find(user => +user.userId === +userId)?.email;
279
280
  params.ownerId = Number(valueInput?.ownerId[0]?.userId);
280
281
  params.message = valueInput?.message;
281
282
  params.attachmentsZendesk = valueInput.fileZendesk.map(file => file.token);
@@ -29,7 +29,9 @@ const MessageComponent = ({ toUser, fromUser, followers, attachments, message, d
29
29
  refMesage.current.querySelectorAll('a')?.forEach(a => {
30
30
  const isOpenNewTab = a.attributes?.rel?.value?.includes('noopener noreferrer');
31
31
  if (isOpenNewTab) {
32
- a.setAttribute('target', '_blank');
32
+ a.style.color = '#005EB8';
33
+ a.style.textDecoration = 'underline';
34
+ a.style.cursor = 'pointer';
33
35
  }
34
36
  });
35
37
  }
@@ -17,6 +17,7 @@ export const WrapperContent = styled.div `
17
17
  `;
18
18
  export const WrapperLeftContent = styled.div `
19
19
  width: 38%;
20
+ overflow: auto;
20
21
  // border-right: 1px solid #e5e5e5;
21
22
  overflow: auto;
22
23
  ::-webkit-scrollbar {
@@ -550,20 +551,17 @@ export const WrapperContentAvatar = styled.div `
550
551
 
551
552
  .comment-header {
552
553
  display: flex;
553
- alignitems: flex-start;
554
- justifycontent: space-between;
554
+ align-items: flex-start;
555
+ justify-content: space-between;
555
556
  position: relative;
556
557
  }
557
558
  .comment-time {
558
- position: absolute;
559
- top: 10px;
560
- left: 50%;
561
559
  transform: translateX(-50%);
562
560
  width: fit-content;
563
- fontsize: 12px;
561
+ font-size: 12px;
564
562
  color: #7f7f7f;
565
- marginright: 5px;
566
- whitespace: nowrap;
563
+ margin-right: 5px;
564
+ white-space: nowrap;
567
565
  }
568
566
  .comment-content {
569
567
  font-size: 12px;
@@ -632,8 +630,8 @@ export const WrapperModalImg = styled(ModalV2) `
632
630
  }
633
631
  .modal-img-content {
634
632
  display: 'flex',
635
- alignItems: 'flex-start',
636
- justifyContent: 'center',
633
+ align-items: 'flex-start',
634
+ justify-content: 'center',
637
635
  width: '100%',
638
636
  height: 'calc(100% - 20px)',
639
637
  overflow: 'auto',
@@ -42,7 +42,7 @@ export declare const formatParams: (data: any) => {
42
42
  submitterEmail: string;
43
43
  };
44
44
  export declare const formatDatarender: (data: any, listSelect: any, listAccount: any) => any;
45
- export declare const handleValidateContent: (stringHTML: any) => string | true | undefined;
45
+ export declare const handleValidateContent: (stringHTML: any) => boolean;
46
46
  export declare const compareArrays: (a: any, b: any) => boolean;
47
47
  export declare const convertDateToTimestamp: (time: any, timeZone: any) => string;
48
48
  export declare const postCustomEvent: (type: any, data: any) => void;
@@ -392,12 +392,22 @@ export const formatDatarender = (data, listSelect, listAccount) => {
392
392
  return data;
393
393
  };
394
394
  export const handleValidateContent = stringHTML => {
395
+ // if (stringHTML) {
396
+ // const elment = document.createElement('div');
397
+ // elment.innerHTML = stringHTML;
398
+ // return (
399
+ // (elment?.firstChild as Element)?.tagName === 'IMG' ||
400
+ // (elment?.firstChild as Element)?.innerHTML?.replace(/&nbsp;|<br>/g, '')?.trim()
401
+ // );
402
+ // }
395
403
  if (stringHTML) {
396
- const elment = document.createElement('div');
397
- elment.innerHTML = stringHTML;
398
- return (elment?.firstChild?.tagName === 'IMG' ||
399
- elment?.firstChild?.innerHTML?.replace(/&nbsp;|<br>/g, '')?.trim());
404
+ const element = document.createElement('div');
405
+ element.innerHTML = stringHTML.trim();
406
+ if (element?.firstChild?.tagName === 'IMG')
407
+ return true;
408
+ return element.textContent?.trim() !== '';
400
409
  }
410
+ return false;
401
411
  };
402
412
  export const compareArrays = (a, b) => JSON.stringify(a) === JSON.stringify(b);
403
413
  export const convertDateToTimestamp = (time, timeZone) => dayjs(time).tz(timeZone).format('MMM DD YYYY hh:mm');
@@ -29,6 +29,9 @@ const MessageComponent = ({ toUser, fromUser, followers, attachments, message, d
29
29
  const isOpenNewTab = a.attributes?.rel?.value?.includes('noopener noreferrer');
30
30
  if (isOpenNewTab) {
31
31
  a.setAttribute('target', '_blank');
32
+ a.style.color = '#005EB8';
33
+ a.style.textDecoration = 'underline';
34
+ a.style.cursor = 'pointer';
32
35
  }
33
36
  });
34
37
  }
@@ -18,6 +18,7 @@ export const WrapperContent = styled.div `
18
18
  `;
19
19
  export const WrapperLeftContent = styled.div `
20
20
  flex: 1;
21
+ overflow: auto;
21
22
  // border-right: 1px solid #e5e5e5;
22
23
  ::-webkit-scrollbar {
23
24
  width: 8px;
@@ -554,19 +555,21 @@ export const WrapperContentAvatar = styled.div `
554
555
  position: relative;
555
556
  }
556
557
  .comment-time {
557
- position: absolute;
558
- top: 10px;
559
- left: 50%;
560
- transform: translateX(-50%);
561
558
  width: fit-content;
562
559
  font-size: 12px;
563
560
  color: #7f7f7f;
564
561
  margin-right: 5px;
565
562
  white-space: nowrap;
566
563
  }
564
+
567
565
  .comment-content {
568
- font-size: 12px;
569
566
  color: #333;
567
+ overflow: hidden;
568
+ white-space: break-spaces;
569
+
570
+ * {
571
+ font-size: 12px !important;
572
+ }
570
573
  }
571
574
  `;
572
575
  export const WrapperMessageContent = styled.div `
@@ -41,7 +41,7 @@ export declare const formatParams: (data: any) => {
41
41
  attachments: never[];
42
42
  };
43
43
  export declare const formatDatarender: (data: any, listSelect: any, listAccount: any) => any;
44
- export declare const handleValidateContent: (stringHTML: any) => string | undefined;
44
+ export declare const handleValidateContent: (stringHTML: any) => boolean;
45
45
  export declare const compareArrays: (a: any, b: any) => boolean;
46
46
  export declare const convertDateToTimestamp: (time: string | number | Date | dayjs.Dayjs, timeZone: string) => string;
47
47
  export declare const postCustomEvent: (type: any, data: any) => void;
@@ -340,11 +340,19 @@ export const formatDatarender = (data, listSelect, listAccount) => {
340
340
  return tmpData;
341
341
  };
342
342
  export const handleValidateContent = stringHTML => {
343
+ // if (stringHTML) {
344
+ // const elment = document.createElement('div');
345
+ // elment.innerHTML = stringHTML;
346
+ // return (elment?.firstChild as Element)?.innerHTML?.replace(/&nbsp;/g, '')?.trim();
347
+ // }
343
348
  if (stringHTML) {
344
- const elment = document.createElement('div');
345
- elment.innerHTML = stringHTML;
346
- return elment?.firstChild?.innerHTML?.replace(/&nbsp;/g, '')?.trim();
349
+ const element = document.createElement('div');
350
+ element.innerHTML = stringHTML.trim();
351
+ if (element?.firstChild?.tagName === 'IMG')
352
+ return true;
353
+ return element.textContent?.trim() !== '';
347
354
  }
355
+ return false;
348
356
  };
349
357
  export const compareArrays = (a, b) => JSON.stringify(a) === JSON.stringify(b);
350
358
  const isValidTimezone = (timeZone) => {