glib-web 2.6.1 → 2.6.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/LICENSE +0 -0
- package/actions/auth/restart.js +0 -0
- package/actions/dialogs/oauth.js +0 -0
- package/actions/dialogs/options.js +0 -0
- package/actions/forms/submit.js +6 -3
- package/components/_message.vue +0 -0
- package/components/datetime.vue +0 -0
- package/components/fab.vue +0 -0
- package/components/fields/checkGroup.vue +14 -11
- package/components/fields/country/countries.js +0 -0
- package/components/fields/country/field.vue +0 -0
- package/components/fields/country/regions.js +0 -0
- package/components/fields/datetime.vue +0 -0
- package/components/fields/dynamicSelect.vue +0 -0
- package/components/fields/richText.vue +36 -28
- package/components/fields/timeZone.vue +0 -0
- package/components/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/mixins/longClick.js +0 -0
- package/components/mixins/scrolling.js +0 -0
- package/components/mixins/table/export.js +0 -0
- package/components/mixins/table/import.js +0 -0
- package/components/p.vue +0 -0
- package/keys.js +0 -0
- package/nav/drawerButton.vue +0 -0
- package/package.json +2 -2
- package/settings.json.example +0 -0
- package/styles/test.sass +0 -0
- package/styles/test.scss +0 -0
- package/templates/unsupported.vue +0 -0
- package/utils/dom.js +0 -0
- package/utils/settings.js +0 -0
- package/utils/storage.js +0 -0
- package/utils/url.js +0 -0
package/LICENSE
CHANGED
|
File without changes
|
package/actions/auth/restart.js
CHANGED
|
File without changes
|
package/actions/dialogs/oauth.js
CHANGED
|
File without changes
|
|
File without changes
|
package/actions/forms/submit.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export default class {
|
|
2
2
|
execute(properties, component) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
setTimeout(() => {
|
|
4
|
+
component.$dispatchEvent("forms/directSubmit", {
|
|
5
|
+
url: properties.overrideUrl
|
|
6
|
+
});
|
|
7
|
+
}, 500)
|
|
8
|
+
|
|
6
9
|
}
|
|
7
10
|
}
|
package/components/_message.vue
CHANGED
|
File without changes
|
package/components/datetime.vue
CHANGED
|
File without changes
|
package/components/fab.vue
CHANGED
|
File without changes
|
|
@@ -29,17 +29,17 @@ export default {
|
|
|
29
29
|
// "fields-hidden": HiddenField
|
|
30
30
|
// },
|
|
31
31
|
props: {
|
|
32
|
-
spec: { type: Object, required: true }
|
|
32
|
+
spec: { type: Object, required: true },
|
|
33
33
|
},
|
|
34
34
|
data() {
|
|
35
35
|
return {
|
|
36
36
|
anyChecked: false,
|
|
37
37
|
errorMessage: null,
|
|
38
38
|
rules: [
|
|
39
|
-
_v => {
|
|
39
|
+
(_v) => {
|
|
40
40
|
return this.anyChecked || this.errorMessage || true;
|
|
41
|
-
}
|
|
42
|
-
]
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
43
|
};
|
|
44
44
|
},
|
|
45
45
|
// computed: {
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
$ready() {
|
|
52
52
|
const validation = this.spec.validation || {};
|
|
53
53
|
|
|
54
|
-
Utils.type.ifObject(validation.required, required => {
|
|
54
|
+
Utils.type.ifObject(validation.required, (required) => {
|
|
55
55
|
this.errorMessage = required.message;
|
|
56
56
|
});
|
|
57
57
|
|
|
@@ -59,7 +59,7 @@ export default {
|
|
|
59
59
|
const vm = this;
|
|
60
60
|
this.$el.addEventListener(
|
|
61
61
|
"change",
|
|
62
|
-
function(e) {
|
|
62
|
+
function (e) {
|
|
63
63
|
vm.detectChecked();
|
|
64
64
|
},
|
|
65
65
|
false
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
const vm = this;
|
|
71
71
|
this.$el
|
|
72
72
|
.querySelectorAll("input[type=checkbox]")
|
|
73
|
-
.forEach(function(checkbox) {
|
|
73
|
+
.forEach(function (checkbox) {
|
|
74
74
|
if (checkbox.checked) {
|
|
75
75
|
vm.anyChecked = true;
|
|
76
76
|
return;
|
|
@@ -79,12 +79,15 @@ export default {
|
|
|
79
79
|
},
|
|
80
80
|
childSpec(item) {
|
|
81
81
|
if (this.spec.readOnly) {
|
|
82
|
-
return Object.assign(item, {
|
|
82
|
+
return Object.assign(item, {
|
|
83
|
+
readOnly: this.spec.readOnly,
|
|
84
|
+
onChange: this.spec.onChange,
|
|
85
|
+
});
|
|
83
86
|
}
|
|
84
87
|
|
|
85
|
-
return item;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
+
return Object.assign(item, { onChange: this.spec.onChange });
|
|
89
|
+
},
|
|
90
|
+
},
|
|
88
91
|
};
|
|
89
92
|
</script>
|
|
90
93
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -55,7 +55,7 @@ import bus from "../../utils/eventBus";
|
|
|
55
55
|
Quill.register("modules/imageDropAndPaste", QuillImageDropAndPaste);
|
|
56
56
|
|
|
57
57
|
var ImageBlot = Quill.import("formats/image");
|
|
58
|
-
ImageBlot.sanitize = function(url) {
|
|
58
|
+
ImageBlot.sanitize = function (url) {
|
|
59
59
|
return url;
|
|
60
60
|
};
|
|
61
61
|
|
|
@@ -69,16 +69,16 @@ class Parser {
|
|
|
69
69
|
turndownService.use(gfm);
|
|
70
70
|
turndownService.addRule("strikethrough", {
|
|
71
71
|
filter: ["del", "s", "strike"],
|
|
72
|
-
replacement: function(content) {
|
|
72
|
+
replacement: function (content) {
|
|
73
73
|
return "~~" + content + "~~";
|
|
74
|
-
}
|
|
74
|
+
},
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
turndownService.addRule("codeblock", {
|
|
78
78
|
filter: ["pre"],
|
|
79
|
-
replacement: function(content) {
|
|
79
|
+
replacement: function (content) {
|
|
80
80
|
return "```\n" + content + "```";
|
|
81
|
-
}
|
|
81
|
+
},
|
|
82
82
|
});
|
|
83
83
|
return turndownService.turndown(data);
|
|
84
84
|
}
|
|
@@ -124,8 +124,12 @@ class TextEditor {
|
|
|
124
124
|
|
|
125
125
|
// replace {{image1}} to real image1 url
|
|
126
126
|
replaceWithRealImage(html) {
|
|
127
|
+
if (!html) {
|
|
128
|
+
return "";
|
|
129
|
+
}
|
|
130
|
+
|
|
127
131
|
const vm = this.context;
|
|
128
|
-
return html.replace(/\{\{image([0-9]+)\}\}/g, function(_, index) {
|
|
132
|
+
return html.replace(/\{\{image([0-9]+)\}\}/g, function (_, index) {
|
|
129
133
|
const image = vm.spec.images[index - 1];
|
|
130
134
|
if (
|
|
131
135
|
image &&
|
|
@@ -143,10 +147,14 @@ class TextEditor {
|
|
|
143
147
|
|
|
144
148
|
// replace image1 url with {{image1}}
|
|
145
149
|
replaceWithFakeImage(html) {
|
|
150
|
+
if (!html) {
|
|
151
|
+
return "";
|
|
152
|
+
}
|
|
153
|
+
|
|
146
154
|
const vm = this.context;
|
|
147
155
|
let index = 0;
|
|
148
156
|
vm.imageKeys.clear();
|
|
149
|
-
return html.replace(/src="([^"]+)"|\!\[\]\((.+)\)/g, function(_, g1, g2) {
|
|
157
|
+
return html.replace(/src="([^"]+)"|\!\[\]\((.+)\)/g, function (_, g1, g2) {
|
|
150
158
|
var imageValue = g1 || g2;
|
|
151
159
|
// It seems that quill encodes '&' in the URL to '&' which would screw up key matching.
|
|
152
160
|
var decodedValue = imageValue.replace(/&/g, "&");
|
|
@@ -164,28 +172,28 @@ class TextEditor {
|
|
|
164
172
|
export default {
|
|
165
173
|
components: { VueEditor },
|
|
166
174
|
props: {
|
|
167
|
-
spec: { type: Object, required: true }
|
|
175
|
+
spec: { type: Object, required: true },
|
|
168
176
|
},
|
|
169
177
|
data: () => ({
|
|
170
178
|
customToolbar: [
|
|
171
179
|
["bold", "italic", "strike"],
|
|
172
180
|
[{ header: 1 }, { header: 2 }, { header: 3 }],
|
|
173
181
|
[{ list: "ordered" }, { list: "bullet" }],
|
|
174
|
-
["image", "link"]
|
|
182
|
+
["image", "link"],
|
|
175
183
|
],
|
|
176
184
|
editorSettings: {
|
|
177
185
|
modules: {
|
|
178
186
|
imageDropAndPaste: {
|
|
179
187
|
// add an custom image handler
|
|
180
|
-
handler: function(imageDataUrl, type, imageData) {
|
|
188
|
+
handler: function (imageDataUrl, type, imageData) {
|
|
181
189
|
bus.$emit("richText/dropOrPaste", {
|
|
182
190
|
file: imageData.toFile(),
|
|
183
191
|
editor: this.quill,
|
|
184
|
-
cursorLocation: this.getIndex()
|
|
192
|
+
cursorLocation: this.getIndex(),
|
|
185
193
|
});
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
},
|
|
189
197
|
},
|
|
190
198
|
richEditorValue: "",
|
|
191
199
|
rawEditorValue: "",
|
|
@@ -197,7 +205,7 @@ export default {
|
|
|
197
205
|
textEditor: null,
|
|
198
206
|
mode: null,
|
|
199
207
|
produce: null,
|
|
200
|
-
accept: null
|
|
208
|
+
accept: null,
|
|
201
209
|
}),
|
|
202
210
|
computed: {
|
|
203
211
|
showProgress() {
|
|
@@ -205,7 +213,7 @@ export default {
|
|
|
205
213
|
},
|
|
206
214
|
rawMode() {
|
|
207
215
|
return this.mode == 1;
|
|
208
|
-
}
|
|
216
|
+
},
|
|
209
217
|
},
|
|
210
218
|
watch: {},
|
|
211
219
|
mounted() {
|
|
@@ -235,7 +243,7 @@ export default {
|
|
|
235
243
|
this.produce
|
|
236
244
|
);
|
|
237
245
|
},
|
|
238
|
-
uploadImage: function(file, editor, cursorLocation) {
|
|
246
|
+
uploadImage: function (file, editor, cursorLocation) {
|
|
239
247
|
let vm = this;
|
|
240
248
|
const uploaderSpec = this.imageUploader;
|
|
241
249
|
// const input = this.$refs.directUploadFile
|
|
@@ -274,34 +282,34 @@ export default {
|
|
|
274
282
|
"html"
|
|
275
283
|
);
|
|
276
284
|
},
|
|
277
|
-
onRichTextEditorChanged: eventFiltering.debounce(function() {
|
|
285
|
+
onRichTextEditorChanged: eventFiltering.debounce(function () {
|
|
278
286
|
this.producedValue = this.textEditor.producedValue(
|
|
279
287
|
this.richEditorValue,
|
|
280
288
|
"html",
|
|
281
289
|
this.produce
|
|
282
290
|
);
|
|
283
291
|
|
|
284
|
-
this.$executeOnChange();
|
|
292
|
+
this.$executeOnChange(this.producedValue);
|
|
285
293
|
}),
|
|
286
|
-
onRawTextEditorChanged: eventFiltering.debounce(function() {
|
|
294
|
+
onRawTextEditorChanged: eventFiltering.debounce(function () {
|
|
287
295
|
this.producedValue = this.textEditor.producedValue(
|
|
288
296
|
this.rawEditorValue,
|
|
289
297
|
"markdown",
|
|
290
298
|
this.produce
|
|
291
299
|
);
|
|
292
300
|
|
|
293
|
-
this.$executeOnChange();
|
|
301
|
+
this.$executeOnChange(this.producedValue);
|
|
294
302
|
}),
|
|
295
|
-
insertImage: function(file, Editor, cursorLocation, blob) {
|
|
303
|
+
insertImage: function (file, Editor, cursorLocation, blob) {
|
|
296
304
|
let vm = this;
|
|
297
305
|
var reader = new FileReader();
|
|
298
|
-
reader.onload = function(e) {
|
|
306
|
+
reader.onload = function (e) {
|
|
299
307
|
// vm.fileUrl = e.target.result;
|
|
300
308
|
if (file.type.indexOf("image") !== -1) {
|
|
301
309
|
var image = new Image();
|
|
302
310
|
image.src = URL.createObjectURL(file);
|
|
303
311
|
|
|
304
|
-
image.onload = function() {
|
|
312
|
+
image.onload = function () {
|
|
305
313
|
Editor.insertEmbed(cursorLocation, "image", image.src);
|
|
306
314
|
};
|
|
307
315
|
|
|
@@ -312,7 +320,7 @@ export default {
|
|
|
312
320
|
reader.readAsDataURL(file);
|
|
313
321
|
vm.progress.value = -1;
|
|
314
322
|
},
|
|
315
|
-
updateToolbar: function(wrapper, toolbar, container) {
|
|
323
|
+
updateToolbar: function (wrapper, toolbar, container) {
|
|
316
324
|
if (wrapper.scrollTop >= container.offsetTop) {
|
|
317
325
|
toolbar.classList.add("sticky");
|
|
318
326
|
toolbar.style.top = `${wrapper.offsetTop}px`;
|
|
@@ -325,7 +333,7 @@ export default {
|
|
|
325
333
|
toolbar.style.width = "auto";
|
|
326
334
|
}
|
|
327
335
|
},
|
|
328
|
-
registerScrollEvent: function() {
|
|
336
|
+
registerScrollEvent: function () {
|
|
329
337
|
const wrapper = document.querySelector(".v-dialog") || window;
|
|
330
338
|
const toolbar = this.$el.querySelector(".ql-toolbar");
|
|
331
339
|
const container = this.$el.querySelector(".ql-container");
|
|
@@ -338,8 +346,8 @@ export default {
|
|
|
338
346
|
this.updateToolbar(wrapper, toolbar, container)
|
|
339
347
|
);
|
|
340
348
|
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
349
|
+
},
|
|
350
|
+
},
|
|
343
351
|
};
|
|
344
352
|
</script>
|
|
345
353
|
|
|
File without changes
|
package/components/hr.vue
CHANGED
|
File without changes
|
package/components/html.vue
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/p.vue
CHANGED
|
File without changes
|
package/keys.js
CHANGED
|
File without changes
|
package/nav/drawerButton.vue
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/settings.json.example
CHANGED
|
File without changes
|
package/styles/test.sass
CHANGED
|
File without changes
|
package/styles/test.scss
CHANGED
|
File without changes
|
|
File without changes
|
package/utils/dom.js
CHANGED
|
File without changes
|
package/utils/settings.js
CHANGED
|
File without changes
|
package/utils/storage.js
CHANGED
|
File without changes
|
package/utils/url.js
CHANGED
|
File without changes
|