@acorex/platform 18.2.3 → 18.2.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/esm2022/common/lib/layout/sticky.directive.mjs +15 -11
- package/esm2022/layout/builder/lib/builder/widget-column-renderer.mjs +22 -11
- package/esm2022/layout/designer/lib/designer/components/size-mode/view-size-toolbar.component.mjs +27 -32
- package/esm2022/layout/entity/lib/entity-master-list.viewmodel.mjs +33 -8
- package/esm2022/layout/entity/lib/entity.module.mjs +1 -17
- package/esm2022/layout/entity/lib/index.mjs +5 -4
- package/esm2022/layout/setting/lib/convert-setting-data.mjs +59 -0
- package/esm2022/layout/setting/lib/setting.viewmodel.mjs +123 -41
- package/esm2022/layouts/lib/admin/entity-layout/entity-list-view/entity-list-view.component.mjs +3 -3
- package/esm2022/themes/default/lib/default.module.mjs +83 -39
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.mjs +3 -3
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.mjs +18 -18
- package/esm2022/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-columns/list-view-option-columns.component.mjs +18 -8
- package/esm2022/themes/default/lib/layouts/root-layout/components/menu/root-menu.component.mjs +1 -1
- package/esm2022/themes/default/lib/layouts/setting-layout/index.mjs +3 -3
- package/esm2022/themes/default/lib/layouts/setting-layout/setting-menu/setting-menu.component.mjs +28 -0
- package/esm2022/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.mjs +42 -0
- package/esm2022/widgets/lib/widgets/advance/cron-job/cron-job-widget-edit.component.mjs +2 -2
- package/esm2022/widgets/lib/widgets/advance/cron-job/cron-job-widget.config.mjs +3 -2
- package/esm2022/workflow/lib/workflow.service.mjs +1 -1
- package/fesm2022/acorex-platform-common.mjs +13 -9
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +18 -7
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +25 -30
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +842 -833
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs +180 -40
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/acorex-platform-layouts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-CJY8R3sa.mjs → acorex-platform-themes-default-entity-master-create-view.component-Bs6fn6z2.mjs} +3 -3
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-CJY8R3sa.mjs.map → acorex-platform-themes-default-entity-master-create-view.component-Bs6fn6z2.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-C6zgLyry.mjs → acorex-platform-themes-default-entity-master-list-view.component-DPHXeucj.mjs} +39 -30
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DPHXeucj.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-wPZPhMgy.mjs → acorex-platform-themes-default-entity-master-modify-view.component-CWrpcOC2.mjs} +3 -3
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-wPZPhMgy.mjs.map → acorex-platform-themes-default-entity-master-modify-view.component-CWrpcOC2.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-DNXWb6ij.mjs → acorex-platform-themes-default-entity-master-single-view.component-DHfe0Qtu.mjs} +10 -10
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-DNXWb6ij.mjs.map → acorex-platform-themes-default-entity-master-single-view.component-DHfe0Qtu.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +153 -257
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-widgets.mjs +3 -2
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/lib/builder/widget-column-renderer.d.ts +1 -1
- package/layout/entity/lib/entity-master-list.viewmodel.d.ts +6 -2
- package/layout/entity/lib/index.d.ts +4 -3
- package/layout/setting/README.md +2 -3
- package/{themes/default/lib/layouts/setting-layout → layout/setting/lib}/convert-setting-data.d.ts +6 -6
- package/layout/setting/lib/setting.viewmodel.d.ts +35 -9
- package/package.json +7 -7
- package/themes/default/lib/default.module.d.ts +3 -4
- package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-columns/list-view-option-columns.component.d.ts +3 -0
- package/themes/default/lib/layouts/setting-layout/index.d.ts +2 -2
- package/themes/default/lib/layouts/setting-layout/setting-menu/setting-menu.component.d.ts +12 -0
- package/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.d.ts +7 -0
- package/widgets/lib/widgets/advance/cron-job/cron-job-widget-edit.component.d.ts +1 -2
- package/workflow/lib/workflow.service.d.ts +1 -1
- package/esm2022/themes/default/lib/layout.routes.mjs +0 -20
- package/esm2022/themes/default/lib/layouts/setting-layout/convert-setting-data.mjs +0 -49
- package/esm2022/themes/default/lib/layouts/setting-layout/setting-preview/setting-preview.component.mjs +0 -104
- package/esm2022/themes/default/lib/layouts/setting-layout/setting-view/setting-menu.component.mjs +0 -44
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-C6zgLyry.mjs.map +0 -1
- package/themes/default/lib/layout.routes.d.ts +0 -2
- package/themes/default/lib/layouts/setting-layout/setting-preview/setting-preview.component.d.ts +0 -24
- package/themes/default/lib/layouts/setting-layout/setting-view/setting-menu.component.d.ts +0 -20
|
@@ -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/workflow.service.ts","../../../../libs/platform/workflow/src/lib/actions/start-workflow.action.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 } from './workflow.types';\n\n\n\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}","import { Injectable, inject } from '@angular/core';\nimport { filter } from 'rxjs';\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\nimport { cloneDeep, get, set } from 'lodash-es';\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 set(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): T {\n return 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, Injector, inject } from '@angular/core';\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';\nimport { cloneDeep, set } from 'lodash-es';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowService {\n private eventService = inject(AXPWorkflowEventService);\n\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(workflow: AXPWorkflow | string, initialContext: AXPWorkflowContext | any | null = null): 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 = initialContext instanceof AXPWorkflowContext ? initialContext : new AXPWorkflowContext(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 = typeof currentStep.action === 'string' ? this.getActionInstance(currentStep.action) : currentStep.action;\n if (currentStep.input) {\n let inputs: any = {};\n await this.processInputs(cloneDeep(currentStep.input), inputs, '', context);\n Object.assign(action, inputs);\n }\n try {\n await new Promise((resolve) => setTimeout(async () => {\n await action.execute(context);\n resolve(0);\n }, 0));\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 //TODO : replace with AXDataGenerator\n private uuid(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {\n const random = (Math.random() * 16) | 0;\n const value = char === 'x' ? random : (random & 0x3) | 0x8;\n return value.toString(16);\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 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 }\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 async processInputs(obj: any, inputs: any, pathPrefix: string = '', context: any = {}): Promise<void> {\n if (!obj)\n return;\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 }\n else if (typeof value === 'object' && value !== null && (value.constructor === Object || Array.isArray(value))) {\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 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}","import { Inject, ModuleWithProviders, NgModule, Optional, Type } from \"@angular/core\";\nimport { AXPWorkflowRegistryService } from \"./workflow-registery.service\";\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction } from \"./workflow.types\";\nimport { AXPStartWorkflowAction } from \"./actions/start-workflow.action\";\n\n\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 exports: [],\n declarations: [],\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 //\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 //\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"],"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,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AA;AACxE,QAAA,SAAS,EAAE,OAAO,CAAC,CAAC,IAAG;AACnB,YAAA,CAAC,EAAE;AACP,SAAC,CAAC;;AAhFG,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,kBA6EM,0BAA0B,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GA7EjD,iBAAiB,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AACnB,iBAAA;;0BA8EgB;;0BAAY,MAAM;2BAAC,0BAA0B;;;ACpG9D;;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/workflow.service.ts","../../../../libs/platform/workflow/src/lib/actions/start-workflow.action.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 } from './workflow.types';\n\n\n\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}","import { Injectable, inject } from '@angular/core';\nimport { filter } from 'rxjs';\nimport { AXPWorkflowEventService } from './workflow-event-dispatcher.service';\nimport { cloneDeep, get, set } from 'lodash-es';\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 set(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): T {\n return 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, Injector, inject } from '@angular/core';\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';\nimport { cloneDeep, set } from 'lodash-es';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPWorkflowService {\n private eventService = inject(AXPWorkflowEventService);\n\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(workflow: AXPWorkflow | string, initialContext: AXPWorkflowContext | any | null = null): 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 = initialContext instanceof AXPWorkflowContext ? initialContext : new AXPWorkflowContext(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 = typeof currentStep.action === 'string' ? this.getActionInstance(currentStep.action) : currentStep.action;\n if (currentStep.input) {\n let inputs: any = {};\n await this.processInputs(cloneDeep(currentStep.input), inputs, '', context);\n Object.assign(action, inputs);\n }\n try {\n await new Promise((resolve) => setTimeout(async () => {\n await action.execute(context);\n resolve(0);\n }, 0));\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 //TODO : replace with AXDataGenerator\n private uuid(): string {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {\n const random = (Math.random() * 16) | 0;\n const value = char === 'x' ? random : (random & 0x3) | 0x8;\n return value.toString(16);\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 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 }\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 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 }\n else if (typeof value === 'object' && value !== null && (value.constructor === Object || Array.isArray(value))) {\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 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}","import { Inject, ModuleWithProviders, NgModule, Optional, Type } from \"@angular/core\";\nimport { AXPWorkflowRegistryService } from \"./workflow-registery.service\";\nimport { AXPWorkflow, AXPWorkflowAction, AXPWorkflowFunction } from \"./workflow.types\";\nimport { AXPStartWorkflowAction } from \"./actions/start-workflow.action\";\n\n\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 exports: [],\n declarations: [],\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 //\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 //\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"],"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;;8GAR9B,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvB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;+GA7EjD,iBAAiB,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,YAAY,EAAE,EAAE;AACnB,iBAAA;;0BA8EgB;;0BAAY,MAAM;2BAAC,0BAA0B;;;ACpG9D;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXDataTableColumnComponent } from '@acorex/components/data-table';
|
|
2
2
|
import { Injector, TemplateRef } from '@angular/core';
|
|
3
|
-
import { AXPWidgetColumnNode } from './widget.types';
|
|
4
3
|
import { AXPWidgetRegistryService } from './widget-registery.service';
|
|
4
|
+
import { AXPWidgetColumnNode } from './widget.types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class AXPWidgetColumnRendererComponent extends AXDataTableColumnComponent {
|
|
7
7
|
protected widgetRegistery: AXPWidgetRegistryService;
|
|
@@ -29,13 +29,17 @@ export declare class AXPEntityMasterListViewModel {
|
|
|
29
29
|
private readonly formatService;
|
|
30
30
|
private readonly session;
|
|
31
31
|
private readonly workflow;
|
|
32
|
+
private readonly settings;
|
|
32
33
|
private readonly filterOperatorMiddleware;
|
|
34
|
+
private settingListViewKey;
|
|
35
|
+
private settingSelectedViewKey;
|
|
33
36
|
private readonly destroyed;
|
|
34
37
|
events$: Subject<{
|
|
35
38
|
action: string;
|
|
36
39
|
}>;
|
|
37
40
|
dataSource: AXDataSource<unknown>;
|
|
38
41
|
constructor(injector: Injector, config: AXPEntity);
|
|
42
|
+
applySettings(): Promise<void>;
|
|
39
43
|
selectedItems: import("@angular/core").WritableSignal<any[]>;
|
|
40
44
|
hasSelectedItems: import("@angular/core").Signal<boolean>;
|
|
41
45
|
clearSelection(): void;
|
|
@@ -57,7 +61,7 @@ export declare class AXPEntityMasterListViewModel {
|
|
|
57
61
|
visibleColumnCount: () => number;
|
|
58
62
|
columns: import("@angular/core").WritableSignal<AXPEntityListViewColumnViewModel[]>;
|
|
59
63
|
resetColumns(): void;
|
|
60
|
-
|
|
64
|
+
onColumnsChanged(columns: AXPEntityListViewColumnViewModel[]): Promise<void>;
|
|
61
65
|
applyViewColumns(): void;
|
|
62
66
|
sortableFields: () => {
|
|
63
67
|
name: string;
|
|
@@ -74,7 +78,7 @@ export declare class AXPEntityMasterListViewModel {
|
|
|
74
78
|
addSort(): void;
|
|
75
79
|
removeSort(name: string): void;
|
|
76
80
|
applyViewSorts(): void;
|
|
77
|
-
setView(viewName?: string | null): void
|
|
81
|
+
setView(viewName?: string | null): Promise<void>;
|
|
78
82
|
views: import("@angular/core").Signal<AXPEntityMasterListViewQueryViewModel[]>;
|
|
79
83
|
view: import("@angular/core").WritableSignal<AXPEntityMasterListViewQueryViewModel>;
|
|
80
84
|
executeCommand(commandName: string, data?: any): Promise<void>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export * from './entity-
|
|
1
|
+
export * from './entity-detail-list.viewmodel';
|
|
2
2
|
export * from './entity-master-create.viewmodel';
|
|
3
|
-
export * from './entity-master-update.viewmodel';
|
|
4
3
|
export * from './entity-master-list.viewmodel';
|
|
5
|
-
export * from './entity-
|
|
4
|
+
export * from './entity-master-single.viewmodel';
|
|
5
|
+
export * from './entity-master-update.viewmodel';
|
|
6
6
|
export * from './entity-registery.service';
|
|
7
7
|
export * from './entity.config';
|
|
8
8
|
export * from './entity.module';
|
|
9
9
|
export * from './entity.service';
|
|
10
|
+
export * from './entity.viewmodel';
|
package/layout/setting/README.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
# @acorex/platform/
|
|
1
|
+
# @acorex/platform/setting
|
|
2
2
|
|
|
3
|
-
Secondary entry point of `@acorex/platform`. It can be used by importing from `@acorex/platform/
|
|
4
|
-
|
|
3
|
+
Secondary entry point of `@acorex/platform`. It can be used by importing from `@acorex/platform/setting`.
|
package/{themes/default/lib/layouts/setting-layout → layout/setting/lib}/convert-setting-data.d.ts
RENAMED
|
@@ -11,11 +11,11 @@ import { AXPSettingDefinitionGroup } from '@acorex/platform/common';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function convertToTreeViewSchema(groups: AXPSettingDefinitionGroup[], parentId?: string | number): AXTreeViewSchema[];
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
14
|
+
* Recursively searches for a specific `id` in a tree structure and updates its `active` property to `true`.
|
|
15
|
+
* Additionally, ensures all other nodes have their `active` property set to `false`.
|
|
16
16
|
*
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
19
|
-
*
|
|
20
|
-
* @returns An array of paths where each path is an array of strings representing the breadcrumb.
|
|
17
|
+
* @param tree - The tree structure to search, represented as an array of AXTreeViewSchema nodes.
|
|
18
|
+
* @param targetId - The `id` of the node to activate.
|
|
19
|
+
* @returns The updated tree structure with the target node activated and others deactivated.
|
|
21
20
|
*/
|
|
21
|
+
export declare function setActiveByValueField(tree: AXTreeViewSchema[], targetId: string | number): AXTreeViewSchema[];
|
|
@@ -1,13 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AXTreeItemClickBaseEvent, AXTreeViewSchema } from '@acorex/components/tree-view/lib/tree-view.class';
|
|
2
|
+
import { AXPGroupDetails } from '@acorex/platform/common';
|
|
3
|
+
import { OnDestroy } from '@angular/core';
|
|
4
|
+
import { ActivatedRoute } from '@angular/router';
|
|
5
|
+
import { Subscription } from 'rxjs';
|
|
3
6
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class AXPSettingsViewModel {
|
|
5
|
-
private
|
|
6
|
-
|
|
7
|
-
private
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export declare class AXPSettingsViewModel implements OnDestroy {
|
|
8
|
+
private readonly router;
|
|
9
|
+
private readonly settingService;
|
|
10
|
+
private readonly platform;
|
|
11
|
+
private readonly toastService;
|
|
12
|
+
private activatedRoute;
|
|
13
|
+
subscription: Subscription;
|
|
14
|
+
data: import("@angular/core").WritableSignal<import("@acorex/platform/common").AXPSettingDefinitionGroup[] | null>;
|
|
15
|
+
isMobile: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
+
fullRoute: string;
|
|
17
|
+
activatedGroup: import("@angular/core").WritableSignal<string | undefined>;
|
|
18
|
+
dataDetails: import("@angular/core").Signal<AXPGroupDetails | null>;
|
|
19
|
+
formattedData: import("@angular/core").WritableSignal<AXTreeViewSchema[]>;
|
|
20
|
+
constructor();
|
|
21
|
+
initializeService(activatedRoute: ActivatedRoute): Promise<void>;
|
|
22
|
+
ngOnDestroy(): void;
|
|
23
|
+
getData(): Promise<void>;
|
|
24
|
+
fetchGroupDetails(groupName: string): AXPGroupDetails | null;
|
|
25
|
+
private updateGroupParam;
|
|
26
|
+
onChooseGroup(item: AXTreeItemClickBaseEvent): void;
|
|
27
|
+
context: import("@angular/core").WritableSignal<Record<any, any>>;
|
|
28
|
+
previousContext: import("@angular/core").WritableSignal<Record<any, any>>;
|
|
29
|
+
setContext(value: any): void;
|
|
30
|
+
isSaving: import("@angular/core").WritableSignal<boolean>;
|
|
31
|
+
canCancel: import("@angular/core").Signal<boolean>;
|
|
32
|
+
canSave: import("@angular/core").Signal<boolean>;
|
|
33
|
+
onSaveSettings(): Promise<void>;
|
|
34
|
+
onCancelSettings(): void;
|
|
35
|
+
private isObjectEmpty;
|
|
36
|
+
private areObjectsEqual;
|
|
11
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPSettingsViewModel, never>;
|
|
12
38
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXPSettingsViewModel>;
|
|
13
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/platform",
|
|
3
|
-
"version": "18.2.
|
|
3
|
+
"version": "18.2.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": ">=18.0.0",
|
|
6
6
|
"@angular/core": ">=18.0.0",
|
|
@@ -45,6 +45,12 @@
|
|
|
45
45
|
"esm": "./esm2022/auth/acorex-platform-auth.mjs",
|
|
46
46
|
"default": "./fesm2022/acorex-platform-auth.mjs"
|
|
47
47
|
},
|
|
48
|
+
"./common": {
|
|
49
|
+
"types": "./common/index.d.ts",
|
|
50
|
+
"esm2022": "./esm2022/common/acorex-platform-common.mjs",
|
|
51
|
+
"esm": "./esm2022/common/acorex-platform-common.mjs",
|
|
52
|
+
"default": "./fesm2022/acorex-platform-common.mjs"
|
|
53
|
+
},
|
|
48
54
|
"./layouts": {
|
|
49
55
|
"types": "./layouts/index.d.ts",
|
|
50
56
|
"esm2022": "./esm2022/layouts/acorex-platform-layouts.mjs",
|
|
@@ -57,12 +63,6 @@
|
|
|
57
63
|
"esm": "./esm2022/native/acorex-platform-native.mjs",
|
|
58
64
|
"default": "./fesm2022/acorex-platform-native.mjs"
|
|
59
65
|
},
|
|
60
|
-
"./common": {
|
|
61
|
-
"types": "./common/index.d.ts",
|
|
62
|
-
"esm2022": "./esm2022/common/acorex-platform-common.mjs",
|
|
63
|
-
"esm": "./esm2022/common/acorex-platform-common.mjs",
|
|
64
|
-
"default": "./fesm2022/acorex-platform-common.mjs"
|
|
65
|
-
},
|
|
66
66
|
"./core": {
|
|
67
67
|
"types": "./core/index.d.ts",
|
|
68
68
|
"esm2022": "./esm2022/core/acorex-platform-core.mjs",
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "@
|
|
3
|
-
import * as i2 from "@acorex/platform/
|
|
4
|
-
import * as i3 from "@acorex/platform/themes/shared";
|
|
2
|
+
import * as i1 from "@acorex/platform/common";
|
|
3
|
+
import * as i2 from "@acorex/platform/themes/shared";
|
|
5
4
|
export declare class AXPDefaultThemeModule {
|
|
6
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPDefaultThemeModule, never>;
|
|
7
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXPDefaultThemeModule, never, [typeof i1.
|
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXPDefaultThemeModule, never, [typeof i1.AXPCommonModule, typeof i2.AXPThemesSharedModule], never>;
|
|
8
7
|
static ɵinj: i0.ɵɵInjectorDeclaration<AXPDefaultThemeModule>;
|
|
9
8
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { AXValueChangedEvent } from '@acorex/components/common';
|
|
2
|
+
import { AXPSettingsService } from '@acorex/platform/common';
|
|
2
3
|
import { AXPEntityMasterListViewModel } from '@acorex/platform/layout/entity';
|
|
3
4
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
4
5
|
import { EventEmitter } from '@angular/core';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
export declare class AXPListViewOptionsColumnsComponent {
|
|
8
|
+
protected settings: AXPSettingsService;
|
|
7
9
|
vm: AXPEntityMasterListViewModel;
|
|
8
10
|
onClosed: EventEmitter<void>;
|
|
11
|
+
columnsChanged: import("@angular/core").EffectRef;
|
|
9
12
|
handleVisibilityChange(e: AXValueChangedEvent<boolean>, name: string): void;
|
|
10
13
|
protected drop(event: CdkDragDrop<unknown[]>): void;
|
|
11
14
|
protected handleClose(): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './setting-
|
|
2
|
-
export * from './setting-
|
|
1
|
+
export * from './setting-menu/setting-menu.component';
|
|
2
|
+
export * from './setting-view/setting-view.component';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AXTreeViewComponent } from '@acorex/components/tree-view';
|
|
2
|
+
import { AXPSettingsViewModel } from '@acorex/platform/layout/setting';
|
|
3
|
+
import { ActivatedRoute } from '@angular/router';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class AXPSettingsMenuComponent {
|
|
6
|
+
settings: AXPSettingsViewModel;
|
|
7
|
+
activatedRoute: ActivatedRoute;
|
|
8
|
+
tree: import("@angular/core").Signal<AXTreeViewComponent | undefined>;
|
|
9
|
+
constructor();
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPSettingsMenuComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPSettingsMenuComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AXPSettingsViewModel } from '@acorex/platform/layout/setting';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class AXPSettingsViewComponent {
|
|
4
|
+
settings: AXPSettingsViewModel;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPSettingsViewComponent, never>;
|
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPSettingsViewComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
7
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { AXClickEvent } from '@acorex/components/common';
|
|
2
1
|
import { AXPWidgetComponent } from '@acorex/platform/layout/builder';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
export declare class AXPCronJobWidgetEditComponent extends AXPWidgetComponent<any> {
|
|
5
|
-
getExpressionHandler(e:
|
|
4
|
+
getExpressionHandler(e: any): void;
|
|
6
5
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPCronJobWidgetEditComponent, never>;
|
|
7
6
|
static ɵcmp: i0.ɵɵComponentDeclaration<AXPCronJobWidgetEditComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
8
7
|
}
|
|
@@ -17,7 +17,7 @@ export declare class AXPWorkflowService {
|
|
|
17
17
|
private evaluateCondition;
|
|
18
18
|
private evaluateSingleCondition;
|
|
19
19
|
private evaluateExpression;
|
|
20
|
-
processInputs
|
|
20
|
+
private processInputs;
|
|
21
21
|
private createFunctionScope;
|
|
22
22
|
private getFunctionInstance;
|
|
23
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowService, never>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export const routes = [
|
|
2
|
-
{
|
|
3
|
-
path: 'error',
|
|
4
|
-
children: [
|
|
5
|
-
{
|
|
6
|
-
path: 'offline',
|
|
7
|
-
loadComponent: () => import('./pages/errors/error-offline/error-offline.component').then(c => c.AXPErrorOfflineComponent),
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
path: '404',
|
|
11
|
-
loadComponent: () => import('./pages/errors/error-404/error-404.component').then(c => c.AXPError404Component),
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
path: '401',
|
|
15
|
-
loadComponent: () => import('./pages/errors/error-401/error-401.component').then(c => c.AXPError401Component),
|
|
16
|
-
},
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
];
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5b3V0LnJvdXRlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvcGxhdGZvcm0vdGhlbWVzL2RlZmF1bHQvc3JjL2xpYi9sYXlvdXQucm91dGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE1BQU0sQ0FBQyxNQUFNLE1BQU0sR0FBWTtJQUMzQjtRQUNJLElBQUksRUFBRSxPQUFPO1FBQ2IsUUFBUSxFQUFFO1lBQ047Z0JBQ0ksSUFBSSxFQUFFLFNBQVM7Z0JBQ2YsYUFBYSxFQUFFLEdBQUcsRUFBRSxDQUFDLE1BQU0sQ0FBQyxzREFBc0QsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyx3QkFBd0IsQ0FBQzthQUM1SDtZQUNEO2dCQUNJLElBQU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gICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgcGF0aDogJzQwMScsXG4gICAgICAgICAgICAgICAgbG9hZENvbXBvbmVudDogKCkgPT4gaW1wb3J0KCcuL3BhZ2VzL2Vycm9ycy9lcnJvci00MDEvZXJyb3ItNDAxLmNvbXBvbmVudCcpLnRoZW4oYyA9PiBjLkFYUEVycm9yNDAxQ29tcG9uZW50KSxcbiAgICAgICAgICAgIH0sXG4gICAgICAgIF1cbiAgICB9LFxuXTtcbiJdfQ==
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Converts a list of AXPSettingDefinitionGroup into a tree structure of AXTreeViewSchema.
|
|
3
|
-
* This function processes groups and their nested sub-groups, recursively creating a tree.
|
|
4
|
-
*
|
|
5
|
-
* @param groups - Array of top-level setting groups to be converted into tree view schema.
|
|
6
|
-
* @param parentId - The parent ID for nested groups, passed down recursively. (Optional, default is undefined)
|
|
7
|
-
*
|
|
8
|
-
* @returns An array of AXTreeViewSchema representing the hierarchical structure of groups.
|
|
9
|
-
*/
|
|
10
|
-
export function convertToTreeViewSchema(groups, parentId) {
|
|
11
|
-
// Helper function to traverse and convert a single group (and its sub-groups)
|
|
12
|
-
const traverseGroups = (group, parent) => {
|
|
13
|
-
const currentId = group.name;
|
|
14
|
-
// Schema for the current group
|
|
15
|
-
const schema = {
|
|
16
|
-
id: currentId, // Unique identifier for the group (using group name)
|
|
17
|
-
parentId: parent, // Parent group ID, passed down recursively
|
|
18
|
-
text: group.title, // Display title of the group
|
|
19
|
-
tooltip: group.description, // Optional description as tooltip
|
|
20
|
-
hasChild: group.groups.length > 0, // Whether the group has child groups
|
|
21
|
-
isExpanded: false, // Default state for expansion (optional)
|
|
22
|
-
childrens: group.groups.length > 0 ? [] : undefined, // Child groups array (undefined if no children)
|
|
23
|
-
};
|
|
24
|
-
// Recursively process nested groups (sub-groups inside the current group)
|
|
25
|
-
group.groups.forEach((subGroup) => {
|
|
26
|
-
const childSchema = traverseGroups(subGroup, currentId); // Create schema for sub-group
|
|
27
|
-
schema.childrens?.push(childSchema); // Add the child schema to the parent group's children
|
|
28
|
-
});
|
|
29
|
-
return schema; // Return the group schema with its children (if any)
|
|
30
|
-
};
|
|
31
|
-
// Initialize an array to hold the top-level groups' schemas
|
|
32
|
-
const treeViewSchemas = [];
|
|
33
|
-
// Process each top-level group and convert it into tree view schema
|
|
34
|
-
groups.forEach((group) => {
|
|
35
|
-
treeViewSchemas.push(traverseGroups(group, parentId)); // Add the schema for each group
|
|
36
|
-
});
|
|
37
|
-
// Return the resulting hierarchical structure
|
|
38
|
-
return treeViewSchemas;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Converts nested groups into breadcrumb-like paths.
|
|
42
|
-
* Each path represents the hierarchy of group names leading to a specific group.
|
|
43
|
-
*
|
|
44
|
-
* @param groups - The input array of AXPSettingDefinitionGroup.
|
|
45
|
-
* @param basePath - The current path prefix (optional, default is an empty array).
|
|
46
|
-
*
|
|
47
|
-
* @returns An array of paths where each path is an array of strings representing the breadcrumb.
|
|
48
|
-
*/
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udmVydC1zZXR0aW5nLWRhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL3BsYXRmb3JtL3RoZW1lcy9kZWZhdWx0L3NyYy9saWIvbGF5b3V0cy9zZXR0aW5nLWxheW91dC9jb252ZXJ0LXNldHRpbmctZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQTs7Ozs7Ozs7R0FRRztBQUNILE1BQU0sVUFBVSx1QkFBdUIsQ0FDckMsTUFBbUMsRUFDbkMsUUFBMEI7SUFFMUIsOEVBQThFO0lBQzlFLE1BQU0sY0FBYyxHQUFHLENBQUMsS0FBZ0MsRUFBRSxNQUF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