quang 20.4.0 → 20.4.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.
|
@@ -223,11 +223,11 @@ class QuangTableComponent {
|
|
|
223
223
|
return JSON.stringify(value);
|
|
224
224
|
}
|
|
225
225
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: QuangTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
226
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.3", type: QuangTableComponent, isStandalone: true, selector: "quang-table", inputs: { clickableRow: { classPropertyName: "clickableRow", publicName: "clickableRow", isSignal: true, isRequired: false, transformFunction: null }, selectedRows: { classPropertyName: "selectedRows", publicName: "selectedRows", isSignal: true, isRequired: false, transformFunction: null }, stickyTable: { classPropertyName: "stickyTable", publicName: "stickyTable", isSignal: true, isRequired: false, transformFunction: null }, sortType: { classPropertyName: "sortType", publicName: "sortType", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, tableConfigurations: { classPropertyName: "tableConfigurations", publicName: "tableConfigurations", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedRow: "selectedRow", sortChanged: "sortChanged" }, viewQueries: [{ propertyName: "_tableHeader", first: true, predicate: ["tableHeader"], descendants: true, isSignal: true }, { propertyName: "_tableHeaderElement", first: true, predicate: ["tableHeader"], descendants: true, isSignal: true }, { propertyName: "tdWithProperties", predicate: ["tdCell"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_fakeTableHeader", first: true, predicate: ["fakeTableHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class.sticky-table]=\"stickyTable()\"\n class=\"table-responsive\"\n>\n @if (_tableConfigurations().rows.length) {\n <div\n (scroll)=\"tableContainer.scrollLeft = tableHeaderContainer.scrollLeft\"\n #tableHeaderContainer\n class=\"table-header-container\"\n id=\"tableHeaderContainer\"\n >\n <table\n #tableHeader\n id=\"tableHeader\"\n >\n <thead>\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n </table>\n </div>\n <div\n (scroll)=\"tableHeaderContainer.scrollLeft = tableContainer.scrollLeft\"\n #tableContainer\n class=\"table-container\"\n >\n <table\n class=\"table\"\n id=\"table-content\"\n >\n <thead\n #fakeTableHeader\n class=\"fake-table-header\"\n id=\"fakeTableHeader\"\n >\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of _tableConfigurations().rows; track $index) {\n <tr\n [class.hover-table]=\"clickableRow()\"\n [class.selectedRow]=\"row?.rowId ? isSelected(row.rowId!) : null\"\n [ngClass]=\"row.css\"\n (click)=\"clickableRow() ? onClickRow(row) : null\"\n >\n @for (cell of row.cellData; track $index) {\n <td\n [attr.colspan]=\"cell?.fullWidth ? _tableConfigurations().headers.length : undefined\"\n [attr.data-properties]=\"cell.properties ? convertToString(cell.properties) : undefined\"\n [ngClass]=\"cell.css\"\n [ngStyle]=\"cell.style\"\n #tdCell\n >\n {{ !cell.renderer ? cell.text : null }}\n <ng-container\n [ngTemplateOutlet]=\"cell?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.payload,\n }\"\n ></ng-container>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n @if (!_tableConfigurations().rows.length) {\n <h6 class=\"text-center mt-3\">\n {{ noResultsText() | transloco }}\n </h6>\n }\n</div>\n\n<ng-template\n #orderBtns\n let-order\n>\n <div\n [class.sort-asc]=\"order.sort === SortTable.ASC\"\n [class.sort-default]=\"order.sort === SortTable.DEFAULT\"\n [class.sort-desc]=\"order.sort === SortTable.DESC\"\n class=\"sort-arrows\"\n >\n <svg\n class=\"arrow-up\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -600.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m280-400 200-200 200 200H280Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n <svg\n class=\"arrow-down\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -560.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M480-360 280-560h400L480-360Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n </div>\n</ng-template>\n", styles: [":host{display:block;--table-header-container-top: 0;--table-header-bg: var(--bs-body-bg);--table-header-border-color: var(--bs-border-color);--table-header-border-width: 4px;--table-row-hover-brightness: 90%;--table-row-selected-brightness: 95%}.table-responsive{overflow:initial}.table-responsive .fake-table-header{height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .fake-table-header *{padding:0!important;margin:0!important;background-color:var(--table-header-bg);border:unset!important;height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .table-header-container{overflow-x:hidden;z-index:1}.table-responsive .table-container{overflow-x:auto}.table-responsive table{width:100%;font-size:16px;overflow-y:auto;margin-bottom:unset}.table-responsive table thead{text-transform:uppercase}.table-responsive table thead th{padding:1rem .5rem;z-index:999;background-color:var(--table-header-bg);box-shadow:inset 0 calc(var(--table-header-border-width) * -1) 0 0 var(--table-header-border-color)}.table-responsive table tbody tr:first-child td{border-top:0}.table-responsive table tbody tr.hover-table:hover{cursor:pointer;filter:brightness(var(--table-row-hover-brightness))}.table-responsive table tbody tr.selectedRow{filter:brightness(var(--table-row-selected-brightness))}.table-responsive table tbody tr td{padding:1rem .5rem;font-weight:300;vertical-align:middle}.table-responsive table tbody tr:last-child{border-bottom:transparent}.table-responsive.sticky-table{position:relative}.table-responsive.sticky-table .table-header-container{position:sticky;top:var(--table-header-container-top, 0)}.sort-arrows{display:flex;flex-direction:column;justify-content:center}.sort-default{opacity:30%}.sort-asc .arrow-up{opacity:100%}.sort-asc .arrow-down,.sort-desc .arrow-up{display:none}.sort-desc .arrow-down{opacity:100%}.sort-btn:hover{cursor:pointer}.mw-1ch{min-width:1ch}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
226
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.3", type: QuangTableComponent, isStandalone: true, selector: "quang-table", inputs: { clickableRow: { classPropertyName: "clickableRow", publicName: "clickableRow", isSignal: true, isRequired: false, transformFunction: null }, selectedRows: { classPropertyName: "selectedRows", publicName: "selectedRows", isSignal: true, isRequired: false, transformFunction: null }, stickyTable: { classPropertyName: "stickyTable", publicName: "stickyTable", isSignal: true, isRequired: false, transformFunction: null }, sortType: { classPropertyName: "sortType", publicName: "sortType", isSignal: true, isRequired: false, transformFunction: null }, noResultsText: { classPropertyName: "noResultsText", publicName: "noResultsText", isSignal: true, isRequired: false, transformFunction: null }, tableConfigurations: { classPropertyName: "tableConfigurations", publicName: "tableConfigurations", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selectedRow: "selectedRow", sortChanged: "sortChanged" }, viewQueries: [{ propertyName: "_tableHeader", first: true, predicate: ["tableHeader"], descendants: true, isSignal: true }, { propertyName: "_tableHeaderElement", first: true, predicate: ["tableHeader"], descendants: true, isSignal: true }, { propertyName: "tdWithProperties", predicate: ["tdCell"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "_fakeTableHeader", first: true, predicate: ["fakeTableHeader"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n [class.sticky-table]=\"stickyTable()\"\n class=\"table-responsive\"\n>\n @if (_tableConfigurations().rows.length) {\n <div\n (scroll)=\"tableContainer.scrollLeft = tableHeaderContainer.scrollLeft\"\n #tableHeaderContainer\n class=\"table-header-container\"\n id=\"tableHeaderContainer\"\n >\n <table\n #tableHeader\n id=\"tableHeader\"\n >\n <thead>\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n </table>\n </div>\n <div\n (scroll)=\"tableHeaderContainer.scrollLeft = tableContainer.scrollLeft\"\n #tableContainer\n class=\"table-container\"\n >\n <table\n class=\"table\"\n id=\"table-content\"\n >\n <thead\n #fakeTableHeader\n class=\"fake-table-header\"\n id=\"fakeTableHeader\"\n >\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of _tableConfigurations().rows; track row.rowId || $index) {\n <tr\n [class.hover-table]=\"clickableRow()\"\n [class.selectedRow]=\"row.rowId ? isSelected(row.rowId) : null\"\n [ngClass]=\"row.css\"\n (click)=\"clickableRow() ? onClickRow(row) : null\"\n >\n @for (cell of row.cellData; track cell.cellId || $index) {\n <td\n [attr.colspan]=\"cell?.fullWidth ? _tableConfigurations().headers.length : undefined\"\n [attr.data-properties]=\"cell.properties ? convertToString(cell.properties) : undefined\"\n [ngClass]=\"cell.css\"\n [ngStyle]=\"cell.style\"\n #tdCell\n >\n {{ !cell.renderer ? cell.text : null }}\n <ng-container\n [ngTemplateOutlet]=\"cell?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.payload,\n }\"\n ></ng-container>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n @if (!_tableConfigurations().rows.length) {\n <h6 class=\"text-center mt-3\">\n {{ noResultsText() | transloco }}\n </h6>\n }\n</div>\n\n<ng-template\n #orderBtns\n let-order\n>\n <div\n [class.sort-asc]=\"order.sort === SortTable.ASC\"\n [class.sort-default]=\"order.sort === SortTable.DEFAULT\"\n [class.sort-desc]=\"order.sort === SortTable.DESC\"\n class=\"sort-arrows\"\n >\n <svg\n class=\"arrow-up\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -600.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m280-400 200-200 200 200H280Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n <svg\n class=\"arrow-down\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -560.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M480-360 280-560h400L480-360Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n </div>\n</ng-template>\n", styles: [":host{display:block;--table-header-container-top: 0;--table-header-bg: var(--bs-body-bg);--table-header-border-color: var(--bs-border-color);--table-header-border-width: 4px;--table-row-hover-brightness: 90%;--table-row-selected-brightness: 95%}.table-responsive{overflow:initial}.table-responsive .fake-table-header{height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .fake-table-header *{padding:0!important;margin:0!important;background-color:var(--table-header-bg);border:unset!important;height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .table-header-container{overflow-x:hidden;z-index:1}.table-responsive .table-container{overflow-x:auto}.table-responsive table{width:100%;font-size:16px;overflow-y:auto;margin-bottom:unset}.table-responsive table thead{text-transform:uppercase}.table-responsive table thead th{padding:1rem .5rem;z-index:999;background-color:var(--table-header-bg);box-shadow:inset 0 calc(var(--table-header-border-width) * -1) 0 0 var(--table-header-border-color)}.table-responsive table tbody tr:first-child td{border-top:0}.table-responsive table tbody tr.hover-table:hover{cursor:pointer;filter:brightness(var(--table-row-hover-brightness))}.table-responsive table tbody tr.selectedRow{filter:brightness(var(--table-row-selected-brightness))}.table-responsive table tbody tr td{padding:1rem .5rem;font-weight:300;vertical-align:middle}.table-responsive table tbody tr:last-child{border-bottom:transparent}.table-responsive.sticky-table{position:relative}.table-responsive.sticky-table .table-header-container{position:sticky;top:var(--table-header-container-top, 0)}.sort-arrows{display:flex;flex-direction:column;justify-content:center}.sort-default{opacity:30%}.sort-asc .arrow-up{opacity:100%}.sort-asc .arrow-down,.sort-desc .arrow-up{display:none}.sort-desc .arrow-down{opacity:100%}.sort-btn:hover{cursor:pointer}.mw-1ch{min-width:1ch}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
227
227
|
}
|
|
228
228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.3", ngImport: i0, type: QuangTableComponent, decorators: [{
|
|
229
229
|
type: Component,
|
|
230
|
-
args: [{ selector: 'quang-table', imports: [TranslocoPipe, NgClass, NgTemplateOutlet, NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [class.sticky-table]=\"stickyTable()\"\n class=\"table-responsive\"\n>\n @if (_tableConfigurations().rows.length) {\n <div\n (scroll)=\"tableContainer.scrollLeft = tableHeaderContainer.scrollLeft\"\n #tableHeaderContainer\n class=\"table-header-container\"\n id=\"tableHeaderContainer\"\n >\n <table\n #tableHeader\n id=\"tableHeader\"\n >\n <thead>\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n </table>\n </div>\n <div\n (scroll)=\"tableHeaderContainer.scrollLeft = tableContainer.scrollLeft\"\n #tableContainer\n class=\"table-container\"\n >\n <table\n class=\"table\"\n id=\"table-content\"\n >\n <thead\n #fakeTableHeader\n class=\"fake-table-header\"\n id=\"fakeTableHeader\"\n >\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of _tableConfigurations().rows; track $index) {\n <tr\n [class.hover-table]=\"clickableRow()\"\n [class.selectedRow]=\"row
|
|
230
|
+
args: [{ selector: 'quang-table', imports: [TranslocoPipe, NgClass, NgTemplateOutlet, NgStyle], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n [class.sticky-table]=\"stickyTable()\"\n class=\"table-responsive\"\n>\n @if (_tableConfigurations().rows.length) {\n <div\n (scroll)=\"tableContainer.scrollLeft = tableHeaderContainer.scrollLeft\"\n #tableHeaderContainer\n class=\"table-header-container\"\n id=\"tableHeaderContainer\"\n >\n <table\n #tableHeader\n id=\"tableHeader\"\n >\n <thead>\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n </table>\n </div>\n <div\n (scroll)=\"tableHeaderContainer.scrollLeft = tableContainer.scrollLeft\"\n #tableContainer\n class=\"table-container\"\n >\n <table\n class=\"table\"\n id=\"table-content\"\n >\n <thead\n #fakeTableHeader\n class=\"fake-table-header\"\n id=\"fakeTableHeader\"\n >\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of _tableConfigurations().rows; track row.rowId || $index) {\n <tr\n [class.hover-table]=\"clickableRow()\"\n [class.selectedRow]=\"row.rowId ? isSelected(row.rowId) : null\"\n [ngClass]=\"row.css\"\n (click)=\"clickableRow() ? onClickRow(row) : null\"\n >\n @for (cell of row.cellData; track cell.cellId || $index) {\n <td\n [attr.colspan]=\"cell?.fullWidth ? _tableConfigurations().headers.length : undefined\"\n [attr.data-properties]=\"cell.properties ? convertToString(cell.properties) : undefined\"\n [ngClass]=\"cell.css\"\n [ngStyle]=\"cell.style\"\n #tdCell\n >\n {{ !cell.renderer ? cell.text : null }}\n <ng-container\n [ngTemplateOutlet]=\"cell?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.payload,\n }\"\n ></ng-container>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n @if (!_tableConfigurations().rows.length) {\n <h6 class=\"text-center mt-3\">\n {{ noResultsText() | transloco }}\n </h6>\n }\n</div>\n\n<ng-template\n #orderBtns\n let-order\n>\n <div\n [class.sort-asc]=\"order.sort === SortTable.ASC\"\n [class.sort-default]=\"order.sort === SortTable.DEFAULT\"\n [class.sort-desc]=\"order.sort === SortTable.DESC\"\n class=\"sort-arrows\"\n >\n <svg\n class=\"arrow-up\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -600.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m280-400 200-200 200 200H280Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n <svg\n class=\"arrow-down\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -560.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M480-360 280-560h400L480-360Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n </div>\n</ng-template>\n", styles: [":host{display:block;--table-header-container-top: 0;--table-header-bg: var(--bs-body-bg);--table-header-border-color: var(--bs-border-color);--table-header-border-width: 4px;--table-row-hover-brightness: 90%;--table-row-selected-brightness: 95%}.table-responsive{overflow:initial}.table-responsive .fake-table-header{height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .fake-table-header *{padding:0!important;margin:0!important;background-color:var(--table-header-bg);border:unset!important;height:0!important;overflow:hidden!important;line-height:0!important;visibility:collapse!important}.table-responsive .table-header-container{overflow-x:hidden;z-index:1}.table-responsive .table-container{overflow-x:auto}.table-responsive table{width:100%;font-size:16px;overflow-y:auto;margin-bottom:unset}.table-responsive table thead{text-transform:uppercase}.table-responsive table thead th{padding:1rem .5rem;z-index:999;background-color:var(--table-header-bg);box-shadow:inset 0 calc(var(--table-header-border-width) * -1) 0 0 var(--table-header-border-color)}.table-responsive table tbody tr:first-child td{border-top:0}.table-responsive table tbody tr.hover-table:hover{cursor:pointer;filter:brightness(var(--table-row-hover-brightness))}.table-responsive table tbody tr.selectedRow{filter:brightness(var(--table-row-selected-brightness))}.table-responsive table tbody tr td{padding:1rem .5rem;font-weight:300;vertical-align:middle}.table-responsive table tbody tr:last-child{border-bottom:transparent}.table-responsive.sticky-table{position:relative}.table-responsive.sticky-table .table-header-container{position:sticky;top:var(--table-header-container-top, 0)}.sort-arrows{display:flex;flex-direction:column;justify-content:center}.sort-default{opacity:30%}.sort-asc .arrow-up{opacity:100%}.sort-asc .arrow-down,.sort-desc .arrow-up{display:none}.sort-desc .arrow-down{opacity:100%}.sort-btn:hover{cursor:pointer}.mw-1ch{min-width:1ch}\n"] }]
|
|
231
231
|
}] });
|
|
232
232
|
|
|
233
233
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quang-components-table.mjs","sources":["../../../projects/quang/components/table/table.component.ts","../../../projects/quang/components/table/table.component.html","../../../projects/quang/components/table/quang-components-table.ts"],"sourcesContent":["import { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n effect,\n inject,\n input,\n output,\n signal,\n viewChild,\n viewChildren,\n} from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\nimport { ResizeObservableService } from 'quang/device'\nimport { Subscription } from 'rxjs'\n\nexport interface TableHeader {\n text?: string\n sort?: SortCol\n css?: string[]\n renderer?: TemplateRef<any>\n payload?: any\n}\n\nexport interface TableConfiguration<T> {\n headers: TableHeader[]\n rows: TableRow<T>[]\n}\n\nexport interface TableCell {\n renderer?: TemplateRef<any>\n payload?: any\n text?: string\n css?: string[]\n fullWidth?: boolean\n style?: Record<string, string>\n properties?: Record<string, any>\n}\n\nexport interface TableRow<T> {\n payload?: T\n rowId?: string | number\n css?: string[]\n cellData: TableCell[]\n}\n\nexport enum SortTable {\n DEFAULT = 'DEFAULT',\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\nexport enum SortType {\n SINGLE = 'SINGLE',\n MULTIPLE = 'MULTIPLE',\n}\n\nexport interface SortCol {\n key: string\n sort: SortTable\n order?: number\n}\n\n@Component({\n selector: 'quang-table',\n templateUrl: './table.component.html',\n styleUrl: './table.component.scss',\n imports: [TranslocoPipe, NgClass, NgTemplateOutlet, NgStyle],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Table component for displaying data in a tabular format.\n *\n * It supports customizable column cells template and sorting rows by column headers.\n *\n * @usageNotes\n * The component must be configured using the {@link TableConfiguration} object\n */\nexport class QuangTableComponent<T> {\n clickableRow = input<boolean>(false)\n\n selectedRows = input<string[] | number[]>()\n\n stickyTable = input<boolean>(true)\n\n sortType = input<SortType>(SortType.SINGLE)\n\n selectedRow = output<TableRow<T>>()\n\n sortChanged = output<SortCol[]>()\n\n public SortTable = SortTable\n\n destroyRef = inject(DestroyRef)\n\n _resizeObservableService = inject(ResizeObservableService)\n\n _tableHeader = viewChild<ElementRef>('tableHeader')\n\n _tableHeaderElement = viewChild<Element>('tableHeader')\n\n noResultsText = input<string>('quangTable.noResults')\n\n tdWithProperties = viewChildren('tdCell', { read: ElementRef })\n\n _tdWithPropertiesEffect = effect(() => {\n for (const tdWithProperty of this.tdWithProperties()) {\n const properties = tdWithProperty.nativeElement.getAttribute('data-properties')\n if (properties) {\n const propertiesObj = JSON.parse(properties)\n for (const key of Object.keys(propertiesObj)) {\n console.log('key', key, propertiesObj[key])\n tdWithProperty.nativeElement[key] = propertiesObj[key]\n }\n }\n }\n })\n\n _tableHeaderEffect = effect(() => {\n if (this._tableHeader()) {\n this.fixTableHeaderWidth()\n }\n })\n\n _tableHeaderElementEffect = effect(() => {\n if (this._tableHeaderElement()) {\n this.fixTableHeaderWidth()\n }\n })\n\n _fakeTableHeader = viewChild<ElementRef>('fakeTableHeader')\n\n _fakeTableHeaderEffect = effect(() => {\n if (this._fakeTableHeader()) {\n this.fixTableHeaderWidth()\n }\n })\n\n tableConfigurations = input.required<TableConfiguration<T>>()\n\n _tableConfigurations = signal<TableConfiguration<T>>({\n headers: [],\n rows: [],\n })\n\n tableConfigurations$ = toObservable(this.tableConfigurations)\n .pipe(takeUntilDestroyed())\n .subscribe((data) => {\n const headers: TableHeader[] = []\n const rows: TableRow<T>[] = []\n for (const header of data.headers) {\n headers.push({ ...header })\n }\n for (const row of data.rows) {\n rows.push({ ...row })\n }\n this._tableConfigurations.set({\n headers,\n rows,\n })\n })\n\n effectTableConfigurations = effect(() => {\n if (this._tableConfigurations()) {\n this.fixTableHeaderWidth()\n }\n })\n\n hiddenColumnsObservable?: Subscription = undefined\n\n onClickRow(row: TableRow<T>): void {\n if (this.clickableRow()) {\n this.selectedRow.emit(row)\n }\n }\n\n isSelected(rowId: string | number): boolean {\n return !!this.selectedRows()?.some((x) => x === rowId)\n }\n\n lastWidth = -1\n\n fixTableHeaderWidth() {\n setTimeout(() => {\n const stickyColumns = this._tableHeader()?.nativeElement?.querySelectorAll('th')\n\n // Copy the column widths from our hidden Primary table header to our Sticky Table header.\n const hiddenColumns = this._fakeTableHeader()?.nativeElement?.querySelectorAll('th')\n\n if (stickyColumns?.length > 0 && hiddenColumns?.length > 0) {\n if (this.hiddenColumnsObservable) {\n this.hiddenColumnsObservable.unsubscribe()\n }\n this.hiddenColumnsObservable = this._resizeObservableService\n .widthResizeObservable(hiddenColumns[0])\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((data) => {\n if (data !== this.lastWidth) {\n this.lastWidth = data\n this.fixTableHeaderWidth()\n }\n })\n for (let i = 0; i < hiddenColumns?.length; i++) {\n const th = hiddenColumns[i]\n // Since the Sticky Table header is expected to be an exact copy of the Primary Table, we know their indices will be the same.\n stickyColumns[i].style.minWidth = `${th.offsetWidth}px`\n stickyColumns[i].style.maxWidth = `${th.offsetWidth}px`\n }\n }\n })\n }\n\n onSortColumn(sort: SortCol): void {\n // Create a deep copy of headers to avoid direct mutation of the signal's state.\n const tableHeaders: TableHeader[] = this._tableConfigurations().headers.map((h) => ({\n ...h,\n sort: h.sort ? { ...h.sort } : undefined,\n }))\n\n if (this.sortType() === SortType.SINGLE) {\n let newSortToEmit: SortCol | undefined\n\n tableHeaders.forEach((header) => {\n if (!header.sort) return\n\n if (header.sort.key === sort.key) {\n switch (sort.sort) {\n case SortTable.ASC:\n header.sort.sort = SortTable.DESC\n break\n case SortTable.DESC:\n header.sort.sort = SortTable.DEFAULT\n break\n case SortTable.DEFAULT:\n default:\n header.sort.sort = SortTable.ASC\n break\n }\n header.sort.order = 0\n if (header.sort.sort !== SortTable.DEFAULT) {\n newSortToEmit = header.sort\n }\n } else {\n header.sort.sort = SortTable.DEFAULT\n header.sort.order = undefined\n }\n })\n\n this._tableConfigurations.set({ ...this._tableConfigurations(), headers: tableHeaders })\n this.sortChanged.emit(newSortToEmit ? [newSortToEmit] : [])\n } else {\n // 1. Find the clicked header and update its sort status\n const targetHeader = tableHeaders.find((h) => h.sort?.key === sort.key)\n if (targetHeader?.sort) {\n switch (targetHeader.sort.sort) {\n case SortTable.ASC:\n targetHeader.sort.sort = SortTable.DESC\n break\n case SortTable.DESC:\n targetHeader.sort.sort = SortTable.DEFAULT\n break\n case SortTable.DEFAULT:\n default:\n targetHeader.sort.sort = SortTable.ASC\n break\n }\n }\n\n // 2. Collect all currently active sort columns (not DEFAULT)\n const activeSorts = tableHeaders\n .filter((h) => h.sort && h.sort.sort !== SortTable.DEFAULT)\n .map((h) => h.sort as SortCol)\n\n activeSorts.sort((a, b) => (a.order ?? 0) - (b.order ?? 0))\n\n // 3. If the clicked column was already in the list, remove it to re-add it at the end.\n // This makes the last clicked column the highest priority in the sort order.\n const existingIndex = activeSorts.findIndex((s) => s.key === sort.key)\n if (existingIndex > -1) {\n activeSorts.splice(existingIndex, 1)\n }\n\n const clickedSortObject = targetHeader?.sort\n // 4. If the new state is not DEFAULT, add it to the end of the list.\n if (clickedSortObject && clickedSortObject.sort !== SortTable.DEFAULT) {\n activeSorts.push(clickedSortObject)\n }\n\n // 5. Re-assign the 'order' property based on the new sequence.\n activeSorts.forEach((sort, index) => {\n sort.order = index\n })\n\n // 6. Clean up the 'order' for any headers that are no longer sorted.\n const activeSortKeys = new Set(activeSorts.map((s) => s.key))\n tableHeaders.forEach((header) => {\n if (header.sort && !activeSortKeys.has(header.sort.key)) {\n header.sort.order = undefined\n }\n })\n\n this._tableConfigurations.set({ ...this._tableConfigurations(), headers: tableHeaders })\n this.sortChanged.emit(activeSorts)\n }\n }\n\n convertToString(value?: any): string | undefined {\n if (value === null) return undefined\n return JSON.stringify(value)\n }\n\n protected readonly SortType = SortType\n}\n","<div\n [class.sticky-table]=\"stickyTable()\"\n class=\"table-responsive\"\n>\n @if (_tableConfigurations().rows.length) {\n <div\n (scroll)=\"tableContainer.scrollLeft = tableHeaderContainer.scrollLeft\"\n #tableHeaderContainer\n class=\"table-header-container\"\n id=\"tableHeaderContainer\"\n >\n <table\n #tableHeader\n id=\"tableHeader\"\n >\n <thead>\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n </table>\n </div>\n <div\n (scroll)=\"tableHeaderContainer.scrollLeft = tableContainer.scrollLeft\"\n #tableContainer\n class=\"table-container\"\n >\n <table\n class=\"table\"\n id=\"table-content\"\n >\n <thead\n #fakeTableHeader\n class=\"fake-table-header\"\n id=\"fakeTableHeader\"\n >\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of _tableConfigurations().rows; track $index) {\n <tr\n [class.hover-table]=\"clickableRow()\"\n [class.selectedRow]=\"row?.rowId ? isSelected(row.rowId!) : null\"\n [ngClass]=\"row.css\"\n (click)=\"clickableRow() ? onClickRow(row) : null\"\n >\n @for (cell of row.cellData; track $index) {\n <td\n [attr.colspan]=\"cell?.fullWidth ? _tableConfigurations().headers.length : undefined\"\n [attr.data-properties]=\"cell.properties ? convertToString(cell.properties) : undefined\"\n [ngClass]=\"cell.css\"\n [ngStyle]=\"cell.style\"\n #tdCell\n >\n {{ !cell.renderer ? cell.text : null }}\n <ng-container\n [ngTemplateOutlet]=\"cell?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.payload,\n }\"\n ></ng-container>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n @if (!_tableConfigurations().rows.length) {\n <h6 class=\"text-center mt-3\">\n {{ noResultsText() | transloco }}\n </h6>\n }\n</div>\n\n<ng-template\n #orderBtns\n let-order\n>\n <div\n [class.sort-asc]=\"order.sort === SortTable.ASC\"\n [class.sort-default]=\"order.sort === SortTable.DEFAULT\"\n [class.sort-desc]=\"order.sort === SortTable.DESC\"\n class=\"sort-arrows\"\n >\n <svg\n class=\"arrow-up\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -600.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m280-400 200-200 200 200H280Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n <svg\n class=\"arrow-down\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -560.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M480-360 280-560h400L480-360Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAmDY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAJW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;IAMT;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAHW,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;AAkBpB;;;;;;;AAOG;MACU,mBAAmB,CAAA;AAfhC,IAAA,WAAA,GAAA;AAgBE,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAU,KAAK,wDAAC;QAEpC,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAuB;AAE3C,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,IAAI,uDAAC;AAElC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAW,QAAQ,CAAC,MAAM,oDAA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A,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5G9D,8uMA4LA,EAAA,MAAA,EAAA,CAAA,s9DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDpH2B,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAjD,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAWZ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAf/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,OAAA,EAGd,CAAC,aAAa,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAA,eAAA,EAC3C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,8uMAAA,EAAA,MAAA,EAAA,CAAA,s9DAAA,CAAA,EAAA;;;AEzEjD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"quang-components-table.mjs","sources":["../../../projects/quang/components/table/table.component.ts","../../../projects/quang/components/table/table.component.html","../../../projects/quang/components/table/quang-components-table.ts"],"sourcesContent":["import { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n TemplateRef,\n effect,\n inject,\n input,\n output,\n signal,\n viewChild,\n viewChildren,\n} from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\nimport { ResizeObservableService } from 'quang/device'\nimport { Subscription } from 'rxjs'\n\nexport interface TableHeader {\n text?: string\n sort?: SortCol\n css?: string[]\n renderer?: TemplateRef<any>\n payload?: any\n}\n\nexport interface TableConfiguration<T> {\n headers: TableHeader[]\n rows: TableRow<T>[]\n}\n\nexport interface TableCell {\n renderer?: TemplateRef<any>\n payload?: any\n text?: string\n css?: string[]\n fullWidth?: boolean\n style?: Record<string, string>\n properties?: Record<string, any>\n cellId?: string | number\n}\n\nexport interface TableRow<T> {\n payload?: T\n rowId?: string | number\n css?: string[]\n cellData: TableCell[]\n}\n\nexport enum SortTable {\n DEFAULT = 'DEFAULT',\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\nexport enum SortType {\n SINGLE = 'SINGLE',\n MULTIPLE = 'MULTIPLE',\n}\n\nexport interface SortCol {\n key: string\n sort: SortTable\n order?: number\n}\n\n@Component({\n selector: 'quang-table',\n templateUrl: './table.component.html',\n styleUrl: './table.component.scss',\n imports: [TranslocoPipe, NgClass, NgTemplateOutlet, NgStyle],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Table component for displaying data in a tabular format.\n *\n * It supports customizable column cells template and sorting rows by column headers.\n *\n * @usageNotes\n * The component must be configured using the {@link TableConfiguration} object\n */\nexport class QuangTableComponent<T> {\n clickableRow = input<boolean>(false)\n\n selectedRows = input<string[] | number[]>()\n\n stickyTable = input<boolean>(true)\n\n sortType = input<SortType>(SortType.SINGLE)\n\n selectedRow = output<TableRow<T>>()\n\n sortChanged = output<SortCol[]>()\n\n public SortTable = SortTable\n\n destroyRef = inject(DestroyRef)\n\n _resizeObservableService = inject(ResizeObservableService)\n\n _tableHeader = viewChild<ElementRef>('tableHeader')\n\n _tableHeaderElement = viewChild<Element>('tableHeader')\n\n noResultsText = input<string>('quangTable.noResults')\n\n tdWithProperties = viewChildren('tdCell', { read: ElementRef })\n\n _tdWithPropertiesEffect = effect(() => {\n for (const tdWithProperty of this.tdWithProperties()) {\n const properties = tdWithProperty.nativeElement.getAttribute('data-properties')\n if (properties) {\n const propertiesObj = JSON.parse(properties)\n for (const key of Object.keys(propertiesObj)) {\n console.log('key', key, propertiesObj[key])\n tdWithProperty.nativeElement[key] = propertiesObj[key]\n }\n }\n }\n })\n\n _tableHeaderEffect = effect(() => {\n if (this._tableHeader()) {\n this.fixTableHeaderWidth()\n }\n })\n\n _tableHeaderElementEffect = effect(() => {\n if (this._tableHeaderElement()) {\n this.fixTableHeaderWidth()\n }\n })\n\n _fakeTableHeader = viewChild<ElementRef>('fakeTableHeader')\n\n _fakeTableHeaderEffect = effect(() => {\n if (this._fakeTableHeader()) {\n this.fixTableHeaderWidth()\n }\n })\n\n tableConfigurations = input.required<TableConfiguration<T>>()\n\n _tableConfigurations = signal<TableConfiguration<T>>({\n headers: [],\n rows: [],\n })\n\n tableConfigurations$ = toObservable(this.tableConfigurations)\n .pipe(takeUntilDestroyed())\n .subscribe((data) => {\n const headers: TableHeader[] = []\n const rows: TableRow<T>[] = []\n for (const header of data.headers) {\n headers.push({ ...header })\n }\n for (const row of data.rows) {\n rows.push({ ...row })\n }\n this._tableConfigurations.set({\n headers,\n rows,\n })\n })\n\n effectTableConfigurations = effect(() => {\n if (this._tableConfigurations()) {\n this.fixTableHeaderWidth()\n }\n })\n\n hiddenColumnsObservable?: Subscription = undefined\n\n onClickRow(row: TableRow<T>): void {\n if (this.clickableRow()) {\n this.selectedRow.emit(row)\n }\n }\n\n isSelected(rowId: string | number): boolean {\n return !!this.selectedRows()?.some((x) => x === rowId)\n }\n\n lastWidth = -1\n\n fixTableHeaderWidth() {\n setTimeout(() => {\n const stickyColumns = this._tableHeader()?.nativeElement?.querySelectorAll('th')\n\n // Copy the column widths from our hidden Primary table header to our Sticky Table header.\n const hiddenColumns = this._fakeTableHeader()?.nativeElement?.querySelectorAll('th')\n\n if (stickyColumns?.length > 0 && hiddenColumns?.length > 0) {\n if (this.hiddenColumnsObservable) {\n this.hiddenColumnsObservable.unsubscribe()\n }\n this.hiddenColumnsObservable = this._resizeObservableService\n .widthResizeObservable(hiddenColumns[0])\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((data) => {\n if (data !== this.lastWidth) {\n this.lastWidth = data\n this.fixTableHeaderWidth()\n }\n })\n for (let i = 0; i < hiddenColumns?.length; i++) {\n const th = hiddenColumns[i]\n // Since the Sticky Table header is expected to be an exact copy of the Primary Table, we know their indices will be the same.\n stickyColumns[i].style.minWidth = `${th.offsetWidth}px`\n stickyColumns[i].style.maxWidth = `${th.offsetWidth}px`\n }\n }\n })\n }\n\n onSortColumn(sort: SortCol): void {\n // Create a deep copy of headers to avoid direct mutation of the signal's state.\n const tableHeaders: TableHeader[] = this._tableConfigurations().headers.map((h) => ({\n ...h,\n sort: h.sort ? { ...h.sort } : undefined,\n }))\n\n if (this.sortType() === SortType.SINGLE) {\n let newSortToEmit: SortCol | undefined\n\n tableHeaders.forEach((header) => {\n if (!header.sort) return\n\n if (header.sort.key === sort.key) {\n switch (sort.sort) {\n case SortTable.ASC:\n header.sort.sort = SortTable.DESC\n break\n case SortTable.DESC:\n header.sort.sort = SortTable.DEFAULT\n break\n case SortTable.DEFAULT:\n default:\n header.sort.sort = SortTable.ASC\n break\n }\n header.sort.order = 0\n if (header.sort.sort !== SortTable.DEFAULT) {\n newSortToEmit = header.sort\n }\n } else {\n header.sort.sort = SortTable.DEFAULT\n header.sort.order = undefined\n }\n })\n\n this._tableConfigurations.set({ ...this._tableConfigurations(), headers: tableHeaders })\n this.sortChanged.emit(newSortToEmit ? [newSortToEmit] : [])\n } else {\n // 1. Find the clicked header and update its sort status\n const targetHeader = tableHeaders.find((h) => h.sort?.key === sort.key)\n if (targetHeader?.sort) {\n switch (targetHeader.sort.sort) {\n case SortTable.ASC:\n targetHeader.sort.sort = SortTable.DESC\n break\n case SortTable.DESC:\n targetHeader.sort.sort = SortTable.DEFAULT\n break\n case SortTable.DEFAULT:\n default:\n targetHeader.sort.sort = SortTable.ASC\n break\n }\n }\n\n // 2. Collect all currently active sort columns (not DEFAULT)\n const activeSorts = tableHeaders\n .filter((h) => h.sort && h.sort.sort !== SortTable.DEFAULT)\n .map((h) => h.sort as SortCol)\n\n activeSorts.sort((a, b) => (a.order ?? 0) - (b.order ?? 0))\n\n // 3. If the clicked column was already in the list, remove it to re-add it at the end.\n // This makes the last clicked column the highest priority in the sort order.\n const existingIndex = activeSorts.findIndex((s) => s.key === sort.key)\n if (existingIndex > -1) {\n activeSorts.splice(existingIndex, 1)\n }\n\n const clickedSortObject = targetHeader?.sort\n // 4. If the new state is not DEFAULT, add it to the end of the list.\n if (clickedSortObject && clickedSortObject.sort !== SortTable.DEFAULT) {\n activeSorts.push(clickedSortObject)\n }\n\n // 5. Re-assign the 'order' property based on the new sequence.\n activeSorts.forEach((sort, index) => {\n sort.order = index\n })\n\n // 6. Clean up the 'order' for any headers that are no longer sorted.\n const activeSortKeys = new Set(activeSorts.map((s) => s.key))\n tableHeaders.forEach((header) => {\n if (header.sort && !activeSortKeys.has(header.sort.key)) {\n header.sort.order = undefined\n }\n })\n\n this._tableConfigurations.set({ ...this._tableConfigurations(), headers: tableHeaders })\n this.sortChanged.emit(activeSorts)\n }\n }\n\n convertToString(value?: any): string | undefined {\n if (value === null) return undefined\n return JSON.stringify(value)\n }\n\n protected readonly SortType = SortType\n}\n","<div\n [class.sticky-table]=\"stickyTable()\"\n class=\"table-responsive\"\n>\n @if (_tableConfigurations().rows.length) {\n <div\n (scroll)=\"tableContainer.scrollLeft = tableHeaderContainer.scrollLeft\"\n #tableHeaderContainer\n class=\"table-header-container\"\n id=\"tableHeaderContainer\"\n >\n <table\n #tableHeader\n id=\"tableHeader\"\n >\n <thead>\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n </table>\n </div>\n <div\n (scroll)=\"tableHeaderContainer.scrollLeft = tableContainer.scrollLeft\"\n #tableContainer\n class=\"table-container\"\n >\n <table\n class=\"table\"\n id=\"table-content\"\n >\n <thead\n #fakeTableHeader\n class=\"fake-table-header\"\n id=\"fakeTableHeader\"\n >\n <tr>\n @for (header of _tableConfigurations().headers; track $index) {\n <th\n [class.sort-btn]=\"header?.sort\"\n (click)=\"header?.sort ? onSortColumn(header.sort!) : null\"\n class=\"align-bottom\"\n >\n <div\n [ngClass]=\"header?.css\"\n class=\"align-self-end d-flex gap-1\"\n >\n {{ !header.renderer ? (header.text | transloco) : null }}\n <ng-container\n [ngTemplateOutlet]=\"header?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: header.payload,\n }\"\n ></ng-container>\n @if (sortType() === SortType.MULTIPLE) {\n <div class=\"mw-1ch\">\n @if (header.sort && header.sort.order !== undefined) {\n <span>{{ header.sort.order + 1 }}</span>\n }\n </div>\n }\n @if (header.sort?.key) {\n <div class=\"d-flex justify-content-between\">\n <ng-container\n [ngTemplateOutlet]=\"orderBtns\"\n [ngTemplateOutletContext]=\"{ $implicit: header.sort }\"\n ></ng-container>\n </div>\n }\n </div>\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of _tableConfigurations().rows; track row.rowId || $index) {\n <tr\n [class.hover-table]=\"clickableRow()\"\n [class.selectedRow]=\"row.rowId ? isSelected(row.rowId) : null\"\n [ngClass]=\"row.css\"\n (click)=\"clickableRow() ? onClickRow(row) : null\"\n >\n @for (cell of row.cellData; track cell.cellId || $index) {\n <td\n [attr.colspan]=\"cell?.fullWidth ? _tableConfigurations().headers.length : undefined\"\n [attr.data-properties]=\"cell.properties ? convertToString(cell.properties) : undefined\"\n [ngClass]=\"cell.css\"\n [ngStyle]=\"cell.style\"\n #tdCell\n >\n {{ !cell.renderer ? cell.text : null }}\n <ng-container\n [ngTemplateOutlet]=\"cell?.renderer ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: cell.payload,\n }\"\n ></ng-container>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n @if (!_tableConfigurations().rows.length) {\n <h6 class=\"text-center mt-3\">\n {{ noResultsText() | transloco }}\n </h6>\n }\n</div>\n\n<ng-template\n #orderBtns\n let-order\n>\n <div\n [class.sort-asc]=\"order.sort === SortTable.ASC\"\n [class.sort-default]=\"order.sort === SortTable.DEFAULT\"\n [class.sort-desc]=\"order.sort === SortTable.DESC\"\n class=\"sort-arrows\"\n >\n <svg\n class=\"arrow-up\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -600.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"m280-400 200-200 200 200H280Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n <svg\n class=\"arrow-down\"\n fill=\"currentColor\"\n height=\"10\"\n stroke=\"currentColor\"\n viewBox=\"279.5 -560.5 401 201\"\n width=\"10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M480-360 280-560h400L480-360Z\"\n fill=\"currentColor\"\n stroke=\"currentColor\"\n ></path>\n </svg>\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;IAoDY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAJW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;IAMT;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,QAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAHW,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;AAkBpB;;;;;;;AAOG;MACU,mBAAmB,CAAA;AAfhC,IAAA,WAAA,GAAA;AAgBE,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAU,KAAK,wDAAC;QAEpC,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAuB;AAE3C,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,IAAI,uDAAC;AAElC,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAW,QAAQ,CAAC,MAAM,oDAAC;QAE3C,IAAA,CAAA,WAAW,GAAG,MAAM,EAAe;QAEnC,IAAA,CAAA,WAAW,GAAG,MAAM,EAAa;QAE1B,IAAA,CAAA,SAAS,GAAG,SAAS;AAE5B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B,QAAA,IAAA,CAAA,wBAAwB,GAAG,MA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CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAjD,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAWZ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAf/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,OAAA,EAGd,CAAC,aAAa,EAAE,OAAO,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAA,eAAA,EAC3C,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,wwMAAA,EAAA,MAAA,EAAA,CAAA,s9DAAA,CAAA,EAAA;;;AE1EjD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quang",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "20.4.
|
|
4
|
+
"version": "20.4.1",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"tslib": "^2.3.0"
|
|
7
7
|
},
|
|
@@ -95,25 +95,25 @@
|
|
|
95
95
|
"types": "./auth/mobile/index.d.ts",
|
|
96
96
|
"default": "./fesm2022/quang-auth-mobile.mjs"
|
|
97
97
|
},
|
|
98
|
-
"./components/autocomplete": {
|
|
99
|
-
"types": "./components/autocomplete/index.d.ts",
|
|
100
|
-
"default": "./fesm2022/quang-components-autocomplete.mjs"
|
|
101
|
-
},
|
|
102
98
|
"./components/checkbox": {
|
|
103
99
|
"types": "./components/checkbox/index.d.ts",
|
|
104
100
|
"default": "./fesm2022/quang-components-checkbox.mjs"
|
|
105
101
|
},
|
|
106
|
-
"./components/
|
|
107
|
-
"types": "./components/
|
|
108
|
-
"default": "./fesm2022/quang-components-
|
|
102
|
+
"./components/autocomplete": {
|
|
103
|
+
"types": "./components/autocomplete/index.d.ts",
|
|
104
|
+
"default": "./fesm2022/quang-components-autocomplete.mjs"
|
|
109
105
|
},
|
|
110
106
|
"./components/date": {
|
|
111
107
|
"types": "./components/date/index.d.ts",
|
|
112
108
|
"default": "./fesm2022/quang-components-date.mjs"
|
|
113
109
|
},
|
|
114
|
-
"./components/
|
|
115
|
-
"types": "./components/
|
|
116
|
-
"default": "./fesm2022/quang-components-
|
|
110
|
+
"./components/input": {
|
|
111
|
+
"types": "./components/input/index.d.ts",
|
|
112
|
+
"default": "./fesm2022/quang-components-input.mjs"
|
|
113
|
+
},
|
|
114
|
+
"./components/table": {
|
|
115
|
+
"types": "./components/table/index.d.ts",
|
|
116
|
+
"default": "./fesm2022/quang-components-table.mjs"
|
|
117
117
|
},
|
|
118
118
|
"./components/shared": {
|
|
119
119
|
"types": "./components/shared/index.d.ts",
|
|
@@ -123,33 +123,33 @@
|
|
|
123
123
|
"types": "./components/select/index.d.ts",
|
|
124
124
|
"default": "./fesm2022/quang-components-select.mjs"
|
|
125
125
|
},
|
|
126
|
-
"./components/
|
|
127
|
-
"types": "./components/
|
|
128
|
-
"default": "./fesm2022/quang-components-
|
|
129
|
-
},
|
|
130
|
-
"./overlay/shared": {
|
|
131
|
-
"types": "./overlay/shared/index.d.ts",
|
|
132
|
-
"default": "./fesm2022/quang-overlay-shared.mjs"
|
|
126
|
+
"./components/paginator": {
|
|
127
|
+
"types": "./components/paginator/index.d.ts",
|
|
128
|
+
"default": "./fesm2022/quang-components-paginator.mjs"
|
|
133
129
|
},
|
|
134
|
-
"./
|
|
135
|
-
"types": "./
|
|
136
|
-
"default": "./fesm2022/quang-
|
|
130
|
+
"./overlay/popover": {
|
|
131
|
+
"types": "./overlay/popover/index.d.ts",
|
|
132
|
+
"default": "./fesm2022/quang-overlay-popover.mjs"
|
|
137
133
|
},
|
|
138
134
|
"./overlay/modal": {
|
|
139
135
|
"types": "./overlay/modal/index.d.ts",
|
|
140
136
|
"default": "./fesm2022/quang-overlay-modal.mjs"
|
|
141
137
|
},
|
|
142
|
-
"./
|
|
143
|
-
"types": "./
|
|
144
|
-
"default": "./fesm2022/quang-
|
|
138
|
+
"./components/wysiwyg": {
|
|
139
|
+
"types": "./components/wysiwyg/index.d.ts",
|
|
140
|
+
"default": "./fesm2022/quang-components-wysiwyg.mjs"
|
|
141
|
+
},
|
|
142
|
+
"./overlay/tooltip": {
|
|
143
|
+
"types": "./overlay/tooltip/index.d.ts",
|
|
144
|
+
"default": "./fesm2022/quang-overlay-tooltip.mjs"
|
|
145
145
|
},
|
|
146
146
|
"./overlay/toast": {
|
|
147
147
|
"types": "./overlay/toast/index.d.ts",
|
|
148
148
|
"default": "./fesm2022/quang-overlay-toast.mjs"
|
|
149
149
|
},
|
|
150
|
-
"./overlay/
|
|
151
|
-
"types": "./overlay/
|
|
152
|
-
"default": "./fesm2022/quang-overlay-
|
|
150
|
+
"./overlay/shared": {
|
|
151
|
+
"types": "./overlay/shared/index.d.ts",
|
|
152
|
+
"default": "./fesm2022/quang-overlay-shared.mjs"
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|