@reforgium/data-grid 2.3.5 → 2.3.6
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-column-manager.mjs +4 -14
- package/fesm2022/{reforgium-data-grid-grid-overlay-scroll.feature-BnLB5Ny4.mjs → reforgium-data-grid-grid-overlay-scroll.feature-C1hp0DIj.mjs} +2 -2
- package/fesm2022/{reforgium-data-grid-reforgium-data-grid-DK84fYFQ.mjs → reforgium-data-grid-reforgium-data-grid-D5cKt3RW.mjs} +31 -18
- package/fesm2022/reforgium-data-grid.mjs +1 -1
- package/package.json +1 -1
|
@@ -7,17 +7,11 @@ function cloneColumns(columns) {
|
|
|
7
7
|
return columns.map((column) => ({ ...column }));
|
|
8
8
|
}
|
|
9
9
|
function resolvePinState(columns, key) {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
if (index < 0) {
|
|
13
|
-
return 'none';
|
|
14
|
-
}
|
|
15
|
-
const column = visible[index];
|
|
16
|
-
if (!column.sticky) {
|
|
10
|
+
const column = columns.find((item) => item.key === key);
|
|
11
|
+
if (!column || !isVisible(column) || !column.sticky) {
|
|
17
12
|
return 'none';
|
|
18
13
|
}
|
|
19
|
-
|
|
20
|
-
return index < middleIndex ? 'left' : 'right';
|
|
14
|
+
return column.sticky === 'right' ? 'right' : 'left';
|
|
21
15
|
}
|
|
22
16
|
function moveColumn(columns, fromIndex, toIndex) {
|
|
23
17
|
if (fromIndex === toIndex || fromIndex < 0 || toIndex < 0 || fromIndex >= columns.length || toIndex >= columns.length) {
|
|
@@ -38,11 +32,7 @@ function setColumnPin(columns, key, pin) {
|
|
|
38
32
|
...next[fromIndex],
|
|
39
33
|
sticky: pin === 'none' ? undefined : pin,
|
|
40
34
|
};
|
|
41
|
-
|
|
42
|
-
return next;
|
|
43
|
-
}
|
|
44
|
-
const toIndex = pin === 'left' ? 0 : next.length - 1;
|
|
45
|
-
return moveColumn(next, fromIndex, toIndex);
|
|
35
|
+
return next;
|
|
46
36
|
}
|
|
47
37
|
function setColumnVisibility(columns, key, visible) {
|
|
48
38
|
const index = columns.findIndex((column) => column.key === key);
|
|
@@ -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-D5cKt3RW.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-C1hp0DIj.mjs.map
|
|
@@ -2295,29 +2295,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
2295
2295
|
` }]
|
|
2296
2296
|
}], propDecorators: { expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }] } });
|
|
2297
2297
|
|
|
2298
|
-
/* eslint-disable max-len */
|
|
2299
2298
|
class SortIcon {
|
|
2300
2299
|
direction = input('asc', ...(ngDevMode ? [{ debugName: "direction" }] : []));
|
|
2301
2300
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: SortIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2302
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
2303
|
-
|
|
2304
|
-
<
|
|
2305
|
-
d="
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2301
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: SortIcon, isStandalone: true, selector: "re-sort-ic", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
2302
|
+
@if (direction()) {
|
|
2303
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" class="{{ direction() }}">
|
|
2304
|
+
<path d="M9 14L9 4M9 4L4 9M9 4C9 4 12.0474 6.85212 14 9" stroke="currentColor" />
|
|
2305
|
+
</svg>
|
|
2306
|
+
} @else {
|
|
2307
|
+
<svg width="18" height="18" viewBox="0 0 18 18" class="unsort">
|
|
2308
|
+
<path d="M14 9L4 9M4 9L9 14M4 9C4 9 6.85212 5.95262 9 4" stroke="black" />
|
|
2309
|
+
<path
|
|
2310
|
+
d="M4.00049 9H14.0005M14.0005 9L9.00049 4M14.0005 9C14.0005 9 11.1484 12.0474 9.00049 14"
|
|
2311
|
+
stroke="black"
|
|
2312
|
+
/>
|
|
2313
|
+
</svg>
|
|
2314
|
+
}
|
|
2315
|
+
`, isInline: true, styles: [".asc{transform:rotate(0);animation:sort-anim .2s ease-in-out}.desc{transform:rotate(180deg);transition:transform .3s ease-in-out}.unsort{animation:sort-anim .3s ease-in-out}@keyframes sort-anim{0%{transform:rotate(-90deg)}to{transform:rotate(0)}}\n"] });
|
|
2310
2316
|
}
|
|
2311
2317
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: SortIcon, decorators: [{
|
|
2312
2318
|
type: Component,
|
|
2313
2319
|
args: [{ selector: 're-sort-ic', template: `
|
|
2314
|
-
|
|
2315
|
-
<
|
|
2316
|
-
d="
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2320
|
+
@if (direction()) {
|
|
2321
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" class="{{ direction() }}">
|
|
2322
|
+
<path d="M9 14L9 4M9 4L4 9M9 4C9 4 12.0474 6.85212 14 9" stroke="currentColor" />
|
|
2323
|
+
</svg>
|
|
2324
|
+
} @else {
|
|
2325
|
+
<svg width="18" height="18" viewBox="0 0 18 18" class="unsort">
|
|
2326
|
+
<path d="M14 9L4 9M4 9L9 14M4 9C4 9 6.85212 5.95262 9 4" stroke="black" />
|
|
2327
|
+
<path
|
|
2328
|
+
d="M4.00049 9H14.0005M14.0005 9L9.00049 4M14.0005 9C14.0005 9 11.1484 12.0474 9.00049 14"
|
|
2329
|
+
stroke="black"
|
|
2330
|
+
/>
|
|
2331
|
+
</svg>
|
|
2332
|
+
}
|
|
2333
|
+
`, styles: [".asc{transform:rotate(0);animation:sort-anim .2s ease-in-out}.desc{transform:rotate(180deg);transition:transform .3s ease-in-out}.unsort{animation:sort-anim .3s ease-in-out}@keyframes sort-anim{0%{transform:rotate(-90deg)}to{transform:rotate(0)}}\n"] }]
|
|
2321
2334
|
}], propDecorators: { direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }] } });
|
|
2322
2335
|
|
|
2323
2336
|
/**
|
|
@@ -3159,7 +3172,7 @@ class DataGrid {
|
|
|
3159
3172
|
if (this.overlayScrollFeaturePromise) {
|
|
3160
3173
|
return this.overlayScrollFeaturePromise;
|
|
3161
3174
|
}
|
|
3162
|
-
this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-
|
|
3175
|
+
this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-C1hp0DIj.mjs').then(({ createGridOverlayScrollFeature }) => {
|
|
3163
3176
|
const feature = createGridOverlayScrollFeature({
|
|
3164
3177
|
getScrollElement: () => this.scrollEl()?.nativeElement ?? null,
|
|
3165
3178
|
getThumbTop: () => this.vm.thumbTopPx(),
|
|
@@ -3284,4 +3297,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
3284
3297
|
*/
|
|
3285
3298
|
|
|
3286
3299
|
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 };
|
|
3287
|
-
//# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-
|
|
3300
|
+
//# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-D5cKt3RW.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-D5cKt3RW.mjs';
|
|
2
2
|
//# sourceMappingURL=reforgium-data-grid.mjs.map
|
package/package.json
CHANGED