@oneblink/apps-react 3.1.0-beta.7 → 3.1.0-beta.9
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
|
-
import { localisationService } from '@oneblink/apps';
|
1
|
+
import { localisationService, authService } from '@oneblink/apps';
|
2
2
|
import * as React from 'react';
|
3
3
|
import useFormSubmissionModel from './useFormSubmissionModelContext';
|
4
4
|
import { useRepeatableSetIndexText } from '../form-elements/FormElementRepeatableSet';
|
@@ -9,6 +9,7 @@ export default function useReplaceableText(text) {
|
|
9
9
|
return localisationService.replaceInjectablesWithElementValues(textWithIndex, {
|
10
10
|
submission: formSubmissionModel,
|
11
11
|
formElements: elements,
|
12
|
+
userProfile: authService.getUserProfile() || undefined,
|
12
13
|
});
|
13
14
|
}, [elements, formSubmissionModel, textWithIndex]);
|
14
15
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useReplaceableText.js","sourceRoot":"","sources":["../../src/hooks/useReplaceableText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;
|
1
|
+
{"version":3,"file":"useReplaceableText.js","sourceRoot":"","sources":["../../src/hooks/useReplaceableText.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,sBAAsB,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAA;AAErF,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,IAAY;IACrD,MAAM,aAAa,GAAG,yBAAyB,CAAC,IAAI,CAAC,CAAA;IACrD,MAAM,EAAE,mBAAmB,EAAE,QAAQ,EAAE,GAAG,sBAAsB,EAAE,CAAA;IAClE,OAAO,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACxB,OAAO,mBAAmB,CAAC,mCAAmC,CAC5D,aAAa,EACb;YACE,UAAU,EAAE,mBAAmB;YAC/B,YAAY,EAAE,QAAQ;YACtB,WAAW,EAAE,WAAW,CAAC,cAAc,EAAE,IAAI,SAAS;SACvD,CACF,CAAA;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,mBAAmB,EAAE,aAAa,CAAC,CAAC,CAAA;AACpD,CAAC","sourcesContent":["import { localisationService, authService } from '@oneblink/apps'\nimport * as React from 'react'\nimport useFormSubmissionModel from './useFormSubmissionModelContext'\nimport { useRepeatableSetIndexText } from '../form-elements/FormElementRepeatableSet'\n\nexport default function useReplaceableText(text: string) {\n const textWithIndex = useRepeatableSetIndexText(text)\n const { formSubmissionModel, elements } = useFormSubmissionModel()\n return React.useMemo(() => {\n return localisationService.replaceInjectablesWithElementValues(\n textWithIndex,\n {\n submission: formSubmissionModel,\n formElements: elements,\n userProfile: authService.getUserProfile() || undefined,\n },\n )\n }, [elements, formSubmissionModel, textWithIndex])\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": "3.1.0-beta.
|
4
|
+
"version": "3.1.0-beta.9",
|
5
5
|
"author": "OneBlink <developers@oneblink.io> (https://oneblink.io)",
|
6
6
|
"bugs": {
|
7
7
|
"url": "https://github.com/oneblink/apps-react/issues"
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"@emotion/react": "^11.10.6",
|
12
12
|
"@emotion/styled": "^11.10.6",
|
13
13
|
"@mui/icons-material": "^5.11.11",
|
14
|
-
"@oneblink/sdk-core": "^
|
14
|
+
"@oneblink/sdk-core": "^3.0.0-beta.1",
|
15
15
|
"@react-google-maps/api": "2.18.1",
|
16
16
|
"blueimp-load-image": "^5.16.0",
|
17
17
|
"bulma": "^0.9.3",
|
@@ -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": "^4.1.0-beta.
|
50
|
+
"@oneblink/apps": "^4.1.0-beta.7",
|
51
51
|
"@oneblink/release-cli": "^2.0.2",
|
52
52
|
"@oneblink/types": "github:oneblink/types",
|
53
53
|
"@types/blueimp-load-image": "^5.16.0",
|