@acorex-platform/framework-client 2.0.0-next.12 → 2.0.0-next.14

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 (16) hide show
  1. package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-BUUIRvjv.mjs → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-BukN_67G.mjs} +81 -25
  2. package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-BUUIRvjv.mjs.map → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-BukN_67G.mjs.map} +1 -1
  3. package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Bvu_DFae.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-BbUuuGOT.mjs} +2 -2
  4. package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Bvu_DFae.mjs.map → acorex-platform-framework-client-layout-entity-attachments-page.component-BbUuuGOT.mjs.map} +1 -1
  5. package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-AQyQql3E.mjs → acorex-platform-framework-client-layout-entity-bulk-entity.command-B2flk4OK.mjs} +2 -2
  6. package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-AQyQql3E.mjs.map → acorex-platform-framework-client-layout-entity-bulk-entity.command-B2flk4OK.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-framework-client-layout-entity-file-list-popup.component-BIlmfAGh.mjs → acorex-platform-framework-client-layout-entity-file-list-popup.component-og7hv1xh.mjs} +2 -2
  8. package/fesm2022/{acorex-platform-framework-client-layout-entity-file-list-popup.component-BIlmfAGh.mjs.map → acorex-platform-framework-client-layout-entity-file-list-popup.component-og7hv1xh.mjs.map} +1 -1
  9. package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-C9VXr6zx.mjs → acorex-platform-framework-client-layout-entity-gallery-page.component-BorqAr7O.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-C9VXr6zx.mjs.map → acorex-platform-framework-client-layout-entity-gallery-page.component-BorqAr7O.mjs.map} +1 -1
  11. package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +1 -1
  12. package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs +158 -42
  13. package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs.map +1 -1
  14. package/package.json +2 -2
  15. package/types/acorex-platform-framework-client-layout-entity.d.ts +50 -0
  16. package/types/acorex-platform-framework-client-layout-widget-core.d.ts +11 -11
@@ -2115,8 +2115,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2115
2115
  type: Injectable
2116
2116
  }] });
2117
2117
 
2118
- const AXP_WIDGET_COLUMN_AUTO_FIT = new InjectionToken('AXP_WIDGET_COLUMN_AUTO_FIT');
2119
-
2120
2118
  //#region ---- Imports ----
2121
2119
  /**
2122
2120
  * Injection token for widget definition providers.
@@ -2202,6 +2200,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2202
2200
  }]
2203
2201
  }] });
2204
2202
 
2203
+ const AXP_WIDGET_COLUMN_AUTO_FIT = new InjectionToken('AXP_WIDGET_COLUMN_AUTO_FIT');
2204
+
2205
2205
  class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2206
2206
  constructor() {
2207
2207
  super(...arguments);
@@ -2277,9 +2277,6 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2277
2277
  this.loadingRow.set(row);
2278
2278
  await this.grid.expandRow(row);
2279
2279
  this.loadingRow.set(null);
2280
- this.contentAutoFitSettled = false;
2281
- this.contentAutoFitShouldSettle = false;
2282
- this.scheduleContentAutoFit();
2283
2280
  // if (row.data?.__meta__?.expanded === undefined) {
2284
2281
  // this.width = `${parseInt(this.width as string) + 24}px`;
2285
2282
  // }
@@ -2336,7 +2333,9 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2336
2333
  return this.normalizeColumnAlignment(align);
2337
2334
  }
2338
2335
  if (typeof align === 'object' && !Array.isArray(align)) {
2339
- const raw = side === 'header' ? align.header : align.cell;
2336
+ const raw = side === 'header'
2337
+ ? align.header
2338
+ : align.cell;
2340
2339
  return this.normalizeColumnAlignment(raw);
2341
2340
  }
2342
2341
  return 'start';
@@ -2392,7 +2391,12 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2392
2391
  },
2393
2392
  ],
2394
2393
  });
2395
- this.width = this.mergedOptions().width === 'auto' ? 'auto' : this.customWidth ? this.customWidth : (this.mergedOptions().width ?? '200px');
2394
+ this.width =
2395
+ this.mergedOptions().width === 'auto'
2396
+ ? 'auto'
2397
+ : this.customWidth
2398
+ ? this.customWidth
2399
+ : (this.mergedOptions().width ?? '200px');
2396
2400
  this.allowResizing = this.mergedOptions().allowResizing !== false;
2397
2401
  this.allowSorting = this.sortEnabled;
2398
2402
  this.syncAutoWidthIntent();
@@ -2456,7 +2460,9 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2456
2460
  return;
2457
2461
  }
2458
2462
  this.bandLocaleWatchStarted = true;
2459
- this.translation.langChanges$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
2463
+ this.translation.langChanges$
2464
+ .pipe(takeUntilDestroyed(this.destroyRef))
2465
+ .subscribe(() => {
2460
2466
  if (this.isBand && this.bandCaptionI18nKey) {
2461
2467
  this.resolveBandCaption();
2462
2468
  }
@@ -2467,7 +2473,8 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2467
2473
  return;
2468
2474
  }
2469
2475
  this.caption = text;
2470
- const topLevel = this.grid.topLevelColumnsList;
2476
+ const topLevel = this.grid
2477
+ .topLevelColumnsList;
2471
2478
  if (topLevel) {
2472
2479
  topLevel.set([...topLevel()]);
2473
2480
  }
@@ -2499,7 +2506,9 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2499
2506
  // Use a hash of key properties instead of full JSON.stringify
2500
2507
  // This is much faster for large objects
2501
2508
  const keyProps = ['id', 'code', 'name', 'title'];
2502
- const keyValues = keyProps.map((prop) => data?.[prop]).filter((v) => v != null);
2509
+ const keyValues = keyProps
2510
+ .map((prop) => data?.[prop])
2511
+ .filter((v) => v != null);
2503
2512
  if (keyValues.length > 0) {
2504
2513
  return `row-${keyValues.join('-')}`;
2505
2514
  }
@@ -2550,8 +2559,7 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2550
2559
  if (!isPlatformBrowser(this.platformId) || !this.autoWidthColumn || this.contentAutoFitSettled) {
2551
2560
  return;
2552
2561
  }
2553
- const allowSettle = this.expandHandler !== true;
2554
- this.contentAutoFitShouldSettle = this.contentAutoFitShouldSettle || (request?.settle === true && allowSettle);
2562
+ this.contentAutoFitShouldSettle = this.contentAutoFitShouldSettle || request?.settle === true;
2555
2563
  if (this.contentAutoFitTimer != null) {
2556
2564
  clearTimeout(this.contentAutoFitTimer);
2557
2565
  }
@@ -2723,13 +2731,23 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2723
2731
  [class.flex]="!sortEnabled"
2724
2732
  [class.items-center]="!sortEnabled"
2725
2733
  [class.axp-widget-column-header--sortable]="sortEnabled"
2726
- [class.axp-widget-column-header--sort-at-start]="sortEnabled && getHeaderTextAlign() === 'end'"
2727
- [class.axp-widget-column-header--sort-active]="headerSortDirection === 'asc' || headerSortDirection === 'desc'"
2734
+ [class.axp-widget-column-header--sort-at-start]="
2735
+ sortEnabled && getHeaderTextAlign() === 'end'
2736
+ "
2737
+ [class.axp-widget-column-header--sort-active]="
2738
+ headerSortDirection === 'asc' || headerSortDirection === 'desc'
2739
+ "
2728
2740
  [class.gap-1]="!sortEnabled"
2729
- [style.justify-content]="sortEnabled ? 'flex-start' : getHeaderJustifyContent()"
2741
+ [style.justify-content]="
2742
+ sortEnabled ? 'flex-start' : getHeaderJustifyContent()
2743
+ "
2730
2744
  (click)="onHeaderClick($event)"
2731
2745
  >
2732
- <span class="axp-widget-column-header__caption truncate" [class.axp-widget-column-header__caption--with-sort]="sortEnabled" [style.text-align]="sortEnabled ? getHeaderTextAlign() : null">
2746
+ <span
2747
+ class="axp-widget-column-header__caption truncate"
2748
+ [class.axp-widget-column-header__caption--with-sort]="sortEnabled"
2749
+ [style.text-align]="sortEnabled ? getHeaderTextAlign() : null"
2750
+ >
2733
2751
  @if (isBand) {
2734
2752
  {{ caption }}
2735
2753
  } @else {
@@ -2739,40 +2757,84 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
2739
2757
  @if (sortEnabled) {
2740
2758
  <span class="axp-widget-column-header__sort">
2741
2759
  @if (headerSortPriority !== undefined && headerSortPriority > 1) {
2742
- <span class="axp-widget-column-header__sort-priority text-xs opacity-70">{{ headerSortPriority }}</span>
2760
+ <span
2761
+ class="axp-widget-column-header__sort-priority text-xs opacity-70"
2762
+ >{{ headerSortPriority }}</span
2763
+ >
2743
2764
  }
2744
- <i class="fa-solid fa-arrow-up-long text-neutral-400" [class.text-primary]="headerSortDirection === 'asc'"></i>
2745
- <i class="fa-solid fa-arrow-down-long text-neutral-400" [class.text-primary]="headerSortDirection === 'desc'"></i>
2765
+ <i
2766
+ class="fa-solid fa-arrow-up-long text-neutral-400"
2767
+ [class.text-primary]="headerSortDirection === 'asc'"
2768
+ ></i>
2769
+ <i
2770
+ class="fa-solid fa-arrow-down-long text-neutral-400"
2771
+ [class.text-primary]="headerSortDirection === 'desc'"
2772
+ ></i>
2746
2773
  </span>
2747
2774
  }
2748
2775
  </div>
2749
2776
  </ng-template>
2750
2777
  <ng-template #cell let-row>
2751
2778
  @if (expandHandler) {
2752
- <div class="ax-data-table-nested-indent w-full" [attr.data-level]="row.data?.__meta__?.level || 0">
2779
+ <div
2780
+ class="ax-data-table-nested-indent w-full"
2781
+ [attr.data-level]="row.data?.__meta__?.level || 0"
2782
+ >
2753
2783
  @if (hasExpandableRow(row)) {
2754
- <div (click)="handleExpandRow(row, $event)" class="ax-expand-handler" id="ax-expand-handler-container">
2784
+ <div
2785
+ (click)="handleExpandRow(row, $event)"
2786
+ class="ax-expand-handler"
2787
+ id="ax-expand-handler-container"
2788
+ >
2755
2789
  @if (loadingRow() === row) {
2756
- <i class="fas fa-spinner-third animate-twSpin animate-infinite"></i>
2790
+ <i
2791
+ class="fas fa-spinner-third animate-twSpin animate-infinite"
2792
+ ></i>
2757
2793
  } @else {
2758
2794
  @if (row.data?.__meta__?.expanded) {
2759
- <i [class]="customCollapseIcon || 'far fa-minus-square text-md opacity-75'"></i>
2795
+ <i
2796
+ [class]="
2797
+ customCollapseIcon ||
2798
+ 'far fa-minus-square text-md opacity-75'
2799
+ "
2800
+ ></i>
2760
2801
  } @else {
2761
- <i [class]="customExpandIcon || 'far fa-plus-square text-md opacity-75'"></i>
2802
+ <i
2803
+ [class]="
2804
+ customExpandIcon || 'far fa-plus-square text-md opacity-75'
2805
+ "
2806
+ ></i>
2762
2807
  }
2763
2808
  }
2764
2809
  </div>
2765
2810
  }
2766
2811
  @if (component && row?.data) {
2767
2812
  <div class="ax-data-table-cell-text min-w-0 flex-1">
2768
- <ng-container *ngComponentOutlet="component; injector: getRowInjector(row.data); inputs: getInputs(row.data)"></ng-container>
2813
+ <ng-container
2814
+ *ngComponentOutlet="
2815
+ component;
2816
+ injector: getRowInjector(row.data);
2817
+ inputs: getInputs(row.data)
2818
+ "
2819
+ ></ng-container>
2769
2820
  </div>
2770
2821
  }
2771
2822
  </div>
2772
2823
  } @else {
2773
- <div class="w-full min-w-0 max-w-full" [class.flex]="getCellUseFlexLayout()" [class.items-center]="getCellUseFlexLayout()" [style.justify-content]="getCellJustifyContent()">
2824
+ <div
2825
+ class="w-full min-w-0 max-w-full"
2826
+ [class.flex]="getCellUseFlexLayout()"
2827
+ [class.items-center]="getCellUseFlexLayout()"
2828
+ [style.justify-content]="getCellJustifyContent()"
2829
+ >
2774
2830
  @if (component && row?.data) {
2775
- <ng-container *ngComponentOutlet="component; injector: getRowInjector(row.data); inputs: getInputs(row.data)"></ng-container>
2831
+ <ng-container
2832
+ *ngComponentOutlet="
2833
+ component;
2834
+ injector: getRowInjector(row.data);
2835
+ inputs: getInputs(row.data)
2836
+ "
2837
+ ></ng-container>
2776
2838
  }
2777
2839
  </div>
2778
2840
  }
@@ -2790,13 +2852,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2790
2852
  [class.flex]="!sortEnabled"
2791
2853
  [class.items-center]="!sortEnabled"
2792
2854
  [class.axp-widget-column-header--sortable]="sortEnabled"
2793
- [class.axp-widget-column-header--sort-at-start]="sortEnabled && getHeaderTextAlign() === 'end'"
2794
- [class.axp-widget-column-header--sort-active]="headerSortDirection === 'asc' || headerSortDirection === 'desc'"
2855
+ [class.axp-widget-column-header--sort-at-start]="
2856
+ sortEnabled && getHeaderTextAlign() === 'end'
2857
+ "
2858
+ [class.axp-widget-column-header--sort-active]="
2859
+ headerSortDirection === 'asc' || headerSortDirection === 'desc'
2860
+ "
2795
2861
  [class.gap-1]="!sortEnabled"
2796
- [style.justify-content]="sortEnabled ? 'flex-start' : getHeaderJustifyContent()"
2862
+ [style.justify-content]="
2863
+ sortEnabled ? 'flex-start' : getHeaderJustifyContent()
2864
+ "
2797
2865
  (click)="onHeaderClick($event)"
2798
2866
  >
2799
- <span class="axp-widget-column-header__caption truncate" [class.axp-widget-column-header__caption--with-sort]="sortEnabled" [style.text-align]="sortEnabled ? getHeaderTextAlign() : null">
2867
+ <span
2868
+ class="axp-widget-column-header__caption truncate"
2869
+ [class.axp-widget-column-header__caption--with-sort]="sortEnabled"
2870
+ [style.text-align]="sortEnabled ? getHeaderTextAlign() : null"
2871
+ >
2800
2872
  @if (isBand) {
2801
2873
  {{ caption }}
2802
2874
  } @else {
@@ -2806,40 +2878,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2806
2878
  @if (sortEnabled) {
2807
2879
  <span class="axp-widget-column-header__sort">
2808
2880
  @if (headerSortPriority !== undefined && headerSortPriority > 1) {
2809
- <span class="axp-widget-column-header__sort-priority text-xs opacity-70">{{ headerSortPriority }}</span>
2881
+ <span
2882
+ class="axp-widget-column-header__sort-priority text-xs opacity-70"
2883
+ >{{ headerSortPriority }}</span
2884
+ >
2810
2885
  }
2811
- <i class="fa-solid fa-arrow-up-long text-neutral-400" [class.text-primary]="headerSortDirection === 'asc'"></i>
2812
- <i class="fa-solid fa-arrow-down-long text-neutral-400" [class.text-primary]="headerSortDirection === 'desc'"></i>
2886
+ <i
2887
+ class="fa-solid fa-arrow-up-long text-neutral-400"
2888
+ [class.text-primary]="headerSortDirection === 'asc'"
2889
+ ></i>
2890
+ <i
2891
+ class="fa-solid fa-arrow-down-long text-neutral-400"
2892
+ [class.text-primary]="headerSortDirection === 'desc'"
2893
+ ></i>
2813
2894
  </span>
2814
2895
  }
2815
2896
  </div>
2816
2897
  </ng-template>
2817
2898
  <ng-template #cell let-row>
2818
2899
  @if (expandHandler) {
2819
- <div class="ax-data-table-nested-indent w-full" [attr.data-level]="row.data?.__meta__?.level || 0">
2900
+ <div
2901
+ class="ax-data-table-nested-indent w-full"
2902
+ [attr.data-level]="row.data?.__meta__?.level || 0"
2903
+ >
2820
2904
  @if (hasExpandableRow(row)) {
2821
- <div (click)="handleExpandRow(row, $event)" class="ax-expand-handler" id="ax-expand-handler-container">
2905
+ <div
2906
+ (click)="handleExpandRow(row, $event)"
2907
+ class="ax-expand-handler"
2908
+ id="ax-expand-handler-container"
2909
+ >
2822
2910
  @if (loadingRow() === row) {
2823
- <i class="fas fa-spinner-third animate-twSpin animate-infinite"></i>
2911
+ <i
2912
+ class="fas fa-spinner-third animate-twSpin animate-infinite"
2913
+ ></i>
2824
2914
  } @else {
2825
2915
  @if (row.data?.__meta__?.expanded) {
2826
- <i [class]="customCollapseIcon || 'far fa-minus-square text-md opacity-75'"></i>
2916
+ <i
2917
+ [class]="
2918
+ customCollapseIcon ||
2919
+ 'far fa-minus-square text-md opacity-75'
2920
+ "
2921
+ ></i>
2827
2922
  } @else {
2828
- <i [class]="customExpandIcon || 'far fa-plus-square text-md opacity-75'"></i>
2923
+ <i
2924
+ [class]="
2925
+ customExpandIcon || 'far fa-plus-square text-md opacity-75'
2926
+ "
2927
+ ></i>
2829
2928
  }
2830
2929
  }
2831
2930
  </div>
2832
2931
  }
2833
2932
  @if (component && row?.data) {
2834
2933
  <div class="ax-data-table-cell-text min-w-0 flex-1">
2835
- <ng-container *ngComponentOutlet="component; injector: getRowInjector(row.data); inputs: getInputs(row.data)"></ng-container>
2934
+ <ng-container
2935
+ *ngComponentOutlet="
2936
+ component;
2937
+ injector: getRowInjector(row.data);
2938
+ inputs: getInputs(row.data)
2939
+ "
2940
+ ></ng-container>
2836
2941
  </div>
2837
2942
  }
2838
2943
  </div>
2839
2944
  } @else {
2840
- <div class="w-full min-w-0 max-w-full" [class.flex]="getCellUseFlexLayout()" [class.items-center]="getCellUseFlexLayout()" [style.justify-content]="getCellJustifyContent()">
2945
+ <div
2946
+ class="w-full min-w-0 max-w-full"
2947
+ [class.flex]="getCellUseFlexLayout()"
2948
+ [class.items-center]="getCellUseFlexLayout()"
2949
+ [style.justify-content]="getCellJustifyContent()"
2950
+ >
2841
2951
  @if (component && row?.data) {
2842
- <ng-container *ngComponentOutlet="component; injector: getRowInjector(row.data); inputs: getInputs(row.data)"></ng-container>
2952
+ <ng-container
2953
+ *ngComponentOutlet="
2954
+ component;
2955
+ injector: getRowInjector(row.data);
2956
+ inputs: getInputs(row.data)
2957
+ "
2958
+ ></ng-container>
2843
2959
  }
2844
2960
  </div>
2845
2961
  }