@indigina/ui-kit 1.1.488 → 1.1.489

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.
@@ -1,7 +1,7 @@
1
1
  import * as i1$7 from '@angular/common';
2
2
  import { NgClass, NgTemplateOutlet, CommonModule, DatePipe, AsyncPipe, Location, TitleCasePipe, DecimalPipe } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Input, ChangeDetectionStrategy, Component, input, EventEmitter, Output, ViewEncapsulation, InjectionToken, inject, Injectable, Directive, model, output, viewChild, contentChild, TemplateRef, computed, effect, ElementRef, NgZone, Renderer2, forwardRef, signal, HostListener, ContentChild, NgModule, RendererFactory2, ViewChild, DOCUMENT, ViewContainerRef, DestroyRef, afterNextRender, contentChildren, ContentChildren, viewChildren, QueryList, ViewChildren, Pipe, Injector, runInInjectionContext } from '@angular/core';
4
+ import { Input, ChangeDetectionStrategy, Component, input, EventEmitter, Output, ViewEncapsulation, InjectionToken, inject, Injectable, Directive, model, output, viewChild, contentChild, TemplateRef, computed, effect, ElementRef, NgZone, Renderer2, forwardRef, signal, HostListener, ContentChild, NgModule, RendererFactory2, ViewChild, DOCUMENT, ViewContainerRef, DestroyRef, afterNextRender, contentChildren, linkedSignal, ContentChildren, viewChildren, QueryList, ViewChildren, Pipe, Injector, runInInjectionContext } from '@angular/core';
5
5
  import * as i1 from '@progress/kendo-angular-buttons';
6
6
  import { ButtonModule, ButtonGroupModule, KENDO_BUTTONS } from '@progress/kendo-angular-buttons';
7
7
  import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
@@ -5612,8 +5612,10 @@ class KitGridComponent {
5612
5612
  this.kitGridDropPosition = KitGridDropPosition;
5613
5613
  this.kitSortDirection = KitSortDirection;
5614
5614
  this.columns = signal([], ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
5615
- this.renderedData = signal(undefined, ...(ngDevMode ? [{ debugName: "renderedData" }] : /* istanbul ignore next */ []));
5616
- this.renderedGridDataBinding = signal(undefined, ...(ngDevMode ? [{ debugName: "renderedGridDataBinding" }] : /* istanbul ignore next */ []));
5615
+ this.renderedData = linkedSignal({ ...(ngDevMode ? { debugName: "renderedData" } : /* istanbul ignore next */ {}), source: () => this.data(),
5616
+ computation: (data) => this.cloneDataInput(data) });
5617
+ this.renderedGridDataBinding = linkedSignal({ ...(ngDevMode ? { debugName: "renderedGridDataBinding" } : /* istanbul ignore next */ {}), source: () => this.gridDataBinding(),
5618
+ computation: (data) => this.cloneGridDataBinding(data) });
5617
5619
  this.dropIndicator = signal(null, ...(ngDevMode ? [{ debugName: "dropIndicator" }] : /* istanbul ignore next */ []));
5618
5620
  this.expandedRows = [];
5619
5621
  this.getCssRowClass = (context) => {
@@ -5636,8 +5638,6 @@ class KitGridComponent {
5636
5638
  effect(() => {
5637
5639
  const data = this.data();
5638
5640
  const gridDataBinding = this.gridDataBinding();
5639
- this.renderedData.set(this.cloneDataInput(data));
5640
- this.renderedGridDataBinding.set(this.cloneGridDataBinding(gridDataBinding));
5641
5641
  if (data) {
5642
5642
  this.handleDataChange(data, this.loading());
5643
5643
  }
@@ -8084,12 +8084,13 @@ const kitBuildSortString = (sort, columns) => {
8084
8084
  };
8085
8085
  const kitFetchGridData = ({ store, destroyRef, isLoading, fetchAction, fetchFromIndexAction, hasArchiveToggle, error, }) => {
8086
8086
  isLoading.set(true);
8087
- const { skip, take, sort, filter, search, archive } = store.selectSnapshot(KIT_GRID_STATE_TOKEN);
8087
+ const { skip, take, sort, filter, search, archive, columns } = store.selectSnapshot(KIT_GRID_STATE_TOKEN);
8088
8088
  const gridState = {
8089
8089
  take,
8090
8090
  skip,
8091
8091
  sort,
8092
8092
  filter: kitBuildFilters(filter),
8093
+ columns,
8093
8094
  };
8094
8095
  const isArchive = hasArchiveToggle && archive || false;
8095
8096
  const isSearchMode = hasArchiveToggle && !isArchive || !!search;
@@ -8100,11 +8101,13 @@ const kitFetchGridData = ({ store, destroyRef, isLoading, fetchAction, fetchFrom
8100
8101
  const kitFetchExportGridData = ({ fetchAction, fetchIndexAction, sort, filter, search, columns, total, hasArchiveToggle = false, archiveModeEnabled = false, }) => {
8101
8102
  const isArchive = hasArchiveToggle && archiveModeEnabled || false;
8102
8103
  const isSearchMode = hasArchiveToggle && !isArchive || !!search;
8104
+ const sortString = kitBuildSortString(sort, columns);
8105
+ const filterString = kitBuildOdataFilter(kitBuildFilters(filter));
8103
8106
  if (isSearchMode) {
8104
8107
  const searchTerm = search && kitFormatStringForSearch(search) || undefined;
8105
- return fetchIndexAction(0, total, kitBuildSortString(sort, columns), kitBuildOdataFilter(kitBuildFilters(filter)), searchTerm);
8108
+ return fetchIndexAction(0, total, sortString, filterString, searchTerm);
8106
8109
  }
8107
- return fetchAction(0, total, kitBuildSortString(sort, columns), kitBuildOdataFilter(kitBuildFilters(filter)));
8110
+ return fetchAction(0, total, sortString, filterString);
8108
8111
  };
8109
8112
  const kitShouldResetGridState = ({ stateColumns, availableColumns, }) => {
8110
8113
  if (!stateColumns.length) {