@acorex/platform 19.4.4 → 19.4.6
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/core/lib/types/core.types.d.ts +13 -0
- package/core/lib/types/file.types.d.ts +13 -0
- package/core/lib/types/index.d.ts +1 -0
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +2 -3
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +96 -4
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +3 -3
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets-file-list-popup.component-TNxbcVav.mjs +68 -0
- package/fesm2022/acorex-platform-widgets-file-list-popup.component-TNxbcVav.mjs.map +1 -0
- package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-9XMpubtr.mjs → acorex-platform-widgets-page-widget-designer.component-DuKrIkHh.mjs} +2 -1
- package/fesm2022/{acorex-platform-widgets-page-widget-designer.component-9XMpubtr.mjs.map → acorex-platform-widgets-page-widget-designer.component-DuKrIkHh.mjs.map} +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +554 -947
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +6 -2
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/lib/builder/widget-map.d.ts +2 -3
- package/layout/entity/lib/entity-master-list.viewmodel.d.ts +1 -0
- package/layout/entity/lib/workflows/show-file-uploader-popup.workflow.d.ts +10 -0
- package/package.json +12 -12
- package/widgets/lib/properties/layout.props.d.ts +1 -0
- package/widgets/lib/widgets/advance/file-uploader/file-list/file-list.component.d.ts +7 -4
- package/widgets/lib/widgets/advance/file-uploader/file-list-popup/file-list-popup.component.d.ts +17 -0
- package/widgets/lib/widgets/advance/file-uploader/file-uploader-widget-column.component.d.ts +3 -3
- package/widgets/lib/widgets/advance/file-uploader/file-uploader-widget-edit.component.d.ts +6 -1
- package/widgets/lib/widgets/advance/file-uploader/file-uploader-widget-view.component.d.ts +3 -1
- package/widgets/lib/widgets/advance/file-uploader/file-uploader-widget.service.d.ts +13 -11
- package/widgets/lib/widgets/advance/map/map-box-widget-edit.component.d.ts +0 -1
- package/widgets/lib/widgets/index.d.ts +2 -2
- package/widgets/lib/widgets/layout/block/block-widget-view.component.d.ts +0 -2
- package/widgets/lib/widgets/layout/block/block-widget.config.d.ts +1 -0
- package/widgets/lib/widgets/layout/flex/flex-widget-designer.component.d.ts +10 -0
- package/widgets/lib/widgets/layout/flex/flex-widget-view.component.d.ts +10 -0
- package/widgets/lib/widgets/layout/flex/flex-widget.config.d.ts +28 -0
- package/widgets/lib/widgets/layout/flex/index.d.ts +3 -0
- package/widgets/lib/widgets/layout/grid/grid-widget-view.component.d.ts +6 -1
- package/widgets/lib/widgets/property-editors/direction/direction-widget-editor.component.d.ts +13 -0
- package/widgets/lib/widgets/{advance/file/file-box-widget.config.d.ts → property-editors/direction/direction-widget.config.d.ts} +2 -2
- package/widgets/lib/widgets/property-editors/direction/index.d.ts +2 -0
- package/widgets/lib/widgets/property-editors/spacing/spacing-widget-editor.component.d.ts +1 -1
- package/workflow/index.d.ts +1 -0
- package/workflow/lib/task-board.types.d.ts +21 -0
- package/widgets/lib/widgets/advance/file/file-box-widget-column.component.d.ts +0 -6
- package/widgets/lib/widgets/advance/file/file-box-widget-edit.component.d.ts +0 -33
- package/widgets/lib/widgets/advance/file/file-box-widget-filter.component.d.ts +0 -6
- package/widgets/lib/widgets/advance/file/file-box-widget-print.component.d.ts +0 -6
- package/widgets/lib/widgets/advance/file/file-box-widget-view.component.d.ts +0 -31
- package/widgets/lib/widgets/advance/file/file-box-widget.service.d.ts +0 -12
- package/widgets/lib/widgets/advance/file/index.d.ts +0 -7
- package/widgets/lib/widgets/editors/single-file-box/index.d.ts +0 -6
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-column.component.d.ts +0 -6
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-edit.component.d.ts +0 -19
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-filter.component.d.ts +0 -6
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-print.component.d.ts +0 -6
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget-view.component.d.ts +0 -8
- package/widgets/lib/widgets/editors/single-file-box/single-file-box-widget.config.d.ts +0 -9
|
@@ -44,7 +44,7 @@ import { AXDropdownButtonModule } from '@acorex/components/dropdown-button';
|
|
|
44
44
|
import { AXBasePageComponent } from '@acorex/components/page';
|
|
45
45
|
import * as i6 from '@acorex/components/search-box';
|
|
46
46
|
import { AXSearchBoxModule } from '@acorex/components/search-box';
|
|
47
|
-
import { AXP_DISABLED_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_ALLOW_MULTIPLE_PROPERTY, AXP_NAME_PROPERTY } from '@acorex/platform/widgets';
|
|
47
|
+
import { AXP_DISABLED_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_ALLOW_MULTIPLE_PROPERTY, AXP_NAME_PROPERTY, AXPFileUploaderWidgetService } from '@acorex/platform/widgets';
|
|
48
48
|
import * as i5$1 from '@acorex/components/select-box';
|
|
49
49
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
50
50
|
import * as i2$1 from '@acorex/components/text-box';
|
|
@@ -399,7 +399,7 @@ class AXPEntityDefinitionRegistryService {
|
|
|
399
399
|
*/
|
|
400
400
|
register(config) {
|
|
401
401
|
const key = this.createEntityKey(config.module, config.name);
|
|
402
|
-
this.entities.set(key,
|
|
402
|
+
this.entities.set(key, config);
|
|
403
403
|
}
|
|
404
404
|
/**
|
|
405
405
|
* Returns an array of all registered entity configurations.
|
|
@@ -426,7 +426,9 @@ class AXPEntityDefinitionRegistryService {
|
|
|
426
426
|
try {
|
|
427
427
|
config = await this.entityResolver.get(moduleName, entityName);
|
|
428
428
|
if (config) {
|
|
429
|
-
this.
|
|
429
|
+
const processedConfig = this.middleware.process(config);
|
|
430
|
+
this.register(processedConfig);
|
|
431
|
+
return processedConfig;
|
|
430
432
|
}
|
|
431
433
|
}
|
|
432
434
|
catch (error) {
|
|
@@ -777,6 +779,16 @@ class AXPEntityMasterListViewModel {
|
|
|
777
779
|
return this.sortedFields().filter((i) => i.dir).length;
|
|
778
780
|
};
|
|
779
781
|
this.sortedFields = signal([]);
|
|
782
|
+
this.evaluateExpressions = async (options, data) => {
|
|
783
|
+
const scope = {
|
|
784
|
+
context: {
|
|
785
|
+
eval: (path) => {
|
|
786
|
+
return get(data, path);
|
|
787
|
+
},
|
|
788
|
+
},
|
|
789
|
+
};
|
|
790
|
+
return await this.expressionEvaluator.evaluate(options, scope);
|
|
791
|
+
};
|
|
780
792
|
this.workflow.events$
|
|
781
793
|
.pipe(ofType(AXPRefreshEvent))
|
|
782
794
|
.pipe(takeUntil(this.destroyed))
|
|
@@ -1023,6 +1035,7 @@ class AXPEntityMasterListViewModel {
|
|
|
1023
1035
|
c.scope == AXPEntityCommandScope.TypeLevel));
|
|
1024
1036
|
});
|
|
1025
1037
|
const command = commandName.split('&')[0];
|
|
1038
|
+
const options = await this.evaluateExpressions(action?.options, data);
|
|
1026
1039
|
await this.workflow.execute(command, {
|
|
1027
1040
|
entity: getEntityInfo(this.entityDef).source,
|
|
1028
1041
|
entityInfo: {
|
|
@@ -1033,7 +1046,7 @@ class AXPEntityMasterListViewModel {
|
|
|
1033
1046
|
source: this.entityDef.source,
|
|
1034
1047
|
},
|
|
1035
1048
|
data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
|
|
1036
|
-
options:
|
|
1049
|
+
options: options,
|
|
1037
1050
|
metadata: action?.metadata,
|
|
1038
1051
|
});
|
|
1039
1052
|
}
|
|
@@ -3414,6 +3427,81 @@ const AXPShowListViewWorkflow = {
|
|
|
3414
3427
|
},
|
|
3415
3428
|
};
|
|
3416
3429
|
|
|
3430
|
+
class AXPShowFileUploaderPopupAction extends AXPWorkflowAction {
|
|
3431
|
+
constructor() {
|
|
3432
|
+
super(...arguments);
|
|
3433
|
+
this.fileUploaderWidgetService = inject(AXPFileUploaderWidgetService);
|
|
3434
|
+
this.entityRegistryService = inject(AXPEntityDefinitionRegistryService);
|
|
3435
|
+
}
|
|
3436
|
+
async execute(context) {
|
|
3437
|
+
debugger;
|
|
3438
|
+
const key = context.getVariable('options.key');
|
|
3439
|
+
const files = context.getVariable('options.files');
|
|
3440
|
+
const readOnly = context.getVariable('options.readOnly');
|
|
3441
|
+
const multiple = context.getVariable('options.multiple');
|
|
3442
|
+
const accept = context.getVariable('options.accept');
|
|
3443
|
+
const res = await this.fileUploaderWidgetService.showFileList({
|
|
3444
|
+
files: files,
|
|
3445
|
+
readOnly: readOnly,
|
|
3446
|
+
multiple: multiple,
|
|
3447
|
+
accept: accept,
|
|
3448
|
+
});
|
|
3449
|
+
if ((res?.length ?? 0) === 0) {
|
|
3450
|
+
context.setOutput('result', false);
|
|
3451
|
+
return;
|
|
3452
|
+
}
|
|
3453
|
+
const [module, entity] = context.getVariable('entity').split('.');
|
|
3454
|
+
const entityDefinition = await this.entityRegistryService.resolve(module, entity);
|
|
3455
|
+
if (entityDefinition) {
|
|
3456
|
+
const updateExec = entityDefinition.commands?.update?.execute;
|
|
3457
|
+
const entityData = await updateExec({
|
|
3458
|
+
id: context.getVariable('options.id'),
|
|
3459
|
+
[key]: res,
|
|
3460
|
+
});
|
|
3461
|
+
context.setOutput('result', true);
|
|
3462
|
+
context.setVariable('data', cloneDeep(entityData));
|
|
3463
|
+
}
|
|
3464
|
+
}
|
|
3465
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPShowFileUploaderPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3466
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPShowFileUploaderPopupAction }); }
|
|
3467
|
+
}
|
|
3468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPShowFileUploaderPopupAction, decorators: [{
|
|
3469
|
+
type: Injectable
|
|
3470
|
+
}] });
|
|
3471
|
+
const AXPShowFileUploaderPopupWorkflow = {
|
|
3472
|
+
startStepId: 'show-popup',
|
|
3473
|
+
steps: {
|
|
3474
|
+
'show-popup': {
|
|
3475
|
+
action: 'AXPShowFileUploaderPopupAction',
|
|
3476
|
+
nextSteps: [
|
|
3477
|
+
{
|
|
3478
|
+
conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
|
|
3479
|
+
nextStepId: 'successToast',
|
|
3480
|
+
},
|
|
3481
|
+
],
|
|
3482
|
+
},
|
|
3483
|
+
successToast: {
|
|
3484
|
+
id: 'successToast',
|
|
3485
|
+
action: 'AXPToastAction',
|
|
3486
|
+
input: {
|
|
3487
|
+
color: 'success',
|
|
3488
|
+
title: 'workflow.entity-modified-title',
|
|
3489
|
+
content: 'workflow.entity-modified-body',
|
|
3490
|
+
},
|
|
3491
|
+
nextSteps: [
|
|
3492
|
+
{
|
|
3493
|
+
conditions: [],
|
|
3494
|
+
nextStepId: 'modifyConfirmed',
|
|
3495
|
+
},
|
|
3496
|
+
],
|
|
3497
|
+
},
|
|
3498
|
+
modifyConfirmed: {
|
|
3499
|
+
id: 'modifyConfirmed',
|
|
3500
|
+
action: 'AXPEntityModifyConfirmedAction',
|
|
3501
|
+
},
|
|
3502
|
+
},
|
|
3503
|
+
};
|
|
3504
|
+
|
|
3417
3505
|
function routesFacory() {
|
|
3418
3506
|
const config = inject(AXP_ENTITY_CONFIG_TOKEN);
|
|
3419
3507
|
let routes = [];
|
|
@@ -3513,6 +3601,7 @@ class AXPEntityModule {
|
|
|
3513
3601
|
AXPEntityCreateSubmittedAction,
|
|
3514
3602
|
AXPShowListViewAction,
|
|
3515
3603
|
'entity-apply-updates': AXPEntityApplyUpdatesAction,
|
|
3604
|
+
AXPShowFileUploaderPopupAction,
|
|
3516
3605
|
},
|
|
3517
3606
|
workflows: {
|
|
3518
3607
|
'create-entity': AXPCreateEntityWorkflow,
|
|
@@ -3521,6 +3610,7 @@ class AXPEntityModule {
|
|
|
3521
3610
|
'quick-modify-entity': AXPQuickModifyEntityWorkflow,
|
|
3522
3611
|
'open-entity': AXPShowDetailsViewWorkflow,
|
|
3523
3612
|
'show-list-view': AXPShowListViewWorkflow,
|
|
3613
|
+
'show-file-uploader-popup': AXPShowFileUploaderPopupWorkflow,
|
|
3524
3614
|
},
|
|
3525
3615
|
functions: {},
|
|
3526
3616
|
}),
|
|
@@ -3547,6 +3637,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
|
3547
3637
|
AXPEntityCreateSubmittedAction,
|
|
3548
3638
|
AXPShowListViewAction,
|
|
3549
3639
|
'entity-apply-updates': AXPEntityApplyUpdatesAction,
|
|
3640
|
+
AXPShowFileUploaderPopupAction,
|
|
3550
3641
|
},
|
|
3551
3642
|
workflows: {
|
|
3552
3643
|
'create-entity': AXPCreateEntityWorkflow,
|
|
@@ -3555,6 +3646,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
|
3555
3646
|
'quick-modify-entity': AXPQuickModifyEntityWorkflow,
|
|
3556
3647
|
'open-entity': AXPShowDetailsViewWorkflow,
|
|
3557
3648
|
'show-list-view': AXPShowListViewWorkflow,
|
|
3649
|
+
'show-file-uploader-popup': AXPShowFileUploaderPopupWorkflow,
|
|
3558
3650
|
},
|
|
3559
3651
|
functions: {},
|
|
3560
3652
|
}),
|