expressa 1.0.5 → 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.
Files changed (46) hide show
  1. package/.circleci/config.yml +1 -1
  2. package/auth/index.js +5 -1
  3. package/auth/jwt.js +9 -13
  4. package/controllers/install.js +1 -1
  5. package/controllers/status.js +2 -1
  6. package/controllers/users.js +3 -3
  7. package/index.js +2 -2
  8. package/listeners_users.js +1 -2
  9. package/listeners_validation.js +4 -0
  10. package/middleware/{users_permissions.js → permissions.js} +4 -4
  11. package/modules/admin/dist/index.html +1 -1
  12. package/modules/admin/dist/static/css/chunk-1059.220d4af5.css +1 -0
  13. package/modules/admin/dist/static/css/{chunk-f116.2ff74e8a.css → chunk-418a.5ee55031.css} +1 -1
  14. package/modules/admin/dist/static/css/chunk-787e.1d849865.css +1 -0
  15. package/modules/admin/dist/static/css/chunk-d0cd.97323951.css +1 -0
  16. package/modules/admin/dist/static/css/{chunk-759b.3a895a1e.css → chunk-f075.3a895a1e.css} +0 -0
  17. package/modules/admin/dist/static/css/chunk-libs.327ad89e.css +14 -0
  18. package/modules/admin/dist/static/js/{app.5f6e0e4c.js → app.4c984719.js} +1 -1
  19. package/modules/admin/dist/static/js/chunk-1059.e6aa7b61.js +1 -0
  20. package/modules/admin/dist/static/js/chunk-418a.e0987b3c.js +1 -0
  21. package/modules/admin/dist/static/js/chunk-787e.3ee96fce.js +1 -0
  22. package/modules/admin/dist/static/js/chunk-8bab.7052832d.js +2 -0
  23. package/modules/admin/dist/static/js/{chunk-23bd.5fa24c85.js.LICENSE.txt → chunk-8bab.7052832d.js.LICENSE.txt} +1 -1
  24. package/modules/admin/dist/static/js/chunk-d0cd.1781b9dd.js +1 -0
  25. package/modules/admin/dist/static/js/chunk-f075.315ceec1.js +1 -0
  26. package/modules/admin/dist/static/js/chunk-libs.06c38828.js +2 -0
  27. package/modules/admin/dist/static/js/{chunk-libs.b6f27cfe.js.LICENSE.txt → chunk-libs.06c38828.js.LICENSE.txt} +1 -1
  28. package/modules/admin/package.json +3 -3
  29. package/modules/admin/src/components/JSONEditor.vue +181 -167
  30. package/modules/admin/src/main.js +2 -2
  31. package/modules/admin/src/router/index.js +185 -185
  32. package/modules/admin/src/views/ListDocuments2.vue +29 -7
  33. package/modules/permissions/permissions.js +9 -3
  34. package/package.json +1 -1
  35. package/util.js +2 -2
  36. package/modules/admin/dist/static/css/chunk-0884.40d0b632.css +0 -1
  37. package/modules/admin/dist/static/css/chunk-34ab.f9393b1e.css +0 -1
  38. package/modules/admin/dist/static/css/chunk-fb07.ac81d7d6.css +0 -1
  39. package/modules/admin/dist/static/css/chunk-libs.68e8d170.css +0 -14
  40. package/modules/admin/dist/static/js/chunk-0884.5ca2b4c5.js +0 -1
  41. package/modules/admin/dist/static/js/chunk-23bd.5fa24c85.js +0 -2
  42. package/modules/admin/dist/static/js/chunk-34ab.06400cb6.js +0 -1
  43. package/modules/admin/dist/static/js/chunk-759b.89a889b6.js +0 -1
  44. package/modules/admin/dist/static/js/chunk-f116.b616ebb3.js +0 -1
  45. package/modules/admin/dist/static/js/chunk-fb07.075ac852.js +0 -1
  46. 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.0 (https://getbootstrap.com/)
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": "^6.2.2",
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-alpha",
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.0.1",
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,167 +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
- if (this.editor) {
47
- this.editor.destroy()
48
- }
49
- this.editor = new JSONEditor(this.$el.querySelector('.jsoneditor-vue'), options)
50
- let first = true
51
- this.editor.on('change', () => {
52
- if (first) {
53
- first = false
54
- return
55
- }
56
- this.$emit('input', this.editor.getValue())
57
- })
58
- },
59
- onSave() {
60
- this.$emit('json-save', this.json)
61
- }
62
- }
63
- }
64
-
65
- if (JSONEditor) {
66
- JSONEditor.defaults.resolvers.unshift(function(schema) {
67
- if (schema.type === 'object' && schema.format === 'schema') {
68
- return 'schema'
69
- }
70
-
71
- // If no valid editor is returned, the next resolver function will be used
72
- })
73
-
74
- JSONEditor.defaults.callbacks.template = {
75
- 'deleteProfilePic': (jseditor, e) => {
76
- alert('hey')
77
- }
78
- }
79
-
80
- JSONEditor.defaults.editors.schema = class schema extends JSONEditor.AbstractEditor {
81
- setValue(value, initial) {
82
- console.log(this)
83
- this.value = value
84
- this.schemaeditor.setValue(value)
85
- this.onChange()
86
- }
87
-
88
- getValue() {
89
- if (typeof this.schemaeditor !== 'undefined') { return this.schemaeditor.getValue() } else { return {} }
90
- }
91
-
92
- register() {
93
- super.register()
94
- if (!this.input) return
95
- this.input.setAttribute('name', this.formname)
96
- }
97
- unregister() {
98
- super.unregister()
99
- if (!this.input) return
100
- this.input.removeAttribute('name')
101
- }
102
- getNumColumns() {
103
- return 12
104
- }
105
- build() {
106
- var self = this
107
- if (!this.options.compact) {
108
- this.label = this.header = this.theme.getFormInputLabel(this.getTitle())
109
- }
110
- if (this.schema.description) this.description = this.theme.getFormInputDescription(this.schema.description)
111
- if (this.options.compact) this.container.className += ' compact'
112
-
113
- this.input = document.createElement('div')
114
- this.control = this.theme.getFormControl(this.label, this.input, this.description)
115
-
116
- if (this.schema.readOnly || this.schema.readonly) {
117
- this.always_disabled = true
118
- this.input.disabled = true
119
- }
120
-
121
- this.container.appendChild(this.control)
122
-
123
- this.schemaeditor = new window.JSONSchemaEditor(this.input, {
124
- startval: {}
125
- })
126
- this.schemaeditor.on('change', function() {
127
- self.onChange(true)
128
- })
129
- }
130
- enable() {
131
- if (!this.always_disabled) {
132
- this.input.disabled = false
133
- }
134
-
135
- super.enable()
136
- }
137
- disable() {
138
- this.input.disabled = true
139
- super.disable()
140
- }
141
- destroy() {
142
- if (this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label)
143
- if (this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description)
144
- if (this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input)
145
- super.destroy()
146
- }
147
- }
148
- }
149
-
150
- </script>
151
-
152
- <style>
153
- h3 textarea {
154
- resize: both;
155
- }
156
- .jsoneditor-vue button.btn {
157
- font-size: 14px !important;
158
- padding: 3px;
159
- }
160
- .jsoneditor-vue .form-control-label, label {
161
- font-weight: bold;
162
- }
163
- .jsoneditor-vue input[type="checkbox"] {
164
- margin-right: 5px;
165
- margin-top: 3px;
166
- }
167
- </style>
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, uniHomeAlt, uniUsersAlt, uniShieldCheck, uniBookOpen, uniDiary, uniFlask, uniCog, uniPlus } from 'vue-unicons/dist/icons'
26
+ import { uniDatabase, uniHome, uniUsersAlt, uniShieldCheck, uniBookOpen, uniDiary, uniFlask, uniCog, uniPlus, uniLink } from 'vue-unicons/dist/icons'
27
27
 
28
- Unicon.add([uniDatabase, uniHome, uniHomeAlt, uniUsersAlt, uniShieldCheck, uniBookOpen, uniDiary, uniFlask, uniCog, uniPlus])
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 })