@acorex-platform/module-workflow-management-client 0.0.32 → 0.0.37
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/fesm2022/{acorex-platform-module-workflow-management-client-acorex-platform-module-workflow-management-client-B_Sl7G2v.mjs → acorex-platform-module-workflow-management-client-acorex-platform-module-workflow-management-client-CKudtLpx.mjs} +14 -14
- package/fesm2022/{acorex-platform-module-workflow-management-client-acorex-platform-module-workflow-management-client-B_Sl7G2v.mjs.map → acorex-platform-module-workflow-management-client-acorex-platform-module-workflow-management-client-CKudtLpx.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-column.component-BPa0Sh6Z.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-activity-command-configurator-widget-edit.component-DuYGXzAL.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-activity-category.mjs +200 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-activity-category.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-activity-definition.mjs +333 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-activity-definition.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-automation.mjs +357 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-automation.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-workflow-definition.mjs +394 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-workflow-definition.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-workflow-instance.mjs +336 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entities-workflow-instance.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-acorex-platform-module-workflow-management-client-contracts-entity-catalog-DKDogTU7.mjs +103 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-acorex-platform-module-workflow-management-client-contracts-entity-catalog-DKDogTU7.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-activity-category.entity-1EWdojoP.mjs +120 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-activity-category.entity-1EWdojoP.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-activity-definition.entity-DYoF3vVe.mjs +253 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-activity-definition.entity-DYoF3vVe.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-automation.entity-DbJeeZpQ.mjs +277 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-automation.entity-DbJeeZpQ.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-workflow-definition.entity-BVSAGT0z.mjs +314 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-workflow-definition.entity-BVSAGT0z.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-workflow-instance.entity-BEA4WQX2.mjs +256 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog-workflow-instance.entity-BEA4WQX2.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog.mjs +2 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts-entity-catalog.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow-with-input.command-BFdyJ4rC.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-execute-workflow.command-Cfdm1QAy.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-workflow-management-client-index-CttfExOC.mjs → acorex-platform-module-workflow-management-client-index-BKMDbQ8Z.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-workflow-management-client-index-CttfExOC.mjs.map → acorex-platform-module-workflow-management-client-index-BKMDbQ8Z.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-workflow-management-client-index-DKZTLui4.mjs → acorex-platform-module-workflow-management-client-index-C3pkrctS.mjs} +2 -4
- package/fesm2022/acorex-platform-module-workflow-management-client-index-C3pkrctS.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-C8nsbDAw.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-local-entities.mjs +33 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-local-entities.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-save-workflow-definition-activities.command-spFF77AO.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-activity-instance-rows.utils-CMVZYS4y.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-column.component-D0E2zjIA.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-configurator-widget-edit.component-CVTeOv-q.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-live-dashboard.queries--9NtYkau.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-BWOyivC5.mjs → acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-DbeueT-X.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-BWOyivC5.mjs.map → acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-DbeueT-X.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-timeline-tab.component-AnJ-Pywf.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client-workflow-run-history-visual-tab.component-Bw68Jwcb.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-workflow-management-client-workflow-task-popover.component-Cg4gODGo.mjs → acorex-platform-module-workflow-management-client-workflow-task-popover.component-Y9rWe3O6.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-workflow-management-client-workflow-task-popover.component-Cg4gODGo.mjs.map → acorex-platform-module-workflow-management-client-workflow-task-popover.component-Y9rWe3O6.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-workflow-management-client.mjs +1 -1
- package/package.json +30 -2
- package/types/acorex-platform-module-workflow-management-client-contracts-entities-activity-category.d.ts +6 -0
- package/types/acorex-platform-module-workflow-management-client-contracts-entities-activity-definition.d.ts +5 -0
- package/types/acorex-platform-module-workflow-management-client-contracts-entities-automation.d.ts +5 -0
- package/types/acorex-platform-module-workflow-management-client-contracts-entities-workflow-definition.d.ts +5 -0
- package/types/acorex-platform-module-workflow-management-client-contracts-entities-workflow-instance.d.ts +5 -0
- package/types/acorex-platform-module-workflow-management-client-contracts-entity-catalog.d.ts +10 -0
- package/types/acorex-platform-module-workflow-management-client-local-entities.d.ts +12 -0
- package/fesm2022/acorex-platform-module-workflow-management-client-index-DKZTLui4.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-workflow-management-client-workflow-configurator-widget-edit.component-CVTeOv-q.mjs","sources":["../../../../libs/modules/workflow-management/client/src/lib/features/workflow-configurator/workflow-configurator.utils.ts","../../../../libs/modules/workflow-management/client/src/lib/features/workflow-configurator/workflow-configurator.component.ts","../../../../libs/modules/workflow-management/client/src/lib/features/workflow-configurator/workflow-configurator-widget-edit.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport type { AXPWidgetProperty, AXPWidgetPropertyGroup } from '@acorex-platform/framework-shared/widget-core';\nimport { type AXPProperty, AXPSystemStatusType } from '@acorex-platform/framework-shared/core';\nimport { AXTranslationService } from '@acorex/core/translation';\n\nimport { mapAXPPropertyToWidgetProperty } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXDataSourceFilterOption } from '@acorex/cdk/common';\n\nimport { castArray, get, isString } from 'lodash';\nimport type {\n WorkflowConfiguratorCatalogScopeFilter,\n WorkflowConfiguratorTemplateInputFilter,\n} from './workflow-configurator.types';\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Workflow inputs normally supplied when a run is started from runtime context, not on the template. */\nexport const WORKFLOW_CONFIGURATOR_RUNTIME_INPUT_NAMES = new Set([\n 'employeeId',\n 'employeeDisplayName',\n 'eventTypeId',\n 'eventTypeTitle',\n 'recordTypeId',\n 'recordTypeTitle',\n 'effectiveDate',\n 'assessmentCaseTitle',\n 'targetEmployeeStatusId',\n]);\n\n//#endregion\n\n//#region ---- Catalog scope matching ----\n\nexport interface WorkflowConfiguratorCatalogScopeRow {\n name?: string;\n catalogScopeKeys?: string[];\n catalogScopes?: Array<{ name?: string }>;\n}\n\n/**\n * Resolves catalog scope keys from persisted row shape (keys or enriched scopes).\n */\nexport function resolveWorkflowCatalogScopeKeys(row: WorkflowConfiguratorCatalogScopeRow): string[] {\n const keys = new Set<string>();\n\n for (const key of row.catalogScopeKeys ?? []) {\n if (isString(key) && key.trim()) {\n keys.add(key.trim());\n }\n }\n\n for (const scope of row.catalogScopes ?? []) {\n const name = scope?.name?.trim();\n if (name) {\n keys.add(name);\n }\n }\n\n return [...keys];\n}\n\n/**\n * Builds a workflow list filter from registered scope key names.\n */\nexport function workflowConfiguratorCatalogScopeFilterFromKeys(\n catalogScopeKeys: string | string[] | undefined,\n): WorkflowConfiguratorCatalogScopeFilter | undefined {\n const anyOf = castArray(catalogScopeKeys ?? [])\n .filter((k) => isString(k) && k.trim().length > 0)\n .map((k) => k.trim());\n\n return anyOf.length > 0 ? { anyOf } : undefined;\n}\n\n/**\n * Query filter for published workflow definitions, optionally restricted by catalog scope keys.\n */\nexport function buildWorkflowConfiguratorListQueryFilter(\n scopeFilter: WorkflowConfiguratorCatalogScopeFilter | undefined,\n): AXDataSourceFilterOption {\n const publishedFilter: AXDataSourceFilterOption = {\n field: 'statusId',\n operator: { type: 'equal' },\n value: AXPSystemStatusType.Published,\n };\n\n const anyOf = scopeFilter?.anyOf?.map((k) => k.trim()).filter(Boolean) ?? [];\n if (anyOf.length === 0) {\n return publishedFilter;\n }\n\n return {\n logic: 'and',\n filters: [\n publishedFilter,\n {\n logic: 'or',\n filters: anyOf.map((scopeKey) => ({\n field: 'catalogScopeKeys',\n operator: { type: 'contains' },\n value: scopeKey,\n })),\n },\n ],\n };\n}\n\n/**\n * Returns true when the row's catalog scope keys satisfy the configurator filter.\n */\nexport function matchesWorkflowConfiguratorCatalogScopeFilter(\n catalogScopeKeys: string[] | undefined,\n filter: WorkflowConfiguratorCatalogScopeFilter | undefined,\n): boolean {\n if (!filter) {\n return true;\n }\n\n const keys = (catalogScopeKeys ?? []).filter((k) => isString(k) && k.trim().length > 0);\n if (filter.keyPrefix?.trim()) {\n const prefix = filter.keyPrefix.trim();\n if (!keys.some((k) => k.startsWith(prefix))) {\n return false;\n }\n }\n\n const anyOf = filter.anyOf?.map((k) => k.trim()).filter(Boolean) ?? [];\n if (anyOf.length > 0 && !anyOf.some((scope) => keys.includes(scope))) {\n return false;\n }\n\n const allOf = filter.allOf?.map((k) => k.trim()).filter(Boolean) ?? [];\n if (allOf.length > 0 && !allOf.every((scope) => keys.includes(scope))) {\n return false;\n }\n\n return true;\n}\n\nfunction mergeTemplateInputCatalogScopeFilter(\n property: AXPProperty,\n templateInputFilters?: Record<string, WorkflowConfiguratorTemplateInputFilter>,\n): AXPProperty {\n const name = property.name?.trim();\n if (!name || !templateInputFilters) {\n return property;\n }\n\n const scopeFilter = templateInputFilters[name]?.catalogScopeKeys;\n if (!scopeFilter) {\n return property;\n }\n\n const values = castArray(scopeFilter).filter((v) => isString(v) && v.trim().length > 0);\n if (values.length === 0) {\n return property;\n }\n\n const iface = property.interface;\n if (!iface?.options) {\n return property;\n }\n\n const existingFilter = get(iface.options, 'filter');\n const scopeConditions = values.map((value) => ({\n field: 'catalogScopeKeys',\n operator: { type: 'contains' as const },\n value,\n }));\n\n const mergedFilter =\n scopeConditions.length === 1\n ? scopeConditions[0]\n : { logic: 'or' as const, filters: scopeConditions };\n\n return {\n ...property,\n interface: {\n ...iface,\n options: {\n ...iface.options,\n filter: existingFilter\n ? { logic: 'and', filters: [existingFilter, mergedFilter] }\n : mergedFilter,\n },\n },\n };\n}\n\n//#endregion\n\n//#region ---- Mapping ----\n\n/**\n * Maps workflow definition `inputs` to property viewer rows for {@link AXPItemConfiguratorComponent}.\n */\nexport function mapWorkflowInputsToWidgetProperties(\n inputs: AXPProperty[] | undefined,\n translation: AXTranslationService,\n templateInputNames?: string[],\n templateInputFilters?: Record<string, WorkflowConfiguratorTemplateInputFilter>,\n): AXPWidgetProperty[] {\n const list = inputs ?? [];\n const allowSet =\n templateInputNames && templateInputNames.length > 0\n ? new Set(templateInputNames)\n : null;\n\n const group: AXPWidgetPropertyGroup = {\n name: 'workflow-template-inputs',\n title: '@workflow-management:workflow-configurator.configure.group-title',\n order: 0,\n };\n\n const filtered = list.filter((property) => {\n const name = property.name?.trim();\n if (!name) {\n return false;\n }\n if (allowSet) {\n return allowSet.has(name);\n }\n return !WORKFLOW_CONFIGURATOR_RUNTIME_INPUT_NAMES.has(name);\n });\n\n return filtered.map((property, index) =>\n mapAXPPropertyToWidgetProperty(\n mergeTemplateInputCatalogScopeFilter(property, templateInputFilters),\n {\n group,\n order: index,\n valuePathPrefix: 'options',\n resolveTitle: (prop) =>\n typeof prop.title === 'string'\n ? prop.title\n : (translation.resolve(prop.title) ?? prop.name),\n resolveDescription: (prop) =>\n prop.description === undefined\n ? undefined\n : typeof prop.description === 'string'\n ? prop.description\n : translation.resolve(prop.description),\n },\n ),\n );\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPItemConfiguratorComponent, ItemConfiguratorListItem } from '@acorex-platform/framework-client/layout/components';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n model,\n signal,\n untracked,\n} from '@angular/core';\nimport { isEqual } from 'lodash';\nimport type { AXMWorkflowManagementWorkflowDefinitionEntityModel } from '@acorex-platform/module-workflow-management-client/contracts';\nimport { RootConfig } from '@acorex-platform/module-workflow-management-client/contracts';\nimport type {\n WorkflowConfiguratorCatalogScopeFilter,\n WorkflowConfiguratorTemplateInputFilter,\n WorkflowConfiguratorValue,\n} from './workflow-configurator.types';\nimport {\n buildWorkflowConfiguratorListQueryFilter,\n mapWorkflowInputsToWidgetProperties,\n matchesWorkflowConfiguratorCatalogScopeFilter,\n resolveWorkflowCatalogScopeKeys,\n type WorkflowConfiguratorCatalogScopeRow,\n} from './workflow-configurator.utils';\n\n//#endregion\n\n//#region ---- Types ----\n\ntype WorkflowDefinitionListRow = Pick<\n AXMWorkflowManagementWorkflowDefinitionEntityModel,\n 'id' | 'name' | 'title' | 'description' | 'inputs' | 'catalogScopeKeys' | 'catalogScopes'\n>;\n\n//#endregion\n\n//#region ---- Component ----\n\n/**\n * Select a workflow definition and configure template-time inputs via {@link AXPItemConfiguratorComponent}.\n */\n@Component({\n selector: 'axm-workflow-configurator',\n template: `\n <axp-item-configurator\n [(selectedItemId)]=\"selectedWorkflowIdModel\"\n [(values)]=\"defaultInputModel\"\n [label]=\"label()\"\n [readonly]=\"readonly()\"\n [items]=\"configuratorItems()\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'flex flex-col',\n '[attr.readonly]': 'readonly() ? \"\" : null',\n },\n styles: [\n `@reference '@acorex/styles/themes/default.css';\n\n :host([readonly]) {\n pointer-events: none;\n opacity: 0.7;\n }\n `,\n ],\n imports: [AXPItemConfiguratorComponent],\n})\nexport class AXMWorkflowConfiguratorComponent {\n //#region ---- Inputs ----\n\n value = model<WorkflowConfiguratorValue>({\n workflowDefinitionId: '',\n workflowName: '',\n defaultInput: {},\n });\n\n label = input<string>('@workflow-management:workflow-configurator.label');\n\n readonly = input<boolean>(false);\n\n /**\n * When set, only these workflow input names are configurable; otherwise runtime inputs are excluded by default.\n */\n templateInputNames = input<string[] | undefined>(undefined);\n\n /**\n * Limits workflow definitions to rows whose {@link catalogScopeKeys} match (e.g. HR lifecycle).\n */\n catalogScopeFilter = input<WorkflowConfiguratorCatalogScopeFilter | undefined>(undefined);\n\n /**\n * Per template input lookup filters (e.g. `questionnaireId` → HR catalog scopes).\n */\n templateInputFilters = input<Record<string, WorkflowConfiguratorTemplateInputFilter> | undefined>(\n undefined,\n );\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly translation = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Class Properties ----\n\n protected selectedWorkflowIdModel = model<string>('');\n\n protected defaultInputModel = model<Record<string, unknown>>({});\n\n protected workflows = signal<WorkflowDefinitionListRow[]>([]);\n\n protected configuratorItems = computed<ItemConfiguratorListItem[]>(() => {\n const names = this.templateInputNames();\n const inputFilters = this.templateInputFilters();\n return this.workflows().map((row) => ({\n id: row.id,\n title: (row.title ?? row.name) as ItemConfiguratorListItem['title'],\n icon: 'fa-light fa-diagram-project',\n description: row.description as ItemConfiguratorListItem['description'],\n propertyDefinitions: mapWorkflowInputsToWidgetProperties(\n row.inputs,\n this.translation,\n names,\n inputFilters,\n ),\n }));\n });\n\n //#endregion\n\n //#region ---- Lifecycle ----\n\n constructor() {\n effect(() => {\n this.catalogScopeFilter();\n untracked(() => {\n void this.loadWorkflowDefinitions();\n });\n });\n\n /** Sync inner models from bound `value` only (context/discard); never from model edits. */\n effect(() => {\n const v = this.value();\n const id = v?.workflowDefinitionId?.trim() ?? '';\n const defaults = v?.defaultInput ?? {};\n\n untracked(() => {\n if (this.selectedWorkflowIdModel() !== id) {\n this.selectedWorkflowIdModel.set(id);\n }\n if (!isEqual(this.defaultInputModel(), defaults)) {\n this.defaultInputModel.set({ ...defaults });\n }\n });\n });\n\n effect(() => {\n const id = this.selectedWorkflowIdModel();\n const defaults = this.defaultInputModel();\n const row = this.workflows().find((w) => w.id === id);\n const current = untracked(() => this.value());\n\n const next: WorkflowConfiguratorValue = {\n workflowDefinitionId: id,\n workflowName:\n row?.name?.trim() ??\n (current.workflowDefinitionId === id ? (current.workflowName?.trim() ?? '') : ''),\n defaultInput: { ...defaults },\n };\n\n const normalizedCurrent: WorkflowConfiguratorValue = {\n workflowDefinitionId: current.workflowDefinitionId?.trim() ?? '',\n workflowName: current.workflowName?.trim() ?? '',\n defaultInput: current.defaultInput ?? {},\n };\n\n if (!isEqual(next, normalizedCurrent)) {\n untracked(() => this.value.set(next));\n }\n });\n }\n\n //#endregion\n\n //#region ---- Data loading ----\n\n /**\n * List queries may omit heavy fields; template input definitions require full `inputs`.\n */\n private async hydrateWorkflowDefinitionRow(\n row: WorkflowDefinitionListRow,\n ): Promise<WorkflowDefinitionListRow> {\n if ((row.inputs?.length ?? 0) > 0) {\n return row;\n }\n\n const id = row.id?.trim();\n if (!id) {\n return row;\n }\n\n try {\n const full = (await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.workflowDefinition.name)\n .data()\n .byKey(id)) as WorkflowDefinitionListRow | null;\n\n if (!full?.id) {\n return row;\n }\n\n return {\n ...row,\n ...full,\n inputs: full.inputs ?? row.inputs,\n };\n } catch {\n return row;\n }\n }\n\n private async loadWorkflowDefinitions(): Promise<void> {\n try {\n const scopeFilter = this.catalogScopeFilter();\n const page = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.workflowDefinition.name)\n .data()\n .query({\n skip: 0,\n take: 500,\n filter: buildWorkflowConfiguratorListQueryFilter(scopeFilter),\n });\n\n const rows = (page.items ?? []) as WorkflowDefinitionListRow[];\n const pinnedId = this.value()?.workflowDefinitionId?.trim();\n\n const filtered = rows\n .filter((r) => !!r.id?.trim() && !!r.name?.trim())\n .filter((r) => {\n if (!scopeFilter) {\n return true;\n }\n if (pinnedId && r.id === pinnedId) {\n return true;\n }\n const keys = resolveWorkflowCatalogScopeKeys(r as WorkflowConfiguratorCatalogScopeRow);\n return matchesWorkflowConfiguratorCatalogScopeFilter(keys, scopeFilter);\n })\n .sort((a, b) => {\n const ta = this.translation.resolve(a.title).trim() || a.name;\n const tb = this.translation.resolve(b.title).trim() || b.name;\n return ta.localeCompare(tb, this.translation.getActiveLang(), { sensitivity: 'base' });\n });\n\n const hydrated = await Promise.all(filtered.map((row) => this.hydrateWorkflowDefinitionRow(row)));\n\n if (pinnedId && !hydrated.some((r) => r.id === pinnedId)) {\n try {\n const pinned = (await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.workflowDefinition.name)\n .data()\n .byKey(pinnedId)) as WorkflowDefinitionListRow | null;\n if (pinned?.id) {\n hydrated.unshift(await this.hydrateWorkflowDefinitionRow(pinned));\n }\n } catch {\n /* keep list as filtered */\n }\n }\n\n this.workflows.set(hydrated);\n } catch {\n this.workflows.set([]);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { isFormValueEqual } from '@acorex-platform/framework-shared/core';\nimport { ChangeDetectionStrategy, Component, computed, effect, model, signal, untracked } from '@angular/core';\nimport { cloneDeep, isEqual } from 'lodash';\nimport { AXMWorkflowConfiguratorComponent } from './workflow-configurator.component';\nimport type {\n WorkflowConfiguratorCatalogScopeFilter,\n WorkflowConfiguratorTemplateInputFilter,\n WorkflowConfiguratorValue,\n} from './workflow-configurator.types';\nimport { workflowConfiguratorCatalogScopeFilterFromKeys } from './workflow-configurator.utils';\n\n//#endregion\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axm-workflow-configurator-widget-edit',\n template: `\n @if (isInitialized()) {\n <axm-workflow-configurator\n [(value)]=\"valueModel\"\n [label]=\"label()\"\n [readonly]=\"readonly()\"\n [templateInputNames]=\"templateInputNames()\"\n [catalogScopeFilter]=\"catalogScopeFilter()\"\n [templateInputFilters]=\"templateInputFilters()\"\n />\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXMWorkflowConfiguratorComponent],\n})\nexport class AXMWorkflowConfiguratorWidgetEditComponent extends AXPValueWidgetComponent<WorkflowConfiguratorValue> {\n //#region ---- Computed Properties ----\n\n protected readonly readonly = computed<boolean>(() => (this.options()['readonly'] as boolean) ?? false);\n\n protected label = computed<string>(\n () => (this.options()['label'] as string) || '@workflow-management:workflow-configurator.label',\n );\n\n protected templateInputNames = computed<string[] | undefined>(() => {\n const raw = this.options()['templateInputNames'];\n return Array.isArray(raw) ? (raw as string[]) : undefined;\n });\n\n protected catalogScopeFilter = computed<WorkflowConfiguratorCatalogScopeFilter | undefined>(() => {\n const fromKeys = workflowConfiguratorCatalogScopeFilterFromKeys(\n this.options()['catalogScopeKeys'] as string | string[] | undefined,\n );\n if (fromKeys) {\n return fromKeys;\n }\n\n const raw = this.options()['catalogScopeFilter'];\n return raw && typeof raw === 'object' ? (raw as WorkflowConfiguratorCatalogScopeFilter) : undefined;\n });\n\n protected templateInputFilters = computed<\n Record<string, WorkflowConfiguratorTemplateInputFilter> | undefined\n >(() => {\n const raw = this.options()['templateInputFilters'];\n return raw && typeof raw === 'object'\n ? (raw as Record<string, WorkflowConfiguratorTemplateInputFilter>)\n : undefined;\n });\n\n //#endregion\n\n //#region ---- State Signals ----\n\n protected isInitialized = signal(false);\n\n //#endregion\n\n //#region ---- Models ----\n\n protected valueModel = model<WorkflowConfiguratorValue>({\n workflowDefinitionId: '',\n workflowName: '',\n defaultInput: {},\n });\n\n //#endregion\n\n //#region ---- Effects ----\n\n private syncValueToConfigurator = effect(() => {\n const value = this.getValue();\n\n const normalized = normalizeWorkflowConfiguratorValue(value);\n const currentModel = untracked(() => this.valueModel());\n\n if (!isEqual(normalized, currentModel)) {\n untracked(() => {\n this.valueModel.set(normalized);\n });\n }\n\n untracked(() => {\n if (!this.isInitialized()) {\n this.isInitialized.set(true);\n }\n });\n });\n\n private syncConfiguratorToValue = effect(() => {\n const modelValue = this.valueModel();\n\n if (!untracked(() => this.isInitialized())) {\n return;\n }\n\n const normalized = normalizeWorkflowConfiguratorValue(modelValue);\n const payload = isEmptyWorkflowConfiguratorValue(normalized)\n ? null\n : {\n workflowDefinitionId: normalized.workflowDefinitionId.trim(),\n workflowName: normalized.workflowName.trim(),\n defaultInput: cloneDeep(normalized.defaultInput ?? {}),\n };\n\n const currentValue = untracked(() => this.getValue());\n if (!isFormValueEqual(payload, currentValue)) {\n untracked(() => {\n this.setValue(payload);\n });\n }\n });\n\n //#endregion\n}\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction normalizeWorkflowConfiguratorValue(value: unknown): WorkflowConfiguratorValue {\n if (value && typeof value === 'object' && 'workflowDefinitionId' in value) {\n const v = value as WorkflowConfiguratorValue;\n return {\n workflowDefinitionId: v.workflowDefinitionId ?? '',\n workflowName: v.workflowName ?? '',\n defaultInput: v.defaultInput ?? {},\n };\n }\n\n return { workflowDefinitionId: '', workflowName: '', defaultInput: {} };\n}\n\nfunction isEmptyWorkflowConfiguratorValue(value: WorkflowConfiguratorValue): boolean {\n const id = value.workflowDefinitionId?.trim() ?? '';\n const name = value.workflowName?.trim() ?? '';\n const defaults = value.defaultInput ?? {};\n const hasDefaults = Object.keys(defaults).some((key) => {\n const entry = defaults[key];\n return entry !== null && entry !== undefined && entry !== '';\n });\n return !id && !name && !hasDefaults;\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AAeA;AAEA;AAEA;AACO,MAAM,yCAAyC,GAAG,IAAI,GAAG,CAAC;IAC/D,YAAY;IACZ,qBAAqB;IACrB,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,qBAAqB;IACrB,wBAAwB;AACzB,CAAA,CAAC;AAYF;;AAEG;AACG,SAAU,+BAA+B,CAAC,GAAwC,EAAA;AACtF,IAAA,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU;IAE9B,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,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AK,SAAS,IAAI,KAAK,KAAK,EAAE;AAC9D,IAAA,CAAC,CAAC;IACF,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW;AACrC;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-workflow-management-client-workflow-configurator-widget-edit.component-CVTeOv-q.mjs","sources":["../../../../libs/modules/workflow-management/client/src/lib/features/workflow-configurator/workflow-configurator.utils.ts","../../../../libs/modules/workflow-management/client/src/lib/features/workflow-configurator/workflow-configurator.component.ts","../../../../libs/modules/workflow-management/client/src/lib/features/workflow-configurator/workflow-configurator-widget-edit.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport type { AXPWidgetProperty, AXPWidgetPropertyGroup } from '@acorex-platform/framework-shared/widget-core';\nimport { type AXPProperty, AXPSystemStatusType } from '@acorex-platform/framework-shared/core';\nimport { AXTranslationService } from '@acorex/core/translation';\n\nimport { mapAXPPropertyToWidgetProperty } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXDataSourceFilterOption } from '@acorex/cdk/common';\n\nimport { castArray, get, isString } from 'lodash';\nimport type {\n WorkflowConfiguratorCatalogScopeFilter,\n WorkflowConfiguratorTemplateInputFilter,\n} from './workflow-configurator.types';\n\n//#endregion\n\n//#region ---- Constants ----\n\n/** Workflow inputs normally supplied when a run is started from runtime context, not on the template. */\nexport const WORKFLOW_CONFIGURATOR_RUNTIME_INPUT_NAMES = new Set([\n 'employeeId',\n 'employeeDisplayName',\n 'eventTypeId',\n 'eventTypeTitle',\n 'recordTypeId',\n 'recordTypeTitle',\n 'effectiveDate',\n 'assessmentCaseTitle',\n 'targetEmployeeStatusId',\n]);\n\n//#endregion\n\n//#region ---- Catalog scope matching ----\n\nexport interface WorkflowConfiguratorCatalogScopeRow {\n name?: string;\n catalogScopeKeys?: string[];\n catalogScopes?: Array<{ name?: string }>;\n}\n\n/**\n * Resolves catalog scope keys from persisted row shape (keys or enriched scopes).\n */\nexport function resolveWorkflowCatalogScopeKeys(row: WorkflowConfiguratorCatalogScopeRow): string[] {\n const keys = new Set<string>();\n\n for (const key of row.catalogScopeKeys ?? []) {\n if (isString(key) && key.trim()) {\n keys.add(key.trim());\n }\n }\n\n for (const scope of row.catalogScopes ?? []) {\n const name = scope?.name?.trim();\n if (name) {\n keys.add(name);\n }\n }\n\n return [...keys];\n}\n\n/**\n * Builds a workflow list filter from registered scope key names.\n */\nexport function workflowConfiguratorCatalogScopeFilterFromKeys(\n catalogScopeKeys: string | string[] | undefined,\n): WorkflowConfiguratorCatalogScopeFilter | undefined {\n const anyOf = castArray(catalogScopeKeys ?? [])\n .filter((k) => isString(k) && k.trim().length > 0)\n .map((k) => k.trim());\n\n return anyOf.length > 0 ? { anyOf } : undefined;\n}\n\n/**\n * Query filter for published workflow definitions, optionally restricted by catalog scope keys.\n */\nexport function buildWorkflowConfiguratorListQueryFilter(\n scopeFilter: WorkflowConfiguratorCatalogScopeFilter | undefined,\n): AXDataSourceFilterOption {\n const publishedFilter: AXDataSourceFilterOption = {\n field: 'statusId',\n operator: { type: 'equal' },\n value: AXPSystemStatusType.Published,\n };\n\n const anyOf = scopeFilter?.anyOf?.map((k) => k.trim()).filter(Boolean) ?? [];\n if (anyOf.length === 0) {\n return publishedFilter;\n }\n\n return {\n logic: 'and',\n filters: [\n publishedFilter,\n {\n logic: 'or',\n filters: anyOf.map((scopeKey) => ({\n field: 'catalogScopeKeys',\n operator: { type: 'contains' },\n value: scopeKey,\n })),\n },\n ],\n };\n}\n\n/**\n * Returns true when the row's catalog scope keys satisfy the configurator filter.\n */\nexport function matchesWorkflowConfiguratorCatalogScopeFilter(\n catalogScopeKeys: string[] | undefined,\n filter: WorkflowConfiguratorCatalogScopeFilter | undefined,\n): boolean {\n if (!filter) {\n return true;\n }\n\n const keys = (catalogScopeKeys ?? []).filter((k) => isString(k) && k.trim().length > 0);\n if (filter.keyPrefix?.trim()) {\n const prefix = filter.keyPrefix.trim();\n if (!keys.some((k) => k.startsWith(prefix))) {\n return false;\n }\n }\n\n const anyOf = filter.anyOf?.map((k) => k.trim()).filter(Boolean) ?? [];\n if (anyOf.length > 0 && !anyOf.some((scope) => keys.includes(scope))) {\n return false;\n }\n\n const allOf = filter.allOf?.map((k) => k.trim()).filter(Boolean) ?? [];\n if (allOf.length > 0 && !allOf.every((scope) => keys.includes(scope))) {\n return false;\n }\n\n return true;\n}\n\nfunction mergeTemplateInputCatalogScopeFilter(\n property: AXPProperty,\n templateInputFilters?: Record<string, WorkflowConfiguratorTemplateInputFilter>,\n): AXPProperty {\n const name = property.name?.trim();\n if (!name || !templateInputFilters) {\n return property;\n }\n\n const scopeFilter = templateInputFilters[name]?.catalogScopeKeys;\n if (!scopeFilter) {\n return property;\n }\n\n const values = castArray(scopeFilter).filter((v) => isString(v) && v.trim().length > 0);\n if (values.length === 0) {\n return property;\n }\n\n const iface = property.interface;\n if (!iface?.options) {\n return property;\n }\n\n const existingFilter = get(iface.options, 'filter');\n const scopeConditions = values.map((value) => ({\n field: 'catalogScopeKeys',\n operator: { type: 'contains' as const },\n value,\n }));\n\n const mergedFilter =\n scopeConditions.length === 1\n ? scopeConditions[0]\n : { logic: 'or' as const, filters: scopeConditions };\n\n return {\n ...property,\n interface: {\n ...iface,\n options: {\n ...iface.options,\n filter: existingFilter\n ? { logic: 'and', filters: [existingFilter, mergedFilter] }\n : mergedFilter,\n },\n },\n };\n}\n\n//#endregion\n\n//#region ---- Mapping ----\n\n/**\n * Maps workflow definition `inputs` to property viewer rows for {@link AXPItemConfiguratorComponent}.\n */\nexport function mapWorkflowInputsToWidgetProperties(\n inputs: AXPProperty[] | undefined,\n translation: AXTranslationService,\n templateInputNames?: string[],\n templateInputFilters?: Record<string, WorkflowConfiguratorTemplateInputFilter>,\n): AXPWidgetProperty[] {\n const list = inputs ?? [];\n const allowSet =\n templateInputNames && templateInputNames.length > 0\n ? new Set(templateInputNames)\n : null;\n\n const group: AXPWidgetPropertyGroup = {\n name: 'workflow-template-inputs',\n title: '@workflow-management:workflow-configurator.configure.group-title',\n order: 0,\n };\n\n const filtered = list.filter((property) => {\n const name = property.name?.trim();\n if (!name) {\n return false;\n }\n if (allowSet) {\n return allowSet.has(name);\n }\n return !WORKFLOW_CONFIGURATOR_RUNTIME_INPUT_NAMES.has(name);\n });\n\n return filtered.map((property, index) =>\n mapAXPPropertyToWidgetProperty(\n mergeTemplateInputCatalogScopeFilter(property, templateInputFilters),\n {\n group,\n order: index,\n valuePathPrefix: 'options',\n resolveTitle: (prop) =>\n typeof prop.title === 'string'\n ? prop.title\n : (translation.resolve(prop.title) ?? prop.name),\n resolveDescription: (prop) =>\n prop.description === undefined\n ? undefined\n : typeof prop.description === 'string'\n ? prop.description\n : translation.resolve(prop.description),\n },\n ),\n );\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPItemConfiguratorComponent, ItemConfiguratorListItem } from '@acorex-platform/framework-client/layout/components';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n model,\n signal,\n untracked,\n} from '@angular/core';\nimport { isEqual } from 'lodash';\nimport type { AXMWorkflowManagementWorkflowDefinitionEntityModel } from '@acorex-platform/module-workflow-management-client/contracts';\nimport { RootConfig } from '@acorex-platform/module-workflow-management-client/contracts';\nimport type {\n WorkflowConfiguratorCatalogScopeFilter,\n WorkflowConfiguratorTemplateInputFilter,\n WorkflowConfiguratorValue,\n} from './workflow-configurator.types';\nimport {\n buildWorkflowConfiguratorListQueryFilter,\n mapWorkflowInputsToWidgetProperties,\n matchesWorkflowConfiguratorCatalogScopeFilter,\n resolveWorkflowCatalogScopeKeys,\n type WorkflowConfiguratorCatalogScopeRow,\n} from './workflow-configurator.utils';\n\n//#endregion\n\n//#region ---- Types ----\n\ntype WorkflowDefinitionListRow = Pick<\n AXMWorkflowManagementWorkflowDefinitionEntityModel,\n 'id' | 'name' | 'title' | 'description' | 'inputs' | 'catalogScopeKeys' | 'catalogScopes'\n>;\n\n//#endregion\n\n//#region ---- Component ----\n\n/**\n * Select a workflow definition and configure template-time inputs via {@link AXPItemConfiguratorComponent}.\n */\n@Component({\n selector: 'axm-workflow-configurator',\n template: `\n <axp-item-configurator\n [(selectedItemId)]=\"selectedWorkflowIdModel\"\n [(values)]=\"defaultInputModel\"\n [label]=\"label()\"\n [readonly]=\"readonly()\"\n [items]=\"configuratorItems()\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'flex flex-col',\n '[attr.readonly]': 'readonly() ? \"\" : null',\n },\n styles: [\n `@reference '@acorex/styles/themes/default.css';\n\n :host([readonly]) {\n pointer-events: none;\n opacity: 0.7;\n }\n `,\n ],\n imports: [AXPItemConfiguratorComponent],\n})\nexport class AXMWorkflowConfiguratorComponent {\n //#region ---- Inputs ----\n\n value = model<WorkflowConfiguratorValue>({\n workflowDefinitionId: '',\n workflowName: '',\n defaultInput: {},\n });\n\n label = input<string>('@workflow-management:workflow-configurator.label');\n\n readonly = input<boolean>(false);\n\n /**\n * When set, only these workflow input names are configurable; otherwise runtime inputs are excluded by default.\n */\n templateInputNames = input<string[] | undefined>(undefined);\n\n /**\n * Limits workflow definitions to rows whose {@link catalogScopeKeys} match (e.g. HR lifecycle).\n */\n catalogScopeFilter = input<WorkflowConfiguratorCatalogScopeFilter | undefined>(undefined);\n\n /**\n * Per template input lookup filters (e.g. `questionnaireId` → HR catalog scopes).\n */\n templateInputFilters = input<Record<string, WorkflowConfiguratorTemplateInputFilter> | undefined>(\n undefined,\n );\n\n //#endregion\n\n //#region ---- Services & Dependencies ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly translation = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- Class Properties ----\n\n protected selectedWorkflowIdModel = model<string>('');\n\n protected defaultInputModel = model<Record<string, unknown>>({});\n\n protected workflows = signal<WorkflowDefinitionListRow[]>([]);\n\n protected configuratorItems = computed<ItemConfiguratorListItem[]>(() => {\n const names = this.templateInputNames();\n const inputFilters = this.templateInputFilters();\n return this.workflows().map((row) => ({\n id: row.id,\n title: (row.title ?? row.name) as ItemConfiguratorListItem['title'],\n icon: 'fa-light fa-diagram-project',\n description: row.description as ItemConfiguratorListItem['description'],\n propertyDefinitions: mapWorkflowInputsToWidgetProperties(\n row.inputs,\n this.translation,\n names,\n inputFilters,\n ),\n }));\n });\n\n //#endregion\n\n //#region ---- Lifecycle ----\n\n constructor() {\n effect(() => {\n this.catalogScopeFilter();\n untracked(() => {\n void this.loadWorkflowDefinitions();\n });\n });\n\n /** Sync inner models from bound `value` only (context/discard); never from model edits. */\n effect(() => {\n const v = this.value();\n const id = v?.workflowDefinitionId?.trim() ?? '';\n const defaults = v?.defaultInput ?? {};\n\n untracked(() => {\n if (this.selectedWorkflowIdModel() !== id) {\n this.selectedWorkflowIdModel.set(id);\n }\n if (!isEqual(this.defaultInputModel(), defaults)) {\n this.defaultInputModel.set({ ...defaults });\n }\n });\n });\n\n effect(() => {\n const id = this.selectedWorkflowIdModel();\n const defaults = this.defaultInputModel();\n const row = this.workflows().find((w) => w.id === id);\n const current = untracked(() => this.value());\n\n const next: WorkflowConfiguratorValue = {\n workflowDefinitionId: id,\n workflowName:\n row?.name?.trim() ??\n (current.workflowDefinitionId === id ? (current.workflowName?.trim() ?? '') : ''),\n defaultInput: { ...defaults },\n };\n\n const normalizedCurrent: WorkflowConfiguratorValue = {\n workflowDefinitionId: current.workflowDefinitionId?.trim() ?? '',\n workflowName: current.workflowName?.trim() ?? '',\n defaultInput: current.defaultInput ?? {},\n };\n\n if (!isEqual(next, normalizedCurrent)) {\n untracked(() => this.value.set(next));\n }\n });\n }\n\n //#endregion\n\n //#region ---- Data loading ----\n\n /**\n * List queries may omit heavy fields; template input definitions require full `inputs`.\n */\n private async hydrateWorkflowDefinitionRow(\n row: WorkflowDefinitionListRow,\n ): Promise<WorkflowDefinitionListRow> {\n if ((row.inputs?.length ?? 0) > 0) {\n return row;\n }\n\n const id = row.id?.trim();\n if (!id) {\n return row;\n }\n\n try {\n const full = (await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.workflowDefinition.name)\n .data()\n .byKey(id)) as WorkflowDefinitionListRow | null;\n\n if (!full?.id) {\n return row;\n }\n\n return {\n ...row,\n ...full,\n inputs: full.inputs ?? row.inputs,\n };\n } catch {\n return row;\n }\n }\n\n private async loadWorkflowDefinitions(): Promise<void> {\n try {\n const scopeFilter = this.catalogScopeFilter();\n const page = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.workflowDefinition.name)\n .data()\n .query({\n skip: 0,\n take: 500,\n filter: buildWorkflowConfiguratorListQueryFilter(scopeFilter),\n });\n\n const rows = (page.items ?? []) as WorkflowDefinitionListRow[];\n const pinnedId = this.value()?.workflowDefinitionId?.trim();\n\n const filtered = rows\n .filter((r) => !!r.id?.trim() && !!r.name?.trim())\n .filter((r) => {\n if (!scopeFilter) {\n return true;\n }\n if (pinnedId && r.id === pinnedId) {\n return true;\n }\n const keys = resolveWorkflowCatalogScopeKeys(r as WorkflowConfiguratorCatalogScopeRow);\n return matchesWorkflowConfiguratorCatalogScopeFilter(keys, scopeFilter);\n })\n .sort((a, b) => {\n const ta = this.translation.resolve(a.title).trim() || a.name;\n const tb = this.translation.resolve(b.title).trim() || b.name;\n return ta.localeCompare(tb, this.translation.getActiveLang(), { sensitivity: 'base' });\n });\n\n const hydrated = await Promise.all(filtered.map((row) => this.hydrateWorkflowDefinitionRow(row)));\n\n if (pinnedId && !hydrated.some((r) => r.id === pinnedId)) {\n try {\n const pinned = (await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.workflowDefinition.name)\n .data()\n .byKey(pinnedId)) as WorkflowDefinitionListRow | null;\n if (pinned?.id) {\n hydrated.unshift(await this.hydrateWorkflowDefinitionRow(pinned));\n }\n } catch {\n /* keep list as filtered */\n }\n }\n\n this.workflows.set(hydrated);\n } catch {\n this.workflows.set([]);\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { isFormValueEqual } from '@acorex-platform/framework-shared/core';\nimport { ChangeDetectionStrategy, Component, computed, effect, model, signal, untracked } from '@angular/core';\nimport { cloneDeep, isEqual } from 'lodash';\nimport { AXMWorkflowConfiguratorComponent } from './workflow-configurator.component';\nimport type {\n WorkflowConfiguratorCatalogScopeFilter,\n WorkflowConfiguratorTemplateInputFilter,\n WorkflowConfiguratorValue,\n} from './workflow-configurator.types';\nimport { workflowConfiguratorCatalogScopeFilterFromKeys } from './workflow-configurator.utils';\n\n//#endregion\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axm-workflow-configurator-widget-edit',\n template: `\n @if (isInitialized()) {\n <axm-workflow-configurator\n [(value)]=\"valueModel\"\n [label]=\"label()\"\n [readonly]=\"readonly()\"\n [templateInputNames]=\"templateInputNames()\"\n [catalogScopeFilter]=\"catalogScopeFilter()\"\n [templateInputFilters]=\"templateInputFilters()\"\n />\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXMWorkflowConfiguratorComponent],\n})\nexport class AXMWorkflowConfiguratorWidgetEditComponent extends AXPValueWidgetComponent<WorkflowConfiguratorValue> {\n //#region ---- Computed Properties ----\n\n protected readonly readonly = computed<boolean>(() => (this.options()['readonly'] as boolean) ?? false);\n\n protected label = computed<string>(\n () => (this.options()['label'] as string) || '@workflow-management:workflow-configurator.label',\n );\n\n protected templateInputNames = computed<string[] | undefined>(() => {\n const raw = this.options()['templateInputNames'];\n return Array.isArray(raw) ? (raw as string[]) : undefined;\n });\n\n protected catalogScopeFilter = computed<WorkflowConfiguratorCatalogScopeFilter | undefined>(() => {\n const fromKeys = workflowConfiguratorCatalogScopeFilterFromKeys(\n this.options()['catalogScopeKeys'] as string | string[] | undefined,\n );\n if (fromKeys) {\n return fromKeys;\n }\n\n const raw = this.options()['catalogScopeFilter'];\n return raw && typeof raw === 'object' ? (raw as WorkflowConfiguratorCatalogScopeFilter) : undefined;\n });\n\n protected templateInputFilters = computed<\n Record<string, WorkflowConfiguratorTemplateInputFilter> | undefined\n >(() => {\n const raw = this.options()['templateInputFilters'];\n return raw && typeof raw === 'object'\n ? (raw as Record<string, WorkflowConfiguratorTemplateInputFilter>)\n : undefined;\n });\n\n //#endregion\n\n //#region ---- State Signals ----\n\n protected isInitialized = signal(false);\n\n //#endregion\n\n //#region ---- Models ----\n\n protected valueModel = model<WorkflowConfiguratorValue>({\n workflowDefinitionId: '',\n workflowName: '',\n defaultInput: {},\n });\n\n //#endregion\n\n //#region ---- Effects ----\n\n private syncValueToConfigurator = effect(() => {\n const value = this.getValue();\n\n const normalized = normalizeWorkflowConfiguratorValue(value);\n const currentModel = untracked(() => this.valueModel());\n\n if (!isEqual(normalized, currentModel)) {\n untracked(() => {\n this.valueModel.set(normalized);\n });\n }\n\n untracked(() => {\n if (!this.isInitialized()) {\n this.isInitialized.set(true);\n }\n });\n });\n\n private syncConfiguratorToValue = effect(() => {\n const modelValue = this.valueModel();\n\n if (!untracked(() => this.isInitialized())) {\n return;\n }\n\n const normalized = normalizeWorkflowConfiguratorValue(modelValue);\n const payload = isEmptyWorkflowConfiguratorValue(normalized)\n ? null\n : {\n workflowDefinitionId: normalized.workflowDefinitionId.trim(),\n workflowName: normalized.workflowName.trim(),\n defaultInput: cloneDeep(normalized.defaultInput ?? {}),\n };\n\n const currentValue = untracked(() => this.getValue());\n if (!isFormValueEqual(payload, currentValue)) {\n untracked(() => {\n this.setValue(payload);\n });\n }\n });\n\n //#endregion\n}\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction normalizeWorkflowConfiguratorValue(value: unknown): WorkflowConfiguratorValue {\n if (value && typeof value === 'object' && 'workflowDefinitionId' in value) {\n const v = value as WorkflowConfiguratorValue;\n return {\n workflowDefinitionId: v.workflowDefinitionId ?? '',\n workflowName: v.workflowName ?? '',\n defaultInput: v.defaultInput ?? {},\n };\n }\n\n return { workflowDefinitionId: '', workflowName: '', defaultInput: {} };\n}\n\nfunction isEmptyWorkflowConfiguratorValue(value: WorkflowConfiguratorValue): boolean {\n const id = value.workflowDefinitionId?.trim() ?? '';\n const name = value.workflowName?.trim() ?? '';\n const defaults = value.defaultInput ?? {};\n const hasDefaults = Object.keys(defaults).some((key) => {\n const entry = defaults[key];\n return entry !== null && entry !== undefined && entry !== '';\n });\n return !id && !name && !hasDefaults;\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAAA;AAeA;AAEA;AAEA;AACO,MAAM,yCAAyC,GAAG,IAAI,GAAG,CAAC;IAC/D,YAAY;IACZ,qBAAqB;IACrB,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,iBAAiB;IACjB,eAAe;IACf,qBAAqB;IACrB,wBAAwB;AACzB,CAAA,CAAC;AAYF;;AAEG;AACG,SAAU,+BAA+B,CAAC,GAAwC,EAAA;AACtF,IAAA,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU;IAE9B,KAAK,MAAM,GAAG,IAAI,GAAG,CAAC,gBAAgB,IAAI,EAAE,EAAE;QAC5C,IAAI,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,EAAE;YAC/B,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QACtB;IACF;IAEA,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,aAAa,IAAI,EAAE,EAAE;QAC3C,MAAM,IAAI,GAAG,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE;QAChC,IAAI,IAAI,EAAE;AACR,YAAA,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;QAChB;IACF;AAEA,IAAA,OAAO,CAAC,GAAG,IAAI,CAAC;AAClB;AAEA;;AAEG;AACG,SAAU,8CAA8C,CAC5D,gBAA+C,EAAA;AAE/C,IAAA,MAAM,KAAK,GAAG,SAAS,CAAC,gBAAgB,IAAI,EAAE;AAC3C,SAAA,MAAM,CAAC,CAAC,CAAC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CAAC,YAAY,IAAI,EAAE;AAClC,YAAA,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,EAAE;SACnC;IACH;AAEA,IAAA,OAAO,EAAE,oBAAoB,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;AACzE;AAEA,SAAS,gCAAgC,CAAC,KAAgC,EAAA;IACxE,MAAM,EAAE,GAAG,KAAK,CAAC,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE;IACnD,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE;AAC7C,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,YAAY,IAAI,EAAE;AACzC,IAAA,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAI;AACrD,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC;QAC3B,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;AAC9D,IAAA,CAAC,CAAC;IACF,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW;AACrC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-workflow-management-client-workflow-live-dashboard.queries--9NtYkau.mjs","sources":["../../../../libs/modules/workflow-management/client/src/lib/features/dashboard-queries/workflow-dashboard-data.util.ts","../../../../libs/modules/workflow-management/client/src/lib/features/dashboard-queries/workflow-live-dashboard.queries.ts"],"sourcesContent":["/**\n * Shared helpers for live WorkflowManagement dashboard queries.\n */\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\n\n//#region ----- Constants -----\n\nexport const WORKFLOW_DASHBOARD_CHART_COLORS = [\n '#43b57f',\n '#3b82f6',\n '#f59e0b',\n '#ef4444',\n '#8b5cf6',\n '#0ea5e9',\n '#64748b',\n] as const;\n\n//#endregion\n\n//#region ----- Entity helpers -----\n\nexport async function queryEntityTotal(\n entityService: AXPEntityService,\n moduleName: string,\n entityName: string,\n): Promise<number> {\n const data = entityService.withEntity(moduleName, entityName).data();\n const result = await data.query({ skip: 0, take: 1 });\n return typeof result.total === 'number' ? result.total : (result.items?.length ?? 0);\n}\n\nexport async function queryEntityItems(\n entityService: AXPEntityService,\n moduleName: string,\n entityName: string,\n take = 5000,\n): Promise<Record<string, unknown>[]> {\n const data = entityService.withEntity(moduleName, entityName).data();\n const result = await data.query({ skip: 0, take });\n return (result.items ?? []) as unknown as Record<string, unknown>[];\n}\n\nexport function resolveDisplayTitle(value: unknown): string {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n if (typeof value === 'object' && !Array.isArray(value)) {\n const map = value as Record<string, string>;\n return map['en-US'] || map['fa-IR'] || Object.values(map).find((v) => typeof v === 'string' && v) || '';\n }\n return String(value);\n}\n\nexport function titleCaseToken(value: string): string {\n if (!value) {\n return 'Unknown';\n }\n return value\n .split(/[-_]/)\n .filter(Boolean)\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(' ');\n}\n\nexport function countByKey(\n items: Record<string, unknown>[],\n keyFn: (item: Record<string, unknown>) => string,\n): Map<string, number> {\n const counts = new Map<string, number>();\n for (const item of items) {\n const key = keyFn(item) || 'unknown';\n counts.set(key, (counts.get(key) ?? 0) + 1);\n }\n return counts;\n}\n\nexport function mapCountsToSeries(\n counts: Map<string, number>,\n labelFn: (key: string) => string = titleCaseToken,\n): Array<{ id: string; label: string; value: number; color: string }> {\n return [...counts.entries()]\n .sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))\n .map(([key, value], index) => ({\n id: key,\n label: labelFn(key),\n value,\n color: WORKFLOW_DASHBOARD_CHART_COLORS[index % WORKFLOW_DASHBOARD_CHART_COLORS.length],\n }));\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type {\n AXPBarChartQueryResult,\n AXPDonutChartQueryResult,\n AXPGaugeChartQueryResult,\n AXPKpiStatCardQueryResult,\n} from '@acorex-platform/module-dashboard-management-client/contracts';\nimport { Injectable, inject } from '@angular/core';\n\nimport {\n countByKey,\n mapCountsToSeries,\n queryEntityItems,\n queryEntityTotal,\n resolveDisplayTitle,\n titleCaseToken,\n} from './workflow-dashboard-data.util';\n\n//#endregion\n\n//#region ----- KPI -----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowDefinitionsKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'WorkflowManagement', 'WorkflowDefinition');\n return runtimeQuerySuccessObject({\n title: 'Workflow Definitions',\n value,\n icon: 'fa-light fa-diagram-project',\n iconTone: 'primary',\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load workflow definitions KPI',\n );\n }\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowActivitiesKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'WorkflowManagement', 'ActivityDefinition');\n return runtimeQuerySuccessObject({\n title: 'Activity Definitions',\n value,\n icon: 'fa-light fa-puzzle-piece',\n iconTone: 'info',\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load activity definitions KPI',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Charts -----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowDefinitionsByStatusBarQuery implements AXPQuery<void, AXPBarChartQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPBarChartQueryResult> {\n try {\n const definitions = await queryEntityItems(\n this.entityService,\n 'WorkflowManagement',\n 'WorkflowDefinition',\n );\n const counts = countByKey(definitions, (row) =>\n String(row['statusId'] ?? row['status'] ?? 'unknown'),\n );\n return runtimeQuerySuccessObject({ items: mapCountsToSeries(counts) });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load definitions by status',\n );\n }\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowActivitiesByCategoryDonutQuery\n implements AXPQuery<void, AXPDonutChartQueryResult>\n{\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPDonutChartQueryResult> {\n try {\n const activities = await queryEntityItems(\n this.entityService,\n 'WorkflowManagement',\n 'ActivityDefinition',\n );\n const counts = countByKey(activities, (row) => {\n const category = row['category'];\n if (typeof category === 'object' && category) {\n const cat = category as { id?: string; name?: string; title?: unknown };\n const title = resolveDisplayTitle(cat.title);\n if (title) {\n return title;\n }\n if (cat.name) {\n return titleCaseToken(String(cat.name));\n }\n if (cat.id) {\n return String(cat.id);\n }\n }\n return String(row['categoryId'] ?? 'Uncategorized');\n });\n return runtimeQuerySuccessObject({ items: mapCountsToSeries(counts, (k) => k) });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load activities by category',\n );\n }\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowPublishedDefinitionsGaugeQuery\n implements AXPQuery<void, AXPGaugeChartQueryResult>\n{\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPGaugeChartQueryResult> {\n try {\n const definitions = await queryEntityItems(\n this.entityService,\n 'WorkflowManagement',\n 'WorkflowDefinition',\n );\n if (definitions.length === 0) {\n return runtimeQuerySuccessObject({ value: 0 });\n }\n const published = definitions.filter((row) => {\n const status = String(row['statusId'] ?? row['status'] ?? '').toLowerCase();\n return status === 'published';\n }).length;\n return runtimeQuerySuccessObject({\n value: Math.round((published / definitions.length) * 100),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load published definitions gauge',\n );\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;;AAEG;AAIH;AAEO,MAAM,+BAA+B,GAAG;IAC7C,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;CACD;AAEV;AAEA;AAEO,eAAe,gBAAgB,CACpC,aAA+B,EAC/B,UAAkB,EAClB,UAAkB,EAAA;AAElB,IAAA,MAAM,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE;AACpE,IAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACrD,OAAO,OAAO,MAAM,CAAC,KAAK,KAAK,QAAQ,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,CAAC;AACtF;AAEO,eAAe,gBAAgB,CACpC,aAA+B,EAC/B,UAAkB,EAClB,UAAkB,EAClB,IAAI,GAAG,IAAI,EAAA;AAEX,IAAA,MAAM,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,IAAI,EAAE;AACpE,IAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;AAClD,IAAA,QAAQ,MAAM,CAAC,KAAK,IAAI,EAAE;AAC5B;AAEM,SAAU,mBAAmB,CAAC,KAAc,EAA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AAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yCAAyC,cAD5B,MAAM,EAAA,CAAA,CAAA;;2FACnB,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBADrD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-workflow-management-client-workflow-live-dashboard.queries--9NtYkau.mjs","sources":["../../../../libs/modules/workflow-management/client/src/lib/features/dashboard-queries/workflow-dashboard-data.util.ts","../../../../libs/modules/workflow-management/client/src/lib/features/dashboard-queries/workflow-live-dashboard.queries.ts"],"sourcesContent":["/**\n * Shared helpers for live WorkflowManagement dashboard queries.\n */\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\n\n//#region ----- Constants -----\n\nexport const WORKFLOW_DASHBOARD_CHART_COLORS = [\n '#43b57f',\n '#3b82f6',\n '#f59e0b',\n '#ef4444',\n '#8b5cf6',\n '#0ea5e9',\n '#64748b',\n] as const;\n\n//#endregion\n\n//#region ----- Entity helpers -----\n\nexport async function queryEntityTotal(\n entityService: AXPEntityService,\n moduleName: string,\n entityName: string,\n): Promise<number> {\n const data = entityService.withEntity(moduleName, entityName).data();\n const result = await data.query({ skip: 0, take: 1 });\n return typeof result.total === 'number' ? result.total : (result.items?.length ?? 0);\n}\n\nexport async function queryEntityItems(\n entityService: AXPEntityService,\n moduleName: string,\n entityName: string,\n take = 5000,\n): Promise<Record<string, unknown>[]> {\n const data = entityService.withEntity(moduleName, entityName).data();\n const result = await data.query({ skip: 0, take });\n return (result.items ?? []) as unknown as Record<string, unknown>[];\n}\n\nexport function resolveDisplayTitle(value: unknown): string {\n if (value == null) {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n if (typeof value === 'object' && !Array.isArray(value)) {\n const map = value as Record<string, string>;\n return map['en-US'] || map['fa-IR'] || Object.values(map).find((v) => typeof v === 'string' && v) || '';\n }\n return String(value);\n}\n\nexport function titleCaseToken(value: string): string {\n if (!value) {\n return 'Unknown';\n }\n return value\n .split(/[-_]/)\n .filter(Boolean)\n .map((part) => part.charAt(0).toUpperCase() + part.slice(1))\n .join(' ');\n}\n\nexport function countByKey(\n items: Record<string, unknown>[],\n keyFn: (item: Record<string, unknown>) => string,\n): Map<string, number> {\n const counts = new Map<string, number>();\n for (const item of items) {\n const key = keyFn(item) || 'unknown';\n counts.set(key, (counts.get(key) ?? 0) + 1);\n }\n return counts;\n}\n\nexport function mapCountsToSeries(\n counts: Map<string, number>,\n labelFn: (key: string) => string = titleCaseToken,\n): Array<{ id: string; label: string; value: number; color: string }> {\n return [...counts.entries()]\n .sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))\n .map(([key, value], index) => ({\n id: key,\n label: labelFn(key),\n value,\n color: WORKFLOW_DASHBOARD_CHART_COLORS[index % WORKFLOW_DASHBOARD_CHART_COLORS.length],\n }));\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport {\n runtimeQueryFailure,\n runtimeQuerySuccessObject,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPQuery, type AXPQueryFetchResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type {\n AXPBarChartQueryResult,\n AXPDonutChartQueryResult,\n AXPGaugeChartQueryResult,\n AXPKpiStatCardQueryResult,\n} from '@acorex-platform/module-dashboard-management-client/contracts';\nimport { Injectable, inject } from '@angular/core';\n\nimport {\n countByKey,\n mapCountsToSeries,\n queryEntityItems,\n queryEntityTotal,\n resolveDisplayTitle,\n titleCaseToken,\n} from './workflow-dashboard-data.util';\n\n//#endregion\n\n//#region ----- KPI -----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowDefinitionsKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'WorkflowManagement', 'WorkflowDefinition');\n return runtimeQuerySuccessObject({\n title: 'Workflow Definitions',\n value,\n icon: 'fa-light fa-diagram-project',\n iconTone: 'primary',\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load workflow definitions KPI',\n );\n }\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowActivitiesKpiQuery implements AXPQuery<void, AXPKpiStatCardQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPKpiStatCardQueryResult> {\n try {\n const value = await queryEntityTotal(this.entityService, 'WorkflowManagement', 'ActivityDefinition');\n return runtimeQuerySuccessObject({\n title: 'Activity Definitions',\n value,\n icon: 'fa-light fa-puzzle-piece',\n iconTone: 'info',\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load activity definitions KPI',\n );\n }\n }\n}\n\n//#endregion\n\n//#region ----- Charts -----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowDefinitionsByStatusBarQuery implements AXPQuery<void, AXPBarChartQueryResult> {\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPBarChartQueryResult> {\n try {\n const definitions = await queryEntityItems(\n this.entityService,\n 'WorkflowManagement',\n 'WorkflowDefinition',\n );\n const counts = countByKey(definitions, (row) =>\n String(row['statusId'] ?? row['status'] ?? 'unknown'),\n );\n return runtimeQuerySuccessObject({ items: mapCountsToSeries(counts) });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load definitions by status',\n );\n }\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowActivitiesByCategoryDonutQuery\n implements AXPQuery<void, AXPDonutChartQueryResult>\n{\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPDonutChartQueryResult> {\n try {\n const activities = await queryEntityItems(\n this.entityService,\n 'WorkflowManagement',\n 'ActivityDefinition',\n );\n const counts = countByKey(activities, (row) => {\n const category = row['category'];\n if (typeof category === 'object' && category) {\n const cat = category as { id?: string; name?: string; title?: unknown };\n const title = resolveDisplayTitle(cat.title);\n if (title) {\n return title;\n }\n if (cat.name) {\n return titleCaseToken(String(cat.name));\n }\n if (cat.id) {\n return String(cat.id);\n }\n }\n return String(row['categoryId'] ?? 'Uncategorized');\n });\n return runtimeQuerySuccessObject({ items: mapCountsToSeries(counts, (k) => k) });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load activities by category',\n );\n }\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMWorkflowPublishedDefinitionsGaugeQuery\n implements AXPQuery<void, AXPGaugeChartQueryResult>\n{\n private readonly entityService = inject(AXPEntityService);\n\n async fetch(): AXPQueryFetchResultPromise<AXPGaugeChartQueryResult> {\n try {\n const definitions = await queryEntityItems(\n this.entityService,\n 'WorkflowManagement',\n 'WorkflowDefinition',\n );\n if (definitions.length === 0) {\n return runtimeQuerySuccessObject({ value: 0 });\n }\n const published = definitions.filter((row) => {\n const status = String(row['statusId'] ?? row['status'] ?? '').toLowerCase();\n return status === 'published';\n }).length;\n return runtimeQuerySuccessObject({\n value: Math.round((published / definitions.length) * 100),\n });\n } catch (error) {\n return runtimeQueryFailure(\n error instanceof Error ? error.message : 'Failed to load published definitions gauge',\n );\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAAA;;AAEG;AAIH;AAEO,MAAM,+BAA+B,GAAG;IAC7C,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;IACT,SAAS;CACD;AAEV;AAEA;AA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
|
|
|
18
18
|
import { AXPEntityService, AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';
|
|
19
19
|
import { AXPActivityDefinitionService, AXPWorkflowDefinitionService, WorkflowExpressionScopeService } from '@acorex-platform/framework-client/workflow';
|
|
20
20
|
import { toString, get } from 'lodash';
|
|
21
|
-
import { b as buildWorkflowTaskDisplayParamsFromWorkflowState, d as buildWorkflowTaskDisplayParams, r as rehydrateWorkflowStateInputTitles } from './acorex-platform-module-workflow-management-client-acorex-platform-module-workflow-management-client-
|
|
21
|
+
import { b as buildWorkflowTaskDisplayParamsFromWorkflowState, d as buildWorkflowTaskDisplayParams, r as rehydrateWorkflowStateInputTitles } from './acorex-platform-module-workflow-management-client-acorex-platform-module-workflow-management-client-CKudtLpx.mjs';
|
|
22
22
|
import { f as formatReadableActivityName } from './acorex-platform-module-workflow-management-client-workflow-activity-instance-rows.utils-CMVZYS4y.mjs';
|
|
23
23
|
|
|
24
24
|
//#region ---- Imports ----
|
|
@@ -563,7 +563,7 @@ class AXMWorkflowRunHistoryPopupComponent extends AXBasePageComponent {
|
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMWorkflowRunHistoryPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
566
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMWorkflowRunHistoryPopupComponent, isStandalone: true, selector: "axm-workflow-run-history-popup", inputs: { __popup__: { classPropertyName: "__popup__", publicName: "__popup__", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<ax-content>\n <div class=\"axm-workflow-run-history-popup\">\n <div class=\"axm-workflow-run-history-popup__sticky\">\n <div class=\"axm-workflow-run-history-popup__sticky-bar\">\n @if (summary().reporter || summary().startedAt) {\n <div class=\"axm-workflow-run-history-popup__overview\" role=\"list\">\n @if (summary().reporter) {\n <div class=\"axm-workflow-run-history-popup__overview-item\" role=\"listitem\">\n <span class=\"axm-workflow-run-history-popup__overview-k\">\n {{ '@workflow-management:workflow-run.history.field.reporter' | translate | async }}\n </span>\n <span class=\"axm-workflow-run-history-popup__overview-v\" [textContent]=\"summary().reporter\"></span>\n </div>\n }\n @if (summary().startedAt) {\n <div class=\"axm-workflow-run-history-popup__overview-item\" role=\"listitem\">\n <span class=\"axm-workflow-run-history-popup__overview-k\">\n {{ '@workflow-management:workflow-run.history.field.started-at' | translate | async }}\n </span>\n <span class=\"axm-workflow-run-history-popup__overview-v\">\n {{ summary().startedAt | format: 'datetime' : 'short' | async }}\n </span>\n </div>\n }\n </div>\n }\n\n <ax-tabs\n class=\"axm-workflow-run-history-popup__tabs\"\n [look]=\"'with-line'\"\n (onActiveTabChanged)=\"handleTabChange($event)\"\n >\n <ax-tab-item\n [key]=\"'timeline'\"\n [text]=\"('@workflow-management:workflow-run.history.tabs.timeline.title' | translate | async)!\"\n [active]=\"activeTabIndex() === 0\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-list-timeline\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n <ax-tab-item\n [key]=\"'visual'\"\n [text]=\"('@workflow-management:workflow-run.history.tabs.visual.title' | translate | async)!\"\n [active]=\"activeTabIndex() === 1\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-diagram-project\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n </ax-tabs>\n </div>\n </div>\n\n <div class=\"axm-workflow-run-history-popup__panel\">\n @if (activeTabIndex() === 0) {\n @defer (on viewport) {\n <axm-workflow-run-history-timeline-tab [rows]=\"rows()\" [isBusy]=\"isBusy()\" />\n } @placeholder {\n <div class=\"axm-workflow-run-history-popup__defer-placeholder\" aria-busy=\"true\">\n <ax-loading></ax-loading>\n </div>\n } @loading {\n <div class=\"axm-workflow-run-history-popup__defer-placeholder\" aria-busy=\"true\">\n <ax-loading></ax-loading>\n </div>\n }\n }\n\n @if (activeTabIndex() === 1) {\n @defer (on viewport) {\n <axm-workflow-run-history-visual-tab\n [definition]=\"definition()\"\n [rows]=\"rows()\"\n [isBusy]=\"isBusy()\"\n />\n } @placeholder {\n <div class=\"axm-workflow-run-history-popup__defer-placeholder\" aria-busy=\"true\">\n <ax-loading></ax-loading>\n </div>\n } @loading {\n <div class=\"axm-workflow-run-history-popup__defer-placeholder\" aria-busy=\"true\">\n <ax-loading></ax-loading>\n </div>\n }\n }\n </div>\n </div>\n</ax-content>\n", styles: ["@layer properties;.axm-workflow-run-history-popup{box-sizing:border-box;display:flex;height:100%;min-height:30vh;flex-direction:column;max-height:min(70vh,40rem)}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__sticky{position:sticky;top:0;z-index:2;flex-shrink:0;padding-inline:calc(var(--spacing, .25rem) * 6);background:rgb(var(--ax-sys-color-surface));border-bottom:1px solid rgb(var(--ax-sys-color-border-light-surface))}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__sticky-bar{display:flex;min-height:calc(var(--spacing, .25rem) * 12);flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:.5rem 1.5rem}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__overview{display:flex;min-width:0px;flex-wrap:wrap;align-items:center;padding-block:calc(var(--spacing, .25rem) * 3);gap:.5rem 1.25rem}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__overview-item{display:flex;min-width:0px;align-items:baseline;gap:.375rem}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__overview-k{flex-shrink:0;font-size:.6875rem;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);text-transform:uppercase;line-height:1.2;letter-spacing:.04em;color:rgb(var(--ax-sys-color-on-light-surface))}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__overview-v{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);line-height:1.35;color:rgb(var(--ax-sys-color-on-surface))}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__tabs{min-width:0px;flex:auto;min-width:min(100%,12rem);margin-inline-start:auto}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__panel{min-height:0px;flex:auto;overflow-y:auto;padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:calc(var(--spacing, .25rem) * 4);padding-bottom:calc(var(--spacing, .25rem) * 6)}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__defer-placeholder{display:flex;min-height:calc(var(--spacing, .25rem) * 32);align-items:center;justify-content:center}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i3.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i3.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXFormatPipe, name: "format" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [/* @ts-ignore */
|
|
566
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMWorkflowRunHistoryPopupComponent, isStandalone: true, selector: "axm-workflow-run-history-popup", inputs: { __popup__: { classPropertyName: "__popup__", publicName: "__popup__", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<ax-content>\n <div class=\"axm-workflow-run-history-popup\">\n <div class=\"axm-workflow-run-history-popup__sticky\">\n <div class=\"axm-workflow-run-history-popup__sticky-bar\">\n @if (summary().reporter || summary().startedAt) {\n <div class=\"axm-workflow-run-history-popup__overview\" role=\"list\">\n @if (summary().reporter) {\n <div class=\"axm-workflow-run-history-popup__overview-item\" role=\"listitem\">\n <span class=\"axm-workflow-run-history-popup__overview-k\">\n {{ '@workflow-management:workflow-run.history.field.reporter' | translate | async }}\n </span>\n <span class=\"axm-workflow-run-history-popup__overview-v\" [textContent]=\"summary().reporter\"></span>\n </div>\n }\n @if (summary().startedAt) {\n <div class=\"axm-workflow-run-history-popup__overview-item\" role=\"listitem\">\n <span class=\"axm-workflow-run-history-popup__overview-k\">\n {{ '@workflow-management:workflow-run.history.field.started-at' | translate | async }}\n </span>\n <span class=\"axm-workflow-run-history-popup__overview-v\">\n {{ summary().startedAt | format: 'datetime' : 'short' | async }}\n </span>\n </div>\n }\n </div>\n }\n\n <ax-tabs\n class=\"axm-workflow-run-history-popup__tabs\"\n [look]=\"'with-line'\"\n (onActiveTabChanged)=\"handleTabChange($event)\"\n >\n <ax-tab-item\n [key]=\"'timeline'\"\n [text]=\"('@workflow-management:workflow-run.history.tabs.timeline.title' | translate | async)!\"\n [active]=\"activeTabIndex() === 0\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-list-timeline\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n <ax-tab-item\n [key]=\"'visual'\"\n [text]=\"('@workflow-management:workflow-run.history.tabs.visual.title' | translate | async)!\"\n [active]=\"activeTabIndex() === 1\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-diagram-project\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n </ax-tabs>\n </div>\n </div>\n\n <div class=\"axm-workflow-run-history-popup__panel\">\n @if (activeTabIndex() === 0) {\n @defer (on viewport) {\n <axm-workflow-run-history-timeline-tab [rows]=\"rows()\" [isBusy]=\"isBusy()\" />\n } @placeholder {\n <div class=\"axm-workflow-run-history-popup__defer-placeholder\" aria-busy=\"true\">\n <ax-loading></ax-loading>\n </div>\n } @loading {\n <div class=\"axm-workflow-run-history-popup__defer-placeholder\" aria-busy=\"true\">\n <ax-loading></ax-loading>\n </div>\n }\n }\n\n @if (activeTabIndex() === 1) {\n @defer (on viewport) {\n <axm-workflow-run-history-visual-tab\n [definition]=\"definition()\"\n [rows]=\"rows()\"\n [isBusy]=\"isBusy()\"\n />\n } @placeholder {\n <div class=\"axm-workflow-run-history-popup__defer-placeholder\" aria-busy=\"true\">\n <ax-loading></ax-loading>\n </div>\n } @loading {\n <div class=\"axm-workflow-run-history-popup__defer-placeholder\" aria-busy=\"true\">\n <ax-loading></ax-loading>\n </div>\n }\n }\n </div>\n </div>\n</ax-content>\n", styles: ["@layer properties;.axm-workflow-run-history-popup{box-sizing:border-box;display:flex;height:100%;min-height:30vh;flex-direction:column;max-height:min(70vh,40rem)}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__sticky{position:sticky;top:0;z-index:2;flex-shrink:0;padding-inline:calc(var(--spacing, .25rem) * 6);background:rgb(var(--ax-sys-color-surface));border-bottom:1px solid rgb(var(--ax-sys-color-border-light-surface))}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__sticky-bar{display:flex;min-height:calc(var(--spacing, .25rem) * 12);flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:.5rem 1.5rem}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__overview{display:flex;min-width:0px;flex-wrap:wrap;align-items:center;padding-block:calc(var(--spacing, .25rem) * 3);gap:.5rem 1.25rem}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__overview-item{display:flex;min-width:0px;align-items:baseline;gap:.375rem}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__overview-k{flex-shrink:0;font-size:.6875rem;--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);text-transform:uppercase;line-height:1.2;letter-spacing:.04em;color:rgb(var(--ax-sys-color-on-light-surface))}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__overview-v{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-medium, 500);font-weight:var(--font-weight-medium, 500);line-height:1.35;color:rgb(var(--ax-sys-color-on-surface))}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__tabs{min-width:0px;flex:auto;min-width:min(100%,12rem);margin-inline-start:auto}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__panel{min-height:0px;flex:auto;overflow-y:auto;padding-inline:calc(var(--spacing, .25rem) * 6);padding-top:calc(var(--spacing, .25rem) * 4);padding-bottom:calc(var(--spacing, .25rem) * 6)}.axm-workflow-run-history-popup .axm-workflow-run-history-popup__defer-placeholder{display:flex;min-height:calc(var(--spacing, .25rem) * 32);align-items:center;justify-content:center}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight: initial}}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i1.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i3.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "reorderable", "reorderDelay", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged", "onTabsReordered"] }, { kind: "component", type: i3.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.AXFormatPipe, name: "format" }, { kind: "pipe", type: i7.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [/* @ts-ignore */
|
|
567
567
|
import('./acorex-platform-module-workflow-management-client-workflow-run-history-timeline-tab.component-AnJ-Pywf.mjs').then(m => m.AXMWorkflowRunHistoryTimelineTabComponent)], () => [/* @ts-ignore */
|
|
568
568
|
import('./acorex-platform-module-workflow-management-client-workflow-run-history-visual-tab.component-Bw68Jwcb.mjs').then(m => m.AXMWorkflowRunHistoryVisualTabComponent)]] }); }
|
|
569
569
|
}
|
|
@@ -585,4 +585,4 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.8", ng
|
|
|
585
585
|
}], ctorParameters: () => [], propDecorators: { __popup__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popup__", required: false }] }] } }) });
|
|
586
586
|
|
|
587
587
|
export { AXMWorkflowRunHistoryPopupComponent };
|
|
588
|
-
//# sourceMappingURL=acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-
|
|
588
|
+
//# sourceMappingURL=acorex-platform-module-workflow-management-client-workflow-run-history-popup.component-DbeueT-X.mjs.map
|