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