mis-crystal-design-system 18.0.11 → 18.0.13-test-2

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Input, Component, ViewChild, EventEmitter, Output, input, output, signal, ViewChildren, NgModule } from '@angular/core';
2
+ import { EventEmitter, Component, Output, ViewChild, ViewChildren, Input, Directive, input, output, signal, HostListener, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2 from '@angular/cdk/scrolling';
@@ -7,6 +7,549 @@ import { ScrollingModule } from '@angular/cdk/scrolling';
7
7
  import * as i2$1 from 'mis-crystal-design-system/checkbox';
8
8
  import { CheckboxModule } from 'mis-crystal-design-system/checkbox';
9
9
 
10
+ const _c0$3 = ["filter"];
11
+ const _c1$3 = ["table"];
12
+ const _c2$2 = ["colHeaderRef"];
13
+ const _c3$1 = (a0, a1, a2) => ({ height: a0, width: a1, "overflow-x": a2 });
14
+ const _c4$1 = (a0, a1, a2) => ({ "no-scrollbar": a0, scrollbar: a1, "scroll-horizontally": a2 });
15
+ const _c5$1 = (a0, a1, a2) => ({ width: a0, cursor: a1, "justify-content": a2 });
16
+ const _c6$1 = (a0, a1) => ({ "t-row-hover": a0, "active-row": a1 });
17
+ const _c7$1 = a0 => ({ "min-height": a0 });
18
+ const _c8 = a0 => ({ width: a0 });
19
+ const _c9 = a0 => ({ "t-col-container-hover": a0 });
20
+ const _c10 = (a0, a1) => ({ width: "100%", cursor: a0, "justify-content": a1 });
21
+ const _c11 = a0 => ({ color: a0 });
22
+ const _c12 = a0 => ({ "text-ellipsis": a0 });
23
+ const _c13 = () => [];
24
+ const _c14 = () => ({ display: "flex", justifyContent: "center", alignItems: "center", padding: "16px" });
25
+ const _c15 = a0 => ({ "page-active": a0 });
26
+ const _c16 = () => ({ display: "flex" });
27
+ const _c17 = () => ({ "margin-right": "4px" });
28
+ function TableComponent_mis_table_filter_1_Template(rf, ctx) { if (rf & 1) {
29
+ const _r1 = i0.ɵɵgetCurrentView();
30
+ i0.ɵɵelementStart(0, "mis-table-filter", 11, 1);
31
+ i0.ɵɵlistener("filtersApplied", function TableComponent_mis_table_filter_1_Template_mis_table_filter_filtersApplied_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateAppliedFilters($event)); });
32
+ i0.ɵɵelementEnd();
33
+ } if (rf & 2) {
34
+ const ctx_r1 = i0.ɵɵnextContext();
35
+ i0.ɵɵproperty("containerStyles", ctx_r1.filterContainerStyles)("filtersData", ctx_r1.filterData);
36
+ } }
37
+ function TableComponent_div_5_p_2_Template(rf, ctx) { if (rf & 1) {
38
+ i0.ɵɵelementStart(0, "p", 17);
39
+ i0.ɵɵtext(1);
40
+ i0.ɵɵelementEnd();
41
+ } if (rf & 2) {
42
+ const colHeader_r4 = i0.ɵɵnextContext().$implicit;
43
+ i0.ɵɵadvance();
44
+ i0.ɵɵtextInterpolate1(" ", (colHeader_r4 == null ? null : colHeader_r4.data) || " ", " ");
45
+ } }
46
+ function TableComponent_div_5_span_3_span_1_Template(rf, ctx) { if (rf & 1) {
47
+ i0.ɵɵelement(0, "span", 22);
48
+ } }
49
+ function TableComponent_div_5_span_3_Template(rf, ctx) { if (rf & 1) {
50
+ const _r5 = i0.ɵɵgetCurrentView();
51
+ i0.ɵɵelementStart(0, "span", 18);
52
+ i0.ɵɵlistener("click", function TableComponent_div_5_span_3_Template_span_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const colHeader_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.filterData = colHeader_r4.filters; ctx_r1.toggleFilter(colHeader_r4.data); return i0.ɵɵresetView($event.stopPropagation()); });
53
+ i0.ɵɵtemplate(1, TableComponent_div_5_span_3_span_1_Template, 1, 0, "span", 19);
54
+ i0.ɵɵnamespaceSVG();
55
+ i0.ɵɵelementStart(2, "svg", 20);
56
+ i0.ɵɵelement(3, "path", 21);
57
+ i0.ɵɵelementEnd()();
58
+ } if (rf & 2) {
59
+ const colHeader_r4 = i0.ɵɵnextContext().$implicit;
60
+ const ctx_r1 = i0.ɵɵnextContext();
61
+ i0.ɵɵadvance();
62
+ i0.ɵɵproperty("ngIf", (ctx_r1.appliedFilters[colHeader_r4.data] == null ? null : ctx_r1.appliedFilters[colHeader_r4.data].length) > 0);
63
+ } }
64
+ function TableComponent_div_5_span_4_Template(rf, ctx) { if (rf & 1) {
65
+ const _r6 = i0.ɵɵgetCurrentView();
66
+ i0.ɵɵelementStart(0, "span", 23);
67
+ i0.ɵɵlistener("sortChange", function TableComponent_div_5_span_4_Template_span_sortChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onSortChange($event)); });
68
+ i0.ɵɵelementEnd();
69
+ } if (rf & 2) {
70
+ const colHeader_r4 = i0.ɵɵnextContext().$implicit;
71
+ const ctx_r1 = i0.ɵɵnextContext();
72
+ i0.ɵɵproperty("column", colHeader_r4)("activeSort", ctx_r1.currentSort)("activeSorts", ctx_r1.multiColumnSort)("multiColumnSort", ctx_r1.config.multiColumnSort);
73
+ } }
74
+ function TableComponent_div_5_5_ng_template_0_Template(rf, ctx) { }
75
+ function TableComponent_div_5_5_Template(rf, ctx) { if (rf & 1) {
76
+ i0.ɵɵtemplate(0, TableComponent_div_5_5_ng_template_0_Template, 0, 0, "ng-template", 24);
77
+ } if (rf & 2) {
78
+ const colHeader_r4 = i0.ɵɵnextContext().$implicit;
79
+ i0.ɵɵproperty("customComponent", colHeader_r4 == null ? null : colHeader_r4.componentRef)("data", colHeader_r4.data);
80
+ } }
81
+ function TableComponent_div_5_Template(rf, ctx) { if (rf & 1) {
82
+ const _r3 = i0.ɵɵgetCurrentView();
83
+ i0.ɵɵelementStart(0, "div", 12, 2);
84
+ i0.ɵɵlistener("click", function TableComponent_div_5_Template_div_click_0_listener() { const colHeader_r4 = i0.ɵɵrestoreView(_r3).$implicit; return i0.ɵɵresetView((colHeader_r4 == null ? null : colHeader_r4.action) ? colHeader_r4 == null ? null : colHeader_r4.action(colHeader_r4) : null); });
85
+ i0.ɵɵtemplate(2, TableComponent_div_5_p_2_Template, 2, 1, "p", 13)(3, TableComponent_div_5_span_3_Template, 4, 1, "span", 14)(4, TableComponent_div_5_span_4_Template, 1, 4, "span", 15)(5, TableComponent_div_5_5_Template, 1, 2, null, 16);
86
+ i0.ɵɵelementEnd();
87
+ } if (rf & 2) {
88
+ const colHeader_r4 = ctx.$implicit;
89
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(5, _c5$1, (colHeader_r4 == null ? null : colHeader_r4.style == null ? null : colHeader_r4.style.width) || "", colHeader_r4.action ? "pointer" : "default", (colHeader_r4 == null ? null : colHeader_r4.style == null ? null : colHeader_r4.style.justifyContent) ? colHeader_r4 == null ? null : colHeader_r4.style == null ? null : colHeader_r4.style.justifyContent : colHeader_r4.type === "number" ? "flex-end" : "space-between"));
90
+ i0.ɵɵadvance(2);
91
+ i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.type) !== "custom");
92
+ i0.ɵɵadvance();
93
+ i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.type) !== "custom" && (colHeader_r4 == null ? null : colHeader_r4.filters) && (colHeader_r4 == null ? null : colHeader_r4.filters == null ? null : colHeader_r4.filters.length) > 0);
94
+ i0.ɵɵadvance();
95
+ i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.isSortable) && !(colHeader_r4 == null ? null : colHeader_r4.filters));
96
+ i0.ɵɵadvance();
97
+ i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.type) === "custom");
98
+ } }
99
+ function TableComponent_div_7_div_2_p_2_Template(rf, ctx) { if (rf & 1) {
100
+ i0.ɵɵelementStart(0, "p", 33);
101
+ i0.ɵɵtext(1);
102
+ i0.ɵɵelementEnd();
103
+ } if (rf & 2) {
104
+ const ctx_r12 = i0.ɵɵnextContext();
105
+ const col_r11 = ctx_r12.$implicit;
106
+ const i_r12 = ctx_r12.index;
107
+ const ctx_r1 = i0.ɵɵnextContext(2);
108
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(3, _c11, (ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.color) ? ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.color : ""))("ngClass", i0.ɵɵpureFunction1(5, _c12, !!(ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.textEllipsis)));
109
+ i0.ɵɵadvance();
110
+ i0.ɵɵtextInterpolate1(" ", col_r11, " ");
111
+ } }
112
+ function TableComponent_div_7_div_2_3_ng_template_0_Template(rf, ctx) { }
113
+ function TableComponent_div_7_div_2_3_Template(rf, ctx) { if (rf & 1) {
114
+ i0.ɵɵtemplate(0, TableComponent_div_7_div_2_3_ng_template_0_Template, 0, 0, "ng-template", 24);
115
+ } if (rf & 2) {
116
+ const ctx_r12 = i0.ɵɵnextContext();
117
+ const col_r11 = ctx_r12.$implicit;
118
+ const i_r12 = ctx_r12.index;
119
+ const ctx_r1 = i0.ɵɵnextContext(2);
120
+ i0.ɵɵproperty("customComponent", ctx_r1.config.colConfig[i_r12].componentRef)("data", col_r11);
121
+ } }
122
+ function TableComponent_div_7_div_2_mis_actions_cell_4_Template(rf, ctx) { if (rf & 1) {
123
+ const _r14 = i0.ɵɵgetCurrentView();
124
+ i0.ɵɵelementStart(0, "mis-actions-cell", 34);
125
+ i0.ɵɵlistener("actionClick", function TableComponent_div_7_div_2_mis_actions_cell_4_Template_mis_actions_cell_actionClick_0_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onActionClick($event)); });
126
+ i0.ɵɵelementEnd();
127
+ } if (rf & 2) {
128
+ const ctx_r12 = i0.ɵɵnextContext();
129
+ const col_r11 = ctx_r12.$implicit;
130
+ const i_r12 = ctx_r12.index;
131
+ const ctx_r1 = i0.ɵɵnextContext(2);
132
+ i0.ɵɵstyleMap(ctx_r1.getActionsCellStyle(ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style));
133
+ i0.ɵɵproperty("data", col_r11)("actionItems", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].actionItems) || i0.ɵɵpureFunction0(7, _c13))("actionType", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].actionType) || "inline")("dropdownIcon", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].dropdownIcon) || "")("submenuAlign", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].submenuAlign) || "left");
134
+ } }
135
+ function TableComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
136
+ const _r9 = i0.ɵɵgetCurrentView();
137
+ i0.ɵɵelementStart(0, "div", 29);
138
+ i0.ɵɵlistener("click", function TableComponent_div_7_div_2_Template_div_click_0_listener() { const ctx_r9 = i0.ɵɵrestoreView(_r9); const col_r11 = ctx_r9.$implicit; const i_r12 = ctx_r9.index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView((ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].action) ? ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].action(col_r11) : null); });
139
+ i0.ɵɵelementStart(1, "div", 30);
140
+ i0.ɵɵtemplate(2, TableComponent_div_7_div_2_p_2_Template, 2, 7, "p", 31)(3, TableComponent_div_7_div_2_3_Template, 1, 2, null, 16)(4, TableComponent_div_7_div_2_mis_actions_cell_4_Template, 1, 8, "mis-actions-cell", 32);
141
+ i0.ɵɵelementEnd()();
142
+ } if (rf & 2) {
143
+ const i_r12 = ctx.index;
144
+ const ctx_r1 = i0.ɵɵnextContext(2);
145
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(8, _c8, (ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.width) || (ctx_r1.config == null ? null : ctx_r1.config.colHeaderConfig[i_r12] == null ? null : ctx_r1.config.colHeaderConfig[i_r12].style == null ? null : ctx_r1.config.colHeaderConfig[i_r12].style.width) || ""))("ngClass", i0.ɵɵpureFunction1(10, _c9, ctx_r1.config.cellHover));
146
+ i0.ɵɵadvance();
147
+ i0.ɵɵstyleMap(ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style);
148
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction2(12, _c10, (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].action) ? "pointer" : "default", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.justifyContent) ? ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.justifyContent : (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].type) === "number" ? "flex-end" : "space-between"));
149
+ i0.ɵɵadvance();
150
+ i0.ɵɵproperty("ngIf", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].type) !== "custom" && (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].type) !== "actions");
151
+ i0.ɵɵadvance();
152
+ i0.ɵɵproperty("ngIf", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].type) === "custom");
153
+ i0.ɵɵadvance();
154
+ i0.ɵɵproperty("ngIf", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].type) === "actions");
155
+ } }
156
+ function TableComponent_div_7_div_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
157
+ i0.ɵɵelementContainerStart(0);
158
+ i0.ɵɵelementStart(1, "div", 36);
159
+ i0.ɵɵtext(2, " Loading... ");
160
+ i0.ɵɵelementEnd();
161
+ i0.ɵɵelementContainerEnd();
162
+ } if (rf & 2) {
163
+ i0.ɵɵadvance();
164
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(1, _c14));
165
+ } }
166
+ function TableComponent_div_7_div_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
167
+ i0.ɵɵelementContainerStart(0);
168
+ i0.ɵɵelementStart(1, "div", 36);
169
+ i0.ɵɵtext(2, " No Data Available... ");
170
+ i0.ɵɵelementEnd();
171
+ i0.ɵɵelementContainerEnd();
172
+ } if (rf & 2) {
173
+ i0.ɵɵadvance();
174
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(1, _c14));
175
+ } }
176
+ function TableComponent_div_7_div_3_ng_container_3_Template(rf, ctx) { if (rf & 1) {
177
+ i0.ɵɵelementContainerStart(0);
178
+ i0.ɵɵelement(1, "sub-table", 37);
179
+ i0.ɵɵelementContainerEnd();
180
+ } if (rf & 2) {
181
+ const ctx_r1 = i0.ɵɵnextContext(3);
182
+ i0.ɵɵadvance();
183
+ i0.ɵɵproperty("config", ctx_r1.subTableconfig)("tableData", ctx_r1.subTableData);
184
+ } }
185
+ function TableComponent_div_7_div_3_Template(rf, ctx) { if (rf & 1) {
186
+ i0.ɵɵelementStart(0, "div", 35);
187
+ i0.ɵɵtemplate(1, TableComponent_div_7_div_3_ng_container_1_Template, 3, 2, "ng-container", 16)(2, TableComponent_div_7_div_3_ng_container_2_Template, 3, 2, "ng-container", 16)(3, TableComponent_div_7_div_3_ng_container_3_Template, 2, 2, "ng-container", 16);
188
+ i0.ɵɵelementEnd();
189
+ } if (rf & 2) {
190
+ const ctx_r1 = i0.ɵɵnextContext(2);
191
+ i0.ɵɵadvance();
192
+ i0.ɵɵproperty("ngIf", ctx_r1.subTableDataLoading);
193
+ i0.ɵɵadvance();
194
+ i0.ɵɵproperty("ngIf", !ctx_r1.subTableDataLoading && ctx_r1.subTableData.length === 0);
195
+ i0.ɵɵadvance();
196
+ i0.ɵɵproperty("ngIf", !ctx_r1.subTableDataLoading && ctx_r1.subTableData.length > 0);
197
+ } }
198
+ function TableComponent_div_7_Template(rf, ctx) { if (rf & 1) {
199
+ const _r7 = i0.ɵɵgetCurrentView();
200
+ i0.ɵɵelementStart(0, "div", 25)(1, "div", 26);
201
+ i0.ɵɵlistener("click", function TableComponent_div_7_Template_div_click_1_listener() { const i_r8 = i0.ɵɵrestoreView(_r7).index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selectRow(i_r8)); });
202
+ i0.ɵɵtemplate(2, TableComponent_div_7_div_2_Template, 5, 15, "div", 27);
203
+ i0.ɵɵelementEnd();
204
+ i0.ɵɵtemplate(3, TableComponent_div_7_div_3_Template, 4, 3, "div", 28);
205
+ i0.ɵɵelementEnd();
206
+ } if (rf & 2) {
207
+ const row_r15 = ctx.$implicit;
208
+ const i_r8 = ctx.index;
209
+ const ctx_r1 = i0.ɵɵnextContext();
210
+ i0.ɵɵadvance();
211
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(4, _c6$1, ctx_r1.config.cellHover, i_r8 === ctx_r1.activeRowIndex))("ngStyle", i0.ɵɵpureFunction1(7, _c7$1, (ctx_r1.config == null ? null : ctx_r1.config.rowConfig == null ? null : ctx_r1.config.rowConfig.height) ? ctx_r1.config.rowConfig.height : "44px"));
212
+ i0.ɵɵadvance();
213
+ i0.ɵɵproperty("ngForOf", row_r15);
214
+ i0.ɵɵadvance();
215
+ i0.ɵɵproperty("ngIf", (ctx_r1.config == null ? null : ctx_r1.config.canExpand) && ctx_r1.expandedIndex === i_r8);
216
+ } }
217
+ function TableComponent_div_8_div_7_span_1_Template(rf, ctx) { if (rf & 1) {
218
+ const _r17 = i0.ɵɵgetCurrentView();
219
+ i0.ɵɵelementStart(0, "span", 48);
220
+ i0.ɵɵlistener("click", function TableComponent_div_8_div_7_span_1_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r17); const pageNumber_r18 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateSelectedPage(pageNumber_r18)); });
221
+ i0.ɵɵtext(1);
222
+ i0.ɵɵelementEnd();
223
+ } if (rf & 2) {
224
+ const pageNumber_r18 = i0.ɵɵnextContext().$implicit;
225
+ const ctx_r1 = i0.ɵɵnextContext(2);
226
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c15, pageNumber_r18 == (ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage)));
227
+ i0.ɵɵadvance();
228
+ i0.ɵɵtextInterpolate(pageNumber_r18);
229
+ } }
230
+ function TableComponent_div_8_div_7_span_2_Template(rf, ctx) { if (rf & 1) {
231
+ i0.ɵɵelementStart(0, "span", 49)(1, "div", 36);
232
+ i0.ɵɵelement(2, "span", 50)(3, "span", 50)(4, "span", 51);
233
+ i0.ɵɵelementEnd()();
234
+ } if (rf & 2) {
235
+ i0.ɵɵadvance();
236
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(3, _c16));
237
+ i0.ɵɵadvance();
238
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(4, _c17));
239
+ i0.ɵɵadvance();
240
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(5, _c17));
241
+ } }
242
+ function TableComponent_div_8_div_7_Template(rf, ctx) { if (rf & 1) {
243
+ i0.ɵɵelementStart(0, "div");
244
+ i0.ɵɵtemplate(1, TableComponent_div_8_div_7_span_1_Template, 2, 4, "span", 46)(2, TableComponent_div_8_div_7_span_2_Template, 5, 6, "span", 47);
245
+ i0.ɵɵelementEnd();
246
+ } if (rf & 2) {
247
+ const pageNumber_r18 = ctx.$implicit;
248
+ i0.ɵɵadvance();
249
+ i0.ɵɵproperty("ngIf", pageNumber_r18 != 0);
250
+ i0.ɵɵadvance();
251
+ i0.ɵɵproperty("ngIf", pageNumber_r18 == 0);
252
+ } }
253
+ function TableComponent_div_8_Template(rf, ctx) { if (rf & 1) {
254
+ const _r16 = i0.ɵɵgetCurrentView();
255
+ i0.ɵɵelementStart(0, "div", 38)(1, "p", 39);
256
+ i0.ɵɵtext(2);
257
+ i0.ɵɵelementEnd();
258
+ i0.ɵɵelementStart(3, "div", 40)(4, "span", 41);
259
+ i0.ɵɵlistener("click", function TableComponent_div_8_Template_span_click_4_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateSelectedPage((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) - 1)); });
260
+ i0.ɵɵnamespaceSVG();
261
+ i0.ɵɵelementStart(5, "svg", 42);
262
+ i0.ɵɵelement(6, "path", 43);
263
+ i0.ɵɵelementEnd()();
264
+ i0.ɵɵtemplate(7, TableComponent_div_8_div_7_Template, 3, 2, "div", 44);
265
+ i0.ɵɵnamespaceHTML();
266
+ i0.ɵɵelementStart(8, "span", 41);
267
+ i0.ɵɵlistener("click", function TableComponent_div_8_Template_span_click_8_listener() { i0.ɵɵrestoreView(_r16); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateSelectedPage((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) + 1)); });
268
+ i0.ɵɵnamespaceSVG();
269
+ i0.ɵɵelementStart(9, "svg", 42);
270
+ i0.ɵɵelement(10, "path", 45);
271
+ i0.ɵɵelementEnd()()()();
272
+ } if (rf & 2) {
273
+ const ctx_r1 = i0.ɵɵnextContext();
274
+ i0.ɵɵadvance(2);
275
+ i0.ɵɵtextInterpolate3(" Showing ", ((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) - 1) * ctx_r1.config.paginationConfig.rowsPerPage + 1, "-", ((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) - 1) * ctx_r1.config.paginationConfig.rowsPerPage + ctx_r1.tableLength, " of ", ctx_r1.config.paginationConfig.totalNoOfRows, " items ");
276
+ i0.ɵɵadvance(5);
277
+ i0.ɵɵproperty("ngForOf", ctx_r1.pages);
278
+ } }
279
+ class TableComponent {
280
+ constructor(renderer) {
281
+ this.renderer = renderer;
282
+ // Initialize with -1 to indicate no row is colored at the beginning
283
+ this.activeRowIndex = 0;
284
+ // Filter related variables
285
+ this.showFilter = false;
286
+ this.filterName = "";
287
+ this.filterData = [];
288
+ this.filterContainerStyles = {};
289
+ this.appliedFilters = {};
290
+ this.filtersUpdated = new EventEmitter();
291
+ // Pagination related variables
292
+ this.pages = [];
293
+ this.pageSelected = new EventEmitter();
294
+ this.tableData = [];
295
+ this.subTableData = [];
296
+ // Sorting related properties
297
+ this.currentSort = null;
298
+ this.multiColumnSort = [];
299
+ this.sortChange = new EventEmitter();
300
+ }
301
+ // Function to handle row click
302
+ selectRow(index) {
303
+ this.activeRowIndex = index; // Set the selected index to the clicked row's index
304
+ !!this.config.rowConfig.action && this.config.rowConfig.action(index);
305
+ }
306
+ ngOnInit() {
307
+ this.tableLength = !!this.tableData ? this.tableData.length : 0;
308
+ this.initializeFilters();
309
+ if (this.config.paginationConfig) {
310
+ this.initializePagination();
311
+ }
312
+ if (this.config.canScrollHorizontally === undefined) {
313
+ this.config.canScrollHorizontally = false;
314
+ }
315
+ document.addEventListener("click", event => {
316
+ if (this.filter) {
317
+ let isCheckBoxClicked = true;
318
+ let targetElement = event.target;
319
+ if (targetElement.className === "checkmark") {
320
+ isCheckBoxClicked = true;
321
+ this.showFilter = true;
322
+ }
323
+ let isClickInsideElement = this.filter.container.nativeElement.contains(event.target);
324
+ if (!isClickInsideElement && !isCheckBoxClicked) {
325
+ this.toggleFilter(this.filterName);
326
+ }
327
+ }
328
+ });
329
+ }
330
+ ngAfterViewInit() {
331
+ if (this.config.paginationConfig) {
332
+ let height = this.config.height;
333
+ this.renderer.setStyle(this.table.nativeElement, "height", height - 56 + "px");
334
+ }
335
+ }
336
+ ngOnChanges() {
337
+ this.tableLength = !!this.tableData ? this.tableData.length : 0;
338
+ this.activeRowIndex = this.config.activeRowIndex || 0;
339
+ }
340
+ // Filter related functions
341
+ initializeFilters() {
342
+ for (let colHeader of this.config?.colHeaderConfig) {
343
+ if (colHeader.filters) {
344
+ let filters = [];
345
+ for (let filter of colHeader.filters) {
346
+ if (filter.checked) {
347
+ filters.push({
348
+ name: filter.name,
349
+ value: filter.value
350
+ });
351
+ }
352
+ }
353
+ if (filters.length > 0)
354
+ this.appliedFilters[colHeader.data] = filters;
355
+ }
356
+ }
357
+ }
358
+ toggleFilter(filterName) {
359
+ if (!this.showFilter) {
360
+ this.filterName = filterName;
361
+ this.showFilter = true;
362
+ let offSet = 0;
363
+ let colHeadersReversed = this.colHeaders.toArray().reverse();
364
+ for (let header of colHeadersReversed) {
365
+ if (header.nativeElement.innerText === filterName)
366
+ break;
367
+ offSet += header.nativeElement.offsetWidth;
368
+ }
369
+ this.filterContainerStyles = {
370
+ top: "44px",
371
+ right: offSet > 0 ? offSet - 116 + "px" : "12px"
372
+ };
373
+ }
374
+ else {
375
+ this.filterName = "";
376
+ this.filterData = [];
377
+ this.showFilter = false;
378
+ }
379
+ }
380
+ updateAppliedFilters(appliedFilters) {
381
+ if (appliedFilters.length == 0) {
382
+ delete this.appliedFilters[this.filterName];
383
+ }
384
+ else {
385
+ this.appliedFilters[this.filterName] = appliedFilters;
386
+ }
387
+ this.filtersUpdated.emit({ ...this.appliedFilters });
388
+ this.toggleFilter(this.filterName);
389
+ }
390
+ // Pagination related functions
391
+ initializePagination() {
392
+ if (this.config.paginationConfig) {
393
+ let len = this.config.paginationConfig.noOfPages;
394
+ if (len <= 7) {
395
+ for (let i = 1; i <= len; i++) {
396
+ this.pages.push(i);
397
+ }
398
+ }
399
+ else {
400
+ this.pages = [1, 2, 3, 4, 0, len];
401
+ }
402
+ }
403
+ }
404
+ updateSelectedPage(pageNumber) {
405
+ if (pageNumber < 1 || pageNumber > this.config.paginationConfig.noOfPages)
406
+ return;
407
+ this.config.paginationConfig.selectedPage = pageNumber;
408
+ let len = this.config.paginationConfig.noOfPages;
409
+ if (len > 7) {
410
+ if (pageNumber - 2 <= 1) {
411
+ this.pages = [1, 2, 3, 4, 0, len];
412
+ }
413
+ else if (pageNumber - 2 > 1 && pageNumber + 2 < len) {
414
+ this.pages = [1, 0, pageNumber - 1, pageNumber, pageNumber + 1, 0, len];
415
+ }
416
+ else if (pageNumber + 2 >= len) {
417
+ this.pages = [1, 0, len - 3, len - 2, len - 1, len];
418
+ }
419
+ }
420
+ this.pageSelected.emit(this.config.paginationConfig?.selectedPage);
421
+ }
422
+ // Main container related functions
423
+ getContainerHeight() {
424
+ if (this.config?.height)
425
+ return this.config.height;
426
+ else
427
+ return "";
428
+ }
429
+ getContainerWidth() {
430
+ if (this.config?.width)
431
+ return this.config.width;
432
+ else
433
+ return "";
434
+ }
435
+ // Column Headers related functions
436
+ getColHeadersRowStyles() {
437
+ const { colHeadersRowConfig } = this.config;
438
+ const minHeight = colHeadersRowConfig?.height || "44px";
439
+ const borderTop = colHeadersRowConfig?.style?.borderTop || "";
440
+ const borderBottom = colHeadersRowConfig?.style?.borderBottom || "1px solid #E0E0E0";
441
+ const backgroundColor = colHeadersRowConfig?.style?.backgroundColor || "#FFFFFF";
442
+ const fontSize = colHeadersRowConfig?.style?.fontSize || "14px";
443
+ return {
444
+ 'min-height': minHeight,
445
+ 'border-top': borderTop,
446
+ 'border-bottom': borderBottom,
447
+ 'background-color': backgroundColor,
448
+ 'font-size': fontSize
449
+ };
450
+ }
451
+ onSortChange(sortState) {
452
+ this.currentSort = sortState;
453
+ if (this.config.multiColumnSort) {
454
+ const index = this.multiColumnSort.findIndex(sort => sort.column === sortState.column);
455
+ if (index !== -1) {
456
+ if (sortState.direction === null) {
457
+ this.multiColumnSort.splice(index, 1);
458
+ }
459
+ else {
460
+ this.multiColumnSort[index] = sortState;
461
+ }
462
+ }
463
+ else if (sortState.direction !== null) {
464
+ this.multiColumnSort.push(sortState);
465
+ }
466
+ }
467
+ this.sortChange.emit(sortState);
468
+ }
469
+ onActionClick(event) {
470
+ // this.actionClick.emit(event);
471
+ console.log("EVENT:", event);
472
+ }
473
+ getActionsCellStyle(style) {
474
+ if (!style)
475
+ return {};
476
+ // Create a copy of the style object without width
477
+ const { width, ...restStyle } = style;
478
+ return restStyle;
479
+ }
480
+ static { this.ɵfac = function TableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TableComponent)(i0.ɵɵdirectiveInject(i0.Renderer2)); }; }
481
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableComponent, selectors: [["mis-table"]], viewQuery: function TableComponent_Query(rf, ctx) { if (rf & 1) {
482
+ i0.ɵɵviewQuery(_c0$3, 5);
483
+ i0.ɵɵviewQuery(_c1$3, 5);
484
+ i0.ɵɵviewQuery(_c2$2, 5);
485
+ } if (rf & 2) {
486
+ let _t;
487
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filter = _t.first);
488
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.table = _t.first);
489
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.colHeaders = _t);
490
+ } }, inputs: { config: [0, "tableConfig", "config"], subTableconfig: "subTableconfig", tableDataLoading: "tableDataLoading", expandedIndex: "expandedIndex", tableData: "tableData", subTableData: "subTableData", subTableDataLoading: "subTableDataLoading" }, outputs: { filtersUpdated: "filtersUpdated", pageSelected: "pageSelected", sortChange: "sortChange" }, features: [i0.ɵɵNgOnChangesFeature], decls: 9, vars: 15, consts: [["table", ""], ["filter", ""], ["colHeaderRef", ""], ["id", "main-container", 3, "ngStyle"], [3, "containerStyles", "filtersData", "filtersApplied", 4, "ngIf"], ["id", "table-container", 3, "ngClass"], ["id", "col-headers-container", 3, "ngStyle"], ["class", "col-header", 3, "ngStyle", "click", 4, "ngFor", "ngForOf"], ["id", "data-container"], ["class", "row-wrapper", 4, "ngFor", "ngForOf"], ["id", "pagination-container", 4, "ngIf"], [3, "filtersApplied", "containerStyles", "filtersData"], [1, "col-header", 3, "click", "ngStyle"], ["class", "col-header-text", 4, "ngIf"], ["class", "filter-icon", 3, "click", 4, "ngIf"], ["appSortIcons", "", "class", "sort-icon", 3, "column", "activeSort", "activeSorts", "multiColumnSort", "sortChange", 4, "ngIf"], [4, "ngIf"], [1, "col-header-text"], [1, "filter-icon", 3, "click"], ["id", "filter-active", 4, "ngIf"], ["fill", "none", "height", "10", "viewBox", "0 0 13 10", "width", "13", "xmlns", "http://www.w3.org/2000/svg"], ["clip-rule", "evenodd", "d", "M4.97546 10H7.64213V8H4.97546V10ZM0.308472 0V2H12.3085V0H0.308472ZM2.30847 6H10.3085V4H2.30847V6Z", "fill", "#181F33", "fill-rule", "evenodd"], ["id", "filter-active"], ["appSortIcons", "", 1, "sort-icon", 3, "sortChange", "column", "activeSort", "activeSorts", "multiColumnSort"], ["customTableCell", "", 3, "customComponent", "data"], [1, "row-wrapper"], [1, "t-row", 3, "click", "ngClass", "ngStyle"], ["class", "t-col-container", 3, "ngStyle", "ngClass", "click", 4, "ngFor", "ngForOf"], ["class", "sub-row", 4, "ngIf"], [1, "t-col-container", 3, "click", "ngStyle", "ngClass"], [1, "t-col", 3, "ngStyle"], ["class", "t-col-text", 3, "ngStyle", "ngClass", 4, "ngIf"], [3, "data", "actionItems", "actionType", "dropdownIcon", "style", "submenuAlign", "actionClick", 4, "ngIf"], [1, "t-col-text", 3, "ngStyle", "ngClass"], [3, "actionClick", "data", "actionItems", "actionType", "dropdownIcon", "submenuAlign"], [1, "sub-row"], [3, "ngStyle"], [3, "config", "tableData"], ["id", "pagination-container"], ["id", "pagination-text"], ["id", "pages-container"], [1, "page", 3, "click"], ["fill", "none", "height", "10", "viewBox", "0 0 7 10", "width", "7", "xmlns", "http://www.w3.org/2000/svg"], ["clip-rule", "evenodd", "d", "M0.857405 5.56295C0.855794 5.56139 0.854188 5.55982 0.852588 5.55824C0.695955 5.40408 0.617641 5.20203 0.617647 4.99998C0.617641 4.79793 0.695955 4.59588 0.852588 4.44172C0.854188 4.44014 0.855794 4.43858 0.857404 4.43702L5.13066 0.231231C5.44392 -0.0770771 5.9518 -0.0770771 6.26506 0.231231C6.57831 0.53954 6.57831 1.03941 6.26506 1.34772L2.5542 4.99998L6.26506 8.65225C6.57831 8.96055 6.57831 9.46042 6.26506 9.76873C5.9518 10.077 5.44392 10.077 5.13066 9.76873L0.857405 5.56295Z", "fill", "#181F33", "fill-rule", "evenodd"], [4, "ngFor", "ngForOf"], ["clip-rule", "evenodd", "d", "M6.1426 5.56295C6.14421 5.56139 6.14581 5.55982 6.14741 5.55824C6.30405 5.40408 6.38236 5.20203 6.38236 4.99998C6.38236 4.79793 6.30405 4.59588 6.14741 4.44172C6.14581 4.44014 6.14421 4.43858 6.1426 4.43702L1.86934 0.231231C1.55608 -0.0770771 1.0482 -0.0770771 0.734942 0.231231C0.421688 0.53954 0.421688 1.03941 0.734942 1.34772L4.4458 4.99998L0.734941 8.65225C0.421686 8.96055 0.421686 9.46042 0.734941 9.76873C1.0482 10.077 1.55608 10.077 1.86934 9.76873L6.1426 5.56295Z", "fill", "#181F33", "fill-rule", "evenodd"], ["class", "page", 3, "ngClass", "click", 4, "ngIf"], ["class", "page-seperator", 4, "ngIf"], [1, "page", 3, "click", "ngClass"], [1, "page-seperator"], [1, "dot", 3, "ngStyle"], [1, "dot"]], template: function TableComponent_Template(rf, ctx) { if (rf & 1) {
491
+ i0.ɵɵelementStart(0, "div", 3);
492
+ i0.ɵɵtemplate(1, TableComponent_mis_table_filter_1_Template, 2, 2, "mis-table-filter", 4);
493
+ i0.ɵɵelementStart(2, "div", 5, 0)(4, "div", 6);
494
+ i0.ɵɵtemplate(5, TableComponent_div_5_Template, 6, 9, "div", 7);
495
+ i0.ɵɵelementEnd();
496
+ i0.ɵɵelementStart(6, "div", 8);
497
+ i0.ɵɵtemplate(7, TableComponent_div_7_Template, 4, 9, "div", 9);
498
+ i0.ɵɵelementEnd()();
499
+ i0.ɵɵtemplate(8, TableComponent_div_8_Template, 11, 4, "div", 10);
500
+ i0.ɵɵelementEnd();
501
+ } if (rf & 2) {
502
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(7, _c3$1, ctx.getContainerHeight(), ctx.getContainerWidth(), ctx.config.canScrollHorizontally ? "auto" : "unset"));
503
+ i0.ɵɵadvance();
504
+ i0.ɵɵproperty("ngIf", ctx.showFilter);
505
+ i0.ɵɵadvance();
506
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(11, _c4$1, ctx.expandedIndex < 0, !(ctx.expandedIndex < 0), ctx.config.canScrollHorizontally));
507
+ i0.ɵɵadvance(2);
508
+ i0.ɵɵproperty("ngStyle", ctx.getColHeadersRowStyles());
509
+ i0.ɵɵadvance();
510
+ i0.ɵɵproperty("ngForOf", ctx.config == null ? null : ctx.config.colHeaderConfig);
511
+ i0.ɵɵadvance(2);
512
+ i0.ɵɵproperty("ngForOf", ctx.tableData);
513
+ i0.ɵɵadvance();
514
+ i0.ɵɵproperty("ngIf", (ctx.config == null ? null : ctx.config.paginationConfig) && (ctx.tableLength >= ctx.config.paginationConfig.rowsPerPage || (ctx.config.paginationConfig == null ? null : ctx.config.paginationConfig.selectedPage) !== 1));
515
+ } }, styles: ["#main-container[_ngcontent-%COMP%]{font-family:Lato,sans-serif;position:relative}.no-scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:0}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container[_ngcontent-%COMP%]{height:inherit;overflow-y:auto}.scroll-horizontally[_ngcontent-%COMP%]{height:inherit;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container[_ngcontent-%COMP%]{display:flex;align-items:center;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header[_ngcontent-%COMP%]{padding:0 16px;display:flex;align-items:center;height:100%}.col-header-text[_ngcontent-%COMP%]{font-style:normal;font-weight:700;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.sort-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.filter-icon[_ngcontent-%COMP%]{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active[_ngcontent-%COMP%]{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row[_ngcontent-%COMP%]{height:auto;border-bottom:none}.loader[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#0937b2}.t-row[_ngcontent-%COMP%]{display:flex;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row[_ngcontent-%COMP%]:hover{background-color:#e7eefd}.active-row[_ngcontent-%COMP%]{background-color:#e6f6fd}.t-col-container[_ngcontent-%COMP%]{padding:0 16px;overflow-wrap:anywhere}.t-row-hover[_ngcontent-%COMP%]:hover{background-color:#0000}.t-col-container-hover[_ngcontent-%COMP%]:hover{background-color:#e6ebf7}.t-col-container-hover[_ngcontent-%COMP%]:first-child{border-left:1px solid #e0e0e0}.t-col-container-hover[_ngcontent-%COMP%]{border-right:1px solid #e0e0e0}.t-col[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%}.t-col-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.text-ellipsis[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}#pagination-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container[_ngcontent-%COMP%]{display:flex;margin-right:32px}.page[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;width:32px;height:32px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;margin-right:8px;cursor:pointer}.page-seperator[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot[_ngcontent-%COMP%]{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active[_ngcontent-%COMP%]{color:#0937b2;border:1px solid #0937b2}.sort-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;margin-left:4px;cursor:pointer}.sort-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;height:16px;transition:opacity .2s ease}.sort-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{opacity:.8}"] }); }
516
+ }
517
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableComponent, [{
518
+ type: Component,
519
+ args: [{ selector: "mis-table", template: "<div\n [ngStyle]=\"{\n height: getContainerHeight(),\n width: getContainerWidth(),\n 'overflow-x': config.canScrollHorizontally ? 'auto' : 'unset'\n }\"\n id=\"main-container\"\n>\n <mis-table-filter\n #filter\n (filtersApplied)=\"updateAppliedFilters($event)\"\n *ngIf=\"showFilter\"\n [containerStyles]=\"filterContainerStyles\"\n [filtersData]=\"filterData\"\n ></mis-table-filter>\n <div\n #table\n id=\"table-container\"\n [ngClass]=\"{ 'no-scrollbar': expandedIndex < 0, scrollbar: !(expandedIndex < 0), 'scroll-horizontally': config.canScrollHorizontally }\"\n >\n <div\n [ngStyle]=\"getColHeadersRowStyles()\"\n id=\"col-headers-container\"\n >\n <div\n #colHeaderRef\n (click)=\"colHeader?.action ? colHeader?.action(colHeader) : null\"\n *ngFor=\"let colHeader of config?.colHeaderConfig\"\n class=\"col-header\"\n [ngStyle]=\"{\n width: colHeader?.style?.width || '',\n cursor: colHeader.action ? 'pointer' : 'default',\n 'justify-content': colHeader?.style?.justifyContent\n ? colHeader?.style?.justifyContent\n : colHeader.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\"\n >\n <p *ngIf=\"colHeader?.type !== 'custom'\" class=\"col-header-text\">\n {{ colHeader?.data || \" \" }}\n </p>\n <span\n (click)=\"filterData = colHeader.filters; toggleFilter(colHeader.data); $event.stopPropagation()\"\n *ngIf=\"colHeader?.type !== 'custom' && colHeader?.filters && colHeader?.filters?.length > 0\"\n class=\"filter-icon\"\n >\n <span *ngIf=\"appliedFilters[colHeader.data]?.length > 0\" id=\"filter-active\"></span>\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 13 10\" width=\"13\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M4.97546 10H7.64213V8H4.97546V10ZM0.308472 0V2H12.3085V0H0.308472ZM2.30847 6H10.3085V4H2.30847V6Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <span *ngIf=\"colHeader?.isSortable && !colHeader?.filters\" appSortIcons\n [column]=\"colHeader\"\n [activeSort]=\"currentSort\"\n [activeSorts]=\"multiColumnSort\"\n [multiColumnSort]=\"config.multiColumnSort\"\n (sortChange)=\"onSortChange($event)\"\n class=\"sort-icon\">\n </span>\n <ng-template *ngIf=\"colHeader?.type === 'custom'\" customTableCell [customComponent]=\"colHeader?.componentRef\" [data]=\"colHeader.data\"></ng-template>\n </div>\n </div>\n <div id=\"data-container\">\n <div class=\"row-wrapper\" *ngFor=\"let row of tableData; let i = index\">\n <div\n class=\"t-row\"\n [ngClass]=\"{ 't-row-hover': config.cellHover, 'active-row': i === activeRowIndex }\"\n [ngStyle]=\"{ 'min-height': config?.rowConfig?.height ? config.rowConfig.height : '44px' }\"\n (click)=\"selectRow(i)\"\n >\n <div\n (click)=\"config?.colConfig[i]?.action ? config?.colConfig[i]?.action(col) : null\"\n *ngFor=\"let col of row; let i = index\"\n [ngStyle]=\"{\n width: config?.colConfig[i]?.style?.width || config?.colHeaderConfig[i]?.style?.width || ''\n }\"\n class=\"t-col-container\"\n [ngClass]=\"{ 't-col-container-hover': config.cellHover }\"\n >\n <div\n class=\"t-col\"\n [style]=\"config.colConfig[i]?.style\"\n [ngStyle]=\"{\n width: '100%',\n cursor: config.colConfig[i]?.action ? 'pointer' : 'default',\n 'justify-content': config.colConfig[i]?.style?.justifyContent\n ? config.colConfig[i]?.style?.justifyContent\n : config.colConfig[i]?.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\"\n >\n <p\n *ngIf=\"config.colConfig[i]?.type !== 'custom' && config.colConfig[i]?.type !== 'actions'\"\n [ngStyle]=\"{\n color: config?.colConfig[i]?.style?.color ? config?.colConfig[i]?.style?.color : ''\n }\"\n [ngClass]=\"{'text-ellipsis': !!config?.colConfig[i]?.style?.textEllipsis}\"\n class=\"t-col-text\"\n >\n {{ col }}\n </p>\n <ng-template\n *ngIf=\"config.colConfig[i]?.type === 'custom'\"\n [customComponent]=\"config.colConfig[i].componentRef\"\n [data]=\"col\"\n customTableCell\n ></ng-template>\n <!-- <ng-template > -->\n <mis-actions-cell\n *ngIf=\"config.colConfig[i]?.type === 'actions'\"\n [data]=\"col\"\n [actionItems]=\"config.colConfig[i]?.actionItems || []\"\n [actionType]=\"config.colConfig[i]?.actionType || 'inline'\"\n [dropdownIcon]=\"config.colConfig[i]?.dropdownIcon || ''\"\n [style]=\"getActionsCellStyle(config.colConfig[i]?.style)\"\n (actionClick)=\"onActionClick($event)\"\n [submenuAlign]=\"config.colConfig[i]?.submenuAlign || 'left'\"\n ></mis-actions-cell>\n <!-- </ng-template> -->\n </div>\n </div>\n </div>\n <div *ngIf=\"config?.canExpand && expandedIndex === i\" class=\"sub-row\">\n <ng-container *ngIf=\"subTableDataLoading\">\n <div [ngStyle]=\"{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: '16px'\n }\">\n Loading...\n </div>\n </ng-container>\n \n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length === 0\">\n <div [ngStyle]=\"{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: '16px'\n }\">\n No Data Available...\n </div>\n </ng-container>\n \n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length > 0\">\n <sub-table [config]=\"subTableconfig\" [tableData]=\"subTableData\"></sub-table>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"config?.paginationConfig && (tableLength >= config.paginationConfig.rowsPerPage || config.paginationConfig?.selectedPage !== 1)\"\n id=\"pagination-container\"\n >\n <p id=\"pagination-text\">\n Showing\n {{ (config.paginationConfig?.selectedPage - 1) * config.paginationConfig.rowsPerPage + 1 }}-{{\n (config.paginationConfig?.selectedPage - 1) * config.paginationConfig.rowsPerPage + tableLength\n }}\n of {{ config.paginationConfig.totalNoOfRows }} items\n </p>\n <div id=\"pages-container\">\n <span (click)=\"updateSelectedPage(config.paginationConfig?.selectedPage - 1)\" class=\"page\">\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 7 10\" width=\"7\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M0.857405 5.56295C0.855794 5.56139 0.854188 5.55982 0.852588 5.55824C0.695955 5.40408 0.617641 5.20203 0.617647 4.99998C0.617641 4.79793 0.695955 4.59588 0.852588 4.44172C0.854188 4.44014 0.855794 4.43858 0.857404 4.43702L5.13066 0.231231C5.44392 -0.0770771 5.9518 -0.0770771 6.26506 0.231231C6.57831 0.53954 6.57831 1.03941 6.26506 1.34772L2.5542 4.99998L6.26506 8.65225C6.57831 8.96055 6.57831 9.46042 6.26506 9.76873C5.9518 10.077 5.44392 10.077 5.13066 9.76873L0.857405 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <div *ngFor=\"let pageNumber of pages\">\n <span\n (click)=\"updateSelectedPage(pageNumber)\"\n *ngIf=\"pageNumber != 0\"\n [ngClass]=\"{ 'page-active': pageNumber == config.paginationConfig?.selectedPage }\"\n class=\"page\"\n >{{ pageNumber }}</span\n >\n <span *ngIf=\"pageNumber == 0\" class=\"page-seperator\">\n <div [ngStyle]=\"{ display: 'flex' }\">\n <span class=\"dot\" [ngStyle]=\"{ 'margin-right': '4px' }\"></span>\n <span class=\"dot\" [ngStyle]=\"{ 'margin-right': '4px' }\"></span>\n <span class=\"dot\"></span>\n </div> \n </span>\n </div>\n <span (click)=\"updateSelectedPage(config.paginationConfig?.selectedPage + 1)\" class=\"page\">\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 7 10\" width=\"7\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M6.1426 5.56295C6.14421 5.56139 6.14581 5.55982 6.14741 5.55824C6.30405 5.40408 6.38236 5.20203 6.38236 4.99998C6.38236 4.79793 6.30405 4.59588 6.14741 4.44172C6.14581 4.44014 6.14421 4.43858 6.1426 4.43702L1.86934 0.231231C1.55608 -0.0770771 1.0482 -0.0770771 0.734942 0.231231C0.421688 0.53954 0.421688 1.03941 0.734942 1.34772L4.4458 4.99998L0.734941 8.65225C0.421686 8.96055 0.421686 9.46042 0.734941 9.76873C1.0482 10.077 1.55608 10.077 1.86934 9.76873L6.1426 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n </div>\n </div>\n</div>\n", styles: ["#main-container{font-family:Lato,sans-serif;position:relative}.no-scrollbar::-webkit-scrollbar{width:0}.scrollbar::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container{height:inherit;overflow-y:auto}.scroll-horizontally{height:inherit;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container{display:flex;align-items:center;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header{padding:0 16px;display:flex;align-items:center;height:100%}.col-header-text{font-style:normal;font-weight:700;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.sort-icon{display:flex;justify-content:center;align-items:center}.filter-icon{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row{height:auto;border-bottom:none}.loader ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#0937b2}.t-row{display:flex;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row:hover{background-color:#e7eefd}.active-row{background-color:#e6f6fd}.t-col-container{padding:0 16px;overflow-wrap:anywhere}.t-row-hover:hover{background-color:#0000}.t-col-container-hover:hover{background-color:#e6ebf7}.t-col-container-hover:first-child{border-left:1px solid #e0e0e0}.t-col-container-hover{border-right:1px solid #e0e0e0}.t-col{display:flex;align-items:center;height:100%}.t-col-text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}#pagination-container{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container{display:flex;margin-right:32px}.page{display:flex;justify-content:center;align-items:center;border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;width:32px;height:32px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;margin-right:8px;cursor:pointer}.page-seperator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active{color:#0937b2;border:1px solid #0937b2}.sort-icon{display:inline-flex;align-items:center;margin-left:4px;cursor:pointer}.sort-icon img{width:16px;height:16px;transition:opacity .2s ease}.sort-icon img:hover{opacity:.8}\n"] }]
520
+ }], () => [{ type: i0.Renderer2 }], { filtersUpdated: [{
521
+ type: Output
522
+ }], filter: [{
523
+ type: ViewChild,
524
+ args: ["filter"]
525
+ }], colHeaders: [{
526
+ type: ViewChildren,
527
+ args: ["colHeaderRef"]
528
+ }], pageSelected: [{
529
+ type: Output
530
+ }], config: [{
531
+ type: Input,
532
+ args: ["tableConfig"]
533
+ }], subTableconfig: [{
534
+ type: Input
535
+ }], tableDataLoading: [{
536
+ type: Input
537
+ }], expandedIndex: [{
538
+ type: Input
539
+ }], tableData: [{
540
+ type: Input
541
+ }], subTableData: [{
542
+ type: Input
543
+ }], subTableDataLoading: [{
544
+ type: Input
545
+ }], table: [{
546
+ type: ViewChild,
547
+ args: ["table"]
548
+ }], sortChange: [{
549
+ type: Output
550
+ }] }); })();
551
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TableComponent, { className: "TableComponent" }); })();
552
+
10
553
  class CustomTableCellDirective {
11
554
  set customComponent(value) {
12
555
  this.component = value;
@@ -49,12 +592,12 @@ class CustomTableCellDirective {
49
592
 
50
593
  const _c0$2 = ["table"];
51
594
  const _c1$2 = (a0, a1) => ({ height: a0, width: a1 });
52
- const _c2$2 = (a0, a1, a2) => ({ height: a0, "border-top": a1, "border-bottom": a2 });
53
- const _c3$1 = (a0, a1, a2) => ({ width: a0, cursor: a1, "justify-content": a2 });
54
- const _c4$1 = a0 => ({ backgroundColor: a0 });
55
- const _c5$1 = a0 => ({ width: a0 });
56
- const _c6$1 = (a0, a1) => ({ width: "100%", cursor: a0, "justify-content": a1 });
57
- const _c7$1 = a0 => ({ color: a0 });
595
+ const _c2$1 = (a0, a1, a2) => ({ height: a0, "border-top": a1, "border-bottom": a2 });
596
+ const _c3 = (a0, a1, a2) => ({ width: a0, cursor: a1, "justify-content": a2 });
597
+ const _c4 = a0 => ({ backgroundColor: a0 });
598
+ const _c5 = a0 => ({ width: a0 });
599
+ const _c6 = (a0, a1) => ({ width: "100%", cursor: a0, "justify-content": a1 });
600
+ const _c7 = a0 => ({ color: a0 });
58
601
  function SubTableComponent_div_3_div_1_p_1_Template(rf, ctx) { if (rf & 1) {
59
602
  i0.ɵɵelementStart(0, "p", 11);
60
603
  i0.ɵɵtext(1);
@@ -80,7 +623,7 @@ function SubTableComponent_div_3_div_1_Template(rf, ctx) { if (rf & 1) {
80
623
  } if (rf & 2) {
81
624
  const colHeader_r2 = ctx.$implicit;
82
625
  i0.ɵɵstyleMap(colHeader_r2 == null ? null : colHeader_r2.style);
83
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(5, _c3$1, (colHeader_r2 == null ? null : colHeader_r2.style == null ? null : colHeader_r2.style.width) || "", colHeader_r2.action ? "pointer" : "default", (colHeader_r2 == null ? null : colHeader_r2.style == null ? null : colHeader_r2.style.justifyContent) ? colHeader_r2 == null ? null : colHeader_r2.style == null ? null : colHeader_r2.style.justifyContent : colHeader_r2.type === "number" ? "flex-end" : "space-between"));
626
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(5, _c3, (colHeader_r2 == null ? null : colHeader_r2.style == null ? null : colHeader_r2.style.width) || "", colHeader_r2.action ? "pointer" : "default", (colHeader_r2 == null ? null : colHeader_r2.style == null ? null : colHeader_r2.style.justifyContent) ? colHeader_r2 == null ? null : colHeader_r2.style == null ? null : colHeader_r2.style.justifyContent : colHeader_r2.type === "number" ? "flex-end" : "space-between"));
84
627
  i0.ɵɵadvance();
85
628
  i0.ɵɵproperty("ngIf", (colHeader_r2 == null ? null : colHeader_r2.type) !== "custom");
86
629
  i0.ɵɵadvance();
@@ -92,7 +635,7 @@ function SubTableComponent_div_3_Template(rf, ctx) { if (rf & 1) {
92
635
  i0.ɵɵelementEnd();
93
636
  } if (rf & 2) {
94
637
  const ctx_r2 = i0.ɵɵnextContext();
95
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(2, _c2$2, ctx_r2.getColHeadersRowHeight(), ctx_r2.getColHeadersRowBorderTop(), ctx_r2.getColHeadersRowBorderBottom()));
638
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(2, _c2$1, ctx_r2.getColHeadersRowHeight(), ctx_r2.getColHeadersRowBorderTop(), ctx_r2.getColHeadersRowBorderBottom()));
96
639
  i0.ɵɵadvance();
97
640
  i0.ɵɵproperty("ngForOf", ctx_r2.config == null ? null : ctx_r2.config.colHeaderConfig);
98
641
  } }
@@ -105,7 +648,7 @@ function SubTableComponent_div_6_div_2_p_2_Template(rf, ctx) { if (rf & 1) {
105
648
  const col_r6 = ctx_r7.$implicit;
106
649
  const i_r7 = ctx_r7.index;
107
650
  const ctx_r2 = i0.ɵɵnextContext(2);
108
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c7$1, (ctx_r2.config == null ? null : ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.color) ? ctx_r2.config == null ? null : ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.color : ""));
651
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c7, (ctx_r2.config == null ? null : ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.color) ? ctx_r2.config == null ? null : ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.color : ""));
109
652
  i0.ɵɵadvance();
110
653
  i0.ɵɵtextInterpolate1(" ", col_r6, " ");
111
654
  } }
@@ -129,10 +672,10 @@ function SubTableComponent_div_6_div_2_Template(rf, ctx) { if (rf & 1) {
129
672
  } if (rf & 2) {
130
673
  const i_r7 = ctx.index;
131
674
  const ctx_r2 = i0.ɵɵnextContext(2);
132
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(6, _c5$1, (ctx_r2.config == null ? null : ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.width) || (ctx_r2.config == null ? null : ctx_r2.config.colHeaderConfig[i_r7] == null ? null : ctx_r2.config.colHeaderConfig[i_r7].style == null ? null : ctx_r2.config.colHeaderConfig[i_r7].style.width) || ""));
675
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(6, _c5, (ctx_r2.config == null ? null : ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.width) || (ctx_r2.config == null ? null : ctx_r2.config.colHeaderConfig[i_r7] == null ? null : ctx_r2.config.colHeaderConfig[i_r7].style == null ? null : ctx_r2.config.colHeaderConfig[i_r7].style.width) || ""));
133
676
  i0.ɵɵadvance();
134
677
  i0.ɵɵstyleMap(ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style);
135
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction2(8, _c6$1, ctx_r2.config.colConfig[i_r7].action ? "pointer" : "default", (ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.justifyContent) ? ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.justifyContent : ctx_r2.config.colConfig[i_r7].type === "number" ? "flex-end" : "space-between"));
678
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction2(8, _c6, ctx_r2.config.colConfig[i_r7].action ? "pointer" : "default", (ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.justifyContent) ? ctx_r2.config.colConfig[i_r7] == null ? null : ctx_r2.config.colConfig[i_r7].style == null ? null : ctx_r2.config.colConfig[i_r7].style.justifyContent : ctx_r2.config.colConfig[i_r7].type === "number" ? "flex-end" : "space-between"));
136
679
  i0.ɵɵadvance();
137
680
  i0.ɵɵproperty("ngIf", ctx_r2.config.colConfig[i_r7].type !== "custom");
138
681
  i0.ɵɵadvance();
@@ -145,7 +688,7 @@ function SubTableComponent_div_6_Template(rf, ctx) { if (rf & 1) {
145
688
  } if (rf & 2) {
146
689
  const row_r9 = ctx.$implicit;
147
690
  const i_r10 = ctx.index;
148
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c4$1, i_r10 % 2 === 0 ? "#FAFAFA" : null));
691
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(2, _c4, i_r10 % 2 === 0 ? "#FAFAFA" : null));
149
692
  i0.ɵɵadvance(2);
150
693
  i0.ɵɵproperty("ngForOf", row_r9);
151
694
  } }
@@ -236,7 +779,7 @@ class SubTableComponent {
236
779
 
237
780
  const _c0$1 = ["mainContainer"];
238
781
  const _c1$1 = () => ({ "margin": "16px 0px" });
239
- const _c2$1 = () => ({ "margin-right": "8px" });
782
+ const _c2 = () => ({ "margin-right": "8px" });
240
783
  function TableFilterComponent_div_8_Template(rf, ctx) { if (rf & 1) {
241
784
  const _r2 = i0.ɵɵgetCurrentView();
242
785
  i0.ɵɵelementStart(0, "div")(1, "div", 15)(2, "mis-checkbox", 16);
@@ -389,7 +932,7 @@ class TableFilterComponent {
389
932
  i0.ɵɵadvance();
390
933
  i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(7, _c1$1));
391
934
  i0.ɵɵadvance(2);
392
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(8, _c2$1));
935
+ i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(8, _c2));
393
936
  } }, dependencies: [i1.NgForOf, i1.NgIf, i1.NgStyle, i2$1.CheckboxComponent], styles: ["#main-container[_ngcontent-%COMP%]{position:absolute;background:#fff;z-index:2;right:calc(50% - 128px);width:256px;padding:16px;font-family:Lato,sans-serif;box-shadow:0 12px 24px #0000001f,0 4px 8px #0000001f;border-radius:8px}[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#9aa7b4}#search-bar-container[_ngcontent-%COMP%]{width:100%;position:relative;margin-bottom:8px}input[_ngcontent-%COMP%]{width:100%;padding:12px 12px 12px 42px;border:solid 1px black;border-radius:4px;height:48px;box-shadow:none;outline:none;font-style:normal;font-weight:400;font-size:15px;line-height:20px;letter-spacing:.1px;color:#181f33}input[_ngcontent-%COMP%]:focus{border:solid 1px #0937b2}#search-icon[_ngcontent-%COMP%]{position:absolute;top:15px;left:12px}.filters-sub-container[_ngcontent-%COMP%]{max-height:144px;overflow-y:auto}.filter[_ngcontent-%COMP%]{height:36px;display:flex;justify-content:flex-start;align-items:center}.filter-text[_ngcontent-%COMP%]{font-size:14px;line-height:20px;padding-left:8px;letter-spacing:.2px;color:#181f33;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#no-results-container[_ngcontent-%COMP%]{height:36px;display:flex;justify-content:center;align-items:center}.separator[_ngcontent-%COMP%]{border:1px solid #e0e0e0}#buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}button[_ngcontent-%COMP%]{width:calc(50% - 4px);border:none;box-shadow:none;outline:none;font-size:16px;line-height:24px;text-align:center;letter-spacing:.2px;padding:10px 30px;background:none;border-radius:8px}#apply-btn[_ngcontent-%COMP%]{background:#0937b2;color:#fff}#reset-btn[_ngcontent-%COMP%]{background:#fff;color:#0937b2}"] }); }
394
937
  }
395
938
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableFilterComponent, [{
@@ -544,521 +1087,293 @@ class SortIconsDirective {
544
1087
  }]
545
1088
  }], () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], null); })();
546
1089
 
547
- const _c0 = ["filter"];
548
- const _c1 = ["table"];
549
- const _c2 = ["colHeaderRef"];
550
- const _c3 = (a0, a1, a2) => ({ height: a0, width: a1, "overflow-x": a2 });
551
- const _c4 = (a0, a1, a2) => ({ "no-scrollbar": a0, scrollbar: a1, "scroll-horizontally": a2 });
552
- const _c5 = (a0, a1, a2) => ({ width: a0, cursor: a1, "justify-content": a2 });
553
- const _c6 = (a0, a1) => ({ "t-row-hover": a0, "active-row": a1 });
554
- const _c7 = a0 => ({ "min-height": a0 });
555
- const _c8 = a0 => ({ width: a0 });
556
- const _c9 = a0 => ({ "t-col-container-hover": a0 });
557
- const _c10 = (a0, a1) => ({ width: "100%", cursor: a0, "justify-content": a1 });
558
- const _c11 = a0 => ({ color: a0 });
559
- const _c12 = a0 => ({ "text-ellipsis": a0 });
560
- const _c13 = () => ({ display: "flex", justifyContent: "center", alignItems: "center", padding: "16px" });
561
- const _c14 = a0 => ({ "page-active": a0 });
562
- const _c15 = () => ({ display: "flex" });
563
- const _c16 = () => ({ "margin-right": "4px" });
564
- function TableComponent_mis_table_filter_1_Template(rf, ctx) { if (rf & 1) {
565
- const _r1 = i0.ɵɵgetCurrentView();
566
- i0.ɵɵelementStart(0, "mis-table-filter", 11, 1);
567
- i0.ɵɵlistener("filtersApplied", function TableComponent_mis_table_filter_1_Template_mis_table_filter_filtersApplied_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateAppliedFilters($event)); });
568
- i0.ɵɵelementEnd();
569
- } if (rf & 2) {
570
- const ctx_r1 = i0.ɵɵnextContext();
571
- i0.ɵɵproperty("containerStyles", ctx_r1.filterContainerStyles)("filtersData", ctx_r1.filterData);
572
- } }
573
- function TableComponent_div_5_p_2_Template(rf, ctx) { if (rf & 1) {
574
- i0.ɵɵelementStart(0, "p", 17);
575
- i0.ɵɵtext(1);
576
- i0.ɵɵelementEnd();
577
- } if (rf & 2) {
578
- const colHeader_r4 = i0.ɵɵnextContext().$implicit;
579
- i0.ɵɵadvance();
580
- i0.ɵɵtextInterpolate1(" ", (colHeader_r4 == null ? null : colHeader_r4.data) || " ", " ");
581
- } }
582
- function TableComponent_div_5_span_3_span_1_Template(rf, ctx) { if (rf & 1) {
583
- i0.ɵɵelement(0, "span", 22);
584
- } }
585
- function TableComponent_div_5_span_3_Template(rf, ctx) { if (rf & 1) {
586
- const _r5 = i0.ɵɵgetCurrentView();
587
- i0.ɵɵelementStart(0, "span", 18);
588
- i0.ɵɵlistener("click", function TableComponent_div_5_span_3_Template_span_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const colHeader_r4 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.filterData = colHeader_r4.filters; ctx_r1.toggleFilter(colHeader_r4.data); return i0.ɵɵresetView($event.stopPropagation()); });
589
- i0.ɵɵtemplate(1, TableComponent_div_5_span_3_span_1_Template, 1, 0, "span", 19);
590
- i0.ɵɵnamespaceSVG();
591
- i0.ɵɵelementStart(2, "svg", 20);
592
- i0.ɵɵelement(3, "path", 21);
593
- i0.ɵɵelementEnd()();
594
- } if (rf & 2) {
595
- const colHeader_r4 = i0.ɵɵnextContext().$implicit;
596
- const ctx_r1 = i0.ɵɵnextContext();
597
- i0.ɵɵadvance();
598
- i0.ɵɵproperty("ngIf", (ctx_r1.appliedFilters[colHeader_r4.data] == null ? null : ctx_r1.appliedFilters[colHeader_r4.data].length) > 0);
599
- } }
600
- function TableComponent_div_5_span_4_Template(rf, ctx) { if (rf & 1) {
601
- const _r6 = i0.ɵɵgetCurrentView();
602
- i0.ɵɵelementStart(0, "span", 23);
603
- i0.ɵɵlistener("sortChange", function TableComponent_div_5_span_4_Template_span_sortChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onSortChange($event)); });
604
- i0.ɵɵelementEnd();
1090
+ const _c0 = a0 => ({ "disabled": a0 });
1091
+ const _c1 = (a0, a1) => ({ "left": a0, "right": a1 });
1092
+ function ActionsCellComponent_div_1_div_1_img_1_Template(rf, ctx) { if (rf & 1) {
1093
+ i0.ɵɵelement(0, "img", 9);
605
1094
  } if (rf & 2) {
606
- const colHeader_r4 = i0.ɵɵnextContext().$implicit;
607
- const ctx_r1 = i0.ɵɵnextContext();
608
- i0.ɵɵproperty("column", colHeader_r4)("activeSort", ctx_r1.currentSort)("activeSorts", ctx_r1.multiColumnSort)("multiColumnSort", ctx_r1.config.multiColumnSort);
1095
+ const item_r2 = i0.ɵɵnextContext().$implicit;
1096
+ i0.ɵɵproperty("src", item_r2.icon, i0.ɵɵsanitizeUrl)("alt", item_r2.label);
609
1097
  } }
610
- function TableComponent_div_5_5_ng_template_0_Template(rf, ctx) { }
611
- function TableComponent_div_5_5_Template(rf, ctx) { if (rf & 1) {
612
- i0.ɵɵtemplate(0, TableComponent_div_5_5_ng_template_0_Template, 0, 0, "ng-template", 24);
1098
+ function ActionsCellComponent_div_1_div_1_span_2_Template(rf, ctx) { if (rf & 1) {
1099
+ i0.ɵɵelement(0, "span", 10);
613
1100
  } if (rf & 2) {
614
- const colHeader_r4 = i0.ɵɵnextContext().$implicit;
615
- i0.ɵɵproperty("customComponent", colHeader_r4 == null ? null : colHeader_r4.componentRef)("data", colHeader_r4.data);
1101
+ const item_r2 = i0.ɵɵnextContext().$implicit;
1102
+ i0.ɵɵproperty("innerHTML", item_r2.icon, i0.ɵɵsanitizeHtml);
616
1103
  } }
617
- function TableComponent_div_5_Template(rf, ctx) { if (rf & 1) {
618
- const _r3 = i0.ɵɵgetCurrentView();
619
- i0.ɵɵelementStart(0, "div", 12, 2);
620
- i0.ɵɵlistener("click", function TableComponent_div_5_Template_div_click_0_listener() { const colHeader_r4 = i0.ɵɵrestoreView(_r3).$implicit; return i0.ɵɵresetView((colHeader_r4 == null ? null : colHeader_r4.action) ? colHeader_r4 == null ? null : colHeader_r4.action(colHeader_r4) : null); });
621
- i0.ɵɵtemplate(2, TableComponent_div_5_p_2_Template, 2, 1, "p", 13)(3, TableComponent_div_5_span_3_Template, 4, 1, "span", 14)(4, TableComponent_div_5_span_4_Template, 1, 4, "span", 15)(5, TableComponent_div_5_5_Template, 1, 2, null, 16);
1104
+ function ActionsCellComponent_div_1_div_1_Template(rf, ctx) { if (rf & 1) {
1105
+ const _r1 = i0.ɵɵgetCurrentView();
1106
+ i0.ɵɵelementStart(0, "div", 6);
1107
+ i0.ɵɵlistener("click", function ActionsCellComponent_div_1_div_1_Template_div_click_0_listener($event) { const item_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onActionClick(item_r2, $event)); });
1108
+ i0.ɵɵtemplate(1, ActionsCellComponent_div_1_div_1_img_1_Template, 1, 2, "img", 7)(2, ActionsCellComponent_div_1_div_1_span_2_Template, 1, 1, "span", 8);
622
1109
  i0.ɵɵelementEnd();
623
1110
  } if (rf & 2) {
624
- const colHeader_r4 = ctx.$implicit;
625
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(5, _c5, (colHeader_r4 == null ? null : colHeader_r4.style == null ? null : colHeader_r4.style.width) || "", colHeader_r4.action ? "pointer" : "default", (colHeader_r4 == null ? null : colHeader_r4.style == null ? null : colHeader_r4.style.justifyContent) ? colHeader_r4 == null ? null : colHeader_r4.style == null ? null : colHeader_r4.style.justifyContent : colHeader_r4.type === "number" ? "flex-end" : "space-between"));
626
- i0.ɵɵadvance(2);
627
- i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.type) !== "custom");
628
- i0.ɵɵadvance();
629
- i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.type) !== "custom" && (colHeader_r4 == null ? null : colHeader_r4.filters) && (colHeader_r4 == null ? null : colHeader_r4.filters == null ? null : colHeader_r4.filters.length) > 0);
1111
+ const item_r2 = ctx.$implicit;
1112
+ const ctx_r2 = i0.ɵɵnextContext(2);
1113
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0, item_r2.disabled))("title", item_r2.label);
630
1114
  i0.ɵɵadvance();
631
- i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.isSortable) && !(colHeader_r4 == null ? null : colHeader_r4.filters));
1115
+ i0.ɵɵproperty("ngIf", ctx_r2.isSvgFile(item_r2.icon));
632
1116
  i0.ɵɵadvance();
633
- i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.type) === "custom");
1117
+ i0.ɵɵproperty("ngIf", !ctx_r2.isSvgFile(item_r2.icon));
634
1118
  } }
635
- function TableComponent_div_7_div_2_p_2_Template(rf, ctx) { if (rf & 1) {
636
- i0.ɵɵelementStart(0, "p", 32);
637
- i0.ɵɵtext(1);
1119
+ function ActionsCellComponent_div_1_Template(rf, ctx) { if (rf & 1) {
1120
+ i0.ɵɵelementStart(0, "div", 4);
1121
+ i0.ɵɵtemplate(1, ActionsCellComponent_div_1_div_1_Template, 3, 6, "div", 5);
638
1122
  i0.ɵɵelementEnd();
639
1123
  } if (rf & 2) {
640
- const ctx_r12 = i0.ɵɵnextContext();
641
- const col_r11 = ctx_r12.$implicit;
642
- const i_r12 = ctx_r12.index;
643
- const ctx_r1 = i0.ɵɵnextContext(2);
644
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(3, _c11, (ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.color) ? ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.color : ""))("ngClass", i0.ɵɵpureFunction1(5, _c12, !!(ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.textEllipsis)));
1124
+ const ctx_r2 = i0.ɵɵnextContext();
645
1125
  i0.ɵɵadvance();
646
- i0.ɵɵtextInterpolate1(" ", col_r11, " ");
1126
+ i0.ɵɵproperty("ngForOf", ctx_r2.actionItems)("ngForTrackBy", ctx_r2.trackByAction);
647
1127
  } }
648
- function TableComponent_div_7_div_2_3_ng_template_0_Template(rf, ctx) { }
649
- function TableComponent_div_7_div_2_3_Template(rf, ctx) { if (rf & 1) {
650
- i0.ɵɵtemplate(0, TableComponent_div_7_div_2_3_ng_template_0_Template, 0, 0, "ng-template", 24);
1128
+ function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_img_2_Template(rf, ctx) { if (rf & 1) {
1129
+ i0.ɵɵelement(0, "img", 29);
651
1130
  } if (rf & 2) {
652
- const ctx_r12 = i0.ɵɵnextContext();
653
- const col_r11 = ctx_r12.$implicit;
654
- const i_r12 = ctx_r12.index;
655
- const ctx_r1 = i0.ɵɵnextContext(2);
656
- i0.ɵɵproperty("customComponent", ctx_r1.config.colConfig[i_r12].componentRef)("data", col_r11);
1131
+ const item_r6 = i0.ɵɵnextContext(2).$implicit;
1132
+ i0.ɵɵproperty("src", item_r6.icon, i0.ɵɵsanitizeUrl);
657
1133
  } }
658
- function TableComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
659
- const _r9 = i0.ɵɵgetCurrentView();
660
- i0.ɵɵelementStart(0, "div", 29);
661
- i0.ɵɵlistener("click", function TableComponent_div_7_div_2_Template_div_click_0_listener() { const ctx_r9 = i0.ɵɵrestoreView(_r9); const col_r11 = ctx_r9.$implicit; const i_r12 = ctx_r9.index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView((ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].action) ? ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].action(col_r11) : null); });
662
- i0.ɵɵelementStart(1, "div", 30);
663
- i0.ɵɵtemplate(2, TableComponent_div_7_div_2_p_2_Template, 2, 7, "p", 31)(3, TableComponent_div_7_div_2_3_Template, 1, 2, null, 16);
664
- i0.ɵɵelementEnd()();
1134
+ function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_8_div_1_span_1_Template(rf, ctx) { if (rf & 1) {
1135
+ i0.ɵɵelementStart(0, "span", 22);
1136
+ i0.ɵɵelement(1, "img", 29);
1137
+ i0.ɵɵelementEnd();
665
1138
  } if (rf & 2) {
666
- const i_r12 = ctx.index;
667
- const ctx_r1 = i0.ɵɵnextContext(2);
668
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(7, _c8, (ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.width) || (ctx_r1.config == null ? null : ctx_r1.config.colHeaderConfig[i_r12] == null ? null : ctx_r1.config.colHeaderConfig[i_r12].style == null ? null : ctx_r1.config.colHeaderConfig[i_r12].style.width) || ""))("ngClass", i0.ɵɵpureFunction1(9, _c9, ctx_r1.config.cellHover));
669
- i0.ɵɵadvance();
670
- i0.ɵɵstyleMap(ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style);
671
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction2(11, _c10, (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].action) ? "pointer" : "default", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.justifyContent) ? ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].style == null ? null : ctx_r1.config.colConfig[i_r12].style.justifyContent : (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].type) === "number" ? "flex-end" : "space-between"));
672
- i0.ɵɵadvance();
673
- i0.ɵɵproperty("ngIf", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].type) !== "custom");
1139
+ const child_r8 = i0.ɵɵnextContext().$implicit;
674
1140
  i0.ɵɵadvance();
675
- i0.ɵɵproperty("ngIf", (ctx_r1.config.colConfig[i_r12] == null ? null : ctx_r1.config.colConfig[i_r12].type) === "custom");
1141
+ i0.ɵɵproperty("src", child_r8.icon, i0.ɵɵsanitizeUrl);
676
1142
  } }
677
- function TableComponent_div_7_div_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
678
- i0.ɵɵelementContainerStart(0);
679
- i0.ɵɵelementStart(1, "div", 34);
680
- i0.ɵɵtext(2, " Loading... ");
681
- i0.ɵɵelementEnd();
682
- i0.ɵɵelementContainerEnd();
1143
+ function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_8_div_1_Template(rf, ctx) { if (rf & 1) {
1144
+ const _r7 = i0.ɵɵgetCurrentView();
1145
+ i0.ɵɵelementStart(0, "div", 20);
1146
+ i0.ɵɵlistener("click", function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_8_div_1_Template_div_click_0_listener() { const child_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r2 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r2.handleAction(child_r8)); });
1147
+ i0.ɵɵtemplate(1, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_8_div_1_span_1_Template, 2, 1, "span", 31);
1148
+ i0.ɵɵelementStart(2, "span", 24);
1149
+ i0.ɵɵtext(3);
1150
+ i0.ɵɵelementEnd()();
683
1151
  } if (rf & 2) {
1152
+ const child_r8 = ctx.$implicit;
684
1153
  i0.ɵɵadvance();
685
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(1, _c13));
1154
+ i0.ɵɵproperty("ngIf", child_r8.icon);
1155
+ i0.ɵɵadvance(2);
1156
+ i0.ɵɵtextInterpolate(child_r8.label);
686
1157
  } }
687
- function TableComponent_div_7_div_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
688
- i0.ɵɵelementContainerStart(0);
689
- i0.ɵɵelementStart(1, "div", 34);
690
- i0.ɵɵtext(2, " No Data Available... ");
1158
+ function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_8_Template(rf, ctx) { if (rf & 1) {
1159
+ i0.ɵɵelementStart(0, "div", 30);
1160
+ i0.ɵɵtemplate(1, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_8_div_1_Template, 4, 2, "div", 19);
691
1161
  i0.ɵɵelementEnd();
692
- i0.ɵɵelementContainerEnd();
693
1162
  } if (rf & 2) {
1163
+ const item_r6 = i0.ɵɵnextContext(2).$implicit;
1164
+ const ctx_r2 = i0.ɵɵnextContext(3);
1165
+ i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(2, _c1, ctx_r2.submenuAlign === "left", ctx_r2.submenuAlign !== "left"));
694
1166
  i0.ɵɵadvance();
695
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(1, _c13));
1167
+ i0.ɵɵproperty("ngForOf", item_r6.children);
696
1168
  } }
697
- function TableComponent_div_7_div_3_ng_container_3_Template(rf, ctx) { if (rf & 1) {
1169
+ function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
698
1170
  i0.ɵɵelementContainerStart(0);
699
- i0.ɵɵelement(1, "sub-table", 35);
700
- i0.ɵɵelementContainerEnd();
701
- } if (rf & 2) {
702
- const ctx_r1 = i0.ɵɵnextContext(3);
703
- i0.ɵɵadvance();
704
- i0.ɵɵproperty("config", ctx_r1.subTableconfig)("tableData", ctx_r1.subTableData);
705
- } }
706
- function TableComponent_div_7_div_3_Template(rf, ctx) { if (rf & 1) {
707
- i0.ɵɵelementStart(0, "div", 33);
708
- i0.ɵɵtemplate(1, TableComponent_div_7_div_3_ng_container_1_Template, 3, 2, "ng-container", 16)(2, TableComponent_div_7_div_3_ng_container_2_Template, 3, 2, "ng-container", 16)(3, TableComponent_div_7_div_3_ng_container_3_Template, 2, 2, "ng-container", 16);
1171
+ i0.ɵɵelementStart(1, "span", 22);
1172
+ i0.ɵɵtemplate(2, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_img_2_Template, 1, 1, "img", 23);
1173
+ i0.ɵɵelementEnd();
1174
+ i0.ɵɵelementStart(3, "span", 24);
1175
+ i0.ɵɵtext(4);
709
1176
  i0.ɵɵelementEnd();
1177
+ i0.ɵɵelementStart(5, "span", 25);
1178
+ i0.ɵɵnamespaceSVG();
1179
+ i0.ɵɵelementStart(6, "svg", 26);
1180
+ i0.ɵɵelement(7, "path", 27);
1181
+ i0.ɵɵelementEnd()();
1182
+ i0.ɵɵtemplate(8, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_8_Template, 2, 5, "div", 28);
1183
+ i0.ɵɵelementContainerEnd();
710
1184
  } if (rf & 2) {
711
- const ctx_r1 = i0.ɵɵnextContext(2);
712
- i0.ɵɵadvance();
713
- i0.ɵɵproperty("ngIf", ctx_r1.subTableDataLoading);
714
- i0.ɵɵadvance();
715
- i0.ɵɵproperty("ngIf", !ctx_r1.subTableDataLoading && ctx_r1.subTableData.length === 0);
716
- i0.ɵɵadvance();
717
- i0.ɵɵproperty("ngIf", !ctx_r1.subTableDataLoading && ctx_r1.subTableData.length > 0);
1185
+ const item_r6 = i0.ɵɵnextContext().$implicit;
1186
+ i0.ɵɵadvance(2);
1187
+ i0.ɵɵproperty("ngIf", item_r6.icon);
1188
+ i0.ɵɵadvance(2);
1189
+ i0.ɵɵtextInterpolate(item_r6.label);
1190
+ i0.ɵɵadvance(4);
1191
+ i0.ɵɵproperty("ngIf", item_r6.showSubmenu);
718
1192
  } }
719
- function TableComponent_div_7_Template(rf, ctx) { if (rf & 1) {
720
- const _r7 = i0.ɵɵgetCurrentView();
721
- i0.ɵɵelementStart(0, "div", 25)(1, "div", 26);
722
- i0.ɵɵlistener("click", function TableComponent_div_7_Template_div_click_1_listener() { const i_r8 = i0.ɵɵrestoreView(_r7).index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selectRow(i_r8)); });
723
- i0.ɵɵtemplate(2, TableComponent_div_7_div_2_Template, 4, 14, "div", 27);
724
- i0.ɵɵelementEnd();
725
- i0.ɵɵtemplate(3, TableComponent_div_7_div_3_Template, 4, 3, "div", 28);
1193
+ function ActionsCellComponent_div_2_div_6_div_1_ng_template_2_span_0_Template(rf, ctx) { if (rf & 1) {
1194
+ i0.ɵɵelementStart(0, "span", 22);
1195
+ i0.ɵɵelement(1, "img", 29);
726
1196
  i0.ɵɵelementEnd();
727
1197
  } if (rf & 2) {
728
- const row_r14 = ctx.$implicit;
729
- const i_r8 = ctx.index;
730
- const ctx_r1 = i0.ɵɵnextContext();
731
- i0.ɵɵadvance();
732
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(4, _c6, ctx_r1.config.cellHover, i_r8 === ctx_r1.activeRowIndex))("ngStyle", i0.ɵɵpureFunction1(7, _c7, (ctx_r1.config == null ? null : ctx_r1.config.rowConfig == null ? null : ctx_r1.config.rowConfig.height) ? ctx_r1.config.rowConfig.height : "44px"));
1198
+ const item_r6 = i0.ɵɵnextContext(2).$implicit;
733
1199
  i0.ɵɵadvance();
734
- i0.ɵɵproperty("ngForOf", row_r14);
735
- i0.ɵɵadvance();
736
- i0.ɵɵproperty("ngIf", (ctx_r1.config == null ? null : ctx_r1.config.canExpand) && ctx_r1.expandedIndex === i_r8);
1200
+ i0.ɵɵproperty("src", item_r6.icon, i0.ɵɵsanitizeUrl);
737
1201
  } }
738
- function TableComponent_div_8_div_7_span_1_Template(rf, ctx) { if (rf & 1) {
739
- const _r16 = i0.ɵɵgetCurrentView();
740
- i0.ɵɵelementStart(0, "span", 46);
741
- i0.ɵɵlistener("click", function TableComponent_div_8_div_7_span_1_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r16); const pageNumber_r17 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateSelectedPage(pageNumber_r17)); });
742
- i0.ɵɵtext(1);
1202
+ function ActionsCellComponent_div_2_div_6_div_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
1203
+ i0.ɵɵtemplate(0, ActionsCellComponent_div_2_div_6_div_1_ng_template_2_span_0_Template, 2, 1, "span", 31);
1204
+ i0.ɵɵelementStart(1, "span", 24);
1205
+ i0.ɵɵtext(2);
743
1206
  i0.ɵɵelementEnd();
744
1207
  } if (rf & 2) {
745
- const pageNumber_r17 = i0.ɵɵnextContext().$implicit;
746
- const ctx_r1 = i0.ɵɵnextContext(2);
747
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c14, pageNumber_r17 == (ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage)));
748
- i0.ɵɵadvance();
749
- i0.ɵɵtextInterpolate(pageNumber_r17);
1208
+ const item_r6 = i0.ɵɵnextContext().$implicit;
1209
+ i0.ɵɵproperty("ngIf", item_r6.icon);
1210
+ i0.ɵɵadvance(2);
1211
+ i0.ɵɵtextInterpolate(item_r6.label);
750
1212
  } }
751
- function TableComponent_div_8_div_7_span_2_Template(rf, ctx) { if (rf & 1) {
752
- i0.ɵɵelementStart(0, "span", 47)(1, "div", 34);
753
- i0.ɵɵelement(2, "span", 48)(3, "span", 48)(4, "span", 49);
754
- i0.ɵɵelementEnd()();
1213
+ function ActionsCellComponent_div_2_div_6_div_1_Template(rf, ctx) { if (rf & 1) {
1214
+ const _r5 = i0.ɵɵgetCurrentView();
1215
+ i0.ɵɵelementStart(0, "div", 20);
1216
+ i0.ɵɵlistener("click", function ActionsCellComponent_div_2_div_6_div_1_Template_div_click_0_listener($event) { const item_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.onDropdownItemClick(item_r6, $event)); });
1217
+ i0.ɵɵtemplate(1, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_Template, 9, 3, "ng-container", 21)(2, ActionsCellComponent_div_2_div_6_div_1_ng_template_2_Template, 3, 2, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
1218
+ i0.ɵɵelementEnd();
755
1219
  } if (rf & 2) {
1220
+ const item_r6 = ctx.$implicit;
1221
+ const noChildren_r9 = i0.ɵɵreference(3);
756
1222
  i0.ɵɵadvance();
757
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(3, _c15));
758
- i0.ɵɵadvance();
759
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(4, _c16));
760
- i0.ɵɵadvance();
761
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(5, _c16));
1223
+ i0.ɵɵproperty("ngIf", item_r6.children == null ? null : item_r6.children.length)("ngIfElse", noChildren_r9);
762
1224
  } }
763
- function TableComponent_div_8_div_7_Template(rf, ctx) { if (rf & 1) {
764
- i0.ɵɵelementStart(0, "div");
765
- i0.ɵɵtemplate(1, TableComponent_div_8_div_7_span_1_Template, 2, 4, "span", 44)(2, TableComponent_div_8_div_7_span_2_Template, 5, 6, "span", 45);
1225
+ function ActionsCellComponent_div_2_div_6_Template(rf, ctx) { if (rf & 1) {
1226
+ i0.ɵɵelementStart(0, "div", 18);
1227
+ i0.ɵɵtemplate(1, ActionsCellComponent_div_2_div_6_div_1_Template, 4, 2, "div", 19);
766
1228
  i0.ɵɵelementEnd();
767
1229
  } if (rf & 2) {
768
- const pageNumber_r17 = ctx.$implicit;
769
- i0.ɵɵadvance();
770
- i0.ɵɵproperty("ngIf", pageNumber_r17 != 0);
1230
+ const ctx_r2 = i0.ɵɵnextContext(2);
771
1231
  i0.ɵɵadvance();
772
- i0.ɵɵproperty("ngIf", pageNumber_r17 == 0);
1232
+ i0.ɵɵproperty("ngForOf", ctx_r2.actionItems);
773
1233
  } }
774
- function TableComponent_div_8_Template(rf, ctx) { if (rf & 1) {
775
- const _r15 = i0.ɵɵgetCurrentView();
776
- i0.ɵɵelementStart(0, "div", 36)(1, "p", 37);
777
- i0.ɵɵtext(2);
778
- i0.ɵɵelementEnd();
779
- i0.ɵɵelementStart(3, "div", 38)(4, "span", 39);
780
- i0.ɵɵlistener("click", function TableComponent_div_8_Template_span_click_4_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateSelectedPage((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) - 1)); });
1234
+ function ActionsCellComponent_div_2_Template(rf, ctx) { if (rf & 1) {
1235
+ const _r4 = i0.ɵɵgetCurrentView();
1236
+ i0.ɵɵelementStart(0, "div", 11)(1, "div", 12);
1237
+ i0.ɵɵlistener("click", function ActionsCellComponent_div_2_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleDropdown($event)); });
781
1238
  i0.ɵɵnamespaceSVG();
782
- i0.ɵɵelementStart(5, "svg", 40);
783
- i0.ɵɵelement(6, "path", 41);
1239
+ i0.ɵɵelementStart(2, "svg", 13);
1240
+ i0.ɵɵelement(3, "circle", 14)(4, "circle", 15)(5, "circle", 16);
784
1241
  i0.ɵɵelementEnd()();
785
- i0.ɵɵtemplate(7, TableComponent_div_8_div_7_Template, 3, 2, "div", 42);
786
- i0.ɵɵnamespaceHTML();
787
- i0.ɵɵelementStart(8, "span", 39);
788
- i0.ɵɵlistener("click", function TableComponent_div_8_Template_span_click_8_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateSelectedPage((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) + 1)); });
789
- i0.ɵɵnamespaceSVG();
790
- i0.ɵɵelementStart(9, "svg", 40);
791
- i0.ɵɵelement(10, "path", 43);
792
- i0.ɵɵelementEnd()()()();
1242
+ i0.ɵɵtemplate(6, ActionsCellComponent_div_2_div_6_Template, 2, 1, "div", 17);
1243
+ i0.ɵɵelementEnd();
793
1244
  } if (rf & 2) {
794
- const ctx_r1 = i0.ɵɵnextContext();
795
- i0.ɵɵadvance(2);
796
- i0.ɵɵtextInterpolate3(" Showing ", ((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) - 1) * ctx_r1.config.paginationConfig.rowsPerPage + 1, "-", ((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) - 1) * ctx_r1.config.paginationConfig.rowsPerPage + ctx_r1.tableLength, " of ", ctx_r1.config.paginationConfig.totalNoOfRows, " items ");
797
- i0.ɵɵadvance(5);
798
- i0.ɵɵproperty("ngForOf", ctx_r1.pages);
1245
+ const ctx_r2 = i0.ɵɵnextContext();
1246
+ i0.ɵɵadvance(6);
1247
+ i0.ɵɵproperty("ngIf", ctx_r2.isDropdownOpen);
799
1248
  } }
800
- class TableComponent {
801
- constructor(renderer) {
802
- this.renderer = renderer;
803
- // Initialize with -1 to indicate no row is colored at the beginning
804
- this.activeRowIndex = 0;
805
- // Filter related variables
806
- this.showFilter = false;
807
- this.filterName = "";
808
- this.filterData = [];
809
- this.filterContainerStyles = {};
810
- this.appliedFilters = {};
811
- this.filtersUpdated = new EventEmitter();
812
- // Pagination related variables
813
- this.pages = [];
814
- this.pageSelected = new EventEmitter();
815
- this.tableData = [];
816
- this.subTableData = [];
817
- // Sorting related properties
818
- this.currentSort = null;
819
- this.multiColumnSort = [];
820
- this.sortChange = new EventEmitter();
1249
+ class ActionsCellComponent {
1250
+ constructor() {
1251
+ this.actionItems = [];
1252
+ this.actionType = 'inline';
1253
+ this.dropdownIcon = '';
1254
+ this.submenuAlign = 'right';
1255
+ this._style = {};
1256
+ this.containerStyle = {};
1257
+ this.actionClick = new EventEmitter();
1258
+ this.isDropdownOpen = false;
1259
+ this.defaultDropdownIcon = `
1260
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1261
+ <circle cx="8" cy="4" r="2" fill="#333"/>
1262
+ <circle cx="8" cy="8" r="2" fill="#333"/>
1263
+ <circle cx="8" cy="12" r="2" fill="#333"/>
1264
+ </svg>
1265
+ `;
821
1266
  }
822
- // Function to handle row click
823
- selectRow(index) {
824
- this.activeRowIndex = index; // Set the selected index to the clicked row's index
825
- !!this.config.rowConfig.action && this.config.rowConfig.action(index);
1267
+ set style(value) {
1268
+ this._style = value || {};
1269
+ this.processStyle();
826
1270
  }
827
- ngOnInit() {
828
- this.tableLength = !!this.tableData ? this.tableData.length : 0;
829
- this.initializeFilters();
830
- if (this.config.paginationConfig) {
831
- this.initializePagination();
832
- }
833
- if (this.config.canScrollHorizontally === undefined) {
834
- this.config.canScrollHorizontally = false;
835
- }
836
- document.addEventListener("click", event => {
837
- if (this.filter) {
838
- let isCheckBoxClicked = true;
839
- let targetElement = event.target;
840
- if (targetElement.className === "checkmark") {
841
- isCheckBoxClicked = true;
842
- this.showFilter = true;
843
- }
844
- let isClickInsideElement = this.filter.container.nativeElement.contains(event.target);
845
- if (!isClickInsideElement && !isCheckBoxClicked) {
846
- this.toggleFilter(this.filterName);
847
- }
848
- }
849
- });
1271
+ get style() {
1272
+ return this._style;
850
1273
  }
851
- ngAfterViewInit() {
852
- if (this.config.paginationConfig) {
853
- let height = this.config.height;
854
- this.renderer.setStyle(this.table.nativeElement, "height", height - 56 + "px");
855
- }
1274
+ ngOnInit() {
1275
+ console.log("ACTION ITEMS:", this.actionItems);
1276
+ console.log("ACTION TYPE:", this.actionType);
856
1277
  }
857
- ngOnChanges() {
858
- this.tableLength = !!this.tableData ? this.tableData.length : 0;
859
- this.activeRowIndex = this.config.activeRowIndex || 0;
1278
+ processStyle() {
1279
+ // Remove width from style to avoid conflicts with table column width
1280
+ const { width, ...restStyle } = this._style;
1281
+ this.containerStyle = restStyle;
860
1282
  }
861
- // Filter related functions
862
- initializeFilters() {
863
- for (let colHeader of this.config?.colHeaderConfig) {
864
- if (colHeader.filters) {
865
- let filters = [];
866
- for (let filter of colHeader.filters) {
867
- if (filter.checked) {
868
- filters.push({
869
- name: filter.name,
870
- value: filter.value
871
- });
872
- }
873
- }
874
- if (filters.length > 0)
875
- this.appliedFilters[colHeader.data] = filters;
876
- }
877
- }
1283
+ handleAction(item) {
1284
+ // You can customize this logic to emit an event or directly trigger something
1285
+ console.log('Action clicked:', item);
1286
+ // Example: If you're emitting it to parent
1287
+ // this.actionTriggered.emit(item);
878
1288
  }
879
- toggleFilter(filterName) {
880
- if (!this.showFilter) {
881
- this.filterName = filterName;
882
- this.showFilter = true;
883
- let offSet = 0;
884
- let colHeadersReversed = this.colHeaders.toArray().reverse();
885
- for (let header of colHeadersReversed) {
886
- if (header.nativeElement.innerText === filterName)
887
- break;
888
- offSet += header.nativeElement.offsetWidth;
889
- }
890
- this.filterContainerStyles = {
891
- top: "44px",
892
- right: offSet > 0 ? offSet - 116 + "px" : "12px"
893
- };
1289
+ onActionClick(item, event) {
1290
+ event.stopPropagation();
1291
+ if (item.disabled) {
1292
+ return;
894
1293
  }
895
- else {
896
- this.filterName = "";
897
- this.filterData = [];
898
- this.showFilter = false;
1294
+ console.log("Action clicked:", item.label, "Data:", this.data);
1295
+ if (item.action) {
1296
+ item.action(this.data);
899
1297
  }
1298
+ this.actionClick.emit({ item, data: this.data });
900
1299
  }
901
- updateAppliedFilters(appliedFilters) {
902
- if (appliedFilters.length == 0) {
903
- delete this.appliedFilters[this.filterName];
904
- }
905
- else {
906
- this.appliedFilters[this.filterName] = appliedFilters;
907
- }
908
- this.filtersUpdated.emit({ ...this.appliedFilters });
909
- this.toggleFilter(this.filterName);
1300
+ trackByAction(index, item) {
1301
+ return item.value;
910
1302
  }
911
- // Pagination related functions
912
- initializePagination() {
913
- if (this.config.paginationConfig) {
914
- let len = this.config.paginationConfig.noOfPages;
915
- if (len <= 7) {
916
- for (let i = 1; i <= len; i++) {
917
- this.pages.push(i);
918
- }
919
- }
920
- else {
921
- this.pages = [1, 2, 3, 4, 0, len];
922
- }
923
- }
1303
+ isSvgFile(iconPath) {
1304
+ if (!iconPath)
1305
+ return false;
1306
+ return iconPath.toLowerCase().includes('.svg') || iconPath.toLowerCase().includes('assets/icons/');
924
1307
  }
925
- updateSelectedPage(pageNumber) {
926
- if (pageNumber < 1 || pageNumber > this.config.paginationConfig.noOfPages)
927
- return;
928
- this.config.paginationConfig.selectedPage = pageNumber;
929
- let len = this.config.paginationConfig.noOfPages;
930
- if (len > 7) {
931
- if (pageNumber - 2 <= 1) {
932
- this.pages = [1, 2, 3, 4, 0, len];
933
- }
934
- else if (pageNumber - 2 > 1 && pageNumber + 2 < len) {
935
- this.pages = [1, 0, pageNumber - 1, pageNumber, pageNumber + 1, 0, len];
936
- }
937
- else if (pageNumber + 2 >= len) {
938
- this.pages = [1, 0, len - 3, len - 2, len - 1, len];
939
- }
1308
+ onDocumentClick() {
1309
+ if (this.isDropdownOpen) {
1310
+ this.isDropdownOpen = false;
940
1311
  }
941
- this.pageSelected.emit(this.config.paginationConfig?.selectedPage);
942
- }
943
- // Main container related functions
944
- getContainerHeight() {
945
- if (this.config?.height)
946
- return this.config.height;
947
- else
948
- return "";
949
- }
950
- getContainerWidth() {
951
- if (this.config?.width)
952
- return this.config.width;
953
- else
954
- return "";
955
1312
  }
956
- // Column Headers related functions
957
- getColHeadersRowStyles() {
958
- const { colHeadersRowConfig } = this.config;
959
- const minHeight = colHeadersRowConfig?.height || "44px";
960
- const borderTop = colHeadersRowConfig?.style?.borderTop || "";
961
- const borderBottom = colHeadersRowConfig?.style?.borderBottom || "1px solid #E0E0E0";
962
- const backgroundColor = colHeadersRowConfig?.style?.backgroundColor || "#FFFFFF";
963
- const fontSize = colHeadersRowConfig?.style?.fontSize || "14px";
964
- return {
965
- 'min-height': minHeight,
966
- 'border-top': borderTop,
967
- 'border-bottom': borderBottom,
968
- 'background-color': backgroundColor,
969
- 'font-size': fontSize
970
- };
1313
+ toggleDropdown(event) {
1314
+ event.stopPropagation();
1315
+ this.isDropdownOpen = !this.isDropdownOpen;
1316
+ // Close all submenus when opening/closing main menu
1317
+ this.actionItems.forEach((item) => item.showSubmenu = false);
971
1318
  }
972
- onSortChange(sortState) {
973
- this.currentSort = sortState;
974
- if (this.config.multiColumnSort) {
975
- const index = this.multiColumnSort.findIndex(sort => sort.column === sortState.column);
976
- if (index !== -1) {
977
- if (sortState.direction === null) {
978
- this.multiColumnSort.splice(index, 1);
979
- }
980
- else {
981
- this.multiColumnSort[index] = sortState;
982
- }
983
- }
984
- else if (sortState.direction !== null) {
985
- this.multiColumnSort.push(sortState);
986
- }
1319
+ onDropdownItemClick(item, event) {
1320
+ event.stopPropagation();
1321
+ if (item.disabled)
1322
+ return;
1323
+ if (item.children) {
1324
+ // Toggle submenu
1325
+ item.showSubmenu = !item.showSubmenu;
1326
+ // Optionally close other submenus
1327
+ this.actionItems.forEach((i) => {
1328
+ if (i !== item)
1329
+ i.showSubmenu = false;
1330
+ });
1331
+ }
1332
+ else {
1333
+ // Handle action
1334
+ if (item.action)
1335
+ item.action(this.data);
1336
+ this.actionClick.emit({ item, data: this.data });
1337
+ this.isDropdownOpen = false;
987
1338
  }
988
- this.sortChange.emit(sortState);
989
1339
  }
990
- static { this.ɵfac = function TableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TableComponent)(i0.ɵɵdirectiveInject(i0.Renderer2)); }; }
991
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableComponent, selectors: [["mis-table"]], viewQuery: function TableComponent_Query(rf, ctx) { if (rf & 1) {
992
- i0.ɵɵviewQuery(_c0, 5);
993
- i0.ɵɵviewQuery(_c1, 5);
994
- i0.ɵɵviewQuery(_c2, 5);
995
- } if (rf & 2) {
996
- let _t;
997
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filter = _t.first);
998
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.table = _t.first);
999
- i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.colHeaders = _t);
1000
- } }, inputs: { config: [0, "tableConfig", "config"], subTableconfig: "subTableconfig", tableDataLoading: "tableDataLoading", expandedIndex: "expandedIndex", tableData: "tableData", subTableData: "subTableData", subTableDataLoading: "subTableDataLoading" }, outputs: { filtersUpdated: "filtersUpdated", pageSelected: "pageSelected", sortChange: "sortChange" }, features: [i0.ɵɵNgOnChangesFeature], decls: 9, vars: 15, consts: [["table", ""], ["filter", ""], ["colHeaderRef", ""], ["id", "main-container", 3, "ngStyle"], [3, "containerStyles", "filtersData", "filtersApplied", 4, "ngIf"], ["id", "table-container", 3, "ngClass"], ["id", "col-headers-container", 3, "ngStyle"], ["class", "col-header", 3, "ngStyle", "click", 4, "ngFor", "ngForOf"], ["id", "data-container"], ["class", "row-wrapper", 4, "ngFor", "ngForOf"], ["id", "pagination-container", 4, "ngIf"], [3, "filtersApplied", "containerStyles", "filtersData"], [1, "col-header", 3, "click", "ngStyle"], ["class", "col-header-text", 4, "ngIf"], ["class", "filter-icon", 3, "click", 4, "ngIf"], ["appSortIcons", "", "class", "sort-icon", 3, "column", "activeSort", "activeSorts", "multiColumnSort", "sortChange", 4, "ngIf"], [4, "ngIf"], [1, "col-header-text"], [1, "filter-icon", 3, "click"], ["id", "filter-active", 4, "ngIf"], ["fill", "none", "height", "10", "viewBox", "0 0 13 10", "width", "13", "xmlns", "http://www.w3.org/2000/svg"], ["clip-rule", "evenodd", "d", "M4.97546 10H7.64213V8H4.97546V10ZM0.308472 0V2H12.3085V0H0.308472ZM2.30847 6H10.3085V4H2.30847V6Z", "fill", "#181F33", "fill-rule", "evenodd"], ["id", "filter-active"], ["appSortIcons", "", 1, "sort-icon", 3, "sortChange", "column", "activeSort", "activeSorts", "multiColumnSort"], ["customTableCell", "", 3, "customComponent", "data"], [1, "row-wrapper"], [1, "t-row", 3, "click", "ngClass", "ngStyle"], ["class", "t-col-container", 3, "ngStyle", "ngClass", "click", 4, "ngFor", "ngForOf"], ["class", "sub-row", 4, "ngIf"], [1, "t-col-container", 3, "click", "ngStyle", "ngClass"], [1, "t-col", 3, "ngStyle"], ["class", "t-col-text", 3, "ngStyle", "ngClass", 4, "ngIf"], [1, "t-col-text", 3, "ngStyle", "ngClass"], [1, "sub-row"], [3, "ngStyle"], [3, "config", "tableData"], ["id", "pagination-container"], ["id", "pagination-text"], ["id", "pages-container"], [1, "page", 3, "click"], ["fill", "none", "height", "10", "viewBox", "0 0 7 10", "width", "7", "xmlns", "http://www.w3.org/2000/svg"], ["clip-rule", "evenodd", "d", "M0.857405 5.56295C0.855794 5.56139 0.854188 5.55982 0.852588 5.55824C0.695955 5.40408 0.617641 5.20203 0.617647 4.99998C0.617641 4.79793 0.695955 4.59588 0.852588 4.44172C0.854188 4.44014 0.855794 4.43858 0.857404 4.43702L5.13066 0.231231C5.44392 -0.0770771 5.9518 -0.0770771 6.26506 0.231231C6.57831 0.53954 6.57831 1.03941 6.26506 1.34772L2.5542 4.99998L6.26506 8.65225C6.57831 8.96055 6.57831 9.46042 6.26506 9.76873C5.9518 10.077 5.44392 10.077 5.13066 9.76873L0.857405 5.56295Z", "fill", "#181F33", "fill-rule", "evenodd"], [4, "ngFor", "ngForOf"], ["clip-rule", "evenodd", "d", "M6.1426 5.56295C6.14421 5.56139 6.14581 5.55982 6.14741 5.55824C6.30405 5.40408 6.38236 5.20203 6.38236 4.99998C6.38236 4.79793 6.30405 4.59588 6.14741 4.44172C6.14581 4.44014 6.14421 4.43858 6.1426 4.43702L1.86934 0.231231C1.55608 -0.0770771 1.0482 -0.0770771 0.734942 0.231231C0.421688 0.53954 0.421688 1.03941 0.734942 1.34772L4.4458 4.99998L0.734941 8.65225C0.421686 8.96055 0.421686 9.46042 0.734941 9.76873C1.0482 10.077 1.55608 10.077 1.86934 9.76873L6.1426 5.56295Z", "fill", "#181F33", "fill-rule", "evenodd"], ["class", "page", 3, "ngClass", "click", 4, "ngIf"], ["class", "page-seperator", 4, "ngIf"], [1, "page", 3, "click", "ngClass"], [1, "page-seperator"], [1, "dot", 3, "ngStyle"], [1, "dot"]], template: function TableComponent_Template(rf, ctx) { if (rf & 1) {
1001
- i0.ɵɵelementStart(0, "div", 3);
1002
- i0.ɵɵtemplate(1, TableComponent_mis_table_filter_1_Template, 2, 2, "mis-table-filter", 4);
1003
- i0.ɵɵelementStart(2, "div", 5, 0)(4, "div", 6);
1004
- i0.ɵɵtemplate(5, TableComponent_div_5_Template, 6, 9, "div", 7);
1005
- i0.ɵɵelementEnd();
1006
- i0.ɵɵelementStart(6, "div", 8);
1007
- i0.ɵɵtemplate(7, TableComponent_div_7_Template, 4, 9, "div", 9);
1008
- i0.ɵɵelementEnd()();
1009
- i0.ɵɵtemplate(8, TableComponent_div_8_Template, 11, 4, "div", 10);
1340
+ static { this.ɵfac = function ActionsCellComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActionsCellComponent)(); }; }
1341
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActionsCellComponent, selectors: [["mis-actions-cell"]], hostBindings: function ActionsCellComponent_HostBindings(rf, ctx) { if (rf & 1) {
1342
+ i0.ɵɵlistener("click", function ActionsCellComponent_click_HostBindingHandler() { return ctx.onDocumentClick(); }, false, i0.ɵɵresolveDocument);
1343
+ } }, inputs: { data: "data", actionItems: "actionItems", actionType: "actionType", dropdownIcon: "dropdownIcon", submenuAlign: "submenuAlign", style: "style" }, outputs: { actionClick: "actionClick" }, decls: 3, vars: 3, consts: [["noChildren", ""], [1, "actions-cell-container", 3, "ngStyle"], ["class", "inline-actions", 4, "ngIf"], ["class", "dropdown-actions", 4, "ngIf"], [1, "inline-actions"], ["class", "action-item", 3, "ngClass", "title", "click", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "action-item", 3, "click", "ngClass", "title"], ["class", "action-icon-svg", 3, "src", "alt", 4, "ngIf"], ["class", "action-icon", 3, "innerHTML", 4, "ngIf"], [1, "action-icon-svg", 3, "src", "alt"], [1, "action-icon", 3, "innerHTML"], [1, "dropdown-actions"], ["title", "More actions", 1, "dropdown-trigger", 3, "click"], ["width", "16", "height", "16", "viewBox", "0 0 16 16", "fill", "none"], ["cx", "8", "cy", "4", "r", "1.5", "fill", "#333"], ["cx", "8", "cy", "8", "r", "1.5", "fill", "#333"], ["cx", "8", "cy", "12", "r", "1.5", "fill", "#333"], ["class", "dropdown-menu", 4, "ngIf"], [1, "dropdown-menu"], ["class", "dropdown-menu-item", 3, "click", 4, "ngFor", "ngForOf"], [1, "dropdown-menu-item", 3, "click"], [4, "ngIf", "ngIfElse"], [1, "dropdown-icon"], [3, "src", 4, "ngIf"], [1, "dropdown-label"], [1, "submenu-arrow"], ["width", "20", "height", "20", "viewBox", "0 0 24 24", "fill", "none"], ["d", "M9 6L15 12L9 18", "stroke", "#0D1321", "stroke-width", "2", "stroke-linecap", "round", "stroke-linejoin", "round"], ["class", "dropdown-submenu", 3, "ngClass", 4, "ngIf"], [3, "src"], [1, "dropdown-submenu", 3, "ngClass"], ["class", "dropdown-icon", 4, "ngIf"]], template: function ActionsCellComponent_Template(rf, ctx) { if (rf & 1) {
1344
+ i0.ɵɵelementStart(0, "div", 1);
1345
+ i0.ɵɵtemplate(1, ActionsCellComponent_div_1_Template, 2, 2, "div", 2)(2, ActionsCellComponent_div_2_Template, 7, 1, "div", 3);
1010
1346
  i0.ɵɵelementEnd();
1011
1347
  } if (rf & 2) {
1012
- i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(7, _c3, ctx.getContainerHeight(), ctx.getContainerWidth(), ctx.config.canScrollHorizontally ? "auto" : "unset"));
1013
- i0.ɵɵadvance();
1014
- i0.ɵɵproperty("ngIf", ctx.showFilter);
1348
+ i0.ɵɵproperty("ngStyle", ctx.containerStyle);
1015
1349
  i0.ɵɵadvance();
1016
- i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(11, _c4, ctx.expandedIndex < 0, !(ctx.expandedIndex < 0), ctx.config.canScrollHorizontally));
1017
- i0.ɵɵadvance(2);
1018
- i0.ɵɵproperty("ngStyle", ctx.getColHeadersRowStyles());
1019
- i0.ɵɵadvance();
1020
- i0.ɵɵproperty("ngForOf", ctx.config == null ? null : ctx.config.colHeaderConfig);
1021
- i0.ɵɵadvance(2);
1022
- i0.ɵɵproperty("ngForOf", ctx.tableData);
1350
+ i0.ɵɵproperty("ngIf", ctx.actionType === "inline");
1023
1351
  i0.ɵɵadvance();
1024
- i0.ɵɵproperty("ngIf", (ctx.config == null ? null : ctx.config.paginationConfig) && (ctx.tableLength >= ctx.config.paginationConfig.rowsPerPage || (ctx.config.paginationConfig == null ? null : ctx.config.paginationConfig.selectedPage) !== 1));
1025
- } }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, SubTableComponent, TableFilterComponent, CustomTableCellDirective, SortIconsDirective], styles: ["#main-container[_ngcontent-%COMP%]{font-family:Lato,sans-serif;position:relative}.no-scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:0}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container[_ngcontent-%COMP%]{height:inherit;overflow-y:auto}.scroll-horizontally[_ngcontent-%COMP%]{height:inherit;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container[_ngcontent-%COMP%]{display:flex;align-items:center;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header[_ngcontent-%COMP%]{padding:0 16px;display:flex;align-items:center;height:100%}.col-header-text[_ngcontent-%COMP%]{font-style:normal;font-weight:700;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.sort-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.filter-icon[_ngcontent-%COMP%]{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active[_ngcontent-%COMP%]{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row[_ngcontent-%COMP%]{height:auto;border-bottom:none}.loader[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#0937b2}.t-row[_ngcontent-%COMP%]{display:flex;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row[_ngcontent-%COMP%]:hover{background-color:#e7eefd}.active-row[_ngcontent-%COMP%]{background-color:#e6f6fd}.t-col-container[_ngcontent-%COMP%]{padding:0 16px;overflow-wrap:anywhere}.t-row-hover[_ngcontent-%COMP%]:hover{background-color:#0000}.t-col-container-hover[_ngcontent-%COMP%]:hover{background-color:#e6ebf7}.t-col-container-hover[_ngcontent-%COMP%]:first-child{border-left:1px solid #e0e0e0}.t-col-container-hover[_ngcontent-%COMP%]{border-right:1px solid #e0e0e0}.t-col[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%}.t-col-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.text-ellipsis[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}#pagination-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container[_ngcontent-%COMP%]{display:flex;margin-right:32px}.page[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;width:32px;height:32px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;margin-right:8px;cursor:pointer}.page-seperator[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot[_ngcontent-%COMP%]{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active[_ngcontent-%COMP%]{color:#0937b2;border:1px solid #0937b2}.sort-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;margin-left:4px;cursor:pointer}.sort-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;height:16px;transition:opacity .2s ease}.sort-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{opacity:.8}"] }); }
1352
+ i0.ɵɵproperty("ngIf", ctx.actionType === "dropdown");
1353
+ } }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle], styles: [".actions-cell-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;position:relative;box-sizing:border-box}.inline-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;flex-wrap:nowrap;padding:4px 0;flex-direction:row}.action-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:20px;border-radius:4px;cursor:pointer;transition:all .2s ease;background-color:transparent;border:none;outline:none;flex-shrink:0;min-height:20px}.action-item[_ngcontent-%COMP%]:hover:not(.disabled){background-color:#0000000a;transform:scale(1.05)}.action-item[_ngcontent-%COMP%]:active:not(.disabled){transform:scale(.95)}.action-item.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed}.action-item.disabled[_ngcontent-%COMP%]:hover{background-color:transparent;transform:none}.action-icon[_ngcontent-%COMP%]{font-size:16px;color:#666;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.action-icon-svg[_ngcontent-%COMP%]{width:18px;height:18px;object-fit:contain;filter:brightness(0) saturate(100%) invert(40%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(.6) contrast(1);flex-shrink:0}.action-icon-svg[_ngcontent-%COMP%]:hover{filter:brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0) contrast(1)}.dropdown-trigger[_ngcontent-%COMP%]{cursor:pointer}.dropdown-actions[_ngcontent-%COMP%]{position:relative}.dropdown-trigger[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center}.dropdown-menu[_ngcontent-%COMP%]{position:absolute;top:100%;right:0;width:240px;background:#fff;border-radius:12px;box-shadow:0 4px 24px #0000001f;z-index:1000;padding:8px 0}.dropdown-menu-item.disabled[_ngcontent-%COMP%]{color:#aaa;cursor:not-allowed}.dropdown-menu-item[_ngcontent-%COMP%]:hover:not(.disabled), .dropdown-menu-item.has-submenu[_ngcontent-%COMP%]:hover{background:#f5f5f5}.dropdown-menu-item[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px 18px;cursor:pointer;font-size:14px;position:relative}.dropdown-menu-item[_ngcontent-%COMP%] .dropdown-label[_ngcontent-%COMP%]{flex:1;margin-left:8px}.dropdown-menu-item[_ngcontent-%COMP%] .submenu-arrow[_ngcontent-%COMP%]{margin-left:auto;width:16px;height:16px}.submenu-container[_ngcontent-%COMP%]{position:absolute;top:0;left:100%;margin-left:4px;background:#fff;box-shadow:0 4px 8px #0000001a;border-radius:8px;z-index:1000;white-space:nowrap}.dropdown-submenu[_ngcontent-%COMP%]{position:absolute;top:0;min-width:180px;background:#fff;border-radius:12px;box-shadow:0 4px 24px #0000001f;padding:8px 0;z-index:1001}.dropdown-submenu.right[_ngcontent-%COMP%]{left:100%;margin-left:4px}.dropdown-submenu.left[_ngcontent-%COMP%]{left:auto;right:100%;margin-right:8px;background-color:#fff;border:1px solid #ddd;z-index:9999;position:absolute}.submenu-arrow[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:auto;z-index:9999}"] }); }
1026
1354
  }
1027
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableComponent, [{
1355
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActionsCellComponent, [{
1028
1356
  type: Component,
1029
- args: [{ selector: "mis-table", template: "<div\n [ngStyle]=\"{\n height: getContainerHeight(),\n width: getContainerWidth(),\n 'overflow-x': config.canScrollHorizontally ? 'auto' : 'unset'\n }\"\n id=\"main-container\"\n>\n <mis-table-filter\n #filter\n (filtersApplied)=\"updateAppliedFilters($event)\"\n *ngIf=\"showFilter\"\n [containerStyles]=\"filterContainerStyles\"\n [filtersData]=\"filterData\"\n ></mis-table-filter>\n <div\n #table\n id=\"table-container\"\n [ngClass]=\"{ 'no-scrollbar': expandedIndex < 0, scrollbar: !(expandedIndex < 0), 'scroll-horizontally': config.canScrollHorizontally }\"\n >\n <div\n [ngStyle]=\"getColHeadersRowStyles()\"\n id=\"col-headers-container\"\n >\n <div\n #colHeaderRef\n (click)=\"colHeader?.action ? colHeader?.action(colHeader) : null\"\n *ngFor=\"let colHeader of config?.colHeaderConfig\"\n class=\"col-header\"\n [ngStyle]=\"{\n width: colHeader?.style?.width || '',\n cursor: colHeader.action ? 'pointer' : 'default',\n 'justify-content': colHeader?.style?.justifyContent\n ? colHeader?.style?.justifyContent\n : colHeader.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\"\n >\n <p *ngIf=\"colHeader?.type !== 'custom'\" class=\"col-header-text\">\n {{ colHeader?.data || \" \" }}\n </p>\n <span\n (click)=\"filterData = colHeader.filters; toggleFilter(colHeader.data); $event.stopPropagation()\"\n *ngIf=\"colHeader?.type !== 'custom' && colHeader?.filters && colHeader?.filters?.length > 0\"\n class=\"filter-icon\"\n >\n <span *ngIf=\"appliedFilters[colHeader.data]?.length > 0\" id=\"filter-active\"></span>\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 13 10\" width=\"13\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M4.97546 10H7.64213V8H4.97546V10ZM0.308472 0V2H12.3085V0H0.308472ZM2.30847 6H10.3085V4H2.30847V6Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <span *ngIf=\"colHeader?.isSortable && !colHeader?.filters\" appSortIcons\n [column]=\"colHeader\"\n [activeSort]=\"currentSort\"\n [activeSorts]=\"multiColumnSort\"\n [multiColumnSort]=\"config.multiColumnSort\"\n (sortChange)=\"onSortChange($event)\"\n class=\"sort-icon\">\n </span>\n <ng-template *ngIf=\"colHeader?.type === 'custom'\" customTableCell [customComponent]=\"colHeader?.componentRef\" [data]=\"colHeader.data\"></ng-template>\n </div>\n </div>\n <div id=\"data-container\">\n <div class=\"row-wrapper\" *ngFor=\"let row of tableData; let i = index\">\n <div\n class=\"t-row\"\n [ngClass]=\"{ 't-row-hover': config.cellHover, 'active-row': i === activeRowIndex }\"\n [ngStyle]=\"{ 'min-height': config?.rowConfig?.height ? config.rowConfig.height : '44px' }\"\n (click)=\"selectRow(i)\"\n >\n <div\n (click)=\"config?.colConfig[i]?.action ? config?.colConfig[i]?.action(col) : null\"\n *ngFor=\"let col of row; let i = index\"\n [ngStyle]=\"{\n width: config?.colConfig[i]?.style?.width || config?.colHeaderConfig[i]?.style?.width || ''\n }\"\n class=\"t-col-container\"\n [ngClass]=\"{ 't-col-container-hover': config.cellHover }\"\n >\n <div\n class=\"t-col\"\n [style]=\"config.colConfig[i]?.style\"\n [ngStyle]=\"{\n width: '100%',\n cursor: config.colConfig[i]?.action ? 'pointer' : 'default',\n 'justify-content': config.colConfig[i]?.style?.justifyContent\n ? config.colConfig[i]?.style?.justifyContent\n : config.colConfig[i]?.type === 'number'\n ? 'flex-end'\n : 'space-between'\n }\"\n >\n <p\n *ngIf=\"config.colConfig[i]?.type !== 'custom'\"\n [ngStyle]=\"{\n color: config?.colConfig[i]?.style?.color ? config?.colConfig[i]?.style?.color : ''\n }\"\n [ngClass]=\"{'text-ellipsis': !!config?.colConfig[i]?.style?.textEllipsis}\"\n class=\"t-col-text\"\n >\n {{ col }}\n </p>\n <ng-template\n *ngIf=\"config.colConfig[i]?.type === 'custom'\"\n [customComponent]=\"config.colConfig[i].componentRef\"\n [data]=\"col\"\n customTableCell\n ></ng-template>\n </div>\n </div>\n </div>\n <div *ngIf=\"config?.canExpand && expandedIndex === i\" class=\"sub-row\">\n <ng-container *ngIf=\"subTableDataLoading\">\n <div [ngStyle]=\"{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: '16px'\n }\">\n Loading...\n </div>\n </ng-container>\n \n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length === 0\">\n <div [ngStyle]=\"{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n padding: '16px'\n }\">\n No Data Available...\n </div>\n </ng-container>\n \n <ng-container *ngIf=\"!subTableDataLoading && subTableData.length > 0\">\n <sub-table [config]=\"subTableconfig\" [tableData]=\"subTableData\"></sub-table>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n <div\n *ngIf=\"config?.paginationConfig && (tableLength >= config.paginationConfig.rowsPerPage || config.paginationConfig?.selectedPage !== 1)\"\n id=\"pagination-container\"\n >\n <p id=\"pagination-text\">\n Showing\n {{ (config.paginationConfig?.selectedPage - 1) * config.paginationConfig.rowsPerPage + 1 }}-{{\n (config.paginationConfig?.selectedPage - 1) * config.paginationConfig.rowsPerPage + tableLength\n }}\n of {{ config.paginationConfig.totalNoOfRows }} items\n </p>\n <div id=\"pages-container\">\n <span (click)=\"updateSelectedPage(config.paginationConfig?.selectedPage - 1)\" class=\"page\">\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 7 10\" width=\"7\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M0.857405 5.56295C0.855794 5.56139 0.854188 5.55982 0.852588 5.55824C0.695955 5.40408 0.617641 5.20203 0.617647 4.99998C0.617641 4.79793 0.695955 4.59588 0.852588 4.44172C0.854188 4.44014 0.855794 4.43858 0.857404 4.43702L5.13066 0.231231C5.44392 -0.0770771 5.9518 -0.0770771 6.26506 0.231231C6.57831 0.53954 6.57831 1.03941 6.26506 1.34772L2.5542 4.99998L6.26506 8.65225C6.57831 8.96055 6.57831 9.46042 6.26506 9.76873C5.9518 10.077 5.44392 10.077 5.13066 9.76873L0.857405 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n <div *ngFor=\"let pageNumber of pages\">\n <span\n (click)=\"updateSelectedPage(pageNumber)\"\n *ngIf=\"pageNumber != 0\"\n [ngClass]=\"{ 'page-active': pageNumber == config.paginationConfig?.selectedPage }\"\n class=\"page\"\n >{{ pageNumber }}</span\n >\n <span *ngIf=\"pageNumber == 0\" class=\"page-seperator\">\n <div [ngStyle]=\"{ display: 'flex' }\">\n <span class=\"dot\" [ngStyle]=\"{ 'margin-right': '4px' }\"></span>\n <span class=\"dot\" [ngStyle]=\"{ 'margin-right': '4px' }\"></span>\n <span class=\"dot\"></span>\n </div> \n </span>\n </div>\n <span (click)=\"updateSelectedPage(config.paginationConfig?.selectedPage + 1)\" class=\"page\">\n <svg fill=\"none\" height=\"10\" viewBox=\"0 0 7 10\" width=\"7\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n clip-rule=\"evenodd\"\n d=\"M6.1426 5.56295C6.14421 5.56139 6.14581 5.55982 6.14741 5.55824C6.30405 5.40408 6.38236 5.20203 6.38236 4.99998C6.38236 4.79793 6.30405 4.59588 6.14741 4.44172C6.14581 4.44014 6.14421 4.43858 6.1426 4.43702L1.86934 0.231231C1.55608 -0.0770771 1.0482 -0.0770771 0.734942 0.231231C0.421688 0.53954 0.421688 1.03941 0.734942 1.34772L4.4458 4.99998L0.734941 8.65225C0.421686 8.96055 0.421686 9.46042 0.734941 9.76873C1.0482 10.077 1.55608 10.077 1.86934 9.76873L6.1426 5.56295Z\"\n fill=\"#181F33\"\n fill-rule=\"evenodd\"\n />\n </svg>\n </span>\n </div>\n </div>\n</div>\n", styles: ["#main-container{font-family:Lato,sans-serif;position:relative}.no-scrollbar::-webkit-scrollbar{width:0}.scrollbar::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container{height:inherit;overflow-y:auto}.scroll-horizontally{height:inherit;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container{display:flex;align-items:center;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header{padding:0 16px;display:flex;align-items:center;height:100%}.col-header-text{font-style:normal;font-weight:700;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.sort-icon{display:flex;justify-content:center;align-items:center}.filter-icon{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row{height:auto;border-bottom:none}.loader ::ng-deep .mat-progress-spinner circle,.mat-spinner circle{stroke:#0937b2}.t-row{display:flex;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row:hover{background-color:#e7eefd}.active-row{background-color:#e6f6fd}.t-col-container{padding:0 16px;overflow-wrap:anywhere}.t-row-hover:hover{background-color:#0000}.t-col-container-hover:hover{background-color:#e6ebf7}.t-col-container-hover:first-child{border-left:1px solid #e0e0e0}.t-col-container-hover{border-right:1px solid #e0e0e0}.t-col{display:flex;align-items:center;height:100%}.t-col-text{font-style:normal;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.text-ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}#pagination-container{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container{display:flex;margin-right:32px}.page{display:flex;justify-content:center;align-items:center;border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;width:32px;height:32px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;margin-right:8px;cursor:pointer}.page-seperator{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active{color:#0937b2;border:1px solid #0937b2}.sort-icon{display:inline-flex;align-items:center;margin-left:4px;cursor:pointer}.sort-icon img{width:16px;height:16px;transition:opacity .2s ease}.sort-icon img:hover{opacity:.8}\n"] }]
1030
- }], () => [{ type: i0.Renderer2 }], { filtersUpdated: [{
1031
- type: Output
1032
- }], filter: [{
1033
- type: ViewChild,
1034
- args: ["filter"]
1035
- }], colHeaders: [{
1036
- type: ViewChildren,
1037
- args: ["colHeaderRef"]
1038
- }], pageSelected: [{
1039
- type: Output
1040
- }], config: [{
1041
- type: Input,
1042
- args: ["tableConfig"]
1043
- }], subTableconfig: [{
1357
+ args: [{ selector: 'mis-actions-cell', template: "<div class=\"actions-cell-container\" [ngStyle]=\"containerStyle\">\n <!-- Inline Actions -->\n <div *ngIf=\"actionType === 'inline'\" class=\"inline-actions\">\n <div *ngFor=\"let item of actionItems; trackBy: trackByAction\" class=\"action-item\"\n [ngClass]=\"{ 'disabled': item.disabled }\" (click)=\"onActionClick(item, $event)\" [title]=\"item.label\">\n <img *ngIf=\"isSvgFile(item.icon)\" [src]=\"item.icon\" [alt]=\"item.label\" class=\"action-icon-svg\" />\n <span *ngIf=\"!isSvgFile(item.icon)\" class=\"action-icon\" [innerHTML]=\"item.icon\"></span>\n </div>\n </div>\n\n <!-- Dropdown Actions -->\n <div *ngIf=\"actionType === 'dropdown'\" class=\"dropdown-actions\">\n <div class=\"dropdown-trigger\" (click)=\"toggleDropdown($event)\" title=\"More actions\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\">\n <circle cx=\"8\" cy=\"4\" r=\"1.5\" fill=\"#333\" />\n <circle cx=\"8\" cy=\"8\" r=\"1.5\" fill=\"#333\" />\n <circle cx=\"8\" cy=\"12\" r=\"1.5\" fill=\"#333\" />\n </svg>\n </div>\n\n <div class=\"dropdown-menu\" *ngIf=\"isDropdownOpen\">\n <div class=\"dropdown-menu-item\" *ngFor=\"let item of actionItems\" \n (click)=\"onDropdownItemClick(item, $event)\">\n <ng-container *ngIf=\"item.children?.length; else noChildren\">\n <span class=\"dropdown-icon\">\n <img *ngIf=\"item.icon\" [src]=\"item.icon\" />\n </span>\n <span class=\"dropdown-label\">{{ item.label }}</span>\n <span class=\"submenu-arrow\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M9 6L15 12L9 18\" stroke=\"#0D1321\" stroke-width=\"2\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\" />\n </svg>\n </span>\n\n <!-- DYNAMIC SUBMENU -->\n <div class=\"dropdown-submenu\"\n [ngClass]=\"{ 'left': submenuAlign === 'left', 'right': submenuAlign !== 'left' }\"\n *ngIf=\"item.showSubmenu\">\n <div class=\"dropdown-menu-item\" *ngFor=\"let child of item.children\"\n (click)=\"handleAction(child)\">\n <span class=\"dropdown-icon\" *ngIf=\"child.icon\">\n <img [src]=\"child.icon\" />\n </span>\n <span class=\"dropdown-label\">{{ child.label }}</span>\n </div>\n </div>\n </ng-container>\n\n <ng-template #noChildren>\n <span class=\"dropdown-icon\" *ngIf=\"item.icon\">\n <img [src]=\"item.icon\" />\n </span>\n <span class=\"dropdown-label\">{{ item.label }}</span>\n </ng-template>\n </div>\n </div>\n </div>\n</div>", styles: [".actions-cell-container{display:flex;align-items:center;justify-content:center;width:100%;height:100%;position:relative;box-sizing:border-box}.inline-actions{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;flex-wrap:nowrap;padding:4px 0;flex-direction:row}.action-item{display:flex;align-items:center;justify-content:center;height:20px;border-radius:4px;cursor:pointer;transition:all .2s ease;background-color:transparent;border:none;outline:none;flex-shrink:0;min-height:20px}.action-item:hover:not(.disabled){background-color:#0000000a;transform:scale(1.05)}.action-item:active:not(.disabled){transform:scale(.95)}.action-item.disabled{opacity:.5;cursor:not-allowed}.action-item.disabled:hover{background-color:transparent;transform:none}.action-icon{font-size:16px;color:#666;display:flex;align-items:center;justify-content:center;width:100%;height:100%}.action-icon-svg{width:18px;height:18px;object-fit:contain;filter:brightness(0) saturate(100%) invert(40%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(.6) contrast(1);flex-shrink:0}.action-icon-svg:hover{filter:brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0) contrast(1)}.dropdown-trigger{cursor:pointer}.dropdown-actions{position:relative}.dropdown-trigger{cursor:pointer;display:flex;align-items:center;justify-content:center}.dropdown-menu{position:absolute;top:100%;right:0;width:240px;background:#fff;border-radius:12px;box-shadow:0 4px 24px #0000001f;z-index:1000;padding:8px 0}.dropdown-menu-item.disabled{color:#aaa;cursor:not-allowed}.dropdown-menu-item:hover:not(.disabled),.dropdown-menu-item.has-submenu:hover{background:#f5f5f5}.dropdown-menu-item{display:flex;align-items:center;padding:10px 18px;cursor:pointer;font-size:14px;position:relative}.dropdown-menu-item .dropdown-label{flex:1;margin-left:8px}.dropdown-menu-item .submenu-arrow{margin-left:auto;width:16px;height:16px}.submenu-container{position:absolute;top:0;left:100%;margin-left:4px;background:#fff;box-shadow:0 4px 8px #0000001a;border-radius:8px;z-index:1000;white-space:nowrap}.dropdown-submenu{position:absolute;top:0;min-width:180px;background:#fff;border-radius:12px;box-shadow:0 4px 24px #0000001f;padding:8px 0;z-index:1001}.dropdown-submenu.right{left:100%;margin-left:4px}.dropdown-submenu.left{left:auto;right:100%;margin-right:8px;background-color:#fff;border:1px solid #ddd;z-index:9999;position:absolute}.submenu-arrow{display:flex;align-items:center;margin-left:auto;z-index:9999}\n"] }]
1358
+ }], null, { data: [{
1044
1359
  type: Input
1045
- }], tableDataLoading: [{
1360
+ }], actionItems: [{
1046
1361
  type: Input
1047
- }], expandedIndex: [{
1362
+ }], actionType: [{
1048
1363
  type: Input
1049
- }], tableData: [{
1364
+ }], dropdownIcon: [{
1050
1365
  type: Input
1051
- }], subTableData: [{
1366
+ }], submenuAlign: [{
1052
1367
  type: Input
1053
- }], subTableDataLoading: [{
1368
+ }], style: [{
1054
1369
  type: Input
1055
- }], table: [{
1056
- type: ViewChild,
1057
- args: ["table"]
1058
- }], sortChange: [{
1370
+ }], actionClick: [{
1059
1371
  type: Output
1372
+ }], onDocumentClick: [{
1373
+ type: HostListener,
1374
+ args: ['document:click']
1060
1375
  }] }); })();
1061
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TableComponent, { className: "TableComponent" }); })();
1376
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActionsCellComponent, { className: "ActionsCellComponent" }); })();
1062
1377
 
1063
1378
  class TableModule {
1064
1379
  static forRoot() {
@@ -1076,7 +1391,8 @@ class TableModule {
1076
1391
  SubTableComponent,
1077
1392
  TableFilterComponent,
1078
1393
  CustomTableCellDirective,
1079
- SortIconsDirective
1394
+ SortIconsDirective,
1395
+ ActionsCellComponent
1080
1396
  ],
1081
1397
  imports: [CommonModule, CheckboxModule, ScrollingModule],
1082
1398
  exports: [
@@ -1084,7 +1400,8 @@ class TableModule {
1084
1400
  SubTableComponent,
1085
1401
  TableFilterComponent,
1086
1402
  CustomTableCellDirective,
1087
- SortIconsDirective
1403
+ SortIconsDirective,
1404
+ ActionsCellComponent
1088
1405
  ]
1089
1406
  }]
1090
1407
  }], null, null); })();
@@ -1092,15 +1409,22 @@ class TableModule {
1092
1409
  SubTableComponent,
1093
1410
  TableFilterComponent,
1094
1411
  CustomTableCellDirective,
1095
- SortIconsDirective], imports: [CommonModule, CheckboxModule, ScrollingModule], exports: [TableComponent,
1412
+ SortIconsDirective,
1413
+ ActionsCellComponent], imports: [CommonModule, CheckboxModule, ScrollingModule], exports: [TableComponent,
1096
1414
  SubTableComponent,
1097
1415
  TableFilterComponent,
1098
1416
  CustomTableCellDirective,
1099
- SortIconsDirective] }); })();
1417
+ SortIconsDirective,
1418
+ ActionsCellComponent] }); })();
1419
+ i0.ɵɵsetComponentScope(TableComponent, [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, SubTableComponent,
1420
+ TableFilterComponent,
1421
+ CustomTableCellDirective,
1422
+ SortIconsDirective,
1423
+ ActionsCellComponent], []);
1100
1424
 
1101
1425
  /**
1102
1426
  * Generated bundle index. Do not edit.
1103
1427
  */
1104
1428
 
1105
- export { CustomTableCellDirective, SortIconsDirective, SubTableComponent, TableComponent, TableFilterComponent, TableModule };
1429
+ export { ActionsCellComponent, CustomTableCellDirective, SortIconsDirective, SubTableComponent, TableComponent, TableFilterComponent, TableModule };
1106
1430
  //# sourceMappingURL=mis-crystal-design-system-table.mjs.map