@acorex/platform 21.0.0-next.44 → 21.0.0-next.45

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 (26) hide show
  1. package/fesm2022/{acorex-platform-common-common-settings.provider-lWz_f-Ia.mjs → acorex-platform-common-common-settings.provider-CsOyxClO.mjs} +17 -3
  2. package/fesm2022/acorex-platform-common-common-settings.provider-CsOyxClO.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-common.mjs +204 -164
  4. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  5. package/fesm2022/acorex-platform-core.mjs +5 -4
  6. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-layout-entity.mjs +381 -49
  8. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-layout-views.mjs +5 -3
  10. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-widget-core.mjs +72 -6
  12. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-widgets.mjs +109 -131
  14. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-themes-default.mjs +71 -5
  16. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-workflow.mjs +85 -4
  18. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  19. package/package.json +1 -1
  20. package/types/acorex-platform-common.d.ts +64 -47
  21. package/types/acorex-platform-layout-entity.d.ts +79 -4
  22. package/types/acorex-platform-layout-widget-core.d.ts +15 -0
  23. package/types/acorex-platform-layout-widgets.d.ts +15 -19
  24. package/types/acorex-platform-themes-default.d.ts +6 -0
  25. package/types/acorex-platform-workflow.d.ts +68 -2
  26. package/fesm2022/acorex-platform-common-common-settings.provider-lWz_f-Ia.mjs.map +0 -1
@@ -411,7 +411,7 @@ class AXPBaseWidgetComponent extends AXPWidgetCoreElement {
411
411
  output(name) {
412
412
  const outputs = this.outputs().map((c) => (typeof c == 'string' ? { name: c, value: c } : c));
413
413
  if (outputs.some((c) => c.name == name)) {
414
- const opt = get(this, name);
414
+ const opt = outputs.find((c) => c.name == name)?.value;
415
415
  if (typeof opt == 'function') {
416
416
  return opt();
417
417
  }
@@ -1201,6 +1201,56 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1201
1201
  get renderHeaderTemplate() {
1202
1202
  return this.headerTemplate ?? this._contentHeaderTemplate;
1203
1203
  }
1204
+ //#region ---- Column alignment (header / cell) ----
1205
+ /**
1206
+ * Resolves `options.align`: string applies to header and cell; object uses optional `header` / `cell` (default start).
1207
+ * Supports designer select values `{ id: 'center' }`.
1208
+ */
1209
+ getHeaderTextAlign() {
1210
+ return this.resolveAlignForSide('header');
1211
+ }
1212
+ /**
1213
+ * When true, the cell body uses flex so `justify-content` can place content on the main axis.
1214
+ */
1215
+ getCellUseFlexLayout() {
1216
+ return !!this.expandHandler || this.resolveAlignForSide('cell') !== 'start';
1217
+ }
1218
+ /**
1219
+ * Flex `justify-content` for the cell wrapper; omit when not using flex layout.
1220
+ */
1221
+ getCellJustifyContent() {
1222
+ if (!this.getCellUseFlexLayout()) {
1223
+ return null;
1224
+ }
1225
+ return this.resolveAlignForSide('cell');
1226
+ }
1227
+ resolveAlignForSide(side) {
1228
+ const align = this.mergedOptions().align;
1229
+ if (align == null || align === '') {
1230
+ return 'start';
1231
+ }
1232
+ if (typeof align === 'string') {
1233
+ return this.normalizeColumnAlignment(align);
1234
+ }
1235
+ if (typeof align === 'object' && !Array.isArray(align)) {
1236
+ const raw = side === 'header' ? align.header : align.cell;
1237
+ return this.normalizeColumnAlignment(raw);
1238
+ }
1239
+ return 'start';
1240
+ }
1241
+ normalizeColumnAlignment(value) {
1242
+ if (value === 'center' || value === 'end' || value === 'start') {
1243
+ return value;
1244
+ }
1245
+ if (value && typeof value === 'object' && 'id' in value) {
1246
+ const id = value.id;
1247
+ if (id === 'center' || id === 'end' || id === 'start') {
1248
+ return id;
1249
+ }
1250
+ }
1251
+ return 'start';
1252
+ }
1253
+ //#endregion
1204
1254
  get loadingEnabled() {
1205
1255
  return true;
1206
1256
  }
@@ -1406,9 +1456,17 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1406
1456
  AXPWidgetCoreService,
1407
1457
  { provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
1408
1458
  ], viewQueries: [{ propertyName: "_contentFooterTemplate", first: true, predicate: ["footer"], descendants: true }, { propertyName: "_contentCellTemplate", first: true, predicate: ["cell"], descendants: true }, { propertyName: "_contentHeaderTemplate", first: true, predicate: ["header"], descendants: true }], usesInheritance: true, ngImport: i0, template: `
1409
- <ng-template #header>{{ caption | translate | async }}</ng-template>
1459
+ <ng-template #header>
1460
+ <div class="ax-w-full" [style.text-align]="getHeaderTextAlign()">{{ caption | translate | async }}</div>
1461
+ </ng-template>
1410
1462
  <ng-template #cell let-row>
1411
- <div [class]="expandHandler ? 'ax-flex ax-gap-2 ax-items-center' : ''">
1463
+ <div
1464
+ class="ax-w-full"
1465
+ [class.ax-flex]="getCellUseFlexLayout()"
1466
+ [class.ax-gap-2]="expandHandler"
1467
+ [class.ax-items-center]="getCellUseFlexLayout()"
1468
+ [style.justify-content]="getCellJustifyContent()"
1469
+ >
1412
1470
  @if (expandHandler) {
1413
1471
  <div
1414
1472
  (click)="handleExpandRow(row)"
@@ -1443,9 +1501,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1443
1501
  args: [{
1444
1502
  selector: 'axp-widget-column-renderer',
1445
1503
  template: `
1446
- <ng-template #header>{{ caption | translate | async }}</ng-template>
1504
+ <ng-template #header>
1505
+ <div class="ax-w-full" [style.text-align]="getHeaderTextAlign()">{{ caption | translate | async }}</div>
1506
+ </ng-template>
1447
1507
  <ng-template #cell let-row>
1448
- <div [class]="expandHandler ? 'ax-flex ax-gap-2 ax-items-center' : ''">
1508
+ <div
1509
+ class="ax-w-full"
1510
+ [class.ax-flex]="getCellUseFlexLayout()"
1511
+ [class.ax-gap-2]="expandHandler"
1512
+ [class.ax-items-center]="getCellUseFlexLayout()"
1513
+ [style.justify-content]="getCellJustifyContent()"
1514
+ >
1449
1515
  @if (expandHandler) {
1450
1516
  <div
1451
1517
  (click)="handleExpandRow(row)"
@@ -2454,7 +2520,7 @@ class AXPWidgetRendererDirective {
2454
2520
  }
2455
2521
  },
2456
2522
  output: (name) => {
2457
- this.instance.output(name);
2523
+ return this.instance.output(name);
2458
2524
  },
2459
2525
  find: (id) => {
2460
2526
  return this.builderService.getWidget(id);