@acorex/platform 20.0.0 → 20.0.2
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 +1 -0
- package/fesm2022/acorex-platform-common.mjs +3 -1
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +717 -459
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +32 -37
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BFIGLwd9.mjs +115 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BFIGLwd9.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-PKLs3XdV.mjs → acorex-platform-themes-default-entity-master-list-view.component-BuyMyK_I.mjs} +29 -7
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BuyMyK_I.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-CHHmHz2a.mjs +108 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-CHHmHz2a.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-IcmkHgp5.mjs → acorex-platform-themes-default-entity-master-single-view.component-CnjDBPeT.mjs} +6 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-CnjDBPeT.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +14 -11
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/layout/components/index.d.ts +296 -250
- package/layout/entity/index.d.ts +3 -4
- package/package.json +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-DKihQPlU.mjs +0 -112
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-DKihQPlU.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-PKLs3XdV.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DwDxUQfZ.mjs +0 -105
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DwDxUQfZ.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-IcmkHgp5.mjs.map +0 -1
|
@@ -5,10 +5,10 @@ import * as i2 from '@acorex/cdk/common';
|
|
|
5
5
|
import { AXDataSource, AXCommonModule } from '@acorex/cdk/common';
|
|
6
6
|
import { AXFormatService } from '@acorex/core/format';
|
|
7
7
|
import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingService, AXPRefreshEvent, AXPLockService, AXPCleanNestedFilters, AXPWorkflowNavigateAction, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex/platform/common';
|
|
8
|
-
import * as i2$2 from '@acorex/platform/workflow';
|
|
9
|
-
import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
10
8
|
import * as i1$4 from '@acorex/platform/core';
|
|
11
9
|
import { AXPExpressionEvaluatorService, AXPPlatformScope, extractValue, setSmart } from '@acorex/platform/core';
|
|
10
|
+
import * as i2$2 from '@acorex/platform/workflow';
|
|
11
|
+
import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
12
12
|
import * as i7 from '@acorex/platform/layout/builder';
|
|
13
13
|
import { AXPPageStatus, AXPWidgetRegistryService, AXPValueWidgetComponent, AXPLayoutBuilderModule, AXPColumnWidgetComponent, AXPWidgetsCatalog, AXPWidgetGroupEnum, AXP_WIDGETS_EDITOR_CATEGORY } from '@acorex/platform/layout/builder';
|
|
14
14
|
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
@@ -244,6 +244,7 @@ class AXPEntityDetailListViewModel {
|
|
|
244
244
|
});
|
|
245
245
|
this.evaluateExpressions = async (actionData) => {
|
|
246
246
|
const parentData = this.parent.data;
|
|
247
|
+
console.log({ actionData, parentData });
|
|
247
248
|
const scope = {
|
|
248
249
|
context: {
|
|
249
250
|
eval: (path) => {
|
|
@@ -284,18 +285,19 @@ class AXPEntityDetailListViewModel {
|
|
|
284
285
|
// }
|
|
285
286
|
this.applyFilterAndSort();
|
|
286
287
|
}
|
|
287
|
-
applyFilterAndSort() {
|
|
288
|
+
async applyFilterAndSort() {
|
|
288
289
|
this.dataSource.clearFilter();
|
|
289
290
|
//
|
|
290
291
|
//this.dataSource.sort(...this.detailEntity.().map(s => ({ dir: s.dir, field: s.name } as AXDataSourceSortOption)));
|
|
291
292
|
//
|
|
292
|
-
const parentFilters = this.detailEntityConfig.conditions?.map((c) => {
|
|
293
|
+
const parentFilters = (await Promise.all(this.detailEntityConfig.conditions?.map(async (c) => {
|
|
293
294
|
return {
|
|
294
295
|
field: c.name,
|
|
295
296
|
operator: c.operator,
|
|
296
|
-
value: this.parent.data?.id,
|
|
297
|
+
// value: this.parent.data?.id,
|
|
298
|
+
value: await this.evaluateExpressions(c.value),
|
|
297
299
|
};
|
|
298
|
-
}) ?? [];
|
|
300
|
+
}) ?? [])) ?? [];
|
|
299
301
|
const parentFilterWrapper = {
|
|
300
302
|
field: null,
|
|
301
303
|
logic: 'and',
|
|
@@ -1220,18 +1222,6 @@ class AXPEntityMasterListViewModel {
|
|
|
1220
1222
|
resetSorts() {
|
|
1221
1223
|
this.applyViewSorts();
|
|
1222
1224
|
}
|
|
1223
|
-
applySorts() {
|
|
1224
|
-
this.applyFilterAndSort();
|
|
1225
|
-
}
|
|
1226
|
-
addSort() {
|
|
1227
|
-
const prop = this.sortableFields().find((c) => !this.sortedFields().some((s) => s.name == c.name));
|
|
1228
|
-
if (prop) {
|
|
1229
|
-
this.sortedFields.set([...this.sortedFields(), ...[prop]]);
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
removeSort(name) {
|
|
1233
|
-
this.sortedFields.set(this.sortedFields().filter((c) => c.name != name));
|
|
1234
|
-
}
|
|
1235
1225
|
applyViewSorts() {
|
|
1236
1226
|
const viewSorts = this.view().sorts;
|
|
1237
1227
|
this.sortedFields.update((prev) => {
|
|
@@ -1249,8 +1239,7 @@ class AXPEntityMasterListViewModel {
|
|
|
1249
1239
|
async executeCommand(commandName, data = null) {
|
|
1250
1240
|
const action = this.allActions().find((c) => {
|
|
1251
1241
|
return (c.name == commandName &&
|
|
1252
|
-
((this.selectedItems().length
|
|
1253
|
-
&& !data // added by Arash
|
|
1242
|
+
((this.selectedItems().length && !data // added by Arash
|
|
1254
1243
|
? c.scope == AXPEntityCommandScope.Selected
|
|
1255
1244
|
: c.scope == AXPEntityCommandScope.Individual) ||
|
|
1256
1245
|
c.scope == AXPEntityCommandScope.TypeLevel));
|
|
@@ -1317,6 +1306,21 @@ const AXPEntityListViewModelResolver = (route, state, service = inject(AXPEntity
|
|
|
1317
1306
|
return service.create(moduleName, entityName);
|
|
1318
1307
|
};
|
|
1319
1308
|
|
|
1309
|
+
class AXPEntityService {
|
|
1310
|
+
constructor() {
|
|
1311
|
+
this.sessionService = inject(AXPSessionService);
|
|
1312
|
+
}
|
|
1313
|
+
createPath(module, entity, path = 'list') {
|
|
1314
|
+
return `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${path}`;
|
|
1315
|
+
}
|
|
1316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1317
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
|
|
1318
|
+
}
|
|
1319
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPEntityService, decorators: [{
|
|
1320
|
+
type: Injectable,
|
|
1321
|
+
args: [{ providedIn: 'root' }]
|
|
1322
|
+
}] });
|
|
1323
|
+
|
|
1320
1324
|
const AXPEntityDeletedEvent = createWorkFlowEvent('[Entity] Deleted');
|
|
1321
1325
|
class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
1322
1326
|
constructor() {
|
|
@@ -1796,6 +1800,7 @@ class AXPEntityMasterSingleViewModel {
|
|
|
1796
1800
|
this.workflow = this.injector.get(AXPWorkflowService);
|
|
1797
1801
|
this.destroyed = new Subject();
|
|
1798
1802
|
this.translateService = this.injector.get(AXTranslationService);
|
|
1803
|
+
this.entityService = this.injector.get(AXPEntityService);
|
|
1799
1804
|
this.context = signal(cloneDeep(this.entityData));
|
|
1800
1805
|
this.actions = computed(() => {
|
|
1801
1806
|
return (this.entityDef.interfaces?.master?.single?.actions?.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? []);
|
|
@@ -1870,6 +1875,13 @@ class AXPEntityMasterSingleViewModel {
|
|
|
1870
1875
|
}
|
|
1871
1876
|
});
|
|
1872
1877
|
}
|
|
1878
|
+
navigateToUp() {
|
|
1879
|
+
this.workflow.execute('navigate', {
|
|
1880
|
+
options: {
|
|
1881
|
+
path: this.entityService.createPath(this.entityDef.module, this.entityDef.name),
|
|
1882
|
+
},
|
|
1883
|
+
});
|
|
1884
|
+
}
|
|
1873
1885
|
async executeCommand(commandName, data = null) {
|
|
1874
1886
|
//TODO: syntact for workflow
|
|
1875
1887
|
switch (commandName) {
|
|
@@ -3823,7 +3835,6 @@ class AXPEntityModule {
|
|
|
3823
3835
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$4.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3824
3836
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.4", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$2.AXPWorkflowModule, i7.AXPLayoutBuilderModule] }); }
|
|
3825
3837
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPEntityModule, providers: [
|
|
3826
|
-
// CUSTOMER_MODIFIER_PROVIDER,
|
|
3827
3838
|
{
|
|
3828
3839
|
provide: ROUTES,
|
|
3829
3840
|
multi: true,
|
|
@@ -3910,7 +3921,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
3910
3921
|
exports: [],
|
|
3911
3922
|
declarations: [],
|
|
3912
3923
|
providers: [
|
|
3913
|
-
// CUSTOMER_MODIFIER_PROVIDER,
|
|
3914
3924
|
{
|
|
3915
3925
|
provide: ROUTES,
|
|
3916
3926
|
multi: true,
|
|
@@ -3930,21 +3940,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
3930
3940
|
}]
|
|
3931
3941
|
}], ctorParameters: () => [{ type: i1$4.AXPAppStartUpService }, { type: i0.Injector }] });
|
|
3932
3942
|
|
|
3933
|
-
class AXPEntityService {
|
|
3934
|
-
constructor() {
|
|
3935
|
-
this.sessionService = inject(AXPSessionService);
|
|
3936
|
-
}
|
|
3937
|
-
createPath(module, entity, path = 'list') {
|
|
3938
|
-
return `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${path}`;
|
|
3939
|
-
}
|
|
3940
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3941
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
|
|
3942
|
-
}
|
|
3943
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: AXPEntityService, decorators: [{
|
|
3944
|
-
type: Injectable,
|
|
3945
|
-
args: [{ providedIn: 'root' }]
|
|
3946
|
-
}] });
|
|
3947
|
-
|
|
3948
3943
|
/**
|
|
3949
3944
|
* Generated bundle index. Do not edit.
|
|
3950
3945
|
*/
|