@acorex/platform 21.0.0-beta.7 → 21.0.0-beta.9

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 (31) hide show
  1. package/fesm2022/acorex-platform-auth.mjs +4 -0
  2. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  3. package/fesm2022/{acorex-platform-common-common-settings.provider-lWz_f-Ia.mjs → acorex-platform-common-common-settings.provider-Bi1RYif5.mjs} +41 -3
  4. package/fesm2022/acorex-platform-common-common-settings.provider-Bi1RYif5.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-common.mjs +205 -164
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +5 -4
  8. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-layout-components.mjs +2 -2
  10. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-entity.mjs +952 -64
  12. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-views.mjs +7 -5
  14. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-layout-widget-core.mjs +72 -6
  16. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-widgets.mjs +114 -136
  18. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-themes-default.mjs +119 -13
  20. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-workflow.mjs +85 -4
  22. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  23. package/package.json +6 -6
  24. package/types/acorex-platform-common.d.ts +66 -48
  25. package/types/acorex-platform-core.d.ts +1 -1
  26. package/types/acorex-platform-layout-entity.d.ts +245 -8
  27. package/types/acorex-platform-layout-widget-core.d.ts +15 -0
  28. package/types/acorex-platform-layout-widgets.d.ts +15 -19
  29. package/types/acorex-platform-themes-default.d.ts +8 -0
  30. package/types/acorex-platform-workflow.d.ts +68 -2
  31. 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
  }
@@ -1414,9 +1464,17 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
1414
1464
  AXPWidgetCoreService,
1415
1465
  { provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
1416
1466
  ], 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: `
1417
- <ng-template #header>{{ caption | translate | async }}</ng-template>
1467
+ <ng-template #header>
1468
+ <div class="w-full" [style.text-align]="getHeaderTextAlign()">{{ caption | translate | async }}</div>
1469
+ </ng-template>
1418
1470
  <ng-template #cell let-row>
1419
- <div [class]="expandHandler ? 'flex gap-2 items-center' : ''">
1471
+ <div
1472
+ class="w-full"
1473
+ [class.flex]="getCellUseFlexLayout()"
1474
+ [class.gap-2]="expandHandler"
1475
+ [class.items-center]="getCellUseFlexLayout()"
1476
+ [style.justify-content]="getCellJustifyContent()"
1477
+ >
1420
1478
  @if (expandHandler) {
1421
1479
  <div
1422
1480
  (click)="handleExpandRow(row)"
@@ -1451,9 +1509,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1451
1509
  args: [{
1452
1510
  selector: 'axp-widget-column-renderer',
1453
1511
  template: `
1454
- <ng-template #header>{{ caption | translate | async }}</ng-template>
1512
+ <ng-template #header>
1513
+ <div class="w-full" [style.text-align]="getHeaderTextAlign()">{{ caption | translate | async }}</div>
1514
+ </ng-template>
1455
1515
  <ng-template #cell let-row>
1456
- <div [class]="expandHandler ? 'flex gap-2 items-center' : ''">
1516
+ <div
1517
+ class="w-full"
1518
+ [class.flex]="getCellUseFlexLayout()"
1519
+ [class.gap-2]="expandHandler"
1520
+ [class.items-center]="getCellUseFlexLayout()"
1521
+ [style.justify-content]="getCellJustifyContent()"
1522
+ >
1457
1523
  @if (expandHandler) {
1458
1524
  <div
1459
1525
  (click)="handleExpandRow(row)"
@@ -2462,7 +2528,7 @@ class AXPWidgetRendererDirective {
2462
2528
  }
2463
2529
  },
2464
2530
  output: (name) => {
2465
- this.instance.output(name);
2531
+ return this.instance.output(name);
2466
2532
  },
2467
2533
  find: (id) => {
2468
2534
  return this.builderService.getWidget(id);