@monoui/vuejs 1.1.68 → 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.68",
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 }"
@@ -306,6 +313,7 @@
306
313
  :to="{
307
314
  name: 'Exports'
308
315
  }"
316
+ target="_blank"
309
317
  >
310
318
  <mui-icon icon="link" class="mr-1" />
311
319
  Go Downloads
@@ -408,6 +416,16 @@ export default {
408
416
  required: false,
409
417
  default: ""
410
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
+ },
411
429
  tableStyle: {
412
430
  type: String,
413
431
  required: false,
@@ -533,7 +551,8 @@ export default {
533
551
  limit: 250,
534
552
  searchDebounceTimeout: null,
535
553
  comingFromPopState: false,
536
- skipWatch: false
554
+ skipWatch: false,
555
+ selectedCorrelationId: null
537
556
  };
538
557
  },
539
558
  computed: {
@@ -570,6 +589,38 @@ export default {
570
589
  }
571
590
  },
572
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
+
573
624
  addPopStateListener() {
574
625
  if (this.history)
575
626
  window.addEventListener("popstate", this.popStateEvent);
@@ -1198,4 +1249,8 @@ export default {
1198
1249
  .has-sorted-td {
1199
1250
  background-color: #f9fafb;
1200
1251
  }
1252
+
1253
+ .correlation-highlight {
1254
+ box-shadow: #1e3a8a 19px 0px 14px -15px inset;
1255
+ }
1201
1256
  </style>