@acorex/components 20.2.27 → 20.2.28
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/data-table/index.d.ts
    CHANGED
    
    | 
         @@ -1025,7 +1025,7 @@ declare class AXDataTableComponent extends AXBaseDataTable implements OnInit, Af 
     | 
|
| 
       1025 
1025 
     | 
    
         
             
                /**
         
     | 
| 
       1026 
1026 
     | 
    
         
             
                 *  @ignore
         
     | 
| 
       1027 
1027 
     | 
    
         
             
                 */
         
     | 
| 
       1028 
     | 
    
         
            -
                private  
     | 
| 
      
 1028 
     | 
    
         
            +
                private isRefreshCalled;
         
     | 
| 
       1029 
1029 
     | 
    
         
             
                /**
         
     | 
| 
       1030 
1030 
     | 
    
         
             
                 * Returns true if in manual mode and no data has been loaded yet.
         
     | 
| 
       1031 
1031 
     | 
    
         
             
                 */
         
     | 
| 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import { MXBaseComponent, convertArrayToDataSource, AXComponent, AXRippleDirective, AXListDataSource, AXPagedComponent, AXCommonModule } from '@acorex/cdk/common';
         
     | 
| 
       2 
2 
     | 
    
         
             
            import * as i0 from '@angular/core';
         
     | 
| 
       3 
     | 
    
         
            -
            import { EventEmitter, signal, Input, Output, Injectable, inject, ElementRef, Renderer2, NgZone, ChangeDetectorRef, DOCUMENT, PLATFORM_ID, HostListener, Directive, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, computed, effect, ContentChildren, ContentChild, NgModule } from '@angular/core';
         
     | 
| 
      
 3 
     | 
    
         
            +
            import { EventEmitter, signal, Input, Output, Injectable, inject, ElementRef, Renderer2, NgZone, ChangeDetectorRef, DOCUMENT, PLATFORM_ID, HostListener, Directive, ViewChild, ChangeDetectionStrategy, ViewEncapsulation, Component, computed, effect, untracked, ContentChildren, ContentChild, NgModule } from '@angular/core';
         
     | 
| 
       4 
4 
     | 
    
         
             
            import { isEqual, cloneDeep } from 'lodash-es';
         
     | 
| 
       5 
5 
     | 
    
         
             
            import { isPlatformBrowser, AsyncPipe, NgTemplateOutlet, NgClass, CommonModule } from '@angular/common';
         
     | 
| 
       6 
6 
     | 
    
         
             
            import { Subject, debounceTime, buffer, filter } from 'rxjs';
         
     | 
| 
         @@ -1388,7 +1388,7 @@ class AXDataTableComponent extends AXBaseDataTable { 
     | 
|
| 
       1388 
1388 
     | 
    
         
             
                    /**
         
     | 
| 
       1389 
1389 
     | 
    
         
             
                     *  @ignore
         
     | 
| 
       1390 
1390 
     | 
    
         
             
                     */
         
     | 
| 
       1391 
     | 
    
         
            -
                    this. 
     | 
| 
      
 1391 
     | 
    
         
            +
                    this.isRefreshCalled = signal(false, ...(ngDevMode ? [{ debugName: "isRefreshCalled" }] : []));
         
     | 
| 
       1392 
1392 
     | 
    
         
             
                    /**
         
     | 
| 
       1393 
1393 
     | 
    
         
             
                     *  @ignore
         
     | 
| 
       1394 
1394 
     | 
    
         
             
                     */
         
     | 
| 
         @@ -1450,7 +1450,7 @@ class AXDataTableComponent extends AXBaseDataTable { 
     | 
|
| 
       1450 
1450 
     | 
    
         
             
                 * Returns true if in manual mode and no data has been loaded yet.
         
     | 
| 
       1451 
1451 
     | 
    
         
             
                 */
         
     | 
| 
       1452 
1452 
     | 
    
         
             
                get showNoDataLoadedYet() {
         
     | 
| 
       1453 
     | 
    
         
            -
                    return this.fetchDataMode === 'manual' && !this. 
     | 
| 
      
 1453 
     | 
    
         
            +
                    return this.fetchDataMode === 'manual' && !this.isRefreshCalled();
         
     | 
| 
       1454 
1454 
     | 
    
         
             
                }
         
     | 
| 
       1455 
1455 
     | 
    
         
             
                /**
         
     | 
| 
       1456 
1456 
     | 
    
         
             
                 *  @ignore
         
     | 
| 
         @@ -1474,9 +1474,6 @@ class AXDataTableComponent extends AXBaseDataTable { 
     | 
|
| 
       1474 
1474 
     | 
    
         
             
                        this.displayedRows.set(data.items.filter((item) => !item[this.parentField]));
         
     | 
| 
       1475 
1475 
     | 
    
         
             
                        this.totalRows = data.totalCount;
         
     | 
| 
       1476 
1476 
     | 
    
         
             
                        this.hasItems = data.totalCount > 0;
         
     | 
| 
       1477 
     | 
    
         
            -
                        if (this.fetchDataMode === 'manual' && !this.hasLoadedData) {
         
     | 
| 
       1478 
     | 
    
         
            -
                            this.hasLoadedData = true;
         
     | 
| 
       1479 
     | 
    
         
            -
                        }
         
     | 
| 
       1480 
1477 
     | 
    
         
             
                    });
         
     | 
| 
       1481 
1478 
     | 
    
         
             
                    this.dataSource.onItemExpanded.pipe(this._unsubscriber.takeUntilDestroy).subscribe((data) => {
         
     | 
| 
       1482 
1479 
     | 
    
         
             
                        const { expandedItem, children } = data;
         
     | 
| 
         @@ -1663,6 +1660,10 @@ class AXDataTableComponent extends AXBaseDataTable { 
     | 
|
| 
       1663 
1660 
     | 
    
         
             
                 */
         
     | 
| 
       1664 
1661 
     | 
    
         
             
                refresh(options = { reset: true }) {
         
     | 
| 
       1665 
1662 
     | 
    
         
             
                    this.dataSource.refresh(options);
         
     | 
| 
      
 1663 
     | 
    
         
            +
                    const isRefreshCalled = untracked(() => this.isRefreshCalled());
         
     | 
| 
      
 1664 
     | 
    
         
            +
                    if (this.fetchDataMode === 'manual' && !isRefreshCalled) {
         
     | 
| 
      
 1665 
     | 
    
         
            +
                        this.isRefreshCalled.set(true);
         
     | 
| 
      
 1666 
     | 
    
         
            +
                    }
         
     | 
| 
       1666 
1667 
     | 
    
         
             
                    if (this.dataPager && options.reset) {
         
     | 
| 
       1667 
1668 
     | 
    
         
             
                        this.dataPager.goFirstPage();
         
     | 
| 
       1668 
1669 
     | 
    
         
             
                    }
         
     |