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
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <component
2
+ <!-- <component
3
3
  :is="componentName"
4
4
  :class="cssClasses"
5
5
  :style="cssStyles"
@@ -9,17 +9,59 @@
9
9
  <template v-for="(item, index) in spec.childViews">
10
10
  <glib-component :key="index" :spec="item" />
11
11
  </template>
12
+ </component> -->
13
+ <component
14
+ :is="componentName"
15
+ :style="parentStyles"
16
+ :class="parentClasses"
17
+ :href="$href()"
18
+ @click="$onClick()"
19
+ >
20
+ <draggable
21
+ :style="childStyles"
22
+ :class="childClasses"
23
+ ghost-class="ghost"
24
+ :group="dragSupport ? dragSupport.groupId || 'common' : 'common'"
25
+ :data-dragPanelId="spec.id"
26
+ :disabled="!$type.isObject(spec.dragSupport)"
27
+ @start="onDragStart"
28
+ @end="onDragEnd"
29
+ >
30
+ <!-- Using `item.id` as key is important to make sure the item gets updated
31
+ when dragging ends. -->
32
+ <div
33
+ v-for="(item, index) in childViews"
34
+ :key="item.id || index"
35
+ :data-dragItemId="item.id"
36
+ >
37
+ <glib-component :spec="item" />
38
+ </div>
39
+ </draggable>
12
40
  </component>
13
41
  </template>
14
42
 
15
43
  <script>
44
+ import draggable from "vuedraggable";
45
+
16
46
  export default {
47
+ components: {
48
+ draggable
49
+ },
17
50
  props: {
18
51
  spec: { type: Object, required: true }
19
52
  },
53
+ data: function() {
54
+ return {
55
+ dragSupport: null,
56
+ childViews: []
57
+ };
58
+ },
20
59
  computed: {
21
- cssClasses: function() {
22
- const classes = this.$classes().concat("layouts-horizontal");
60
+ parentClasses: function() {
61
+ return this.$classes();
62
+ },
63
+ childClasses() {
64
+ const classes = ["layouts-horizontal"];
23
65
  const distribution = this.spec.distribution;
24
66
  switch (distribution) {
25
67
  case "fillEqually":
@@ -31,7 +73,10 @@ export default {
31
73
  default:
32
74
  Utils.type.ifString(distribution, distribution => {
33
75
  // Uses Material Design spacings: https://vuetifyjs.com/en/styles/spacing/#how-it-works
34
- if (distribution.startsWith("overlap")) {
76
+ if (
77
+ distribution.startsWith("overlap-") ||
78
+ distribution.startsWith("space-")
79
+ ) {
35
80
  classes.push(`layouts-horizontal--${distribution}`);
36
81
  }
37
82
  });
@@ -39,8 +84,16 @@ export default {
39
84
  }
40
85
  return classes;
41
86
  },
42
- cssStyles: function() {
43
- const styles = this.genericStyles();
87
+ parentStyles() {
88
+ const styles = this.$styles();
89
+ if (this.spec.width == "matchParent") {
90
+ styles["width"] = "100%";
91
+ }
92
+ return styles;
93
+ },
94
+ childStyles() {
95
+ const styles = {};
96
+
44
97
  switch (this.spec.align) {
45
98
  case "middle":
46
99
  styles["align-items"] = "center";
@@ -51,15 +104,55 @@ export default {
51
104
  default:
52
105
  styles["align-items"] = "flex-start";
53
106
  }
107
+
54
108
  return styles;
55
109
  },
56
110
  componentName() {
57
- return this.$href() ? "a" : "div";
111
+ return this.spec.onClick ? "a" : "div";
58
112
  }
59
113
  },
60
114
  methods: {
115
+ $ready() {
116
+ this.dragSupport = this.spec.dragSupport;
117
+ this.childViews = this.spec.childViews;
118
+ },
61
119
  $displayValue() {
62
120
  return "flex";
121
+ },
122
+ onDragStart(event) {
123
+ // This allows custom components to detect if something is being dragged.
124
+ window.vueApp.draggedComponent = this;
125
+ },
126
+ onDragEnd(event) {
127
+ window.vueApp.draggedComponent = null;
128
+
129
+ const targetRowIndex = event.newIndex;
130
+ if (event.from == event.to && event.oldIndex == targetRowIndex) {
131
+ console.log("Reordering canceled");
132
+ return;
133
+ }
134
+
135
+ console.log("DRAG1", this.childViews);
136
+
137
+ const itemId = event.clone.dataset.dragitemid; // The item that got dragged/dropped
138
+ const oldPanelId = event.from.dataset.dragpanelid;
139
+ const newPanelId = event.to.dataset.dragpanelid;
140
+
141
+ const dragSpec = this.spec.dragSupport;
142
+ const mergedSpec = Object.assign(dragSpec.onDrop, {
143
+ [dragSpec.paramNameForFormData || "formData"]: {
144
+ [dragSpec.paramNameForNewAbsoluteIndex || "newIndex"]: targetRowIndex,
145
+ [dragSpec.paramNameForItemId || "itemId"]: itemId,
146
+ [dragSpec.paramNameForOldPanelId || "oldPanelId"]: oldPanelId,
147
+ [dragSpec.paramNameForNewPanelId || "newPanelId"]: newPanelId
148
+ }
149
+ });
150
+
151
+ console.log("DRAG2", mergedSpec, event.clone, event);
152
+
153
+ GLib.action.execute(mergedSpec, this);
154
+
155
+ console.log("DRAG3", this.childViews);
63
156
  }
64
157
  }
65
158
  };
@@ -122,4 +215,38 @@ a.panels-horizontal {
122
215
  .layouts-horizontal--overlap-5 > *:not(:first-child) {
123
216
  margin-left: -20px;
124
217
  }
218
+ .layouts-horizontal--overlap-6 > *:not(:first-child) {
219
+ margin-left: -24px;
220
+ }
221
+ .layouts-horizontal--overlap-7 > *:not(:first-child) {
222
+ margin-left: -28px;
223
+ }
224
+ .layouts-horizontal--overlap-8 > *:not(:first-child) {
225
+ margin-left: -32px;
226
+ }
227
+
228
+ .layouts-horizontal--space-1 > *:not(:first-child) {
229
+ margin-left: 4px;
230
+ }
231
+ .layouts-horizontal--space-2 > *:not(:first-child) {
232
+ margin-left: 8px;
233
+ }
234
+ .layouts-horizontal--space-3 > *:not(:first-child) {
235
+ margin-left: 12px;
236
+ }
237
+ .layouts-horizontal--space-4 > *:not(:first-child) {
238
+ margin-left: 16px;
239
+ }
240
+ .layouts-horizontal--space-5 > *:not(:first-child) {
241
+ margin-left: 20px;
242
+ }
243
+ .layouts-horizontal--space-6 > *:not(:first-child) {
244
+ margin-left: 24px;
245
+ }
246
+ .layouts-horizontal--space-7 > *:not(:first-child) {
247
+ margin-left: 28px;
248
+ }
249
+ .layouts-horizontal--space-8 > *:not(:first-child) {
250
+ margin-left: 32px;
251
+ }
125
252
  </style>
@@ -3,7 +3,8 @@
3
3
  :two-line="twoLine"
4
4
  :three-line="threeLine"
5
5
  class="py-0"
6
- :style="genericStyles()"
6
+ :class="$classes()"
7
+ :style="$styles()"
7
8
  >
8
9
  <div ref="topAnchor">
9
10
  <div v-if="prevPageUrl" class="py-3 px-4">
@@ -18,16 +19,18 @@
18
19
  <draggable
19
20
  v-model="section.rows"
20
21
  ghost-class="ghost"
21
- group="a"
22
- handle=".handle"
23
- :data-index="sectionIndex"
22
+ :group="dragSupport ? dragSupport.groupId || 'common' : 'common'"
23
+ :data-dragListId="spec.id"
24
+ :data-dragSectionIndex="sectionIndex"
25
+ :disabled="!$type.isObject(dragSupport)"
26
+ @start="onDragStart"
24
27
  @end="onDragEnd"
25
28
  >
26
29
  <div
27
30
  v-for="(row, rowIndex) in section.rows"
28
31
  :key="`${sectionIndex}_${rowIndex}`"
29
32
  :ref="`row_${sectionIndex}_${rowIndex}`"
30
- :class="row.styleClasses"
33
+ :data-dragRowId="row.id"
31
34
  >
32
35
  <v-divider v-if="!spec.responsiveCols && rowIndex == 0" />
33
36
 
@@ -81,7 +84,8 @@ export default {
81
84
  },
82
85
  data: function() {
83
86
  return {
84
- sections: []
87
+ sections: [],
88
+ dragSupport: null
85
89
  };
86
90
  },
87
91
  computed: {
@@ -111,6 +115,7 @@ export default {
111
115
  methods: {
112
116
  $ready() {
113
117
  this.sections = this.spec.sections || [];
118
+ this.dragSupport = this.spec.dragSupport;
114
119
  this.autoloadAll(this.spec.nextPage);
115
120
  this.enableInfiniteScrollIfApplicable();
116
121
  this.$wsSubscribeEvents(this.spec.phoenixSocket);
@@ -212,37 +217,48 @@ export default {
212
217
  serializedSpec(row) {
213
218
  return JSON.stringify(row);
214
219
  },
220
+ onDragStart(event) {
221
+ // This allows custom components to detect if something is being dragged.
222
+ window.vueApp.draggedComponent = this;
223
+ },
215
224
  onDragEnd(event) {
225
+ window.vueApp.draggedComponent = null;
226
+
216
227
  const targetSectionedRowIndex = event.newIndex;
228
+ // const sourceSectionedRowIndex = event.oldIndex;
217
229
  if (event.from == event.to && event.oldIndex == targetSectionedRowIndex) {
218
230
  console.log("Reordering canceled");
219
231
  return;
220
232
  }
221
-
222
233
  const targetSectionIndex = this.getSectionIndex(event.to);
223
- const targetSection = this.getSection(targetSectionIndex);
224
- // The dragged row is now on the new index
225
- const draggedRow = targetSection.rows[targetSectionedRowIndex];
234
+ // const targetSection = this.getSection(targetSectionIndex);
226
235
 
227
236
  const targetAbsoluteIndex =
228
237
  this.previousSectionsRowCount(event.to) + targetSectionedRowIndex;
229
238
 
230
- const mergedSpec = Object.assign(draggedRow.onReorder, {
231
- [draggedRow.paramNameForFormData || "formData"]: {
232
- [draggedRow.paramNameForNewIndex]: targetAbsoluteIndex, // Deprecated
233
- [draggedRow.paramNameForNewAbsoluteIndex ||
239
+ const rowId = event.clone.dataset.dragrowid; // The item that got dragged/dropped
240
+ const oldListId = event.from.dataset.draglistid;
241
+ const newListId = event.to.dataset.draglistid;
242
+
243
+ const dragSpec = this.dragSupport;
244
+ const mergedSpec = Object.assign(dragSpec.onDrop, {
245
+ [dragSpec.paramNameForFormData || "formData"]: {
246
+ [dragSpec.paramNameForNewAbsoluteIndex ||
234
247
  "newAbsoluteIndex"]: targetAbsoluteIndex,
235
- [draggedRow.paramNameForNewSectionIndex ||
248
+ [dragSpec.paramNameForNewSectionIndex ||
236
249
  "newSectionIndex"]: targetSectionIndex,
237
- [draggedRow.paramNameForNewSectionedRowIndex ||
238
- "newSectionedRowIndex"]: targetSectionedRowIndex
250
+ [dragSpec.paramNameForNewSectionedRowIndex ||
251
+ "newSectionedRowIndex"]: targetSectionedRowIndex,
252
+ [dragSpec.paramNameForRowId || "rowId"]: rowId,
253
+ [dragSpec.paramNameForOldListId || "oldListId"]: oldListId,
254
+ [dragSpec.paramNameForNewListId || "newListId"]: newListId
239
255
  }
240
256
  });
241
257
 
242
258
  GLib.action.execute(mergedSpec, this);
243
259
  },
244
260
  getSectionIndex(element) {
245
- return element.dataset.index;
261
+ return element.dataset.dragsectionindex;
246
262
  },
247
263
  getSection(sectionIndex) {
248
264
  return this.sections[sectionIndex];
@@ -5,8 +5,8 @@
5
5
  v-if="hoverViewsSpec"
6
6
  :close-on-content-click="false"
7
7
  open-on-hover
8
- offset-x
9
- transition="scale-transition"
8
+ top
9
+ offset-y
10
10
  content-class="hover"
11
11
  >
12
12
  <template v-slot:activator="{ on, attrs }">
@@ -21,7 +21,6 @@
21
21
  <common-tooltip v-else :spec="spec">
22
22
  <template v-slot:activator="{ on }">
23
23
  <common-responsive :spec="spec" :event-handlers="on" />
24
- <!-- <common-button :spec="spec" :disabled="$isBusy" :event-handlers="on" /> -->
25
24
  </template>
26
25
  </common-tooltip>
27
26
  </div>
@@ -40,13 +39,18 @@ export default {
40
39
  },
41
40
  data() {
42
41
  return {
43
- hoverViewsSpec: this.spec.hoverViews
42
+ hoverViewsSpec: null
43
+ };
44
+ },
45
+ methods: {
46
+ $ready() {
47
+ this.hoverViewsSpec = this.spec.hoverViews
44
48
  ? {
45
49
  childViews: this.spec.hoverViews,
46
50
  align: this.spec.align
47
51
  }
48
- : false
49
- };
52
+ : null;
53
+ }
50
54
  }
51
55
  };
52
56
  </script>
File without changes
File without changes
File without changes
@@ -50,7 +50,7 @@ export default {
50
50
  return styles;
51
51
  },
52
52
  componentName() {
53
- return this.$href() ? "a" : "div";
53
+ return this.spec.onClick ? "a" : "div";
54
54
  }
55
55
  }
56
56
  };
File without changes
File without changes
File without changes
File without changes
File without changes
package/keys.js CHANGED
File without changes
package/nav/dialog.vue CHANGED
File without changes
File without changes
File without changes
package/nav/sheet.vue CHANGED
File without changes
package/nav/snackbar.vue CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glib-web",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -47,4 +47,4 @@
47
47
  "prettier": "^1.18.2",
48
48
  "typescript": "^4.9.5"
49
49
  }
50
- }
50
+ }
File without changes
@@ -1,16 +1,10 @@
1
1
  export default {
2
2
  install: (Vue, options) => {
3
- // Vue.prototype.updatables = {};
4
-
5
3
  Vue.mixin({
6
4
  created: function() {
7
5
  let spec = this.spec;
8
6
  if (spec && spec.id && this.$registryEnabled()) {
9
7
  GLib.component.register(spec.id, this);
10
- // Object.assign(this.updatables, {
11
- // [spec.id]: this
12
- // });
13
- // console.log("U", this.updatables);
14
8
  }
15
9
  },
16
10
  methods: {
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
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/styles/test.sass CHANGED
File without changes
package/styles/test.scss CHANGED
File without changes
File without changes
File without changes
File without changes
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <div style="display:flex;" class="thumbnail">
2
+ <div style="display:flex;" class="thumbnail" :class="cssClasses">
3
3
  <div
4
4
  v-if="spec.leftOuterButtons"
5
5
  class="left-universal"
6
- style="display:flex; margin-top: 10px;"
6
+ style="display:flex; margin-top:10px;"
7
7
  >
8
8
  <template v-for="(item, index) in spec.leftOuterButtons">
9
9
  <common-button
@@ -17,11 +17,11 @@
17
17
  <v-list-item
18
18
  v-longclick="$onLongPress"
19
19
  :href="$href()"
20
- style="padding-left: 0;display:flex;"
20
+ class="item-content"
21
21
  :style="columnStyles()"
22
22
  @[clickCondition]="$onClick()"
23
23
  >
24
- <v-icon v-if="spec.onReorder" class="handle">drag_indicator</v-icon>
24
+ <!-- <v-icon v-if="spec.onReorder" class="handle">drag_indicator</v-icon> -->
25
25
 
26
26
  <!-- Specify a key to prevent reuse which causes an issue where the checkbox would use the previous name. -->
27
27
  <fields-check v-if="checkSpec" :key="checkSpec.name" :spec="checkSpec" />
@@ -76,7 +76,7 @@
76
76
  </div>
77
77
 
78
78
  <!-- NOTE: Experimental -->
79
- <panels-responsive :spec="accessory" />
79
+ <panels-responsive :spec="spec.accessory" />
80
80
  </v-list-item-content>
81
81
 
82
82
  <template v-for="(item, index) in spec.rightButtons">
@@ -105,12 +105,15 @@ export default {
105
105
  },
106
106
  data() {
107
107
  return {
108
- accessory: {},
108
+ // accessory: {},
109
109
  editButtons: []
110
110
  // checkSpec: null
111
111
  };
112
112
  },
113
113
  computed: {
114
+ cssClasses() {
115
+ return this.$classes(this.spec, "templates/thumbnail");
116
+ },
114
117
  clickCondition() {
115
118
  if (this.spec.onClick || this.spec.onLongPress) {
116
119
  // This will show the clickable indication
@@ -145,10 +148,24 @@ export default {
145
148
  }
146
149
  return null;
147
150
  }
151
+ // cssStyles() {
152
+ // const styles = this.$styles();
153
+ // // switch(this.spec.align) {
154
+ // // case 'middle':
155
+ // // styles['align-items'] = 'center'
156
+ // // break
157
+ // // case 'bottom':
158
+ // // styles['align-items'] = 'flex-end'
159
+ // // break
160
+ // // default:
161
+ // // styles['align-items'] = 'flex-start'
162
+ // // }
163
+ // return styles;
164
+ // },
148
165
  },
149
166
  methods: {
150
167
  $ready() {
151
- this.accessory = { childViews: this.spec.accessoryViews };
168
+ // this.accessory = { childViews: this.spec.accessoryViews };
152
169
  this.editButtons = this.spec.editButtons || [];
153
170
  },
154
171
  buttonSpec(item) {
@@ -173,6 +190,12 @@ export default {
173
190
  </style>
174
191
 
175
192
  <style lang="scss" scoped>
193
+ .item-content {
194
+ padding-left: 0;
195
+ padding-right: 0;
196
+ display: flex;
197
+ }
198
+
176
199
  @media (min-width: 600px) {
177
200
  .left-thumbnail.v-avatar.v-list-item__avatar {
178
201
  margin: 6px 6px 6px 6px;
@@ -186,9 +209,9 @@ export default {
186
209
  .left-universal {
187
210
  padding-left: 16px;
188
211
  }
189
- .handle {
190
- margin-left: 10px;
191
- cursor: move;
192
- }
212
+ // .handle {
213
+ // // margin-left: 10px;
214
+ // cursor: move;
215
+ // }
193
216
  }
194
217
  </style>
File without changes
package/utils/dom.js CHANGED
File without changes
package/utils/helper.js CHANGED
File without changes
package/utils/history.js CHANGED
File without changes
package/utils/http.js CHANGED
File without changes
package/utils/launch.js CHANGED
File without changes