classcard-ui 0.2.429 → 0.2.432

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": "classcard-ui",
3
- "version": "0.2.429",
3
+ "version": "0.2.432",
4
4
  "main": "dist/classcard-ui.common.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -51,8 +51,6 @@
51
51
  </a>
52
52
  </nav>
53
53
  </div>
54
- <!-- <div id="mobile-app" style="height: 20rem; background-color: red"></div>
55
- <div id="preferences" style="height: 40rem; background-color: blue"></div> -->
56
54
  <slot></slot>
57
55
  </div>
58
56
  </div>
@@ -76,25 +74,10 @@ export default {
76
74
  },
77
75
  data() {
78
76
  return {
79
- // tabs: [
80
- // { name: "mobile-app", text: "Mobile app" },
81
- // { name: "preferences", text: "Preferences" },
82
- // ],
83
77
  activeTab: this.initialTab,
84
78
  };
85
79
  },
86
80
  methods: {
87
- scrollIfNeeded(element, container) {
88
- if (element.offsetTop < container.scrollTop) {
89
- container.scrollTop = element.offsetTop;
90
- } else {
91
- const offsetBottom = element.offsetTop + element.offsetHeight;
92
- const scrollBottom = container.scrollTop + container.offsetHeight;
93
- if (offsetBottom > scrollBottom) {
94
- container.scrollTop = offsetBottom - container.offsetHeight;
95
- }
96
- }
97
- },
98
81
  switchTab(name) {
99
82
  this.activeTab = name;
100
83
  // document.getElementById(`${name}`).scrollIntoView({
@@ -103,10 +86,9 @@ export default {
103
86
  // inline: "start",
104
87
  // });
105
88
 
106
- this.scrollIfNeeded(
107
- document.getElementById(`${name}`),
108
- document.getElementById("container")
109
- );
89
+ let myElement = document.getElementById(name);
90
+ let topPos = myElement.offsetTop;
91
+ document.getElementById("container").scrollTop = topPos;
110
92
  },
111
93
  switchTabForMobile(index) {
112
94
  var selectedOption = this.tabs[index];
@@ -96,7 +96,7 @@
96
96
  :styleClass="
97
97
  showLoader ? 'vgt-table opacity-50 pointer-events-none' : 'vgt-table'
98
98
  "
99
- row-style-class="focus:outline-none"
99
+ :row-style-class="styles"
100
100
  min-height="400px"
101
101
  :globalSearch="true"
102
102
  :isLoading="showLoader"
@@ -322,6 +322,10 @@ export default {
322
322
  downloadLoader: {
323
323
  type: Boolean,
324
324
  },
325
+ //highlight the rows
326
+ isRead: {
327
+ type: Number,
328
+ },
325
329
  },
326
330
  mounted() {
327
331
  // to add drag and drop in table
@@ -346,6 +350,14 @@ export default {
346
350
  reorderedArray: [...this.rows],
347
351
  };
348
352
  },
353
+ computed: {
354
+ styles() {
355
+ if (this.isRead === 1) {
356
+ return "focus:outline-none";
357
+ }
358
+ return "focus:outline-none bg-gray-100";
359
+ },
360
+ },
349
361
  methods: {
350
362
  handleToggle() {
351
363
  this.toggleDropdown = !this.toggleDropdown;