@acorex/components 22.1.0-next.2 → 22.1.0-next.20

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.
Files changed (60) hide show
  1. package/fesm2022/acorex-components-accordion.mjs +2 -2
  2. package/fesm2022/acorex-components-accordion.mjs.map +1 -1
  3. package/fesm2022/acorex-components-button.mjs +2 -2
  4. package/fesm2022/acorex-components-button.mjs.map +1 -1
  5. package/fesm2022/acorex-components-check-box.mjs +2 -2
  6. package/fesm2022/acorex-components-check-box.mjs.map +1 -1
  7. package/fesm2022/acorex-components-combo-box.mjs +114 -20
  8. package/fesm2022/acorex-components-combo-box.mjs.map +1 -1
  9. package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs → acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs} +6 -19
  10. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs.map +1 -0
  11. package/fesm2022/acorex-components-conversation.mjs +7299 -9510
  12. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  13. package/fesm2022/acorex-components-data-table.mjs +33 -18
  14. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  15. package/fesm2022/acorex-components-dropdown.mjs +2 -2
  16. package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
  17. package/fesm2022/acorex-components-form.mjs +21 -5
  18. package/fesm2022/acorex-components-form.mjs.map +1 -1
  19. package/fesm2022/acorex-components-label.mjs +2 -2
  20. package/fesm2022/acorex-components-label.mjs.map +1 -1
  21. package/fesm2022/acorex-components-list.mjs +2 -2
  22. package/fesm2022/acorex-components-list.mjs.map +1 -1
  23. package/fesm2022/acorex-components-loading-dialog.mjs +59 -42
  24. package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
  25. package/fesm2022/acorex-components-lookup.mjs +754 -96
  26. package/fesm2022/acorex-components-lookup.mjs.map +1 -1
  27. package/fesm2022/acorex-components-notification.mjs +4 -6
  28. package/fesm2022/acorex-components-notification.mjs.map +1 -1
  29. package/fesm2022/acorex-components-password-box.mjs +2 -2
  30. package/fesm2022/acorex-components-password-box.mjs.map +1 -1
  31. package/fesm2022/acorex-components-popover.mjs +22 -0
  32. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  33. package/fesm2022/acorex-components-radio.mjs +2 -2
  34. package/fesm2022/acorex-components-radio.mjs.map +1 -1
  35. package/fesm2022/acorex-components-range-slider.mjs +2 -2
  36. package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
  37. package/fesm2022/acorex-components-select-box.mjs +38 -11
  38. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  39. package/fesm2022/acorex-components-selection-list.mjs +2 -2
  40. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  41. package/fesm2022/acorex-components-switch.mjs +2 -2
  42. package/fesm2022/acorex-components-switch.mjs.map +1 -1
  43. package/fesm2022/acorex-components-tabs.mjs +2 -2
  44. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  45. package/fesm2022/acorex-components-tag-box.mjs +2 -2
  46. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  47. package/lookup/README.md +29 -7
  48. package/package.json +4 -7
  49. package/types/acorex-components-combo-box.d.ts +38 -8
  50. package/types/acorex-components-conversation.d.ts +543 -1019
  51. package/types/acorex-components-data-table.d.ts +3 -2
  52. package/types/acorex-components-loading-dialog.d.ts +12 -4
  53. package/types/acorex-components-lookup.d.ts +181 -21
  54. package/types/acorex-components-popover.d.ts +6 -0
  55. package/types/acorex-components-select-box.d.ts +11 -0
  56. package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs.map +0 -1
  57. package/fesm2022/acorex-components-selection-list-2.mjs +0 -168
  58. package/fesm2022/acorex-components-selection-list-2.mjs.map +0 -1
  59. package/selection-list-2/README.md +0 -3
  60. package/types/acorex-components-selection-list-2.d.ts +0 -52
@@ -732,7 +732,8 @@ class AXDataTableTextColumnComponent extends AXDataTableColumnComponent {
732
732
  /**
733
733
  * @ignore
734
734
  */
735
- async handleExpandRow(row) {
735
+ async handleExpandRow(row, event) {
736
+ event?.stopPropagation();
736
737
  this.loadingRow.set(row);
737
738
  await this.grid.expandRow(row);
738
739
  this.loadingRow.set(null);
@@ -772,7 +773,7 @@ class AXDataTableTextColumnComponent extends AXDataTableColumnComponent {
772
773
  >
773
774
  @if (expandHandler && (row.data?.[grid.hasChildrenField] !== false || (row.data?.children?.length ?? 0) > 0)) {
774
775
  <div
775
- (click)="handleExpandRow(row)"
776
+ (click)="handleExpandRow(row, $event)"
776
777
  class="ax-expand-handler"
777
778
  id="ax-expand-handler-container"
778
779
  >
@@ -812,7 +813,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
812
813
  >
813
814
  @if (expandHandler && (row.data?.[grid.hasChildrenField] !== false || (row.data?.children?.length ?? 0) > 0)) {
814
815
  <div
815
- (click)="handleExpandRow(row)"
816
+ (click)="handleExpandRow(row, $event)"
816
817
  class="ax-expand-handler"
817
818
  id="ax-expand-handler-container"
818
819
  >
@@ -1407,7 +1408,8 @@ class AXRowExpandColumnComponent extends AXDataTableColumnComponent {
1407
1408
  /**
1408
1409
  * @ignore
1409
1410
  */
1410
- async handleExpandRow(row) {
1411
+ async handleExpandRow(row, event) {
1412
+ event?.stopPropagation();
1411
1413
  this.loadingRow.set(row);
1412
1414
  await this.grid.expandRow(row);
1413
1415
  this.loadingRow.set(null);
@@ -1433,7 +1435,7 @@ class AXRowExpandColumnComponent extends AXDataTableColumnComponent {
1433
1435
  [attr.data-level]="row.data?.__meta__?.level || 0"
1434
1436
  >
1435
1437
  @if (row.data?.[grid.hasChildrenField] !== false || (row.data?.children?.length ?? 0) > 0) {
1436
- <div (click)="handleExpandRow(row)" class="ax-expand-handler">
1438
+ <div (click)="handleExpandRow(row, $event)" class="ax-expand-handler">
1437
1439
  @if (loadingRow() === row) {
1438
1440
  <i class="fas fa-spinner-third ax-animate-twSpin ax-animate-infinite"></i>
1439
1441
  } @else {
@@ -1462,7 +1464,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1462
1464
  [attr.data-level]="row.data?.__meta__?.level || 0"
1463
1465
  >
1464
1466
  @if (row.data?.[grid.hasChildrenField] !== false || (row.data?.children?.length ?? 0) > 0) {
1465
- <div (click)="handleExpandRow(row)" class="ax-expand-handler">
1467
+ <div (click)="handleExpandRow(row, $event)" class="ax-expand-handler">
1466
1468
  @if (loadingRow() === row) {
1467
1469
  <i class="fas fa-spinner-third ax-animate-twSpin ax-animate-infinite"></i>
1468
1470
  } @else {
@@ -2119,27 +2121,17 @@ class AXDataTableComponent extends AXBaseDataTable {
2119
2121
  this.applyDataPagerMethods();
2120
2122
  }
2121
2123
  this.rtl = AXHtmlUtil.isRtl(this.getHostElement());
2122
- this.dataSource.useCache = false;
2123
- if (this.fetchDataMode == 'auto') {
2124
- this.dataSource.setPage(0);
2125
- }
2126
- this.displayedRows.set(new Array(this.dataSource.pageSize));
2127
- this.totalRows = this.dataSource.items.length;
2128
2124
  this.dataSource.onLoadingChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((data) => {
2129
2125
  this.isLoading.set(data);
2130
2126
  });
2127
+ this.isLoading.set(this.dataSource.isLoading);
2131
2128
  this.dataSource.onChanged.pipe(this._unsubscriber.takeUntilDestroy).subscribe((data) => {
2132
2129
  const shouldMoveToPreviousPage = data.totalCount > 0 && data.items.length === 0 && data.page > 0;
2133
2130
  if (shouldMoveToPreviousPage) {
2134
2131
  this.goToPage(data.page);
2135
2132
  return;
2136
2133
  }
2137
- this.clearResolvedCssClasses();
2138
- this.lastLoadedRows = data.items.filter((item) => !item[this.parentField]);
2139
- this.displayedRows.set(this.mergeRowsWithHighlights(this.lastLoadedRows));
2140
- this.totalRows = data.totalCount;
2141
- this.hasItems = data.totalCount > 0;
2142
- this.scheduleTextHighlight();
2134
+ this.applyLoadedRows(data.items, data.totalCount);
2143
2135
  });
2144
2136
  this.dataSource.onItemExpanded.pipe(this._unsubscriber.takeUntilDestroy).subscribe((data) => {
2145
2137
  const { expandedItem, children } = data;
@@ -2156,6 +2148,21 @@ class AXDataTableComponent extends AXBaseDataTable {
2156
2148
  this.refreshExpandedItem(id);
2157
2149
  });
2158
2150
  this.pageSize.set(this.dataSource.pageSize);
2151
+ const existingItems = (this.dataSource.items ?? []).filter((item) => item != null);
2152
+ if (existingItems.length > 0) {
2153
+ // Popup/lookup remounts this table; setPage(0) is a no-op on a warm source and
2154
+ // would leave the default skeleton rows in place. Paint cached rows instead of refetching.
2155
+ this.applyLoadedRows(existingItems, this.dataSource.totalCount || existingItems.length);
2156
+ this.isLoading.set(false);
2157
+ }
2158
+ else {
2159
+ this.dataSource.useCache = false;
2160
+ if (this.fetchDataMode == 'auto') {
2161
+ this.dataSource.setPage(0);
2162
+ }
2163
+ this.displayedRows.set(new Array(this.dataSource.pageSize));
2164
+ this.totalRows = this.dataSource.items.length;
2165
+ }
2159
2166
  //
2160
2167
  this.clickSubject
2161
2168
  .pipe(buffer(this.clickSubject.pipe(debounceTime(250))), filter((clickArray) => clickArray.length === 2))
@@ -2163,6 +2170,14 @@ class AXDataTableComponent extends AXBaseDataTable {
2163
2170
  this.handleRowDoubleClick(clickArray[0].event, clickArray[0].item);
2164
2171
  });
2165
2172
  }
2173
+ applyLoadedRows(items, totalCount) {
2174
+ this.clearResolvedCssClasses();
2175
+ this.lastLoadedRows = items.filter((item) => item != null && !item[this.parentField]);
2176
+ this.displayedRows.set(this.mergeRowsWithHighlights(this.lastLoadedRows));
2177
+ this.totalRows = totalCount;
2178
+ this.hasItems = totalCount > 0;
2179
+ this.scheduleTextHighlight();
2180
+ }
2166
2181
  /**
2167
2182
  * @ignore
2168
2183
  */