@monoui/vuejs 1.1.69 → 1.1.70

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": "@monoui/vuejs",
3
- "version": "1.1.69",
3
+ "version": "1.1.70",
4
4
  "description": "This project will contain MonoFor UI Framework",
5
5
  "main": "./dist/main.js",
6
6
  "repository": "git@gitlab.com:monoui/vuejs.git",
@@ -126,7 +126,14 @@
126
126
  v-bind="{ row: row, index: rowIndex }"
127
127
  v-for="(row, rowIndex) in tableData"
128
128
  >
129
- <tr :key="rowIndex">
129
+ <tr
130
+ @mouseenter="mouseEnter(row)"
131
+ @mouseleave="mouseLeave"
132
+ :class="
133
+ `${getCorrelationClass(row, tableData)}`
134
+ "
135
+ :key="rowIndex"
136
+ >
130
137
  <slot
131
138
  name="row"
132
139
  v-bind="{ row: row, index: rowIndex }"
@@ -409,6 +416,16 @@ export default {
409
416
  required: false,
410
417
  default: ""
411
418
  },
419
+ correlationClass: {
420
+ type: String,
421
+ required: false,
422
+ default: "correlation-highlight"
423
+ },
424
+ correlationPropertyName: {
425
+ type: String,
426
+ required: false,
427
+ default: "correlationId"
428
+ },
412
429
  tableStyle: {
413
430
  type: String,
414
431
  required: false,
@@ -534,7 +551,8 @@ export default {
534
551
  limit: 250,
535
552
  searchDebounceTimeout: null,
536
553
  comingFromPopState: false,
537
- skipWatch: false
554
+ skipWatch: false,
555
+ selectedCorrelationId: null
538
556
  };
539
557
  },
540
558
  computed: {
@@ -571,6 +589,38 @@ export default {
571
589
  }
572
590
  },
573
591
  methods: {
592
+ getCorrelationClass(row, tableData) {
593
+ var correlationCount = 0;
594
+ tableData.forEach(element => {
595
+ if (
596
+ element[this.correlationPropertyName] ===
597
+ row[this.correlationPropertyName]
598
+ ) {
599
+ correlationCount++;
600
+ }
601
+ });
602
+
603
+ if (
604
+ correlationCount > 1 &&
605
+ row &&
606
+ row[this.correlationPropertyName] &&
607
+ row[this.correlationPropertyName] === this.selectedCorrelationId
608
+ ) {
609
+ return this.correlationClass;
610
+ }
611
+
612
+ return "";
613
+ },
614
+
615
+ mouseEnter(row) {
616
+ if (row && row[this.correlationPropertyName])
617
+ this.selectedCorrelationId = row[this.correlationPropertyName];
618
+ },
619
+
620
+ mouseLeave() {
621
+ this.selectedCorrelationId = null;
622
+ },
623
+
574
624
  addPopStateListener() {
575
625
  if (this.history)
576
626
  window.addEventListener("popstate", this.popStateEvent);
@@ -1199,4 +1249,8 @@ export default {
1199
1249
  .has-sorted-td {
1200
1250
  background-color: #f9fafb;
1201
1251
  }
1252
+
1253
+ .correlation-highlight {
1254
+ box-shadow: #1e3a8a 19px 0px 14px -15px inset;
1255
+ }
1202
1256
  </style>