goodteditor-ui 1.0.36 → 1.0.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goodteditor-ui",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "main": "index.js",
5
5
  "homepage": "https://goodt-ui.netlify.app/",
6
6
  "scripts": {
@@ -192,10 +192,6 @@ export default {
192
192
  data() {
193
193
  return {
194
194
  date: null,
195
- inputBinds: {
196
- placeholder: this.placeholder,
197
- readonly: this.readonly || !this.editable,
198
- },
199
195
  inputEvents: {
200
196
  input: this.onInputInput,
201
197
  change: this.onInputChange,
@@ -206,6 +202,21 @@ export default {
206
202
  inputValueRaw: '',
207
203
  };
208
204
  },
205
+ computed: {
206
+ isRange() {
207
+ return !!this.datepicker.range;
208
+ },
209
+ valueLabel() {
210
+ return Array.isArray(this.value) ? this.value.join(this.delimiter) : this.value;
211
+ },
212
+ inputBinds() {
213
+ const { placeholder, readonly, editable } = this;
214
+ return {
215
+ placeholder,
216
+ readonly: readonly || !editable
217
+ }
218
+ }
219
+ },
209
220
  watch: {
210
221
  value: {
211
222
  handler(val) {
@@ -232,18 +243,7 @@ export default {
232
243
  * @property {String} date
233
244
  */
234
245
  this.$emit('input', val ? [] : '');
235
- },
236
- placeholder(placeholder) {
237
- this.inputBinds = { ...this.inputBinds, placeholder };
238
- },
239
- },
240
- computed: {
241
- isRange() {
242
- return !!this.datepicker.range;
243
- },
244
- valueLabel() {
245
- return Array.isArray(this.value) ? this.value.join(this.delimiter) : this.value;
246
- },
246
+ }
247
247
  },
248
248
  methods: {
249
249
  clear() {
@@ -8,7 +8,7 @@
8
8
  >
9
9
  <div class="ui-input-time-picker-wrapper d-flex flex-v-center w-100">
10
10
  <div style="flex: 1 0 0">
11
- <!--
11
+ <!--
12
12
  @slot Custom input slot
13
13
  @binding {String} id input id attribute value
14
14
  @binding {String} value input value
@@ -26,7 +26,7 @@
26
26
  />
27
27
  </slot>
28
28
  </div>
29
- <!--
29
+ <!--
30
30
  @slot Custom clear icon slot
31
31
  @binding {Function} clear function that clears the value
32
32
  -->
@@ -35,7 +35,7 @@
35
35
  <i class="mdi mdi-close"></i>
36
36
  </div>
37
37
  </slot>
38
- <!--
38
+ <!--
39
39
  @slot Icon slot
40
40
  @binding {Function} toggle function that toggles the datepicker
41
41
  -->
@@ -171,10 +171,6 @@ export default {
171
171
  data() {
172
172
  return {
173
173
  time: null,
174
- inputBinds: {
175
- placeholder: this.placeholder,
176
- readonly: this.readonly || !this.editable,
177
- },
178
174
  inputEvents: {
179
175
  change: this.onInputChange,
180
176
  input: this.onInputInput,
@@ -183,6 +179,15 @@ export default {
183
179
  },
184
180
  };
185
181
  },
182
+ computed: {
183
+ inputBinds() {
184
+ const { placeholder, readonly, editable } = this;
185
+ return {
186
+ placeholder,
187
+ readonly: readonly || !editable
188
+ }
189
+ }
190
+ },
186
191
  watch: {
187
192
  value: {
188
193
  handler(val) {
@@ -100,7 +100,7 @@
100
100
  class="w-100 pull-left"
101
101
  @click.native.stop
102
102
  @select-option="onDatalistSelectOption"
103
- v-bind="{ size, options }"
103
+ v-bind="{ size, options, class: datalistCssClass }"
104
104
  :cursorIndex.sync="dataListCursorIndex"
105
105
  ref="datalist"
106
106
  >
@@ -155,18 +155,18 @@
155
155
  <div class="col col-vmid text-truncate">
156
156
  <div
157
157
  class="text-truncate"
158
- style="min-height: calc(var(--line-height)*1em)"
158
+ style="min-height: calc(var(--line-height) * 1em)"
159
159
  >
160
160
  {{ getOptionLabel(option) }}
161
161
  </div>
162
162
  </div>
163
163
  <div class="col col-auto col-vmid" v-if="isOptionSelected(option)">
164
- <i class="mdi mdi-check" style="line-height:1"></i>
164
+ <i class="mdi mdi-check" style="line-height: 1"></i>
165
165
  </div>
166
166
  </div>
167
167
  <div
168
168
  class="text-truncate"
169
- style="min-height: calc(var(--line-height)*1rem)"
169
+ style="min-height: calc(var(--line-height) * 1rem)"
170
170
  v-else
171
171
  >
172
172
  {{ getOptionLabel(option) }}
@@ -238,6 +238,13 @@ export default {
238
238
  return [];
239
239
  },
240
240
  },
241
+ /**
242
+ * Datalist css classes (optional)
243
+ */
244
+ datalistCssClass: {
245
+ type: [String, Array],
246
+ default: '',
247
+ },
241
248
  /**
242
249
  * Allow multiple selection
243
250
  */