@oneblink/apps-react 2.14.2-beta.2 → 2.14.2-beta.4
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.
@@ -2,7 +2,7 @@ import { localisationService } from '@oneblink/apps';
|
|
2
2
|
import * as React from 'react';
|
3
3
|
import useFormSubmissionModel from './useFormSubmissionModelContext';
|
4
4
|
import { useRepeatableSetIndexText } from '../form-elements/FormElementRepeatableSet';
|
5
|
-
import sanitizeHtml from 'sanitize-html';
|
5
|
+
import sanitizeHtml from '../services/sanitize-html';
|
6
6
|
export default function useReplaceableHTML(text) {
|
7
7
|
const textWithIndex = useRepeatableSetIndexText(text);
|
8
8
|
const html = React.useMemo(() => sanitizeHtml(textWithIndex), [textWithIndex]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useReplaceableHTML.js","sourceRoot":"","sources":["../../src/hooks/useReplaceableHTML.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,sBAAsB,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAA;AACrF,OAAO,YAAY,MAAM,
|
1
|
+
{"version":3,"file":"useReplaceableHTML.js","sourceRoot":"","sources":["../../src/hooks/useReplaceableHTML.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,sBAAsB,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAA;AACrF,OAAO,YAAY,MAAM,2BAA2B,CAAA;AAEpD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,IAAY;IACrD,MAAM,aAAa,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAA;IACrD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAA;IAC9E,MAAM,EAAE,mBAAmB,EAAE,QAAQ,EAAE,GAAG,sBAAsB,EAAE,CAAA;IAClE,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,OAAO,mBAAmB,CAAC,mCAAmC,CAAC,IAAI,EAAE;YACnE,UAAU,EAAE,mBAAmB;YAC/B,YAAY,EAAE,QAAQ;SACvB,CAAC,CAAA;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,mBAAmB,EAAE,IAAI,CAAC,CAAC,CAAA;AAC3C,CAAC","sourcesContent":["import { localisationService } from '@oneblink/apps'\nimport * as React from 'react'\nimport useFormSubmissionModel from './useFormSubmissionModelContext'\nimport { useRepeatableSetIndexText } from '../form-elements/FormElementRepeatableSet'\nimport sanitizeHtml from '../services/sanitize-html'\n\nexport default function useReplaceableHTML(text: string) {\n const textWithIndex = useRepeatableSetIndexText(text)\n const html = React.useMemo(() => sanitizeHtml(textWithIndex), [textWithIndex])\n const { formSubmissionModel, elements } = useFormSubmissionModel()\n return React.useMemo(() => {\n return localisationService.replaceInjectablesWithElementValues(html, {\n submission: formSubmissionModel,\n formElements: elements,\n })\n }, [elements, formSubmissionModel, html])\n}\n"]}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@oneblink/apps-react",
|
3
3
|
"description": "Helper functions for OneBlink apps in ReactJS.",
|
4
|
-
"version": "2.14.2-beta.
|
4
|
+
"version": "2.14.2-beta.4",
|
5
5
|
"author": "OneBlink <developers@oneblink.io> (https://oneblink.io)",
|
6
6
|
"bugs": {
|
7
7
|
"url": "https://github.com/oneblink/apps-react/issues"
|
@@ -1 +0,0 @@
|
|
1
|
-
export default function useSanitizedHTML(text: string): string;
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useSanitizedHTML.js","sourceRoot":"","sources":["../../src/hooks/useSanitizedHTML.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,YAAY,MAAM,eAAe,CAAA;AAExC,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,IAAY;IACnD,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;AACxD,CAAC","sourcesContent":["import * as React from 'react'\nimport sanitizeHtml from 'sanitize-html'\n\nexport default function useSanitizedHTML(text: string) {\n return React.useMemo(() => sanitizeHtml(text), [text])\n}\n"]}
|