@bizy/core 19.0.10 → 19.0.12
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/bizy-core.mjs
CHANGED
|
@@ -2540,42 +2540,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
2540
2540
|
}] } });
|
|
2541
2541
|
|
|
2542
2542
|
class BizyGridRowComponent {
|
|
2543
|
-
elementRef;
|
|
2544
|
-
ref;
|
|
2545
|
-
renderer;
|
|
2543
|
+
#elementRef = inject(ElementRef);
|
|
2544
|
+
#ref = inject(ChangeDetectorRef);
|
|
2545
|
+
#renderer = inject(Renderer2);
|
|
2546
2546
|
rowHeight = 100; // Px
|
|
2547
2547
|
set itemsPerRow(itemsPerRow) {
|
|
2548
|
-
if (!this
|
|
2548
|
+
if (!this.#elementRef.nativeElement) {
|
|
2549
2549
|
return;
|
|
2550
2550
|
}
|
|
2551
2551
|
if (!itemsPerRow) {
|
|
2552
2552
|
itemsPerRow = 1;
|
|
2553
2553
|
}
|
|
2554
|
-
this
|
|
2555
|
-
this
|
|
2556
|
-
this
|
|
2557
|
-
}
|
|
2558
|
-
constructor(elementRef, ref, renderer) {
|
|
2559
|
-
this.elementRef = elementRef;
|
|
2560
|
-
this.ref = ref;
|
|
2561
|
-
this.renderer = renderer;
|
|
2554
|
+
this.#renderer.setStyle(this.#elementRef.nativeElement, 'gridTemplateRows', `${this.rowHeight}px`);
|
|
2555
|
+
this.#renderer.setStyle(this.#elementRef.nativeElement, 'gridTemplateColumns', `repeat(${itemsPerRow}, minmax(0, 1fr)`);
|
|
2556
|
+
this.#ref.detectChanges();
|
|
2562
2557
|
}
|
|
2563
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyGridRowComponent, deps: [
|
|
2558
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyGridRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2564
2559
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: BizyGridRowComponent, isStandalone: true, selector: "bizy-grid-row", inputs: { rowHeight: "rowHeight", itemsPerRow: "itemsPerRow" }, ngImport: i0, template: "<ng-content></ng-content>", styles: [":host{font-size:1rem;display:grid;column-gap:var(--bizy-grid-gap);margin-bottom:var(--bizy-grid-gap)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2565
2560
|
}
|
|
2566
2561
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BizyGridRowComponent, decorators: [{
|
|
2567
2562
|
type: Component,
|
|
2568
2563
|
args: [{ selector: 'bizy-grid-row', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>", styles: [":host{font-size:1rem;display:grid;column-gap:var(--bizy-grid-gap);margin-bottom:var(--bizy-grid-gap)}\n"] }]
|
|
2569
|
-
}],
|
|
2570
|
-
type: Inject,
|
|
2571
|
-
args: [ElementRef]
|
|
2572
|
-
}] }, { type: i0.ChangeDetectorRef, decorators: [{
|
|
2573
|
-
type: Inject,
|
|
2574
|
-
args: [ChangeDetectorRef]
|
|
2575
|
-
}] }, { type: i0.Renderer2, decorators: [{
|
|
2576
|
-
type: Inject,
|
|
2577
|
-
args: [Renderer2]
|
|
2578
|
-
}] }], propDecorators: { rowHeight: [{
|
|
2564
|
+
}], propDecorators: { rowHeight: [{
|
|
2579
2565
|
type: Input
|
|
2580
2566
|
}], itemsPerRow: [{
|
|
2581
2567
|
type: Input
|
|
@@ -2618,19 +2604,19 @@ class BizyGridComponent {
|
|
|
2618
2604
|
itemRows = [];
|
|
2619
2605
|
itemTemplate;
|
|
2620
2606
|
itemsPerRow = 1;
|
|
2621
|
-
items;
|
|
2607
|
+
items = signal([]);
|
|
2622
2608
|
constructor(ref, document, renderer, elementRef) {
|
|
2623
2609
|
this.ref = ref;
|
|
2624
2610
|
this.document = document;
|
|
2625
2611
|
this.renderer = renderer;
|
|
2626
2612
|
this.elementRef = elementRef;
|
|
2627
|
-
this.items = this.gridDirective.items;
|
|
2628
2613
|
}
|
|
2629
2614
|
ngAfterContentInit() {
|
|
2630
2615
|
this.#rowScrollingMutationObserver = new MutationObserver(() => {
|
|
2631
2616
|
if (!this.gridDirective) {
|
|
2632
2617
|
return;
|
|
2633
2618
|
}
|
|
2619
|
+
this.items = this.gridDirective.items;
|
|
2634
2620
|
effect(() => {
|
|
2635
2621
|
this.#updateView();
|
|
2636
2622
|
if (!this.#view) {
|