@evoke-platform/ui-components 1.0.2-testing.0 → 1.0.2-testing.1
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/dist/published/components/custom/Form/FormComponents/FormFieldComponent.js +3 -3
- package/dist/published/components/custom/Form/FormComponents/ObjectComponent/ObjectPropertyInput.js +2 -2
- package/dist/published/components/custom/Form/FormComponents/RepeatableFieldComponent/ManyToMany/DropdownRepeatableFieldInput.js +2 -2
- package/package.json +2 -2
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ReactComponent } from '@formio/react';
|
2
|
-
import Handlebars from 'handlebars';
|
3
2
|
import { isArray, isEmpty, isNil, uniq } from 'lodash';
|
4
3
|
import { DateTime } from 'luxon';
|
4
|
+
import Handlebars from 'no-eval-handlebars';
|
5
5
|
import React from 'react';
|
6
6
|
import ReactDOM from 'react-dom';
|
7
7
|
import { FormField } from '../../../custom';
|
@@ -354,7 +354,7 @@ export class FormFieldComponent extends ReactComponent {
|
|
354
354
|
let { minDate, maxDate } = validate;
|
355
355
|
if (minDate && !dateRegex.test(minDate)) {
|
356
356
|
try {
|
357
|
-
minDate = Handlebars.
|
357
|
+
minDate = Handlebars.compileAST(minDate)(data);
|
358
358
|
}
|
359
359
|
catch (err) {
|
360
360
|
console.log(err);
|
@@ -362,7 +362,7 @@ export class FormFieldComponent extends ReactComponent {
|
|
362
362
|
}
|
363
363
|
if (maxDate && !dateRegex.test(maxDate)) {
|
364
364
|
try {
|
365
|
-
maxDate = Handlebars.
|
365
|
+
maxDate = Handlebars.compileAST(maxDate)(data);
|
366
366
|
}
|
367
367
|
catch (err) {
|
368
368
|
console.log(err);
|
package/dist/published/components/custom/Form/FormComponents/ObjectComponent/ObjectPropertyInput.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import cleanDeep from 'clean-deep';
|
2
|
-
import Handlebars from 'handlebars';
|
3
2
|
import { cloneDeep, debounce, isEmpty, isNil } from 'lodash';
|
3
|
+
import Handlebars from 'no-eval-handlebars';
|
4
4
|
import React, { useCallback, useEffect, useState } from 'react';
|
5
5
|
import { Close } from '../../../../../icons';
|
6
6
|
import { Autocomplete, Button, Dialog, IconButton, Link, Paper, TextField, Tooltip, Typography, } from '../../../../core';
|
@@ -132,7 +132,7 @@ export const ObjectPropertyInput = (props) => {
|
|
132
132
|
setOpenCreateDialog(false);
|
133
133
|
};
|
134
134
|
const compileExpression = (expression, instance) => {
|
135
|
-
const template = Handlebars.
|
135
|
+
const template = Handlebars.compileAST(expression);
|
136
136
|
return instance ? template(instance) : undefined;
|
137
137
|
};
|
138
138
|
const navigationSlug = defaultPages && property.objectId && defaultPages[property.objectId];
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import Handlebars from 'handlebars';
|
2
1
|
import { difference, isEmpty, isObject } from 'lodash';
|
2
|
+
import Handlebars from 'no-eval-handlebars';
|
3
3
|
import React, { useEffect, useState } from 'react';
|
4
4
|
import { FormField } from '../../../..';
|
5
5
|
import { Snackbar, TextField, Typography } from '../../../../../core';
|
@@ -60,7 +60,7 @@ export const DropdownRepeatableFieldInput = (props) => {
|
|
60
60
|
}
|
61
61
|
};
|
62
62
|
const compileExpression = (instance, expression) => {
|
63
|
-
const template = Handlebars.
|
63
|
+
const template = Handlebars.compileAST(expression);
|
64
64
|
return template(instance);
|
65
65
|
};
|
66
66
|
return (React.createElement(React.Fragment, null, !readOnly ? (property && (React.createElement(React.Fragment, null,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@evoke-platform/ui-components",
|
3
|
-
"version": "1.0.2-testing.
|
3
|
+
"version": "1.0.2-testing.1",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/published/index.js",
|
6
6
|
"module": "dist/published/index.js",
|
@@ -114,11 +114,11 @@
|
|
114
114
|
"eslint-plugin-no-inline-styles": "^1.0.5",
|
115
115
|
"flat": "^6.0.1",
|
116
116
|
"formiojs": "^4.15.0-rc.23",
|
117
|
-
"handlebars": "^4.7.8",
|
118
117
|
"html-react-parser": "^5.1.18",
|
119
118
|
"luxon": "^2.5.2",
|
120
119
|
"nanoid": "^5.0.8",
|
121
120
|
"nanoid-dictionary": "^4.3.0",
|
121
|
+
"no-eval-handlebars": "^1.0.2",
|
122
122
|
"pluralize": "^8.0.0",
|
123
123
|
"pretty-bytes": "^6.1.1",
|
124
124
|
"react-dropzone": "^14.2.2",
|