@monoui/vuejs 1.1.69 → 1.1.71

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.71",
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,9 @@ export default {
534
551
  limit: 250,
535
552
  searchDebounceTimeout: null,
536
553
  comingFromPopState: false,
537
- skipWatch: false
554
+ skipWatch: false,
555
+ selectedCorrelationId: null,
556
+ emptyGuid: "00000000-0000-0000-0000-000000000000"
538
557
  };
539
558
  },
540
559
  computed: {
@@ -571,6 +590,43 @@ export default {
571
590
  }
572
591
  },
573
592
  methods: {
593
+ getCorrelationClass(row, tableData) {
594
+ var correlationCount = 0;
595
+ tableData.forEach(element => {
596
+ if (
597
+ element[this.correlationPropertyName] ===
598
+ row[this.correlationPropertyName]
599
+ ) {
600
+ correlationCount++;
601
+ }
602
+ });
603
+
604
+ if (
605
+ correlationCount > 1 &&
606
+ row &&
607
+ row[this.correlationPropertyName] &&
608
+ row[this.correlationPropertyName] === this.selectedCorrelationId
609
+ ) {
610
+ return this.correlationClass;
611
+ }
612
+
613
+ return "";
614
+ },
615
+
616
+ mouseEnter(row) {
617
+ if (
618
+ row &&
619
+ row[this.correlationPropertyName] &&
620
+ row[this.correlationPropertyName] !== this.emptyGuid
621
+ )
622
+ this.selectedCorrelationId = row[this.correlationPropertyName];
623
+ else this.selectedCorrelationId = null;
624
+ },
625
+
626
+ mouseLeave() {
627
+ this.selectedCorrelationId = null;
628
+ },
629
+
574
630
  addPopStateListener() {
575
631
  if (this.history)
576
632
  window.addEventListener("popstate", this.popStateEvent);
@@ -1199,4 +1255,8 @@ export default {
1199
1255
  .has-sorted-td {
1200
1256
  background-color: #f9fafb;
1201
1257
  }
1258
+
1259
+ .correlation-highlight {
1260
+ box-shadow: #1e3a8a 19px 0px 14px -15px inset;
1261
+ }
1202
1262
  </style>