glib-web 2.5.0 → 2.5.1
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/.eslintrc.js +0 -0
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/action.js +2 -0
- package/actions/analytics/logEvent.js +0 -0
- package/actions/auth/creditCard.js +0 -0
- package/actions/auth/restart.js +0 -0
- package/actions/auth/saveCsrfToken.js +0 -0
- package/actions/cables/push.js +0 -0
- package/actions/commands/copy.js +0 -0
- package/actions/commands/enqueue.js +17 -0
- package/actions/components/update.js +12 -13
- package/actions/dialogs/alert.js +0 -0
- package/actions/dialogs/close.js +0 -0
- package/actions/dialogs/notification.js +0 -0
- package/actions/dialogs/oauth.js +0 -0
- package/actions/dialogs/open.js +0 -0
- package/actions/dialogs/options.js +0 -0
- package/actions/dialogs/reload.js +0 -0
- package/actions/dialogs/show.js +0 -0
- package/actions/http/delete.js +0 -0
- package/actions/http/patch.js +0 -0
- package/actions/http/post.js +0 -0
- package/actions/http/put.js +0 -0
- package/actions/panels/scrollTo.js +0 -0
- package/actions/panels/scrollToBottom.js +0 -0
- package/actions/runMultiple.js +0 -0
- package/actions/sheets/select.js +0 -0
- package/actions/snackbars/alert.js +0 -0
- package/actions/snackbars/select.js +0 -0
- package/actions/timeouts/set.js +0 -0
- package/actions/tours/start.js +0 -0
- package/actions/windows/close.js +0 -0
- package/actions/windows/closeAll.js +0 -0
- package/actions/windows/closeWithReload.js +0 -0
- package/actions/windows/open.js +0 -0
- package/actions/windows/openWeb.js +0 -0
- package/actions/windows/print.js +0 -0
- package/actions/windows/refreshState.js +0 -0
- package/actions/windows/reload.js +0 -0
- package/actions/ws/push.js +0 -0
- package/app.vue +3 -0
- package/components/_dropdownMenu.vue +0 -0
- package/components/_icon.vue +0 -0
- package/components/_message.vue +0 -0
- package/components/banners/alert.vue +0 -0
- package/components/banners/select.vue +0 -0
- package/components/calendar.vue +0 -0
- package/components/datetime.vue +0 -0
- package/components/fab.vue +0 -0
- package/components/fields/autocomplete.vue +0 -0
- 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/creditCard.vue +0 -0
- package/components/fields/datetime.vue +0 -0
- package/components/fields/dynamicSelect.vue +0 -0
- package/components/fields/file.vue +12 -18
- package/components/fields/googlePlace.vue +0 -0
- package/components/fields/hidden.vue +0 -0
- package/components/fields/location.vue +0 -0
- package/components/fields/newRichText.vue +0 -0
- package/components/fields/phone/countries.js +0 -0
- package/components/fields/phone/field.vue +0 -0
- package/components/fields/phone/sprite.css +0 -0
- package/components/fields/rating.vue +0 -0
- package/components/fields/stripe/stripeFields.vue +0 -0
- package/components/fields/stripe/stripeIndividualFields.vue +0 -0
- package/components/fields/stripeExternalAccount.vue +0 -0
- package/components/fields/stripeToken.vue +0 -0
- package/components/fields/submit.vue +0 -0
- package/components/fields/text.vue +14 -5
- package/components/fields/textarea.vue +0 -0
- package/components/fields/timeZone.vue +0 -0
- package/components/fields/timer.vue +0 -0
- package/components/h1.vue +0 -0
- package/components/h2.vue +0 -0
- package/components/h3.vue +0 -0
- package/components/h5.vue +0 -0
- package/components/h6.vue +0 -0
- package/components/hr.vue +0 -0
- package/components/html.vue +0 -0
- package/components/icon.vue +0 -0
- package/components/label.vue +0 -0
- package/components/mixins/chart/annotation.js +0 -0
- package/components/mixins/chart/tooltip.js +0 -0
- package/components/mixins/dataset.js +0 -0
- package/components/mixins/events.js +11 -0
- package/components/mixins/extension.js +0 -0
- package/components/mixins/list/autoload.js +0 -0
- package/components/mixins/longClick.js +0 -0
- package/components/mixins/scrolling.js +0 -0
- package/components/mixins/styles.js +8 -4
- package/components/mixins/table/autoload.js +0 -0
- package/components/mixins/table/export.js +0 -0
- package/components/mixins/table/import.js +0 -0
- package/components/mixins/text.js +0 -0
- package/components/mixins/ws/actionCable.js +0 -0
- package/components/mixins/ws/phoenixSocket.js +0 -0
- package/components/multimedia/video.vue +0 -0
- package/components/p.vue +0 -0
- package/components/panels/carousel.vue +0 -0
- package/components/panels/custom.vue +3 -0
- package/components/panels/flow.vue +0 -0
- package/components/panels/grid.vue +0 -0
- package/components/panels/horizontal.vue +134 -7
- package/components/panels/list.vue +34 -18
- package/components/panels/responsive.vue +10 -6
- package/components/panels/scroll.vue +0 -0
- package/components/panels/split.vue +0 -0
- package/components/panels/table.vue +0 -0
- package/components/panels/vertical.vue +1 -1
- package/components/panels/web.vue +0 -0
- package/components/progressbar.vue +0 -0
- package/components/spacer.vue +0 -0
- package/components/switch.vue +0 -0
- package/components/tabBar.vue +0 -0
- package/keys.js +0 -0
- package/nav/dialog.vue +0 -0
- package/nav/drawerButton.vue +0 -0
- package/nav/drawerLabel.vue +0 -0
- package/nav/sheet.vue +0 -0
- package/nav/snackbar.vue +0 -0
- package/package.json +2 -2
- package/plugins/driverCustomBehavior.js +0 -0
- package/plugins/updatableComponent.js +0 -6
- package/settings.json.example +0 -0
- package/static/plugins/alignment/alignment.js +0 -0
- package/static/plugins/alignment/alignment.min.js +0 -0
- package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
- package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
- package/static/plugins/blockcode/blockcode.js +0 -0
- package/static/plugins/blockcode/blockcode.min.js +0 -0
- package/static/plugins/clips/clips.js +0 -0
- package/static/plugins/clips/clips.min.js +0 -0
- package/static/plugins/counter/counter.js +0 -0
- package/static/plugins/counter/counter.min.js +0 -0
- package/static/plugins/definedlinks/definedlinks.js +0 -0
- package/static/plugins/definedlinks/definedlinks.min.js +0 -0
- package/static/plugins/handle/handle.js +0 -0
- package/static/plugins/handle/handle.min.js +0 -0
- package/static/plugins/icons/icons.js +0 -0
- package/static/plugins/icons/icons.min.js +0 -0
- package/static/plugins/imageposition/imageposition.js +0 -0
- package/static/plugins/imageposition/imageposition.min.js +0 -0
- package/static/plugins/inlineformat/inlineformat.js +0 -0
- package/static/plugins/inlineformat/inlineformat.min.js +0 -0
- package/static/plugins/removeformat/removeformat.js +0 -0
- package/static/plugins/removeformat/removeformat.min.js +0 -0
- package/static/plugins/selector/selector.js +0 -0
- package/static/plugins/selector/selector.min.js +0 -0
- package/static/plugins/specialchars/specialchars.js +0 -0
- package/static/plugins/specialchars/specialchars.min.js +0 -0
- package/static/plugins/textdirection/textdirection.js +0 -0
- package/static/plugins/textdirection/textdirection.min.js +0 -0
- package/static/plugins/textexpander/textexpander.js +0 -0
- package/static/plugins/textexpander/textexpander.min.js +0 -0
- package/static/plugins/underline/underline.js +0 -0
- package/static/plugins/underline/underline.min.js +0 -0
- package/static/redactorx.css +0 -0
- package/static/redactorx.js +0 -0
- package/static/redactorx.min.css +0 -0
- package/static/redactorx.min.js +0 -0
- package/static/redactorx.usm.min.js +0 -0
- package/styles/test.sass +0 -0
- package/styles/test.scss +0 -0
- package/templates/_menu.vue +0 -0
- package/templates/comment.vue +0 -0
- package/templates/featured.vue +0 -0
- package/templates/thumbnail.vue +34 -11
- package/templates/unsupported.vue +0 -0
- package/utils/dom.js +0 -0
- package/utils/helper.js +0 -0
- package/utils/history.js +0 -0
- package/utils/http.js +0 -0
- package/utils/launch.js +0 -0
- package/utils/mime_type.js +2 -0
- package/utils/private/ws.js +0 -0
- package/utils/public.js +6 -0
- package/utils/queue.js +112 -0
- package/utils/settings.js +0 -0
- package/utils/type.js +0 -0
- package/utils/uploader.js +3 -0
package/utils/mime_type.js
CHANGED
|
@@ -12,6 +12,7 @@ export default {
|
|
|
12
12
|
css: "text/css",
|
|
13
13
|
csv: "text/csv",
|
|
14
14
|
doc: "application/msword",
|
|
15
|
+
docx: "application/msword",
|
|
15
16
|
dll: "application/octet-stream",
|
|
16
17
|
eot: "application/vnd.ms-fontobject",
|
|
17
18
|
epub: "application/epub+zip",
|
|
@@ -43,6 +44,7 @@ export default {
|
|
|
43
44
|
otf: "font/otf",
|
|
44
45
|
png: "image/png",
|
|
45
46
|
ppt: "application/vnd.ms-powerpoint",
|
|
47
|
+
pptx: "application/vnd.ms-powerpoint",
|
|
46
48
|
rar: "application/x-rar-compressed",
|
|
47
49
|
rtf: "application/rtf",
|
|
48
50
|
sh: "application/x-sh",
|
package/utils/private/ws.js
CHANGED
|
File without changes
|
package/utils/public.js
CHANGED
|
@@ -5,6 +5,9 @@ import Type from "./type";
|
|
|
5
5
|
import Form from "./form";
|
|
6
6
|
import Component from "./component";
|
|
7
7
|
import Hash from "./hash";
|
|
8
|
+
import Queue from "./queue";
|
|
9
|
+
|
|
10
|
+
const _queue = new Queue();
|
|
8
11
|
|
|
9
12
|
export default class {
|
|
10
13
|
static get action() {
|
|
@@ -28,4 +31,7 @@ export default class {
|
|
|
28
31
|
static get Hash() {
|
|
29
32
|
return Hash;
|
|
30
33
|
}
|
|
34
|
+
static get queue() {
|
|
35
|
+
return _queue;
|
|
36
|
+
}
|
|
31
37
|
}
|
package/utils/queue.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// From https://stackoverflow.com/questions/47157428/how-to-implement-a-pseudo-blocking-async-queue-in-js-ts
|
|
2
|
+
|
|
3
|
+
import Vue from "vue";
|
|
4
|
+
|
|
5
|
+
// const jobQueue = [];
|
|
6
|
+
export default class {
|
|
7
|
+
constructor() {
|
|
8
|
+
// invariant: at least one of the arrays is empty
|
|
9
|
+
this.resolvers = [];
|
|
10
|
+
this.promises = [];
|
|
11
|
+
}
|
|
12
|
+
_add() {
|
|
13
|
+
this.promises.push(
|
|
14
|
+
new Promise(resolve => {
|
|
15
|
+
this.resolvers.push(resolve);
|
|
16
|
+
})
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
enqueue(t) {
|
|
20
|
+
// if (this.resolvers.length) this.resolvers.shift()(t);
|
|
21
|
+
// else this.promises.push(Promise.resolve(t));
|
|
22
|
+
if (!this.resolvers.length) this._add();
|
|
23
|
+
this.resolvers.shift()(t);
|
|
24
|
+
}
|
|
25
|
+
dequeue() {
|
|
26
|
+
if (!this.promises.length) this._add();
|
|
27
|
+
return this.promises.shift();
|
|
28
|
+
}
|
|
29
|
+
// now some utilities:
|
|
30
|
+
isEmpty() {
|
|
31
|
+
// there are no values available
|
|
32
|
+
return !this.promises.length; // this.length <= 0
|
|
33
|
+
}
|
|
34
|
+
isBlocked() {
|
|
35
|
+
// it's waiting for values
|
|
36
|
+
return !!this.resolvers.length; // this.length < 0
|
|
37
|
+
}
|
|
38
|
+
get length() {
|
|
39
|
+
return this.promises.length - this.resolvers.length;
|
|
40
|
+
}
|
|
41
|
+
sleep(ms) {
|
|
42
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
43
|
+
}
|
|
44
|
+
async start() {
|
|
45
|
+
// TODO: This is experimental
|
|
46
|
+
const delayBetweenJobs = 2000;
|
|
47
|
+
|
|
48
|
+
for await (const job of this) {
|
|
49
|
+
console.log("Executing job...");
|
|
50
|
+
job();
|
|
51
|
+
if (delayBetweenJobs) {
|
|
52
|
+
console.log("Waiting for next job1...");
|
|
53
|
+
await this.sleep(delayBetweenJobs);
|
|
54
|
+
console.log("Waiting for next job2...");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// console.log("JOB1");
|
|
58
|
+
// const job = this.dequeue();
|
|
59
|
+
// console.log("JOB2", job);
|
|
60
|
+
// job();
|
|
61
|
+
// Vue.nextTick(() => {
|
|
62
|
+
// this.start();
|
|
63
|
+
// });
|
|
64
|
+
// await this.next();
|
|
65
|
+
}
|
|
66
|
+
[Symbol.asyncIterator]() {
|
|
67
|
+
// Todo: Use AsyncIterator.from()
|
|
68
|
+
return {
|
|
69
|
+
next: () => this.dequeue().then(value => ({ done: false, value })),
|
|
70
|
+
[Symbol.asyncIterator]() {
|
|
71
|
+
return this;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// export default class {
|
|
78
|
+
// constructor() {
|
|
79
|
+
// this.jobQueue = [];
|
|
80
|
+
// this.timerHandle = null;
|
|
81
|
+
// }
|
|
82
|
+
// // static get csrfElement() {
|
|
83
|
+
// // return document.querySelector(`meta[name="csrf-token"]`);
|
|
84
|
+
// // }
|
|
85
|
+
|
|
86
|
+
// // static getCsrf() {
|
|
87
|
+
// // return this.csrfElement.getAttribute("content");
|
|
88
|
+
// // }
|
|
89
|
+
|
|
90
|
+
// // static setCsrf(value) {
|
|
91
|
+
// // return this.csrfElement.setAttribute("content", value);
|
|
92
|
+
// // }
|
|
93
|
+
|
|
94
|
+
// start(interval) {
|
|
95
|
+
// this.timerHandle = setInterval(() => {
|
|
96
|
+
// console.log("DEQUQE1");
|
|
97
|
+
// const oldestJob = this.jobQueue.shift();
|
|
98
|
+
// if (oldestJob) {
|
|
99
|
+
// console.log("DEQUQE2");
|
|
100
|
+
// oldestJob();
|
|
101
|
+
// }
|
|
102
|
+
// }, interval);
|
|
103
|
+
// }
|
|
104
|
+
|
|
105
|
+
// stop() {
|
|
106
|
+
// clearInterval(this.timerHandle);
|
|
107
|
+
// }
|
|
108
|
+
|
|
109
|
+
// enqueue(job) {
|
|
110
|
+
// this.jobQueue.push(job);
|
|
111
|
+
// }
|
|
112
|
+
// }
|
package/utils/settings.js
CHANGED
|
File without changes
|
package/utils/type.js
CHANGED
|
File without changes
|
package/utils/uploader.js
CHANGED
|
@@ -64,6 +64,9 @@ export default class Uploader {
|
|
|
64
64
|
let validFileType = false;
|
|
65
65
|
[spec.fileType].flat().forEach(key => {
|
|
66
66
|
const acceptsRegex = new RegExp(mimeType[key]);
|
|
67
|
+
if (!mimeType[key]) {
|
|
68
|
+
console.error(`Mime type not found: ${key}`)
|
|
69
|
+
}
|
|
67
70
|
if (acceptsRegex.test(this.file.type)) {
|
|
68
71
|
validFileType = true;
|
|
69
72
|
}
|