@acorex/platform 20.0.1 → 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.
|
@@ -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',
|