@avakhula/ui 0.0.262 → 0.0.263

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": "@avakhula/ui",
3
- "version": "0.0.262",
3
+ "version": "0.0.263",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.umd.cjs",
6
6
  "source": "src/index.js",
package/src/App.vue CHANGED
@@ -1,23 +1,36 @@
1
1
  <template>
2
- <div class="test">
3
- <limit-selector />
2
+ <div class="page">
3
+
4
+ <sorting view="table-sorting" toggle-tip-title="hello" :table-name="'table'" :title="'test'">
5
+
6
+ <!-- <template #toggleTipBody>
7
+ <p>
8
+ test
9
+ </p>
10
+ </template>
11
+
12
+ <template #toggleTipButtons>
13
+ <p>
14
+ test
15
+ </p>
16
+ </template> -->
17
+
18
+
19
+ </sorting>
4
20
  </div>
5
21
  </template>
6
22
 
7
23
  <script>
8
- import LimitSelector from "./components/Pagination/LimitSelector.vue"
24
+ import Sorting from './components/Sorting/Sorting.vue';
9
25
  export default {
10
26
  components: {
11
- LimitSelector
12
- }
27
+ Sorting
28
+ }
13
29
  }
14
30
  </script>
15
31
 
16
-
17
32
  <style lang="scss">
18
- .test {
19
- height: 100vh;
20
- display: flex;
21
- align-items: end;
33
+ .page {
34
+ padding: 200px;
22
35
  }
23
- </style>
36
+ </style>
@@ -11,7 +11,7 @@
11
11
  <div>
12
12
  <button
13
13
  class="sorting-label"
14
- v-tooltip:[tooltipPosition]="tooltipContent"
14
+ v-tooltip:[sortingTooltipPosition]="sortingTooltipContent"
15
15
  :class="{
16
16
  'sorting-label-active': isOpenToggleTip && hasToggleTip,
17
17
  'has-action': tooltipText?.length || hasToggleTip
@@ -158,6 +158,20 @@ export default {
158
158
  }
159
159
  return null;
160
160
  },
161
+ sortingTooltipPosition() {
162
+ if (this.hasToggleTip) {
163
+ return 'bottomCenter'
164
+ }
165
+
166
+ return this.tooltipPosition;
167
+ },
168
+ sortingTooltipContent() {
169
+ if (this.hasToggleTip) {
170
+ return lang('click_to_more_details', this.langComponents?.COMPONENT_SYSTEM);
171
+ }
172
+
173
+ return this.tooltipContent;
174
+ },
161
175
  tooltipIconText() {
162
176
  if (this.currentTypeSort === this.sortingTypes.TYPE_ASC) {
163
177
  return lang("sort_descending", this.langComponents?.COMPONENT_SELECT);
@@ -915,24 +915,15 @@ export default {
915
915
  this.vertical = "bottom";
916
916
  },
917
917
  onOpen() {
918
-
919
- const screenHeight = document.body.offsetHeight;
920
- const screenScrollHeight = document.documentElement.scrollHeight;
918
+ const screenHeight = document.documentElement.scrollHeight;
921
919
  this.isOpen = true;
922
920
 
923
- setTimeout(() => {
924
- const newScreenScrollHeight = document.documentElement.scrollHeight
925
- const newScreenHeight = document.body.offsetHeight;
926
-
927
- console.log(screenScrollHeight, "screenScrollHeight")
928
- console.log(screenHeight, "screenHeight")
929
- console.log(newScreenScrollHeight, "newScreenScrollHeight")
930
- console.log(newScreenHeight, "newScreenHeight")
931
- if(newScreenHeight > screenHeight || newScreenScrollHeight > screenScrollHeight) {
932
- console.log('test')
921
+ this.$nextTick(() => {
922
+ const newScreenHeight = document.documentElement.scrollHeight
923
+ if(newScreenHeight > screenHeight) {
933
924
  this.vertical = "top";
934
925
  }
935
- }, 1000)
926
+ })
936
927
  }
937
928
  },
938
929
  computed: {