@acorex/platform 20.2.2 → 20.2.4-next.0
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 +9 -2
- package/core/index.d.ts +42 -57
- package/fesm2022/acorex-platform-common.mjs +17 -9
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +110 -158
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +62 -50
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +170 -23
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +1774 -989
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +186 -51
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs → acorex-platform-themes-default-entity-master-create-view.component-I7Eq8Nti.mjs} +3 -3
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-hHXxHlFG.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-I7Eq8Nti.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs → acorex-platform-themes-default-entity-master-list-view.component-ezrf2oBR.mjs} +93 -176
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-ezrf2oBR.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs → acorex-platform-themes-default-entity-master-modify-view.component-16sdMBvH.mjs} +3 -10
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-16sdMBvH.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs → acorex-platform-themes-default-entity-master-single-view.component-D8r3S2lI.mjs} +12 -7
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-D8r3S2lI.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +49 -491
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs → acorex-platform-widgets-checkbox-widget-designer.component-Cv7dEMCm.mjs} +2 -2
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-Cv7dEMCm.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-BDQIfr0g.mjs} +5 -5
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-nLZYiPnF.mjs.map → acorex-platform-widgets-tabular-data-edit-popup.component-BDQIfr0g.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs → acorex-platform-widgets-tabular-data-view-popup.component-CmPqtt0G.mjs} +3 -3
- package/fesm2022/{acorex-platform-widgets-tabular-data-view-popup.component-D6kiasYM.mjs.map → acorex-platform-widgets-tabular-data-view-popup.component-CmPqtt0G.mjs.map} +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +584 -102
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/index.d.ts +7 -3
- package/layout/components/index.d.ts +45 -6
- package/layout/entity/index.d.ts +136 -328
- package/layout/views/index.d.ts +64 -20
- package/package.json +1 -1
- package/themes/default/index.d.ts +1 -1
- package/widgets/index.d.ts +91 -4
- package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs +0 -22
- package/fesm2022/acorex-platform-themes-default-create-entity-view.component-SY0oMDoH.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-hf4QOz_4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DC3MrDtI.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-Bb90PeHq.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-checkbox-widget-designer.component-BI18uzNZ.mjs.map +0 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as i1$1 from '@acorex/components/skeleton';
|
|
2
2
|
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
3
|
+
import * as i2 from '@acorex/core/translation';
|
|
4
|
+
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
3
5
|
import { PortalModule } from '@angular/cdk/portal';
|
|
4
6
|
import * as i1 from '@angular/common';
|
|
5
7
|
import { CommonModule } from '@angular/common';
|
|
6
8
|
import * as i0 from '@angular/core';
|
|
7
9
|
import { signal, computed, Injectable, InjectionToken, inject, Injector, ChangeDetectorRef, ViewChild, Input, ChangeDetectionStrategy, Component, EventEmitter, effect, Output, input, output, ViewContainerRef, Directive, Optional, Inject, NgModule, ElementRef } from '@angular/core';
|
|
8
10
|
import { AXDataTableColumnComponent, AXBaseDataTable } from '@acorex/components/data-table';
|
|
11
|
+
import { getSmart, setSmart, AXPExpressionEvaluatorService, AXPDataSourceDefinitionProviderService, extractValue } from '@acorex/platform/core';
|
|
9
12
|
import { set, merge, cloneDeep, isNil, isEqual, get, sum, isEmpty, isString, isUndefined, isObjectLike } from 'lodash-es';
|
|
10
13
|
import { Subject, filter, BehaviorSubject } from 'rxjs';
|
|
11
|
-
import { getSmart, setSmart, AXPExpressionEvaluatorService, AXPDataSourceDefinitionProviderService, extractValue } from '@acorex/platform/core';
|
|
12
14
|
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
|
13
|
-
import { AXTranslationService } from '@acorex/core/translation';
|
|
14
15
|
import { AXUnsubscriber } from '@acorex/core/utils';
|
|
15
16
|
import { convertArrayToDataSource, AXDataSource } from '@acorex/cdk/common';
|
|
16
17
|
|
|
@@ -256,6 +257,9 @@ const AXPWidgetsCatalog = {
|
|
|
256
257
|
notification: 'notification',
|
|
257
258
|
taskList: 'task-list',
|
|
258
259
|
comment: 'comment',
|
|
260
|
+
list: 'list',
|
|
261
|
+
listToolbar: 'list-toolbar',
|
|
262
|
+
entityList: 'entity-list',
|
|
259
263
|
};
|
|
260
264
|
|
|
261
265
|
function cloneProperty(property, values) {
|
|
@@ -405,14 +409,14 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
405
409
|
},
|
|
406
410
|
],
|
|
407
411
|
});
|
|
408
|
-
this.width = this.customWidth ? this.customWidth : this.mergedOptions().width ?? '200px';
|
|
412
|
+
this.width = this.customWidth ? this.customWidth : (this.mergedOptions().width ?? '200px');
|
|
409
413
|
this.allowResizing = this.mergedOptions().allowResizing || true;
|
|
410
414
|
this.cdr.detectChanges();
|
|
411
415
|
}
|
|
412
416
|
getInputs(data) {
|
|
413
417
|
return {
|
|
414
418
|
rawValue: getSmart(data, this.node.path),
|
|
415
|
-
rowData: data
|
|
419
|
+
rowData: data,
|
|
416
420
|
};
|
|
417
421
|
}
|
|
418
422
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXPWidgetColumnRendererComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -420,63 +424,69 @@ class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
|
420
424
|
AXPLayoutBuilderService,
|
|
421
425
|
{ provide: AXDataTableColumnComponent, useExisting: AXPWidgetColumnRendererComponent },
|
|
422
426
|
], 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: `
|
|
423
|
-
<ng-template #header>{{ caption }}</ng-template>
|
|
427
|
+
<ng-template #header>{{ caption | translate | async }}</ng-template>
|
|
424
428
|
<ng-template #cell let-row>
|
|
425
429
|
<div class="ax-flex ax-gap-2 ax-items-center">
|
|
426
430
|
@if (expandHandler) {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
431
|
+
<div
|
|
432
|
+
(click)="handleExpandRow(row)"
|
|
433
|
+
class="ax-expand-handler"
|
|
434
|
+
[class.ax-invisible]="row.data.hasChild === false"
|
|
435
|
+
id="ax-expand-handler-container"
|
|
436
|
+
[style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
|
|
437
|
+
>
|
|
438
|
+
@if (loadingRow() === row) {
|
|
439
|
+
<i class="fas fa-spinner-third ax-animate-twSpin ax-animate-infinite"></i>
|
|
440
|
+
} @else {
|
|
441
|
+
@if (row.data?.__meta__?.expanded) {
|
|
442
|
+
<i [class]="customCollapseIcon || 'far fa-minus-square ax-text-md ax-opacity-75'"></i>
|
|
443
|
+
} @else {
|
|
444
|
+
<i [class]="customExpandIcon || 'far fa-plus-square ax-text-md ax-opacity-75'"></i>
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
</div>
|
|
448
|
+
}
|
|
449
|
+
@if (component && widgetInjector && row?.data) {
|
|
450
|
+
<ng-container
|
|
451
|
+
*ngComponentOutlet="component; injector: widgetInjector; inputs: getInputs(row.data)"
|
|
452
|
+
></ng-container>
|
|
446
453
|
}
|
|
447
454
|
</div>
|
|
448
455
|
</ng-template>
|
|
449
456
|
<ng-template #footer></ng-template>
|
|
450
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
457
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
451
458
|
}
|
|
452
459
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXPWidgetColumnRendererComponent, decorators: [{
|
|
453
460
|
type: Component,
|
|
454
461
|
args: [{
|
|
455
462
|
selector: 'axp-widget-column-renderer',
|
|
456
463
|
template: `
|
|
457
|
-
<ng-template #header>{{ caption }}</ng-template>
|
|
464
|
+
<ng-template #header>{{ caption | translate | async }}</ng-template>
|
|
458
465
|
<ng-template #cell let-row>
|
|
459
466
|
<div class="ax-flex ax-gap-2 ax-items-center">
|
|
460
467
|
@if (expandHandler) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
468
|
+
<div
|
|
469
|
+
(click)="handleExpandRow(row)"
|
|
470
|
+
class="ax-expand-handler"
|
|
471
|
+
[class.ax-invisible]="row.data.hasChild === false"
|
|
472
|
+
id="ax-expand-handler-container"
|
|
473
|
+
[style.padding-inline-start.rem]="row.data?.__meta__?.level * 2"
|
|
474
|
+
>
|
|
475
|
+
@if (loadingRow() === row) {
|
|
476
|
+
<i class="fas fa-spinner-third ax-animate-twSpin ax-animate-infinite"></i>
|
|
477
|
+
} @else {
|
|
478
|
+
@if (row.data?.__meta__?.expanded) {
|
|
479
|
+
<i [class]="customCollapseIcon || 'far fa-minus-square ax-text-md ax-opacity-75'"></i>
|
|
480
|
+
} @else {
|
|
481
|
+
<i [class]="customExpandIcon || 'far fa-plus-square ax-text-md ax-opacity-75'"></i>
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
</div>
|
|
485
|
+
}
|
|
486
|
+
@if (component && widgetInjector && row?.data) {
|
|
487
|
+
<ng-container
|
|
488
|
+
*ngComponentOutlet="component; injector: widgetInjector; inputs: getInputs(row.data)"
|
|
489
|
+
></ng-container>
|
|
480
490
|
}
|
|
481
491
|
</div>
|
|
482
492
|
</ng-template>
|
|
@@ -786,8 +796,10 @@ class AXPWidgetRendererDirective {
|
|
|
786
796
|
//
|
|
787
797
|
const widget = this.widgetRegistery.resolve(this.node().type);
|
|
788
798
|
//
|
|
789
|
-
const propertiesToProcess = [
|
|
790
|
-
?.
|
|
799
|
+
const propertiesToProcess = [
|
|
800
|
+
...(widget?.properties ?? []),
|
|
801
|
+
...(widget?.components[this.mode()]?.properties ?? []),
|
|
802
|
+
]?.filter((c) => c.schema.defaultValue != null);
|
|
791
803
|
// Process default values (evaluate expressions if needed)
|
|
792
804
|
const props = {};
|
|
793
805
|
for (const property of propertiesToProcess) {
|
|
@@ -1195,13 +1207,13 @@ class AXPLayoutBuilderModule {
|
|
|
1195
1207
|
});
|
|
1196
1208
|
}
|
|
1197
1209
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXPLayoutBuilderModule, deps: [{ token: 'AXPLayoutBuilderModuleFactory', optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1198
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.6", ngImport: i0, type: AXPLayoutBuilderModule, declarations: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective], imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule], exports: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective] }); }
|
|
1199
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXPLayoutBuilderModule, imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule] }); }
|
|
1210
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.6", ngImport: i0, type: AXPLayoutBuilderModule, declarations: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective], imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule], exports: [AXPWidgetContainerComponent, AXPWidgetColumnRendererComponent, AXPWidgetRendererDirective] }); }
|
|
1211
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXPLayoutBuilderModule, imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule] }); }
|
|
1200
1212
|
}
|
|
1201
1213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AXPLayoutBuilderModule, decorators: [{
|
|
1202
1214
|
type: NgModule,
|
|
1203
1215
|
args: [{
|
|
1204
|
-
imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule],
|
|
1216
|
+
imports: [CommonModule, PortalModule, AXSkeletonModule, CommonModule, AXTranslationModule],
|
|
1205
1217
|
exports: [...COMPONENTS],
|
|
1206
1218
|
declarations: [...COMPONENTS],
|
|
1207
1219
|
}]
|