@acorex/platform 20.8.5 → 20.8.7
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.
- package/common/index.d.ts +17 -2
- package/fesm2022/{acorex-platform-common-common-settings.provider-41RhWqb4.mjs → acorex-platform-common-common-settings.provider-DqdSjjp6.mjs} +15 -1
- package/fesm2022/acorex-platform-common-common-settings.provider-DqdSjjp6.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +3 -2
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +78 -2
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +70 -4
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +50 -7
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs → acorex-platform-themes-default-entity-master-list-view.component-DZeByyDy.mjs} +3 -3
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CLDoygoI.mjs.map → acorex-platform-themes-default-entity-master-list-view.component-DZeByyDy.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +5 -4
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/layout/entity/index.d.ts +18 -0
- package/layout/widget-core/index.d.ts +15 -0
- package/layout/widgets/index.d.ts +5 -2
- package/package.json +16 -16
- package/fesm2022/acorex-platform-common-common-settings.provider-41RhWqb4.mjs.map +0 -1
|
@@ -1268,6 +1268,56 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1268
1268
|
get renderHeaderTemplate() {
|
|
1269
1269
|
return this.headerTemplate ?? this._contentHeaderTemplate;
|
|
1270
1270
|
}
|
|
1271
|
+
//#region ---- Column alignment (header / cell) ----
|
|
1272
|
+
/**
|
|
1273
|
+
* Resolves `options.align`: string applies to header and cell; object uses optional `header` / `cell` (default start).
|
|
1274
|
+
* Supports designer select values `{ id: 'center' }`.
|
|
1275
|
+
*/
|
|
1276
|
+
getHeaderTextAlign() {
|
|
1277
|
+
return this.resolveAlignForSide('header');
|
|
1278
|
+
}
|
|
1279
|
+
/**
|
|
1280
|
+
* When true, the cell body uses flex so `justify-content` can place content on the main axis.
|
|
1281
|
+
*/
|
|
1282
|
+
getCellUseFlexLayout() {
|
|
1283
|
+
return !!this.expandHandler || this.resolveAlignForSide('cell') !== 'start';
|
|
1284
|
+
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Flex `justify-content` for the cell wrapper; omit when not using flex layout.
|
|
1287
|
+
*/
|
|
1288
|
+
getCellJustifyContent() {
|
|
1289
|
+
if (!this.getCellUseFlexLayout()) {
|
|
1290
|
+
return null;
|
|
1291
|
+
}
|
|
1292
|
+
return this.resolveAlignForSide('cell');
|
|
1293
|
+
}
|
|
1294
|
+
resolveAlignForSide(side) {
|
|
1295
|
+
const align = this.mergedOptions().align;
|
|
1296
|
+
if (align == null || align === '') {
|
|
1297
|
+
return 'start';
|
|
1298
|
+
}
|
|
1299
|
+
if (typeof align === 'string') {
|
|
1300
|
+
return this.normalizeColumnAlignment(align);
|
|
1301
|
+
}
|
|
1302
|
+
if (typeof align === 'object' && !Array.isArray(align)) {
|
|
1303
|
+
const raw = side === 'header' ? align.header : align.cell;
|
|
1304
|
+
return this.normalizeColumnAlignment(raw);
|
|
1305
|
+
}
|
|
1306
|
+
return 'start';
|
|
1307
|
+
}
|
|
1308
|
+
normalizeColumnAlignment(value) {
|
|
1309
|
+
if (value === 'center' || value === 'end' || value === 'start') {
|
|
1310
|
+
return value;
|
|
1311
|
+
}
|
|
1312
|
+
if (value && typeof value === 'object' && 'id' in value) {
|
|
1313
|
+
const id = value.id;
|
|
1314
|
+
if (id === 'center' || id === 'end' || id === 'start') {
|
|
1315
|
+
return id;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
return 'start';
|
|
1319
|
+
}
|
|
1320
|
+
//#endregion
|
|
1271
1321
|
get loadingEnabled() {
|
|
1272
1322
|
return true;
|
|
1273
1323
|
}
|
|
@@ -1469,9 +1519,17 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
1469
1519
|
AXPWidgetCoreService,
|
|
1470
1520
|
{ provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
|
|
1471
1521
|
], 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: `
|
|
1472
|
-
<ng-template #header>
|
|
1522
|
+
<ng-template #header>
|
|
1523
|
+
<div class="ax-w-full" [style.text-align]="getHeaderTextAlign()">{{ caption | translate | async }}</div>
|
|
1524
|
+
</ng-template>
|
|
1473
1525
|
<ng-template #cell let-row>
|
|
1474
|
-
<div
|
|
1526
|
+
<div
|
|
1527
|
+
class="ax-w-full"
|
|
1528
|
+
[class.ax-flex]="getCellUseFlexLayout()"
|
|
1529
|
+
[class.ax-gap-2]="expandHandler"
|
|
1530
|
+
[class.ax-items-center]="getCellUseFlexLayout()"
|
|
1531
|
+
[style.justify-content]="getCellJustifyContent()"
|
|
1532
|
+
>
|
|
1475
1533
|
@if (expandHandler) {
|
|
1476
1534
|
<div
|
|
1477
1535
|
(click)="handleExpandRow(row)"
|
|
@@ -1506,9 +1564,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImpo
|
|
|
1506
1564
|
args: [{
|
|
1507
1565
|
selector: 'axp-widget-column-renderer',
|
|
1508
1566
|
template: `
|
|
1509
|
-
<ng-template #header>
|
|
1567
|
+
<ng-template #header>
|
|
1568
|
+
<div class="ax-w-full" [style.text-align]="getHeaderTextAlign()">{{ caption | translate | async }}</div>
|
|
1569
|
+
</ng-template>
|
|
1510
1570
|
<ng-template #cell let-row>
|
|
1511
|
-
<div
|
|
1571
|
+
<div
|
|
1572
|
+
class="ax-w-full"
|
|
1573
|
+
[class.ax-flex]="getCellUseFlexLayout()"
|
|
1574
|
+
[class.ax-gap-2]="expandHandler"
|
|
1575
|
+
[class.ax-items-center]="getCellUseFlexLayout()"
|
|
1576
|
+
[style.justify-content]="getCellJustifyContent()"
|
|
1577
|
+
>
|
|
1512
1578
|
@if (expandHandler) {
|
|
1513
1579
|
<div
|
|
1514
1580
|
(click)="handleExpandRow(row)"
|