@acorex/platform 19.4.3 → 19.4.5
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/lib/app/application.types.d.ts +1 -0
- package/core/index.d.ts +1 -0
- package/core/lib/icon/icon-resolver.service.d.ts +5 -0
- package/core/lib/icon/icon.types.d.ts +8 -0
- package/core/lib/icon/index.d.ts +2 -0
- 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-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +29 -1
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +0 -3
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +3 -3
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +93 -2
- 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-themes-default-entity-master-list-view.component-BQXREWRS.mjs → acorex-platform-themes-default-entity-master-list-view.component-BlTpiFTT.mjs} +11 -11
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BlTpiFTT.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +7 -10
- package/fesm2022/acorex-platform-themes-default.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.mjs +114 -826
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +21 -10
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/lib/builder/widget-map.d.ts +0 -3
- package/layout/entity/lib/entity-master-list.viewmodel.d.ts +1 -0
- package/layout/entity/lib/entity.viewmodel.d.ts +1 -0
- package/layout/entity/lib/workflows/show-file-uploader-popup.workflow.d.ts +10 -0
- package/package.json +15 -15
- package/themes/default/lib/layouts/root-layout/vertical/vertical-layout.component.d.ts +0 -1
- 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/index.d.ts +0 -2
- package/workflow/index.d.ts +1 -0
- package/workflow/lib/slots/workflow-action-bar/workflow-action-bar.component.d.ts +1 -0
- package/workflow/lib/task-board.types.d.ts +21 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BQXREWRS.mjs.map +0 -1
- 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.config.d.ts +0 -7
- 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';
|
|
@@ -110,6 +110,7 @@ class AXPEntityCommandTriggerViewModel {
|
|
|
110
110
|
this.icon = action.icon ?? resolvedLook.icon;
|
|
111
111
|
this.hidden = action.hidden ?? false;
|
|
112
112
|
this.disabled = action.disabled ?? false;
|
|
113
|
+
this.default = action.default ?? false;
|
|
113
114
|
this.scope = action.scope;
|
|
114
115
|
}
|
|
115
116
|
}
|
|
@@ -776,6 +777,16 @@ class AXPEntityMasterListViewModel {
|
|
|
776
777
|
return this.sortedFields().filter((i) => i.dir).length;
|
|
777
778
|
};
|
|
778
779
|
this.sortedFields = signal([]);
|
|
780
|
+
this.evaluateExpressions = async (options, data) => {
|
|
781
|
+
const scope = {
|
|
782
|
+
context: {
|
|
783
|
+
eval: (path) => {
|
|
784
|
+
return get(data, path);
|
|
785
|
+
},
|
|
786
|
+
},
|
|
787
|
+
};
|
|
788
|
+
return await this.expressionEvaluator.evaluate(options, scope);
|
|
789
|
+
};
|
|
779
790
|
this.workflow.events$
|
|
780
791
|
.pipe(ofType(AXPRefreshEvent))
|
|
781
792
|
.pipe(takeUntil(this.destroyed))
|
|
@@ -1022,6 +1033,7 @@ class AXPEntityMasterListViewModel {
|
|
|
1022
1033
|
c.scope == AXPEntityCommandScope.TypeLevel));
|
|
1023
1034
|
});
|
|
1024
1035
|
const command = commandName.split('&')[0];
|
|
1036
|
+
const options = await this.evaluateExpressions(action?.options, data);
|
|
1025
1037
|
await this.workflow.execute(command, {
|
|
1026
1038
|
entity: getEntityInfo(this.entityDef).source,
|
|
1027
1039
|
entityInfo: {
|
|
@@ -1032,7 +1044,7 @@ class AXPEntityMasterListViewModel {
|
|
|
1032
1044
|
source: this.entityDef.source,
|
|
1033
1045
|
},
|
|
1034
1046
|
data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
|
|
1035
|
-
options:
|
|
1047
|
+
options: options,
|
|
1036
1048
|
metadata: action?.metadata,
|
|
1037
1049
|
});
|
|
1038
1050
|
}
|
|
@@ -3413,6 +3425,81 @@ const AXPShowListViewWorkflow = {
|
|
|
3413
3425
|
},
|
|
3414
3426
|
};
|
|
3415
3427
|
|
|
3428
|
+
class AXPShowFileUploaderPopupAction extends AXPWorkflowAction {
|
|
3429
|
+
constructor() {
|
|
3430
|
+
super(...arguments);
|
|
3431
|
+
this.fileUploaderWidgetService = inject(AXPFileUploaderWidgetService);
|
|
3432
|
+
this.entityRegistryService = inject(AXPEntityDefinitionRegistryService);
|
|
3433
|
+
}
|
|
3434
|
+
async execute(context) {
|
|
3435
|
+
debugger;
|
|
3436
|
+
const key = context.getVariable('options.key');
|
|
3437
|
+
const files = context.getVariable('options.files');
|
|
3438
|
+
const readOnly = context.getVariable('options.readOnly');
|
|
3439
|
+
const multiple = context.getVariable('options.multiple');
|
|
3440
|
+
const accept = context.getVariable('options.accept');
|
|
3441
|
+
const res = await this.fileUploaderWidgetService.showFileList({
|
|
3442
|
+
files: files,
|
|
3443
|
+
readOnly: readOnly,
|
|
3444
|
+
multiple: multiple,
|
|
3445
|
+
accept: accept,
|
|
3446
|
+
});
|
|
3447
|
+
if ((res?.length ?? 0) === 0) {
|
|
3448
|
+
context.setOutput('result', false);
|
|
3449
|
+
return;
|
|
3450
|
+
}
|
|
3451
|
+
const [module, entity] = context.getVariable('entity').split('.');
|
|
3452
|
+
const entityDefinition = await this.entityRegistryService.resolve(module, entity);
|
|
3453
|
+
if (entityDefinition) {
|
|
3454
|
+
const updateExec = entityDefinition.commands?.update?.execute;
|
|
3455
|
+
const entityData = await updateExec({
|
|
3456
|
+
id: context.getVariable('options.id'),
|
|
3457
|
+
[key]: res,
|
|
3458
|
+
});
|
|
3459
|
+
context.setOutput('result', true);
|
|
3460
|
+
context.setVariable('data', cloneDeep(entityData));
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3463
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPShowFileUploaderPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3464
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPShowFileUploaderPopupAction }); }
|
|
3465
|
+
}
|
|
3466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPShowFileUploaderPopupAction, decorators: [{
|
|
3467
|
+
type: Injectable
|
|
3468
|
+
}] });
|
|
3469
|
+
const AXPShowFileUploaderPopupWorkflow = {
|
|
3470
|
+
startStepId: 'show-popup',
|
|
3471
|
+
steps: {
|
|
3472
|
+
'show-popup': {
|
|
3473
|
+
action: 'AXPShowFileUploaderPopupAction',
|
|
3474
|
+
nextSteps: [
|
|
3475
|
+
{
|
|
3476
|
+
conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
|
|
3477
|
+
nextStepId: 'successToast',
|
|
3478
|
+
},
|
|
3479
|
+
],
|
|
3480
|
+
},
|
|
3481
|
+
successToast: {
|
|
3482
|
+
id: 'successToast',
|
|
3483
|
+
action: 'AXPToastAction',
|
|
3484
|
+
input: {
|
|
3485
|
+
color: 'success',
|
|
3486
|
+
title: 'workflow.entity-modified-title',
|
|
3487
|
+
content: 'workflow.entity-modified-body',
|
|
3488
|
+
},
|
|
3489
|
+
nextSteps: [
|
|
3490
|
+
{
|
|
3491
|
+
conditions: [],
|
|
3492
|
+
nextStepId: 'modifyConfirmed',
|
|
3493
|
+
},
|
|
3494
|
+
],
|
|
3495
|
+
},
|
|
3496
|
+
modifyConfirmed: {
|
|
3497
|
+
id: 'modifyConfirmed',
|
|
3498
|
+
action: 'AXPEntityModifyConfirmedAction',
|
|
3499
|
+
},
|
|
3500
|
+
},
|
|
3501
|
+
};
|
|
3502
|
+
|
|
3416
3503
|
function routesFacory() {
|
|
3417
3504
|
const config = inject(AXP_ENTITY_CONFIG_TOKEN);
|
|
3418
3505
|
let routes = [];
|
|
@@ -3512,6 +3599,7 @@ class AXPEntityModule {
|
|
|
3512
3599
|
AXPEntityCreateSubmittedAction,
|
|
3513
3600
|
AXPShowListViewAction,
|
|
3514
3601
|
'entity-apply-updates': AXPEntityApplyUpdatesAction,
|
|
3602
|
+
AXPShowFileUploaderPopupAction,
|
|
3515
3603
|
},
|
|
3516
3604
|
workflows: {
|
|
3517
3605
|
'create-entity': AXPCreateEntityWorkflow,
|
|
@@ -3520,6 +3608,7 @@ class AXPEntityModule {
|
|
|
3520
3608
|
'quick-modify-entity': AXPQuickModifyEntityWorkflow,
|
|
3521
3609
|
'open-entity': AXPShowDetailsViewWorkflow,
|
|
3522
3610
|
'show-list-view': AXPShowListViewWorkflow,
|
|
3611
|
+
'show-file-uploader-popup': AXPShowFileUploaderPopupWorkflow,
|
|
3523
3612
|
},
|
|
3524
3613
|
functions: {},
|
|
3525
3614
|
}),
|
|
@@ -3546,6 +3635,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
|
3546
3635
|
AXPEntityCreateSubmittedAction,
|
|
3547
3636
|
AXPShowListViewAction,
|
|
3548
3637
|
'entity-apply-updates': AXPEntityApplyUpdatesAction,
|
|
3638
|
+
AXPShowFileUploaderPopupAction,
|
|
3549
3639
|
},
|
|
3550
3640
|
workflows: {
|
|
3551
3641
|
'create-entity': AXPCreateEntityWorkflow,
|
|
@@ -3554,6 +3644,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
|
3554
3644
|
'quick-modify-entity': AXPQuickModifyEntityWorkflow,
|
|
3555
3645
|
'open-entity': AXPShowDetailsViewWorkflow,
|
|
3556
3646
|
'show-list-view': AXPShowListViewWorkflow,
|
|
3647
|
+
'show-file-uploader-popup': AXPShowFileUploaderPopupWorkflow,
|
|
3557
3648
|
},
|
|
3558
3649
|
functions: {},
|
|
3559
3650
|
}),
|