@awes-io/ui 2.59.0 → 2.59.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.59.2](https://github.com/awes-io/client/compare/@awes-io/ui@2.59.1...@awes-io/ui@2.59.2) (2022-11-14)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **aw-select-object:** mobile overflow fixed ([2a76f28](https://github.com/awes-io/client/commit/2a76f2870368fd10675aadba30104e9fae84ecd7))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.59.1](https://github.com/awes-io/client/compare/@awes-io/ui@2.59.0...@awes-io/ui@2.59.1) (2022-10-20)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **aw-table-builder:** skip onfetch hook if table unmounted ([284fafd](https://github.com/awes-io/client/commit/284fafdad291c2a976871859f4964c520e23ed89))
23
+
24
+
25
+
26
+
27
+
6
28
  # [2.59.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.58.0...@awes-io/ui@2.59.0) (2022-09-08)
7
29
 
8
30
 
@@ -62,6 +62,15 @@
62
62
  }
63
63
  }
64
64
 
65
+ &__fake-input {
66
+ --icon-width: 2.5rem;
67
+ --icon-count: 0;
68
+ display: block;
69
+ height: calc(1em * theme('lineHeight.normal', 1.5));
70
+ min-width: 0;
71
+ max-width: calc(100% - calc(var(--icon-count) * var(--icon-width)));
72
+ }
73
+
65
74
  /**
66
75
  * Textarea styles
67
76
  */
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  ref="element"
4
- class="flex aw-text-field is-text"
4
+ class="flex max-w-full aw-text-field is-text"
5
5
  :class="{
6
6
  'is-filled': value === 0 || !!value,
7
7
  'has-label': !!label,
@@ -29,11 +29,12 @@
29
29
  tabindex="0"
30
30
  :class="paddingClass"
31
31
  >
32
- <span v-if="inputValue" class="block h-6">
33
- {{ inputValue }}
34
- </span>
35
- <span v-else class="block h-6 opacity-50">
36
- {{ placeholder }}
32
+ <span
33
+ class="aw-text-field__fake-input truncate"
34
+ :class="{ 'opacity-50': !inputValue }"
35
+ :style="{ '--icon-count': iconCount }"
36
+ >
37
+ {{ inputValue || placeholder }}
37
38
  </span>
38
39
  </span>
39
40
  <span
@@ -126,6 +127,10 @@ export default {
126
127
  computed: {
127
128
  paddingClass() {
128
129
  return this.size === 'md' ? 'p-3' : 'p-2'
130
+ },
131
+
132
+ iconCount() {
133
+ return 0 + this.clearable + this.caret
129
134
  }
130
135
  }
131
136
  }
@@ -278,6 +278,7 @@ export default {
278
278
  return {
279
279
  defaultCol: null,
280
280
  isResetPage: true,
281
+ isAborted: false,
281
282
  pagination: {
282
283
  total: null,
283
284
  limit: DEFAULT_LIMITS[0]
@@ -408,6 +409,7 @@ export default {
408
409
  if (oldVal && this.scrollOnPage) {
409
410
  this._scrollTop()
410
411
  }
412
+
411
413
  this.fetch()
412
414
  }
413
415
  },
@@ -416,6 +418,7 @@ export default {
416
418
  if (this.scrollOnPage) {
417
419
  this._scrollTop()
418
420
  }
421
+
419
422
  this.fetch()
420
423
  }
421
424
  },
@@ -438,7 +441,10 @@ export default {
438
441
  })
439
442
 
440
443
  this.collection.onFetchSuccess = (response) => {
444
+ if (this.isAborted) return
445
+
441
446
  this._setPagination(response)
447
+
442
448
  if (isType('Function', _oldOnFetchFuccess)) {
443
449
  _oldOnFetchFuccess(response)
444
450
  }
@@ -447,9 +453,12 @@ export default {
447
453
  this.collection.isPaginated = () => this.infiniteScroll
448
454
 
449
455
  this.$once('hook:beforeDestroy', () => {
456
+ this.isAborted = true
457
+
450
458
  this.collection.getFetchQuery = _oldGetFetchQuery
451
459
  this.collection.onFetchSuccess = _oldOnFetchFuccess
452
460
  this.collection.isPaginated = _oldIsPaginated
461
+
453
462
  _oldGetFetchQuery = null
454
463
  _oldOnFetchFuccess = null
455
464
  _oldIsPaginated = null
@@ -470,6 +479,7 @@ export default {
470
479
 
471
480
  fetchMore() {
472
481
  const page = this.collection.models.length / this.limit
482
+
473
483
  this.collection
474
484
  .page(1)
475
485
  .fetch({
@@ -487,7 +497,9 @@ export default {
487
497
 
488
498
  onTheadClick(col) {
489
499
  const orderable = col.orderable
500
+
490
501
  this.$emit(TABLE_HEAD_CLICK_EVENT, col)
502
+
491
503
  if (orderable) {
492
504
  const isAskValPresent =
493
505
  this.$route.query[orderable.param] === orderable.ascValue
@@ -535,6 +547,7 @@ export default {
535
547
  _isColDefault(col) {
536
548
  const isParamPresent =
537
549
  Object.keys(this.$route.query).indexOf(col.orderable.param) > -1
550
+
538
551
  return !isParamPresent && col.orderable.default
539
552
  },
540
553
 
@@ -594,6 +607,7 @@ export default {
594
607
  if (!this.$slots.default) {
595
608
  return null
596
609
  }
610
+
597
611
  const filtered = this.$slots.default.filter((el) =>
598
612
  pathOr(
599
613
  false,
@@ -601,6 +615,7 @@ export default {
601
615
  el
602
616
  )
603
617
  )
618
+
604
619
  return filtered.length ? filtered[0] : null
605
620
  }
606
621
  }
@@ -101,8 +101,10 @@ export default async ({ app, $axios }) => {
101
101
  let _browserLang = toLocale(navigator.language)
102
102
 
103
103
  if (!localeCodes.includes(_browserLang)) {
104
- _browserLang = navigator.languages.find(locale =>
105
- localeCodes.includes(toLocale(locale))
104
+ _browserLang = toLocale(
105
+ navigator.languages.find(locale =>
106
+ localeCodes.includes(toLocale(locale))
107
+ )
106
108
  )
107
109
  }
108
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awes-io/ui",
3
- "version": "2.59.0",
3
+ "version": "2.59.2",
4
4
  "description": "User Interface (UI) components",
5
5
  "keywords": [
6
6
  "ui",
@@ -122,5 +122,5 @@
122
122
  "vue-template-compiler": "^2.6.10",
123
123
  "webfonts-generator": "^0.4.0"
124
124
  },
125
- "gitHead": "3f9da3ad6aaf3aee398718c495468565018c2ecd"
125
+ "gitHead": "84992959b312b8b6a76f69c5294b2381bd36e6c6"
126
126
  }