@acorex/platform 19.4.2 → 19.4.4
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/common/lib/file-storage/file-storage.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/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-designer.mjs +2 -2
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +2 -0
- 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-CIFq0eeQ.mjs → acorex-platform-themes-default-entity-master-list-view.component-BlTpiFTT.mjs} +24 -19
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BlTpiFTT.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-DWCclk-S.mjs → acorex-platform-themes-default-entity-master-modify-view.component-CcCAFGwA.mjs} +9 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-CcCAFGwA.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +9 -12
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-Y6Ip7pnQ.mjs → acorex-platform-widgets-button-widget-designer.component-rFIoj-24.mjs} +3 -3
- package/fesm2022/{acorex-platform-widgets-button-widget-designer.component-Y6Ip7pnQ.mjs.map → acorex-platform-widgets-button-widget-designer.component-rFIoj-24.mjs.map} +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +253 -327
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +15 -8
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/entity/lib/entity.viewmodel.d.ts +1 -0
- package/package.json +12 -12
- package/themes/default/lib/layouts/entity-layouts/entity-master-toolbar-view/filters/entity-filter-toolbar.component.d.ts +1 -0
- 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 +19 -0
- package/widgets/lib/widgets/advance/file-uploader/file-uploader-widget-column.component.d.ts +7 -3
- package/widgets/lib/widgets/advance/file-uploader/file-uploader-widget-edit.component.d.ts +1 -19
- package/widgets/lib/widgets/advance/file-uploader/file-uploader-widget-view.component.d.ts +3 -27
- package/widgets/lib/widgets/advance/file-uploader/index.d.ts +0 -1
- package/workflow/lib/slots/workflow-action-bar/workflow-action-bar.component.d.ts +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CIFq0eeQ.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DWCclk-S.mjs.map +0 -1
- package/widgets/lib/widgets/advance/file-uploader/file-uploader-widget-filter.component.d.ts +0 -6
|
@@ -5,7 +5,7 @@ import { cloneDeep, get, set } from 'lodash-es';
|
|
|
5
5
|
import { setSmart, AXPContextStore, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER } from '@acorex/platform/core';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
7
|
import { AXFormModule } from '@acorex/components/form';
|
|
8
|
-
import * as
|
|
8
|
+
import * as i2 from '@acorex/components/button';
|
|
9
9
|
import { AXButtonModule } from '@acorex/components/button';
|
|
10
10
|
import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
11
11
|
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
|
@@ -14,7 +14,6 @@ import * as i1$1 from '@acorex/platform/layout/components';
|
|
|
14
14
|
import { AXPComponentSlot, AXPComponentSlotModule } from '@acorex/platform/layout/components';
|
|
15
15
|
import * as i1 from '@acorex/components/decorators';
|
|
16
16
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
|
17
|
-
import * as i2 from '@acorex/components/dropdown';
|
|
18
17
|
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
19
18
|
|
|
20
19
|
class AXPWorkflowError extends Error {
|
|
@@ -432,12 +431,15 @@ class AXPWorkflowActionBarComponent extends AXPComponentSlot {
|
|
|
432
431
|
}
|
|
433
432
|
ngOnDestroy() {
|
|
434
433
|
}
|
|
434
|
+
onConfirm() {
|
|
435
|
+
alert(JSON.stringify(this.contextStore.data()));
|
|
436
|
+
}
|
|
435
437
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPWorkflowActionBarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
436
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: AXPWorkflowActionBarComponent, isStandalone: true, selector: "axp-workflow-action-bar", providers: [], usesInheritance: true, ngImport: i0, template: "<ax-button [look]=\"'solid'\" color=\"success\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <ax-button-item text=\"New\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n</ax-button>", styles: [""], dependencies: [{ kind: "ngmodule", type:
|
|
438
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: AXPWorkflowActionBarComponent, isStandalone: true, selector: "axp-workflow-action-bar", providers: [], usesInheritance: true, ngImport: i0, template: "<!-- <ax-button [look]=\"'solid'\" color=\"success\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <ax-button-item text=\"New\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n</ax-button>\nthis is workflow toolbar -->\n\n<div class=\"ax-flex ax-flex-row ax-gap-2 ax-w-full ax-lightest-surface ax-border ax-rounded-md ax-p-2\">\n <div class=\"ax-flex ax-gap-2 ax-justify-between ax-items-center \">\n <div>\n <span class=\"ax-font-semibold\">\n Step:\n </span>\n <span>\n pending\n </span>\n </div>\n <div>\n <span class=\"ax-font-semibold\">\n User:\n </span>\n <span>\n John Smith\n </span>\n </div>\n </div>\n <div class=\"ax-flex ax-flex-col ax-gap-2 ax-ml-auto\">\n <ax-button [look]=\"'solid'\" color=\"success\" text=\"Confirm\" (onClick)=\"onConfirm()\">\n <ax-icon icon=\"fa-light fa-check\"></ax-icon>\n </ax-button>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type:
|
|
437
439
|
// Angular
|
|
438
440
|
CommonModule }, { kind: "ngmodule", type:
|
|
439
441
|
// ACoreX
|
|
440
|
-
AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "
|
|
442
|
+
AXFormModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXCheckBoxModule }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
441
443
|
}
|
|
442
444
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AXPWorkflowActionBarComponent, decorators: [{
|
|
443
445
|
type: Component,
|
|
@@ -453,18 +455,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
|
453
455
|
AXLabelModule,
|
|
454
456
|
AXCheckBoxModule,
|
|
455
457
|
// Platform
|
|
456
|
-
], encapsulation: ViewEncapsulation.None, providers: [], template: "<ax-button [look]=\"'solid'\" color=\"success\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <ax-button-item text=\"New\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n</ax-button>" }]
|
|
458
|
+
], encapsulation: ViewEncapsulation.None, providers: [], template: "<!-- <ax-button [look]=\"'solid'\" color=\"success\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <ax-button-item text=\"New\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n</ax-button>\nthis is workflow toolbar -->\n\n<div class=\"ax-flex ax-flex-row ax-gap-2 ax-w-full ax-lightest-surface ax-border ax-rounded-md ax-p-2\">\n <div class=\"ax-flex ax-gap-2 ax-justify-between ax-items-center \">\n <div>\n <span class=\"ax-font-semibold\">\n Step:\n </span>\n <span>\n pending\n </span>\n </div>\n <div>\n <span class=\"ax-font-semibold\">\n User:\n </span>\n <span>\n John Smith\n </span>\n </div>\n </div>\n <div class=\"ax-flex ax-flex-col ax-gap-2 ax-ml-auto\">\n <ax-button [look]=\"'solid'\" color=\"success\" text=\"Confirm\" (onClick)=\"onConfirm()\">\n <ax-icon icon=\"fa-light fa-check\"></ax-icon>\n </ax-button>\n </div>\n</div>" }]
|
|
457
459
|
}] });
|
|
458
460
|
|
|
459
461
|
class AXMWorkflowEvaluatorScopeProvider {
|
|
460
462
|
async provide(context) {
|
|
463
|
+
const processId = window.location.search.split('processId=')[1];
|
|
461
464
|
context.addScope('workflow', {
|
|
462
465
|
process: () => {
|
|
463
|
-
const processId = window.location.search.split('processId=')[1];
|
|
464
466
|
console.log('[SCOPE] AXMWorkflowEvaluatorScopeProvider', processId);
|
|
465
467
|
return {
|
|
466
468
|
id: processId,
|
|
467
469
|
};
|
|
470
|
+
},
|
|
471
|
+
state: () => {
|
|
472
|
+
return {
|
|
473
|
+
disabled: processId === '123',
|
|
474
|
+
};
|
|
468
475
|
}
|
|
469
476
|
});
|
|
470
477
|
}
|
|
@@ -560,7 +567,7 @@ class AXPWorkflowModule {
|
|
|
560
567
|
multi: true
|
|
561
568
|
}
|
|
562
569
|
], imports: [AXPComponentSlotModule.forRoot({
|
|
563
|
-
'
|
|
570
|
+
'entity-detail-footer': [
|
|
564
571
|
{
|
|
565
572
|
name: 'workflow-action-bar',
|
|
566
573
|
component: AXPWorkflowActionBarComponent,
|
|
@@ -575,7 +582,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
|
575
582
|
args: [{
|
|
576
583
|
imports: [
|
|
577
584
|
AXPComponentSlotModule.forRoot({
|
|
578
|
-
'
|
|
585
|
+
'entity-detail-footer': [
|
|
579
586
|
{
|
|
580
587
|
name: 'workflow-action-bar',
|
|
581
588
|
component: AXPWorkflowActionBarComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-workflow.mjs","sources":["../../../../libs/platform/workflow/src/lib/errors.types.ts","../../../../libs/platform/workflow/src/lib/workflow-event-dispatcher.service.ts","../../../../libs/platform/workflow/src/lib/workflow-registery.service.ts","../../../../libs/platform/workflow/src/lib/workflow.types.ts","../../../../libs/platform/workflow/src/lib/actions/decide.action.ts","../../../../libs/platform/workflow/src/lib/workflow.service.ts","../../../../libs/platform/workflow/src/lib/actions/start-workflow.action.ts","../../../../libs/platform/workflow/src/lib/slots/workflow-action-bar/workflow-action-bar.component.ts","../../../../libs/platform/workflow/src/lib/slots/workflow-action-bar/workflow-action-bar.component.html","../../../../libs/platform/workflow/src/lib/workflow-evaluator-scope.provider.ts","../../../../libs/platform/workflow/src/lib/workflow.module.ts","../../../../libs/platform/workflow/src/acorex-platform-workflow.ts"],"sourcesContent":["export class AXPWorkflowError extends Error {\n constructor(message: string, public inner: Error | null = null) {\n super(message);\n this.name = 'AXPWorkflowError';\n }\n}","import { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { AXPWorkflowEvent } from './workflow.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowEventService {\n private eventSubject = new Subject<AXPWorkflowEvent>();\n\n dispatch(event: AXPWorkflowEvent): void {\n this.eventSubject.next(event);\n }\n\n get events$(): Observable<AXPWorkflowEvent> {\n return this.eventSubject.asObservable();\n }\n}\n","import { Injectable, Type } from '@angular/core';\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction, AXPWorkflowStep } from './workflow.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowRegistryService {\n private functionsMap = new Map<string, Type<AXPWorkflowFunction>>();\n private actionsMap = new Map<string, Type<AXPWorkflowAction>>();\n private workflowsMap = new Map<string, AXPWorkflow>();\n\n registerWorkflow(name: string, workflow: AXPWorkflow): void {\n this.workflowsMap.set(name, workflow);\n }\n\n getWorkflow(name: string): AXPWorkflow | undefined {\n return this.workflowsMap.get(name);\n }\n\n registerAction(name: string, action: Type<AXPWorkflowAction>): void {\n this.actionsMap.set(name, action);\n }\n\n getAction(name: string): Type<AXPWorkflowAction> | undefined {\n return this.actionsMap.get(name);\n }\n\n registerFunction(name: string, func: Type<AXPWorkflowFunction>): void {\n this.functionsMap.set(name, func);\n }\n\n getFunction(name: string): Type<AXPWorkflowFunction> | undefined {\n return this.functionsMap.get(name);\n }\n\n getFunctionNames(): string[] {\n return Array.from(this.functionsMap.keys());\n }\n\n getStep(workflowName: string, stepName: string): AXPWorkflowStep | undefined {\n const workflow = this.workflowsMap.get(workflowName);\n if (workflow) {\n const steps = workflow.steps as { [key: string]: AXPWorkflowStep };\n return steps[stepName];\n }\n return undefined;\n }\n\n updateStepInWorkflow(workflowName: string, stepName: string, step: AXPWorkflowStep): void {\n const workflow = this.workflowsMap.get(workflowName);\n if (workflow) {\n const steps = workflow.steps as { [key: string]: AXPWorkflowStep };\n if (steps[stepName]) {\n steps[stepName] = step;\n } else {\n throw new Error(`Step with name ${stepName} does not exist in workflow ${workflowName}.`);\n }\n } else {\n throw new Error(`Workflow with name ${workflowName} does not exist.`);\n }\n }\n\n addStepToWorkflow(workflowName: string, stepName: string, step: AXPWorkflowStep): void {\n const workflow = this.workflowsMap.get(workflowName);\n if (workflow) {\n const steps = workflow.steps as { [key: string]: AXPWorkflowStep };\n if (!steps[stepName]) {\n steps[stepName] = step;\n } else {\n throw new Error(`Step with name ${stepName} already exists in workflow ${workflowName}.`);\n }\n } else {\n throw new Error(`Workflow with name ${workflowName} does not exist.`);\n }\n }\n\n addAfterStep(\n workflowId: string,\n stepId: string,\n newStepId: string,\n newStepAction: string,\n conditionExpression: string\n ): void {\n const step = this.getStep(workflowId, stepId);\n if (step != undefined) {\n this.addStepToWorkflow(workflowId, newStepId, {\n action: newStepAction,\n nextSteps: step.nextSteps,\n });\n\n this.updateStepInWorkflow(workflowId, stepId, {\n ...step,\n nextSteps: [\n {\n conditions: [{ type: 'SINGLE', expression: conditionExpression }],\n nextStepId: newStepId,\n },\n ],\n });\n }\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { filter } from 'rxjs';\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\nimport { cloneDeep, get } from 'lodash-es';\nimport { setSmart } from '@acorex/platform/core';\n\nexport interface AXPWorkflow {\n steps: { [stepName: string]: AXPWorkflowStep };\n startStepId: string;\n}\n\n\nexport class AXPWorkflowContext {\n\n constructor(initialData: any = {}) {\n this.variables = cloneDeep(initialData);\n }\n\n private variables: any = {};\n private stepOutputs: Map<string, any> = new Map();\n\n setVariable(key: string, value: any): void {\n setSmart(this.variables, key, value);\n }\n\n\n setVariables(context: any = {}) {\n this.variables = { ...this.variables, ...context };\n }\n\n getVariable<T = any>(key?: string | null): T {\n return !key ? this.variables : get(this.variables, key);\n }\n\n setOutput(key: string, output: any): void {\n this.stepOutputs.set(key, output);\n }\n\n setOutputs(values: Map<string, any>): void {\n this.stepOutputs = new Map([...this.stepOutputs, ...values])\n }\n\n getOutput<T = any>(key: string): T {\n return this.stepOutputs.get(key);\n }\n}\n\nexport type AXPWorkflowActionInput = any;\n\nexport type AXPWorkflowConditionType = 'AND' | 'OR' | 'SINGLE';\n\nexport interface AXPWorkflowCondition {\n type: AXPWorkflowConditionType;\n conditions?: AXPWorkflowCondition[]; // Nested conditions\n expression?: string; // Used if type is 'SINGLE'\n}\n\nexport interface AXPWorkflowNextStep {\n conditions: AXPWorkflowCondition[];\n nextStepId: string;\n}\n\nexport interface AXPWorkflowStep {\n id?: string;\n action: AXPWorkflowAction | string;\n input?: AXPWorkflowActionInput;\n nextSteps?: AXPWorkflowNextStep[];\n conditions?: AXPWorkflowCondition[];\n}\n@Injectable()\nexport abstract class AXPWorkflowAction {\n private eventService = inject(AXPWorkflowEventService);\n\n protected dispatch(event: AXPWorkflowEvent): void {\n this.eventService.dispatch(event);\n }\n\n abstract execute(context: AXPWorkflowContext): Promise<void>;\n}\n\n@Injectable()\nexport abstract class AXPWorkflowFunction {\n abstract execute(...args: any[]): Promise<any> | any;\n}\n\nexport interface AXPWorkflowEvent<T = any> {\n type: string;\n payload?: T;\n}\n\n\n\nexport function createWorkFlowEvent<T>(type: string) {\n const eventCreator = (payload: T) => ({ type, payload });\n eventCreator.type = type;\n return eventCreator;\n}\n\nexport function ofType<T extends { type: string }>(...allowedTypes: Array<{ type: string }>) {\n return filter((event: T) => allowedTypes.some((type) => event.type === type.type));\n}\n","import { Injectable } from \"@angular/core\";\nimport { AXPWorkflowAction, AXPWorkflowContext } from \"../workflow.types\";\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowDecideAction extends AXPWorkflowAction {\n async execute(context: AXPWorkflowContext): Promise<void> {\n // its a fake action\n }\n}","import { Injectable, Injector, inject } from '@angular/core';\nimport { cloneDeep, set } from 'lodash-es';\nimport { Observable } from 'rxjs';\nimport { AXPWorkflowError } from './errors.types';\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\nimport { AXPWorkflowRegistryService } from './workflow-registery.service';\nimport {\n AXPWorkflow,\n AXPWorkflowAction,\n AXPWorkflowCondition,\n AXPWorkflowContext,\n AXPWorkflowEvent,\n AXPWorkflowFunction,\n AXPWorkflowNextStep,\n AXPWorkflowStep,\n} from './workflow.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowService {\n private eventService = inject(AXPWorkflowEventService);\n\n get events$(): Observable<AXPWorkflowEvent> {\n return this.eventService.events$;\n }\n\n constructor(private registryService: AXPWorkflowRegistryService, private injector: Injector) { }\n\n async execute(\n workflow: AXPWorkflow | string,\n initialContext: AXPWorkflowContext | any | null = null\n ): Promise<AXPWorkflowContext> {\n // Instantiate or retrieve the workflow\n const wk = typeof workflow === 'string' ? this.getWorkflowInstance(workflow) : workflow;\n\n let currentStepId = wk.startStepId;\n const context =\n initialContext instanceof AXPWorkflowContext\n ? initialContext\n : new AXPWorkflowContext(this.processData(initialContext) ?? {});\n // Initialize context with initial variables\n\n while (currentStepId) {\n const currentStep = wk.steps[currentStepId];\n if (!currentStep) {\n throw new AXPWorkflowError(`Step '${currentStepId}' not found in the workflow steps.`);\n }\n\n // Instantiate or retrieve the action\n const action =\n typeof currentStep.action === 'string' ? this.getActionInstance(currentStep.action) : currentStep.action;\n //\n if (currentStep.input) {\n let inputs: any = {};\n await this.processInputs(cloneDeep(currentStep.input), inputs, '', context);\n await new Promise((resolve) =>\n setTimeout(async () => {\n Object.assign(action, inputs);\n resolve(0);\n })\n );\n }\n try {\n await new Promise((resolve) =>\n setTimeout(async () => {\n await action.execute(context);\n resolve(0);\n }, 0)\n );\n } catch (error) {\n console.error(error);\n throw new AXPWorkflowError('Workflow Error', error as Error);\n }\n // Determine the next step based on the conditions\n const nextStepInfo = await this.determineNextStep(currentStep, context);\n if (nextStepInfo) {\n currentStepId = nextStepInfo.nextStepId;\n } else {\n break; // Exit the loop if no next step is determined\n }\n }\n return context;\n }\n\n private processData(initialContext: any): any {\n //TODO: update values with expressions and return new object\n return initialContext;\n }\n\n\n\n private getActionInstance(actionName: string): AXPWorkflowAction {\n const actionType = this.registryService.getAction(actionName);\n if (!actionType) {\n throw new AXPWorkflowError(`Action type '${actionName}' not found in the registry.`);\n }\n return this.injector.get(actionType);\n }\n\n private getWorkflowInstance(workflowName: string): AXPWorkflow {\n const workflowType = this.registryService.getWorkflow(workflowName);\n if (!workflowType) {\n throw new AXPWorkflowError(`Workflow type '${workflowName}' not found in the registry.`);\n }\n return workflowType;\n }\n\n private async determineNextStep(\n currentStep: AXPWorkflowStep,\n context: AXPWorkflowContext\n ): Promise<AXPWorkflowNextStep | null> {\n if (!currentStep.nextSteps) {\n return null;\n }\n for (const nextStep of currentStep.nextSteps) {\n if (await this.evaluateCondition(nextStep.conditions, context)) {\n return nextStep;\n }\n }\n return null;\n }\n\n private async evaluateCondition(conditions: AXPWorkflowCondition[], context: AXPWorkflowContext): Promise<boolean> {\n if (!conditions || conditions.length === 0) {\n return true; // If no conditions, the step proceeds\n }\n\n // Map each condition to a promise using evaluateSingleCondition\n const conditionPromises = conditions.map((condition) => this.evaluateSingleCondition(condition, context));\n\n // Wait for all promises to resolve\n const results = await Promise.all(conditionPromises);\n\n // Check if every condition is true\n return results.every((result) => result);\n }\n\n private async evaluateSingleCondition(\n condition: AXPWorkflowCondition,\n context: AXPWorkflowContext\n ): Promise<boolean> {\n switch (condition.type) {\n case 'SINGLE':\n return (!condition.expression ? true : await this.evaluateExpression(condition.expression, context)) as boolean;\n case 'AND':\n // Evaluate all conditions with 'AND' logic\n const andConditions = condition.conditions ?? [];\n const andResults = await Promise.all(andConditions.map((cond) => this.evaluateSingleCondition(cond, context)));\n return andResults.every((result) => result);\n\n case 'OR':\n // Evaluate all conditions with 'OR' logic\n const orConditions = condition.conditions ?? [];\n const orResults = await Promise.all(orConditions.map((cond) => this.evaluateSingleCondition(cond, context)));\n return orResults.some((result) => result);\n\n default:\n throw new AXPWorkflowError(`Unsupported condition type: ${condition.type}`);\n }\n }\n\n //TODO: return any and recursively update object, update scopes\n private async evaluateExpression(templateExpression: string, context: AXPWorkflowContext): Promise<Boolean> {\n try {\n let expression = '';\n if (typeof templateExpression === 'string' && templateExpression.trim().includes('{{')) {\n const expressionMatch = templateExpression.match(/\\{\\{\\s*(.*?)\\s*\\}\\}/);\n if (!expressionMatch) {\n throw Error(`No valid expression found in \"${templateExpression}\"`);\n }\n expression = expressionMatch[1];\n } else {\n expression = templateExpression;\n }\n // Create a scope that includes context and registered functions\n const scope = { context, ...this.createFunctionScope() };\n // Evaluating the expression within the created scope\n const sandbox = new Function('scope', `return (async function() { with (scope) { return ${expression}; } })();`);\n const result = await sandbox(scope);\n return result;\n } catch (error) {\n console.error('Error evaluating expression:', error);\n return false;\n }\n }\n\n private async processInputs(obj: any, inputs: any, pathPrefix: string = '', context: any = {}): Promise<void> {\n if (!obj) {\n return;\n }\n\n for await (const i of Object.entries(obj)) {\n const key = i[0];\n const value = i[1];\n const currentPath = pathPrefix ? `${pathPrefix}.${key}` : key;\n if (typeof value === 'string' && value.trim().includes('{{')) {\n const expValue = await this.evaluateExpression(value, context);\n set(inputs, currentPath, expValue);\n } else if (\n typeof value === 'object' &&\n value !== null &&\n (value.constructor === Object || Array.isArray(value))\n ) {\n // Recursively handle nested objects\n this.processInputs(value, inputs, currentPath, context);\n } else {\n // Apply static values directly\n set(inputs, currentPath, value);\n }\n }\n }\n\n private createFunctionScope(): any {\n const scope: any = {};\n this.registryService.getFunctionNames().forEach((name) => {\n scope[name] = this.getFunctionInstance(name).execute;\n });\n return { methods: { scope } };\n }\n\n private getFunctionInstance(functionName: string): AXPWorkflowFunction {\n const functionType = this.registryService.getFunction(functionName);\n if (!functionType) {\n throw new AXPWorkflowError(`Function type '${functionName}' not found in the registry.`);\n }\n return this.injector.get(functionType);\n }\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { AXPWorkflowAction, AXPWorkflowContext } from \"../workflow.types\";\nimport { AXPWorkflowService } from \"../workflow.service\";\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPStartWorkflowAction extends AXPWorkflowAction {\n\n private workflowService = inject(AXPWorkflowService)\n private workflow: string;\n private context: any;\n\n async execute(context: AXPWorkflowContext): Promise<void> {\n //console.log(\"start WK current context\", context);\n //console.log(\"start WK input context\", this.context);\n if (this.context)\n context.setVariables(this.context)\n //console.log(\"start WK merged context\", context);\n try {\n await this.workflowService.execute(this.workflow, context);\n }\n catch (e: unknown) {\n throw e;\n }\n\n }\n}\n\n","import { Component, OnDestroy, OnInit, ViewEncapsulation, computed, inject, input, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXPContextData, AXPContextStore } from '@acorex/platform/core';\nimport { AXPComponentSlot } from '@acorex/platform/layout/components';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\n@Component({\n selector: 'axp-workflow-action-bar',\n templateUrl: './workflow-action-bar.component.html',\n styleUrl: './workflow-action-bar.component.scss',\n imports: [\n // Angular\n CommonModule,\n // ACoreX\n AXFormModule,\n AXDecoratorModule,\n AXDropdownModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXCheckBoxModule,\n // Platform\n ],\n encapsulation: ViewEncapsulation.None,\n providers: [\n\n ],\n})\nexport class AXPWorkflowActionBarComponent extends AXPComponentSlot implements OnInit, OnDestroy {\n\n protected contextStore = inject(AXPContextStore);\n\n\n ngOnInit(): void {\n this.contextStore.patch({\n 'wf': \"test\"\n });\n }\n\n ngOnDestroy(): void {\n\n }\n}\n","<ax-button [look]=\"'solid'\" color=\"success\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <ax-button-item text=\"New\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n</ax-button>","import { AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviderContext } from \"@acorex/platform/core\";\n\nexport class AXMWorkflowEvaluatorScopeProvider implements AXPExpressionEvaluatorScopeProvider {\n async provide(context: AXPExpressionEvaluatorScopeProviderContext): Promise<void> {\n context.addScope('workflow', {\n process: () => {\n const processId = window.location.search.split('processId=')[1];\n console.log('[SCOPE] AXMWorkflowEvaluatorScopeProvider', processId);\n\n return {\n id: processId,\n };\n }\n });\n }\n} ","import { Inject, ModuleWithProviders, NgModule, Optional, Type } from \"@angular/core\";\nimport { AXPWorkflowRegistryService } from \"./workflow-registery.service\";\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction } from \"./workflow.types\";\nimport { AXPWorkflowDecideAction } from \"./actions/decide.action\";\nimport { AXPStartWorkflowAction } from \"./actions/start-workflow.action\";\nimport { AXPWorkflowActionBarComponent } from \"./slots/workflow-action-bar/workflow-action-bar.component\";\nimport { AXPComponentSlotModule } from \"@acorex/platform/layout/components\";\nimport { AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER } from \"@acorex/platform/core\";\nimport { AXMWorkflowEvaluatorScopeProvider } from \"./workflow-evaluator-scope.provider\";\nexport interface AXPWorkflowModuleConfigs {\n functions?: {\n [name: string]: Type<AXPWorkflowFunction>\n },\n actions?: {\n [name: string]: Type<AXPWorkflowAction>\n },\n workflows?: {\n [name: string]: AXPWorkflow\n }\n}\n\n@NgModule({\n imports: [\n AXPComponentSlotModule.forRoot({\n 'page-header-actions': [\n {\n name: 'workflow-action-bar',\n component: AXPWorkflowActionBarComponent,\n priority: 100,\n condition: '{{ workflow.process().id == \"123\" }}'\n }\n ]\n }),\n ],\n exports: [],\n declarations: [],\n providers: [\n {\n provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,\n useClass: AXMWorkflowEvaluatorScopeProvider,\n multi: true\n }\n ]\n})\nexport class AXPWorkflowModule {\n\n static forRoot(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule> {\n return {\n ngModule: AXPWorkflowModule,\n providers: [\n {\n provide: 'AXPWorkflowModuleFactory',\n useFactory: (registry: AXPWorkflowRegistryService) => () => {\n registry.registerAction(\"start-workflow\", AXPStartWorkflowAction);\n registry.registerAction(\"decide\", AXPWorkflowDecideAction);\n //\n if (config?.functions) {\n for (const [key, type] of Object.entries(config.functions)) {\n registry.registerFunction(key, type);\n }\n }\n //\n if (config?.actions) {\n for (const [key, type] of Object.entries(config.actions)) {\n registry.registerAction(key, type);\n }\n }\n //\n if (config?.workflows) {\n for (const [key, type] of Object.entries(config.workflows)) {\n registry.registerWorkflow(key, type);\n }\n }\n },\n deps: [AXPWorkflowRegistryService],\n multi: true\n },\n ...Object.values(config?.actions ?? { AXPStartWorkflowAction }),\n ...Object.values(config?.functions ?? {}),\n ]\n };\n }\n\n static forChild(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule> {\n return {\n ngModule: AXPWorkflowModule,\n providers: [\n {\n provide: 'AXPWorkflowModuleFactory',\n useFactory: (registry: AXPWorkflowRegistryService) => () => {\n registry.registerAction(\"start-workflow\", AXPStartWorkflowAction);\n registry.registerAction(\"decide\", AXPWorkflowDecideAction);\n //\n if (config?.functions) {\n for (const [key, type] of Object.entries(config.functions)) {\n registry.registerFunction(key, type);\n }\n }\n //\n if (config?.actions) {\n for (const [key, type] of Object.entries(config.actions)) {\n registry.registerAction(key, type);\n }\n }\n //\n if (config?.workflows) {\n for (const [key, type] of Object.entries(config.workflows)) {\n registry.registerWorkflow(key, type);\n }\n }\n },\n deps: [AXPWorkflowRegistryService],\n multi: true\n },\n ...Object.values(config?.actions ?? {}),\n ...Object.values(config?.functions ?? {})\n ]\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Optional() @Inject('AXPWorkflowModuleFactory') instances: any[]) {\n instances?.forEach(f => {\n f();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AXPWorkflowRegistryService","i1"],"mappings":";;;;;;;;;;;;;;;;;;;AAAM,MAAO,gBAAiB,SAAQ,KAAK,CAAA;IACvC,WAAY,CAAA,OAAe,EAAS,KAAA,GAAsB,IAAI,EAAA;QAC1D,KAAK,CAAC,OAAO,CAAC;QADkB,IAAK,CAAA,KAAA,GAAL,KAAK;AAErC,QAAA,IAAI,CAAC,IAAI,GAAG,kBAAkB;;AAErC;;MCEY,uBAAuB,CAAA;AAHpC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAoB;AASvD;AAPC,IAAA,QAAQ,CAAC,KAAuB,EAAA;AAC9B,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;;AAG/B,IAAA,IAAI,OAAO,GAAA;AACT,QAAA,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE;;+GAR9B,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,K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,wBAAA,IAAI,EAAE,qBAAqB;AAC3B,wBAAA,SAAS,EAAE,6BAA6B;AACxC,wBAAA,QAAQ,EAAE,GAAG;AACb,wBAAA,SAAS,EAAE;AACd;AACJ;aACJ,CAAC,CAAA,EAAA,CAAA,CAAA;;4FAYG,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAvB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,sBAAsB,CAAC,OAAO,CAAC;AAC3B,4BAAA,qBAAqB,EAAE;AACnB,gCAAA;AACI,oCAAA,IAAI,EAAE,qBAAqB;AAC3B,oCAAA,SAAS,EAAE,6BAA6B;AACxC,oCAAA,QAAQ,EAAE,GAAG;AACb,oCAAA,SAAS,EAAE;AACd;AACJ;yBACJ,CAAC;AACL,qBAAA;AACD,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,SAAS,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,uCAAuC;AAChD,4BAAA,QAAQ,EAAE,iCAAiC;AAC3C,4BAAA,KAAK,EAAE;AACV;AACJ;AACJ,iBAAA;;0BAgFgB;;0BAAY,MAAM;2BAAC,0BAA0B;;;AC3H9D;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-workflow.mjs","sources":["../../../../libs/platform/workflow/src/lib/errors.types.ts","../../../../libs/platform/workflow/src/lib/workflow-event-dispatcher.service.ts","../../../../libs/platform/workflow/src/lib/workflow-registery.service.ts","../../../../libs/platform/workflow/src/lib/workflow.types.ts","../../../../libs/platform/workflow/src/lib/actions/decide.action.ts","../../../../libs/platform/workflow/src/lib/workflow.service.ts","../../../../libs/platform/workflow/src/lib/actions/start-workflow.action.ts","../../../../libs/platform/workflow/src/lib/slots/workflow-action-bar/workflow-action-bar.component.ts","../../../../libs/platform/workflow/src/lib/slots/workflow-action-bar/workflow-action-bar.component.html","../../../../libs/platform/workflow/src/lib/workflow-evaluator-scope.provider.ts","../../../../libs/platform/workflow/src/lib/workflow.module.ts","../../../../libs/platform/workflow/src/acorex-platform-workflow.ts"],"sourcesContent":["export class AXPWorkflowError extends Error {\n constructor(message: string, public inner: Error | null = null) {\n super(message);\n this.name = 'AXPWorkflowError';\n }\n}","import { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { AXPWorkflowEvent } from './workflow.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowEventService {\n private eventSubject = new Subject<AXPWorkflowEvent>();\n\n dispatch(event: AXPWorkflowEvent): void {\n this.eventSubject.next(event);\n }\n\n get events$(): Observable<AXPWorkflowEvent> {\n return this.eventSubject.asObservable();\n }\n}\n","import { Injectable, Type } from '@angular/core';\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction, AXPWorkflowStep } from './workflow.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowRegistryService {\n private functionsMap = new Map<string, Type<AXPWorkflowFunction>>();\n private actionsMap = new Map<string, Type<AXPWorkflowAction>>();\n private workflowsMap = new Map<string, AXPWorkflow>();\n\n registerWorkflow(name: string, workflow: AXPWorkflow): void {\n this.workflowsMap.set(name, workflow);\n }\n\n getWorkflow(name: string): AXPWorkflow | undefined {\n return this.workflowsMap.get(name);\n }\n\n registerAction(name: string, action: Type<AXPWorkflowAction>): void {\n this.actionsMap.set(name, action);\n }\n\n getAction(name: string): Type<AXPWorkflowAction> | undefined {\n return this.actionsMap.get(name);\n }\n\n registerFunction(name: string, func: Type<AXPWorkflowFunction>): void {\n this.functionsMap.set(name, func);\n }\n\n getFunction(name: string): Type<AXPWorkflowFunction> | undefined {\n return this.functionsMap.get(name);\n }\n\n getFunctionNames(): string[] {\n return Array.from(this.functionsMap.keys());\n }\n\n getStep(workflowName: string, stepName: string): AXPWorkflowStep | undefined {\n const workflow = this.workflowsMap.get(workflowName);\n if (workflow) {\n const steps = workflow.steps as { [key: string]: AXPWorkflowStep };\n return steps[stepName];\n }\n return undefined;\n }\n\n updateStepInWorkflow(workflowName: string, stepName: string, step: AXPWorkflowStep): void {\n const workflow = this.workflowsMap.get(workflowName);\n if (workflow) {\n const steps = workflow.steps as { [key: string]: AXPWorkflowStep };\n if (steps[stepName]) {\n steps[stepName] = step;\n } else {\n throw new Error(`Step with name ${stepName} does not exist in workflow ${workflowName}.`);\n }\n } else {\n throw new Error(`Workflow with name ${workflowName} does not exist.`);\n }\n }\n\n addStepToWorkflow(workflowName: string, stepName: string, step: AXPWorkflowStep): void {\n const workflow = this.workflowsMap.get(workflowName);\n if (workflow) {\n const steps = workflow.steps as { [key: string]: AXPWorkflowStep };\n if (!steps[stepName]) {\n steps[stepName] = step;\n } else {\n throw new Error(`Step with name ${stepName} already exists in workflow ${workflowName}.`);\n }\n } else {\n throw new Error(`Workflow with name ${workflowName} does not exist.`);\n }\n }\n\n addAfterStep(\n workflowId: string,\n stepId: string,\n newStepId: string,\n newStepAction: string,\n conditionExpression: string\n ): void {\n const step = this.getStep(workflowId, stepId);\n if (step != undefined) {\n this.addStepToWorkflow(workflowId, newStepId, {\n action: newStepAction,\n nextSteps: step.nextSteps,\n });\n\n this.updateStepInWorkflow(workflowId, stepId, {\n ...step,\n nextSteps: [\n {\n conditions: [{ type: 'SINGLE', expression: conditionExpression }],\n nextStepId: newStepId,\n },\n ],\n });\n }\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { filter } from 'rxjs';\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\nimport { cloneDeep, get } from 'lodash-es';\nimport { setSmart } from '@acorex/platform/core';\n\nexport interface AXPWorkflow {\n steps: { [stepName: string]: AXPWorkflowStep };\n startStepId: string;\n}\n\n\nexport class AXPWorkflowContext {\n\n constructor(initialData: any = {}) {\n this.variables = cloneDeep(initialData);\n }\n\n private variables: any = {};\n private stepOutputs: Map<string, any> = new Map();\n\n setVariable(key: string, value: any): void {\n setSmart(this.variables, key, value);\n }\n\n\n setVariables(context: any = {}) {\n this.variables = { ...this.variables, ...context };\n }\n\n getVariable<T = any>(key?: string | null): T {\n return !key ? this.variables : get(this.variables, key);\n }\n\n setOutput(key: string, output: any): void {\n this.stepOutputs.set(key, output);\n }\n\n setOutputs(values: Map<string, any>): void {\n this.stepOutputs = new Map([...this.stepOutputs, ...values])\n }\n\n getOutput<T = any>(key: string): T {\n return this.stepOutputs.get(key);\n }\n}\n\nexport type AXPWorkflowActionInput = any;\n\nexport type AXPWorkflowConditionType = 'AND' | 'OR' | 'SINGLE';\n\nexport interface AXPWorkflowCondition {\n type: AXPWorkflowConditionType;\n conditions?: AXPWorkflowCondition[]; // Nested conditions\n expression?: string; // Used if type is 'SINGLE'\n}\n\nexport interface AXPWorkflowNextStep {\n conditions: AXPWorkflowCondition[];\n nextStepId: string;\n}\n\nexport interface AXPWorkflowStep {\n id?: string;\n action: AXPWorkflowAction | string;\n input?: AXPWorkflowActionInput;\n nextSteps?: AXPWorkflowNextStep[];\n conditions?: AXPWorkflowCondition[];\n}\n@Injectable()\nexport abstract class AXPWorkflowAction {\n private eventService = inject(AXPWorkflowEventService);\n\n protected dispatch(event: AXPWorkflowEvent): void {\n this.eventService.dispatch(event);\n }\n\n abstract execute(context: AXPWorkflowContext): Promise<void>;\n}\n\n@Injectable()\nexport abstract class AXPWorkflowFunction {\n abstract execute(...args: any[]): Promise<any> | any;\n}\n\nexport interface AXPWorkflowEvent<T = any> {\n type: string;\n payload?: T;\n}\n\n\n\nexport function createWorkFlowEvent<T>(type: string) {\n const eventCreator = (payload: T) => ({ type, payload });\n eventCreator.type = type;\n return eventCreator;\n}\n\nexport function ofType<T extends { type: string }>(...allowedTypes: Array<{ type: string }>) {\n return filter((event: T) => allowedTypes.some((type) => event.type === type.type));\n}\n","import { Injectable } from \"@angular/core\";\nimport { AXPWorkflowAction, AXPWorkflowContext } from \"../workflow.types\";\n\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowDecideAction extends AXPWorkflowAction {\n async execute(context: AXPWorkflowContext): Promise<void> {\n // its a fake action\n }\n}","import { Injectable, Injector, inject } from '@angular/core';\nimport { cloneDeep, set } from 'lodash-es';\nimport { Observable } from 'rxjs';\nimport { AXPWorkflowError } from './errors.types';\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\nimport { AXPWorkflowRegistryService } from './workflow-registery.service';\nimport {\n AXPWorkflow,\n AXPWorkflowAction,\n AXPWorkflowCondition,\n AXPWorkflowContext,\n AXPWorkflowEvent,\n AXPWorkflowFunction,\n AXPWorkflowNextStep,\n AXPWorkflowStep,\n} from './workflow.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowService {\n private eventService = inject(AXPWorkflowEventService);\n\n get events$(): Observable<AXPWorkflowEvent> {\n return this.eventService.events$;\n }\n\n constructor(private registryService: AXPWorkflowRegistryService, private injector: Injector) { }\n\n async execute(\n workflow: AXPWorkflow | string,\n initialContext: AXPWorkflowContext | any | null = null\n ): Promise<AXPWorkflowContext> {\n // Instantiate or retrieve the workflow\n const wk = typeof workflow === 'string' ? this.getWorkflowInstance(workflow) : workflow;\n\n let currentStepId = wk.startStepId;\n const context =\n initialContext instanceof AXPWorkflowContext\n ? initialContext\n : new AXPWorkflowContext(this.processData(initialContext) ?? {});\n // Initialize context with initial variables\n\n while (currentStepId) {\n const currentStep = wk.steps[currentStepId];\n if (!currentStep) {\n throw new AXPWorkflowError(`Step '${currentStepId}' not found in the workflow steps.`);\n }\n\n // Instantiate or retrieve the action\n const action =\n typeof currentStep.action === 'string' ? this.getActionInstance(currentStep.action) : currentStep.action;\n //\n if (currentStep.input) {\n let inputs: any = {};\n await this.processInputs(cloneDeep(currentStep.input), inputs, '', context);\n await new Promise((resolve) =>\n setTimeout(async () => {\n Object.assign(action, inputs);\n resolve(0);\n })\n );\n }\n try {\n await new Promise((resolve) =>\n setTimeout(async () => {\n await action.execute(context);\n resolve(0);\n }, 0)\n );\n } catch (error) {\n console.error(error);\n throw new AXPWorkflowError('Workflow Error', error as Error);\n }\n // Determine the next step based on the conditions\n const nextStepInfo = await this.determineNextStep(currentStep, context);\n if (nextStepInfo) {\n currentStepId = nextStepInfo.nextStepId;\n } else {\n break; // Exit the loop if no next step is determined\n }\n }\n return context;\n }\n\n private processData(initialContext: any): any {\n //TODO: update values with expressions and return new object\n return initialContext;\n }\n\n\n\n private getActionInstance(actionName: string): AXPWorkflowAction {\n const actionType = this.registryService.getAction(actionName);\n if (!actionType) {\n throw new AXPWorkflowError(`Action type '${actionName}' not found in the registry.`);\n }\n return this.injector.get(actionType);\n }\n\n private getWorkflowInstance(workflowName: string): AXPWorkflow {\n const workflowType = this.registryService.getWorkflow(workflowName);\n if (!workflowType) {\n throw new AXPWorkflowError(`Workflow type '${workflowName}' not found in the registry.`);\n }\n return workflowType;\n }\n\n private async determineNextStep(\n currentStep: AXPWorkflowStep,\n context: AXPWorkflowContext\n ): Promise<AXPWorkflowNextStep | null> {\n if (!currentStep.nextSteps) {\n return null;\n }\n for (const nextStep of currentStep.nextSteps) {\n if (await this.evaluateCondition(nextStep.conditions, context)) {\n return nextStep;\n }\n }\n return null;\n }\n\n private async evaluateCondition(conditions: AXPWorkflowCondition[], context: AXPWorkflowContext): Promise<boolean> {\n if (!conditions || conditions.length === 0) {\n return true; // If no conditions, the step proceeds\n }\n\n // Map each condition to a promise using evaluateSingleCondition\n const conditionPromises = conditions.map((condition) => this.evaluateSingleCondition(condition, context));\n\n // Wait for all promises to resolve\n const results = await Promise.all(conditionPromises);\n\n // Check if every condition is true\n return results.every((result) => result);\n }\n\n private async evaluateSingleCondition(\n condition: AXPWorkflowCondition,\n context: AXPWorkflowContext\n ): Promise<boolean> {\n switch (condition.type) {\n case 'SINGLE':\n return (!condition.expression ? true : await this.evaluateExpression(condition.expression, context)) as boolean;\n case 'AND':\n // Evaluate all conditions with 'AND' logic\n const andConditions = condition.conditions ?? [];\n const andResults = await Promise.all(andConditions.map((cond) => this.evaluateSingleCondition(cond, context)));\n return andResults.every((result) => result);\n\n case 'OR':\n // Evaluate all conditions with 'OR' logic\n const orConditions = condition.conditions ?? [];\n const orResults = await Promise.all(orConditions.map((cond) => this.evaluateSingleCondition(cond, context)));\n return orResults.some((result) => result);\n\n default:\n throw new AXPWorkflowError(`Unsupported condition type: ${condition.type}`);\n }\n }\n\n //TODO: return any and recursively update object, update scopes\n private async evaluateExpression(templateExpression: string, context: AXPWorkflowContext): Promise<Boolean> {\n try {\n let expression = '';\n if (typeof templateExpression === 'string' && templateExpression.trim().includes('{{')) {\n const expressionMatch = templateExpression.match(/\\{\\{\\s*(.*?)\\s*\\}\\}/);\n if (!expressionMatch) {\n throw Error(`No valid expression found in \"${templateExpression}\"`);\n }\n expression = expressionMatch[1];\n } else {\n expression = templateExpression;\n }\n // Create a scope that includes context and registered functions\n const scope = { context, ...this.createFunctionScope() };\n // Evaluating the expression within the created scope\n const sandbox = new Function('scope', `return (async function() { with (scope) { return ${expression}; } })();`);\n const result = await sandbox(scope);\n return result;\n } catch (error) {\n console.error('Error evaluating expression:', error);\n return false;\n }\n }\n\n private async processInputs(obj: any, inputs: any, pathPrefix: string = '', context: any = {}): Promise<void> {\n if (!obj) {\n return;\n }\n\n for await (const i of Object.entries(obj)) {\n const key = i[0];\n const value = i[1];\n const currentPath = pathPrefix ? `${pathPrefix}.${key}` : key;\n if (typeof value === 'string' && value.trim().includes('{{')) {\n const expValue = await this.evaluateExpression(value, context);\n set(inputs, currentPath, expValue);\n } else if (\n typeof value === 'object' &&\n value !== null &&\n (value.constructor === Object || Array.isArray(value))\n ) {\n // Recursively handle nested objects\n this.processInputs(value, inputs, currentPath, context);\n } else {\n // Apply static values directly\n set(inputs, currentPath, value);\n }\n }\n }\n\n private createFunctionScope(): any {\n const scope: any = {};\n this.registryService.getFunctionNames().forEach((name) => {\n scope[name] = this.getFunctionInstance(name).execute;\n });\n return { methods: { scope } };\n }\n\n private getFunctionInstance(functionName: string): AXPWorkflowFunction {\n const functionType = this.registryService.getFunction(functionName);\n if (!functionType) {\n throw new AXPWorkflowError(`Function type '${functionName}' not found in the registry.`);\n }\n return this.injector.get(functionType);\n }\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { AXPWorkflowAction, AXPWorkflowContext } from \"../workflow.types\";\nimport { AXPWorkflowService } from \"../workflow.service\";\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPStartWorkflowAction extends AXPWorkflowAction {\n\n private workflowService = inject(AXPWorkflowService)\n private workflow: string;\n private context: any;\n\n async execute(context: AXPWorkflowContext): Promise<void> {\n //console.log(\"start WK current context\", context);\n //console.log(\"start WK input context\", this.context);\n if (this.context)\n context.setVariables(this.context)\n //console.log(\"start WK merged context\", context);\n try {\n await this.workflowService.execute(this.workflow, context);\n }\n catch (e: unknown) {\n throw e;\n }\n\n }\n}\n\n","import { Component, OnDestroy, OnInit, ViewEncapsulation, computed, inject, input, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { AXPContextData, AXPContextStore } from '@acorex/platform/core';\nimport { AXPComponentSlot } from '@acorex/platform/layout/components';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\n@Component({\n selector: 'axp-workflow-action-bar',\n templateUrl: './workflow-action-bar.component.html',\n styleUrl: './workflow-action-bar.component.scss',\n imports: [\n // Angular\n CommonModule,\n // ACoreX\n AXFormModule,\n AXDecoratorModule,\n AXDropdownModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXCheckBoxModule,\n // Platform\n ],\n encapsulation: ViewEncapsulation.None,\n providers: [\n\n ],\n})\nexport class AXPWorkflowActionBarComponent extends AXPComponentSlot implements OnInit, OnDestroy {\n\n protected contextStore = inject(AXPContextStore);\n\n\n ngOnInit(): void {\n this.contextStore.patch({\n 'wf': \"test\"\n });\n }\n\n ngOnDestroy(): void {\n\n }\n\n onConfirm() {\n alert(JSON.stringify(this.contextStore.data()));\n }\n}\n","<!-- <ax-button [look]=\"'solid'\" color=\"success\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n <ax-dropdown-panel #panel>\n <ax-button-item-list>\n <ax-button-item text=\"New\">\n <ax-icon icon=\"fa-light fa-plus\"></ax-icon>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-panel>\n</ax-button>\nthis is workflow toolbar -->\n\n<div class=\"ax-flex ax-flex-row ax-gap-2 ax-w-full ax-lightest-surface ax-border ax-rounded-md ax-p-2\">\n <div class=\"ax-flex ax-gap-2 ax-justify-between ax-items-center \">\n <div>\n <span class=\"ax-font-semibold\">\n Step:\n </span>\n <span>\n pending\n </span>\n </div>\n <div>\n <span class=\"ax-font-semibold\">\n User:\n </span>\n <span>\n John Smith\n </span>\n </div>\n </div>\n <div class=\"ax-flex ax-flex-col ax-gap-2 ax-ml-auto\">\n <ax-button [look]=\"'solid'\" color=\"success\" text=\"Confirm\" (onClick)=\"onConfirm()\">\n <ax-icon icon=\"fa-light fa-check\"></ax-icon>\n </ax-button>\n </div>\n</div>","import { AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviderContext } from \"@acorex/platform/core\";\n\nexport class AXMWorkflowEvaluatorScopeProvider implements AXPExpressionEvaluatorScopeProvider {\n async provide(context: AXPExpressionEvaluatorScopeProviderContext): Promise<void> {\n const processId = window.location.search.split('processId=')[1];\n context.addScope('workflow', {\n process: () => {\n console.log('[SCOPE] AXMWorkflowEvaluatorScopeProvider', processId);\n return {\n\n id: processId,\n };\n },\n state: () => {\n return {\n disabled: processId === '123',\n };\n }\n });\n }\n} ","import { Inject, ModuleWithProviders, NgModule, Optional, Type } from \"@angular/core\";\nimport { AXPWorkflowRegistryService } from \"./workflow-registery.service\";\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction } from \"./workflow.types\";\nimport { AXPWorkflowDecideAction } from \"./actions/decide.action\";\nimport { AXPStartWorkflowAction } from \"./actions/start-workflow.action\";\nimport { AXPWorkflowActionBarComponent } from \"./slots/workflow-action-bar/workflow-action-bar.component\";\nimport { AXPComponentSlotModule } from \"@acorex/platform/layout/components\";\nimport { AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER } from \"@acorex/platform/core\";\nimport { AXMWorkflowEvaluatorScopeProvider } from \"./workflow-evaluator-scope.provider\";\nexport interface AXPWorkflowModuleConfigs {\n functions?: {\n [name: string]: Type<AXPWorkflowFunction>\n },\n actions?: {\n [name: string]: Type<AXPWorkflowAction>\n },\n workflows?: {\n [name: string]: AXPWorkflow\n }\n}\n\n@NgModule({\n imports: [\n AXPComponentSlotModule.forRoot({\n 'entity-detail-footer': [\n {\n name: 'workflow-action-bar',\n component: AXPWorkflowActionBarComponent,\n priority: 100,\n condition: '{{ workflow.process().id == \"123\" }}'\n }\n ]\n }),\n ],\n exports: [],\n declarations: [],\n providers: [\n {\n provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,\n useClass: AXMWorkflowEvaluatorScopeProvider,\n multi: true\n }\n ]\n})\nexport class AXPWorkflowModule {\n\n static forRoot(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule> {\n return {\n ngModule: AXPWorkflowModule,\n providers: [\n {\n provide: 'AXPWorkflowModuleFactory',\n useFactory: (registry: AXPWorkflowRegistryService) => () => {\n registry.registerAction(\"start-workflow\", AXPStartWorkflowAction);\n registry.registerAction(\"decide\", AXPWorkflowDecideAction);\n //\n if (config?.functions) {\n for (const [key, type] of Object.entries(config.functions)) {\n registry.registerFunction(key, type);\n }\n }\n //\n if (config?.actions) {\n for (const [key, type] of Object.entries(config.actions)) {\n registry.registerAction(key, type);\n }\n }\n //\n if (config?.workflows) {\n for (const [key, type] of Object.entries(config.workflows)) {\n registry.registerWorkflow(key, type);\n }\n }\n },\n deps: [AXPWorkflowRegistryService],\n multi: true\n },\n ...Object.values(config?.actions ?? { AXPStartWorkflowAction }),\n ...Object.values(config?.functions ?? {}),\n ]\n };\n }\n\n static forChild(config?: AXPWorkflowModuleConfigs): ModuleWithProviders<AXPWorkflowModule> {\n return {\n ngModule: AXPWorkflowModule,\n providers: [\n {\n provide: 'AXPWorkflowModuleFactory',\n useFactory: (registry: AXPWorkflowRegistryService) => () => {\n registry.registerAction(\"start-workflow\", AXPStartWorkflowAction);\n registry.registerAction(\"decide\", AXPWorkflowDecideAction);\n //\n if (config?.functions) {\n for (const [key, type] of Object.entries(config.functions)) {\n registry.registerFunction(key, type);\n }\n }\n //\n if (config?.actions) {\n for (const [key, type] of Object.entries(config.actions)) {\n registry.registerAction(key, type);\n }\n }\n //\n if (config?.workflows) {\n for (const [key, type] of Object.entries(config.workflows)) {\n registry.registerWorkflow(key, type);\n }\n }\n },\n deps: [AXPWorkflowRegistryService],\n multi: true\n },\n ...Object.values(config?.actions ?? {}),\n ...Object.values(config?.functions ?? {})\n ]\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Optional() @Inject('AXPWorkflowModuleFactory') instances: any[]) {\n instances?.forEach(f => {\n f();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AXPWorkflowRegistryService","i1"],"mappings":";;;;;;;;;;;;;;;;;;AAAM,MAAO,gBAAiB,SAAQ,KAAK,CAAA;IACvC,WAAY,CAAA,OAAe,EAAS,KAAA,GAAsB,IAAI,EAAA;QAC1D,KAAK,CAAC,OAAO,CAAC;QADkB,IAAK,CAAA,KAAA,GAAL,KAAK;AAErC,QAAA,IAAI,CAAC,IAAI,GAAG,kBAAkB;;AAErC;;MCEY,uBAAuB,CAAA;AAHpC,IAAA,WAAA,GAAA;AAIU,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAoB;AASvD;AAPC,IAAA,QAAQ,CAAC,KAAuB,EAAA;AAC9B,QAAA,IAAI,CAAC,YAAY,CAAC,IA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AA;AACN,oBAAA,OAAO,EAAE;wBACL,sBAAsB,CAAC,OAAO,CAAC;AAC3B,4BAAA,sBAAsB,EAAE;AACpB,gCAAA;AACI,oCAAA,IAAI,EAAE,qBAAqB;AAC3B,oCAAA,SAAS,EAAE,6BAA6B;AACxC,oCAAA,QAAQ,EAAE,GAAG;AACb,oCAAA,SAAS,EAAE;AACd;AACJ;yBACJ,CAAC;AACL,qBAAA;AACD,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,SAAS,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,uCAAuC;AAChD,4BAAA,QAAQ,EAAE,iCAAiC;AAC3C,4BAAA,KAAK,EAAE;AACV;AACJ;AACJ,iBAAA;;0BAgFgB;;0BAAY,MAAM;2BAAC,0BAA0B;;;AC3H9D;;AAEG;;;;"}
|
|
@@ -15,6 +15,7 @@ export declare class AXPEntityCommandTriggerViewModel {
|
|
|
15
15
|
hidden: boolean | string;
|
|
16
16
|
options: any;
|
|
17
17
|
metadata?: AXPMetaData;
|
|
18
|
+
default?: boolean;
|
|
18
19
|
constructor(entity: AXPEntity, action: AXPEntityAction);
|
|
19
20
|
}
|
|
20
21
|
export declare class AXPEntityListViewColumnViewModel {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/platform",
|
|
3
|
-
"version": "19.4.
|
|
3
|
+
"version": "19.4.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=19.0.0",
|
|
6
6
|
"@angular/core": ">=19.0.0",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"types": "./common/index.d.ts",
|
|
49
49
|
"default": "./fesm2022/acorex-platform-common.mjs"
|
|
50
50
|
},
|
|
51
|
-
"./core": {
|
|
52
|
-
"types": "./core/index.d.ts",
|
|
53
|
-
"default": "./fesm2022/acorex-platform-core.mjs"
|
|
54
|
-
},
|
|
55
51
|
"./domain": {
|
|
56
52
|
"types": "./domain/index.d.ts",
|
|
57
53
|
"default": "./fesm2022/acorex-platform-domain.mjs"
|
|
58
54
|
},
|
|
55
|
+
"./core": {
|
|
56
|
+
"types": "./core/index.d.ts",
|
|
57
|
+
"default": "./fesm2022/acorex-platform-core.mjs"
|
|
58
|
+
},
|
|
59
59
|
"./native": {
|
|
60
60
|
"types": "./native/index.d.ts",
|
|
61
61
|
"default": "./fesm2022/acorex-platform-native.mjs"
|
|
@@ -72,22 +72,22 @@
|
|
|
72
72
|
"types": "./workflow/index.d.ts",
|
|
73
73
|
"default": "./fesm2022/acorex-platform-workflow.mjs"
|
|
74
74
|
},
|
|
75
|
-
"./layout/builder": {
|
|
76
|
-
"types": "./layout/builder/index.d.ts",
|
|
77
|
-
"default": "./fesm2022/acorex-platform-layout-builder.mjs"
|
|
78
|
-
},
|
|
79
75
|
"./layout/components": {
|
|
80
76
|
"types": "./layout/components/index.d.ts",
|
|
81
77
|
"default": "./fesm2022/acorex-platform-layout-components.mjs"
|
|
82
78
|
},
|
|
83
|
-
"./layout/
|
|
84
|
-
"types": "./layout/
|
|
85
|
-
"default": "./fesm2022/acorex-platform-layout-
|
|
79
|
+
"./layout/builder": {
|
|
80
|
+
"types": "./layout/builder/index.d.ts",
|
|
81
|
+
"default": "./fesm2022/acorex-platform-layout-builder.mjs"
|
|
86
82
|
},
|
|
87
83
|
"./layout/entity": {
|
|
88
84
|
"types": "./layout/entity/index.d.ts",
|
|
89
85
|
"default": "./fesm2022/acorex-platform-layout-entity.mjs"
|
|
90
86
|
},
|
|
87
|
+
"./layout/designer": {
|
|
88
|
+
"types": "./layout/designer/index.d.ts",
|
|
89
|
+
"default": "./fesm2022/acorex-platform-layout-designer.mjs"
|
|
90
|
+
},
|
|
91
91
|
"./layout/filters": {
|
|
92
92
|
"types": "./layout/filters/index.d.ts",
|
|
93
93
|
"default": "./fesm2022/acorex-platform-layout-filters.mjs"
|
|
@@ -13,6 +13,7 @@ export declare class AXPEntityFilterToolbarComponent {
|
|
|
13
13
|
constructor();
|
|
14
14
|
protected translate: AXTranslationService;
|
|
15
15
|
protected calendarService: AXCalendarService;
|
|
16
|
+
private filterOperatorMiddleware;
|
|
16
17
|
vm: AXPEntityMasterListViewModel;
|
|
17
18
|
protected tagBox: import("@angular/core").Signal<AXTagBoxComponent | undefined>;
|
|
18
19
|
tagBoxInput: any;
|
|
@@ -81,7 +81,6 @@ export declare class AXPRootVerticalLayoutComponent {
|
|
|
81
81
|
}>;
|
|
82
82
|
protected router: Router;
|
|
83
83
|
constructor();
|
|
84
|
-
protected handleCollapsedChange(value: boolean): void;
|
|
85
84
|
protected handleResizingEnded(e: AXValueChangedEvent<number>): void;
|
|
86
85
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPRootVerticalLayoutComponent, never>;
|
|
87
86
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPRootVerticalLayoutComponent, "axp-root-vertical-layout", never, {}, {}, never, never, true, never>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AXPFileListComponent implements OnInit, OnDestroy {
|
|
4
|
+
private fileTypeService;
|
|
5
|
+
protected isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
6
|
+
private fileTypes;
|
|
7
|
+
readOnly: import("@angular/core").InputSignal<boolean>;
|
|
8
|
+
files: import("@angular/core").InputSignal<File[]>;
|
|
9
|
+
ngOnInit(): Promise<void>;
|
|
10
|
+
protected getFileInfo(fileName: string): {
|
|
11
|
+
icon: string;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
handleFileDownload(file: File): Promise<void>;
|
|
15
|
+
handleFileRemove(file: File): Promise<void>;
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPFileListComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPFileListComponent, "axp-file-list", never, { "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "files": { "alias": "files"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
package/widgets/lib/widgets/advance/file-uploader/file-uploader-widget-column.component.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AXPColumnWidgetComponent } from '@acorex/platform/layout/builder';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class AXPFileUploaderWidgetColumnComponent extends
|
|
3
|
+
export declare class AXPFileUploaderWidgetColumnComponent extends AXPColumnWidgetComponent<any> {
|
|
4
|
+
protected count: import("@angular/core").Signal<number>;
|
|
5
|
+
private popupService;
|
|
6
|
+
private translate;
|
|
7
|
+
openFileList(): Promise<void>;
|
|
4
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPFileUploaderWidgetColumnComponent, never>;
|
|
5
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXPFileUploaderWidgetColumnComponent, "ng-component", never, { "rawValue": { "alias": "rawValue"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPFileUploaderWidgetColumnComponent, "ng-component", never, { "rawValue": { "alias": "rawValue"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; }, {}, never, never, true, never>;
|
|
6
10
|
}
|
|
@@ -1,30 +1,12 @@
|
|
|
1
|
-
import { AXUploaderChangedEvent, AXUploaderFileCompleteEvent, AXUploaderFilesCompleteEvent } from '@acorex/components/uploader';
|
|
2
1
|
import { AXFileService } from '@acorex/core/file';
|
|
3
2
|
import { AXPValueWidgetComponent } from '@acorex/platform/layout/builder';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class AXPFileUploaderWidgetEditComponent extends AXPValueWidgetComponent<File[]> {
|
|
6
|
-
private fileTypeService;
|
|
7
5
|
protected readonly fileService: AXFileService;
|
|
8
|
-
protected isLoading: import("@angular/core").WritableSignal<boolean>;
|
|
9
|
-
private fileTypes;
|
|
10
6
|
protected multiple: import("@angular/core").Signal<boolean>;
|
|
11
7
|
protected accept: import("@angular/core").Signal<string>;
|
|
12
|
-
protected description: import("@angular/core").Signal<string>;
|
|
13
|
-
protected metaData: import("@angular/core").Signal<string>;
|
|
14
|
-
protected refId: import("@angular/core").Signal<string>;
|
|
15
|
-
protected refType: import("@angular/core").Signal<string>;
|
|
16
|
-
ngOnInit(): Promise<void>;
|
|
17
8
|
protected uploadFromComputer(): Promise<void>;
|
|
18
|
-
handleOnFileRemove(file: File): Promise<void>;
|
|
19
|
-
handleOnFileUploadComplete(e: AXUploaderFileCompleteEvent): void;
|
|
20
|
-
handleOnFilesUploadComplete(e: AXUploaderFilesCompleteEvent): void;
|
|
21
|
-
protected handleChanged(e: AXUploaderChangedEvent): Promise<void>;
|
|
22
|
-
protected getFileInfo(fileName: string): {
|
|
23
|
-
icon: string;
|
|
24
|
-
type: string;
|
|
25
|
-
};
|
|
26
9
|
private get __class();
|
|
27
|
-
handleFileDownload(event: any, file: File): Promise<void>;
|
|
28
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPFileUploaderWidgetEditComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXPFileUploaderWidgetEditComponent, "axp-file-widget-edit", never, {}, {}, never, never, true, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPFileUploaderWidgetEditComponent, "axp-file-uploader-widget-edit", never, {}, {}, never, never, true, never>;
|
|
30
12
|
}
|
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
import { AXPFileStorageInfo } from '@acorex/platform/common';
|
|
2
1
|
import { AXPValueWidgetComponent } from '@acorex/platform/layout/builder';
|
|
3
|
-
import { WritableSignal } from '@angular/core';
|
|
4
2
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type: string;
|
|
8
|
-
value: string;
|
|
9
|
-
size: string;
|
|
10
|
-
}
|
|
11
|
-
export declare class AXPFileUploaderWidgetViewComponent extends AXPValueWidgetComponent<any> {
|
|
12
|
-
private fileStorageService;
|
|
13
|
-
private loadingDialog;
|
|
14
|
-
private translateService;
|
|
15
|
-
protected multiple: import("@angular/core").Signal<boolean>;
|
|
16
|
-
protected downloadable: import("@angular/core").Signal<boolean>;
|
|
17
|
-
protected internalValue: WritableSignal<AXPFileStorageInfo[]>;
|
|
18
|
-
private downloadSubscription;
|
|
19
|
-
ngOnInit(): void;
|
|
20
|
-
protected handleDownload(item: AXPFile): Promise<void>;
|
|
21
|
-
private cancelDownload;
|
|
22
|
-
private triggerDownload;
|
|
23
|
-
protected getFileInfo(extension: string): {
|
|
24
|
-
icon: string;
|
|
25
|
-
color: string;
|
|
26
|
-
};
|
|
27
|
-
private updateInternalValue;
|
|
3
|
+
export declare class AXPFileUploaderWidgetViewComponent extends AXPValueWidgetComponent<File[]> {
|
|
4
|
+
private get __class();
|
|
28
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPFileUploaderWidgetViewComponent, never>;
|
|
29
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXPFileUploaderWidgetViewComponent, "
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPFileUploaderWidgetViewComponent, "axp-file-uploader-widget-view", never, {}, {}, never, never, true, never>;
|
|
30
7
|
}
|
|
31
|
-
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './file-uploader-widget-column.component';
|
|
2
2
|
export * from './file-uploader-widget-edit.component';
|
|
3
|
-
export * from './file-uploader-widget-filter.component';
|
|
4
3
|
export * from './file-uploader-widget-print.component';
|
|
5
4
|
export * from './file-uploader-widget-view.component';
|
|
6
5
|
export * from './file-uploader-widget.config';
|
|
@@ -31,6 +31,7 @@ export declare class AXPWorkflowActionBarComponent extends AXPComponentSlot impl
|
|
|
31
31
|
}>;
|
|
32
32
|
ngOnInit(): void;
|
|
33
33
|
ngOnDestroy(): void;
|
|
34
|
+
onConfirm(): void;
|
|
34
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowActionBarComponent, never>;
|
|
35
36
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPWorkflowActionBarComponent, "axp-workflow-action-bar", never, {}, {}, never, never, true, never>;
|
|
36
37
|
}
|