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.
Files changed (183) hide show
  1. package/.eslintrc.js +0 -0
  2. package/LICENSE +0 -0
  3. package/README.md +0 -0
  4. package/action.js +2 -0
  5. package/actions/analytics/logEvent.js +0 -0
  6. package/actions/auth/creditCard.js +0 -0
  7. package/actions/auth/restart.js +0 -0
  8. package/actions/auth/saveCsrfToken.js +0 -0
  9. package/actions/cables/push.js +0 -0
  10. package/actions/commands/copy.js +0 -0
  11. package/actions/commands/enqueue.js +17 -0
  12. package/actions/components/update.js +12 -13
  13. package/actions/dialogs/alert.js +0 -0
  14. package/actions/dialogs/close.js +0 -0
  15. package/actions/dialogs/notification.js +0 -0
  16. package/actions/dialogs/oauth.js +0 -0
  17. package/actions/dialogs/open.js +0 -0
  18. package/actions/dialogs/options.js +0 -0
  19. package/actions/dialogs/reload.js +0 -0
  20. package/actions/dialogs/show.js +0 -0
  21. package/actions/http/delete.js +0 -0
  22. package/actions/http/patch.js +0 -0
  23. package/actions/http/post.js +0 -0
  24. package/actions/http/put.js +0 -0
  25. package/actions/panels/scrollTo.js +0 -0
  26. package/actions/panels/scrollToBottom.js +0 -0
  27. package/actions/runMultiple.js +0 -0
  28. package/actions/sheets/select.js +0 -0
  29. package/actions/snackbars/alert.js +0 -0
  30. package/actions/snackbars/select.js +0 -0
  31. package/actions/timeouts/set.js +0 -0
  32. package/actions/tours/start.js +0 -0
  33. package/actions/windows/close.js +0 -0
  34. package/actions/windows/closeAll.js +0 -0
  35. package/actions/windows/closeWithReload.js +0 -0
  36. package/actions/windows/open.js +0 -0
  37. package/actions/windows/openWeb.js +0 -0
  38. package/actions/windows/print.js +0 -0
  39. package/actions/windows/refreshState.js +0 -0
  40. package/actions/windows/reload.js +0 -0
  41. package/actions/ws/push.js +0 -0
  42. package/app.vue +3 -0
  43. package/components/_dropdownMenu.vue +0 -0
  44. package/components/_icon.vue +0 -0
  45. package/components/_message.vue +0 -0
  46. package/components/banners/alert.vue +0 -0
  47. package/components/banners/select.vue +0 -0
  48. package/components/calendar.vue +0 -0
  49. package/components/datetime.vue +0 -0
  50. package/components/fab.vue +0 -0
  51. package/components/fields/autocomplete.vue +0 -0
  52. package/components/fields/country/countries.js +0 -0
  53. package/components/fields/country/field.vue +0 -0
  54. package/components/fields/country/regions.js +0 -0
  55. package/components/fields/creditCard.vue +0 -0
  56. package/components/fields/datetime.vue +0 -0
  57. package/components/fields/dynamicSelect.vue +0 -0
  58. package/components/fields/file.vue +12 -18
  59. package/components/fields/googlePlace.vue +0 -0
  60. package/components/fields/hidden.vue +0 -0
  61. package/components/fields/location.vue +0 -0
  62. package/components/fields/newRichText.vue +0 -0
  63. package/components/fields/phone/countries.js +0 -0
  64. package/components/fields/phone/field.vue +0 -0
  65. package/components/fields/phone/sprite.css +0 -0
  66. package/components/fields/rating.vue +0 -0
  67. package/components/fields/stripe/stripeFields.vue +0 -0
  68. package/components/fields/stripe/stripeIndividualFields.vue +0 -0
  69. package/components/fields/stripeExternalAccount.vue +0 -0
  70. package/components/fields/stripeToken.vue +0 -0
  71. package/components/fields/submit.vue +0 -0
  72. package/components/fields/text.vue +14 -5
  73. package/components/fields/textarea.vue +0 -0
  74. package/components/fields/timeZone.vue +0 -0
  75. package/components/fields/timer.vue +0 -0
  76. package/components/h1.vue +0 -0
  77. package/components/h2.vue +0 -0
  78. package/components/h3.vue +0 -0
  79. package/components/h5.vue +0 -0
  80. package/components/h6.vue +0 -0
  81. package/components/hr.vue +0 -0
  82. package/components/html.vue +0 -0
  83. package/components/icon.vue +0 -0
  84. package/components/label.vue +0 -0
  85. package/components/mixins/chart/annotation.js +0 -0
  86. package/components/mixins/chart/tooltip.js +0 -0
  87. package/components/mixins/dataset.js +0 -0
  88. package/components/mixins/events.js +11 -0
  89. package/components/mixins/extension.js +0 -0
  90. package/components/mixins/list/autoload.js +0 -0
  91. package/components/mixins/longClick.js +0 -0
  92. package/components/mixins/scrolling.js +0 -0
  93. package/components/mixins/styles.js +8 -4
  94. package/components/mixins/table/autoload.js +0 -0
  95. package/components/mixins/table/export.js +0 -0
  96. package/components/mixins/table/import.js +0 -0
  97. package/components/mixins/text.js +0 -0
  98. package/components/mixins/ws/actionCable.js +0 -0
  99. package/components/mixins/ws/phoenixSocket.js +0 -0
  100. package/components/multimedia/video.vue +0 -0
  101. package/components/p.vue +0 -0
  102. package/components/panels/carousel.vue +0 -0
  103. package/components/panels/custom.vue +3 -0
  104. package/components/panels/flow.vue +0 -0
  105. package/components/panels/grid.vue +0 -0
  106. package/components/panels/horizontal.vue +134 -7
  107. package/components/panels/list.vue +34 -18
  108. package/components/panels/responsive.vue +10 -6
  109. package/components/panels/scroll.vue +0 -0
  110. package/components/panels/split.vue +0 -0
  111. package/components/panels/table.vue +0 -0
  112. package/components/panels/vertical.vue +1 -1
  113. package/components/panels/web.vue +0 -0
  114. package/components/progressbar.vue +0 -0
  115. package/components/spacer.vue +0 -0
  116. package/components/switch.vue +0 -0
  117. package/components/tabBar.vue +0 -0
  118. package/keys.js +0 -0
  119. package/nav/dialog.vue +0 -0
  120. package/nav/drawerButton.vue +0 -0
  121. package/nav/drawerLabel.vue +0 -0
  122. package/nav/sheet.vue +0 -0
  123. package/nav/snackbar.vue +0 -0
  124. package/package.json +2 -2
  125. package/plugins/driverCustomBehavior.js +0 -0
  126. package/plugins/updatableComponent.js +0 -6
  127. package/settings.json.example +0 -0
  128. package/static/plugins/alignment/alignment.js +0 -0
  129. package/static/plugins/alignment/alignment.min.js +0 -0
  130. package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
  131. package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
  132. package/static/plugins/blockcode/blockcode.js +0 -0
  133. package/static/plugins/blockcode/blockcode.min.js +0 -0
  134. package/static/plugins/clips/clips.js +0 -0
  135. package/static/plugins/clips/clips.min.js +0 -0
  136. package/static/plugins/counter/counter.js +0 -0
  137. package/static/plugins/counter/counter.min.js +0 -0
  138. package/static/plugins/definedlinks/definedlinks.js +0 -0
  139. package/static/plugins/definedlinks/definedlinks.min.js +0 -0
  140. package/static/plugins/handle/handle.js +0 -0
  141. package/static/plugins/handle/handle.min.js +0 -0
  142. package/static/plugins/icons/icons.js +0 -0
  143. package/static/plugins/icons/icons.min.js +0 -0
  144. package/static/plugins/imageposition/imageposition.js +0 -0
  145. package/static/plugins/imageposition/imageposition.min.js +0 -0
  146. package/static/plugins/inlineformat/inlineformat.js +0 -0
  147. package/static/plugins/inlineformat/inlineformat.min.js +0 -0
  148. package/static/plugins/removeformat/removeformat.js +0 -0
  149. package/static/plugins/removeformat/removeformat.min.js +0 -0
  150. package/static/plugins/selector/selector.js +0 -0
  151. package/static/plugins/selector/selector.min.js +0 -0
  152. package/static/plugins/specialchars/specialchars.js +0 -0
  153. package/static/plugins/specialchars/specialchars.min.js +0 -0
  154. package/static/plugins/textdirection/textdirection.js +0 -0
  155. package/static/plugins/textdirection/textdirection.min.js +0 -0
  156. package/static/plugins/textexpander/textexpander.js +0 -0
  157. package/static/plugins/textexpander/textexpander.min.js +0 -0
  158. package/static/plugins/underline/underline.js +0 -0
  159. package/static/plugins/underline/underline.min.js +0 -0
  160. package/static/redactorx.css +0 -0
  161. package/static/redactorx.js +0 -0
  162. package/static/redactorx.min.css +0 -0
  163. package/static/redactorx.min.js +0 -0
  164. package/static/redactorx.usm.min.js +0 -0
  165. package/styles/test.sass +0 -0
  166. package/styles/test.scss +0 -0
  167. package/templates/_menu.vue +0 -0
  168. package/templates/comment.vue +0 -0
  169. package/templates/featured.vue +0 -0
  170. package/templates/thumbnail.vue +34 -11
  171. package/templates/unsupported.vue +0 -0
  172. package/utils/dom.js +0 -0
  173. package/utils/helper.js +0 -0
  174. package/utils/history.js +0 -0
  175. package/utils/http.js +0 -0
  176. package/utils/launch.js +0 -0
  177. package/utils/mime_type.js +2 -0
  178. package/utils/private/ws.js +0 -0
  179. package/utils/public.js +6 -0
  180. package/utils/queue.js +112 -0
  181. package/utils/settings.js +0 -0
  182. package/utils/type.js +0 -0
  183. package/utils/uploader.js +3 -0
@@ -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",
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
  }