1
+ < div class ="advanced-filter-section ">
2
+ < div class ="d-flex align-items-center ">
3
+ < button class ="btn btn-white border d-flex align-items-center font-12 mr-3 " (click) ="showFilter() ">
4
+ < span class ="dsi dsi-filter-alt "> </ span >
5
+ </ button >
6
+ < button type ="button " class ="btn btn-white border d-flex align-items-center font-12 ignore-outside "
7
+ (click) ="showColumnsWindow=!showColumnsWindow; !showColumnsWindow && applyFilter() ">
8
+ < span class ="text ignore-outside "> View Columns</ span >
9
+ < span class ="dsi ml-3 ignore-outside " [class.dsi-drop-down] ="!showColumnsWindow "
10
+ [class.dsi-drop-up] ="showColumnsWindow "> </ span >
11
+ </ button >
12
+ < div *ngIf ="showColumnsWindow " class ="columns-wrapper position-absolute bg-white rounded " odpClickOutside
13
+ (outside) ="showColumnsWindow=false; applyFilter() ">
14
+ < div class ="px-3 py-2 d-flex align-items-center bg-light ">
15
+ < odp-round-check class ="mr-3 ml-1 " [(checked)] ="checkAllColumn "> </ odp-round-check >
16
+ < input class ="form-control " type ="text " [(ngModel)] ="searchTerm " odpAutoFocus >
17
+ </ div >
18
+ < div class ="list-group list-group-flush ">
19
+ < ng-container *ngFor ="let col of allColumns | searchFields:searchTerm ">
20
+ < div *ngIf ="col && col.properties && col.properties.name "
21
+ class ="list-group-item list-group-item-action d-flex align-items-center font-12 text-dark "
22
+ (click) ="selectItem(col) ">
23
+ < odp-round-check [checked] ="isColumnSelected(col) " (checkedChange) ="selectItem(col) "> </ odp-round-check >
24
+ < span class ="ml-2 "> {{ col.properties.label ? col.properties.label : col.properties.name }}</ span >
25
+ </ div >
26
+ </ ng-container >
27
+ </ div >
28
+ </ div >
29
+ <!-- <div class="d-flex align-items-start ml-3">
30
+ <div class="text-gray-medium label-text"></div>
31
+ <div class="d-flex drag-boundary flex-wrap">
32
+ <div *ngFor="let col of selectedColOrder; let i = index; let last = last;" class="d-flex ">
33
+ <div class="col-name d-flex justify-content-between align-items-center py-1 px-2 rounded bg-white"
34
+ [ngClass]="{'mr-2': !last}">
35
+ <div class="pr-2 font-12"
36
+ [odpTruncated]="col.properties.label ? col.properties.label : col.properties.name">
37
+ {{ col.properties.label ? col.properties.label : col.properties.name }}
38
+ </div>
39
+ <div class="remove-col hover" (click)="removeItem(i)">
40
+ <span class="dsi dsi-close"></span>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </div>
45
+ </div> -->
46
+ < div class ="selected-filter-list d-flex mx-3 ">
47
+ < ng-container *ngFor ="let item of filterList ">
48
+ < span class ="selected-filter-item px-2 py-1 rounded border bg-white mr-2 font-12 " (click) ="showFilter() ">
49
+ < span class ="fw-500 "> {{item.dataKey}}</ span >
50
+ < span class ="fw-500 text-grey mx-2 "> {{item.filterType}}</ span >
51
+ < span class ="fw-400 "> {{item.filterValue}}</ span >
52
+ </ span >
53
+ </ ng-container >
54
+ </ div >
55
+ </ div >
56
+ </ div >
57
+ < ng-template #confirmDeleteModal >
58
+ < div class ="modal-body d-flex flex-column p-4 ">
59
+ < div class ="d-flex align-items-center justify-content-between ">
60
+ < span class ="font-22 fw-500 text-danger "> {{ deleteModal.title }}</ span >
61
+ < button id ="deleteModalCloseBtn " type ="button " class ="close " aria-label ="Close "
62
+ (click) ="confirmDeleteModalRef.close(false) ">
63
+ < span class ="dsi dsi-close "> </ span >
64
+ </ button >
65
+ </ div >
66
+ < p class ="text-center my-4 "> {{ deleteModal.message }}</ p >
67
+ < div class ="d-flex align-items-center justify-content-end mt-auto ">
68
+ < button id ="deleteModalCancelBtn " type ="button " class ="btn btn-secondary mr-3 "
69
+ (click) ="confirmDeleteModalRef.close(false) "> No</ button >
70
+ < button id ="deleteModalYesBtn " type ="button " class ="btn btn-danger "
71
+ (click) ="confirmDeleteModalRef.close(true) "> Yes</ button >
72
+ </ div >
73
+ </ div >
74
+ </ ng-template >
75
+ < ng-template #filtereModal >
76
+ < div class ="modal-body p-4 ">
77
+ < div class ="d-flex align-items-center justify-content-between ">
78
+ < h4 class ="text-dark fw-500 font-22 "> Filter All Records</ h4 >
79
+ < div class ="d-flex ml-auto ">
80
+ < span class ="fw-500 font-13 text-dark text-decoration-underline hover mr-4 " (click) ="clearFilter() ">
81
+ Clear All</ span >
82
+ < button id ="deleteModalCloseBtn " type ="button " class ="close " (click) ="filterModalRef.close(false) ">
83
+ < span class ="dsi dsi-close "> </ span >
84
+ </ button >
85
+ </ div >
86
+ </ div >
87
+ < div class ="filter-body my-4 ">
88
+ < odp-search-for [allColumns] ="allColumns " [filterModel] ="filterModel " (filterModelChange) ="createFilter($event) "
89
+ class ="my-3 ">
90
+ </ odp-search-for >
91
+ </ div >
92
+ < div class ="d-flex align-items-center mt-auto " *ngIf ="!showSaveDiv ">
93
+ < button class ="mr-2 btn btn-link " type ="button " (click) ="clearFilter() " *ngIf ="showSeparateCreateBtn ">
94
+ < span > Create New View</ span >
95
+ </ button >
96
+ < button class ="mr-2 btn btn-link text-primary " type ="button " *ngIf ="showSeparateCreateBtn "
97
+ (click) ="duplicateView() "> +Duplicate View</ button >
98
+ < button class ="mr-2 btn btn-link text-primary " type ="button " (click) ="showSaveDiv = true "
99
+ *ngIf ="!showSeparateCreateBtn "> {{ saveOrEditText }}</ button >
100
+ < div class ="ml-auto ">
101
+ < button id ="addFilterCancelBtn " type ="button " class ="btn btn-outline-primary mr-3 btn-min-width "
102
+ (click) ="filterModalRef.close(false) "> Cancel</ button >
103
+ < button id ="addFilterApplyBtn " type ="button " class ="btn btn-primary btn-min-width "
104
+ (click) ="filterModalRef.close(true) "> Apply</ button >
105
+ </ div >
106
+ </ div >
107
+ < div *ngIf ="showSaveDiv " class ="d-flex justify-content-between align-items-center w-100 save-filter "
108
+ [@toggleSaveFilter] >
109
+ < div class ="mr-2 "> Name your View</ div >
110
+ < input type ="text " id ="viewName " class ="form-control w-25 mr-4 "
111
+ placeholder ="Give a name (max 40 chars alphanumeric) " maxlength ="40 " (blur) ="checkFilterName() "
112
+ [(ngModel)] ="filterPayload.name " [ngClass] ="{'is-invalid': invalidFilterName} " pattern ="/^[a-z\d\s]+$/i ">
113
+ < div class ="mr-2 "> Share:</ div >
114
+ < div class ="left-radius position-relative hover "
115
+ [ngClass] ="{'bg-white': !filterPayload.private, 'bg-primary': filterPayload.private} "
116
+ (click) ="filterPayload.private = true ">
117
+ < span class ="fas fa-unlock-alt position-absolute icon-pos "
118
+ [ngClass] ="{'text-secondary': !filterPayload.private, 'text-white': filterPayload.private} "> </ span >
119
+ </ div >
120
+ < div class ="right-radius bg-white position-relative hover mr-2 "
121
+ [ngClass] ="{'bg-white': filterPayload.private, 'bg-primary': !filterPayload.private} "
122
+ (click) ="filterPayload.private = false ">
123
+ < span class ="fas fa-globe position-absolute icon-pos "
124
+ [ngClass] ="{'text-secondary': filterPayload.private, 'text-white': !filterPayload.private} "> </ span >
125
+ </ div >
126
+ < div class ="filter-text font-sm ">
127
+ < span *ngIf ="filterPayload.private === true "> Private (Only Me)</ span >
128
+ < span *ngIf ="filterPayload.private !== true "> Public (Anyone)</ span >
129
+ </ div >
130
+ < div class ="ml-auto ">
131
+ < button class ="btn btn-outline-primary mr-2 " (click) ="showSaveDiv = false "> Cancel</ button >
132
+ < button class ="btn btn-primary " (click) ="saveFilter();filterModalRef.close(true) "> Save View</ button >
133
+ </ div >
134
+ </ div >
135
+ </ div >
136
+ </ ng-template >
0 commit comments