mis-crystal-design-system 18.0.19-test-1 → 18.0.19-test-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/table/actions-cell/actions-cell.component.mjs +185 -134
- package/esm2022/table/table.component.mjs +4 -19
- package/esm2022/table/table.module.mjs +6 -4
- package/fesm2022/mis-crystal-design-system-table.mjs +394 -357
- package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
- package/package.json +7 -7
- package/table/actions-cell/actions-cell.component.d.ts +14 -5
- package/table/table.component.d.ts +0 -3
- package/table/table.module.d.ts +3 -1
|
@@ -1,326 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component,
|
|
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
|
-
import * as i2 from '
|
|
6
|
-
import { CheckboxModule } from 'mis-crystal-design-system/checkbox';
|
|
7
|
-
import * as i2$1 from '@angular/cdk/scrolling';
|
|
5
|
+
import * as i2 from '@angular/cdk/scrolling';
|
|
8
6
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
7
|
+
import * as i2$1 from 'mis-crystal-design-system/checkbox';
|
|
8
|
+
import { CheckboxModule } from 'mis-crystal-design-system/checkbox';
|
|
9
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
10
|
+
import { OverlayConfig, ConnectionPositionPair, OverlayModule } from '@angular/cdk/overlay';
|
|
11
|
+
import { TemplatePortal, PortalModule } from '@angular/cdk/portal';
|
|
9
12
|
|
|
10
|
-
const _c0$3 =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
i0.ɵɵelementStart(0, "div", 7);
|
|
14
|
-
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)); });
|
|
15
|
-
i0.ɵɵelement(1, "img", 8);
|
|
16
|
-
i0.ɵɵelementEnd();
|
|
17
|
-
} if (rf & 2) {
|
|
18
|
-
const item_r2 = ctx.$implicit;
|
|
19
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
20
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0$3, ctx_r2.isDisabled(item_r2)));
|
|
21
|
-
i0.ɵɵadvance();
|
|
22
|
-
i0.ɵɵproperty("src", item_r2.icon, i0.ɵɵsanitizeUrl)("alt", item_r2.label);
|
|
23
|
-
} }
|
|
24
|
-
function ActionsCellComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
-
i0.ɵɵelementStart(0, "div", 5);
|
|
26
|
-
i0.ɵɵtemplate(1, ActionsCellComponent_div_1_div_1_Template, 2, 5, "div", 6);
|
|
27
|
-
i0.ɵɵelementEnd();
|
|
28
|
-
} if (rf & 2) {
|
|
29
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
30
|
-
i0.ɵɵadvance();
|
|
31
|
-
i0.ɵɵproperty("ngForOf", ctx_r2.actionItems)("ngForTrackBy", ctx_r2.trackByAction);
|
|
32
|
-
} }
|
|
33
|
-
function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
-
i0.ɵɵelementStart(0, "span", 26);
|
|
35
|
-
i0.ɵɵelement(1, "img", 27);
|
|
36
|
-
i0.ɵɵelementEnd();
|
|
37
|
-
} if (rf & 2) {
|
|
38
|
-
const item_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
39
|
-
i0.ɵɵadvance();
|
|
40
|
-
i0.ɵɵproperty("src", item_r6.icon, i0.ɵɵsanitizeUrl);
|
|
41
|
-
} }
|
|
42
|
-
function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_7_div_1_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
-
i0.ɵɵelementStart(0, "span", 26);
|
|
44
|
-
i0.ɵɵelement(1, "img", 27);
|
|
45
|
-
i0.ɵɵelementEnd();
|
|
46
|
-
} if (rf & 2) {
|
|
47
|
-
const child_r8 = i0.ɵɵnextContext().$implicit;
|
|
48
|
-
i0.ɵɵadvance();
|
|
49
|
-
i0.ɵɵproperty("src", child_r8.icon, i0.ɵɵsanitizeUrl);
|
|
50
|
-
} }
|
|
51
|
-
function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_7_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
-
const _r7 = i0.ɵɵgetCurrentView();
|
|
53
|
-
i0.ɵɵelementStart(0, "div", 18);
|
|
54
|
-
i0.ɵɵlistener("click", function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_7_div_1_Template_div_click_0_listener($event) { const child_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r2 = i0.ɵɵnextContext(6); return i0.ɵɵresetView(ctx_r2.onDropdownItemClick(child_r8, $event)); });
|
|
55
|
-
i0.ɵɵtemplate(1, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_7_div_1_span_1_Template, 2, 1, "span", 20);
|
|
56
|
-
i0.ɵɵelementStart(2, "span", 21);
|
|
57
|
-
i0.ɵɵtext(3);
|
|
58
|
-
i0.ɵɵelementEnd()();
|
|
59
|
-
} if (rf & 2) {
|
|
60
|
-
const child_r8 = ctx.$implicit;
|
|
61
|
-
const ctx_r2 = i0.ɵɵnextContext(6);
|
|
62
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0$3, ctx_r2.isDisabled(child_r8)));
|
|
63
|
-
i0.ɵɵadvance();
|
|
64
|
-
i0.ɵɵproperty("ngIf", child_r8.icon);
|
|
65
|
-
i0.ɵɵadvance(2);
|
|
66
|
-
i0.ɵɵtextInterpolate(child_r8.label);
|
|
67
|
-
} }
|
|
68
|
-
function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
69
|
-
i0.ɵɵelementStart(0, "div", 28);
|
|
70
|
-
i0.ɵɵtemplate(1, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_7_div_1_Template, 4, 5, "div", 17);
|
|
71
|
-
i0.ɵɵelementEnd();
|
|
72
|
-
} if (rf & 2) {
|
|
73
|
-
const item_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
74
|
-
i0.ɵɵproperty("ngClass", item_r6.submenuAlign);
|
|
75
|
-
i0.ɵɵadvance();
|
|
76
|
-
i0.ɵɵproperty("ngForOf", item_r6.children);
|
|
77
|
-
} }
|
|
78
|
-
function ActionsCellComponent_div_2_div_6_div_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
-
i0.ɵɵelementContainerStart(0);
|
|
80
|
-
i0.ɵɵtemplate(1, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_span_1_Template, 2, 1, "span", 20);
|
|
81
|
-
i0.ɵɵelementStart(2, "span", 21);
|
|
82
|
-
i0.ɵɵtext(3);
|
|
83
|
-
i0.ɵɵelementEnd();
|
|
84
|
-
i0.ɵɵelementStart(4, "span", 22);
|
|
85
|
-
i0.ɵɵnamespaceSVG();
|
|
86
|
-
i0.ɵɵelementStart(5, "svg", 23);
|
|
87
|
-
i0.ɵɵelement(6, "path", 24);
|
|
88
|
-
i0.ɵɵelementEnd()();
|
|
89
|
-
i0.ɵɵtemplate(7, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_div_7_Template, 2, 2, "div", 25);
|
|
90
|
-
i0.ɵɵelementContainerEnd();
|
|
91
|
-
} if (rf & 2) {
|
|
92
|
-
const item_r6 = i0.ɵɵnextContext().$implicit;
|
|
93
|
-
i0.ɵɵadvance();
|
|
94
|
-
i0.ɵɵproperty("ngIf", item_r6.icon);
|
|
95
|
-
i0.ɵɵadvance(2);
|
|
96
|
-
i0.ɵɵtextInterpolate(item_r6.label);
|
|
97
|
-
i0.ɵɵadvance(4);
|
|
98
|
-
i0.ɵɵproperty("ngIf", item_r6.showSubmenu);
|
|
99
|
-
} }
|
|
100
|
-
function ActionsCellComponent_div_2_div_6_div_1_ng_template_2_span_0_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
-
i0.ɵɵelementStart(0, "span", 26);
|
|
102
|
-
i0.ɵɵelement(1, "img", 27);
|
|
103
|
-
i0.ɵɵelementEnd();
|
|
104
|
-
} if (rf & 2) {
|
|
105
|
-
const item_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
106
|
-
i0.ɵɵadvance();
|
|
107
|
-
i0.ɵɵproperty("src", item_r6.icon, i0.ɵɵsanitizeUrl);
|
|
108
|
-
} }
|
|
109
|
-
function ActionsCellComponent_div_2_div_6_div_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
110
|
-
i0.ɵɵtemplate(0, ActionsCellComponent_div_2_div_6_div_1_ng_template_2_span_0_Template, 2, 1, "span", 20);
|
|
111
|
-
i0.ɵɵelementStart(1, "span", 21);
|
|
112
|
-
i0.ɵɵtext(2);
|
|
113
|
-
i0.ɵɵelementEnd();
|
|
114
|
-
} if (rf & 2) {
|
|
115
|
-
const item_r6 = i0.ɵɵnextContext().$implicit;
|
|
116
|
-
i0.ɵɵproperty("ngIf", item_r6.icon);
|
|
117
|
-
i0.ɵɵadvance(2);
|
|
118
|
-
i0.ɵɵtextInterpolate(item_r6.label);
|
|
119
|
-
} }
|
|
120
|
-
function ActionsCellComponent_div_2_div_6_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
121
|
-
const _r5 = i0.ɵɵgetCurrentView();
|
|
122
|
-
i0.ɵɵelementStart(0, "div", 18);
|
|
123
|
-
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)); });
|
|
124
|
-
i0.ɵɵtemplate(1, ActionsCellComponent_div_2_div_6_div_1_ng_container_1_Template, 8, 3, "ng-container", 19)(2, ActionsCellComponent_div_2_div_6_div_1_ng_template_2_Template, 3, 2, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
125
|
-
i0.ɵɵelementEnd();
|
|
126
|
-
} if (rf & 2) {
|
|
127
|
-
const item_r6 = ctx.$implicit;
|
|
128
|
-
const noChildren_r9 = i0.ɵɵreference(3);
|
|
129
|
-
const ctx_r2 = i0.ɵɵnextContext(3);
|
|
130
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0$3, ctx_r2.isDisabled(item_r6)));
|
|
131
|
-
i0.ɵɵadvance();
|
|
132
|
-
i0.ɵɵproperty("ngIf", item_r6.children == null ? null : item_r6.children.length)("ngIfElse", noChildren_r9);
|
|
133
|
-
} }
|
|
134
|
-
function ActionsCellComponent_div_2_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
135
|
-
i0.ɵɵelementStart(0, "div", 16);
|
|
136
|
-
i0.ɵɵtemplate(1, ActionsCellComponent_div_2_div_6_div_1_Template, 4, 5, "div", 17);
|
|
137
|
-
i0.ɵɵelementEnd();
|
|
138
|
-
} if (rf & 2) {
|
|
139
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
140
|
-
i0.ɵɵproperty("ngClass", ctx_r2.menuAlign);
|
|
141
|
-
i0.ɵɵadvance();
|
|
142
|
-
i0.ɵɵproperty("ngForOf", ctx_r2.actionItems);
|
|
143
|
-
} }
|
|
144
|
-
function ActionsCellComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
145
|
-
const _r4 = i0.ɵɵgetCurrentView();
|
|
146
|
-
i0.ɵɵelementStart(0, "div", 9)(1, "div", 10);
|
|
147
|
-
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)); });
|
|
148
|
-
i0.ɵɵnamespaceSVG();
|
|
149
|
-
i0.ɵɵelementStart(2, "svg", 11);
|
|
150
|
-
i0.ɵɵelement(3, "circle", 12)(4, "circle", 13)(5, "circle", 14);
|
|
151
|
-
i0.ɵɵelementEnd()();
|
|
152
|
-
i0.ɵɵtemplate(6, ActionsCellComponent_div_2_div_6_Template, 2, 2, "div", 15);
|
|
153
|
-
i0.ɵɵelementEnd();
|
|
154
|
-
} if (rf & 2) {
|
|
155
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
156
|
-
i0.ɵɵadvance(6);
|
|
157
|
-
i0.ɵɵproperty("ngIf", ctx_r2.isDropdownOpen);
|
|
158
|
-
} }
|
|
159
|
-
function ActionsCellComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
160
|
-
const _r10 = i0.ɵɵgetCurrentView();
|
|
161
|
-
i0.ɵɵelementStart(0, "div", 29)(1, "mis-checkbox", 30);
|
|
162
|
-
i0.ɵɵlistener("valueChange", function ActionsCellComponent_div_3_Template_mis_checkbox_valueChange_1_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCheckboxChange($event)); });
|
|
163
|
-
i0.ɵɵelementEnd()();
|
|
164
|
-
} if (rf & 2) {
|
|
165
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
166
|
-
i0.ɵɵadvance();
|
|
167
|
-
i0.ɵɵproperty("checked", ctx_r2.isChecked)("disabled", ctx_r2.disable ? ctx_r2.disable(ctx_r2.data) : false);
|
|
168
|
-
} }
|
|
169
|
-
class ActionsCellComponent {
|
|
170
|
-
constructor() {
|
|
171
|
-
this.isChecked = false;
|
|
172
|
-
this.actionClick = new EventEmitter();
|
|
173
|
-
this.dropdownToggled = new EventEmitter();
|
|
174
|
-
this.isDropdownOpen = false;
|
|
175
|
-
this.actionItems = [];
|
|
176
|
-
this.actionType = "inline";
|
|
177
|
-
this.submenuAlign = "right";
|
|
178
|
-
this.menuAlign = "left";
|
|
179
|
-
this._style = {};
|
|
180
|
-
this.containerStyle = {};
|
|
181
|
-
}
|
|
182
|
-
set rowData(value) {
|
|
183
|
-
if (this.actionType === 'checkbox') {
|
|
184
|
-
// For checkbox, keep the rowData structure
|
|
185
|
-
this.data = value?.rowData ?? {};
|
|
186
|
-
this.isChecked = value?.isChecked ?? false;
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
// For other actions (dropdown, inline), use the value directly
|
|
190
|
-
this.data = value;
|
|
191
|
-
this.isChecked = false;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
set config(config) {
|
|
195
|
-
this.actionItems = config?.actionItems,
|
|
196
|
-
this.actionType = config.actionType,
|
|
197
|
-
this.submenuAlign = config.submenuAlign,
|
|
198
|
-
this.menuAlign = config.menuAlign;
|
|
199
|
-
this._style = config.style;
|
|
200
|
-
this.action = config.action;
|
|
201
|
-
this.disable = config.disable;
|
|
202
|
-
this.processStyle();
|
|
203
|
-
}
|
|
204
|
-
ngOnInit() { }
|
|
205
|
-
processStyle() {
|
|
206
|
-
// Remove width from style to avoid conflicts with table column width
|
|
207
|
-
const { width, ...restStyle } = this._style;
|
|
208
|
-
this.containerStyle = restStyle;
|
|
209
|
-
}
|
|
210
|
-
onActionClick(item, event) {
|
|
211
|
-
event.stopPropagation();
|
|
212
|
-
// Check permissions before executing action
|
|
213
|
-
if (this.isDisabled(item))
|
|
214
|
-
return;
|
|
215
|
-
// Execute action only if permitted
|
|
216
|
-
if (item.action) {
|
|
217
|
-
item.action(this.data);
|
|
218
|
-
}
|
|
219
|
-
this.actionClick.emit({ item, data: this.data });
|
|
220
|
-
}
|
|
221
|
-
trackByAction(index, item) {
|
|
222
|
-
return item.value;
|
|
223
|
-
}
|
|
224
|
-
isSvgFile(iconPath) {
|
|
225
|
-
if (!iconPath)
|
|
226
|
-
return false;
|
|
227
|
-
return iconPath.toLowerCase().includes(".svg") || iconPath.toLowerCase().includes("assets/icons/");
|
|
228
|
-
}
|
|
229
|
-
onDocumentClick() {
|
|
230
|
-
if (this.isDropdownOpen) {
|
|
231
|
-
this.isDropdownOpen = false;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
// method to close dropdown
|
|
235
|
-
closeDropdown() {
|
|
236
|
-
if (this.isDropdownOpen) {
|
|
237
|
-
this.isDropdownOpen = false;
|
|
238
|
-
this.actionItems.forEach((item) => (item.showSubmenu = false));
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
toggleDropdown(event) {
|
|
242
|
-
event.stopPropagation();
|
|
243
|
-
// Emit self when opening dropdown
|
|
244
|
-
if (!this.isDropdownOpen) {
|
|
245
|
-
this.dropdownToggled.emit(this);
|
|
246
|
-
}
|
|
247
|
-
this.isDropdownOpen = !this.isDropdownOpen;
|
|
248
|
-
// Close all submenus when opening/closing main menu
|
|
249
|
-
this.actionItems.forEach((item) => (item.showSubmenu = false));
|
|
250
|
-
}
|
|
251
|
-
onDropdownItemClick(item, event) {
|
|
252
|
-
event.stopPropagation();
|
|
253
|
-
if (this.isDisabled(item))
|
|
254
|
-
return;
|
|
255
|
-
if (item?.children?.length) {
|
|
256
|
-
// Toggle submenu
|
|
257
|
-
item.showSubmenu = !item.showSubmenu;
|
|
258
|
-
// Optionally close other submenus
|
|
259
|
-
this.actionItems.forEach((i) => {
|
|
260
|
-
if (i !== item)
|
|
261
|
-
i.showSubmenu = false;
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
else {
|
|
265
|
-
// Handle action
|
|
266
|
-
if (item.action)
|
|
267
|
-
item.action(this.data);
|
|
268
|
-
this.actionClick.emit({ item, data: this.data });
|
|
269
|
-
this.isDropdownOpen = false; // Only close if action was executed
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
onCheckboxChange(event) {
|
|
273
|
-
this.isChecked = event?.value ?? false;
|
|
274
|
-
this.actionClick.emit({
|
|
275
|
-
isChecked: this.isChecked,
|
|
276
|
-
data: this.data
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
isDisabled(item) {
|
|
280
|
-
if (typeof item.disable === "function") {
|
|
281
|
-
return item.disable(this.data);
|
|
282
|
-
}
|
|
283
|
-
return false;
|
|
284
|
-
}
|
|
285
|
-
static { this.ɵfac = function ActionsCellComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActionsCellComponent)(); }; }
|
|
286
|
-
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActionsCellComponent, selectors: [["mis-actions-cell"]], hostBindings: function ActionsCellComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
287
|
-
i0.ɵɵlistener("click", function ActionsCellComponent_click_HostBindingHandler() { return ctx.onDocumentClick(); }, false, i0.ɵɵresolveDocument);
|
|
288
|
-
} }, inputs: { rowData: "rowData", isChecked: "isChecked", config: "config" }, outputs: { actionClick: "actionClick", dropdownToggled: "dropdownToggled" }, decls: 4, vars: 4, consts: [["noChildren", ""], [1, "actions-cell-container", 3, "ngStyle"], ["class", "inline-actions", 4, "ngIf"], ["class", "dropdown-actions", 4, "ngIf"], ["class", "checkbox-actions", 4, "ngIf"], [1, "inline-actions"], ["class", "action-item", 3, "ngClass", "click", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "action-item", 3, "click", "ngClass"], [1, "action-icon-svg", 3, "src", "alt"], [1, "dropdown-actions"], ["title", "More actions", 1, "dropdown-trigger", 3, "click"], ["width", "20", "height", "20", "viewBox", "0 0 20 20", "fill", "none"], ["cx", "10", "cy", "4", "r", "2", "fill", "#333"], ["cx", "10", "cy", "10", "r", "2", "fill", "#333"], ["cx", "10", "cy", "16", "r", "2", "fill", "#333"], ["class", "dropdown-menu", 3, "ngClass", 4, "ngIf"], [1, "dropdown-menu", 3, "ngClass"], ["class", "dropdown-menu-item", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], [1, "dropdown-menu-item", 3, "click", "ngClass"], [4, "ngIf", "ngIfElse"], ["class", "dropdown-icon", 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"], [1, "dropdown-icon"], [3, "src"], [1, "dropdown-submenu", 3, "ngClass"], [1, "checkbox-actions"], [3, "valueChange", "checked", "disabled"]], template: function ActionsCellComponent_Template(rf, ctx) { if (rf & 1) {
|
|
289
|
-
i0.ɵɵelementStart(0, "div", 1);
|
|
290
|
-
i0.ɵɵtemplate(1, ActionsCellComponent_div_1_Template, 2, 2, "div", 2)(2, ActionsCellComponent_div_2_Template, 7, 1, "div", 3)(3, ActionsCellComponent_div_3_Template, 2, 2, "div", 4);
|
|
291
|
-
i0.ɵɵelementEnd();
|
|
292
|
-
} if (rf & 2) {
|
|
293
|
-
i0.ɵɵproperty("ngStyle", ctx.containerStyle);
|
|
294
|
-
i0.ɵɵadvance();
|
|
295
|
-
i0.ɵɵproperty("ngIf", ctx.actionType === "inline");
|
|
296
|
-
i0.ɵɵadvance();
|
|
297
|
-
i0.ɵɵproperty("ngIf", ctx.actionType === "dropdown");
|
|
298
|
-
i0.ɵɵadvance();
|
|
299
|
-
i0.ɵɵproperty("ngIf", ctx.actionType === "checkbox");
|
|
300
|
-
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, i2.CheckboxComponent], 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%;width:232px;background:#fff;border-radius:12px;box-shadow:0 4px 24px #0000001f;z-index:1000;padding:8px 0}.dropdown-menu.left[_ngcontent-%COMP%]{right:0!important;left:auto!important}.dropdown-menu.right[_ngcontent-%COMP%]{left:0!important;right:auto!important}.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:132px;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%;background-color:#fff;border:1px solid #ddd;z-index:9999;position:absolute;margin-right:4px}.submenu-arrow[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:auto;z-index:9999}.dropdown-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.dropdown-menu-item.disabled[_ngcontent-%COMP%]{color:#181f33;filter:grayscale(100%) opacity(.3);cursor:not-allowed}"] }); }
|
|
301
|
-
}
|
|
302
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActionsCellComponent, [{
|
|
303
|
-
type: Component,
|
|
304
|
-
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\n *ngFor=\"let item of actionItems; trackBy: trackByAction\"\n class=\"action-item\"\n [ngClass]=\"{ disabled: isDisabled(item) }\"\n (click)=\"onActionClick(item, $event)\"\n >\n <img [src]=\"item.icon\" [alt]=\"item.label\" class=\"action-icon-svg\" />\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=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <circle cx=\"10\" cy=\"4\" r=\"2\" fill=\"#333\" />\n <circle cx=\"10\" cy=\"10\" r=\"2\" fill=\"#333\" />\n <circle cx=\"10\" cy=\"16\" r=\"2\" fill=\"#333\" />\n </svg>\n </div>\n\n <div class=\"dropdown-menu\" *ngIf=\"isDropdownOpen\" [ngClass]=\"menuAlign\">\n <div\n class=\"dropdown-menu-item\"\n *ngFor=\"let item of actionItems\"\n (click)=\"onDropdownItemClick(item, $event)\"\n [ngClass]=\"{ disabled: isDisabled(item) }\"\n >\n <ng-container *ngIf=\"item.children?.length; else 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 <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\" stroke-linejoin=\"round\" />\n </svg>\n </span>\n\n <!-- DYNAMIC SUBMENU -->\n <div class=\"dropdown-submenu\" [ngClass]=\"item.submenuAlign\" *ngIf=\"item.showSubmenu\">\n <div\n class=\"dropdown-menu-item\"\n *ngFor=\"let child of item.children\"\n [ngClass]=\"{ disabled: isDisabled(child) }\"\n (click)=\"onDropdownItemClick(child, $event)\"\n >\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\n <!-- Checkbox Actions -->\n <div *ngIf=\"actionType === 'checkbox'\" class=\"checkbox-actions\">\n <mis-checkbox [checked]=\"isChecked\" (valueChange)=\"onCheckboxChange($event)\" [disabled]=\"disable ? disable(data) : false\"\n > </mis-checkbox>\n </div>\n</div>\n", 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%;width:232px;background:#fff;border-radius:12px;box-shadow:0 4px 24px #0000001f;z-index:1000;padding:8px 0}.dropdown-menu.left{right:0!important;left:auto!important}.dropdown-menu.right{left:0!important;right:auto!important}.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:132px;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%;background-color:#fff;border:1px solid #ddd;z-index:9999;position:absolute;margin-right:4px}.submenu-arrow{display:flex;align-items:center;margin-left:auto;z-index:9999}.dropdown-icon{display:flex;justify-content:center;align-items:center}.dropdown-menu-item.disabled{color:#181f33;filter:grayscale(100%) opacity(.3);cursor:not-allowed}\n"] }]
|
|
305
|
-
}], null, { rowData: [{
|
|
306
|
-
type: Input
|
|
307
|
-
}], isChecked: [{
|
|
308
|
-
type: Input
|
|
309
|
-
}], config: [{
|
|
310
|
-
type: Input
|
|
311
|
-
}], actionClick: [{
|
|
312
|
-
type: Output
|
|
313
|
-
}], dropdownToggled: [{
|
|
314
|
-
type: Output
|
|
315
|
-
}], onDocumentClick: [{
|
|
316
|
-
type: HostListener,
|
|
317
|
-
args: ["document:click"]
|
|
318
|
-
}] }); })();
|
|
319
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActionsCellComponent, { className: "ActionsCellComponent" }); })();
|
|
320
|
-
|
|
321
|
-
const _c0$2 = ["filter"];
|
|
322
|
-
const _c1$2 = ["table"];
|
|
323
|
-
const _c2$2 = ["colHeaderRef"];
|
|
13
|
+
const _c0$3 = ["filter"];
|
|
14
|
+
const _c1$3 = ["table"];
|
|
15
|
+
const _c2$3 = ["colHeaderRef"];
|
|
324
16
|
const _c3$1 = (a0, a1, a2) => ({ height: a0, width: a1, "overflow-x": a2 });
|
|
325
17
|
const _c4$1 = (a0, a1, a2) => ({ "no-scrollbar": a0, scrollbar: a1, "scroll-horizontally": a2 });
|
|
326
18
|
const _c5$1 = (a0, a1, a2) => ({ width: a0, cursor: a1, "justify-content": a2 });
|
|
@@ -446,7 +138,7 @@ function TableComponent_div_7_div_2_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
446
138
|
function TableComponent_div_7_div_2_mis_actions_cell_4_Template(rf, ctx) { if (rf & 1) {
|
|
447
139
|
const _r15 = i0.ɵɵgetCurrentView();
|
|
448
140
|
i0.ɵɵelementStart(0, "mis-actions-cell", 37);
|
|
449
|
-
i0.ɵɵlistener("actionClick", function TableComponent_div_7_div_2_mis_actions_cell_4_Template_mis_actions_cell_actionClick_0_listener($event) { i0.ɵɵrestoreView(_r15); const rowIndex_r16 = i0.ɵɵnextContext(2).index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onActionClick($event, rowIndex_r16)); })
|
|
141
|
+
i0.ɵɵlistener("actionClick", function TableComponent_div_7_div_2_mis_actions_cell_4_Template_mis_actions_cell_actionClick_0_listener($event) { i0.ɵɵrestoreView(_r15); const rowIndex_r16 = i0.ɵɵnextContext(2).index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onActionClick($event, rowIndex_r16)); });
|
|
450
142
|
i0.ɵɵelementEnd();
|
|
451
143
|
} if (rf & 2) {
|
|
452
144
|
const ctx_r13 = i0.ɵɵnextContext();
|
|
@@ -884,28 +576,17 @@ class TableComponent {
|
|
|
884
576
|
});
|
|
885
577
|
}
|
|
886
578
|
}
|
|
887
|
-
closeOtherDropdowns(exceptComponent) {
|
|
888
|
-
if (this.actionCells) {
|
|
889
|
-
this.actionCells.forEach(cell => {
|
|
890
|
-
if (cell !== exceptComponent) {
|
|
891
|
-
cell.closeDropdown();
|
|
892
|
-
}
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
579
|
static { this.ɵfac = function TableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TableComponent)(i0.ɵɵdirectiveInject(i0.Renderer2)); }; }
|
|
897
580
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableComponent, selectors: [["mis-table"]], viewQuery: function TableComponent_Query(rf, ctx) { if (rf & 1) {
|
|
898
|
-
i0.ɵɵviewQuery(_c0$
|
|
899
|
-
i0.ɵɵviewQuery(_c1$
|
|
900
|
-
i0.ɵɵviewQuery(_c2$
|
|
901
|
-
i0.ɵɵviewQuery(ActionsCellComponent, 5);
|
|
581
|
+
i0.ɵɵviewQuery(_c0$3, 5);
|
|
582
|
+
i0.ɵɵviewQuery(_c1$3, 5);
|
|
583
|
+
i0.ɵɵviewQuery(_c2$3, 5);
|
|
902
584
|
} if (rf & 2) {
|
|
903
585
|
let _t;
|
|
904
586
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filter = _t.first);
|
|
905
587
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.table = _t.first);
|
|
906
588
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.colHeaders = _t);
|
|
907
|
-
|
|
908
|
-
} }, inputs: { config: [0, "tableConfig", "config"], subTableconfig: "subTableconfig", tableDataLoading: "tableDataLoading", expandedIndex: "expandedIndex", tableData: "tableData", subTableData: "subTableData", subTableDataLoading: "subTableDataLoading" }, outputs: { filtersUpdated: "filtersUpdated", pageSelected: "pageSelected", sortChange: "sortChange", headerAction: "headerAction" }, 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"], ["class", "checkbox-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"], [1, "checkbox-icon", 3, "click"], [3, "checked"], ["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, "rowData", "config", "isChecked", "ngClass", "actionClick", "dropdownToggled", 4, "ngIf"], [1, "t-col-text", 3, "ngStyle", "ngClass"], [3, "actionClick", "dropdownToggled", "rowData", "config", "isChecked", "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"], ["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"], [4, "ngFor", "ngForOf"], ["class", "page page-jumping-enabled", 3, "ngClass", "click", 4, "ngIf"], ["class", "page-seperator", 4, "ngIf"], [1, "page", "page-jumping-enabled", 3, "click", "ngClass"], [1, "page-seperator"], [1, "dot", 3, "ngStyle"], [1, "dot"]], template: function TableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
589
|
+
} }, inputs: { config: [0, "tableConfig", "config"], subTableconfig: "subTableconfig", tableDataLoading: "tableDataLoading", expandedIndex: "expandedIndex", tableData: "tableData", subTableData: "subTableData", subTableDataLoading: "subTableDataLoading" }, outputs: { filtersUpdated: "filtersUpdated", pageSelected: "pageSelected", sortChange: "sortChange", headerAction: "headerAction" }, 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"], ["class", "checkbox-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"], [1, "checkbox-icon", 3, "click"], [3, "checked"], ["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, "rowData", "config", "isChecked", "ngClass", "actionClick", 4, "ngIf"], [1, "t-col-text", 3, "ngStyle", "ngClass"], [3, "actionClick", "rowData", "config", "isChecked", "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"], ["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"], [4, "ngFor", "ngForOf"], ["class", "page page-jumping-enabled", 3, "ngClass", "click", 4, "ngIf"], ["class", "page-seperator", 4, "ngIf"], [1, "page", "page-jumping-enabled", 3, "click", "ngClass"], [1, "page-seperator"], [1, "dot", 3, "ngStyle"], [1, "dot"]], template: function TableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
909
590
|
i0.ɵɵelementStart(0, "div", 3);
|
|
910
591
|
i0.ɵɵtemplate(1, TableComponent_mis_table_filter_1_Template, 2, 2, "mis-table-filter", 4);
|
|
911
592
|
i0.ɵɵelementStart(2, "div", 5, 0)(4, "div", 6);
|
|
@@ -934,7 +615,7 @@ class TableComponent {
|
|
|
934
615
|
}
|
|
935
616
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableComponent, [{
|
|
936
617
|
type: Component,
|
|
937
|
-
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' && colHeader?.type !== 'checkbox'\" 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\n (click)=\"toggleCheckbox(); $event.stopPropagation()\"\n *ngIf=\"colHeader?.type === 'checkbox'\"\n class=\"checkbox-icon\"\n >\n <mis-checkbox [checked]=\"selectAllCheckbox\"></mis-checkbox>\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; let rowIndex = index\">\n <div\n class=\"t-row\"\n [ngClass]=\"{ 't-row-hover': config.cellHover, 'active-row': activeRowIndex.includes(i) }\"\n [ngStyle]=\"{ 'min-height': config?.rowConfig?.height ? config.rowConfig.height : '44px' }\"\n (click)=\"selectRow(i)\"\n [class.disabled-row]=\"isRowDisabled(row)\"\n >\n <div\n (click)=\"config?.colConfig[i]?.action && config?.colConfig[i]?.actionType !== 'checkbox' ? 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 <mis-actions-cell\n *ngIf=\"config.colConfig[i]?.type === 'actions'\"\n [rowData]=\"col\"\n [config]=\"config.colConfig[i]\"\n [isChecked]=\"col.isChecked\"\n (actionClick)=\"onActionClick($event, rowIndex)\"\n (dropdownToggled)=\"closeOtherDropdowns($event)\"\n [ngClass]=\"{\n 'disable-actions': config.colConfig[i]?.actionType === 'checkbox' && isRowDisabled(row)\n }\"\n ></mis-actions-cell>\n\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)=\"config.paginationConfig?.selectedPage > 1 && updateSelectedPage(config.paginationConfig?.selectedPage - 1)\" class=\"page\" [class.page-nav-inactive]=\"config.paginationConfig?.selectedPage === 1\">\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 <!-- Page numbers (only show if disablePageJumping is false) -->\n <ng-container *ngIf=\"!config.paginationConfig?.disablePageJumping\">\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 page-jumping-enabled\"\n >{{ pageNumber }}</span>\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 </ng-container>\n \n <span [class.page-nav-inactive]=\"config.paginationConfig?.selectedPage === config.paginationConfig?.noOfPages\"\n (click)=\"config.paginationConfig?.selectedPage < config.paginationConfig?.noOfPages && 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 56px 0 0}#pages-container{display:flex;margin-right:32px}.page{display:flex;justify-content:center;align-items:center;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.page-jumping-enabled{border:1px solid #6a737d}.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}.disabled-row .t-col-container{opacity:.4;pointer-events:none}.disabled-row .t-col-container:has(mis-actions-cell){opacity:1;pointer-events:auto}.row{transition:background-color .2s}.row:hover:not(.disabled-row),.row.selected:not(.disabled-row){background-color:#e6f5fd}.disabled-row .t-col-container{pointer-events:none;opacity:.4}.disabled-row .t-col-container:has(mis-actions-cell){pointer-events:auto!important;opacity:1!important;color:inherit!important}mis-actions-cell.disable-actions{pointer-events:none;opacity:.4;filter:grayscale(.5)}.page-nav-inactive{pointer-events:none;opacity:.5;cursor:default}\n"] }]
|
|
618
|
+
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' && colHeader?.type !== 'checkbox'\" 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\n (click)=\"toggleCheckbox(); $event.stopPropagation()\"\n *ngIf=\"colHeader?.type === 'checkbox'\"\n class=\"checkbox-icon\"\n >\n <mis-checkbox [checked]=\"selectAllCheckbox\"></mis-checkbox>\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; let rowIndex = index\">\n <div\n class=\"t-row\"\n [ngClass]=\"{ 't-row-hover': config.cellHover, 'active-row': activeRowIndex.includes(i) }\"\n [ngStyle]=\"{ 'min-height': config?.rowConfig?.height ? config.rowConfig.height : '44px' }\"\n (click)=\"selectRow(i)\"\n [class.disabled-row]=\"isRowDisabled(row)\"\n >\n <div\n (click)=\"config?.colConfig[i]?.action && config?.colConfig[i]?.actionType !== 'checkbox' ? 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 <mis-actions-cell\n *ngIf=\"config.colConfig[i]?.type === 'actions'\"\n [rowData]=\"col\"\n [config]=\"config.colConfig[i]\"\n [isChecked]=\"col.isChecked\"\n (actionClick)=\"onActionClick($event, rowIndex)\"\n [ngClass]=\"{\n 'disable-actions': config.colConfig[i]?.actionType === 'checkbox' && isRowDisabled(row)\n }\"\n ></mis-actions-cell>\n\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)=\"config.paginationConfig?.selectedPage > 1 && updateSelectedPage(config.paginationConfig?.selectedPage - 1)\" class=\"page\" [class.page-nav-inactive]=\"config.paginationConfig?.selectedPage === 1\">\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 <!-- Page numbers (only show if disablePageJumping is false) -->\n <ng-container *ngIf=\"!config.paginationConfig?.disablePageJumping\">\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 page-jumping-enabled\"\n >{{ pageNumber }}</span>\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 </ng-container>\n \n <span [class.page-nav-inactive]=\"config.paginationConfig?.selectedPage === config.paginationConfig?.noOfPages\"\n (click)=\"config.paginationConfig?.selectedPage < config.paginationConfig?.noOfPages && 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 56px 0 0}#pages-container{display:flex;margin-right:32px}.page{display:flex;justify-content:center;align-items:center;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.page-jumping-enabled{border:1px solid #6a737d}.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}.disabled-row .t-col-container{opacity:.4;pointer-events:none}.disabled-row .t-col-container:has(mis-actions-cell){opacity:1;pointer-events:auto}.row{transition:background-color .2s}.row:hover:not(.disabled-row),.row.selected:not(.disabled-row){background-color:#e6f5fd}.disabled-row .t-col-container{pointer-events:none;opacity:.4}.disabled-row .t-col-container:has(mis-actions-cell){pointer-events:auto!important;opacity:1!important;color:inherit!important}mis-actions-cell.disable-actions{pointer-events:none;opacity:.4;filter:grayscale(.5)}.page-nav-inactive{pointer-events:none;opacity:.5;cursor:default}\n"] }]
|
|
938
619
|
}], () => [{ type: i0.Renderer2 }], { filtersUpdated: [{
|
|
939
620
|
type: Output
|
|
940
621
|
}], filter: [{
|
|
@@ -943,9 +624,6 @@ class TableComponent {
|
|
|
943
624
|
}], colHeaders: [{
|
|
944
625
|
type: ViewChildren,
|
|
945
626
|
args: ["colHeaderRef"]
|
|
946
|
-
}], actionCells: [{
|
|
947
|
-
type: ViewChildren,
|
|
948
|
-
args: [ActionsCellComponent]
|
|
949
627
|
}], pageSelected: [{
|
|
950
628
|
type: Output
|
|
951
629
|
}], config: [{
|
|
@@ -1013,9 +691,9 @@ class CustomTableCellDirective {
|
|
|
1013
691
|
type: Input
|
|
1014
692
|
}] }); })();
|
|
1015
693
|
|
|
1016
|
-
const _c0$
|
|
1017
|
-
const _c1$
|
|
1018
|
-
const _c2$
|
|
694
|
+
const _c0$2 = ["table"];
|
|
695
|
+
const _c1$2 = (a0, a1) => ({ height: a0, width: a1 });
|
|
696
|
+
const _c2$2 = (a0, a1, a2) => ({ height: a0, "border-top": a1, "border-bottom": a2 });
|
|
1019
697
|
const _c3 = (a0, a1, a2) => ({ width: a0, cursor: a1, "justify-content": a2 });
|
|
1020
698
|
const _c4 = a0 => ({ backgroundColor: a0 });
|
|
1021
699
|
const _c5 = a0 => ({ width: a0 });
|
|
@@ -1058,7 +736,7 @@ function SubTableComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
1058
736
|
i0.ɵɵelementEnd();
|
|
1059
737
|
} if (rf & 2) {
|
|
1060
738
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
1061
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(2, _c2$
|
|
739
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction3(2, _c2$2, ctx_r2.getColHeadersRowHeight(), ctx_r2.getColHeadersRowBorderTop(), ctx_r2.getColHeadersRowBorderBottom()));
|
|
1062
740
|
i0.ɵɵadvance();
|
|
1063
741
|
i0.ɵɵproperty("ngForOf", ctx_r2.config == null ? null : ctx_r2.config.colHeaderConfig);
|
|
1064
742
|
} }
|
|
@@ -1166,7 +844,7 @@ class SubTableComponent {
|
|
|
1166
844
|
}
|
|
1167
845
|
static { this.ɵfac = function SubTableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SubTableComponent)(i0.ɵɵdirectiveInject(i0.Renderer2)); }; }
|
|
1168
846
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SubTableComponent, selectors: [["sub-table"]], viewQuery: function SubTableComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1169
|
-
i0.ɵɵviewQuery(_c0$
|
|
847
|
+
i0.ɵɵviewQuery(_c0$2, 5);
|
|
1170
848
|
} if (rf & 2) {
|
|
1171
849
|
let _t;
|
|
1172
850
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.table = _t.first);
|
|
@@ -1177,7 +855,7 @@ class SubTableComponent {
|
|
|
1177
855
|
i0.ɵɵtemplate(6, SubTableComponent_div_6_Template, 3, 4, "div", 5);
|
|
1178
856
|
i0.ɵɵelementEnd()()()();
|
|
1179
857
|
} if (rf & 2) {
|
|
1180
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction2(9, _c1$
|
|
858
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction2(9, _c1$2, ctx.getContainerHeight(), ctx.getContainerWidth()));
|
|
1181
859
|
i0.ɵɵadvance(3);
|
|
1182
860
|
i0.ɵɵproperty("ngIf", !!ctx.config.showHeader);
|
|
1183
861
|
i0.ɵɵadvance(2);
|
|
@@ -1185,7 +863,7 @@ class SubTableComponent {
|
|
|
1185
863
|
i0.ɵɵproperty("minBufferPx", ctx.config.dataContainerMaxHeight || "400")("maxBufferPx", ctx.config.dataContainerMaxHeight + 200 || "600");
|
|
1186
864
|
i0.ɵɵadvance();
|
|
1187
865
|
i0.ɵɵproperty("cdkVirtualForOf", ctx.tableData);
|
|
1188
|
-
} }, dependencies: [i1.NgForOf, i1.NgIf, i1.NgStyle, i2
|
|
866
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, i1.NgStyle, i2.CdkFixedSizeVirtualScroll, i2.CdkVirtualForOf, i2.CdkVirtualScrollViewport, CustomTableCellDirective], styles: ["#main-container[_ngcontent-%COMP%]{font-family:Lato,sans-serif}#table-container[_ngcontent-%COMP%]{height:inherit}#col-headers-container[_ngcontent-%COMP%]{display:flex;background-color:#fff;height:36px;border-bottom:1px solid #e0e0e0}#data-container[_ngcontent-%COMP%]{overflow:scroll;width:100%}#data-container[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}#data-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#9aa7b4}.col-header[_ngcontent-%COMP%]{height:100%;width:160px;display:flex;align-items:center;padding:0 16px}.col-header-text[_ngcontent-%COMP%]{font-style:normal;font-weight:700;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.25px;margin:0}.t-row[_ngcontent-%COMP%]{display:flex;align-items:center;height:36px;width:100%;border-bottom:1px solid #e0e0e0}.t-row[_ngcontent-%COMP%]:hover{background-color:#f1fdf8}.t-col-container[_ngcontent-%COMP%]{padding:0 16px;height:100%}.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;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:flex;align-items:center;letter-spacing:.2px;margin:0}"] }); }
|
|
1189
867
|
}
|
|
1190
868
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubTableComponent, [{
|
|
1191
869
|
type: Component,
|
|
@@ -1200,9 +878,9 @@ class SubTableComponent {
|
|
|
1200
878
|
}] }); })();
|
|
1201
879
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SubTableComponent, { className: "SubTableComponent" }); })();
|
|
1202
880
|
|
|
1203
|
-
const _c0 = ["mainContainer"];
|
|
1204
|
-
const _c1 = () => ({ "margin": "16px 0px" });
|
|
1205
|
-
const _c2 = () => ({ "margin-right": "8px" });
|
|
881
|
+
const _c0$1 = ["mainContainer"];
|
|
882
|
+
const _c1$1 = () => ({ "margin": "16px 0px" });
|
|
883
|
+
const _c2$1 = () => ({ "margin-right": "8px" });
|
|
1206
884
|
function TableFilterComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
1207
885
|
const _r2 = i0.ɵɵgetCurrentView();
|
|
1208
886
|
i0.ɵɵelementStart(0, "div")(1, "div", 15)(2, "mis-checkbox", 16);
|
|
@@ -1221,7 +899,7 @@ function TableFilterComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
|
1221
899
|
function TableFilterComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
1222
900
|
i0.ɵɵelement(0, "div", 11);
|
|
1223
901
|
} if (rf & 2) {
|
|
1224
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(1, _c1));
|
|
902
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(1, _c1$1));
|
|
1225
903
|
} }
|
|
1226
904
|
function TableFilterComponent_div_11_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1227
905
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
@@ -1312,7 +990,7 @@ class TableFilterComponent {
|
|
|
1312
990
|
}
|
|
1313
991
|
static { this.ɵfac = function TableFilterComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TableFilterComponent)(); }; }
|
|
1314
992
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableFilterComponent, selectors: [["mis-table-filter"]], viewQuery: function TableFilterComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1315
|
-
i0.ɵɵviewQuery(_c0, 5);
|
|
993
|
+
i0.ɵɵviewQuery(_c0$1, 5);
|
|
1316
994
|
} if (rf & 2) {
|
|
1317
995
|
let _t;
|
|
1318
996
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.container = _t.first);
|
|
@@ -1353,10 +1031,10 @@ class TableFilterComponent {
|
|
|
1353
1031
|
i0.ɵɵadvance();
|
|
1354
1032
|
i0.ɵɵproperty("ngIf", ctx.getFiltersBasedOnSearchValue().length < 1);
|
|
1355
1033
|
i0.ɵɵadvance();
|
|
1356
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(7, _c1));
|
|
1034
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(7, _c1$1));
|
|
1357
1035
|
i0.ɵɵadvance(2);
|
|
1358
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(8, _c2));
|
|
1359
|
-
} }, dependencies: [i1.NgForOf, i1.NgIf, i1.NgStyle, i2.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}"] }); }
|
|
1036
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(8, _c2$1));
|
|
1037
|
+
} }, 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}"] }); }
|
|
1360
1038
|
}
|
|
1361
1039
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableFilterComponent, [{
|
|
1362
1040
|
type: Component,
|
|
@@ -1510,13 +1188,372 @@ class SortIconsDirective {
|
|
|
1510
1188
|
}]
|
|
1511
1189
|
}], () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], null); })();
|
|
1512
1190
|
|
|
1191
|
+
const _c0 = ["dropdownMenu"];
|
|
1192
|
+
const _c1 = ["dropdownTrigger"];
|
|
1193
|
+
const _c2 = a0 => ({ disabled: a0 });
|
|
1194
|
+
function ActionsCellComponent_div_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1195
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
1196
|
+
i0.ɵɵelementStart(0, "div", 9);
|
|
1197
|
+
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)); });
|
|
1198
|
+
i0.ɵɵelement(1, "img", 10);
|
|
1199
|
+
i0.ɵɵelementEnd();
|
|
1200
|
+
} if (rf & 2) {
|
|
1201
|
+
const item_r2 = ctx.$implicit;
|
|
1202
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
1203
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c2, ctx_r2.isDisabled(item_r2)));
|
|
1204
|
+
i0.ɵɵadvance();
|
|
1205
|
+
i0.ɵɵproperty("src", item_r2.icon, i0.ɵɵsanitizeUrl)("alt", item_r2.label);
|
|
1206
|
+
} }
|
|
1207
|
+
function ActionsCellComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1208
|
+
i0.ɵɵelementStart(0, "div", 7);
|
|
1209
|
+
i0.ɵɵtemplate(1, ActionsCellComponent_div_1_div_1_Template, 2, 5, "div", 8);
|
|
1210
|
+
i0.ɵɵelementEnd();
|
|
1211
|
+
} if (rf & 2) {
|
|
1212
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
1213
|
+
i0.ɵɵadvance();
|
|
1214
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.actionItems)("ngForTrackBy", ctx_r2.trackByAction);
|
|
1215
|
+
} }
|
|
1216
|
+
function ActionsCellComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
1217
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
1218
|
+
i0.ɵɵelementStart(0, "div", 11)(1, "div", 12, 1);
|
|
1219
|
+
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)); });
|
|
1220
|
+
i0.ɵɵnamespaceSVG();
|
|
1221
|
+
i0.ɵɵelementStart(3, "svg", 13);
|
|
1222
|
+
i0.ɵɵelement(4, "circle", 14)(5, "circle", 15)(6, "circle", 16);
|
|
1223
|
+
i0.ɵɵelementEnd()()();
|
|
1224
|
+
} }
|
|
1225
|
+
function ActionsCellComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
1226
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
1227
|
+
i0.ɵɵelementStart(0, "div", 17)(1, "mis-checkbox", 18);
|
|
1228
|
+
i0.ɵɵlistener("valueChange", function ActionsCellComponent_div_3_Template_mis_checkbox_valueChange_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onCheckboxChange($event)); });
|
|
1229
|
+
i0.ɵɵelementEnd()();
|
|
1230
|
+
} if (rf & 2) {
|
|
1231
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
1232
|
+
i0.ɵɵadvance();
|
|
1233
|
+
i0.ɵɵproperty("checked", ctx_r2.isChecked)("disabled", ctx_r2.disable ? ctx_r2.disable(ctx_r2.data) : false);
|
|
1234
|
+
} }
|
|
1235
|
+
function ActionsCellComponent_ng_template_4_div_1_ng_container_1_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
1236
|
+
i0.ɵɵelementStart(0, "span", 29);
|
|
1237
|
+
i0.ɵɵelement(1, "img", 30);
|
|
1238
|
+
i0.ɵɵelementEnd();
|
|
1239
|
+
} if (rf & 2) {
|
|
1240
|
+
const item_r7 = i0.ɵɵnextContext(2).$implicit;
|
|
1241
|
+
i0.ɵɵadvance();
|
|
1242
|
+
i0.ɵɵproperty("src", item_r7.icon, i0.ɵɵsanitizeUrl);
|
|
1243
|
+
} }
|
|
1244
|
+
function ActionsCellComponent_ng_template_4_div_1_ng_container_1_div_7_div_1_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
1245
|
+
i0.ɵɵelementStart(0, "span", 29);
|
|
1246
|
+
i0.ɵɵelement(1, "img", 30);
|
|
1247
|
+
i0.ɵɵelementEnd();
|
|
1248
|
+
} if (rf & 2) {
|
|
1249
|
+
const child_r9 = i0.ɵɵnextContext().$implicit;
|
|
1250
|
+
i0.ɵɵadvance();
|
|
1251
|
+
i0.ɵɵproperty("src", child_r9.icon, i0.ɵɵsanitizeUrl);
|
|
1252
|
+
} }
|
|
1253
|
+
function ActionsCellComponent_ng_template_4_div_1_ng_container_1_div_7_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1254
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
1255
|
+
i0.ɵɵelementStart(0, "div", 21);
|
|
1256
|
+
i0.ɵɵlistener("click", function ActionsCellComponent_ng_template_4_div_1_ng_container_1_div_7_div_1_Template_div_click_0_listener($event) { const child_r9 = i0.ɵɵrestoreView(_r8).$implicit; const ctx_r2 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r2.onDropdownItemClick(child_r9, $event)); });
|
|
1257
|
+
i0.ɵɵtemplate(1, ActionsCellComponent_ng_template_4_div_1_ng_container_1_div_7_div_1_span_1_Template, 2, 1, "span", 23);
|
|
1258
|
+
i0.ɵɵelementStart(2, "span", 24);
|
|
1259
|
+
i0.ɵɵtext(3);
|
|
1260
|
+
i0.ɵɵelementEnd()();
|
|
1261
|
+
} if (rf & 2) {
|
|
1262
|
+
const child_r9 = ctx.$implicit;
|
|
1263
|
+
const ctx_r2 = i0.ɵɵnextContext(5);
|
|
1264
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c2, ctx_r2.isDisabled(child_r9)));
|
|
1265
|
+
i0.ɵɵadvance();
|
|
1266
|
+
i0.ɵɵproperty("ngIf", child_r9.icon);
|
|
1267
|
+
i0.ɵɵadvance(2);
|
|
1268
|
+
i0.ɵɵtextInterpolate(child_r9.label);
|
|
1269
|
+
} }
|
|
1270
|
+
function ActionsCellComponent_ng_template_4_div_1_ng_container_1_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
1271
|
+
i0.ɵɵelementStart(0, "div", 31);
|
|
1272
|
+
i0.ɵɵtemplate(1, ActionsCellComponent_ng_template_4_div_1_ng_container_1_div_7_div_1_Template, 4, 5, "div", 20);
|
|
1273
|
+
i0.ɵɵelementEnd();
|
|
1274
|
+
} if (rf & 2) {
|
|
1275
|
+
const item_r7 = i0.ɵɵnextContext(2).$implicit;
|
|
1276
|
+
i0.ɵɵproperty("ngClass", item_r7.submenuAlign);
|
|
1277
|
+
i0.ɵɵadvance();
|
|
1278
|
+
i0.ɵɵproperty("ngForOf", item_r7.children);
|
|
1279
|
+
} }
|
|
1280
|
+
function ActionsCellComponent_ng_template_4_div_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
1281
|
+
i0.ɵɵelementContainerStart(0);
|
|
1282
|
+
i0.ɵɵtemplate(1, ActionsCellComponent_ng_template_4_div_1_ng_container_1_span_1_Template, 2, 1, "span", 23);
|
|
1283
|
+
i0.ɵɵelementStart(2, "span", 24);
|
|
1284
|
+
i0.ɵɵtext(3);
|
|
1285
|
+
i0.ɵɵelementEnd();
|
|
1286
|
+
i0.ɵɵelementStart(4, "span", 25);
|
|
1287
|
+
i0.ɵɵnamespaceSVG();
|
|
1288
|
+
i0.ɵɵelementStart(5, "svg", 26);
|
|
1289
|
+
i0.ɵɵelement(6, "path", 27);
|
|
1290
|
+
i0.ɵɵelementEnd()();
|
|
1291
|
+
i0.ɵɵtemplate(7, ActionsCellComponent_ng_template_4_div_1_ng_container_1_div_7_Template, 2, 2, "div", 28);
|
|
1292
|
+
i0.ɵɵelementContainerEnd();
|
|
1293
|
+
} if (rf & 2) {
|
|
1294
|
+
const item_r7 = i0.ɵɵnextContext().$implicit;
|
|
1295
|
+
i0.ɵɵadvance();
|
|
1296
|
+
i0.ɵɵproperty("ngIf", item_r7.icon);
|
|
1297
|
+
i0.ɵɵadvance(2);
|
|
1298
|
+
i0.ɵɵtextInterpolate(item_r7.label);
|
|
1299
|
+
i0.ɵɵadvance(4);
|
|
1300
|
+
i0.ɵɵproperty("ngIf", item_r7.showSubmenu);
|
|
1301
|
+
} }
|
|
1302
|
+
function ActionsCellComponent_ng_template_4_div_1_ng_template_2_span_0_Template(rf, ctx) { if (rf & 1) {
|
|
1303
|
+
i0.ɵɵelementStart(0, "span", 29);
|
|
1304
|
+
i0.ɵɵelement(1, "img", 30);
|
|
1305
|
+
i0.ɵɵelementEnd();
|
|
1306
|
+
} if (rf & 2) {
|
|
1307
|
+
const item_r7 = i0.ɵɵnextContext(2).$implicit;
|
|
1308
|
+
i0.ɵɵadvance();
|
|
1309
|
+
i0.ɵɵproperty("src", item_r7.icon, i0.ɵɵsanitizeUrl);
|
|
1310
|
+
} }
|
|
1311
|
+
function ActionsCellComponent_ng_template_4_div_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
1312
|
+
i0.ɵɵtemplate(0, ActionsCellComponent_ng_template_4_div_1_ng_template_2_span_0_Template, 2, 1, "span", 23);
|
|
1313
|
+
i0.ɵɵelementStart(1, "span", 24);
|
|
1314
|
+
i0.ɵɵtext(2);
|
|
1315
|
+
i0.ɵɵelementEnd();
|
|
1316
|
+
} if (rf & 2) {
|
|
1317
|
+
const item_r7 = i0.ɵɵnextContext().$implicit;
|
|
1318
|
+
i0.ɵɵproperty("ngIf", item_r7.icon);
|
|
1319
|
+
i0.ɵɵadvance(2);
|
|
1320
|
+
i0.ɵɵtextInterpolate(item_r7.label);
|
|
1321
|
+
} }
|
|
1322
|
+
function ActionsCellComponent_ng_template_4_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1323
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
1324
|
+
i0.ɵɵelementStart(0, "div", 21);
|
|
1325
|
+
i0.ɵɵlistener("click", function ActionsCellComponent_ng_template_4_div_1_Template_div_click_0_listener($event) { const item_r7 = i0.ɵɵrestoreView(_r6).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.onDropdownItemClick(item_r7, $event)); });
|
|
1326
|
+
i0.ɵɵtemplate(1, ActionsCellComponent_ng_template_4_div_1_ng_container_1_Template, 8, 3, "ng-container", 22)(2, ActionsCellComponent_ng_template_4_div_1_ng_template_2_Template, 3, 2, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
|
|
1327
|
+
i0.ɵɵelementEnd();
|
|
1328
|
+
} if (rf & 2) {
|
|
1329
|
+
const item_r7 = ctx.$implicit;
|
|
1330
|
+
const noChildren_r10 = i0.ɵɵreference(3);
|
|
1331
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
1332
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c2, ctx_r2.isDisabled(item_r7)));
|
|
1333
|
+
i0.ɵɵadvance();
|
|
1334
|
+
i0.ɵɵproperty("ngIf", item_r7.children == null ? null : item_r7.children.length)("ngIfElse", noChildren_r10);
|
|
1335
|
+
} }
|
|
1336
|
+
function ActionsCellComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
|
|
1337
|
+
i0.ɵɵelementStart(0, "div", 19);
|
|
1338
|
+
i0.ɵɵtemplate(1, ActionsCellComponent_ng_template_4_div_1_Template, 4, 5, "div", 20);
|
|
1339
|
+
i0.ɵɵelementEnd();
|
|
1340
|
+
} if (rf & 2) {
|
|
1341
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
1342
|
+
i0.ɵɵproperty("ngClass", ctx_r2.menuAlign);
|
|
1343
|
+
i0.ɵɵadvance();
|
|
1344
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.actionItems);
|
|
1345
|
+
} }
|
|
1346
|
+
class ActionsCellComponent {
|
|
1347
|
+
set rowData(value) {
|
|
1348
|
+
if (this.actionType === 'checkbox') {
|
|
1349
|
+
// For checkbox, keep the rowData structure
|
|
1350
|
+
this.data = value?.rowData ?? {};
|
|
1351
|
+
this.isChecked = value?.isChecked ?? false;
|
|
1352
|
+
}
|
|
1353
|
+
else {
|
|
1354
|
+
// For other actions (dropdown, inline), use the value directly
|
|
1355
|
+
this.data = value;
|
|
1356
|
+
this.isChecked = false;
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
set config(config) {
|
|
1360
|
+
this.actionItems = config?.actionItems,
|
|
1361
|
+
this.actionType = config.actionType,
|
|
1362
|
+
this.submenuAlign = config.submenuAlign,
|
|
1363
|
+
this.menuAlign = config.menuAlign;
|
|
1364
|
+
this._style = config.style;
|
|
1365
|
+
this.action = config.action;
|
|
1366
|
+
this.disable = config.disable;
|
|
1367
|
+
this.processStyle();
|
|
1368
|
+
}
|
|
1369
|
+
constructor(overlay, viewContainerRef) {
|
|
1370
|
+
this.overlay = overlay;
|
|
1371
|
+
this.viewContainerRef = viewContainerRef;
|
|
1372
|
+
this.isChecked = false;
|
|
1373
|
+
this.actionClick = new EventEmitter();
|
|
1374
|
+
this.isDropdownOpen = false;
|
|
1375
|
+
this.actionItems = [];
|
|
1376
|
+
this.actionType = "inline";
|
|
1377
|
+
this.submenuAlign = "right";
|
|
1378
|
+
this.menuAlign = "left";
|
|
1379
|
+
this._style = {};
|
|
1380
|
+
this.containerStyle = {};
|
|
1381
|
+
this.overlayRef = null;
|
|
1382
|
+
}
|
|
1383
|
+
ngOnInit() { }
|
|
1384
|
+
ngOnDestroy() {
|
|
1385
|
+
this.closeDropdown();
|
|
1386
|
+
}
|
|
1387
|
+
processStyle() {
|
|
1388
|
+
// Remove width from style to avoid conflicts with table column width
|
|
1389
|
+
const { width, ...restStyle } = this._style;
|
|
1390
|
+
this.containerStyle = restStyle;
|
|
1391
|
+
}
|
|
1392
|
+
onActionClick(item, event) {
|
|
1393
|
+
event.stopPropagation();
|
|
1394
|
+
// Check permissions before executing action
|
|
1395
|
+
if (this.isDisabled(item))
|
|
1396
|
+
return;
|
|
1397
|
+
// Execute action only if permitted
|
|
1398
|
+
if (item.action) {
|
|
1399
|
+
item.action(this.data);
|
|
1400
|
+
}
|
|
1401
|
+
this.actionClick.emit({ item, data: this.data });
|
|
1402
|
+
}
|
|
1403
|
+
trackByAction(index, item) {
|
|
1404
|
+
return item.value;
|
|
1405
|
+
}
|
|
1406
|
+
isSvgFile(iconPath) {
|
|
1407
|
+
if (!iconPath)
|
|
1408
|
+
return false;
|
|
1409
|
+
return iconPath.toLowerCase().includes(".svg") || iconPath.toLowerCase().includes("assets/icons/");
|
|
1410
|
+
}
|
|
1411
|
+
onDocumentClick() {
|
|
1412
|
+
if (this.isDropdownOpen) {
|
|
1413
|
+
this.closeDropdown();
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
toggleDropdown(event) {
|
|
1417
|
+
event.stopPropagation();
|
|
1418
|
+
if (this.isDropdownOpen) {
|
|
1419
|
+
this.closeDropdown();
|
|
1420
|
+
}
|
|
1421
|
+
else {
|
|
1422
|
+
this.openDropdown();
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
openDropdown() {
|
|
1426
|
+
if (!this.dropdownTrigger || !this.dropdownMenu)
|
|
1427
|
+
return;
|
|
1428
|
+
// Close all submenus when opening main menu
|
|
1429
|
+
this.actionItems.forEach((item) => (item.showSubmenu = false));
|
|
1430
|
+
const positions = this.getDropdownPositions();
|
|
1431
|
+
const overlayConfig = new OverlayConfig({
|
|
1432
|
+
hasBackdrop: true,
|
|
1433
|
+
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
1434
|
+
positionStrategy: this.overlay
|
|
1435
|
+
.position()
|
|
1436
|
+
.flexibleConnectedTo(this.dropdownTrigger)
|
|
1437
|
+
.withPositions(positions)
|
|
1438
|
+
.withPush(true),
|
|
1439
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition()
|
|
1440
|
+
});
|
|
1441
|
+
this.overlayRef = this.overlay.create(overlayConfig);
|
|
1442
|
+
const portal = new TemplatePortal(this.dropdownMenu, this.viewContainerRef);
|
|
1443
|
+
this.overlayRef.attach(portal);
|
|
1444
|
+
this.overlayRef.backdropClick().subscribe(() => {
|
|
1445
|
+
this.closeDropdown();
|
|
1446
|
+
});
|
|
1447
|
+
this.isDropdownOpen = true;
|
|
1448
|
+
}
|
|
1449
|
+
closeDropdown() {
|
|
1450
|
+
if (this.overlayRef) {
|
|
1451
|
+
this.overlayRef.dispose();
|
|
1452
|
+
this.overlayRef = null;
|
|
1453
|
+
}
|
|
1454
|
+
this.isDropdownOpen = false;
|
|
1455
|
+
}
|
|
1456
|
+
getDropdownPositions() {
|
|
1457
|
+
const positions = [];
|
|
1458
|
+
if (this.menuAlign === 'left') {
|
|
1459
|
+
// Menu opens to the left of trigger
|
|
1460
|
+
positions.push(new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }, 0, 4), new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }, 0, -4));
|
|
1461
|
+
}
|
|
1462
|
+
else {
|
|
1463
|
+
// Menu opens to the right of trigger
|
|
1464
|
+
positions.push(new ConnectionPositionPair({ originX: 'end', originY: 'bottom' }, { overlayX: 'end', overlayY: 'top' }, 0, 4), new ConnectionPositionPair({ originX: 'end', originY: 'top' }, { overlayX: 'end', overlayY: 'bottom' }, 0, -4));
|
|
1465
|
+
}
|
|
1466
|
+
return positions;
|
|
1467
|
+
}
|
|
1468
|
+
onDropdownItemClick(item, event) {
|
|
1469
|
+
event.stopPropagation();
|
|
1470
|
+
if (this.isDisabled(item))
|
|
1471
|
+
return;
|
|
1472
|
+
if (item?.children?.length) {
|
|
1473
|
+
// Toggle submenu
|
|
1474
|
+
item.showSubmenu = !item.showSubmenu;
|
|
1475
|
+
// Optionally close other submenus
|
|
1476
|
+
this.actionItems.forEach((i) => {
|
|
1477
|
+
if (i !== item)
|
|
1478
|
+
i.showSubmenu = false;
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
else {
|
|
1482
|
+
// Handle action
|
|
1483
|
+
if (item.action)
|
|
1484
|
+
item.action(this.data);
|
|
1485
|
+
this.actionClick.emit({ item, data: this.data });
|
|
1486
|
+
this.closeDropdown(); // Only close if action was executed
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
onCheckboxChange(event) {
|
|
1490
|
+
this.isChecked = event?.value ?? false;
|
|
1491
|
+
this.actionClick.emit({
|
|
1492
|
+
isChecked: this.isChecked,
|
|
1493
|
+
data: this.data
|
|
1494
|
+
});
|
|
1495
|
+
}
|
|
1496
|
+
isDisabled(item) {
|
|
1497
|
+
if (typeof item.disable === "function") {
|
|
1498
|
+
return item.disable(this.data);
|
|
1499
|
+
}
|
|
1500
|
+
return false;
|
|
1501
|
+
}
|
|
1502
|
+
static { this.ɵfac = function ActionsCellComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ActionsCellComponent)(i0.ɵɵdirectiveInject(i1$1.Overlay), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); }; }
|
|
1503
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ActionsCellComponent, selectors: [["mis-actions-cell"]], viewQuery: function ActionsCellComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1504
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
1505
|
+
i0.ɵɵviewQuery(_c1, 5);
|
|
1506
|
+
} if (rf & 2) {
|
|
1507
|
+
let _t;
|
|
1508
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dropdownMenu = _t.first);
|
|
1509
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dropdownTrigger = _t.first);
|
|
1510
|
+
} }, hostBindings: function ActionsCellComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1511
|
+
i0.ɵɵlistener("click", function ActionsCellComponent_click_HostBindingHandler() { return ctx.onDocumentClick(); }, false, i0.ɵɵresolveDocument);
|
|
1512
|
+
} }, inputs: { rowData: "rowData", isChecked: "isChecked", config: "config" }, outputs: { actionClick: "actionClick" }, decls: 6, vars: 4, consts: [["dropdownMenu", ""], ["dropdownTrigger", ""], ["noChildren", ""], [1, "actions-cell-container", 3, "ngStyle"], ["class", "inline-actions", 4, "ngIf"], ["class", "dropdown-actions", 4, "ngIf"], ["class", "checkbox-actions", 4, "ngIf"], [1, "inline-actions"], ["class", "action-item", 3, "ngClass", "click", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "action-item", 3, "click", "ngClass"], [1, "action-icon-svg", 3, "src", "alt"], [1, "dropdown-actions"], ["title", "More actions", 1, "dropdown-trigger", 3, "click"], ["width", "20", "height", "20", "viewBox", "0 0 20 20", "fill", "none"], ["cx", "10", "cy", "4", "r", "2", "fill", "#333"], ["cx", "10", "cy", "10", "r", "2", "fill", "#333"], ["cx", "10", "cy", "16", "r", "2", "fill", "#333"], [1, "checkbox-actions"], [3, "valueChange", "checked", "disabled"], [1, "dropdown-menu-overlay", 3, "ngClass"], ["class", "dropdown-menu-item", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], [1, "dropdown-menu-item", 3, "click", "ngClass"], [4, "ngIf", "ngIfElse"], ["class", "dropdown-icon", 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"], [1, "dropdown-icon"], [3, "src"], [1, "dropdown-submenu", 3, "ngClass"]], template: function ActionsCellComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1513
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
1514
|
+
i0.ɵɵtemplate(1, ActionsCellComponent_div_1_Template, 2, 2, "div", 4)(2, ActionsCellComponent_div_2_Template, 7, 0, "div", 5)(3, ActionsCellComponent_div_3_Template, 2, 2, "div", 6);
|
|
1515
|
+
i0.ɵɵelementEnd();
|
|
1516
|
+
i0.ɵɵtemplate(4, ActionsCellComponent_ng_template_4_Template, 2, 2, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
1517
|
+
} if (rf & 2) {
|
|
1518
|
+
i0.ɵɵproperty("ngStyle", ctx.containerStyle);
|
|
1519
|
+
i0.ɵɵadvance();
|
|
1520
|
+
i0.ɵɵproperty("ngIf", ctx.actionType === "inline");
|
|
1521
|
+
i0.ɵɵadvance();
|
|
1522
|
+
i0.ɵɵproperty("ngIf", ctx.actionType === "dropdown");
|
|
1523
|
+
i0.ɵɵadvance();
|
|
1524
|
+
i0.ɵɵproperty("ngIf", ctx.actionType === "checkbox");
|
|
1525
|
+
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, i2$1.CheckboxComponent], 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;display:flex;align-items:center;justify-content:center}.dropdown-actions[_ngcontent-%COMP%]{position:relative}.dropdown-menu-overlay[_ngcontent-%COMP%]{width:232px;background:#fff;border-radius:12px;box-shadow:0 4px 24px #0000001f;padding:8px 0;z-index:1000}.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}.dropdown-submenu[_ngcontent-%COMP%]{position:absolute;top:0;min-width:132px;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%;background-color:#fff;border:1px solid #ddd;z-index:9999;position:absolute;margin-right:4px}.submenu-arrow[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:auto;z-index:9999}.dropdown-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.dropdown-menu-item.disabled[_ngcontent-%COMP%]{color:#181f33;filter:grayscale(100%) opacity(.3);cursor:not-allowed}.checkbox-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}"] }); }
|
|
1526
|
+
}
|
|
1527
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActionsCellComponent, [{
|
|
1528
|
+
type: Component,
|
|
1529
|
+
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\n *ngFor=\"let item of actionItems; trackBy: trackByAction\"\n class=\"action-item\"\n [ngClass]=\"{ disabled: isDisabled(item) }\"\n (click)=\"onActionClick(item, $event)\"\n >\n <img [src]=\"item.icon\" [alt]=\"item.label\" class=\"action-icon-svg\" />\n </div>\n </div>\n\n <!-- Dropdown Actions -->\n <div *ngIf=\"actionType === 'dropdown'\" class=\"dropdown-actions\">\n <div #dropdownTrigger class=\"dropdown-trigger\" (click)=\"toggleDropdown($event)\" title=\"More actions\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\">\n <circle cx=\"10\" cy=\"4\" r=\"2\" fill=\"#333\" />\n <circle cx=\"10\" cy=\"10\" r=\"2\" fill=\"#333\" />\n <circle cx=\"10\" cy=\"16\" r=\"2\" fill=\"#333\" />\n </svg>\n </div>\n </div>\n\n <!-- Checkbox Actions -->\n <div *ngIf=\"actionType === 'checkbox'\" class=\"checkbox-actions\">\n <mis-checkbox [checked]=\"isChecked\" (valueChange)=\"onCheckboxChange($event)\" [disabled]=\"disable ? disable(data) : false\"\n > </mis-checkbox>\n </div>\n</div>\n\n<!-- CDK Overlay Template for Dropdown Menu -->\n<ng-template #dropdownMenu>\n <div class=\"dropdown-menu-overlay\" [ngClass]=\"menuAlign\">\n <div\n class=\"dropdown-menu-item\"\n *ngFor=\"let item of actionItems\"\n (click)=\"onDropdownItemClick(item, $event)\"\n [ngClass]=\"{ disabled: isDisabled(item) }\"\n >\n <ng-container *ngIf=\"item.children?.length; else 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 <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\" stroke-linejoin=\"round\" />\n </svg>\n </span>\n\n <!-- DYNAMIC SUBMENU -->\n <div class=\"dropdown-submenu\" [ngClass]=\"item.submenuAlign\" *ngIf=\"item.showSubmenu\">\n <div\n class=\"dropdown-menu-item\"\n *ngFor=\"let child of item.children\"\n [ngClass]=\"{ disabled: isDisabled(child) }\"\n (click)=\"onDropdownItemClick(child, $event)\"\n >\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</ng-template>\n", 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;display:flex;align-items:center;justify-content:center}.dropdown-actions{position:relative}.dropdown-menu-overlay{width:232px;background:#fff;border-radius:12px;box-shadow:0 4px 24px #0000001f;padding:8px 0;z-index:1000}.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}.dropdown-submenu{position:absolute;top:0;min-width:132px;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%;background-color:#fff;border:1px solid #ddd;z-index:9999;position:absolute;margin-right:4px}.submenu-arrow{display:flex;align-items:center;margin-left:auto;z-index:9999}.dropdown-icon{display:flex;justify-content:center;align-items:center}.dropdown-menu-item.disabled{color:#181f33;filter:grayscale(100%) opacity(.3);cursor:not-allowed}.checkbox-actions{display:flex;align-items:center;justify-content:center;width:100%;height:100%}\n"] }]
|
|
1530
|
+
}], () => [{ type: i1$1.Overlay }, { type: i0.ViewContainerRef }], { rowData: [{
|
|
1531
|
+
type: Input
|
|
1532
|
+
}], isChecked: [{
|
|
1533
|
+
type: Input
|
|
1534
|
+
}], config: [{
|
|
1535
|
+
type: Input
|
|
1536
|
+
}], actionClick: [{
|
|
1537
|
+
type: Output
|
|
1538
|
+
}], dropdownMenu: [{
|
|
1539
|
+
type: ViewChild,
|
|
1540
|
+
args: ['dropdownMenu', { static: false }]
|
|
1541
|
+
}], dropdownTrigger: [{
|
|
1542
|
+
type: ViewChild,
|
|
1543
|
+
args: ['dropdownTrigger', { static: false }]
|
|
1544
|
+
}], onDocumentClick: [{
|
|
1545
|
+
type: HostListener,
|
|
1546
|
+
args: ["document:click"]
|
|
1547
|
+
}] }); })();
|
|
1548
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ActionsCellComponent, { className: "ActionsCellComponent" }); })();
|
|
1549
|
+
|
|
1513
1550
|
class TableModule {
|
|
1514
1551
|
static forRoot() {
|
|
1515
1552
|
return { ngModule: TableModule, providers: [] };
|
|
1516
1553
|
}
|
|
1517
1554
|
static { this.ɵfac = function TableModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TableModule)(); }; }
|
|
1518
1555
|
static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: TableModule }); }
|
|
1519
|
-
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, CheckboxModule, ScrollingModule] }); }
|
|
1556
|
+
static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, CheckboxModule, ScrollingModule, OverlayModule, PortalModule] }); }
|
|
1520
1557
|
}
|
|
1521
1558
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableModule, [{
|
|
1522
1559
|
type: NgModule,
|
|
@@ -1529,7 +1566,7 @@ class TableModule {
|
|
|
1529
1566
|
SortIconsDirective,
|
|
1530
1567
|
ActionsCellComponent
|
|
1531
1568
|
],
|
|
1532
|
-
imports: [CommonModule, CheckboxModule, ScrollingModule],
|
|
1569
|
+
imports: [CommonModule, CheckboxModule, ScrollingModule, OverlayModule, PortalModule],
|
|
1533
1570
|
exports: [
|
|
1534
1571
|
TableComponent,
|
|
1535
1572
|
SubTableComponent,
|
|
@@ -1545,13 +1582,13 @@ class TableModule {
|
|
|
1545
1582
|
TableFilterComponent,
|
|
1546
1583
|
CustomTableCellDirective,
|
|
1547
1584
|
SortIconsDirective,
|
|
1548
|
-
ActionsCellComponent], imports: [CommonModule, CheckboxModule, ScrollingModule], exports: [TableComponent,
|
|
1585
|
+
ActionsCellComponent], imports: [CommonModule, CheckboxModule, ScrollingModule, OverlayModule, PortalModule], exports: [TableComponent,
|
|
1549
1586
|
SubTableComponent,
|
|
1550
1587
|
TableFilterComponent,
|
|
1551
1588
|
CustomTableCellDirective,
|
|
1552
1589
|
SortIconsDirective,
|
|
1553
1590
|
ActionsCellComponent] }); })();
|
|
1554
|
-
i0.ɵɵsetComponentScope(TableComponent, [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, i2.CheckboxComponent, SubTableComponent,
|
|
1591
|
+
i0.ɵɵsetComponentScope(TableComponent, [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, i2$1.CheckboxComponent, SubTableComponent,
|
|
1555
1592
|
TableFilterComponent,
|
|
1556
1593
|
CustomTableCellDirective,
|
|
1557
1594
|
SortIconsDirective,
|