glib-web 2.5.0 → 3.0.0-beta1

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 (209) hide show
  1. package/.eslintrc.js +0 -0
  2. package/LICENSE +0 -0
  3. package/README.md +0 -0
  4. package/action.js +6 -1
  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 +13 -14
  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 +25 -26
  43. package/components/_button.vue +21 -28
  44. package/components/_chip.vue +14 -19
  45. package/components/_dropdownMenu.vue +10 -23
  46. package/components/_icon.vue +5 -5
  47. package/components/_message.vue +0 -0
  48. package/components/_responsive.vue +7 -21
  49. package/components/avatar.vue +11 -15
  50. package/components/banners/alert.vue +2 -7
  51. package/components/banners/select.vue +18 -30
  52. package/components/button.vue +5 -5
  53. package/components/calendar.vue +0 -0
  54. package/components/component.vue +96 -101
  55. package/components/datetime.vue +0 -0
  56. package/components/fab.vue +0 -0
  57. package/components/fields/_patternText.vue +5 -19
  58. package/components/fields/_select.vue +7 -28
  59. package/components/fields/autocomplete.vue +5 -21
  60. package/components/fields/check.vue +19 -11
  61. package/components/fields/country/countries.js +0 -0
  62. package/components/fields/country/field.vue +9 -27
  63. package/components/fields/country/regions.js +0 -0
  64. package/components/fields/creditCard.vue +0 -0
  65. package/components/fields/date.vue +5 -5
  66. package/components/fields/datetime.vue +5 -5
  67. package/components/fields/dynamicSelect.vue +8 -29
  68. package/components/fields/file.vue +0 -0
  69. package/components/fields/googlePlace.vue +0 -0
  70. package/components/fields/hidden.vue +0 -0
  71. package/components/fields/location.vue +0 -0
  72. package/components/fields/newRichText.vue +66 -53
  73. package/components/fields/otpField.vue +6 -14
  74. package/components/fields/phone/countries.js +0 -0
  75. package/components/fields/phone/field.vue +60 -78
  76. package/components/fields/phone/sprite.css +0 -0
  77. package/components/fields/radio.vue +16 -23
  78. package/components/fields/rating.vue +9 -16
  79. package/components/fields/richText.vue +8 -28
  80. package/components/fields/select.vue +10 -7
  81. package/components/fields/stripe/stripeFields.vue +0 -0
  82. package/components/fields/stripe/stripeIndividualFields.vue +0 -0
  83. package/components/fields/stripeExternalAccount.vue +10 -24
  84. package/components/fields/stripeToken.vue +0 -0
  85. package/components/fields/submit.vue +0 -0
  86. package/components/fields/text.vue +24 -40
  87. package/components/fields/textarea.vue +13 -27
  88. package/components/fields/timeZone.vue +9 -6
  89. package/components/fields/timer.vue +3 -10
  90. package/components/h1.vue +0 -0
  91. package/components/h2.vue +0 -0
  92. package/components/h3.vue +0 -0
  93. package/components/h5.vue +0 -0
  94. package/components/h6.vue +0 -0
  95. package/components/hr.vue +0 -0
  96. package/components/html.vue +0 -0
  97. package/components/icon.vue +0 -0
  98. package/components/image.vue +13 -20
  99. package/components/label.vue +0 -0
  100. package/components/markdown.vue +15 -8
  101. package/components/mixins/chart/annotation.js +0 -0
  102. package/components/mixins/chart/tooltip.js +0 -0
  103. package/components/mixins/dataset.js +0 -0
  104. package/components/mixins/events.js +17 -6
  105. package/components/mixins/extension.js +0 -0
  106. package/components/mixins/list/autoload.js +0 -0
  107. package/components/mixins/longClick.js +0 -0
  108. package/components/mixins/scrolling.js +0 -0
  109. package/components/mixins/styles.js +18 -15
  110. package/components/mixins/table/autoload.js +0 -0
  111. package/components/mixins/table/export.js +0 -0
  112. package/components/mixins/table/import.js +0 -0
  113. package/components/mixins/text.js +0 -0
  114. package/components/mixins/ws/actionCable.js +0 -0
  115. package/components/mixins/ws/phoenixSocket.js +0 -0
  116. package/components/multimedia/video.vue +0 -0
  117. package/components/p.vue +0 -0
  118. package/components/panels/carousel.vue +0 -0
  119. package/components/panels/column.vue +5 -5
  120. package/components/panels/custom.vue +15 -15
  121. package/components/panels/flow.vue +19 -13
  122. package/components/panels/form.vue +17 -28
  123. package/components/panels/grid.vue +15 -9
  124. package/components/panels/horizontal.vue +149 -18
  125. package/components/panels/list.vue +63 -70
  126. package/components/panels/responsive.vue +13 -33
  127. package/components/panels/scroll.vue +0 -0
  128. package/components/panels/split.vue +2 -2
  129. package/components/panels/table.vue +27 -61
  130. package/components/panels/timeline.vue +20 -30
  131. package/components/panels/vertical.vue +9 -14
  132. package/components/panels/web.vue +0 -0
  133. package/components/progressbar.vue +0 -0
  134. package/components/spacer.vue +0 -0
  135. package/components/switch.vue +0 -0
  136. package/components/tabBar.vue +27 -19
  137. package/index.js +68 -72
  138. package/keys.js +0 -0
  139. package/nav/appbar.vue +4 -4
  140. package/nav/dialog.vue +24 -34
  141. package/nav/drawer.vue +39 -51
  142. package/nav/drawerButton.vue +5 -7
  143. package/nav/drawerLabel.vue +2 -3
  144. package/nav/sheet.vue +18 -24
  145. package/nav/snackbar.vue +16 -26
  146. package/package.json +10 -11
  147. package/plugins/driverCustomBehavior.js +1 -1
  148. package/plugins/updatableComponent.js +1 -7
  149. package/plugins/vuetify.js +27 -0
  150. package/settings.json.example +0 -0
  151. package/static/plugins/alignment/alignment.js +0 -0
  152. package/static/plugins/alignment/alignment.min.js +0 -0
  153. package/static/plugins/beyondgrammar/beyondgrammar.js +0 -0
  154. package/static/plugins/beyondgrammar/beyondgrammar.min.js +0 -0
  155. package/static/plugins/blockcode/blockcode.js +0 -0
  156. package/static/plugins/blockcode/blockcode.min.js +0 -0
  157. package/static/plugins/clips/clips.js +0 -0
  158. package/static/plugins/clips/clips.min.js +0 -0
  159. package/static/plugins/counter/counter.js +0 -0
  160. package/static/plugins/counter/counter.min.js +0 -0
  161. package/static/plugins/definedlinks/definedlinks.js +0 -0
  162. package/static/plugins/definedlinks/definedlinks.min.js +0 -0
  163. package/static/plugins/handle/handle.js +0 -0
  164. package/static/plugins/handle/handle.min.js +0 -0
  165. package/static/plugins/icons/icons.js +0 -0
  166. package/static/plugins/icons/icons.min.js +0 -0
  167. package/static/plugins/imageposition/imageposition.js +0 -0
  168. package/static/plugins/imageposition/imageposition.min.js +0 -0
  169. package/static/plugins/inlineformat/inlineformat.js +0 -0
  170. package/static/plugins/inlineformat/inlineformat.min.js +0 -0
  171. package/static/plugins/removeformat/removeformat.js +0 -0
  172. package/static/plugins/removeformat/removeformat.min.js +0 -0
  173. package/static/plugins/selector/selector.js +0 -0
  174. package/static/plugins/selector/selector.min.js +0 -0
  175. package/static/plugins/specialchars/specialchars.js +0 -0
  176. package/static/plugins/specialchars/specialchars.min.js +0 -0
  177. package/static/plugins/textdirection/textdirection.js +0 -0
  178. package/static/plugins/textdirection/textdirection.min.js +0 -0
  179. package/static/plugins/textexpander/textexpander.js +0 -0
  180. package/static/plugins/textexpander/textexpander.min.js +0 -0
  181. package/static/plugins/underline/underline.js +0 -0
  182. package/static/plugins/underline/underline.min.js +0 -0
  183. package/static/redactorx.css +0 -0
  184. package/static/redactorx.js +0 -0
  185. package/static/redactorx.min.css +0 -0
  186. package/static/redactorx.min.js +0 -0
  187. package/static/redactorx.usm.min.js +0 -0
  188. package/styles/test.sass +0 -0
  189. package/styles/test.scss +0 -0
  190. package/templates/_menu.vue +0 -0
  191. package/templates/comment.vue +42 -19
  192. package/templates/featured.vue +8 -9
  193. package/templates/thumbnail-old.vue +188 -0
  194. package/templates/thumbnail.vue +5 -188
  195. package/templates/unsupported.vue +0 -0
  196. package/tsconfig.json +1 -1
  197. package/utils/dom.js +0 -0
  198. package/utils/eventBus.js +9 -2
  199. package/utils/helper.js +0 -0
  200. package/utils/history.js +7 -4
  201. package/utils/http.js +7 -2
  202. package/utils/launch.js +43 -51
  203. package/utils/mime_type.js +0 -0
  204. package/utils/private/ws.js +0 -0
  205. package/utils/public.js +6 -0
  206. package/utils/queue.js +110 -0
  207. package/utils/settings.js +3 -1
  208. package/utils/type.js +0 -0
  209. package/utils/uploader.js +0 -0
@@ -1,10 +1,10 @@
1
1
  <template>
2
- <common-tooltip :spec="spec">
3
- <template v-slot:activator="{ on }">
4
- <!-- <common-button :spec="spec" :disabled="$isBusy" :event-handlers="on" /> -->
2
+ <!-- <common-tooltip :spec="spec"> -->
3
+ <!-- <template v-slot:activator="{ on }"> -->
4
+ <!-- <common-button :spec="spec" :disabled="$isBusy" :event-handlers="on" /> -->
5
5
 
6
- <div :class="$classes()">
7
- <!-- <v-tooltip
6
+ <div :class="$classes()">
7
+ <!-- <v-tooltip
8
8
  :disabled="tooltip.disabled"
9
9
  :top="tooltipPositionMatches('top')"
10
10
  :right="tooltipPositionMatches('right')"
@@ -12,26 +12,19 @@
12
12
  :left="tooltipPositionMatches('left')"
13
13
  >
14
14
  <template v-slot:activator="{ on }"> -->
15
- <v-radio
16
- :label="spec.label"
17
- :value="spec.value.presence() || vuetifyEmptyString"
18
- :disabled="spec.readOnly"
19
- :on-icon="spec.onIcon"
20
- :off-icon="spec.offIcon"
21
- v-on="on"
22
- @click="$onClick()"
23
- />
24
- <div v-if="spec.childViews" class="radio-childviews">
25
- <div v-for="(item, i) in spec.childViews" :key="i">
26
- <glib-component :spec="item" />
27
- </div>
28
- </div>
29
- <!-- </template>
15
+ <v-radio :label="spec.label" :value="spec.value.presence() || vuetifyEmptyString" :disabled="spec.readOnly"
16
+ :on-icon="spec.onIcon" :off-icon="spec.offIcon" @click="$onClick()" />
17
+ <div v-if="spec.childViews" class="radio-childviews">
18
+ <div v-for="(item, i) in spec.childViews" :key="i">
19
+ <glib-component :spec="item" />
20
+ </div>
21
+ </div>
22
+ <!-- </template>
30
23
  <span>{{ tooltip.text }}</span>
31
24
  </v-tooltip> -->
32
- </div>
33
- </template>
34
- </common-tooltip>
25
+ </div>
26
+ <!-- </template>
27
+ </common-tooltip> -->
35
28
  </template>
36
29
 
37
30
  <script>
@@ -1,26 +1,19 @@
1
1
  <template>
2
2
  <div>
3
- <v-rating
4
- v-model="fieldModel"
5
- :name="fieldName"
6
- :value="spec.value"
7
- empty-icon="star_outline"
8
- full-icon="star"
9
- half-icon="star_half"
10
- :half-increments="spec.halfIncrements"
11
- hover
12
- length="5"
13
- :readonly="spec.readOnly"
14
- :color="spec.color"
15
- :background-color="spec.color"
16
- :size="spec.size"
17
- ></v-rating>
3
+ <v-rating v-model="fieldModel" :name="fieldName" empty-icon="star_outline" full-icon="star" half-icon="star_half"
4
+ :half-increments="spec.halfIncrements" hover length="5" :readonly="spec.readOnly" :color="spec.color"
5
+ :bg-color="spec.color" :size="spec.size"></v-rating>
18
6
  <input type="hidden" :name="fieldName" :value="fieldModel" />
19
7
  </div>
20
8
  </template>
21
9
 
22
10
  <script>
23
11
  export default {
24
- props: { spec: { type: Object, required: true } }
12
+ props: { spec: { type: Object, required: true } },
13
+ methos: {
14
+ $ready() {
15
+ this.fieldModel = this.spec.value;
16
+ },
17
+ },
25
18
  };
26
19
  </script>
@@ -8,36 +8,16 @@
8
8
  <v-progress-linear v-if="showProgress" v-model="progress.value" />
9
9
 
10
10
  <!-- Remove the editor to avoid circular updating between this editor and the raw field. -->
11
- <VueEditor
12
- v-if="!rawMode"
13
- id="rich-editor"
14
- v-model="richEditorValue"
15
- :editor-toolbar="customToolbar"
16
- use-custom-image-handler
17
- @text-change="onRichTextEditorChanged"
18
- @image-added="uploadImage"
19
- :editorOptions="editorSettings"
20
- />
11
+ <VueEditor v-if="!rawMode" id="rich-editor" v-model="richEditorValue" :editor-toolbar="customToolbar"
12
+ use-custom-image-handler @text-change="onRichTextEditorChanged" @image-added="uploadImage"
13
+ :editorOptions="editorSettings" />
21
14
  <!-- Hide these fields but don't remove them because these are the values that will get submitted. -->
22
15
  <div :style="{ display: rawMode ? 'block' : 'none' }">
23
- <v-textarea
24
- id="raw-editor"
25
- v-model="rawEditorValue"
26
- :style="$styles()"
27
- :class="$classes()"
28
- :outlined="$classes().includes('outlined')"
29
- @input="onRawTextEditorChanged"
30
- ></v-textarea>
31
- <v-text-field
32
- v-for="(imageKey, index) in imageKeys"
33
- :key="index"
34
- :label="`Image ${index + 1}`"
35
- :style="$styles()"
36
- :outlined="$classes().includes('outlined')"
37
- type="text"
38
- :name="imageUploader.name"
39
- :value="images[imageKey]"
40
- />
16
+ <v-textarea id="raw-editor" v-model="rawEditorValue" :style="$styles()" :class="$classes()"
17
+ :outlined="$classes().includes('outlined') || null" @input="onRawTextEditorChanged"></v-textarea>
18
+ <v-text-field v-for="(imageKey, index) in imageKeys" :key="index" :label="`Image ${index + 1}`" :style="$styles()"
19
+ :outlined="$classes().includes('outlined') || null" type="text" :name="imageUploader.name"
20
+ :value="images[imageKey]" />
41
21
  </div>
42
22
  <input type="hidden" :name="spec.name" :value="producedValue" />
43
23
  </div>
@@ -1,21 +1,24 @@
1
1
  <template>
2
- <fields-genericSelect ref="delegate" :spec="updatedSpec" />
2
+ <fields-genericSelect
3
+ ref="delegate"
4
+ :spec="updatedSpec"
5
+ />
3
6
  </template>
4
7
 
5
8
  <script>
6
- import SelectField from "./_select";
9
+ import SelectField from "./_select.vue";
7
10
 
8
11
  export default {
9
12
  components: {
10
13
  // Need to start with `fields-` to enable jsonlogic in `styles.js#_linkFieldModels`
11
- "fields-genericSelect": SelectField
14
+ "fields-genericSelect": SelectField,
12
15
  },
13
16
  props: {
14
- spec: { type: Object, required: true }
17
+ spec: { type: Object, required: true },
15
18
  },
16
19
  data() {
17
20
  return {
18
- updatedSpec: this.spec
21
+ updatedSpec: this.spec,
19
22
  };
20
23
  },
21
24
  methods: {
@@ -25,7 +28,7 @@ export default {
25
28
  action_merge(mergedSpec) {
26
29
  Object.assign(this.updatedSpec, mergedSpec);
27
30
  this.$refs.delegate.updateData(true);
28
- }
29
- }
31
+ },
32
+ },
30
33
  };
31
34
  </script>
File without changes
@@ -1,29 +1,15 @@
1
1
  <template>
2
2
  <div :style="genericStyles()" :class="$classes()">
3
- <v-text-field
4
- v-model="accountNumber"
5
- label="Account Number"
6
- placeholder="000123456"
7
- :outlined="$classes().includes('outlined')"
8
- :rounded="$classes().includes('rounded')"
9
- :dense="$classes().includes('dense')"
10
- :rules="accountNumberRules"
11
- :error-messages="errorMessages"
12
- @keyup="$onTyping({ duration: 200 })"
13
- />
3
+ <v-text-field v-model="accountNumber" label="Account Number" placeholder="000123456"
4
+ :outlined="$classes().includes('outlined') || null" :rounded="$classes().includes('rounded')"
5
+ :dense="$classes().includes('dense') || null" :rules="accountNumberRules" :error-messages="errorMessages"
6
+ @keyup="$onTyping({ duration: 200 })" />
14
7
 
15
8
  <div v-if="spec.country">
16
9
  <div v-for="field in inputs[country].fields" :key="field.label">
17
- <v-text-field
18
- v-model="field.model"
19
- :label="field.label"
20
- :placeholder="field.placeholder"
21
- :outlined="$classes().includes('outlined')"
22
- :rounded="$classes().includes('rounded')"
23
- :dense="$classes().includes('dense')"
24
- :rules="field.rules"
25
- @keyup="$onTyping({ duration: 200 })"
26
- />
10
+ <v-text-field v-model="field.model" :label="field.label" :placeholder="field.placeholder"
11
+ :outlined="$classes().includes('outlined') || null" :rounded="$classes().includes('rounded')"
12
+ :dense="$classes().includes('dense') || null" :rules="field.rules" @keyup="$onTyping({ duration: 200 })" />
27
13
  </div>
28
14
  </div>
29
15
 
@@ -48,7 +34,7 @@ export default {
48
34
  this.country = this.spec.country.toLowerCase();
49
35
  this.stripe = Stripe(this.spec.publicKey);
50
36
  this.spec.onTypeEnd = { action: "component/createToken" };
51
- this.registerCountry("nz", [], function() {
37
+ this.registerCountry("nz", [], function () {
52
38
  return "";
53
39
  });
54
40
  this.registerCountry(
@@ -61,7 +47,7 @@ export default {
61
47
  rules: [value => !!value || "Bank state number required"]
62
48
  }
63
49
  ],
64
- function() {
50
+ function () {
65
51
  return this.fields[0].model;
66
52
  }
67
53
  );
@@ -81,7 +67,7 @@ export default {
81
67
  rules: [value => !!value || "Institution number required"]
82
68
  }
83
69
  ],
84
- function() {
70
+ function () {
85
71
  return `${this.fields[0].model}-${this.fields[1].model}`;
86
72
  }
87
73
  );
File without changes
File without changes
@@ -1,36 +1,11 @@
1
1
  <template>
2
2
  <div :style="$styles()" :class="classes()">
3
- <v-text-field
4
- v-model="fieldModel"
5
- :label="spec.label"
6
- :name="fieldName"
7
- :value="spec.value"
8
- :hint="spec.hint"
9
- :placeholder="spec.placeholder"
10
- :maxlength="spec.maxLength || 255"
11
- :disabled="spec.readOnly"
12
- :type="variant.type"
13
- :rules="rules"
14
- :prepend-inner-icon="leftIconName"
15
- :append-icon="variant.appendIcon"
16
- :prefix="spec.leftText"
17
- :suffix="spec.rightText"
18
- :min="spec.min"
19
- :max="spec.max"
20
- :outlined="$classes().includes('outlined')"
21
- :rounded="$classes().includes('rounded')"
22
- :dense="$classes().includes('dense')"
23
- :autofocus="spec.autoFocus || false"
24
- validate-on-blur
25
- @click:append="onRightIconClick"
26
- @input="onChange"
27
- />
28
- <input
29
- v-if="spec.readOnly"
30
- type="hidden"
31
- :name="fieldName"
32
- :value="fieldModel"
33
- />
3
+ <v-text-field v-model="fieldModel" :label="spec.label" :name="fieldName" :hint="spec.hint"
4
+ :placeholder="spec.placeholder" :maxlength="spec.maxLength || 255" :disabled="spec.readOnly" :type="variant.type"
5
+ :rules="rules" :prepend-inner-icon="leftIconName" :append-icon="variant.appendIcon" :prefix="spec.leftText"
6
+ :suffix="spec.rightText" :min="spec.min" :max="spec.max" :outlined="$classes().includes('outlined') || null"
7
+ :autofocus="spec.autoFocus || false" validate-on-blur @click:append="onRightIconClick" @input="onChange" />
8
+ <input v-if="spec.readOnly" type="hidden" :name="fieldName" :model-value="fieldModel" />
34
9
  </div>
35
10
  </template>
36
11
 
@@ -46,11 +21,12 @@ export default {
46
21
  return {
47
22
  variant: {},
48
23
  rules: [],
24
+ onRightIconClick: null,
49
25
  fields: {
50
26
  email: {
51
27
  type: "email",
52
28
  prependIcon: "email",
53
- onRightIconClick: function() {},
29
+ onRightIconClick: function () { },
54
30
  rules: [
55
31
  v =>
56
32
  !v ||
@@ -61,14 +37,14 @@ export default {
61
37
  number: {
62
38
  type: "number",
63
39
  prependIcon: "looks_one",
64
- onRightIconClick: function() {},
40
+ onRightIconClick: function () { },
65
41
  rules: [v => !v || /^\-?[.\d]*$/.test(v) || "Must be a number"]
66
42
  },
67
43
  password: {
68
44
  type: "password",
69
45
  prependIcon: "lock",
70
46
  appendIcon: "visibility",
71
- onRightIconClick: function(vm) {
47
+ onRightIconClick: function (vm) {
72
48
  vm.togglePasswordVisibility();
73
49
  },
74
50
  rules: [v => !v || v.length >= 6 || "Password must be longer"]
@@ -76,7 +52,7 @@ export default {
76
52
  url: {
77
53
  type: "url",
78
54
  prependIcon: "web",
79
- onRightIconClick: function() {},
55
+ onRightIconClick: function () { },
80
56
  rules: [
81
57
  // From https://gist.github.com/rodneyrehm/8013067
82
58
  // Make sure to support unicode chars, e.g. https://www.facebook.com/%E5%86%B0%E5%8F%8B%E4%BE%86%E7%9C%8B%E7%90%83-103474391161721/
@@ -91,7 +67,7 @@ export default {
91
67
  search: {
92
68
  type: "url",
93
69
  prependIcon: "search",
94
- onRightIconClick: function() {},
70
+ onRightIconClick: function () { },
95
71
  rules: [
96
72
  v => !v || /^\w+:\/\/[.-\w]+$/.test(v) || "Must be a valid URL"
97
73
  ]
@@ -104,12 +80,23 @@ export default {
104
80
  const icon = this.spec.leftIcon || {};
105
81
  const materialIcon = icon.material || {};
106
82
  return materialIcon.name;
83
+ },
84
+ rightIconName() {
85
+ const icon = this.spec.rightIcon || {};
86
+ const materialIcon = icon.material || {};
87
+ return materialIcon.name;
107
88
  }
108
89
  },
109
90
  methods: {
110
91
  $ready() {
111
92
  this.variant = this.fields[this.type] || {};
112
93
  this.rules = this.$validation(this.variant.rules);
94
+
95
+ if (this.variant.onRightIconClick) {
96
+ this.onRightIconClick = () => {
97
+ this.variant.onRightIconClick(this);
98
+ };
99
+ }
113
100
  },
114
101
  togglePasswordVisibility() {
115
102
  const passwordField = this.fields["password"];
@@ -121,13 +108,10 @@ export default {
121
108
  passwordField.appendIcon = "visibility";
122
109
  }
123
110
  },
124
- onRightIconClick() {
125
- this.variant.onRightIconClick(this);
126
- },
127
111
  classes() {
128
112
  return this.$classes().concat("g-text-field--hintless");
129
113
  },
130
- onChange: eventFiltering.debounce(function() {
114
+ onChange: eventFiltering.debounce(function () {
131
115
  this.executeActionWithParams();
132
116
  }, 300),
133
117
  executeActionWithParams() {
@@ -1,43 +1,28 @@
1
1
  <template>
2
2
  <div :style="styles()" :class="classes()">
3
- <v-textarea
4
- v-model="fieldModel"
5
- :label="spec.label"
6
- :name="fieldName"
7
- :value="spec.value"
8
- :hint="spec.hint"
9
- :placeholder="spec.placeholder"
10
- :maxlength="spec.maxLength || 255"
11
- :disabled="spec.readOnly"
12
- :height="height"
13
- :rules="$validation()"
14
- counter
15
- :outlined="$classes().includes('outlined')"
16
- :no-resize="$classes().includes('no-resize')"
17
- validate-on-blur
18
- @keyup="$onTyping"
19
- ></v-textarea>
20
- <input
21
- v-if="spec.readOnly"
22
- type="hidden"
23
- :name="fieldName"
24
- :value="spec.value"
25
- />
3
+ <v-textarea v-model="fieldModel" :label="spec.label" :name="fieldName" :hint="spec.hint"
4
+ :placeholder="spec.placeholder" :maxlength="spec.maxLength || 255" :disabled="spec.readOnly" :height="height"
5
+ :rules="$validation()" counter :outlined="$classes().includes('outlined') || null"
6
+ :no-resize="$classes().includes('no-resize')" validate-on-blur @keyup="$onTyping"></v-textarea>
7
+ <input v-if="spec.readOnly" type="hidden" :name="fieldName" :value="spec.value" />
26
8
  </div>
27
9
  </template>
28
10
 
29
11
  <script>
30
12
  export default {
31
13
  props: {
32
- spec: { type: Object, required: true }
14
+ spec: { type: Object, required: true },
33
15
  },
34
16
  data() {
35
17
  return {
36
18
  // styles: null,
37
- height: null
19
+ height: null,
38
20
  };
39
21
  },
40
22
  methods: {
23
+ $ready() {
24
+ this.fieldModel = this.spec.value;
25
+ },
41
26
  styles() {
42
27
  const styles = this.$styles();
43
28
  this.height = styles.remove("height");
@@ -45,8 +30,8 @@ export default {
45
30
  },
46
31
  classes() {
47
32
  return this.$classes().concat("g-text-field--hintless");
48
- }
49
- }
33
+ },
34
+ },
50
35
  };
51
36
  </script>
52
37
 
@@ -54,6 +39,7 @@ export default {
54
39
  .v-text-field__details {
55
40
  margin-top: 2px;
56
41
  }
42
+
57
43
  .text-bold {
58
44
  font-weight: bold;
59
45
  }
@@ -1,22 +1,25 @@
1
1
  <template>
2
- <fields-genericSelect :spec="spec" :default-value="defaultValue" />
2
+ <fields-genericSelect
3
+ :spec="spec"
4
+ :default-value="defaultValue"
5
+ />
3
6
  </template>
4
7
 
5
8
  <script>
6
- import SelectField from "./_select";
9
+ import SelectField from "./_select.vue";
7
10
 
8
11
  export default {
9
12
  components: {
10
13
  // Need to start with `fields-` to enable jsonlogic in `styles.js#_linkFieldModels`
11
- "fields-genericSelect": SelectField
14
+ "fields-genericSelect": SelectField,
12
15
  },
13
16
  props: {
14
- spec: { type: Object, required: true }
17
+ spec: { type: Object, required: true },
15
18
  },
16
19
  computed: {
17
20
  defaultValue() {
18
21
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
19
- }
20
- }
22
+ },
23
+ },
21
24
  };
22
25
  </script>
@@ -22,16 +22,9 @@
22
22
  </v-row>
23
23
  </div>
24
24
  </div>
25
- <v-text-field
26
- v-else
27
- v-model="fieldModel"
28
- :label="spec.label"
29
- :name="fieldName"
30
- :disabled="true"
31
- :outlined="$classes().includes('outlined')"
32
- :rounded="$classes().includes('rounded')"
33
- :dense="$classes().includes('dense')"
34
- />
25
+ <v-text-field v-else v-model="fieldModel" :label="spec.label" :name="fieldName" :disabled="true"
26
+ :outlined="$classes().includes('outlined') || null" :rounded="$classes().includes('rounded')"
27
+ :dense="$classes().includes('dense') || null" />
35
28
  <input type="hidden" :name="fieldName" :value="fieldModel" />
36
29
  </div>
37
30
  </template>
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
@@ -1,23 +1,18 @@
1
1
  <template>
2
- <common-tooltip :spec="spec">
3
- <template v-slot:activator="{ on }">
4
- <common-badge :spec="spec">
5
- <!-- TODO: Add support for href and :rel="$rel()" -->
6
- <v-img
7
- :src="spec.url || spec.base64Data"
8
- :style="styles"
9
- @click="$onClick()"
10
- v-on="on"
11
- >
12
- <!-- <v-progress-circular v-if="$isBusy" indeterminate /> -->
13
- </v-img>
14
- </common-badge>
15
- </template>
16
- </common-tooltip>
2
+ <!-- <common-tooltip :spec="spec"> -->
3
+ <!-- <template v-slot:activator="{ on }"> -->
4
+ <!-- <common-badge :spec="spec"> -->
5
+ <!-- TODO: Add support for href and :rel="$rel()" -->
6
+ <v-img :src="spec.url || spec.base64Data" :width="spec.width" :max-height="spec.height" :style="styles"
7
+ :aspect-ratio="spec.aspectRatio" @click="$onClick()" cover>
8
+ <!-- <v-progress-circular v-if="$isBusy" indeterminate /> -->
9
+ </v-img>
10
+ <!-- </common-badge> -->
11
+ <!-- </template> -->
12
+ <!-- </common-tooltip> -->
17
13
  </template>
18
14
 
19
15
  <script>
20
- import Vue from "vue";
21
16
  // import TooltipMixins from "./mixins/tooltip";
22
17
 
23
18
  export default {
@@ -71,8 +66,7 @@ export default {
71
66
  }
72
67
  }
73
68
 
74
- Vue.set(this.styles, "width", width);
75
- Vue.set(this.styles, "height", height);
69
+ Object.assign(this.styles, { width, height });
76
70
  },
77
71
  fitCrop(image) {
78
72
  let width, height;
@@ -85,8 +79,7 @@ export default {
85
79
  height = `${this.spec.height}px`;
86
80
  }
87
81
 
88
- Vue.set(this.styles, "width", width);
89
- Vue.set(this.styles, "height", height);
82
+ Object.assign(this.styles, { width, height });
90
83
  }
91
84
  }
92
85
  };
File without changes
@@ -2,12 +2,9 @@
2
2
  <div :style="genericStyles()" :class="$classes()">
3
3
  <!-- eslint-disable-next-line vue/no-v-html -->
4
4
  <span v-html="compiledText"></span>
5
- <div
6
- v-if="youtubeId"
7
- :style="`width: 320px; overflow: hidden; max-height: 180px;`"
8
- >
5
+ <!-- <div v-if="youtubeId" :style="`width: 320px; overflow: hidden; max-height: 180px;`">
9
6
  <youtube :video-id="youtubeId" fit-parent></youtube>
10
- </div>
7
+ </div> -->
11
8
  </div>
12
9
  </template>
13
10
 
@@ -23,7 +20,7 @@ export default {
23
20
  },
24
21
  computed: {
25
22
  compiledText() {
26
- return Utils.format.markdown(this.spec.text);
23
+ return Utils.format.markdown(this.spec.text || '');
27
24
  }
28
25
  },
29
26
  methods: {
@@ -58,45 +55,55 @@ export default {
58
55
 
59
56
  <style lang="scss">
60
57
  .views-markdown {
61
- & > span > :last-child {
58
+ &>span> :last-child {
62
59
  margin-bottom: 0;
63
60
  }
61
+
64
62
  pre {
65
63
  background-color: #f0f0f0;
66
64
  padding: 8px 10px;
67
65
 
68
- & > code {
66
+ &>code {
69
67
  background-color: transparent;
70
68
  padding: 0;
71
69
  }
72
70
  }
73
71
  }
72
+
74
73
  .line-clamp {
75
74
  display: -webkit-box;
76
75
  -webkit-box-orient: vertical;
77
76
  overflow: hidden;
78
77
  }
78
+
79
79
  .line-clamp-1 {
80
80
  -webkit-line-clamp: 1;
81
81
  }
82
+
82
83
  .line-clamp-2 {
83
84
  -webkit-line-clamp: 2;
84
85
  }
86
+
85
87
  .line-clamp-3 {
86
88
  -webkit-line-clamp: 3;
87
89
  }
90
+
88
91
  .line-clamp-4 {
89
92
  -webkit-line-clamp: 4;
90
93
  }
94
+
91
95
  .line-clamp-5 {
92
96
  -webkit-line-clamp: 5;
93
97
  }
98
+
94
99
  .line-clamp-6 {
95
100
  -webkit-line-clamp: 6;
96
101
  }
102
+
97
103
  .line-clamp-7 {
98
104
  -webkit-line-clamp: 7;
99
105
  }
106
+
100
107
  .line-clamp-8 {
101
108
  -webkit-line-clamp: 8;
102
109
  }
File without changes