mis-crystal-design-system 18.0.7-test → 18.0.8-test-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/icons/sort-asc.svg +5 -0
- package/assets/icons/sort-desc.svg +5 -0
- package/assets/icons/sprite.svg +12 -0
- package/esm2022/table/public_api.mjs +5 -3
- package/esm2022/table/sort-icons.directive.mjs +151 -0
- package/esm2022/table/table.component.mjs +77 -51
- package/esm2022/table/table.config.mjs +6 -0
- package/esm2022/table/table.module.mjs +25 -4
- package/fesm2022/mis-crystal-design-system-table.mjs +254 -55
- package/fesm2022/mis-crystal-design-system-table.mjs.map +1 -1
- package/package.json +17 -17
- package/table/filter/filter.component.d.ts +1 -1
- package/table/public_api.d.ts +4 -2
- package/table/sort-icons.directive.d.ts +38 -0
- package/table/table.component.d.ts +11 -1
- package/table/table.config.d.ts +2 -0
- package/table/table.module.d.ts +5 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, Component, ViewChild, EventEmitter, Output, ViewChildren, NgModule } from '@angular/core';
|
|
2
|
+
import { Directive, Input, Component, ViewChild, EventEmitter, Output, input, output, signal, ViewChildren, 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,12 @@ 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 DEFAULT_TABLE_CONFIG = {
|
|
11
|
+
sortAscIcon: 'assets/sort-asc.svg',
|
|
12
|
+
sortDescIcon: 'assets/sort-desc.svg',
|
|
13
|
+
multiColumnSort: false
|
|
14
|
+
};
|
|
15
|
+
|
|
10
16
|
class CustomTableCellDirective {
|
|
11
17
|
set customComponent(value) {
|
|
12
18
|
this.component = value;
|
|
@@ -407,6 +413,155 @@ class TableFilterComponent {
|
|
|
407
413
|
}] }); })();
|
|
408
414
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TableFilterComponent, { className: "TableFilterComponent" }); })();
|
|
409
415
|
|
|
416
|
+
class SortIconsDirective {
|
|
417
|
+
constructor(el, renderer) {
|
|
418
|
+
this.el = el;
|
|
419
|
+
this.renderer = renderer;
|
|
420
|
+
// Convert inputs to signals
|
|
421
|
+
this.column = input();
|
|
422
|
+
this.activeSort = input();
|
|
423
|
+
this.activeSorts = input();
|
|
424
|
+
this.multiColumnSort = input(false);
|
|
425
|
+
// Convert output to signal
|
|
426
|
+
this.sortChange = output();
|
|
427
|
+
this.multiSortChange = output();
|
|
428
|
+
// Internal state as signals
|
|
429
|
+
this.currentDirection = signal('');
|
|
430
|
+
this.columnNumber = signal(0);
|
|
431
|
+
}
|
|
432
|
+
ngOnInit() {
|
|
433
|
+
// Get column number from data-column attribute
|
|
434
|
+
const columnAttr = this.el.nativeElement.getAttribute('data-column');
|
|
435
|
+
if (columnAttr) {
|
|
436
|
+
this.columnNumber.set(parseInt(columnAttr, 10));
|
|
437
|
+
}
|
|
438
|
+
// Create a container for the icons
|
|
439
|
+
const container = this.renderer.createElement('div');
|
|
440
|
+
this.renderer?.setStyle(container, 'display', 'inline-flex');
|
|
441
|
+
this.renderer?.setStyle(container, 'align-items', 'center');
|
|
442
|
+
this.renderer?.setStyle(container, 'gap', '0.5rem');
|
|
443
|
+
const iconContainer = this.renderer.createElement('div');
|
|
444
|
+
this.renderer?.setStyle(iconContainer, 'display', 'inline-flex');
|
|
445
|
+
this.renderer?.setStyle(iconContainer, 'flex-direction', 'column');
|
|
446
|
+
this.renderer?.setStyle(iconContainer, 'align-items', 'center');
|
|
447
|
+
this.renderer?.setStyle(iconContainer, 'gap', '5px');
|
|
448
|
+
this.upIcon = this.renderer.createElement('img');
|
|
449
|
+
this.renderer?.setAttribute(this.upIcon, 'src', this.column()?.sortAscIcon);
|
|
450
|
+
this.renderer?.setStyle(this.upIcon, 'opacity', '0.5');
|
|
451
|
+
this.renderer?.setStyle(this.upIcon, 'transition', 'opacity 0.3s ease');
|
|
452
|
+
this.renderer?.setStyle(this.upIcon, 'width', '9px');
|
|
453
|
+
this.renderer?.setStyle(this.upIcon, 'cursor', 'pointer');
|
|
454
|
+
this.renderer?.listen(this.upIcon, 'click', () => this.setSortDirection('ASC'));
|
|
455
|
+
this.downIcon = this.renderer.createElement('img');
|
|
456
|
+
this.renderer?.setAttribute(this.downIcon, 'src', this.column()?.sortDescIcon);
|
|
457
|
+
this.renderer?.setStyle(this.downIcon, 'opacity', '0.5');
|
|
458
|
+
this.renderer?.setStyle(this.downIcon, 'transition', 'opacity 0.3s ease');
|
|
459
|
+
this.renderer?.setStyle(this.downIcon, 'width', '9px');
|
|
460
|
+
this.renderer?.setStyle(this.downIcon, 'cursor', 'pointer');
|
|
461
|
+
this.renderer?.listen(this.downIcon, 'click', () => this.setSortDirection('DESC'));
|
|
462
|
+
this.renderer?.appendChild(iconContainer, this.upIcon);
|
|
463
|
+
this.renderer?.appendChild(iconContainer, this.downIcon);
|
|
464
|
+
this.renderer?.appendChild(container, iconContainer);
|
|
465
|
+
if (this.multiColumnSort()) {
|
|
466
|
+
this.sortOrderElement = this.renderer.createElement('span');
|
|
467
|
+
this.renderer?.setStyle(this.sortOrderElement, 'font-size', '12px');
|
|
468
|
+
this.renderer?.setStyle(this.sortOrderElement, 'font-weight', 'bold');
|
|
469
|
+
this.renderer?.setStyle(this.sortOrderElement, 'color', '#000');
|
|
470
|
+
this.renderer?.appendChild(container, this.sortOrderElement);
|
|
471
|
+
}
|
|
472
|
+
this.renderer?.appendChild(this.el.nativeElement, container);
|
|
473
|
+
this.updateIconStyles();
|
|
474
|
+
}
|
|
475
|
+
ngOnChanges(changes) {
|
|
476
|
+
if (changes['activeSort'] || changes['activeSorts']) {
|
|
477
|
+
this.updateIconStyles();
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
setSortDirection(direction) {
|
|
481
|
+
if (this.multiColumnSort()) {
|
|
482
|
+
this.handleMultiColumnSort(direction);
|
|
483
|
+
}
|
|
484
|
+
else {
|
|
485
|
+
this.handleSingleColumnSort(direction);
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
handleSingleColumnSort(direction) {
|
|
489
|
+
if (this.currentDirection() === direction) {
|
|
490
|
+
this.currentDirection.set(''); // Reset sorting if the same direction is clicked
|
|
491
|
+
}
|
|
492
|
+
else {
|
|
493
|
+
this.currentDirection.set(direction);
|
|
494
|
+
}
|
|
495
|
+
this.sortChange.emit({
|
|
496
|
+
column: this.column()?.data || '',
|
|
497
|
+
direction: this.currentDirection(),
|
|
498
|
+
columnNumber: this.columnNumber()
|
|
499
|
+
});
|
|
500
|
+
this.updateIconStyles();
|
|
501
|
+
}
|
|
502
|
+
handleMultiColumnSort(direction) {
|
|
503
|
+
const existingSortIndex = this.activeSorts().findIndex(sort => sort.column === this.column()?.data);
|
|
504
|
+
if (existingSortIndex !== -1) {
|
|
505
|
+
if (this.activeSorts()[existingSortIndex].direction !== direction) {
|
|
506
|
+
this.activeSorts()[existingSortIndex].direction = direction;
|
|
507
|
+
this.activeSorts()[existingSortIndex].columnNumber = this.columnNumber();
|
|
508
|
+
}
|
|
509
|
+
else {
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
this.activeSorts().push({
|
|
515
|
+
column: this.column()?.data || '',
|
|
516
|
+
direction,
|
|
517
|
+
columnNumber: this.columnNumber()
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
this.multiSortChange.emit([...this.activeSorts()]);
|
|
521
|
+
this.updateIconStyles();
|
|
522
|
+
}
|
|
523
|
+
updateIconStyles() {
|
|
524
|
+
console.log("Col", this.column()?.data);
|
|
525
|
+
if (this.multiColumnSort()) {
|
|
526
|
+
this.updateMultiColumnIconStyles();
|
|
527
|
+
}
|
|
528
|
+
else {
|
|
529
|
+
this.updateSingleColumnIconStyles();
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
updateSingleColumnIconStyles() {
|
|
533
|
+
const isActiveColumn = this.activeSort()?.column === this.column()?.data;
|
|
534
|
+
setTimeout(() => {
|
|
535
|
+
this.renderer?.setStyle(this.upIcon, 'opacity', isActiveColumn && this.currentDirection() === 'ASC' ? '1' : '0.5');
|
|
536
|
+
this.renderer?.setStyle(this.downIcon, 'opacity', isActiveColumn && this.currentDirection() === 'DESC' ? '1' : '0.5');
|
|
537
|
+
}, 0);
|
|
538
|
+
}
|
|
539
|
+
updateMultiColumnIconStyles() {
|
|
540
|
+
const columnSort = this.activeSorts().find(sort => sort.column === this.column()?.data);
|
|
541
|
+
setTimeout(() => {
|
|
542
|
+
this.renderer?.setStyle(this.upIcon, 'opacity', columnSort?.direction === 'ASC' ? '1' : '0.5');
|
|
543
|
+
this.renderer?.setStyle(this.downIcon, 'opacity', columnSort?.direction === 'DESC' ? '1' : '0.5');
|
|
544
|
+
if (this.sortOrderElement) {
|
|
545
|
+
const sortIndex = this.activeSorts().findIndex(sort => sort.column === this.column()?.data);
|
|
546
|
+
if (sortIndex !== -1) {
|
|
547
|
+
this.renderer?.setProperty(this.sortOrderElement, 'textContent', (sortIndex + 1).toString());
|
|
548
|
+
}
|
|
549
|
+
else {
|
|
550
|
+
this.renderer?.setProperty(this.sortOrderElement, 'textContent', '');
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}, 0);
|
|
554
|
+
}
|
|
555
|
+
static { this.ɵfac = function SortIconsDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || SortIconsDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2)); }; }
|
|
556
|
+
static { this.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: SortIconsDirective, selectors: [["", "appSortIcons", ""]], inputs: { column: [1, "column"], activeSort: [1, "activeSort"], activeSorts: [1, "activeSorts"], multiColumnSort: [1, "multiColumnSort"] }, outputs: { sortChange: "sortChange", multiSortChange: "multiSortChange" }, features: [i0.ɵɵNgOnChangesFeature] }); }
|
|
557
|
+
}
|
|
558
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SortIconsDirective, [{
|
|
559
|
+
type: Directive,
|
|
560
|
+
args: [{
|
|
561
|
+
selector: '[appSortIcons]',
|
|
562
|
+
}]
|
|
563
|
+
}], () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], null); })();
|
|
564
|
+
|
|
410
565
|
const _c0 = ["filter"];
|
|
411
566
|
const _c1 = ["table"];
|
|
412
567
|
const _c2 = ["colHeaderRef"];
|
|
@@ -442,36 +597,28 @@ function TableComponent_div_5_p_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
442
597
|
i0.ɵɵadvance();
|
|
443
598
|
i0.ɵɵtextInterpolate1(" ", (colHeader_r4 == null ? null : colHeader_r4.data) || " ", " ");
|
|
444
599
|
} }
|
|
445
|
-
function
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
function TableComponent_div_5_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
449
|
-
const _r5 = i0.ɵɵgetCurrentView();
|
|
450
|
-
i0.ɵɵelementStart(0, "span", 17);
|
|
451
|
-
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()); });
|
|
452
|
-
i0.ɵɵtemplate(1, TableComponent_div_5_span_3_span_1_Template, 1, 0, "span", 18);
|
|
453
|
-
i0.ɵɵnamespaceSVG();
|
|
454
|
-
i0.ɵɵelementStart(2, "svg", 19);
|
|
455
|
-
i0.ɵɵelement(3, "path", 20);
|
|
456
|
-
i0.ɵɵelementEnd()();
|
|
600
|
+
function TableComponent_div_5_3_ng_template_0_Template(rf, ctx) { }
|
|
601
|
+
function TableComponent_div_5_3_Template(rf, ctx) { if (rf & 1) {
|
|
602
|
+
i0.ɵɵtemplate(0, TableComponent_div_5_3_ng_template_0_Template, 0, 0, "ng-template", 17);
|
|
457
603
|
} if (rf & 2) {
|
|
458
604
|
const colHeader_r4 = i0.ɵɵnextContext().$implicit;
|
|
459
|
-
|
|
460
|
-
i0.ɵɵadvance();
|
|
461
|
-
i0.ɵɵproperty("ngIf", (ctx_r1.appliedFilters[colHeader_r4.data] == null ? null : ctx_r1.appliedFilters[colHeader_r4.data].length) > 0);
|
|
605
|
+
i0.ɵɵproperty("customComponent", colHeader_r4 == null ? null : colHeader_r4.componentRef)("data", colHeader_r4.data);
|
|
462
606
|
} }
|
|
463
|
-
function
|
|
464
|
-
|
|
465
|
-
i0.ɵɵ
|
|
607
|
+
function TableComponent_div_5_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
608
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
609
|
+
i0.ɵɵelementStart(0, "span", 18);
|
|
610
|
+
i0.ɵɵlistener("sortChange", function TableComponent_div_5_span_4_Template_span_sortChange_0_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onSortChange($event)); });
|
|
611
|
+
i0.ɵɵelementEnd();
|
|
466
612
|
} if (rf & 2) {
|
|
467
613
|
const colHeader_r4 = i0.ɵɵnextContext().$implicit;
|
|
468
|
-
|
|
614
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
615
|
+
i0.ɵɵproperty("column", colHeader_r4)("activeSort", ctx_r1.currentSort)("activeSorts", ctx_r1.multiColumnSort)("multiColumnSort", ctx_r1.config.multiColumnSort);
|
|
469
616
|
} }
|
|
470
617
|
function TableComponent_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
471
618
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
472
619
|
i0.ɵɵelementStart(0, "div", 12, 2);
|
|
473
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); });
|
|
474
|
-
i0.ɵɵtemplate(2, TableComponent_div_5_p_2_Template, 2, 1, "p", 13)(3,
|
|
621
|
+
i0.ɵɵtemplate(2, TableComponent_div_5_p_2_Template, 2, 1, "p", 13)(3, TableComponent_div_5_3_Template, 1, 2, null, 14)(4, TableComponent_div_5_span_4_Template, 1, 4, "span", 15);
|
|
475
622
|
i0.ɵɵelementEnd();
|
|
476
623
|
} if (rf & 2) {
|
|
477
624
|
const colHeader_r4 = ctx.$implicit;
|
|
@@ -479,12 +626,12 @@ function TableComponent_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
|
479
626
|
i0.ɵɵadvance(2);
|
|
480
627
|
i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.type) !== "custom");
|
|
481
628
|
i0.ɵɵadvance();
|
|
482
|
-
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);
|
|
483
|
-
i0.ɵɵadvance();
|
|
484
629
|
i0.ɵɵproperty("ngIf", (colHeader_r4 == null ? null : colHeader_r4.type) === "custom");
|
|
630
|
+
i0.ɵɵadvance();
|
|
631
|
+
i0.ɵɵproperty("ngIf", colHeader_r4 == null ? null : colHeader_r4.isSortable);
|
|
485
632
|
} }
|
|
486
633
|
function TableComponent_div_7_div_2_p_2_Template(rf, ctx) { if (rf & 1) {
|
|
487
|
-
i0.ɵɵelementStart(0, "p",
|
|
634
|
+
i0.ɵɵelementStart(0, "p", 26);
|
|
488
635
|
i0.ɵɵtext(1);
|
|
489
636
|
i0.ɵɵelementEnd();
|
|
490
637
|
} if (rf & 2) {
|
|
@@ -498,7 +645,7 @@ function TableComponent_div_7_div_2_p_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
498
645
|
} }
|
|
499
646
|
function TableComponent_div_7_div_2_3_ng_template_0_Template(rf, ctx) { }
|
|
500
647
|
function TableComponent_div_7_div_2_3_Template(rf, ctx) { if (rf & 1) {
|
|
501
|
-
i0.ɵɵtemplate(0, TableComponent_div_7_div_2_3_ng_template_0_Template, 0, 0, "ng-template",
|
|
648
|
+
i0.ɵɵtemplate(0, TableComponent_div_7_div_2_3_ng_template_0_Template, 0, 0, "ng-template", 17);
|
|
502
649
|
} if (rf & 2) {
|
|
503
650
|
const ctx_r11 = i0.ɵɵnextContext();
|
|
504
651
|
const col_r10 = ctx_r11.$implicit;
|
|
@@ -508,10 +655,10 @@ function TableComponent_div_7_div_2_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
508
655
|
} }
|
|
509
656
|
function TableComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
510
657
|
const _r8 = i0.ɵɵgetCurrentView();
|
|
511
|
-
i0.ɵɵelementStart(0, "div",
|
|
658
|
+
i0.ɵɵelementStart(0, "div", 23);
|
|
512
659
|
i0.ɵɵlistener("click", function TableComponent_div_7_div_2_Template_div_click_0_listener() { const ctx_r8 = i0.ɵɵrestoreView(_r8); const col_r10 = ctx_r8.$implicit; const i_r11 = ctx_r8.index; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView((ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r11] == null ? null : ctx_r1.config.colConfig[i_r11].action) ? ctx_r1.config == null ? null : ctx_r1.config.colConfig[i_r11] == null ? null : ctx_r1.config.colConfig[i_r11].action(col_r10) : null); });
|
|
513
|
-
i0.ɵɵelementStart(1, "div",
|
|
514
|
-
i0.ɵɵtemplate(2, TableComponent_div_7_div_2_p_2_Template, 2, 7, "p",
|
|
660
|
+
i0.ɵɵelementStart(1, "div", 24);
|
|
661
|
+
i0.ɵɵtemplate(2, TableComponent_div_7_div_2_p_2_Template, 2, 7, "p", 25)(3, TableComponent_div_7_div_2_3_Template, 1, 2, null, 14);
|
|
515
662
|
i0.ɵɵelementEnd()();
|
|
516
663
|
} if (rf & 2) {
|
|
517
664
|
const i_r11 = ctx.index;
|
|
@@ -527,7 +674,7 @@ function TableComponent_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
527
674
|
} }
|
|
528
675
|
function TableComponent_div_7_div_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
529
676
|
i0.ɵɵelementContainerStart(0);
|
|
530
|
-
i0.ɵɵelementStart(1, "div",
|
|
677
|
+
i0.ɵɵelementStart(1, "div", 28);
|
|
531
678
|
i0.ɵɵtext(2, " Loading... ");
|
|
532
679
|
i0.ɵɵelementEnd();
|
|
533
680
|
i0.ɵɵelementContainerEnd();
|
|
@@ -537,7 +684,7 @@ function TableComponent_div_7_div_3_ng_container_1_Template(rf, ctx) { if (rf &
|
|
|
537
684
|
} }
|
|
538
685
|
function TableComponent_div_7_div_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
539
686
|
i0.ɵɵelementContainerStart(0);
|
|
540
|
-
i0.ɵɵelementStart(1, "div",
|
|
687
|
+
i0.ɵɵelementStart(1, "div", 28);
|
|
541
688
|
i0.ɵɵtext(2, " No Data Available... ");
|
|
542
689
|
i0.ɵɵelementEnd();
|
|
543
690
|
i0.ɵɵelementContainerEnd();
|
|
@@ -547,7 +694,7 @@ function TableComponent_div_7_div_3_ng_container_2_Template(rf, ctx) { if (rf &
|
|
|
547
694
|
} }
|
|
548
695
|
function TableComponent_div_7_div_3_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
549
696
|
i0.ɵɵelementContainerStart(0);
|
|
550
|
-
i0.ɵɵelement(1, "sub-table",
|
|
697
|
+
i0.ɵɵelement(1, "sub-table", 29);
|
|
551
698
|
i0.ɵɵelementContainerEnd();
|
|
552
699
|
} if (rf & 2) {
|
|
553
700
|
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
@@ -555,8 +702,8 @@ function TableComponent_div_7_div_3_ng_container_3_Template(rf, ctx) { if (rf &
|
|
|
555
702
|
i0.ɵɵproperty("config", ctx_r1.subTableconfig)("tableData", ctx_r1.subTableData);
|
|
556
703
|
} }
|
|
557
704
|
function TableComponent_div_7_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
558
|
-
i0.ɵɵelementStart(0, "div",
|
|
559
|
-
i0.ɵɵtemplate(1, TableComponent_div_7_div_3_ng_container_1_Template, 3, 2, "ng-container",
|
|
705
|
+
i0.ɵɵelementStart(0, "div", 27);
|
|
706
|
+
i0.ɵɵtemplate(1, TableComponent_div_7_div_3_ng_container_1_Template, 3, 2, "ng-container", 14)(2, TableComponent_div_7_div_3_ng_container_2_Template, 3, 2, "ng-container", 14)(3, TableComponent_div_7_div_3_ng_container_3_Template, 2, 2, "ng-container", 14);
|
|
560
707
|
i0.ɵɵelementEnd();
|
|
561
708
|
} if (rf & 2) {
|
|
562
709
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
@@ -569,11 +716,11 @@ function TableComponent_div_7_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
569
716
|
} }
|
|
570
717
|
function TableComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
571
718
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
572
|
-
i0.ɵɵelementStart(0, "div",
|
|
719
|
+
i0.ɵɵelementStart(0, "div", 19)(1, "div", 20);
|
|
573
720
|
i0.ɵɵlistener("click", function TableComponent_div_7_Template_div_click_1_listener() { const i_r7 = i0.ɵɵrestoreView(_r6).index; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selectRow(i_r7)); });
|
|
574
|
-
i0.ɵɵtemplate(2, TableComponent_div_7_div_2_Template, 4, 14, "div",
|
|
721
|
+
i0.ɵɵtemplate(2, TableComponent_div_7_div_2_Template, 4, 14, "div", 21);
|
|
575
722
|
i0.ɵɵelementEnd();
|
|
576
|
-
i0.ɵɵtemplate(3, TableComponent_div_7_div_3_Template, 4, 3, "div",
|
|
723
|
+
i0.ɵɵtemplate(3, TableComponent_div_7_div_3_Template, 4, 3, "div", 22);
|
|
577
724
|
i0.ɵɵelementEnd();
|
|
578
725
|
} if (rf & 2) {
|
|
579
726
|
const row_r13 = ctx.$implicit;
|
|
@@ -588,7 +735,7 @@ function TableComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
588
735
|
} }
|
|
589
736
|
function TableComponent_div_8_div_7_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
590
737
|
const _r15 = i0.ɵɵgetCurrentView();
|
|
591
|
-
i0.ɵɵelementStart(0, "span",
|
|
738
|
+
i0.ɵɵelementStart(0, "span", 40);
|
|
592
739
|
i0.ɵɵlistener("click", function TableComponent_div_8_div_7_span_1_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r15); const pageNumber_r16 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.updateSelectedPage(pageNumber_r16)); });
|
|
593
740
|
i0.ɵɵtext(1);
|
|
594
741
|
i0.ɵɵelementEnd();
|
|
@@ -600,8 +747,8 @@ function TableComponent_div_8_div_7_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
600
747
|
i0.ɵɵtextInterpolate(pageNumber_r16);
|
|
601
748
|
} }
|
|
602
749
|
function TableComponent_div_8_div_7_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
603
|
-
i0.ɵɵelementStart(0, "span",
|
|
604
|
-
i0.ɵɵelement(2, "span",
|
|
750
|
+
i0.ɵɵelementStart(0, "span", 41)(1, "div", 28);
|
|
751
|
+
i0.ɵɵelement(2, "span", 42)(3, "span", 42)(4, "span", 43);
|
|
605
752
|
i0.ɵɵelementEnd()();
|
|
606
753
|
} if (rf & 2) {
|
|
607
754
|
i0.ɵɵadvance();
|
|
@@ -613,7 +760,7 @@ function TableComponent_div_8_div_7_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
|
613
760
|
} }
|
|
614
761
|
function TableComponent_div_8_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
615
762
|
i0.ɵɵelementStart(0, "div");
|
|
616
|
-
i0.ɵɵtemplate(1, TableComponent_div_8_div_7_span_1_Template, 2, 4, "span",
|
|
763
|
+
i0.ɵɵtemplate(1, TableComponent_div_8_div_7_span_1_Template, 2, 4, "span", 38)(2, TableComponent_div_8_div_7_span_2_Template, 5, 6, "span", 39);
|
|
617
764
|
i0.ɵɵelementEnd();
|
|
618
765
|
} if (rf & 2) {
|
|
619
766
|
const pageNumber_r16 = ctx.$implicit;
|
|
@@ -624,22 +771,22 @@ function TableComponent_div_8_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
|
624
771
|
} }
|
|
625
772
|
function TableComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
626
773
|
const _r14 = i0.ɵɵgetCurrentView();
|
|
627
|
-
i0.ɵɵelementStart(0, "div",
|
|
774
|
+
i0.ɵɵelementStart(0, "div", 30)(1, "p", 31);
|
|
628
775
|
i0.ɵɵtext(2);
|
|
629
776
|
i0.ɵɵelementEnd();
|
|
630
|
-
i0.ɵɵelementStart(3, "div",
|
|
777
|
+
i0.ɵɵelementStart(3, "div", 32)(4, "span", 33);
|
|
631
778
|
i0.ɵɵlistener("click", function TableComponent_div_8_Template_span_click_4_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateSelectedPage((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) - 1)); });
|
|
632
779
|
i0.ɵɵnamespaceSVG();
|
|
633
|
-
i0.ɵɵelementStart(5, "svg",
|
|
634
|
-
i0.ɵɵelement(6, "path",
|
|
780
|
+
i0.ɵɵelementStart(5, "svg", 34);
|
|
781
|
+
i0.ɵɵelement(6, "path", 35);
|
|
635
782
|
i0.ɵɵelementEnd()();
|
|
636
|
-
i0.ɵɵtemplate(7, TableComponent_div_8_div_7_Template, 3, 2, "div",
|
|
783
|
+
i0.ɵɵtemplate(7, TableComponent_div_8_div_7_Template, 3, 2, "div", 36);
|
|
637
784
|
i0.ɵɵnamespaceHTML();
|
|
638
|
-
i0.ɵɵelementStart(8, "span",
|
|
785
|
+
i0.ɵɵelementStart(8, "span", 33);
|
|
639
786
|
i0.ɵɵlistener("click", function TableComponent_div_8_Template_span_click_8_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.updateSelectedPage((ctx_r1.config.paginationConfig == null ? null : ctx_r1.config.paginationConfig.selectedPage) + 1)); });
|
|
640
787
|
i0.ɵɵnamespaceSVG();
|
|
641
|
-
i0.ɵɵelementStart(9, "svg",
|
|
642
|
-
i0.ɵɵelement(10, "path",
|
|
788
|
+
i0.ɵɵelementStart(9, "svg", 34);
|
|
789
|
+
i0.ɵɵelement(10, "path", 37);
|
|
643
790
|
i0.ɵɵelementEnd()()()();
|
|
644
791
|
} if (rf & 2) {
|
|
645
792
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -665,6 +812,10 @@ class TableComponent {
|
|
|
665
812
|
this.pageSelected = new EventEmitter();
|
|
666
813
|
this.tableData = [];
|
|
667
814
|
this.subTableData = [];
|
|
815
|
+
// Sorting related properties
|
|
816
|
+
this.currentSort = null;
|
|
817
|
+
this.multiColumnSort = [];
|
|
818
|
+
this.sortChange = new EventEmitter();
|
|
668
819
|
}
|
|
669
820
|
// Function to handle row click
|
|
670
821
|
selectRow(index) {
|
|
@@ -672,6 +823,13 @@ class TableComponent {
|
|
|
672
823
|
!!this.config.rowConfig.action && this.config.rowConfig.action(index);
|
|
673
824
|
}
|
|
674
825
|
ngOnInit() {
|
|
826
|
+
// Merge default config with provided config
|
|
827
|
+
this.config = {
|
|
828
|
+
...DEFAULT_TABLE_CONFIG,
|
|
829
|
+
...this.config
|
|
830
|
+
};
|
|
831
|
+
console.log("Table Config:", this.config);
|
|
832
|
+
console.log("Table Data:", this.tableData);
|
|
675
833
|
this.tableLength = !!this.tableData ? this.tableData.length : 0;
|
|
676
834
|
this.initializeFilters();
|
|
677
835
|
if (this.config.paginationConfig) {
|
|
@@ -816,6 +974,25 @@ class TableComponent {
|
|
|
816
974
|
'font-size': fontSize
|
|
817
975
|
};
|
|
818
976
|
}
|
|
977
|
+
onSortChange(sortState) {
|
|
978
|
+
this.currentSort = sortState;
|
|
979
|
+
if (this.config.multiColumnSort) {
|
|
980
|
+
const index = this.multiColumnSort.findIndex(sort => sort.column === sortState.column);
|
|
981
|
+
if (index !== -1) {
|
|
982
|
+
if (sortState.direction === null) {
|
|
983
|
+
this.multiColumnSort.splice(index, 1);
|
|
984
|
+
}
|
|
985
|
+
else {
|
|
986
|
+
this.multiColumnSort[index] = sortState;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
else if (sortState.direction !== null) {
|
|
990
|
+
this.multiColumnSort.push(sortState);
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
console.log("Multi Column Sort:", sortState);
|
|
994
|
+
this.sortChange.emit(sortState);
|
|
995
|
+
}
|
|
819
996
|
static { this.ɵfac = function TableComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TableComponent)(i0.ɵɵdirectiveInject(i0.Renderer2)); }; }
|
|
820
997
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableComponent, selectors: [["mis-table"]], viewQuery: function TableComponent_Query(rf, ctx) { if (rf & 1) {
|
|
821
998
|
i0.ɵɵviewQuery(_c0, 5);
|
|
@@ -826,7 +1003,7 @@ class TableComponent {
|
|
|
826
1003
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.filter = _t.first);
|
|
827
1004
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.table = _t.first);
|
|
828
1005
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.colHeaders = _t);
|
|
829
|
-
} }, inputs: { config: [0, "tableConfig", "config"], subTableconfig: "subTableconfig", tableDataLoading: "tableDataLoading", expandedIndex: "expandedIndex", tableData: "tableData", subTableData: "subTableData", subTableDataLoading: "subTableDataLoading" }, outputs: { filtersUpdated: "filtersUpdated", pageSelected: "pageSelected" }, 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"], [
|
|
1006
|
+
} }, 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"], [4, "ngIf"], ["appSortIcons", "", 3, "column", "activeSort", "activeSorts", "multiColumnSort", "sortChange", 4, "ngIf"], [1, "col-header-text"], ["customTableCell", "", 3, "customComponent", "data"], ["appSortIcons", "", 3, "sortChange", "column", "activeSort", "activeSorts", "multiColumnSort"], [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) {
|
|
830
1007
|
i0.ɵɵelementStart(0, "div", 3);
|
|
831
1008
|
i0.ɵɵtemplate(1, TableComponent_mis_table_filter_1_Template, 2, 2, "mis-table-filter", 4);
|
|
832
1009
|
i0.ɵɵelementStart(2, "div", 5, 0)(4, "div", 6);
|
|
@@ -851,11 +1028,11 @@ class TableComponent {
|
|
|
851
1028
|
i0.ɵɵproperty("ngForOf", ctx.tableData);
|
|
852
1029
|
i0.ɵɵadvance();
|
|
853
1030
|
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));
|
|
854
|
-
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, SubTableComponent, TableFilterComponent, CustomTableCellDirective], 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}.filter-icon[_ngcontent-%COMP%]{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active[_ngcontent-%COMP%]{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row[_ngcontent-%COMP%]{height:auto;border-bottom:none}.loader[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#0937b2}.t-row[_ngcontent-%COMP%]{display:flex;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row[_ngcontent-%COMP%]:hover{background-color:#e7eefd}.active-row[_ngcontent-%COMP%]{background-color:#e6f6fd}.t-col-container[_ngcontent-%COMP%]{padding:0 16px;overflow-wrap:anywhere}.t-row-hover[_ngcontent-%COMP%]:hover{background-color:#0000}.t-col-container-hover[_ngcontent-%COMP%]:hover{background-color:#e6ebf7}.t-col-container-hover[_ngcontent-%COMP%]:first-child{border-left:1px solid #e0e0e0}.t-col-container-hover[_ngcontent-%COMP%]{border-right:1px solid #e0e0e0}.t-col[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%}.t-col-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.text-ellipsis[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}#pagination-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container[_ngcontent-%COMP%]{display:flex;margin-right:32px}.page[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;width:32px;height:32px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;margin-right:8px;cursor:pointer}.page-seperator[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot[_ngcontent-%COMP%]{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active[_ngcontent-%COMP%]{color:#0937b2;border:1px solid #0937b2}"] }); }
|
|
1031
|
+
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, SubTableComponent, TableFilterComponent, CustomTableCellDirective, SortIconsDirective], styles: ["#main-container[_ngcontent-%COMP%]{font-family:Lato,sans-serif;position:relative}.no-scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:0}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:8px;border-radius:15px}.scrollbar[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#9aa7b4;border-radius:15px}#table-container[_ngcontent-%COMP%]{height:inherit;overflow-y:auto}.scroll-horizontally[_ngcontent-%COMP%]{height:inherit;width:fit-content;overflow-y:unset!important;overflow-x:visible}#col-headers-container[_ngcontent-%COMP%]{display:flex;align-items:center;position:sticky;background-color:#fff;width:100%;z-index:1;min-height:44px;border-bottom:1px solid #e0e0e0;top:0;left:0;right:0}.col-header[_ngcontent-%COMP%]{padding:0 16px;display:flex;align-items:center;height:100%}.col-header-text[_ngcontent-%COMP%]{font-style:normal;font-weight:700;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.filter-icon[_ngcontent-%COMP%]{margin-left:8px;padding:0 8px;position:relative;cursor:pointer}#filter-active[_ngcontent-%COMP%]{height:8px;width:8px;background:#16cbbc;border-radius:50%;position:absolute;top:4px;right:4px}.sub-row[_ngcontent-%COMP%]{height:auto;border-bottom:none}.loader[_ngcontent-%COMP%] .mat-progress-spinner circle, .mat-spinner[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#0937b2}.t-row[_ngcontent-%COMP%]{display:flex;min-height:44px;background-color:#fff;width:100%;border-bottom:1px solid #e0e0e0}.t-row[_ngcontent-%COMP%]:hover{background-color:#e7eefd}.active-row[_ngcontent-%COMP%]{background-color:#e6f6fd}.t-col-container[_ngcontent-%COMP%]{padding:0 16px;overflow-wrap:anywhere}.t-row-hover[_ngcontent-%COMP%]:hover{background-color:#0000}.t-col-container-hover[_ngcontent-%COMP%]:hover{background-color:#e6ebf7}.t-col-container-hover[_ngcontent-%COMP%]:first-child{border-left:1px solid #e0e0e0}.t-col-container-hover[_ngcontent-%COMP%]{border-right:1px solid #e0e0e0}.t-col[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%}.t-col-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:14px;line-height:20px;display:flex;align-items:center;letter-spacing:.2px;margin:0}.text-ellipsis[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}#pagination-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;height:56px}#pagination-text[_ngcontent-%COMP%]{font-style:normal;font-weight:400;font-size:12px;line-height:18px;letter-spacing:.4px;color:#6a737d;margin:0 96px 0 0}#pages-container[_ngcontent-%COMP%]{display:flex;margin-right:32px}.page[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;border:1px solid #6a737d;box-sizing:border-box;border-radius:4px;width:32px;height:32px;font-size:14px;line-height:20px;letter-spacing:.2px;color:#6a737d;margin-right:8px;cursor:pointer}.page-seperator[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:32px;height:32px;margin-right:8px}.dot[_ngcontent-%COMP%]{height:3px;width:3px;border-radius:50%;background:#6a737d}.page-active[_ngcontent-%COMP%]{color:#0937b2;border:1px solid #0937b2}.sort-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;margin-left:4px;cursor:pointer}.sort-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:16px;height:16px;transition:opacity .2s ease}.sort-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]:hover{opacity:.8}"] }); }
|
|
855
1032
|
}
|
|
856
1033
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableComponent, [{
|
|
857
1034
|
type: Component,
|
|
858
|
-
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 <ng-template\n *ngIf=\"colHeader?.type === 'custom'\"\n [customComponent]=\"colHeader?.componentRef\"\n [data]=\"colHeader.data\"\n customTableCell\n ></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}.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}\n"] }]
|
|
1035
|
+
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 <ng-template *ngIf=\"colHeader?.type === 'custom'\" customTableCell [customComponent]=\"colHeader?.componentRef\" [data]=\"colHeader.data\"></ng-template>\n <span *ngIf=\"colHeader?.isSortable\" appSortIcons\n [column]=\"colHeader\"\n [activeSort]=\"currentSort\"\n [activeSorts]=\"multiColumnSort\"\n [multiColumnSort]=\"config.multiColumnSort\"\n (sortChange)=\"onSortChange($event)\">\n </span>\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}.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"] }]
|
|
859
1036
|
}], () => [{ type: i0.Renderer2 }], { filtersUpdated: [{
|
|
860
1037
|
type: Output
|
|
861
1038
|
}], filter: [{
|
|
@@ -884,6 +1061,8 @@ class TableComponent {
|
|
|
884
1061
|
}], table: [{
|
|
885
1062
|
type: ViewChild,
|
|
886
1063
|
args: ["table"]
|
|
1064
|
+
}], sortChange: [{
|
|
1065
|
+
type: Output
|
|
887
1066
|
}] }); })();
|
|
888
1067
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TableComponent, { className: "TableComponent" }); })();
|
|
889
1068
|
|
|
@@ -898,16 +1077,36 @@ class TableModule {
|
|
|
898
1077
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableModule, [{
|
|
899
1078
|
type: NgModule,
|
|
900
1079
|
args: [{
|
|
901
|
-
declarations: [
|
|
1080
|
+
declarations: [
|
|
1081
|
+
TableComponent,
|
|
1082
|
+
SubTableComponent,
|
|
1083
|
+
TableFilterComponent,
|
|
1084
|
+
CustomTableCellDirective,
|
|
1085
|
+
SortIconsDirective
|
|
1086
|
+
],
|
|
902
1087
|
imports: [CommonModule, CheckboxModule, ScrollingModule],
|
|
903
|
-
exports: [
|
|
1088
|
+
exports: [
|
|
1089
|
+
TableComponent,
|
|
1090
|
+
SubTableComponent,
|
|
1091
|
+
TableFilterComponent,
|
|
1092
|
+
CustomTableCellDirective,
|
|
1093
|
+
SortIconsDirective
|
|
1094
|
+
]
|
|
904
1095
|
}]
|
|
905
1096
|
}], null, null); })();
|
|
906
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TableModule, { declarations: [TableComponent,
|
|
1097
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(TableModule, { declarations: [TableComponent,
|
|
1098
|
+
SubTableComponent,
|
|
1099
|
+
TableFilterComponent,
|
|
1100
|
+
CustomTableCellDirective,
|
|
1101
|
+
SortIconsDirective], imports: [CommonModule, CheckboxModule, ScrollingModule], exports: [TableComponent,
|
|
1102
|
+
SubTableComponent,
|
|
1103
|
+
TableFilterComponent,
|
|
1104
|
+
CustomTableCellDirective,
|
|
1105
|
+
SortIconsDirective] }); })();
|
|
907
1106
|
|
|
908
1107
|
/**
|
|
909
1108
|
* Generated bundle index. Do not edit.
|
|
910
1109
|
*/
|
|
911
1110
|
|
|
912
|
-
export { CustomTableCellDirective, SubTableComponent, TableComponent, TableFilterComponent, TableModule };
|
|
1111
|
+
export { CustomTableCellDirective, DEFAULT_TABLE_CONFIG, SortIconsDirective, SubTableComponent, TableComponent, TableFilterComponent, TableModule };
|
|
913
1112
|
//# sourceMappingURL=mis-crystal-design-system-table.mjs.map
|