@huntsman-cancer-institute/navigation 17.13.0 → 17.14.1
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/components/search-list/search-list-controller.component.d.ts +4 -0
- package/components/search-list/search-list.component.d.ts +6 -1
- package/esm2022/components/search-list/search-list-controller.component.mjs +13 -1
- package/esm2022/components/search-list/search-list.component.mjs +32 -16
- package/fesm2022/huntsman-cancer-institute-navigation.mjs +43 -15
- package/fesm2022/huntsman-cancer-institute-navigation.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2297,6 +2297,15 @@ let SearchListControllerComponent = class SearchListControllerComponent extends
|
|
|
2297
2297
|
}
|
|
2298
2298
|
return "input";
|
|
2299
2299
|
}
|
|
2300
|
+
getFields() {
|
|
2301
|
+
return this.fields;
|
|
2302
|
+
}
|
|
2303
|
+
setFields(fields) {
|
|
2304
|
+
this.fields = fields;
|
|
2305
|
+
}
|
|
2306
|
+
getField(fieldName) {
|
|
2307
|
+
return this.fields.find(x => x.field == fieldName);
|
|
2308
|
+
}
|
|
2300
2309
|
/**
|
|
2301
2310
|
* Create filters based upon available fields for filtering.
|
|
2302
2311
|
*/
|
|
@@ -2539,6 +2548,9 @@ let SearchListControllerComponent = class SearchListControllerComponent extends
|
|
|
2539
2548
|
getFilterForField(fieldName) {
|
|
2540
2549
|
return this.boundAdvancedSearchFilters.find(x => x.field === fieldName);
|
|
2541
2550
|
}
|
|
2551
|
+
getBasicFilterForField(fieldName) {
|
|
2552
|
+
return this.boundFilters.find(x => x.field === fieldName);
|
|
2553
|
+
}
|
|
2542
2554
|
/**
|
|
2543
2555
|
* Listener for back button
|
|
2544
2556
|
*/
|
|
@@ -3554,6 +3566,7 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
3554
3566
|
constructor(elementRef, renderer, resolver, navigationGlobalService, navigationService, changeDetectorRef) {
|
|
3555
3567
|
super(elementRef, renderer, resolver, navigationService, changeDetectorRef);
|
|
3556
3568
|
this.searchResultMessage = "";
|
|
3569
|
+
this.preparedData = [];
|
|
3557
3570
|
// An array of booleans to control the hci-busy overlaying the search-list.
|
|
3558
3571
|
this.loading = [false];
|
|
3559
3572
|
// Expand the selected row group as its own screen, or show rows under selected row groups in the same view.
|
|
@@ -3599,6 +3612,7 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
3599
3612
|
this.groupClick = new EventEmitter();
|
|
3600
3613
|
this.rowClick = new EventEmitter();
|
|
3601
3614
|
this.dataChange = new EventEmitter();
|
|
3615
|
+
this.afterFilterEvent = new EventEmitter();
|
|
3602
3616
|
// Grid DTO info needed to build external data requests.
|
|
3603
3617
|
this.sorts = [];
|
|
3604
3618
|
this.filters = [];
|
|
@@ -3651,6 +3665,12 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
3651
3665
|
return "row-undefined";
|
|
3652
3666
|
}
|
|
3653
3667
|
}
|
|
3668
|
+
getViewData() {
|
|
3669
|
+
return this.viewData;
|
|
3670
|
+
}
|
|
3671
|
+
getPreparedData() {
|
|
3672
|
+
return this.preparedData;
|
|
3673
|
+
}
|
|
3654
3674
|
/**
|
|
3655
3675
|
* On init, listen for loading subjects and listen for page changes.
|
|
3656
3676
|
*/
|
|
@@ -3745,6 +3765,7 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
3745
3765
|
this.filters = filters;
|
|
3746
3766
|
this.setData();
|
|
3747
3767
|
this.resetPaging();
|
|
3768
|
+
this.afterFilterEvent.emit(this.preparedData);
|
|
3748
3769
|
});
|
|
3749
3770
|
this.controller.sortsSubject.subscribe((sorts) => {
|
|
3750
3771
|
this.sorts = sorts;
|
|
@@ -3984,7 +4005,8 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
3984
4005
|
this.paging.setNumPages(1);
|
|
3985
4006
|
this.paging.setDataSize(0);
|
|
3986
4007
|
}
|
|
3987
|
-
let preparedData = [];
|
|
4008
|
+
//let preparedData = [];
|
|
4009
|
+
this.preparedData = [];
|
|
3988
4010
|
this.groupedDataSet = [];
|
|
3989
4011
|
let rowGroupMap = new Map();
|
|
3990
4012
|
let doRowGrouping = this.grouping.fields && this.grouping.fields.length > 0;
|
|
@@ -4047,7 +4069,7 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
4047
4069
|
include = false;
|
|
4048
4070
|
}
|
|
4049
4071
|
}
|
|
4050
|
-
if (include) {
|
|
4072
|
+
if (!include) {
|
|
4051
4073
|
break;
|
|
4052
4074
|
}
|
|
4053
4075
|
}
|
|
@@ -4057,24 +4079,24 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
4057
4079
|
}
|
|
4058
4080
|
if (doRowGrouping) {
|
|
4059
4081
|
if (rowGroupMap.get(groupKey) >= 0) {
|
|
4060
|
-
preparedData[rowGroupMap.get(groupKey)].rgRows.push(row);
|
|
4082
|
+
this.preparedData[rowGroupMap.get(groupKey)].rgRows.push(row);
|
|
4061
4083
|
}
|
|
4062
4084
|
else {
|
|
4063
|
-
rowGroupMap.set(groupKey, preparedData.length);
|
|
4085
|
+
rowGroupMap.set(groupKey, this.preparedData.length);
|
|
4064
4086
|
let rowGroup = new RowGroup(groupKey, row);
|
|
4065
4087
|
for (let field of this.grouping.fields) {
|
|
4066
4088
|
rowGroup[field] = row[field];
|
|
4067
4089
|
}
|
|
4068
|
-
preparedData.push(rowGroup);
|
|
4090
|
+
this.preparedData.push(rowGroup);
|
|
4069
4091
|
}
|
|
4070
4092
|
}
|
|
4071
4093
|
else {
|
|
4072
|
-
preparedData.push(new RowGroup(groupKey, row));
|
|
4094
|
+
this.preparedData.push(new RowGroup(groupKey, row));
|
|
4073
4095
|
}
|
|
4074
4096
|
//this.globalRowGroupMap = rowGroupMap;
|
|
4075
4097
|
}
|
|
4076
4098
|
if (this.sorts.length > 0) {
|
|
4077
|
-
preparedData.sort((a, b) => {
|
|
4099
|
+
this.preparedData.sort((a, b) => {
|
|
4078
4100
|
let v = 0;
|
|
4079
4101
|
for (let sort of this.sorts) {
|
|
4080
4102
|
if (this.isSortFieldGroupField(sort.getField())) {
|
|
@@ -4123,7 +4145,7 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
4123
4145
|
return v;
|
|
4124
4146
|
});
|
|
4125
4147
|
if (this.grouping.getFields().length > 0) {
|
|
4126
|
-
for (let rowGroup of preparedData) {
|
|
4148
|
+
for (let rowGroup of this.preparedData) {
|
|
4127
4149
|
rowGroup.rgRows.sort((a, b) => {
|
|
4128
4150
|
let v = 0;
|
|
4129
4151
|
for (let sort of this.sorts) {
|
|
@@ -4154,17 +4176,17 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
4154
4176
|
}
|
|
4155
4177
|
}
|
|
4156
4178
|
}
|
|
4157
|
-
this.paging.setDataSize(preparedData.length);
|
|
4158
|
-
this.groupedDataSet = preparedData;
|
|
4179
|
+
this.paging.setDataSize(this.preparedData.length);
|
|
4180
|
+
this.groupedDataSet = this.preparedData;
|
|
4159
4181
|
if (this.paging.getPageSize() > 0) {
|
|
4160
4182
|
this.viewData = [];
|
|
4161
|
-
for (var i = this.paging.getPage() * this.paging.getPageSize(); i < Math.min(preparedData.length, (this.paging.getPage() + 1) * this.paging.getPageSize()); i++) {
|
|
4162
|
-
this.viewData.push(preparedData[i]);
|
|
4183
|
+
for (var i = this.paging.getPage() * this.paging.getPageSize(); i < Math.min(this.preparedData.length, (this.paging.getPage() + 1) * this.paging.getPageSize()); i++) {
|
|
4184
|
+
this.viewData.push(this.preparedData[i]);
|
|
4163
4185
|
}
|
|
4164
4186
|
}
|
|
4165
4187
|
else {
|
|
4166
|
-
this.paging.setDataSize(preparedData.length);
|
|
4167
|
-
this.viewData = preparedData;
|
|
4188
|
+
this.paging.setDataSize(this.preparedData.length);
|
|
4189
|
+
this.viewData = this.preparedData;
|
|
4168
4190
|
}
|
|
4169
4191
|
for (let rowGroup of this.viewData) {
|
|
4170
4192
|
rowGroup.rgCount = rowGroup.rgRows.length;
|
|
@@ -4510,6 +4532,10 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
4510
4532
|
this.renderer.removeClass(e, "active");
|
|
4511
4533
|
}
|
|
4512
4534
|
}
|
|
4535
|
+
isIdInFilteredResults(id) {
|
|
4536
|
+
let e = this.elementRef.nativeElement.querySelector("#row-" + id);
|
|
4537
|
+
return e ? true : false;
|
|
4538
|
+
}
|
|
4513
4539
|
/**
|
|
4514
4540
|
* Allow a custom row click function to select a row.
|
|
4515
4541
|
*
|
|
@@ -4598,7 +4624,7 @@ let SearchListComponent = class SearchListComponent extends NavComponent {
|
|
|
4598
4624
|
}
|
|
4599
4625
|
}
|
|
4600
4626
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchListComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }, { token: NavigationGlobalService }, { token: NavigationService, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4601
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchListComponent, selector: "hci-search-list", inputs: { controller: "controller", boundData: ["data", "boundData"], dataSubject: "dataSubject", externalDataCall: ["dataCall", "externalDataCall"], loadingSubjects: "loadingSubjects", loading: "loading", route: "route", inlineExpand: "inlineExpand", rowId: "rowId", groupClass: "groupClass", rowClass: "rowClass", groupDisplay: "groupDisplay", closeOthers: "closeOthers", groupingFields: "groupingFields", delimiter: "delimiter", groupByAllowedFields: "groupByAllowedFields", pageSize: "pageSize", groupPageSize: "groupPageSize", groupCacheNumPages: "groupCacheNumPages", dropdown: "dropdown", busyIcon: "busyIcon", showResultsCount: "showResultsCount", onGroupClick: "onGroupClick", onRowClick: "onRowClick", groupTemplate: "groupTemplate", groupSelectedTemplate: "groupSelectedTemplate", itemTemplate: "itemTemplate", onGroupClose: "onGroupClose" }, outputs: { groupClick: "groupClick", rowClick: "rowClick", dataChange: "dataChange" }, viewQueries: [{ propertyName: "defaultGroupTemplate", first: true, predicate: ["defaultGroupTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultGroupSelectedTemplate", first: true, predicate: ["defaultGroupSelectedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "selectedRowGroupContainerSetter", first: true, predicate: ["selectedRowGroupContainer"], descendants: true, read: ElementRef }, { propertyName: "rowParents", predicate: ["rowParent"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
4627
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchListComponent, selector: "hci-search-list", inputs: { controller: "controller", boundData: ["data", "boundData"], dataSubject: "dataSubject", externalDataCall: ["dataCall", "externalDataCall"], loadingSubjects: "loadingSubjects", loading: "loading", route: "route", inlineExpand: "inlineExpand", rowId: "rowId", groupClass: "groupClass", rowClass: "rowClass", groupDisplay: "groupDisplay", closeOthers: "closeOthers", groupingFields: "groupingFields", delimiter: "delimiter", groupByAllowedFields: "groupByAllowedFields", pageSize: "pageSize", groupPageSize: "groupPageSize", groupCacheNumPages: "groupCacheNumPages", dropdown: "dropdown", busyIcon: "busyIcon", showResultsCount: "showResultsCount", onGroupClick: "onGroupClick", onRowClick: "onRowClick", groupTemplate: "groupTemplate", groupSelectedTemplate: "groupSelectedTemplate", itemTemplate: "itemTemplate", onGroupClose: "onGroupClose" }, outputs: { groupClick: "groupClick", rowClick: "rowClick", dataChange: "dataChange", afterFilterEvent: "afterFilterEvent" }, viewQueries: [{ propertyName: "defaultGroupTemplate", first: true, predicate: ["defaultGroupTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultGroupSelectedTemplate", first: true, predicate: ["defaultGroupSelectedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "selectedRowGroupContainerSetter", first: true, predicate: ["selectedRowGroupContainer"], descendants: true, read: ElementRef }, { propertyName: "rowParents", predicate: ["rowParent"], descendants: true, read: ElementRef }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
|
|
4602
4628
|
<div
|
|
4603
4629
|
*ngIf="showResultsCount && searchResultMessage"
|
|
4604
4630
|
class="results-count"
|
|
@@ -5019,6 +5045,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
5019
5045
|
type: Output
|
|
5020
5046
|
}], dataChange: [{
|
|
5021
5047
|
type: Output
|
|
5048
|
+
}], afterFilterEvent: [{
|
|
5049
|
+
type: Output
|
|
5022
5050
|
}], defaultGroupTemplate: [{
|
|
5023
5051
|
type: ViewChild,
|
|
5024
5052
|
args: ["defaultGroupTemplate", { read: TemplateRef, static: true }]
|