rb-document-form-constructor 0.9.23 → 0.9.25
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/rb-document-form-constructor.esm.js +8419 -0
- package/dist/rb-document-form-constructor.min.js +7 -0
- package/dist/rb-document-form-constructor.ssr.js +8373 -0
- package/dist/scss/_global.scss +3 -0
- package/dist/scss/_variables.scss +17 -0
- package/dist/scss/components/_doc-form.scss +36 -0
- package/dist/scss/components/_doc-template-constructor.scss +112 -0
- package/dist/scss/components/_doc-template-facet-list.scss +46 -0
- package/dist/scss/components/_doc-template-field-sidebar.scss +52 -0
- package/dist/scss/components/_field-rule-form-modal.scss +27 -0
- package/dist/scss/components.scss +7 -0
- package/package.json +1 -1
- package/src/components/DocTemplateConstructor.vue +5 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// DocTemplateFacetList
|
|
2
|
+
$rb-facet-list-border-color: $border-color !default;
|
|
3
|
+
|
|
4
|
+
// DocTemplateConstructor
|
|
5
|
+
$rb-doc-template-constructor-title-color: #333 !default;
|
|
6
|
+
$rb-doc-template-constructor-title-font-size: 16px !default;
|
|
7
|
+
$rb-doc-template-section-bg: #E9EAEA !default;
|
|
8
|
+
$rb-doc-template-constructor-form-column-border-color: #D5D5D6;
|
|
9
|
+
|
|
10
|
+
// DocTemplateFieldSidebar
|
|
11
|
+
$rb-doc-template-field-sidebar-font-size-lg: 1rem !default;
|
|
12
|
+
$rb-doc-template-field-sidebar-top: 72px !default;
|
|
13
|
+
$rb-doc-template-field-sidebar-close-button-left: -46px !default;
|
|
14
|
+
|
|
15
|
+
// DocForm
|
|
16
|
+
$rb-doc-form-font-size-lg: 1rem !default;
|
|
17
|
+
$rb-doc-form-legend-line-height: $line-height-base !default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.rb-doc-form {
|
|
2
|
+
h4 {
|
|
3
|
+
font-weight: bold;
|
|
4
|
+
font-size: $rb-doc-form-font-size-lg;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.rb-form-section {
|
|
8
|
+
padding-bottom: 10px;
|
|
9
|
+
padding-top: 10px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.rb-form-column {
|
|
13
|
+
flex: 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.rb-form-column:first-child {
|
|
17
|
+
margin-left: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.rb-form-column:last-child {
|
|
21
|
+
margin-right: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.rb-form-column {
|
|
25
|
+
margin-left: 10px;
|
|
26
|
+
margin-right: 10px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
legend.col-form-label {
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
display: block;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
.rb-doc-template-constructor {
|
|
2
|
+
height: 100%;
|
|
3
|
+
|
|
4
|
+
h4 {
|
|
5
|
+
color: $rb-doc-template-constructor-title-color;
|
|
6
|
+
font-weight: bold;
|
|
7
|
+
font-size: $rb-doc-template-constructor-title-font-size;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.rb-form-constructor {
|
|
11
|
+
height: 100%;
|
|
12
|
+
overflow-y: auto;
|
|
13
|
+
background-color: white;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.rb-constructor-toolbar {
|
|
17
|
+
padding: 16px 16px 16px 16px;
|
|
18
|
+
background-color: white;
|
|
19
|
+
border-bottom: 1px solid $border-color;
|
|
20
|
+
|
|
21
|
+
h4 {
|
|
22
|
+
margin-bottom: 0;
|
|
23
|
+
line-height: 38px;
|
|
24
|
+
margin-right: 10px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.btn {
|
|
28
|
+
margin-left: 10px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.rb-constructor-body {
|
|
33
|
+
padding: 16px;
|
|
34
|
+
|
|
35
|
+
.card {
|
|
36
|
+
border-width: 2px;
|
|
37
|
+
border-style: dashed;
|
|
38
|
+
background-color: $rb-doc-template-section-bg;
|
|
39
|
+
|
|
40
|
+
.card-header, .card-body {
|
|
41
|
+
background-color: $rb-doc-template-section-bg;
|
|
42
|
+
border-color: $border-color;
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.rb-form-card {
|
|
48
|
+
margin-bottom: 20px;
|
|
49
|
+
|
|
50
|
+
.rb-form-column {
|
|
51
|
+
flex: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.card-header {
|
|
55
|
+
border-bottom-width: 0;
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: row;
|
|
58
|
+
|
|
59
|
+
.rb-text {
|
|
60
|
+
font-size: 16px;
|
|
61
|
+
line-height: 24px;
|
|
62
|
+
font-weight: bold;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.rb-icon {
|
|
66
|
+
line-height: 24px;
|
|
67
|
+
font-size: 16px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.rb-form-column {
|
|
73
|
+
.form-group:hover {
|
|
74
|
+
legend.col-form-label .rb-actions {
|
|
75
|
+
visibility: visible;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
legend.col-form-label {
|
|
80
|
+
font-size: $font-size-base;
|
|
81
|
+
font-weight: bold;
|
|
82
|
+
margin-bottom: 12px;
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: row;
|
|
85
|
+
color: $rb-doc-template-constructor-title-color;
|
|
86
|
+
|
|
87
|
+
.rb-text {
|
|
88
|
+
flex: 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.rb-actions {
|
|
92
|
+
visibility: hidden;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.form-control:disabled,
|
|
97
|
+
.btn.disabled {
|
|
98
|
+
background-color: white;
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.rb-form-column {
|
|
104
|
+
padding: 10px;
|
|
105
|
+
border: 2px dashed $rb-doc-template-constructor-form-column-border-color;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.rb-form-column:not(.rb-single-column) {
|
|
109
|
+
margin: 0 10px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.rb-facets-sidebar {
|
|
2
|
+
height: 100%;
|
|
3
|
+
width: 264px;
|
|
4
|
+
overflow-y: auto;
|
|
5
|
+
background-color: white;
|
|
6
|
+
border-right: 1px solid $rb-facet-list-border-color;
|
|
7
|
+
|
|
8
|
+
h4 {
|
|
9
|
+
padding: 24px 16px 16px 16px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
h6 {
|
|
13
|
+
padding-left: 16px;
|
|
14
|
+
padding-right: 16px;
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
form {
|
|
19
|
+
padding-left: 16px;
|
|
20
|
+
padding-right: 16px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.rb-facet-label {
|
|
24
|
+
font-weight: bold;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.rb-facet-label-sub-text {
|
|
28
|
+
font-size: 13px;
|
|
29
|
+
color: #AAABAD;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.rb-facet-list {
|
|
33
|
+
.rb-facet {
|
|
34
|
+
padding: 10px 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
& > .rb-facet:not(:last-child) {
|
|
38
|
+
border-bottom: 1px solid $rb-facet-list-border-color;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.list-group-item {
|
|
42
|
+
border-radius: 0;
|
|
43
|
+
border: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.rb-doc-template-field-sidebar {
|
|
2
|
+
.dropdown-menu.show {
|
|
3
|
+
max-width: 288px;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.b-sidebar {
|
|
7
|
+
top: $rb-doc-template-field-sidebar-top;
|
|
8
|
+
padding-bottom: $rb-doc-template-field-sidebar-top;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.rb-sidebar-close-btn {
|
|
12
|
+
opacity: 0.5;
|
|
13
|
+
position: absolute;
|
|
14
|
+
left: $rb-doc-template-field-sidebar-close-button-left;
|
|
15
|
+
border-radius: 0;
|
|
16
|
+
padding-left: 4px;
|
|
17
|
+
padding-right: 4px;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
|
|
20
|
+
.rb-icon {
|
|
21
|
+
font-size: 24px;
|
|
22
|
+
line-height: 24px;
|
|
23
|
+
vertical-align: middle;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
form {
|
|
28
|
+
padding: 10px 16px;
|
|
29
|
+
|
|
30
|
+
.rb-form-section {
|
|
31
|
+
margin-bottom: 20px;
|
|
32
|
+
|
|
33
|
+
& > .rb-title {
|
|
34
|
+
font-size: $rb-doc-template-field-sidebar-font-size-lg;
|
|
35
|
+
font-weight: bold;
|
|
36
|
+
margin-bottom: 10px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
h4 {
|
|
42
|
+
margin-bottom: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.form-group.rb-immutable .rb-text {
|
|
46
|
+
font-size: $rb-doc-template-field-sidebar-font-size-lg;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.custom-checkbox {
|
|
50
|
+
margin-bottom: 12px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
$rb-field-rule-btn-toolbar-bg: rgba(0, 0, 0, 0.03) !default;
|
|
2
|
+
|
|
3
|
+
.rb-field-rule-form-modal {
|
|
4
|
+
.modal-body {
|
|
5
|
+
padding: 0;
|
|
6
|
+
|
|
7
|
+
& > .card {
|
|
8
|
+
border: none;
|
|
9
|
+
border-radius: 0;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.btn-toolbar {
|
|
14
|
+
border-top-left-radius: $border-radius;
|
|
15
|
+
border-top-right-radius: $border-radius;
|
|
16
|
+
background-color: $rb-field-rule-btn-toolbar-bg;
|
|
17
|
+
padding: 10px 10px;
|
|
18
|
+
border-top: 1px solid $border-color;
|
|
19
|
+
border-left: 1px solid $border-color;
|
|
20
|
+
border-right: 1px solid $border-color;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
textarea.form-control {
|
|
24
|
+
border-top-left-radius: 0;
|
|
25
|
+
border-top-right-radius: 0;
|
|
26
|
+
}
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -234,6 +234,11 @@ export default {
|
|
|
234
234
|
this.$set(field, 'defaultValue', undefined);
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
+
if (field.isSystem) {
|
|
238
|
+
const uniqHash = (Math.random() + 1).toString(36).substring(7);
|
|
239
|
+
this.$set(field, 'name', `${field.name}:${uniqHash}`);
|
|
240
|
+
}
|
|
241
|
+
|
|
237
242
|
let found = this.multipleFieldAreOnFormConfig(field);
|
|
238
243
|
if (found && !field.isSystem) {
|
|
239
244
|
this.removeFieldFromColumn(field, this.columnTo, newIndex);
|