expressa 1.1.2 → 1.1.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.
- package/.circleci/config.yml +1 -1
- package/listeners_validation.js +4 -0
- package/modules/admin/dist/index.html +1 -1
- package/modules/admin/dist/static/css/{chunk-7869.220d4af5.css → chunk-1059.220d4af5.css} +0 -0
- package/modules/admin/dist/static/css/{chunk-e80a.5ee55031.css → chunk-418a.5ee55031.css} +0 -0
- package/modules/admin/dist/static/css/chunk-787e.1d849865.css +1 -0
- package/modules/admin/dist/static/css/chunk-d0cd.97323951.css +1 -0
- package/modules/admin/dist/static/css/{chunk-759b.3a895a1e.css → chunk-f075.3a895a1e.css} +0 -0
- package/modules/admin/dist/static/css/chunk-libs.327ad89e.css +14 -0
- package/modules/admin/dist/static/js/{app.12d7fe96.js → app.4c984719.js} +1 -1
- package/modules/admin/dist/static/js/chunk-1059.e6aa7b61.js +1 -0
- package/modules/admin/dist/static/js/chunk-418a.e0987b3c.js +1 -0
- package/modules/admin/dist/static/js/chunk-787e.3ee96fce.js +1 -0
- package/modules/admin/dist/static/js/chunk-8bab.7052832d.js +2 -0
- package/modules/admin/dist/static/js/{chunk-23bd.5fa24c85.js.LICENSE.txt → chunk-8bab.7052832d.js.LICENSE.txt} +1 -1
- package/modules/admin/dist/static/js/chunk-d0cd.1781b9dd.js +1 -0
- package/modules/admin/dist/static/js/chunk-f075.315ceec1.js +1 -0
- package/modules/admin/dist/static/js/chunk-libs.06c38828.js +2 -0
- package/modules/admin/dist/static/js/{chunk-libs.b6f27cfe.js.LICENSE.txt → chunk-libs.06c38828.js.LICENSE.txt} +1 -1
- package/modules/admin/package.json +3 -3
- package/modules/admin/src/components/JSONEditor.vue +181 -180
- package/modules/admin/src/main.js +2 -2
- package/modules/admin/src/router/index.js +185 -185
- package/package.json +1 -1
- package/modules/admin/dist/static/css/chunk-36ca.e7e72230.css +0 -1
- package/modules/admin/dist/static/css/chunk-62f2.538cfd24.css +0 -1
- package/modules/admin/dist/static/css/chunk-libs.68e8d170.css +0 -14
- package/modules/admin/dist/static/js/chunk-23bd.5fa24c85.js +0 -2
- package/modules/admin/dist/static/js/chunk-36ca.eda87655.js +0 -1
- package/modules/admin/dist/static/js/chunk-62f2.ee07e11b.js +0 -1
- package/modules/admin/dist/static/js/chunk-759b.89a889b6.js +0 -1
- package/modules/admin/dist/static/js/chunk-7869.b7ab2c47.js +0 -1
- package/modules/admin/dist/static/js/chunk-e80a.cc0d79f4.js +0 -1
- package/modules/admin/dist/static/js/chunk-libs.b6f27cfe.js +0 -2
|
@@ -8,7 +8,7 @@ object-assign
|
|
|
8
8
|
* @license MIT */
|
|
9
9
|
|
|
10
10
|
/*!
|
|
11
|
-
* Bootstrap v4.6.
|
|
11
|
+
* Bootstrap v4.6.1 (https://getbootstrap.com/)
|
|
12
12
|
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
13
13
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
14
14
|
*/
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"eslint": "^7.0.0",
|
|
53
53
|
"eslint-friendly-formatter": "^4.0.1",
|
|
54
54
|
"eslint-loader": "^4.0.2",
|
|
55
|
-
"eslint-plugin-vue": "^
|
|
55
|
+
"eslint-plugin-vue": "^7.0.0",
|
|
56
56
|
"file-loader": "1.1.11",
|
|
57
57
|
"friendly-errors-webpack-plugin": "1.7.0",
|
|
58
|
-
"html-webpack-plugin": "4.0.0
|
|
58
|
+
"html-webpack-plugin": "^4.0.0",
|
|
59
59
|
"mini-css-extract-plugin": "0.4.1",
|
|
60
60
|
"node-notifier": "5.2.1",
|
|
61
61
|
"node-sass": "^6.0.1",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"postcss-url": "7.3.2",
|
|
69
69
|
"rimraf": "2.6.2",
|
|
70
70
|
"sass-loader": "7.0.3",
|
|
71
|
-
"script-ext-html-webpack-plugin": "2.
|
|
71
|
+
"script-ext-html-webpack-plugin": "^2.1.5",
|
|
72
72
|
"semver": "5.5.0",
|
|
73
73
|
"shelljs": "0.8.2",
|
|
74
74
|
"svg-sprite-loader": "3.8.0",
|
|
@@ -1,180 +1,181 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class="jsoneditor-vue" />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
const { JSONEditor } = require('@json-editor/json-editor/dist/jsoneditor')
|
|
9
|
-
import 'json-schema-editor'
|
|
10
|
-
export default {
|
|
11
|
-
props: {
|
|
12
|
-
value: {
|
|
13
|
-
type: Object,
|
|
14
|
-
default: () => {}
|
|
15
|
-
},
|
|
16
|
-
schema: {
|
|
17
|
-
type: Object,
|
|
18
|
-
default: () => {}
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
data() {
|
|
22
|
-
return {
|
|
23
|
-
editor: null,
|
|
24
|
-
error: false,
|
|
25
|
-
json: this.value,
|
|
26
|
-
internalChange: false
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
watch: {
|
|
30
|
-
/* value: {
|
|
31
|
-
handler: 'update'
|
|
32
|
-
} */
|
|
33
|
-
},
|
|
34
|
-
mounted() {
|
|
35
|
-
this.update()
|
|
36
|
-
},
|
|
37
|
-
methods: {
|
|
38
|
-
update() {
|
|
39
|
-
var options = {
|
|
40
|
-
schema: this.schema,
|
|
41
|
-
startval: this.value,
|
|
42
|
-
theme: 'bootstrap4',
|
|
43
|
-
iconlib: 'materialicons',
|
|
44
|
-
required_by_default: true,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
textarea.
|
|
62
|
-
textarea.classList.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this.
|
|
86
|
-
this.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
this.input
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this.input
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (this.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
this.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
this.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
if (this.
|
|
145
|
-
if (this.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
min-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
border
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
margin-
|
|
179
|
-
|
|
180
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div class="jsoneditor-vue" />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
const { JSONEditor } = require('@json-editor/json-editor/dist/jsoneditor')
|
|
9
|
+
import 'json-schema-editor'
|
|
10
|
+
export default {
|
|
11
|
+
props: {
|
|
12
|
+
value: {
|
|
13
|
+
type: Object,
|
|
14
|
+
default: () => {}
|
|
15
|
+
},
|
|
16
|
+
schema: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default: () => {}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
data() {
|
|
22
|
+
return {
|
|
23
|
+
editor: null,
|
|
24
|
+
error: false,
|
|
25
|
+
json: this.value,
|
|
26
|
+
internalChange: false
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
watch: {
|
|
30
|
+
/* value: {
|
|
31
|
+
handler: 'update'
|
|
32
|
+
} */
|
|
33
|
+
},
|
|
34
|
+
mounted() {
|
|
35
|
+
this.update()
|
|
36
|
+
},
|
|
37
|
+
methods: {
|
|
38
|
+
update() {
|
|
39
|
+
var options = {
|
|
40
|
+
schema: this.schema,
|
|
41
|
+
startval: this.value,
|
|
42
|
+
theme: 'bootstrap4',
|
|
43
|
+
iconlib: 'materialicons',
|
|
44
|
+
required_by_default: true,
|
|
45
|
+
show_opt_in: false,
|
|
46
|
+
}
|
|
47
|
+
if (this.editor) {
|
|
48
|
+
this.editor.destroy()
|
|
49
|
+
}
|
|
50
|
+
this.editor = new JSONEditor(this.$el.querySelector('.jsoneditor-vue'), options)
|
|
51
|
+
let first = true
|
|
52
|
+
this.editor.on('change', () => {
|
|
53
|
+
if (first) {
|
|
54
|
+
first = false
|
|
55
|
+
return
|
|
56
|
+
}
|
|
57
|
+
this.$emit('input', this.editor.getValue())
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
const makeEditJsonTextAreaExpandable = () => {
|
|
61
|
+
const textarea = document.querySelector('.je-modal .je-edit-json--textarea')
|
|
62
|
+
textarea.classList.remove('je-edit-json--textarea') // INFO: Had to remove this class to remove height and width property
|
|
63
|
+
textarea.classList.add('expandable-textarea')
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
makeEditJsonTextAreaExpandable()
|
|
67
|
+
},
|
|
68
|
+
onSave() {
|
|
69
|
+
this.$emit('json-save', this.json)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (JSONEditor) {
|
|
75
|
+
JSONEditor.defaults.resolvers.unshift(function(schema) {
|
|
76
|
+
if (schema.type === 'object' && schema.format === 'schema') {
|
|
77
|
+
return 'schema'
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// If no valid editor is returned, the next resolver function will be used
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
JSONEditor.defaults.editors.schema = class schema extends JSONEditor.AbstractEditor {
|
|
84
|
+
setValue(value, initial) {
|
|
85
|
+
this.value = value
|
|
86
|
+
this.schemaeditor.setValue(value)
|
|
87
|
+
this.onChange()
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
getValue() {
|
|
91
|
+
if (typeof this.schemaeditor !== 'undefined') { return this.schemaeditor.getValue() } else { return {} }
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
register() {
|
|
95
|
+
super.register()
|
|
96
|
+
if (!this.input) return
|
|
97
|
+
this.input.setAttribute('name', this.formname)
|
|
98
|
+
}
|
|
99
|
+
unregister() {
|
|
100
|
+
super.unregister()
|
|
101
|
+
if (!this.input) return
|
|
102
|
+
this.input.removeAttribute('name')
|
|
103
|
+
}
|
|
104
|
+
getNumColumns() {
|
|
105
|
+
return 12
|
|
106
|
+
}
|
|
107
|
+
build() {
|
|
108
|
+
var self = this
|
|
109
|
+
if (!this.options.compact) {
|
|
110
|
+
this.label = this.header = this.theme.getFormInputLabel(this.getTitle())
|
|
111
|
+
}
|
|
112
|
+
if (this.schema.description) this.description = this.theme.getFormInputDescription(this.schema.description)
|
|
113
|
+
if (this.options.compact) this.container.className += ' compact'
|
|
114
|
+
|
|
115
|
+
this.input = document.createElement('div')
|
|
116
|
+
this.control = this.theme.getFormControl(this.label, this.input, this.description)
|
|
117
|
+
|
|
118
|
+
if (this.schema.readOnly || this.schema.readonly) {
|
|
119
|
+
this.always_disabled = true
|
|
120
|
+
this.input.disabled = true
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
this.container.appendChild(this.control)
|
|
124
|
+
|
|
125
|
+
this.schemaeditor = new window.JSONSchemaEditor(this.input, {
|
|
126
|
+
startval: {}
|
|
127
|
+
})
|
|
128
|
+
this.schemaeditor.on('change', function() {
|
|
129
|
+
self.onChange(true)
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
enable() {
|
|
133
|
+
if (!this.always_disabled) {
|
|
134
|
+
this.input.disabled = false
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
super.enable()
|
|
138
|
+
}
|
|
139
|
+
disable() {
|
|
140
|
+
this.input.disabled = true
|
|
141
|
+
super.disable()
|
|
142
|
+
}
|
|
143
|
+
destroy() {
|
|
144
|
+
if (this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label)
|
|
145
|
+
if (this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description)
|
|
146
|
+
if (this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input)
|
|
147
|
+
super.destroy()
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
</script>
|
|
153
|
+
|
|
154
|
+
<style>
|
|
155
|
+
.expandable-textarea {
|
|
156
|
+
display: block;
|
|
157
|
+
min-height: 250px;
|
|
158
|
+
min-width: 250px;
|
|
159
|
+
resize: both !important;
|
|
160
|
+
}
|
|
161
|
+
.jsoneditor-vue img {
|
|
162
|
+
border: 1px solid #ddd;
|
|
163
|
+
border-radius: 4px;
|
|
164
|
+
padding: 5px;
|
|
165
|
+
width: 150px;
|
|
166
|
+
}
|
|
167
|
+
.jsoneditor-vue img:hover {
|
|
168
|
+
box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5);
|
|
169
|
+
}
|
|
170
|
+
.jsoneditor-vue button.btn {
|
|
171
|
+
font-size: 14px !important;
|
|
172
|
+
padding: 3px;
|
|
173
|
+
}
|
|
174
|
+
.jsoneditor-vue .form-control-label, label {
|
|
175
|
+
font-weight: bold;
|
|
176
|
+
}
|
|
177
|
+
.jsoneditor-vue input[type="checkbox"] {
|
|
178
|
+
margin-right: 5px;
|
|
179
|
+
margin-top: 3px;
|
|
180
|
+
}
|
|
181
|
+
</style>
|
|
@@ -23,9 +23,9 @@ import '@/permission' // permission control
|
|
|
23
23
|
import { VuePlugin } from 'vuera'
|
|
24
24
|
|
|
25
25
|
import Unicon from 'vue-unicons/dist/vue-unicons-vue2.umd'
|
|
26
|
-
import { uniDatabase, uniHome,
|
|
26
|
+
import { uniDatabase, uniHome, uniUsersAlt, uniShieldCheck, uniBookOpen, uniDiary, uniFlask, uniCog, uniPlus, uniLink } from 'vue-unicons/dist/icons'
|
|
27
27
|
|
|
28
|
-
Unicon.add([uniDatabase, uniHome,
|
|
28
|
+
Unicon.add([uniDatabase, uniHome, uniUsersAlt, uniShieldCheck, uniBookOpen, uniDiary, uniFlask, uniCog, uniPlus, uniLink])
|
|
29
29
|
Vue.use(Unicon)
|
|
30
30
|
|
|
31
31
|
Vue.use(ElementUI, { locale })
|