@antscorp/antsomi-ui 1.3.5-beta.930 → 1.3.5-beta.931

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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { PayloadInfo } from '@antscorp/antsomi-ui/es/types';
2
3
  export type TDisplayFormat = 'number' | 'percentage' | 'currency' | 'datetime';
3
4
  type DisplayFormatProps = {
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // Libraries
3
- import { useEffect, useRef, useState } from 'react';
3
+ import { useRef, useState } from 'react';
4
4
  // Atoms
5
5
  import { Spin, Typography } from '@antscorp/antsomi-ui/es/components/atoms';
6
+ // Hooks
7
+ import { useDeepCompareEffect } from '@antscorp/antsomi-ui/es/hooks';
6
8
  // Molecules
7
9
  import { ModalV2 } from '@antscorp/antsomi-ui/es/components/molecules';
8
10
  import { ProcessLoadingContent } from './styled';
@@ -17,7 +19,10 @@ export const ProcessLoading = ({ ...restProps }) => {
17
19
  const { second = 7, message: timeOutMessage = (_jsxs("div", { children: ["This might take a little longer than usual. ", _jsx("br", {}), "Thank you for waiting!"] })), show: showTimeOutMessage = true, } = timeout || {};
18
20
  // Effects
19
21
  /* Base timeout second to show timeout message */
20
- useEffect(() => {
22
+ useDeepCompareEffect(() => {
23
+ if (timeoutShowAlert && timeoutShowAlert.current) {
24
+ clearTimeout(timeoutShowAlert.current);
25
+ }
21
26
  if (open) {
22
27
  timeoutShowAlert.current = setTimeout(() => {
23
28
  setShowAlert(true);
@@ -441,7 +441,7 @@ export const generateTagContent = (params) => {
441
441
  * unescapeString('Hello &quot;world&quot; with&nbsp;spaces');
442
442
  * // returns 'Hello "world" with spaces'
443
443
  */
444
- export const unescapeString = (str) => str.replace(/&quot;|&nbsp;|nbsp;|&#x27;/gm, (match) => {
444
+ export const unescapeString = (str) => str.replace(/&quot;|&nbsp;|nbsp;|&#x27;|&amp;/gm, (match) => {
445
445
  switch (match) {
446
446
  case '&#x27;':
447
447
  return "'";
@@ -450,6 +450,8 @@ export const unescapeString = (str) => str.replace(/&quot;|&nbsp;|nbsp;|&#x27;/g
450
450
  case '&nbsp;':
451
451
  case 'nbsp;':
452
452
  return ' ';
453
+ case '&amp;':
454
+ return '&';
453
455
  default:
454
456
  return match;
455
457
  }
@@ -3,4 +3,5 @@
3
3
  * Asynchronously loads the component for TemplateListing
4
4
  *
5
5
  */
6
+ /// <reference types="react" />
6
7
  export declare const TemplateListing: (props: import("./types").TemplateListingProps<{}>) => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.930",
3
+ "version": "1.3.5-beta.931",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",