diff --git a/src/lib/scss/data-table.scss b/src/lib/scss/data-table.scss
index 9741d08a..36aca014 100644
--- a/src/lib/scss/data-table.scss
+++ b/src/lib/scss/data-table.scss
@@ -101,9 +101,20 @@
sz-cross-source-statistics {
.report-header {
button {
+ width: 24px !important;
+ height: 24px !important;
+ padding: 0px !important;
+
cursor: pointer;
--mat-icon-button-state-layer-color: transparent;
--mat-mdc-button-persistent-ripple-color: transparent;
+ --mdc-icon-button-state-layer-size: 24px;
+ .mat-mdc-button-touch-target,
+ .mdc-icon-button__ripple,
+ .mat-mdc-focus-indicator,
+ .mat-mdc-button-ripple {
+ display: none !important;
+ }
}
mat-slide-toggle {
.mdc-switch__ripple {
diff --git a/src/lib/statistics/cross-source/sz-cross-source-results.data-table.html b/src/lib/statistics/cross-source/sz-cross-source-results.data-table.html
index 6d52e34b..a8cb9182 100644
--- a/src/lib/statistics/cross-source/sz-cross-source-results.data-table.html
+++ b/src/lib/statistics/cross-source/sz-cross-source-results.data-table.html
@@ -119,7 +119,7 @@
|
|
diff --git a/src/lib/statistics/cross-source/sz-cross-source-results.data-table.scss b/src/lib/statistics/cross-source/sz-cross-source-results.data-table.scss
index 64634af2..50561429 100644
--- a/src/lib/statistics/cross-source/sz-cross-source-results.data-table.scss
+++ b/src/lib/statistics/cross-source/sz-cross-source-results.data-table.scss
@@ -1,4 +1,5 @@
:host {
+
* {
box-sizing: border-box;
}
@@ -32,6 +33,7 @@
display: grid;
border-collapse: collapse;
min-width: 100%;
+ column-gap: 2px;
/*grid-template-columns: minmax(100px, auto);*/
@@ -71,6 +73,9 @@
&.hidden {
display: none;
}
+ &.no-cell {
+ display: none;
+ }
}
th {
@@ -199,15 +204,29 @@
.sz-dt-address-data-cell .cell-content {
}
+ .row-entity {
+ td {
+ border-top: 1px solid #636363;
+ border-bottom: 1px dotted #636363;
+ background-color: #ececec;
+ }
+ }
+ .row-record:nth-child(even) td {
+ background-color: #f2f2f2;
+ }
}
/* column picker */
.column-picker-button {
+ position: relative;
.right {
right: 0px;
+ position: relative;
}
button {
- float: right;
+ position: absolute;
+ right: 0px;
+ top: -33px;
padding: 0 5px 0 5px;
min-width: 36px;
/* line-height: 40px; */
diff --git a/src/lib/statistics/cross-source/sz-cross-source-results.data-table.ts b/src/lib/statistics/cross-source/sz-cross-source-results.data-table.ts
index be8d8baa..42a71620 100644
--- a/src/lib/statistics/cross-source/sz-cross-source-results.data-table.ts
+++ b/src/lib/statistics/cross-source/sz-cross-source-results.data-table.ts
@@ -17,31 +17,7 @@ import { SzEntityData, SzMatchedRecord } from '@senzing/rest-api-client-ng';
styleUrls: ['./sz-cross-source-results.data-table.scss']
})
export class SzCrossSourceResultsDataTable extends SzDataTable implements OnInit, OnDestroy {
- private _defaultColumns = [
- 'Entity ID',
- 'More',
- 'Match Key',
- 'Data Source',
- 'Name Data',
- 'Attribute Data',
- 'Address Data'
- ];
- private _allColumns = [
- 'Entity ID',
- 'More',
- 'ER Code',
- 'Match Key',
- 'Related Entity ID',
- 'Data Source',
- 'Record ID',
- 'Entity Type',
- 'Name Data',
- 'Attribute Data',
- 'Address Data',
- 'Relationship Data'
- ];
-
- override _colOrder: Map = new Map([
+ /*override _colOrder: Map = new Map([
['entityId',0],
['erCode',1],
['matchKey',2],
@@ -52,8 +28,27 @@ export class SzCrossSourceResultsDataTable extends SzDataTable implements OnInit
['attributeData',7],
['addressData',8],
['relationshipData',9]
+ ])*/
+ override _colOrder: Map = new Map([
+ ['entityId', 0],
+ ['resolutionRuleCode', 1],
+ ['matchKey', 2],
+ ['relatedEntityId', 3],
+ ['dataSource', 4],
+ ['recordId', 5],
+ ['entityType', 6],
+ ['nameData', 7],
+ ['attributeData', 8],
+ ['identifierData', 9],
+ ['addressData', 10],
+ ['phoneData', 11],
+ ['relationshipData', 12],
+ ['entityData', 13],
+ ['otherData', 14]
])
- override _cols: Map = new Map([
+
+
+ /*override _cols: Map = new Map([
['entityId','Entity Id'],
['erCode','ER Code'],
['matchKey','Match Key'],
@@ -64,20 +59,99 @@ export class SzCrossSourceResultsDataTable extends SzDataTable implements OnInit
['attributeData','Attribute Data'],
['addressData','Address Data'],
['relationshipData','Relationship Data']
+ ])*/
+ override _cols: Map = new Map([
+ ['entityId', 'Entity ID'],
+ ['resolutionRuleCode', 'ER Code'],
+ ['matchKey', 'Match Key'],
+ ['relatedEntityId', 'Related Entity'],
+ ['dataSource', 'Data Source'],
+ ['recordId', 'Record ID'],
+ ['entityType', 'Entity Type'],
+ ['nameData', 'Name Data'],
+ ['attributeData', 'Attribute Data'],
+ ['identifierData', 'Identifier Data'],
+ ['addressData', 'Address Data'],
+ ['phoneData', 'Phone Data'],
+ ['relationshipData', 'Relationship Data'],
+ ['entityData', 'Entity Data'],
+ ['otherData', 'Other Data']
])
override _selectableColumns: string[] = [
'entityId',
- 'erCode',
+ 'resolutionRuleCode',
'matchKey',
+ 'relatedEntityId',
'dataSource',
'recordId',
'entityType',
'nameData',
'attributeData',
+ 'identifierData',
'addressData',
- 'relationshipData'
+ 'phoneData',
+ 'relationshipData',
+ 'entityData',
+ 'otherData'
]
+
+ private _matchLevelToColumnsMap = new Map([
+ [1,[
+ 'entityId',
+ 'resolutionRuleCode',
+ 'matchKey',
+ 'dataSource',
+ 'recordId',
+ 'entityType',
+ 'nameData',
+ 'attributeData',
+ 'identifierData',
+ 'addressData',
+ 'phoneData',
+ 'relationshipData',
+ 'entityData',
+ 'otherData'
+ ]],
+ [2,[
+ 'entityId',
+ 'resolutionRuleCode',
+ 'matchKey',
+ 'relatedEntityId',
+ 'dataSource',
+ 'recordId',
+ 'entityType',
+ 'nameData',
+ 'attributeData',
+ 'identifierData',
+ 'addressData',
+ 'phoneData',
+ 'relationshipData',
+ 'entityData',
+ 'otherData'
+ ]],
+ [3,[
+ 'entityId',
+ 'resolutionRuleCode',
+ 'matchKey',
+ 'relatedEntityId',
+ 'dataSource',
+ 'recordId',
+ 'entityType',
+ 'nameData',
+ 'attributeData',
+ 'identifierData',
+ 'addressData',
+ 'phoneData',
+ 'relationshipData',
+ 'entityData',
+ 'otherData'
+ ]]
+ ]);
+
+ private get matchLevel() {
+ return this.dataMartService.sampleMatchLevel;
+ }
override get cellFormatters() {
return {
@@ -121,6 +195,11 @@ export class SzCrossSourceResultsDataTable extends SzDataTable implements OnInit
}
override ngOnInit() {
+ // listen for match level change(changes visible columns)
+ this.dataMartService.onSampleMatchLevelChange.pipe(
+ takeUntil(this.unsubscribe$)
+ ).subscribe(this.onSampleMatchLevelChange.bind(this));
+
// listen for new sampleset data
this.dataMartService.onSampleResultChange.pipe(
takeUntil(this.unsubscribe$)
@@ -153,12 +232,16 @@ export class SzCrossSourceResultsDataTable extends SzDataTable implements OnInit
return this.rowCount;
}
- override cellStyle(fieldName: string, rowsPreceeding): string {
+ override cellStyle(fieldName: string, rowsPreceeding, cellRowSpan?: {[fieldName: string]: number}): string {
let retVal = '';
let rowOrderPrefix = 0;
let rowCellOrderOffset = this.numberOfColumns * rowsPreceeding;
if(this._colOrder && this._colOrder.has(fieldName)) {
retVal += 'order: '+ (rowCellOrderOffset+this._colOrder.get(fieldName))+';';
+ if(cellRowSpan && cellRowSpan[fieldName] && this._colOrder.get(fieldName) === 0) {
+ // apply row span to cell
+ retVal += 'grid-row: span '+ cellRowSpan[fieldName] +';'
+ }
}
return retVal;
}
@@ -168,6 +251,32 @@ export class SzCrossSourceResultsDataTable extends SzDataTable implements OnInit
this.cellIndex = 0;
}
+ private onSampleMatchLevelChange(matchLevel: number) {
+ if(this._matchLevelToColumnsMap.has(matchLevel)) {
+ this._selectableColumns = this._matchLevelToColumnsMap.get(matchLevel);
+ } else {
+ // we still need columns sooo...
+ console.warn(`NO column map for MATCH LEVEL ${matchLevel}`);
+ this._selectableColumns = this._matchLevelToColumnsMap.get(1);
+ }
+ }
+
+ public getRowCellOrder(fieldName: string) {
+ let retVal = 0;
+ if(this._colOrder && this._colOrder.has(fieldName)) {
+ retVal = this._colOrder.get(fieldName);
+ }
+ return retVal;
+ }
+
+ public getRowSpanForEntityIdCell(rows: SzStatSampleEntityTableRow[]) {
+ let retVal = 0;
+ if(rows) {
+ retVal = rows.length + 1;
+ }
+ return retVal;
+ }
+
private onSampleSetDataChange(data: SzEntityData[] | undefined) {
if(data === undefined) {
this.data = [];
diff --git a/src/lib/statistics/cross-source/sz-cross-source-statistics.component.scss b/src/lib/statistics/cross-source/sz-cross-source-statistics.component.scss
index f07cbcac..e91baaa1 100644
--- a/src/lib/statistics/cross-source/sz-cross-source-statistics.component.scss
+++ b/src/lib/statistics/cross-source/sz-cross-source-statistics.component.scss
@@ -11,10 +11,14 @@
display: flex;
flex-direction: row;
align-items: center;
+ margin: 33px 0 10px 0;
mat-slide-toggle.show-all-columns {
margin-left: 20px;
}
+ .title {
+ margin: 0;
+ }
}
.sz-css-heading {