@oneblink/apps-react 2.14.1-beta.3 → 2.14.1-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.
@@ -8,7 +8,7 @@ export default function useReplaceableHTML(text) {
|
|
8
8
|
const html = React.useMemo(() => sanitizeHtml(textWithIndex), [textWithIndex]);
|
9
9
|
const { formSubmissionModel, elements } = useFormSubmissionModel();
|
10
10
|
return React.useMemo(() => {
|
11
|
-
return localisationService.
|
11
|
+
return localisationService.replaceInjectablesWithElementValues(html, {
|
12
12
|
submission: formSubmissionModel,
|
13
13
|
formElements: elements,
|
14
14
|
});
|
@@ -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,eAAe,CAAA;AAExC,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,
|
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,eAAe,CAAA;AAExC,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 '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.1-beta.
|
4
|
+
"version": "2.14.1-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"
|
@@ -47,7 +47,7 @@
|
|
47
47
|
"@mui/lab": "^5.0.0-alpha.95",
|
48
48
|
"@mui/material": "^5.10.1",
|
49
49
|
"@mui/x-date-pickers": "^5.0.0-beta.6",
|
50
|
-
"@oneblink/apps": "^3.2.0-beta.
|
50
|
+
"@oneblink/apps": "^3.2.0-beta.4",
|
51
51
|
"@oneblink/release-cli": "^2.0.2",
|
52
52
|
"@oneblink/types": "github:oneblink/types",
|
53
53
|
"@types/blueimp-load-image": "^5.16.0",
|