@reforgium/data-grid 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{reforgium-data-grid-grid-overlay-scroll.feature-B3hwiKYh.mjs → reforgium-data-grid-grid-overlay-scroll.feature-BSdC3IrC.mjs} +2 -2
- package/fesm2022/{reforgium-data-grid-grid-tooltip.feature-CMo88m8o.mjs → reforgium-data-grid-grid-tooltip.feature-i-k8F-1I.mjs} +2 -1
- package/fesm2022/{reforgium-data-grid-reforgium-data-grid-uZ3onkWO.mjs → reforgium-data-grid-reforgium-data-grid-Op6gjm7A.mjs} +16 -6
- package/fesm2022/reforgium-data-grid.mjs +1 -1
- package/package.json +1 -1
- package/types/reforgium-data-grid.d.ts +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as computeScrollbarState, a as clampThumbTop, m as mapThumbTopToScrollTop } from './reforgium-data-grid-reforgium-data-grid-
|
|
1
|
+
import { c as computeScrollbarState, a as clampThumbTop, m as mapThumbTopToScrollTop } from './reforgium-data-grid-reforgium-data-grid-Op6gjm7A.mjs';
|
|
2
2
|
|
|
3
3
|
function createGridOverlayScrollFeature(ctx) {
|
|
4
4
|
const showScrollbar = () => {
|
|
@@ -76,4 +76,4 @@ function createGridOverlayScrollFeature(ctx) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export { createGridOverlayScrollFeature };
|
|
79
|
-
//# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-
|
|
79
|
+
//# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-BSdC3IrC.mjs.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// noinspection ES6PreferShortImport
|
|
1
2
|
function createGridTooltipFeature(ctx) {
|
|
2
3
|
const resolveCellValue = (row, col) => {
|
|
3
4
|
return 'value' in col ? col.value(row) : row[col.key];
|
|
@@ -86,4 +87,4 @@ function createGridTooltipFeature(ctx) {
|
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
export { createGridTooltipFeature };
|
|
89
|
-
//# sourceMappingURL=reforgium-data-grid-grid-tooltip.feature-
|
|
90
|
+
//# sourceMappingURL=reforgium-data-grid-grid-tooltip.feature-i-k8F-1I.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, TemplateRef, Directive, booleanAttribute, contentChild, Component, numberAttribute, InjectionToken, makeEnvironmentProviders, signal, computed, effect, Injectable, ChangeDetectionStrategy, output, untracked, DestroyRef, afterRenderEffect, viewChild, NgZone, contentChildren } from '@angular/core';
|
|
2
|
+
import { input, inject, TemplateRef, Directive, booleanAttribute, contentChild, Component, numberAttribute, InjectionToken, makeEnvironmentProviders, signal, computed, effect, Injectable, ChangeDetectionStrategy, output, untracked, DestroyRef, afterRenderEffect, viewChild, NgZone, contentChildren, afterNextRender } from '@angular/core';
|
|
3
3
|
import { NgTemplateOutlet, DatePipe, DecimalPipe } from '@angular/common';
|
|
4
4
|
import { Subject, debounceTime, fromEvent, Subscription } from 'rxjs';
|
|
5
5
|
|
|
@@ -912,6 +912,7 @@ function splitSticky(cols) {
|
|
|
912
912
|
return { left, right, visible };
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
+
// noinspection ES6PreferShortImport
|
|
915
916
|
/**
|
|
916
917
|
* View model for the data grid component.
|
|
917
918
|
*
|
|
@@ -1495,6 +1496,7 @@ function createGridHeaderMeasureFeature(ctx) {
|
|
|
1495
1496
|
};
|
|
1496
1497
|
}
|
|
1497
1498
|
|
|
1499
|
+
// noinspection ES6PreferShortImport
|
|
1498
1500
|
function createGridInfinityPageRequestFeature(ctx) {
|
|
1499
1501
|
const PREFETCH_FACTOR = 1.25;
|
|
1500
1502
|
let lastRequestedPage = null;
|
|
@@ -1937,6 +1939,7 @@ function createGridVirtualScrollFeature(ctx) {
|
|
|
1937
1939
|
return { onVerticalScroll };
|
|
1938
1940
|
}
|
|
1939
1941
|
|
|
1942
|
+
// noinspection ES6PreferShortImport
|
|
1940
1943
|
const COLUMN_STATE_PRIORITY_KEYS = new Set(['disabled', 'visible', 'sticky']);
|
|
1941
1944
|
function mergeDeclarativeColumns(declarative, columns) {
|
|
1942
1945
|
if (!declarative.length) {
|
|
@@ -2745,8 +2748,14 @@ class DataGrid {
|
|
|
2745
2748
|
return rows[index];
|
|
2746
2749
|
}, ...(ngDevMode ? [{ debugName: "stickyRowData" }] : []));
|
|
2747
2750
|
stickyIndexes = signal([], ...(ngDevMode ? [{ debugName: "stickyIndexes" }] : []));
|
|
2751
|
+
contentInitialized = signal(false, ...(ngDevMode ? [{ debugName: "contentInitialized" }] : []));
|
|
2748
2752
|
expanderMap = signal(new Map(), ...(ngDevMode ? [{ debugName: "expanderMap" }] : []));
|
|
2749
|
-
declarativeColumns = computed(() =>
|
|
2753
|
+
declarativeColumns = computed(() => {
|
|
2754
|
+
if (!this.contentInitialized()) {
|
|
2755
|
+
return normalizeDeclarativeColumns([], this.rowKey());
|
|
2756
|
+
}
|
|
2757
|
+
return normalizeDeclarativeColumns(this.declarativeColumnRefs().map((columnRef) => columnRef.toDeclarativeColumn()), this.rowKey());
|
|
2758
|
+
}, ...(ngDevMode ? [{ debugName: "declarativeColumns" }] : []));
|
|
2750
2759
|
sourceColumns = computed(() => mergeDeclarativeColumns(this.declarativeColumns().columns, this.columns()), ...(ngDevMode ? [{ debugName: "sourceColumns" }] : []));
|
|
2751
2760
|
slotsFeature = createGridSlotsFeature({
|
|
2752
2761
|
clearTypeTemplates: () => this.vm.globalTypeCellTpls.clear(),
|
|
@@ -2791,6 +2800,7 @@ class DataGrid {
|
|
|
2791
2800
|
currentSortMap = new Map();
|
|
2792
2801
|
subscription = new Subscription();
|
|
2793
2802
|
constructor() {
|
|
2803
|
+
afterNextRender(() => this.contentInitialized.set(true));
|
|
2794
2804
|
this.lifecycleInitFeature.init({
|
|
2795
2805
|
afterRender: [
|
|
2796
2806
|
() => {
|
|
@@ -2856,7 +2866,7 @@ class DataGrid {
|
|
|
2856
2866
|
clearSelection() {
|
|
2857
2867
|
this.gridApiFeature.clearSelection();
|
|
2858
2868
|
}
|
|
2859
|
-
/** Selects all currently loaded rows (
|
|
2869
|
+
/** Selects all currently loaded rows (multimode only) and emits `selectChange`. */
|
|
2860
2870
|
selectAllLoaded() {
|
|
2861
2871
|
this.gridApiFeature.selectAllLoaded();
|
|
2862
2872
|
}
|
|
@@ -3136,7 +3146,7 @@ class DataGrid {
|
|
|
3136
3146
|
if (this.tooltipFeaturePromise) {
|
|
3137
3147
|
return this.tooltipFeaturePromise;
|
|
3138
3148
|
}
|
|
3139
|
-
this.tooltipFeaturePromise = import('./reforgium-data-grid-grid-tooltip.feature-
|
|
3149
|
+
this.tooltipFeaturePromise = import('./reforgium-data-grid-grid-tooltip.feature-i-k8F-1I.mjs').then(({ createGridTooltipFeature }) => {
|
|
3140
3150
|
const feature = createGridTooltipFeature({
|
|
3141
3151
|
getTooltipState: () => this.tooltipState(),
|
|
3142
3152
|
setTooltipState: (state) => this.tooltipState.set(state),
|
|
@@ -3155,7 +3165,7 @@ class DataGrid {
|
|
|
3155
3165
|
if (this.overlayScrollFeaturePromise) {
|
|
3156
3166
|
return this.overlayScrollFeaturePromise;
|
|
3157
3167
|
}
|
|
3158
|
-
this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-
|
|
3168
|
+
this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-BSdC3IrC.mjs').then(({ createGridOverlayScrollFeature }) => {
|
|
3159
3169
|
const feature = createGridOverlayScrollFeature({
|
|
3160
3170
|
getScrollElement: () => this.scrollEl()?.nativeElement ?? null,
|
|
3161
3171
|
getThumbTop: () => this.vm.thumbTopPx(),
|
|
@@ -3280,4 +3290,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3280
3290
|
*/
|
|
3281
3291
|
|
|
3282
3292
|
export { DataGridTypeCellTemplateDirective as D, clampThumbTop as a, DataGridCellTemplateDirective as b, computeScrollbarState as c, DataGridHeaderTemplateDirective as d, DataGridRowDirective as e, DataGridDeclarativeColumn as f, DataGridDeclarativeHeaderDirective as g, DataGridDeclarativeCellDirective as h, DataGridCellEmptyDirective as i, DataGridCellLoadingDirective as j, DataGridStickyRowDirective as k, DataGridSortIconDirective as l, mapThumbTopToScrollTop as m, DataGridExpanderIconDirective as n, DATA_GRID_CONFIG as o, DEFAULT_DATA_GRID_DEFAULTS as p, provideDataGridDefaults as q, DataGrid as r };
|
|
3283
|
-
//# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-
|
|
3293
|
+
//# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-Op6gjm7A.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { o as DATA_GRID_CONFIG, p as DEFAULT_DATA_GRID_DEFAULTS, r as DataGrid, i as DataGridCellEmptyDirective, j as DataGridCellLoadingDirective, b as DataGridCellTemplateDirective, h as DataGridDeclarativeCellDirective, f as DataGridDeclarativeColumn, g as DataGridDeclarativeHeaderDirective, n as DataGridExpanderIconDirective, d as DataGridHeaderTemplateDirective, e as DataGridRowDirective, l as DataGridSortIconDirective, k as DataGridStickyRowDirective, D as DataGridTypeCellTemplateDirective, q as provideDataGridDefaults } from './reforgium-data-grid-reforgium-data-grid-
|
|
1
|
+
export { o as DATA_GRID_CONFIG, p as DEFAULT_DATA_GRID_DEFAULTS, r as DataGrid, i as DataGridCellEmptyDirective, j as DataGridCellLoadingDirective, b as DataGridCellTemplateDirective, h as DataGridDeclarativeCellDirective, f as DataGridDeclarativeColumn, g as DataGridDeclarativeHeaderDirective, n as DataGridExpanderIconDirective, d as DataGridHeaderTemplateDirective, e as DataGridRowDirective, l as DataGridSortIconDirective, k as DataGridStickyRowDirective, D as DataGridTypeCellTemplateDirective, q as provideDataGridDefaults } from './reforgium-data-grid-reforgium-data-grid-Op6gjm7A.mjs';
|
|
2
2
|
//# sourceMappingURL=reforgium-data-grid.mjs.map
|
package/package.json
CHANGED
|
@@ -1420,6 +1420,7 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1420
1420
|
protected stickyRowTopPx: _angular_core.WritableSignal<number>;
|
|
1421
1421
|
protected stickyRowData: _angular_core.Signal<Data | null>;
|
|
1422
1422
|
private stickyIndexes;
|
|
1423
|
+
private contentInitialized;
|
|
1423
1424
|
protected expanderMap: _angular_core.WritableSignal<Map<DataKey<Data>, boolean>>;
|
|
1424
1425
|
protected declarativeColumns: _angular_core.Signal<DeclarativeColumnsResult<Data>>;
|
|
1425
1426
|
protected sourceColumns: _angular_core.Signal<GridColumn<Data>[]>;
|
|
@@ -1440,7 +1441,7 @@ declare class DataGrid<Data extends AnyDict> {
|
|
|
1440
1441
|
constructor();
|
|
1441
1442
|
/** Clears current selection and emits `selectChange`. */
|
|
1442
1443
|
clearSelection(): void;
|
|
1443
|
-
/** Selects all currently loaded rows (
|
|
1444
|
+
/** Selects all currently loaded rows (multimode only) and emits `selectChange`. */
|
|
1444
1445
|
selectAllLoaded(): void;
|
|
1445
1446
|
/** Resets sorting state and emits sort events. */
|
|
1446
1447
|
resetSort(): void;
|