@acorex/modules 20.7.3 → 20.7.4

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.
@@ -34,7 +34,7 @@ import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageLayoutBase }
34
34
  import * as i1$1 from '@angular/common';
35
35
  import { AsyncPipe, CommonModule } from '@angular/common';
36
36
  import * as i0 from '@angular/core';
37
- import { computed, inject, signal, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, input, output, viewChild, model, untracked } from '@angular/core';
37
+ import { computed, inject, signal, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, input, output, viewChild, untracked, afterNextRender, model, viewChildren } from '@angular/core';
38
38
  import * as i1$3 from '@angular/forms';
39
39
  import { FormsModule } from '@angular/forms';
40
40
  import { Router, ActivatedRoute, NavigationEnd, RouterModule } from '@angular/router';
@@ -895,6 +895,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
895
895
  }], propDecorators: { schedulerComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXSchedulerComponent), { isSignal: true }] }], taskPopover: [{ type: i0.ViewChild, args: ['taskPopover', { isSignal: true }] }], resources: [{ type: i0.Input, args: [{ isSignal: true, alias: "resources", required: false }] }], startingDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "startingDate", required: false }] }], selectedView: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedView", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], onTaskClick: [{ type: i0.Output, args: ["onTaskClick"] }], onTaskChanged: [{ type: i0.Output, args: ["onTaskChanged"] }], onMonthSlotDblClicked: [{ type: i0.Output, args: ["onMonthSlotDblClicked"] }], onActionClick: [{ type: i0.Output, args: ["onActionClick"] }], component: [{ type: i0.Output, args: ["component"] }], onTaskRightClick: [{ type: i0.Output, args: ["onTaskRightClick"] }], onRangeChanged: [{ type: i0.Output, args: ["onRangeChanged"] }] } });
896
896
 
897
897
  class AXMTaskBoardGridViewComponent {
898
+ #dataSourceChanged;
898
899
  constructor() {
899
900
  this.vm = inject(AXMTaskBoardViewModel);
900
901
  this.localeService = inject(AXLocaleService);
@@ -905,6 +906,7 @@ class AXMTaskBoardGridViewComponent {
905
906
  this.onActionClick = output();
906
907
  this.fetchedTasks = signal([], ...(ngDevMode ? [{ debugName: "fetchedTasks" }] : []));
907
908
  this.columns = signal([], ...(ngDevMode ? [{ debugName: "columns" }] : []));
909
+ this.grid = viewChild('grid', ...(ngDevMode ? [{ debugName: "grid" }] : []));
908
910
  this.tasksDataSource = computed(() => {
909
911
  const parentDataSource = this.dataSource();
910
912
  return new AXDataSource({
@@ -927,6 +929,8 @@ class AXMTaskBoardGridViewComponent {
927
929
  startDate: this.calendarService.format(task.startDate, 'DD/MM/YYYY HH:mm', {
928
930
  locale: this.localeService.activeProfile().calendar.system,
929
931
  }),
932
+ // Store the original task for row click handler
933
+ _originalTask: task,
930
934
  }));
931
935
  return { items: mappedItems, total: result.total };
932
936
  },
@@ -938,7 +942,23 @@ class AXMTaskBoardGridViewComponent {
938
942
  });
939
943
  }, ...(ngDevMode ? [{ debugName: "tasksDataSource" }] : []));
940
944
  this.#dataSourceChanged = effect(() => {
941
- this.tasksDataSource().refresh();
945
+ // Track filter-related signals that affect the data source
946
+ // When these change, the parent's filter() computed signal changes,
947
+ // which means the data source function will return different results
948
+ this.vm.selectedTaskTypeNames();
949
+ this.vm.selectedAssigneeIds();
950
+ this.vm.selectedReporterIds();
951
+ this.vm.selectedPriorities();
952
+ this.vm.currentDate();
953
+ this.vm.daysCount();
954
+ this.vm.currentViewMode();
955
+ // Use untracked to refresh the grid without tracking it
956
+ untracked(() => {
957
+ // Schedule refresh in next tick to avoid issues during effect execution
958
+ setTimeout(() => {
959
+ this.grid()?.refresh();
960
+ }, 0);
961
+ });
942
962
  }, ...(ngDevMode ? [{ debugName: "#dataSourceChanged" }] : []));
943
963
  this.#providerChanged = effect(async () => {
944
964
  const taskType = this.vm.selectedTaskTypes()[0];
@@ -952,12 +972,22 @@ class AXMTaskBoardGridViewComponent {
952
972
  }
953
973
  });
954
974
  }, ...(ngDevMode ? [{ debugName: "#providerChanged" }] : []));
975
+ // Ensure data source is refreshed after initial render
976
+ afterNextRender(() => {
977
+ untracked(() => {
978
+ this.grid()?.refresh();
979
+ });
980
+ });
955
981
  }
956
- #dataSourceChanged;
957
982
  #providerChanged;
958
983
  handleRowClick(event) {
959
984
  if (event.data) {
960
- this.onTaskClick.emit(event.data);
985
+ // Get the original task from the mapped item or find it by ID
986
+ const mappedItem = event.data;
987
+ const originalTask = mappedItem._originalTask || this.fetchedTasks().find((task) => task.id === mappedItem.id);
988
+ if (originalTask) {
989
+ this.onTaskClick.emit(originalTask);
990
+ }
961
991
  }
962
992
  }
963
993
  onActionClickHandler(e) {
@@ -967,12 +997,12 @@ class AXMTaskBoardGridViewComponent {
967
997
  this.onActionClick.emit({ nativeEvent: e.nativeEvent, task });
968
998
  }
969
999
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMTaskBoardGridViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
970
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMTaskBoardGridViewComponent, isStandalone: true, selector: "axm-task-board-grid-view", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onTaskClick: "onTaskClick", onActionClick: "onActionClick" }, ngImport: i0, template: "<ax-data-table\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"tasksDataSource()\"\n (onRowClick)=\"handleRowClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\"\n>\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'500px'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"reporter\" caption=\"Reporter\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"assignee\" caption=\"Assignee\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"statusTitle\" caption=\"status\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"type\" caption=\"type\" [width]=\"'150px'\"></ax-text-column>\n\n @if (columns().length) {\n <ng-container>\n @for (column of columns(); track column) {\n <axp-widget-column-renderer\n [node]=\"column.widget\"\n [caption]=\"(column.title | translate | async)!\"\n ></axp-widget-column-renderer>\n }\n </ng-container>\n }\n\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n</ax-data-table>\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"], dependencies: [{ kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1$2.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "rowDetailsTemplate", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1$2.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }, { kind: "component", type: i1$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i1.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1000
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMTaskBoardGridViewComponent, isStandalone: true, selector: "axm-task-board-grid-view", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onTaskClick: "onTaskClick", onActionClick: "onActionClick" }, viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-data-table\n #grid\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"tasksDataSource()\"\n (onRowClick)=\"handleRowClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\"\n>\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'500px'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column [allowResizing]=\"true\" dataField=\"reporter\" caption=\"Reporter\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"assignee\" caption=\"Assignee\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"statusTitle\" caption=\"status\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"type\" caption=\"type\" [width]=\"'150px'\"></ax-text-column>\n\n @if (columns().length) {\n <ng-container>\n @for (column of columns(); track column) {\n <axp-widget-column-renderer\n [node]=\"column.widget\"\n [caption]=\"(column.title | translate | async)!\"\n ></axp-widget-column-renderer>\n }\n </ng-container>\n }\n\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n</ax-data-table>\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"], dependencies: [{ kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1$2.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "rowDetailsTemplate", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1$2.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }, { kind: "component", type: i1$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i1.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
971
1001
  }
972
1002
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMTaskBoardGridViewComponent, decorators: [{
973
1003
  type: Component,
974
- args: [{ selector: 'axm-task-board-grid-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXDataTableModule, AXTranslatorPipe, AsyncPipe, AXPWidgetCoreModule], template: "<ax-data-table\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"tasksDataSource()\"\n (onRowClick)=\"handleRowClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\"\n>\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'500px'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"reporter\" caption=\"Reporter\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"assignee\" caption=\"Assignee\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"statusTitle\" caption=\"status\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"type\" caption=\"type\" [width]=\"'150px'\"></ax-text-column>\n\n @if (columns().length) {\n <ng-container>\n @for (column of columns(); track column) {\n <axp-widget-column-renderer\n [node]=\"column.widget\"\n [caption]=\"(column.title | translate | async)!\"\n ></axp-widget-column-renderer>\n }\n </ng-container>\n }\n\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n</ax-data-table>\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"] }]
975
- }], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], onTaskClick: [{ type: i0.Output, args: ["onTaskClick"] }], onActionClick: [{ type: i0.Output, args: ["onActionClick"] }] } });
1004
+ args: [{ selector: 'axm-task-board-grid-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXDataTableModule, AXTranslatorPipe, AsyncPipe, AXPWidgetCoreModule], template: "<ax-data-table\n #grid\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"tasksDataSource()\"\n (onRowClick)=\"handleRowClick($event)\"\n [loading]=\"{ enabled: true, animation: true }\"\n>\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'500px'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column [allowResizing]=\"true\" dataField=\"reporter\" caption=\"Reporter\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"assignee\" caption=\"Assignee\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"statusTitle\" caption=\"status\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"type\" caption=\"type\" [width]=\"'150px'\"></ax-text-column>\n\n @if (columns().length) {\n <ng-container>\n @for (column of columns(); track column) {\n <axp-widget-column-renderer\n [node]=\"column.widget\"\n [caption]=\"(column.title | translate | async)!\"\n ></axp-widget-column-renderer>\n }\n </ng-container>\n }\n\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n</ax-data-table>\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"] }]
1005
+ }], ctorParameters: () => [], propDecorators: { dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], onTaskClick: [{ type: i0.Output, args: ["onTaskClick"] }], onActionClick: [{ type: i0.Output, args: ["onActionClick"] }], grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
976
1006
 
977
1007
  class AXMTaskBoardKanbanViewComponent {
978
1008
  constructor() {
@@ -1447,6 +1477,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
1447
1477
  }], propDecorators: { kanbanComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXKanbanComponent), { isSignal: true }] }], taskPopover: [{ type: i0.ViewChild, args: ['taskPopover', { isSignal: true }] }], tasks: [{ type: i0.Input, args: [{ isSignal: true, alias: "tasks", required: true }] }, { type: i0.Output, args: ["tasksChange"] }], onTaskClick: [{ type: i0.Output, args: ["onTaskClick"] }], onTaskChanged: [{ type: i0.Output, args: ["onTaskChanged"] }], component: [{ type: i0.Output, args: ["component"] }], onActionClick: [{ type: i0.Output, args: ["onActionClick"] }] } });
1448
1478
 
1449
1479
  class AXMTaskBoardStatusGroupedGridViewComponent {
1480
+ #dataChanged;
1481
+ #providerChanged;
1482
+ #gridsChanged;
1450
1483
  constructor() {
1451
1484
  this.vm = inject(AXMTaskBoardViewModel);
1452
1485
  this.localeService = inject(AXLocaleService);
@@ -1458,7 +1491,18 @@ class AXMTaskBoardStatusGroupedGridViewComponent {
1458
1491
  this.allFetchedTasks = signal([], ...(ngDevMode ? [{ debugName: "allFetchedTasks" }] : []));
1459
1492
  this.columns = signal([], ...(ngDevMode ? [{ debugName: "columns" }] : []));
1460
1493
  this.statuses = signal([], ...(ngDevMode ? [{ debugName: "statuses" }] : []));
1494
+ this.grids = viewChildren('grid', ...(ngDevMode ? [{ debugName: "grids" }] : []));
1461
1495
  this.#dataChanged = effect(async () => {
1496
+ // Track filter-related signals that affect the data source
1497
+ // When these change, the parent's filter() computed signal changes,
1498
+ // which means the data source function will return different results
1499
+ this.vm.selectedTaskTypeNames();
1500
+ this.vm.selectedAssigneeIds();
1501
+ this.vm.selectedReporterIds();
1502
+ this.vm.selectedPriorities();
1503
+ this.vm.currentDate();
1504
+ this.vm.daysCount();
1505
+ this.vm.currentViewMode();
1462
1506
  const parentDataSource = this.dataSource();
1463
1507
  const allStatuses = this.statuses();
1464
1508
  if (!parentDataSource || allStatuses.length === 0) {
@@ -1478,11 +1522,17 @@ class AXMTaskBoardStatusGroupedGridViewComponent {
1478
1522
  });
1479
1523
  this.groupedTasks.set(statusGroups);
1480
1524
  untracked(() => {
1525
+ // Use afterRender to ensure data tables are rendered before refreshing
1481
1526
  setTimeout(() => {
1527
+ // Refresh data sources
1482
1528
  this.groupedTasks()?.forEach((group) => {
1483
1529
  group.tasks.refresh();
1484
1530
  });
1485
- });
1531
+ // Refresh data table components
1532
+ this.grids().forEach((grid) => {
1533
+ grid.refresh();
1534
+ });
1535
+ }, 0);
1486
1536
  });
1487
1537
  }, ...(ngDevMode ? [{ debugName: "#dataChanged" }] : []));
1488
1538
  this.#providerChanged = effect(async () => {
@@ -1498,9 +1548,35 @@ class AXMTaskBoardStatusGroupedGridViewComponent {
1498
1548
  }
1499
1549
  });
1500
1550
  }, ...(ngDevMode ? [{ debugName: "#providerChanged" }] : []));
1551
+ this.#gridsChanged = effect(() => {
1552
+ // Track when groupedTasks changes to refresh grids
1553
+ const groups = this.groupedTasks();
1554
+ untracked(() => {
1555
+ // Wait for grids to be rendered
1556
+ setTimeout(() => {
1557
+ this.grids().forEach((grid) => {
1558
+ grid.refresh();
1559
+ });
1560
+ }, 100);
1561
+ });
1562
+ }, ...(ngDevMode ? [{ debugName: "#gridsChanged" }] : []));
1563
+ // Ensure data sources are refreshed after initial render
1564
+ afterNextRender(() => {
1565
+ untracked(() => {
1566
+ // Use a longer timeout to ensure data tables are fully rendered
1567
+ setTimeout(() => {
1568
+ // Refresh data sources
1569
+ this.groupedTasks()?.forEach((group) => {
1570
+ group.tasks.refresh();
1571
+ });
1572
+ // Refresh data table components
1573
+ this.grids().forEach((grid) => {
1574
+ grid.refresh();
1575
+ });
1576
+ }, 200);
1577
+ });
1578
+ });
1501
1579
  }
1502
- #dataChanged;
1503
- #providerChanged;
1504
1580
  createTaskDataSourceForGroup(tasks) {
1505
1581
  return new AXDataSource({
1506
1582
  load: async (e) => {
@@ -1538,12 +1614,12 @@ class AXMTaskBoardStatusGroupedGridViewComponent {
1538
1614
  this.onActionClick.emit({ nativeEvent: e.nativeEvent, task });
1539
1615
  }
1540
1616
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMTaskBoardStatusGroupedGridViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1541
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMTaskBoardStatusGroupedGridViewComponent, isStandalone: true, selector: "axm-task-board-status-grouped-grid-view", inputs: { provider: { classPropertyName: "provider", publicName: "provider", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onActionClick: "onActionClick" }, ngImport: i0, template: "@for (group of groupedTasks(); track group) {\n <h1 class=\"ax-text-xl ax-font-bold\">{{ group.statusInfo.title }}</h1>\n <ax-data-table\n class=\"ax-h-[300px]\"\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"group.tasks\"\n [loading]=\"{ enabled: true, animation: true }\"\n >\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'500px'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"reporter\" caption=\"Reporter\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"assignee\" caption=\"Assignee\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n\n @for (column of columns(); track column) {\n <axp-widget-column-renderer\n [node]=\"column.widget\"\n [caption]=\"(column.title | translate | async)!\"\n ></axp-widget-column-renderer>\n }\n\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n </ax-data-table>\n}\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"], dependencies: [{ kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1$2.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "rowDetailsTemplate", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1$2.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }, { kind: "component", type: i1$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i1.AXPWidgetColumnRendererComponent, selector: "axp-widget-column-renderer", inputs: ["caption", "customExpandIcon", "customCollapseIcon", "customWidth", "node", "footerTemplate", "expandHandler", "cellTemplate", "headerTemplate"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1617
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXMTaskBoardStatusGroupedGridViewComponent, isStandalone: true, selector: "axm-task-board-status-grouped-grid-view", inputs: { provider: { classPropertyName: "provider", publicName: "provider", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onActionClick: "onActionClick" }, viewQueries: [{ propertyName: "grids", predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "@for (group of groupedTasks(); track group) {\n <h1 class=\"ax-text-xl ax-font-bold\">{{ group.statusInfo.title }}</h1>\n <ax-data-table\n #grid\n class=\"ax-h-[300px]\"\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"group.tasks\"\n [loading]=\"{ enabled: true, animation: true }\"\n >\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'500px'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"reporter\" caption=\"Reporter\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"assignee\" caption=\"Assignee\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n\n \n\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n </ax-data-table>\n}\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"], dependencies: [{ kind: "ngmodule", type: AXDataTableModule }, { kind: "component", type: i1$2.AXDataTableComponent, selector: "ax-data-table", inputs: ["dataSource", "selectedRows", "parentField", "rowDetailsTemplate", "rowTemplate", "emptyTemplate", "noDataTemplate", "alternative", "showHeader", "fixedHeader", "showFooter", "fixedFooter", "itemHeight", "allowReordering", "paging", "fetchDataMode", "loading", "focusedRow"], outputs: ["selectedRowsChange", "focusedRowChange", "onRowClick", "onRowDbClick", "onColumnsOrderChanged", "onColumnSizeChanged", "onPageChanged"] }, { kind: "component", type: i1$2.AXDataTableTextColumnComponent, selector: "ax-text-column", inputs: ["width", "caption", "allowSorting", "allowResizing", "fixed", "customExpandIcon", "customCollapseIcon", "dataField", "expandHandler", "wrapText", "cellTemplate", "footerTemplate", "headerTemplate", "format", "formatOptions"] }, { kind: "component", type: i1$2.AXRowCommandColumnComponent, selector: "ax-command-column", inputs: ["width", "caption", "fixed", "footerTemplate", "items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1542
1618
  }
1543
1619
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMTaskBoardStatusGroupedGridViewComponent, decorators: [{
1544
1620
  type: Component,
1545
- args: [{ selector: 'axm-task-board-status-grouped-grid-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXDataTableModule, AXTranslatorPipe, AsyncPipe, AXPWidgetCoreModule], template: "@for (group of groupedTasks(); track group) {\n <h1 class=\"ax-text-xl ax-font-bold\">{{ group.statusInfo.title }}</h1>\n <ax-data-table\n class=\"ax-h-[300px]\"\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"group.tasks\"\n [loading]=\"{ enabled: true, animation: true }\"\n >\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'500px'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"reporter\" caption=\"Reporter\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"assignee\" caption=\"Assignee\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n\n @for (column of columns(); track column) {\n <axp-widget-column-renderer\n [node]=\"column.widget\"\n [caption]=\"(column.title | translate | async)!\"\n ></axp-widget-column-renderer>\n }\n\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n </ax-data-table>\n}\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"] }]
1546
- }], propDecorators: { provider: [{ type: i0.Input, args: [{ isSignal: true, alias: "provider", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], onActionClick: [{ type: i0.Output, args: ["onActionClick"] }] } });
1621
+ args: [{ selector: 'axm-task-board-status-grouped-grid-view', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [AXDataTableModule, AXPWidgetCoreModule], template: "@for (group of groupedTasks(); track group) {\n <h1 class=\"ax-text-xl ax-font-bold\">{{ group.statusInfo.title }}</h1>\n <ax-data-table\n #grid\n class=\"ax-h-[300px]\"\n [fetchDataMode]=\"'manual'\"\n [dataSource]=\"group.tasks\"\n [loading]=\"{ enabled: true, animation: true }\"\n >\n <ax-text-column dataField=\"title\" caption=\"title\" [width]=\"'350px'\"></ax-text-column>\n <ax-text-column dataField=\"description\" caption=\"description\" [width]=\"'500px'\"></ax-text-column>\n <ax-text-column dataField=\"startDate\" caption=\"Start Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"endDate\" caption=\"Due Date\" [width]=\"'150px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"reporter\" caption=\"Reporter\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"assignee\" caption=\"Assignee\" [width]=\"'125px'\"></ax-text-column>\n <ax-text-column dataField=\"priority\" caption=\"priority\" [width]=\"'125px'\"></ax-text-column>\n\n \n\n <ax-command-column\n fixed=\"end\"\n [width]=\"'60px'\"\n (onItemClick)=\"onActionClickHandler($event)\"\n [items]=\"[{ name: 'view', text: 'View', icon: 'ax-icon ax-icon-more-horizontal' }]\"\n ></ax-command-column>\n </ax-data-table>\n}\n", styles: ["ax-kanban{--ax-comp-kanban-status-min-width: 25rem;height:100%;line-height:1.5}\n"] }]
1622
+ }], ctorParameters: () => [], propDecorators: { provider: [{ type: i0.Input, args: [{ isSignal: true, alias: "provider", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: true }] }], onActionClick: [{ type: i0.Output, args: ["onActionClick"] }], grids: [{ type: i0.ViewChildren, args: ['grid', { isSignal: true }] }] } });
1547
1623
 
1548
1624
  class AXMTaskBoardPage extends AXPPageLayoutBaseComponent {
1549
1625
  constructor() {
@@ -2220,4 +2296,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
2220
2296
  }], propDecorators: { popover: [{ type: i0.ViewChild, args: ['popover', { isSignal: true }] }], calendar: [{ type: i0.ViewChild, args: ['calendar', { isSignal: true }] }], sidebarCalendar: [{ type: i0.ViewChild, args: ['sidebarCalendar', { isSignal: true }] }], dayCellTemplateRef: [{ type: i0.ViewChild, args: ['dayCellTemplate', { isSignal: true }] }], contextMenu: [{ type: i0.ViewChild, args: ['rootContextMenu', { isSignal: true }] }] } });
2221
2297
 
2222
2298
  export { AXMTaskBoardPage };
2223
- //# sourceMappingURL=acorex-modules-task-management-task-board.page-D7dEWzjn.mjs.map
2299
+ //# sourceMappingURL=acorex-modules-task-management-task-board.page-CIlxqtgJ.mjs.map