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
package/.eslintrc.js CHANGED
File without changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/action.js CHANGED
@@ -50,6 +50,7 @@ import ActionsAnalyticsLogEvent from "./actions/analytics/logEvent";
50
50
 
51
51
  import ActionCommandsCopy from "./actions/commands/copy";
52
52
  import ActionCommandsCustom from "./actions/commands/custom";
53
+ import ActionCommandsEnqueue from "./actions/commands/enqueue";
53
54
 
54
55
  import ActionToursStart from "./actions/tours/start";
55
56
 
@@ -106,6 +107,7 @@ const actions = {
106
107
 
107
108
  "commands/copy": ActionCommandsCopy,
108
109
  "commands/custom": ActionCommandsCustom,
110
+ "commands/enqueue": ActionCommandsEnqueue,
109
111
 
110
112
  "tours/start": ActionToursStart,
111
113
  "components/update": ActionComponentsUpdate
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,17 @@
1
+ // import Hash from "../../utils/hash";
2
+
3
+ export default class {
4
+ // async executeJob(spec, component) {
5
+ // console.log("Waiting for next job1...");
6
+ // GLib.action.execute(spec.onExecute, component);
7
+ // await this.sleep(2000);
8
+ // console.log("Waiting for next job2...");
9
+ // }
10
+ execute(spec, component) {
11
+ GLib.queue.enqueue(() => {
12
+ GLib.action.execute(spec.onExecute, component);
13
+ // console.log("Waiting for next job0...");
14
+ // this.executeJob(spec, component);
15
+ });
16
+ }
17
+ }
@@ -5,25 +5,24 @@ export default class {
5
5
  if (!spec.views.length > 1) {
6
6
  console.warn("Make sure views only have 1 child!");
7
7
  }
8
- // const target = component.updatables[spec.targetId];
9
- // if (!target) console.error("no component found :" + spec.targetId);
10
8
 
11
9
  const target = GLib.component.findById(spec.targetId);
12
10
  if (target) {
13
11
  Object.assign(target.spec, spec.views[0]);
14
- this.updateComponent(target);
12
+ target.$recursiveUpdate();
15
13
  }
16
14
  }
17
15
 
18
- updateComponent(component) {
19
- component.$ready();
20
- component.$forceUpdate();
16
+ // // TODO: Use $recursiveUpdate(). See mixins/events
17
+ // updateComponent(component) {
18
+ // component.$ready();
19
+ // component.$forceUpdate();
21
20
 
22
- // Execute on next tick to ensure that the child has received the updated spec.
23
- Vue.nextTick(() => {
24
- component.$children.find(child => {
25
- this.updateComponent(child);
26
- });
27
- });
28
- }
21
+ // // Execute on next tick to ensure that the child has received the updated spec.
22
+ // Vue.nextTick(() => {
23
+ // component.$children.find(child => {
24
+ // this.updateComponent(child);
25
+ // });
26
+ // });
27
+ // }
29
28
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/app.vue CHANGED
@@ -194,6 +194,9 @@ body,
194
194
  .glib-scrollto--highlighted {
195
195
  background: yellow !important;
196
196
  }
197
+ .glib-clickable {
198
+ cursor: pointer;
199
+ }
197
200
  /******/
198
201
  </style>
199
202
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -2,19 +2,15 @@
2
2
  <div ref="fileUploadContainer" class="mb-3" :style="$styles()">
3
3
  <label class="v-label v-label--active">{{ spec.label }}</label>
4
4
  <div class="preview-container">
5
- <v-avatar
6
- v-if="placeholder.type == 'avatar'"
7
- :style="genericStyles(placeholder)"
8
- class="mr-4"
9
- >
5
+ <v-avatar v-if="placeholder.type == 'avatar'" :style="genericStyles(placeholder)" class="mr-4">
10
6
  <img :src="fileImage || placeholder.url" />
11
7
  </v-avatar>
12
- <img
13
- v-else-if="placeholder.type == 'image'"
14
- class="square-image mr-4"
15
- :style="genericStyles(placeholder)"
16
- :src="fileImage || placeholder.url"
17
- />
8
+ <img v-else-if="placeholder.type == 'image'" class="square-image mr-4" :style="genericStyles(placeholder)"
9
+ :src="fileImage || placeholder.url" />
10
+
11
+ <v-text-field v-else-if="placeholder.type == 'input'" :value="fileTitle" outlined prominent
12
+ placholder="Upload your file" disabled />
13
+
18
14
  <span v-else class="mr-4">{{ fileTitle }}</span>
19
15
 
20
16
  <span v-if="spec.uploadText">
@@ -37,12 +33,7 @@
37
33
  </v-btn>
38
34
  </span>
39
35
  </div>
40
- <input
41
- ref="directUploadFile"
42
- style="display: none;"
43
- type="file"
44
- @change="uploadFiles"
45
- />
36
+ <input ref="directUploadFile" style="display: none;" type="file" @change="uploadFiles" />
46
37
 
47
38
  <!-- <input type="file" :name="spec.name" ref='directUploadFile' @change='uploadFiles' v-show='!uploaded'/> -->
48
39
  <v-progress-linear v-if="showProgress" v-model="progress.value" />
@@ -82,7 +73,7 @@ export default {
82
73
  };
83
74
  },
84
75
  computed: {
85
- showProgress: function() {
76
+ showProgress: function () {
86
77
  return this.progress.value >= 0;
87
78
  }
88
79
  },
@@ -165,6 +156,9 @@ export default {
165
156
 
166
157
  <style lang="scss" scoped>
167
158
  .preview-container {
159
+ display: flex;
160
+ align-items: center;
161
+
168
162
  .action-container {
169
163
  padding-left: 10px;
170
164
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -12,7 +12,7 @@
12
12
  :type="variant.type"
13
13
  :rules="rules"
14
14
  :prepend-inner-icon="leftIconName"
15
- :append-icon="variant.appendIcon"
15
+ :append-icon="rightIconName || variant.appendIcon"
16
16
  :prefix="spec.leftText"
17
17
  :suffix="spec.rightText"
18
18
  :min="spec.min"
@@ -22,7 +22,7 @@
22
22
  :dense="$classes().includes('dense')"
23
23
  :autofocus="spec.autoFocus || false"
24
24
  validate-on-blur
25
- @click:append="onRightIconClick"
25
+ v-on="onRightIconClick ? { 'click:append': onRightIconClick } : null"
26
26
  @input="onChange"
27
27
  />
28
28
  <input
@@ -46,6 +46,7 @@ export default {
46
46
  return {
47
47
  variant: {},
48
48
  rules: [],
49
+ onRightIconClick: null,
49
50
  fields: {
50
51
  email: {
51
52
  type: "email",
@@ -104,12 +105,23 @@ export default {
104
105
  const icon = this.spec.leftIcon || {};
105
106
  const materialIcon = icon.material || {};
106
107
  return materialIcon.name;
108
+ },
109
+ rightIconName() {
110
+ const icon = this.spec.rightIcon || {};
111
+ const materialIcon = icon.material || {};
112
+ return materialIcon.name;
107
113
  }
108
114
  },
109
115
  methods: {
110
116
  $ready() {
111
117
  this.variant = this.fields[this.type] || {};
112
118
  this.rules = this.$validation(this.variant.rules);
119
+
120
+ if (this.variant.onRightIconClick) {
121
+ this.onRightIconClick = () => {
122
+ this.variant.onRightIconClick(this);
123
+ };
124
+ }
113
125
  },
114
126
  togglePasswordVisibility() {
115
127
  const passwordField = this.fields["password"];
@@ -121,9 +133,6 @@ export default {
121
133
  passwordField.appendIcon = "visibility";
122
134
  }
123
135
  },
124
- onRightIconClick() {
125
- this.variant.onRightIconClick(this);
126
- },
127
136
  classes() {
128
137
  return this.$classes().concat("g-text-field--hintless");
129
138
  },
File without changes
File without changes
File without changes
package/components/h1.vue CHANGED
File without changes
package/components/h2.vue CHANGED
File without changes
package/components/h3.vue CHANGED
File without changes
package/components/h5.vue CHANGED
File without changes
package/components/h6.vue CHANGED
File without changes
package/components/hr.vue CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -152,6 +152,17 @@ export default {
152
152
  $updated() {
153
153
  // To be overridden
154
154
  },
155
+ $recursiveUpdate() {
156
+ this.$ready();
157
+ this.$forceUpdate();
158
+
159
+ // Execute on next tick to ensure that the child has received the updated spec.
160
+ this.$nextTick(() => {
161
+ this.$children.find(child => {
162
+ child.$recursiveUpdate();
163
+ });
164
+ });
165
+ },
155
166
  $dispatchEvent(name, data) {
156
167
  const event = new Event(name, { bubbles: true });
157
168
 
File without changes
File without changes
File without changes
File without changes
@@ -125,10 +125,10 @@ export default {
125
125
  val => (styles["height"] = val)
126
126
  );
127
127
 
128
- Utils.type.ifObject(
129
- properties.onClick,
130
- () => (styles["cursor"] = "pointer")
131
- );
128
+ // Utils.type.ifObject(
129
+ // properties.onClick,
130
+ // () => (styles["cursor"] = "pointer")
131
+ // );
132
132
 
133
133
  // This is the main reason styles have to be used in a dynamic way.
134
134
  this._updateDisplay(styles, properties);
@@ -213,6 +213,10 @@ export default {
213
213
  const componentName = Utils.app.componentName(properties.view);
214
214
  const classes = (properties.styleClasses || []).concat(componentName);
215
215
 
216
+ Utils.type.ifObject(properties.onClick, () =>
217
+ classes.push("glib-clickable")
218
+ );
219
+
216
220
  Utils.type.ifArray(properties.styleClasses, val => {
217
221
  if (val.includes("card")) {
218
222
  classes.push("v-card");
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/components/p.vue CHANGED
File without changes
File without changes
@@ -57,6 +57,9 @@ export default {
57
57
  $ready() {
58
58
  const onClick = this.spec.onClick ? { onClick: this.spec.onClick } : {};
59
59
  this.customData = Object.assign(onClick, this.spec.data);
60
+ },
61
+ $registryEnabled() {
62
+ return false;
60
63
  }
61
64
  }
62
65
  };
File without changes
File without changes