@capillarytech/creatives-library 8.0.99 → 8.0.101-alpha.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.99",
4
+ "version": "8.0.101-alpha.0",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -1 +1,9 @@
1
1
  export const OUTBOUND = 'OUTBOUND';
2
+ export const GLOBAL_CONVERT_OPTIONS = {
3
+ selectors: [
4
+ ...[1, 2, 3, 4, 5, 6].map(level => ({
5
+ selector: `h${level}`,
6
+ options: { uppercase: false }
7
+ }))
8
+ ]
9
+ };
@@ -52,7 +52,7 @@ import { checkSupport, extractNames, preprocessHtml, validateIfTagClosed } from
52
52
  import { SMS, MOBILE_PUSH, LINE, ENABLE_AI_SUGGESTIONS,AI_CONTENT_BOT_DISABLED, EMAIL, LIQUID_SUPPORTED_CHANNELS } from '../../v2Containers/CreativesContainer/constants';
53
53
  import globalMessages from '../../v2Containers/Cap/messages';
54
54
  import { convert } from 'html-to-text';
55
- import { OUTBOUND } from './constants';
55
+ import { GLOBAL_CONVERT_OPTIONS, OUTBOUND } from './constants';
56
56
  import { GET_TRANSLATION_MAPPED } from '../../containers/TagList/constants';
57
57
  import moment from 'moment';
58
58
  import { CUSTOMER_BARCODE_TAG , COPY_OF, ENTRY_TRIGGER_TAG_REGEX} from '../../containers/App/constants';
@@ -1092,7 +1092,7 @@ class FormBuilder extends React.Component { // eslint-disable-line react/prefer-
1092
1092
  const templateContent = this.state.formData?.base?.en?.["template-content"] || "";
1093
1093
  //Converts given HTML content to plain text string.
1094
1094
  const content = convert(
1095
- templateContent
1095
+ templateContent, GLOBAL_CONVERT_OPTIONS
1096
1096
  );
1097
1097
  /*
1098
1098
  The `handleResult` function is used as a callback for `getLiquidTags` to handle the results post-processing.