ngwr 9.0.1 → 10.0.0
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/README.md +14 -0
- package/badge/styles/_index.scss +16 -6
- package/badge/styles/_tag.scss +10 -1
- package/button/styles/_index.scss +48 -1
- package/date-picker/styles/_index.scss +62 -0
- package/dialog/styles/_index.scss +65 -0
- package/drawer/styles/_index.scss +83 -0
- package/fesm2022/ngwr-action-sheet.mjs +1 -1
- package/fesm2022/ngwr-action-sheet.mjs.map +1 -1
- package/fesm2022/ngwr-breadcrumbs.mjs +2 -2
- package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ngwr-card.mjs +2 -2
- package/fesm2022/ngwr-card.mjs.map +1 -1
- package/fesm2022/ngwr-cascader.mjs +6 -5
- package/fesm2022/ngwr-cascader.mjs.map +1 -1
- package/fesm2022/ngwr-color-picker.mjs +6 -5
- package/fesm2022/ngwr-color-picker.mjs.map +1 -1
- package/fesm2022/ngwr-context-menu.mjs +7 -7
- package/fesm2022/ngwr-context-menu.mjs.map +1 -1
- package/fesm2022/ngwr-date-picker.mjs +521 -8
- package/fesm2022/ngwr-date-picker.mjs.map +1 -1
- package/fesm2022/ngwr-density.mjs +10 -2
- package/fesm2022/ngwr-density.mjs.map +1 -1
- package/fesm2022/ngwr-dialog.mjs +95 -13
- package/fesm2022/ngwr-dialog.mjs.map +1 -1
- package/fesm2022/ngwr-drag-drop.mjs +2 -2
- package/fesm2022/ngwr-drag-drop.mjs.map +1 -1
- package/fesm2022/ngwr-drawer.mjs +377 -22
- package/fesm2022/ngwr-drawer.mjs.map +1 -1
- package/fesm2022/ngwr-dropdown.mjs +4 -3
- package/fesm2022/ngwr-dropdown.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-en.mjs +21 -0
- package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
- package/fesm2022/ngwr-i18n-ru.mjs +22 -0
- package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
- package/fesm2022/ngwr-i18n.mjs +74 -1
- package/fesm2022/ngwr-i18n.mjs.map +1 -1
- package/fesm2022/ngwr-icon.mjs +74 -35
- package/fesm2022/ngwr-icon.mjs.map +1 -1
- package/fesm2022/ngwr-lightbox.mjs +2 -2
- package/fesm2022/ngwr-lightbox.mjs.map +1 -1
- package/fesm2022/ngwr-list.mjs +2 -2
- package/fesm2022/ngwr-list.mjs.map +1 -1
- package/fesm2022/ngwr-mention.mjs +166 -10
- package/fesm2022/ngwr-mention.mjs.map +1 -1
- package/fesm2022/ngwr-overlay.mjs +173 -3
- package/fesm2022/ngwr-overlay.mjs.map +1 -1
- package/fesm2022/ngwr-pagination.mjs +17 -4
- package/fesm2022/ngwr-pagination.mjs.map +1 -1
- package/fesm2022/ngwr-popconfirm.mjs +4 -3
- package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
- package/fesm2022/ngwr-popover.mjs +10 -3
- package/fesm2022/ngwr-popover.mjs.map +1 -1
- package/fesm2022/ngwr-select.mjs +233 -43
- package/fesm2022/ngwr-select.mjs.map +1 -1
- package/fesm2022/ngwr-table.mjs +1 -1
- package/fesm2022/ngwr-table.mjs.map +1 -1
- package/fesm2022/ngwr-theme.mjs +13 -3
- package/fesm2022/ngwr-theme.mjs.map +1 -1
- package/fesm2022/ngwr-tree.mjs +4 -3
- package/fesm2022/ngwr-tree.mjs.map +1 -1
- package/fesm2022/ngwr-version.mjs +1 -1
- package/fesm2022/ngwr-version.mjs.map +1 -1
- package/fesm2022/ngwr-waves.mjs +25 -3
- package/fesm2022/ngwr-waves.mjs.map +1 -1
- package/i18n/en.json +165 -0
- package/i18n/ru.json +165 -0
- package/icon/styles/_index.scss +10 -1
- package/input/styles/_index.scss +16 -0
- package/input-number/styles/_index.scss +8 -1
- package/keyboard/styles/_index.scss +10 -3
- package/llms-full.txt +14 -14
- package/llms.txt +12 -6
- package/mention/styles/_index.scss +23 -0
- package/package.json +23 -5
- package/pagination/styles/_index.scss +12 -0
- package/popover/styles/_index.scss +129 -45
- package/schematics/ng-add/index.js +18 -4
- package/schematics/package.json +3 -0
- package/schematics/use/symbol-map.json +7 -0
- package/select/styles/_index.scss +13 -0
- package/splitter/styles/_index.scss +7 -1
- package/table/styles/_index.scss +28 -10
- package/theme/styles/_box-model.scss +29 -0
- package/theme/styles/_colors.scss +74 -15
- package/theme/styles/_dark.scss +52 -6
- package/theme/styles/_index.scss +1 -0
- package/types/ngwr-cascader.d.ts +1 -0
- package/types/ngwr-color-picker.d.ts +1 -0
- package/types/ngwr-context-menu.d.ts +1 -0
- package/types/ngwr-date-picker.d.ts +172 -4
- package/types/ngwr-density.d.ts +8 -1
- package/types/ngwr-dialog.d.ts +80 -8
- package/types/ngwr-drawer.d.ts +245 -10
- package/types/ngwr-dropdown.d.ts +1 -0
- package/types/ngwr-i18n.d.ts +65 -2
- package/types/ngwr-icon.d.ts +11 -19
- package/types/ngwr-mention.d.ts +45 -1
- package/types/ngwr-overlay.d.ts +80 -2
- package/types/ngwr-pagination.d.ts +14 -1
- package/types/ngwr-popconfirm.d.ts +1 -0
- package/types/ngwr-popover.d.ts +1 -0
- package/types/ngwr-select.d.ts +121 -9
- package/types/ngwr-theme.d.ts +8 -1
- package/types/ngwr-tree.d.ts +1 -0
- package/types/ngwr-version.d.ts +1 -1
- package/types/ngwr-waves.d.ts +10 -0
- package/waves/styles/_index.scss +21 -0
package/fesm2022/ngwr-table.mjs
CHANGED
|
@@ -1050,7 +1050,7 @@ class WrTable {
|
|
|
1050
1050
|
return this.cellMap().get(String(key));
|
|
1051
1051
|
}
|
|
1052
1052
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1053
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrTable, isStandalone: true, selector: "wr-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, collapsedGroups: { classPropertyName: "collapsedGroups", publicName: "collapsedGroups", isSignal: true, isRequired: false, transformFunction: null }, groupSummary: { classPropertyName: "groupSummary", publicName: "groupSummary", isSignal: true, isRequired: false, transformFunction: null }, showGroupCount: { classPropertyName: "showGroupCount", publicName: "showGroupCount", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, viewportHeight: { classPropertyName: "viewportHeight", publicName: "viewportHeight", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnOrder: "columnOrderChange", selection: "selectionChange", expanded: "expandedChange", collapsedGroups: "collapsedGroupsChange", sort: "sortChange", filterChange: "filterChange", page: "pageChange" }, host: { properties: { "class.wr-table--responsive": "responsive()", "class.wr-table--virtual": "virtualized()" }, classAttribute: "wr-table" }, queries: [{ propertyName: "cellTemplates", predicate: WrTableCell, isSignal: true }, { propertyName: "expandTpl", first: true, predicate: WrTableExpand, descendants: true, isSignal: true }, { propertyName: "groupTpl", first: true, predicate: WrTableGroupHeader, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerCells", predicate: ["thCell"], descendants: true, isSignal: true }, { propertyName: "scrollEl", first: true, predicate: ["scroll"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (loading()) {\n <div class=\"wr-table__loading\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 0 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of displayColumns(); track col.key) {\n <col [style.width.px]=\"colWidth(col.key)\" />\n }\n </colgroup>\n <thead>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n size=\"sm\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n aria-label=\"Select all rows\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n @for (col of displayColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [cdkDragDisabled]=\"!reorderable() || !!col.column.pin\"\n class=\"wr-table__th\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.column.pin\"\n [class.wr-table__th--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__th--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__th--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__th--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button type=\"button\" class=\"wr-table__sort-btn\" aria-label=\"Sort column\" (click)=\"cycleSort(col.key)\">\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [ngModel]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (ngModelChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n aria-label=\"Select group\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n aria-label=\"Toggle group\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n <span class=\"wr-table__group-label\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [ngModel]=\"isRowSelected(entry.row)\"\n (ngModelChange)=\"toggleRow(entry.row, $event)\"\n aria-label=\"Select row\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n aria-label=\"Toggle row details\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__td\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\n >\n @if (templateFor(col.key); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"cellContext(entry.row, col.key, col.column)\"\n />\n } @else {\n {{ getValue(entry.row, col.key) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n } @empty {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">No data</td>\n </tr>\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: WrCheckbox, selector: "wr-checkbox", inputs: ["id", "checkboxValue", "checked", "disabled", "size", "icon", "indeterminate"], outputs: ["checkedChange", "touch"] }, { kind: "component", type: WrPagination, selector: "wr-pagination", inputs: ["currentPage", "pageSize", "total", "pageSizeOptions", "showSizeChanger", "showTotal", "align", "size", "shape", "disabled", "responsive", "ofLabel", "prevLabel", "nextLabel", "itemsPerPageLabel"], outputs: ["currentPageChange", "pageSizeChange"] }, { kind: "component", type: WrSpinner, selector: "wr-spinner", inputs: ["size"] }, { kind: "component", type: WrTableSort, selector: "wr-table-sort", inputs: ["direction"] }, { kind: "component", type: WrTableFilter, selector: "wr-table-filter", inputs: ["items"], outputs: ["selectionChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1053
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: WrTable, isStandalone: true, selector: "wr-table", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, reorderable: { classPropertyName: "reorderable", publicName: "reorderable", isSignal: true, isRequired: false, transformFunction: null }, columnOrder: { classPropertyName: "columnOrder", publicName: "columnOrder", isSignal: true, isRequired: false, transformFunction: null }, rowSelection: { classPropertyName: "rowSelection", publicName: "rowSelection", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, collapsedGroups: { classPropertyName: "collapsedGroups", publicName: "collapsedGroups", isSignal: true, isRequired: false, transformFunction: null }, groupSummary: { classPropertyName: "groupSummary", publicName: "groupSummary", isSignal: true, isRequired: false, transformFunction: null }, showGroupCount: { classPropertyName: "showGroupCount", publicName: "showGroupCount", isSignal: true, isRequired: false, transformFunction: null }, sort: { classPropertyName: "sort", publicName: "sort", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, page: { classPropertyName: "page", publicName: "page", isSignal: true, isRequired: false, transformFunction: null }, totalItems: { classPropertyName: "totalItems", publicName: "totalItems", isSignal: true, isRequired: false, transformFunction: null }, virtualScroll: { classPropertyName: "virtualScroll", publicName: "virtualScroll", isSignal: true, isRequired: false, transformFunction: null }, rowHeight: { classPropertyName: "rowHeight", publicName: "rowHeight", isSignal: true, isRequired: false, transformFunction: null }, viewportHeight: { classPropertyName: "viewportHeight", publicName: "viewportHeight", isSignal: true, isRequired: false, transformFunction: null }, overscan: { classPropertyName: "overscan", publicName: "overscan", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { columnOrder: "columnOrderChange", selection: "selectionChange", expanded: "expandedChange", collapsedGroups: "collapsedGroupsChange", sort: "sortChange", filterChange: "filterChange", page: "pageChange" }, host: { properties: { "class.wr-table--responsive": "responsive()", "class.wr-table--virtual": "virtualized()" }, classAttribute: "wr-table" }, queries: [{ propertyName: "cellTemplates", predicate: WrTableCell, isSignal: true }, { propertyName: "expandTpl", first: true, predicate: WrTableExpand, descendants: true, isSignal: true }, { propertyName: "groupTpl", first: true, predicate: WrTableGroupHeader, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "headerCells", predicate: ["thCell"], descendants: true, isSignal: true }, { propertyName: "scrollEl", first: true, predicate: ["scroll"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (loading()) {\n <div class=\"wr-table__loading\">\n <wr-spinner size=\"lg\" />\n </div>\n}\n\n<div\n class=\"wr-table__scroll\"\n #scroll\n [style.max-height]=\"virtualized() ? resolvedViewportHeight() : null\"\n [attr.tabindex]=\"virtualized() ? 0 : null\"\n>\n <table\n class=\"wr-table__table\"\n [class.wr-table__table--fixed]=\"fixedLayoutActive()\"\n [style.--wr-table-row-h.px]=\"virtualized() ? effRowH() : null\"\n [attr.aria-rowcount]=\"virtualized() ? renderRows().length + 1 + (hasSummary() && items()?.length ? 1 : 0) : null\"\n >\n <colgroup>\n @if (rowSelection()) {\n <col class=\"wr-table__col--lead\" />\n }\n @if (expandable()) {\n <col class=\"wr-table__col--lead\" />\n }\n @for (col of displayColumns(); track col.key) {\n <col [style.width.px]=\"colWidth(col.key)\" />\n }\n </colgroup>\n <thead>\n <tr\n cdkDropList\n cdkDropListOrientation=\"horizontal\"\n [cdkDropListSortPredicate]=\"sortPredicate\"\n (cdkDropListDropped)=\"onColumnDrop($event)\"\n >\n @if (rowSelection()) {\n <th class=\"wr-table__th wr-table__th--select\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n size=\"sm\"\n [ngModel]=\"allSelected()\"\n [indeterminate]=\"someSelected()\"\n (ngModelChange)=\"toggleAll($event)\"\n aria-label=\"Select all rows\"\n />\n }\n </th>\n }\n @if (expandable()) {\n <th class=\"wr-table__th wr-table__th--expand\"></th>\n }\n @for (col of displayColumns(); track col.key) {\n <th\n #thCell\n cdkDrag\n [cdkDragDisabled]=\"!reorderable() || !!col.column.pin\"\n class=\"wr-table__th\"\n [class.wr-table__th--draggable]=\"reorderable() && !col.column.pin\"\n [class.wr-table__th--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__th--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__th--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__th--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n <div class=\"wr-table__th-inner\">\n <span class=\"wr-table__title\">{{ col.column.title }}</span>\n\n @if (col.column.sortable) {\n <button type=\"button\" class=\"wr-table__sort-btn\" aria-label=\"Sort column\" (click)=\"cycleSort(col.key)\">\n <wr-table-sort [direction]=\"directionFor(col.key)\" />\n </button>\n }\n\n @if (col.column.filterItems; as filterItems) {\n @if (filterItems.length) {\n <wr-table-filter [items]=\"filterItems\" (selectionChange)=\"onFilter(col.key, $event)\" />\n }\n }\n </div>\n\n @if (col.column.resizable) {\n <span\n class=\"wr-table__resize-handle\"\n aria-hidden=\"true\"\n (pointerdown)=\"onResizeStart($event, col.key, thCell)\"\n (pointermove)=\"onResizeMove($event)\"\n (pointerup)=\"onResizeEnd($event)\"\n (pointercancel)=\"onResizeEnd($event)\"\n (mousedown)=\"$event.stopPropagation()\"\n (touchstart)=\"$event.stopPropagation()\"\n ></span>\n }\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (visibleItems()) {\n @if (virtualized() && virtualWindow().padTop > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padTop\"></td>\n </tr>\n }\n @for (entry of windowRows(); track entry.id; let i = $index) {\n @if (entry.kind === 'group') {\n <tr class=\"wr-table__group-row\" [class.wr-table__group-row--collapsed]=\"entry.group.collapsed\">\n <td class=\"wr-table__group-cell\" [attr.colspan]=\"totalCols()\">\n <!-- The cell spans the full table width; this inner box is what sticks. -->\n <div class=\"wr-table__group-inner\">\n @if (rowSelection() === 'multiple') {\n <wr-checkbox\n class=\"wr-table__group-select\"\n size=\"sm\"\n [ngModel]=\"groupChecked(entry.group.rows)\"\n [indeterminate]=\"groupIndeterminate(entry.group.rows)\"\n (ngModelChange)=\"toggleGroupSelection(entry.group.rows, $event)\"\n aria-label=\"Select group\"\n />\n }\n @if (groupTemplate(); as tpl) {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle wr-table__group-toggle--icon\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n aria-label=\"Toggle group\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n <ng-container [ngTemplateOutlet]=\"tpl\" [ngTemplateOutletContext]=\"entry.group\" />\n } @else {\n <button\n type=\"button\"\n class=\"wr-table__group-toggle\"\n [attr.aria-expanded]=\"!entry.group.collapsed\"\n (click)=\"toggleGroupCollapse(entry.group.value)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__group-icon\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n <span class=\"wr-table__group-label\">{{ entry.group.label }}</span>\n @if (showGroupCount()) {\n <span class=\"wr-table__group-count\">{{ entry.group.count }}</span>\n }\n </button>\n }\n </div>\n </td>\n </tr>\n } @else if (entry.kind === 'group-foot') {\n <tr class=\"wr-table__group-foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ entry.summaries.get(col.key) ?? '' }}\n </td>\n }\n </tr>\n } @else {\n <tr\n class=\"wr-table__tr\"\n [class.wr-table__tr--selected]=\"rowSelection() && isRowSelected(entry.row)\"\n [attr.aria-rowindex]=\"virtualized() ? windowStart() + i + 2 : null\"\n >\n @if (rowSelection()) {\n <td class=\"wr-table__td wr-table__td--select\">\n <wr-checkbox\n size=\"sm\"\n [ngModel]=\"isRowSelected(entry.row)\"\n (ngModelChange)=\"toggleRow(entry.row, $event)\"\n aria-label=\"Select row\"\n />\n </td>\n }\n @if (expandable()) {\n <td class=\"wr-table__td wr-table__td--expand\">\n <button\n type=\"button\"\n class=\"wr-table__expand-btn\"\n [class.wr-table__expand-btn--open]=\"isExpanded(entry.row)\"\n [attr.aria-expanded]=\"isExpanded(entry.row)\"\n aria-label=\"Toggle row details\"\n (click)=\"toggleExpand(entry.row)\"\n >\n <svg\n class=\"wr-icon__svg wr-table__expand-icon\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__td\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n [attr.data-label]=\"col.column.title\"\n >\n @if (templateFor(col.key); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"cellContext(entry.row, col.key, col.column)\"\n />\n } @else {\n {{ getValue(entry.row, col.key) }}\n }\n </td>\n }\n </tr>\n @if (expandable() && isExpanded(entry.row)) {\n <tr class=\"wr-table__detail-row\">\n <td class=\"wr-table__detail\" [attr.colspan]=\"totalCols()\">\n <ng-container\n [ngTemplateOutlet]=\"expandTemplate() ?? null\"\n [ngTemplateOutletContext]=\"expandContext(entry.row)\"\n />\n </td>\n </tr>\n }\n }\n } @empty {\n <tr>\n <td class=\"wr-table__empty\" [attr.colspan]=\"totalCols()\">No data</td>\n </tr>\n }\n @if (virtualized() && virtualWindow().padBottom > 0) {\n <tr class=\"wr-table__spacer\" aria-hidden=\"true\">\n <td [attr.colspan]=\"totalCols()\" [style.height.px]=\"virtualWindow().padBottom\"></td>\n </tr>\n }\n }\n </tbody>\n\n @if (hasSummary() && items()?.length) {\n <tfoot>\n <tr class=\"wr-table__foot-row\">\n @if (rowSelection()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @if (expandable()) {\n <td class=\"wr-table__foot-cell wr-table__foot-cell--lead\"></td>\n }\n @for (col of displayColumns(); track col.key) {\n <td\n class=\"wr-table__foot-cell\"\n [class.wr-table__td--pin-left]=\"col.column.pin === 'left'\"\n [class.wr-table__td--pin-right]=\"col.column.pin === 'right'\"\n [class.wr-table__td--pin-edge-left]=\"isPinEdge(col.key, 'left')\"\n [class.wr-table__td--pin-edge-right]=\"isPinEdge(col.key, 'right')\"\n [style.left.px]=\"leftPin(col.key)\"\n [style.right.px]=\"rightPin(col.key)\"\n >\n {{ summaryFor(col.key) }}\n </td>\n }\n </tr>\n </tfoot>\n }\n </table>\n</div>\n\n@if (showPager()) {\n <div class=\"wr-table__pager\">\n <wr-pagination [(currentPage)]=\"page\" [pageSize]=\"pageSize()\" [total]=\"resolvedTotal()\" />\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: WrCheckbox, selector: "wr-checkbox", inputs: ["id", "checkboxValue", "checked", "disabled", "size", "icon", "indeterminate"], outputs: ["checkedChange", "touch"] }, { kind: "component", type: WrPagination, selector: "wr-pagination", inputs: ["currentPage", "pageSize", "total", "pageSizeOptions", "showSizeChanger", "showTotal", "align", "size", "shape", "disabled", "responsive", "ofLabel", "prevLabel", "nextLabel", "itemsPerPageLabel", "label"], outputs: ["currentPageChange", "pageSizeChange"] }, { kind: "component", type: WrSpinner, selector: "wr-spinner", inputs: ["size"] }, { kind: "component", type: WrTableSort, selector: "wr-table-sort", inputs: ["direction"] }, { kind: "component", type: WrTableFilter, selector: "wr-table-filter", inputs: ["items"], outputs: ["selectionChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1054
1054
|
}
|
|
1055
1055
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: WrTable, decorators: [{
|
|
1056
1056
|
type: Component,
|