@evoke-platform/ui-components 1.0.2-testing.1 → 1.0.2-testing.3
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,7 +1,7 @@
|
|
1
1
|
import { useApp, useAuthenticationContext, } from '@evoke-platform/context';
|
2
2
|
import { Components, Form as FormIO, Utils } from '@formio/react';
|
3
3
|
import { flatten } from 'flat';
|
4
|
-
import { isEqual, toPairs } from 'lodash';
|
4
|
+
import { isEmpty, isEqual, toPairs } from 'lodash';
|
5
5
|
import React, { useEffect, useRef, useState } from 'react';
|
6
6
|
import '../../../../styles/form-component.css';
|
7
7
|
import { Skeleton, Snackbar } from '../../../core';
|
@@ -320,7 +320,9 @@ export function Form(props) {
|
|
320
320
|
const submittedFields = {};
|
321
321
|
for (const field in submission.data) {
|
322
322
|
const value = submission.data[field];
|
323
|
-
if (value === '' ||
|
323
|
+
if (value === '' ||
|
324
|
+
(Array.isArray(value) && !value.length) ||
|
325
|
+
(typeof value === 'object' && isEmpty(value))) {
|
324
326
|
submittedFields[field] = null;
|
325
327
|
}
|
326
328
|
else {
|
@@ -424,7 +426,7 @@ export function Form(props) {
|
|
424
426
|
},
|
425
427
|
],
|
426
428
|
};
|
427
|
-
return (React.createElement(Box,
|
429
|
+
return (React.createElement(Box, null,
|
428
430
|
componentProps.length ? (React.createElement(FormIO, { key: closeModal ? undefined : formKey, form: {
|
429
431
|
display: 'form',
|
430
432
|
components: componentProps,
|
@@ -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
|
}
|