@pushwoosh/dumb-components 1.1.217 → 1.1.218
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,4 +1,4 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
2
|
import type { WhatsAppFormattedTextProps } from './types';
|
|
3
|
-
/** Renders message text with WhatsApp inline markup applied. */
|
|
3
|
+
/** Renders message text with WhatsApp inline markup applied and personalization tokens as chips. */
|
|
4
4
|
export declare function WhatsAppFormattedText(props: WhatsAppFormattedTextProps): ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment } from 'react';
|
|
3
2
|
import { Text } from '@pushwoosh/kit-typography';
|
|
3
|
+
import { DynamicContentText } from '../../../shared/dynamicContent';
|
|
4
4
|
import { parseWhatsAppMarkup } from '../../helpers';
|
|
5
5
|
const TAGS = {
|
|
6
6
|
bold: 'b',
|
|
@@ -11,7 +11,7 @@ function renderNodes(nodes) {
|
|
|
11
11
|
return nodes.map((node, index) => {
|
|
12
12
|
const key = `${index}-${node.style || 'text'}`;
|
|
13
13
|
if (!node.style) {
|
|
14
|
-
return _jsx(
|
|
14
|
+
return _jsx(DynamicContentText, {
|
|
15
15
|
children: node.text
|
|
16
16
|
}, key);
|
|
17
17
|
}
|
|
@@ -28,7 +28,7 @@ function renderNodes(nodes) {
|
|
|
28
28
|
}, key);
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
/** Renders message text with WhatsApp inline markup applied. */
|
|
31
|
+
/** Renders message text with WhatsApp inline markup applied and personalization tokens as chips. */
|
|
32
32
|
export function WhatsAppFormattedText(props) {
|
|
33
33
|
const {
|
|
34
34
|
text
|