@evoke-platform/ui-components 1.0.2-testing.0 → 1.0.2-testing.2
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/Common/Form.js +1 -1
- 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/dist/published/styles/form-component.css +42 -42
- package/package.json +2 -2
@@ -424,7 +424,7 @@ export function Form(props) {
|
|
424
424
|
},
|
425
425
|
],
|
426
426
|
};
|
427
|
-
return (React.createElement(Box,
|
427
|
+
return (React.createElement(Box, null,
|
428
428
|
componentProps.length ? (React.createElement(FormIO, { key: closeModal ? undefined : formKey, form: {
|
429
429
|
display: 'form',
|
430
430
|
components: componentProps,
|
@@ -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,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
.
|
1
|
+
.alert-danger {
|
2
2
|
background-color: #f8d7da;
|
3
3
|
border-color: #f5c6cb;
|
4
4
|
color: #721c24;
|
@@ -8,36 +8,36 @@
|
|
8
8
|
font-family: Arial, Helvetica, sans-serif;
|
9
9
|
}
|
10
10
|
|
11
|
-
.
|
11
|
+
.error {
|
12
12
|
display: none;
|
13
13
|
}
|
14
14
|
|
15
|
-
.
|
15
|
+
.alert-success {
|
16
16
|
display: none;
|
17
17
|
}
|
18
18
|
|
19
|
-
.
|
19
|
+
.text-muted {
|
20
20
|
display: none;
|
21
21
|
}
|
22
22
|
|
23
|
-
.
|
23
|
+
.formio-component-Section > .card {
|
24
24
|
display: flex;
|
25
25
|
flex-grow: 1;
|
26
26
|
margin-top: -20px;
|
27
27
|
}
|
28
|
-
.
|
28
|
+
.formio-component-Section > .card > .card-header {
|
29
29
|
border-right: 1px solid #919eab32;
|
30
30
|
}
|
31
|
-
.
|
31
|
+
.formio-component-Section > .card > .card-header > .card-header-tabs {
|
32
32
|
padding: 0px !important;
|
33
33
|
margin-left: -20px;
|
34
34
|
}
|
35
|
-
.
|
35
|
+
.formio-component-Section > .card > .card-header > .card-header-tabs > .nav-item {
|
36
36
|
list-style-type: none;
|
37
37
|
width: 190px;
|
38
38
|
min-height: 55px;
|
39
39
|
}
|
40
|
-
.
|
40
|
+
.formio-component-Section > .card > .card-header > .card-header-tabs > .nav-item .active {
|
41
41
|
background: var(--07-grey-100, #f9fafb);
|
42
42
|
border-left: 4px solid var(--01-primary-03-main, #0075a7);
|
43
43
|
display: block;
|
@@ -45,27 +45,27 @@
|
|
45
45
|
padding: 15px 10px 15px 19px !important;
|
46
46
|
}
|
47
47
|
|
48
|
-
.
|
48
|
+
.formio-component-Section > .card > .card-header > .card-header-tabs > .nav-item > .nav-link {
|
49
49
|
color: #000000 !important;
|
50
50
|
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
51
51
|
display: block;
|
52
52
|
}
|
53
|
-
.
|
53
|
+
.formio-component-Section > .card > .card-header > .card-header-tabs > .nav-item > .nav-link .active {
|
54
54
|
color: #000000 !important;
|
55
55
|
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
|
56
56
|
}
|
57
|
-
.
|
57
|
+
.formio-component-Section > .card > .card-header > .card-header-tabs > .nav-item > .nav-link {
|
58
58
|
color: grey;
|
59
59
|
text-decoration: none;
|
60
60
|
padding: 15px 10px 15px 23px;
|
61
61
|
}
|
62
|
-
.
|
62
|
+
.formio-component-Section > .card > .card-body {
|
63
63
|
flex-grow: 1;
|
64
64
|
margin: 10px 0px 0px 10px;
|
65
65
|
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
66
66
|
}
|
67
67
|
|
68
|
-
.form-
|
68
|
+
.form-group > .col-form-label {
|
69
69
|
display: flex;
|
70
70
|
width: 98%;
|
71
71
|
background-color: #f4f6f8;
|
@@ -77,76 +77,76 @@
|
|
77
77
|
margin-top: 10px;
|
78
78
|
}
|
79
79
|
|
80
|
-
|
80
|
+
fieldset {
|
81
81
|
border: none;
|
82
82
|
padding: 0;
|
83
83
|
}
|
84
84
|
|
85
|
-
|
85
|
+
fieldset .formio-component {
|
86
86
|
padding-left: 5px;
|
87
87
|
}
|
88
88
|
|
89
|
-
.
|
89
|
+
.row {
|
90
90
|
display: flex;
|
91
91
|
margin-right: -15px;
|
92
92
|
margin-left: -15px;
|
93
93
|
}
|
94
94
|
|
95
|
-
.
|
95
|
+
.formio-component-htmlelement {
|
96
96
|
font-family: 'Roboto', Helvetica, Arial, sans-serif;
|
97
97
|
}
|
98
98
|
|
99
|
-
.
|
100
|
-
.
|
101
|
-
.
|
102
|
-
.
|
103
|
-
.
|
104
|
-
.
|
105
|
-
.
|
106
|
-
.
|
107
|
-
.
|
108
|
-
.
|
109
|
-
.
|
110
|
-
.
|
99
|
+
.col-md-1,
|
100
|
+
.col-md-2,
|
101
|
+
.col-md-3,
|
102
|
+
.col-md-4,
|
103
|
+
.col-md-5,
|
104
|
+
.col-md-6,
|
105
|
+
.col-md-7,
|
106
|
+
.col-md-8,
|
107
|
+
.col-md-9,
|
108
|
+
.col-md-10,
|
109
|
+
.col-md-11,
|
110
|
+
.col-md-12 {
|
111
111
|
position: relative;
|
112
112
|
min-height: 1px;
|
113
113
|
padding-right: 15px;
|
114
114
|
padding-left: 15px;
|
115
115
|
float: left;
|
116
116
|
}
|
117
|
-
.
|
117
|
+
.col-md-12 {
|
118
118
|
width: 100%;
|
119
119
|
}
|
120
|
-
.
|
120
|
+
.col-md-11 {
|
121
121
|
width: 91.66666667%;
|
122
122
|
}
|
123
|
-
.
|
123
|
+
.col-md-10 {
|
124
124
|
width: 83.33333333%;
|
125
125
|
}
|
126
|
-
.
|
126
|
+
.col-md-9 {
|
127
127
|
width: 75%;
|
128
128
|
}
|
129
|
-
.
|
129
|
+
.col-md-8 {
|
130
130
|
width: 66.66666667%;
|
131
131
|
}
|
132
|
-
.
|
132
|
+
.col-md-7 {
|
133
133
|
width: 58.33333333%;
|
134
134
|
}
|
135
|
-
.
|
135
|
+
.col-md-6 {
|
136
136
|
width: 50%;
|
137
137
|
}
|
138
|
-
.
|
138
|
+
.col-md-5 {
|
139
139
|
width: 41.66666667%;
|
140
140
|
}
|
141
|
-
.
|
141
|
+
.col-md-4 {
|
142
142
|
width: 33.33333333%;
|
143
143
|
}
|
144
|
-
.
|
144
|
+
.col-md-3 {
|
145
145
|
width: 25%;
|
146
146
|
}
|
147
|
-
.
|
147
|
+
.col-md-2 {
|
148
148
|
width: 16.66666667%;
|
149
149
|
}
|
150
|
-
.
|
150
|
+
.col-md-1 {
|
151
151
|
width: 8.33333333%;
|
152
152
|
}
|
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.2",
|
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",
|