@masterteam/escalation 0.0.1

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masterteam-escalation.mjs","sources":["../../../../packages/masterteam/escalation/src/store/escalation/escalation.actions.ts","../../../../packages/masterteam/escalation/src/store/utils/state-helpers.ts","../../../../packages/masterteam/escalation/src/store/escalation/escalation.state.ts","../../../../packages/masterteam/escalation/src/store/escalation/escalation.facade.ts","../../../../packages/masterteam/escalation/src/store/escalation/api.model.ts","../../../../packages/masterteam/escalation/src/lib/escalation-builder/escalation-builder.ts","../../../../packages/masterteam/escalation/src/lib/escalation-builder/escalation-builder.html","../../../../packages/masterteam/escalation/src/store/app.state.ts","../../../../packages/masterteam/escalation/src/store/index.ts","../../../../packages/masterteam/escalation/src/masterteam-escalation.ts"],"sourcesContent":["import type { ConnectionPayload, StepPayload } from './escalation.model';\n\nexport class SetModuleInfo {\n static readonly type = '[Escalation] Set Module Info';\n\n constructor(\n public readonly moduleType: string,\n public readonly moduleId: string | number,\n public readonly parentModuleType?: string,\n public readonly parentModuleId?: string | number,\n public readonly parentPath?: string,\n ) {}\n}\nexport class GetEscalation {\n static readonly type = '[Escalation] Get Escalation';\n}\n\nexport class GetFormulaProperties {\n static readonly type = '[Escalation] Get Formula Properties';\n}\n\nexport class GetGroups {\n static readonly type = '[Escalation] Get Groups';\n}\n\nexport class GetRolesForModule {\n static readonly type = '[Escalation] Get Roles For Module';\n}\n\nexport class GetStep {\n static readonly type = '[Escalation] Get Step';\n\n constructor(public readonly stepId: string | number) {}\n}\n\nexport class ValidateFlow {\n static readonly type = '[Escalation] Validate Flow';\n}\n\nexport class CreateStep {\n static readonly type = '[Escalation] Create Step';\n\n constructor(public readonly payload: StepPayload) {}\n}\n\nexport class UpdateStep {\n static readonly type = '[Escalation] Update Step';\n\n constructor(\n public readonly stepId: string | number,\n public readonly payload: StepPayload,\n ) {}\n}\n\nexport class CreateConnection {\n static readonly type = '[Escalation] Create Connection';\n\n constructor(public readonly payload: ConnectionPayload) {}\n}\n\nexport class UpdateConnection {\n static readonly type = '[Escalation] Update Connection';\n\n constructor(\n public readonly connectionId: string | number,\n public readonly payload: ConnectionPayload,\n ) {}\n}\n\nexport class PublishEscalation {\n static readonly type = '[Escalation] Publish Escalation';\n\n constructor(public readonly isPublished: boolean) {}\n}\n\nexport class DeleteStep {\n static readonly type = '[Escalation] Delete Step';\n\n constructor(public readonly stepId: string | number) {}\n}\n\nexport class DeleteConnection {\n static readonly type = '[Escalation] Delete Connection';\n\n constructor(public readonly connectionId: string | number) {}\n}\n","import type { StateContext } from '@ngxs/store';\n\nexport interface LoadingStateShape<L extends string = string> {\n loadingActive: L[];\n errors: Partial<Record<L, string>>;\n}\n\ntype LoadingName<T extends LoadingStateShape<string>> =\n T['loadingActive'][number];\n\nexport function startLoading<T extends LoadingStateShape<string>>(\n ctx: StateContext<T>,\n loadingName: LoadingName<T>,\n): void {\n const { loadingActive, errors } = ctx.getState();\n\n if (!loadingActive.includes(loadingName)) {\n ctx.patchState({\n loadingActive: [...loadingActive, loadingName],\n } as Partial<T>);\n }\n\n if (errors && errors[loadingName]) {\n const { [loadingName]: _removed, ...rest } = errors;\n ctx.patchState({ errors: rest } as Partial<T>);\n }\n}\n\nexport function endLoading<T extends LoadingStateShape<string>>(\n ctx: StateContext<T>,\n loadingName: LoadingName<T>,\n): void {\n const { loadingActive } = ctx.getState();\n\n ctx.patchState({\n loadingActive: loadingActive.filter((name) => name !== loadingName),\n } as Partial<T>);\n}\n\nexport function setLoadingError<T extends LoadingStateShape<string>>(\n ctx: StateContext<T>,\n loadingName: LoadingName<T>,\n message: string,\n): void {\n const { errors } = ctx.getState();\n ctx.patchState({\n errors: { ...errors, [loadingName]: message },\n } as Partial<T>);\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Action, Selector, State, StateContext } from '@ngxs/store';\nimport { of } from 'rxjs';\nimport { catchError, finalize, tap } from 'rxjs/operators';\n\nimport {\n endLoading,\n setLoadingError,\n startLoading,\n} from '../utils/state-helpers';\n\nimport type {\n ConnectionResponse,\n FormulaProperty,\n GroupDefinition,\n PublishResponse,\n RoleDefinition,\n StepResponse,\n StepSchema,\n EscalationConnection,\n EscalationLoadingName,\n EscalationSchema,\n EscalationStateModel,\n EscalationStepSchema,\n} from './escalation.model';\nimport {\n CreateConnection,\n CreateStep,\n DeleteConnection,\n DeleteStep,\n GetFormulaProperties,\n GetGroups,\n GetRolesForModule,\n GetStep,\n GetEscalation,\n PublishEscalation,\n UpdateConnection,\n UpdateStep,\n ValidateFlow,\n SetModuleInfo,\n} from './escalation.actions';\nimport { Response } from './api.model';\n\nconst DEFAULT_STATE: EscalationStateModel = {\n moduleType: null,\n moduleId: null,\n escalation: null,\n formulaProperties: [],\n groups: [],\n roles: [],\n selectedStep: null,\n isFlowValid: null,\n loadingActive: [],\n errors: {},\n};\n\n@State<EscalationStateModel>({\n name: 'escalation',\n defaults: DEFAULT_STATE,\n})\n@Injectable()\nexport class EscalationState {\n private readonly http = inject(HttpClient);\n private readonly baseUrl = 'EscalationSchemas';\n private readonly groupsUrl = 'identity/Groups';\n private readonly rolesUrl = 'identity/roles/scopes';\n\n @Selector()\n static moduleId(state: EscalationStateModel): string | number | null {\n return state.moduleId;\n }\n\n @Selector()\n static moduleType(state: EscalationStateModel): string | null {\n return state.moduleType;\n }\n\n @Selector()\n static escalation(state: EscalationStateModel): EscalationSchema | null {\n return state.escalation;\n }\n\n @Selector()\n static formulaProperties(state: EscalationStateModel): FormulaProperty[] {\n return state.formulaProperties;\n }\n\n @Selector()\n static groups(state: EscalationStateModel): GroupDefinition[] {\n return state.groups;\n }\n\n @Selector()\n static roles(state: EscalationStateModel): RoleDefinition[] {\n return state.roles;\n }\n\n @Selector()\n static selectedStep(state: EscalationStateModel): StepSchema | null {\n return state.selectedStep;\n }\n\n @Selector()\n static isFlowValid(state: EscalationStateModel): boolean | null {\n return state.isFlowValid;\n }\n\n @Selector()\n static stepsSchema(state: EscalationStateModel): EscalationStepSchema[] {\n return state.escalation?.stepsSchema ?? [];\n }\n\n @Selector()\n static connections(state: EscalationStateModel): EscalationConnection[] {\n return state.escalation?.connections ?? [];\n }\n\n @Selector()\n static isLoadingFactory(state: EscalationStateModel) {\n return (loadingName: EscalationLoadingName) =>\n state.loadingActive.includes(loadingName);\n }\n\n @Selector()\n static errorFactory(state: EscalationStateModel) {\n return (loadingName: EscalationLoadingName) =>\n state.errors?.[loadingName] ?? null;\n }\n\n @Action(SetModuleInfo)\n setModuleInfo(\n ctx: StateContext<EscalationStateModel>,\n action: SetModuleInfo,\n ) {\n let parentPath = '';\n if (action.parentModuleType && action.parentModuleId) {\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\n } else if (action.parentPath) {\n parentPath = action.parentPath;\n }\n ctx.patchState({\n moduleType: action.moduleType,\n moduleId: action.moduleId,\n parentModuleType: action.parentModuleType ?? null,\n parentModuleId: action.parentModuleId ?? null,\n parentPath: parentPath ?? '',\n });\n }\n @Action(GetEscalation)\n getEscalation(\n ctx: StateContext<EscalationStateModel>,\n _action: GetEscalation,\n ) {\n startLoading(ctx, 'getEscalation');\n\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Module ID is not set';\n setLoadingError(ctx, 'getEscalation', message);\n endLoading(ctx, 'getEscalation');\n return of(null);\n }\n\n return this.http\n .get<Response<EscalationSchema>>(\n `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`,\n {\n params: { Mode: 'edit' },\n },\n )\n .pipe(\n tap((response) => {\n const escalation = response?.data ?? null;\n ctx.patchState({ escalation });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to load escalation';\n setLoadingError(ctx, 'getEscalation', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'getEscalation')),\n );\n }\n\n @Action(GetFormulaProperties)\n getFormulaProperties(\n ctx: StateContext<EscalationStateModel>,\n _action: GetFormulaProperties,\n ) {\n startLoading(ctx, 'getFormulaProperties');\n\n const state = ctx.getState();\n const moduleId = state.moduleId;\n\n if (!moduleId) {\n const message = 'Module ID is not set';\n setLoadingError(ctx, 'getFormulaProperties', message);\n endLoading(ctx, 'getFormulaProperties');\n return of(null);\n }\n\n return this.http\n .get<\n Response<FormulaProperty[]>\n >(`${this.baseUrl}/processFormulaProperties/${moduleId}`)\n .pipe(\n tap((response) => {\n const formulaProperties = Array.isArray(response?.data)\n ? response.data\n : [];\n ctx.patchState({ formulaProperties });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to load formula properties';\n setLoadingError(ctx, 'getFormulaProperties', message);\n return of([]);\n }),\n finalize(() => endLoading(ctx, 'getFormulaProperties')),\n );\n }\n\n @Action(GetGroups)\n getGroups(ctx: StateContext<EscalationStateModel>, _action: GetGroups) {\n const state = ctx.getState();\n if (state.groups.length) {\n return of(state.groups);\n }\n\n startLoading(ctx, 'getGroups');\n\n return this.http.get<Response<GroupDefinition[]>>(this.groupsUrl).pipe(\n tap((response) => {\n const groups = Array.isArray(response?.data) ? response.data : [];\n ctx.patchState({ groups });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to load groups';\n setLoadingError(ctx, 'getGroups', message);\n return of([]);\n }),\n finalize(() => endLoading(ctx, 'getGroups')),\n );\n }\n\n @Action(GetRolesForModule)\n getRolesForModule(\n ctx: StateContext<EscalationStateModel>,\n _action: GetRolesForModule,\n ) {\n const state = ctx.getState();\n const { moduleType, moduleId } = state;\n\n if (!moduleType || !moduleId) {\n const message = 'Module type and module ID must be set';\n setLoadingError(ctx, 'getRolesForModule', message);\n return of([]);\n }\n\n startLoading(ctx, 'getRolesForModule');\n\n return this.http\n .get<Response<RoleDefinition[]>>(\n `${this.rolesUrl}/${moduleType}/${moduleId}`,\n {\n params: { inherited: 'true' },\n },\n )\n .pipe(\n tap((response) => {\n const roles = Array.isArray(response?.data) ? response.data : [];\n ctx.patchState({ roles });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to load roles';\n setLoadingError(ctx, 'getRolesForModule', message);\n return of([]);\n }),\n finalize(() => endLoading(ctx, 'getRolesForModule')),\n );\n }\n\n @Action(GetStep)\n getStep(ctx: StateContext<EscalationStateModel>, action: GetStep) {\n startLoading(ctx, 'getStep');\n\n return this.http\n .get<Response<StepSchema>>(`${this.baseUrl}/step/${action.stepId}`, {\n params: { Mode: 'edit' },\n })\n .pipe(\n tap((response) => {\n const selectedStep = response?.data ?? null;\n ctx.patchState({ selectedStep });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to load step';\n setLoadingError(ctx, 'getStep', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'getStep')),\n );\n }\n\n @Action(ValidateFlow)\n validateFlow(ctx: StateContext<EscalationStateModel>, _action: ValidateFlow) {\n startLoading(ctx, 'validateFlow');\n\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'validateFlow', message);\n endLoading(ctx, 'validateFlow');\n return of(null);\n }\n\n return this.http\n .get<\n Response<boolean>\n >(`${this.baseUrl}/requestSchema${parentPath}/${moduleType}/${moduleId}/validity`)\n .pipe(\n tap((response) => {\n const isFlowValid = response?.data ?? null;\n ctx.patchState({ isFlowValid });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to validate flow';\n setLoadingError(ctx, 'validateFlow', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'validateFlow')),\n );\n }\n\n @Action(CreateStep)\n createStep(ctx: StateContext<EscalationStateModel>, action: CreateStep) {\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'createStep', message);\n return of(null);\n }\n\n const tempId = -Date.now();\n const tempStep: any = {\n ...action.payload,\n id: tempId,\n loading: true,\n };\n\n if (state.escalation) {\n ctx.patchState({\n escalation: {\n ...state.escalation,\n stepsSchema: [...state.escalation.stepsSchema, tempStep],\n },\n });\n }\n\n startLoading(ctx, 'createStep');\n\n return this.http\n .post<\n Response<StepResponse>\n >(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/steps`, action.payload)\n .pipe(\n tap((response) => {\n const createdStep = response?.data;\n const currentState = ctx.getState();\n if (createdStep && currentState.escalation) {\n const updatedSteps = currentState.escalation.stepsSchema.map(\n (step) =>\n step.id === tempId ? { ...createdStep, loading: false } : step,\n );\n\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: updatedSteps,\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const filteredSteps = currentState.escalation.stepsSchema.filter(\n (step) => step.id !== tempId,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: filteredSteps,\n },\n });\n }\n\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to create step';\n setLoadingError(ctx, 'createStep', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'createStep')),\n );\n }\n\n @Action(UpdateStep)\n updateStep(ctx: StateContext<EscalationStateModel>, action: UpdateStep) {\n const state = ctx.getState();\n const moduleId = state.moduleId;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'updateStep', message);\n return of(null);\n }\n\n if (state.escalation) {\n const updatedSteps = state.escalation.stepsSchema.map((step) =>\n step.id === action.stepId ? { ...step, loading: true } : step,\n );\n ctx.patchState({\n escalation: {\n ...state.escalation,\n stepsSchema: updatedSteps,\n },\n });\n }\n\n startLoading(ctx, 'updateStep');\n\n return this.http\n .put<\n Response<StepResponse>\n >(`${this.baseUrl}/steps/${action.stepId}`, action.payload)\n .pipe(\n tap((response) => {\n const updatedStep = response?.data;\n const currentState = ctx.getState();\n if (updatedStep && currentState.escalation) {\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: currentState.escalation.stepsSchema.map((step) =>\n step.id === updatedStep.id\n ? { ...updatedStep, loading: false }\n : step,\n ),\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const errorSteps = currentState.escalation.stepsSchema.map(\n (step) =>\n step.id === action.stepId ? { ...step, loading: false } : step,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: errorSteps,\n },\n });\n }\n\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to update step';\n setLoadingError(ctx, 'updateStep', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'updateStep')),\n );\n }\n\n @Action(CreateConnection)\n createConnection(\n ctx: StateContext<EscalationStateModel>,\n action: CreateConnection,\n ) {\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'createConnection', message);\n return of(null);\n }\n\n const tempId = -Date.now();\n const tempConnection: any = {\n ...action.payload,\n id: tempId,\n loading: true,\n source: action.payload.sourceStepId,\n target: action.payload.targetStepId,\n };\n\n if (state.escalation) {\n ctx.patchState({\n escalation: {\n ...state.escalation,\n connections: [...state.escalation.connections, tempConnection],\n },\n });\n }\n\n startLoading(ctx, 'createConnection');\n\n return this.http\n .post<\n Response<ConnectionResponse>\n >(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/connections`, action.payload)\n .pipe(\n tap((response) => {\n const createdConnection = response?.data;\n const currentState = ctx.getState();\n if (createdConnection && currentState.escalation) {\n const updatedConnections = currentState.escalation.connections.map(\n (conn) =>\n conn.id === tempId\n ? { ...createdConnection, loading: false }\n : conn,\n );\n\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: updatedConnections,\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const filteredConnections =\n currentState.escalation.connections.filter(\n (conn) => conn.id !== tempId,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: filteredConnections,\n },\n });\n }\n\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to create connection';\n setLoadingError(ctx, 'createConnection', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'createConnection')),\n );\n }\n\n @Action(UpdateConnection)\n updateConnection(\n ctx: StateContext<EscalationStateModel>,\n action: UpdateConnection,\n ) {\n const state = ctx.getState();\n const moduleId = state.moduleId;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'updateConnection', message);\n return of(null);\n }\n\n if (state.escalation) {\n const updatedConnections = state.escalation.connections.map((conn) =>\n conn.id === action.connectionId ? { ...conn, loading: true } : conn,\n );\n ctx.patchState({\n escalation: {\n ...state.escalation,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'updateConnection');\n\n return this.http\n .put<\n Response<ConnectionResponse>\n >(`${this.baseUrl}/connections/${action.connectionId}`, action.payload)\n .pipe(\n tap((response) => {\n const updatedConnection = response?.data;\n const currentState = ctx.getState();\n if (updatedConnection && currentState.escalation) {\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: currentState.escalation.connections.map((conn) =>\n conn.id === updatedConnection.id\n ? { ...updatedConnection, loading: false }\n : conn,\n ),\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const errorConnections = currentState.escalation.connections.map(\n (conn) =>\n conn.id === action.connectionId\n ? { ...conn, loading: false }\n : conn,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: errorConnections,\n },\n });\n }\n\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to update connection';\n setLoadingError(ctx, 'updateConnection', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'updateConnection')),\n );\n }\n\n @Action(PublishEscalation)\n publishEscalation(\n ctx: StateContext<EscalationStateModel>,\n action: PublishEscalation,\n ) {\n startLoading(ctx, 'publishEscalation');\n\n const state = ctx.getState();\n const { moduleId, parentPath, moduleType } = state;\n\n if (!moduleId) {\n const message = 'Escalation ID is not set';\n setLoadingError(ctx, 'publishEscalation', message);\n endLoading(ctx, 'publishEscalation');\n return of(null);\n }\n\n return this.http\n .put<\n Response<PublishResponse>\n >(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/publish`, { IsPublished: action.isPublished })\n .pipe(\n tap((response) => {\n const publishedData = response?.data;\n if (publishedData && state.escalation) {\n ctx.patchState({\n escalation: {\n ...state.escalation,\n isPublished: publishedData.isPublished,\n isValid: publishedData.isValid,\n },\n });\n }\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to publish escalation';\n setLoadingError(ctx, 'publishEscalation', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'publishEscalation')),\n );\n }\n\n @Action(DeleteStep)\n deleteStep(ctx: StateContext<EscalationStateModel>, action: DeleteStep) {\n const state = ctx.getState();\n\n if (state.escalation) {\n const updatedSteps = state.escalation.stepsSchema.map((step) =>\n step.id == action.stepId ? { ...step, loading: true } : step,\n );\n ctx.patchState({\n escalation: {\n ...state.escalation,\n stepsSchema: updatedSteps,\n },\n });\n }\n\n startLoading(ctx, 'deleteStep');\n\n return this.http\n .delete<Response<boolean>>(`${this.baseUrl}/steps/${action.stepId}`)\n .pipe(\n tap(() => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: currentState.escalation.stepsSchema.filter(\n (step) => step.id != action.stepId,\n ),\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const errorSteps = currentState.escalation.stepsSchema.map(\n (step) =>\n step.id == action.stepId ? { ...step, loading: false } : step,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n stepsSchema: errorSteps,\n },\n });\n }\n\n const message =\n error?.error?.message ?? error?.message ?? 'Failed to delete step';\n setLoadingError(ctx, 'deleteStep', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'deleteStep')),\n );\n }\n\n @Action(DeleteConnection)\n deleteConnection(\n ctx: StateContext<EscalationStateModel>,\n action: DeleteConnection,\n ) {\n const state = ctx.getState();\n\n if (state.escalation) {\n const updatedConnections = state.escalation.connections.map((conn) =>\n conn.id == action.connectionId ? { ...conn, loading: true } : conn,\n );\n ctx.patchState({\n escalation: {\n ...state.escalation,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'deleteConnection');\n\n return this.http\n .delete<\n Response<boolean>\n >(`${this.baseUrl}/connections/${action.connectionId}`)\n .pipe(\n tap(() => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: currentState.escalation.connections.filter(\n (conn) => conn.id != action.connectionId,\n ),\n },\n });\n }\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.escalation) {\n const errorConnections = currentState.escalation.connections.map(\n (conn) =>\n conn.id == action.connectionId\n ? { ...conn, loading: false }\n : conn,\n );\n ctx.patchState({\n escalation: {\n ...currentState.escalation,\n connections: errorConnections,\n },\n });\n }\n\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to delete connection';\n setLoadingError(ctx, 'deleteConnection', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'deleteConnection')),\n );\n }\n}\n","import { Injectable, computed, inject } from '@angular/core';\nimport { select, Store } from '@ngxs/store';\nimport type { Observable } from 'rxjs';\n\nimport type {\n ConnectionPayload,\n FormulaProperty,\n GroupDefinition,\n RoleDefinition,\n StepPayload,\n StepSchema,\n EscalationConnection,\n EscalationLoadingName,\n EscalationSchema,\n EscalationStepSchema,\n} from './escalation.model';\nimport {\n CreateConnection,\n CreateStep,\n DeleteConnection,\n DeleteStep,\n GetFormulaProperties,\n GetGroups,\n GetRolesForModule,\n GetStep,\n GetEscalation,\n PublishEscalation,\n UpdateConnection,\n UpdateStep,\n ValidateFlow,\n SetModuleInfo,\n} from './escalation.actions';\nimport { EscalationState } from './escalation.state';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class EscalationFacade {\n private readonly store = inject(Store);\n\n readonly moduleType = select<string | null>(EscalationState.moduleType);\n readonly moduleId = select<string | number | null>(EscalationState.moduleId);\n readonly escalation = select<EscalationSchema | null>(\n EscalationState.escalation,\n );\n readonly formulaProperties = select<FormulaProperty[]>(\n EscalationState.formulaProperties,\n );\n readonly groups = select<GroupDefinition[]>(EscalationState.groups);\n readonly roles = select<RoleDefinition[]>(EscalationState.roles);\n readonly selectedStep = select<StepSchema | null>(\n EscalationState.selectedStep,\n );\n readonly isFlowValid = select<boolean | null>(EscalationState.isFlowValid);\n readonly steps = select<EscalationStepSchema[]>(EscalationState.stepsSchema);\n readonly connections = select<EscalationConnection[]>(\n EscalationState.connections,\n );\n\n isLoading(loadingName: EscalationLoadingName) {\n const loadingFactory = select<(name: EscalationLoadingName) => boolean>(\n EscalationState.isLoadingFactory,\n );\n return computed(() => loadingFactory()(loadingName));\n }\n\n error(loadingName: EscalationLoadingName) {\n const errorFactory = select<(name: EscalationLoadingName) => string | null>(\n EscalationState.errorFactory,\n );\n return computed(() => errorFactory()(loadingName));\n }\n\n setModuleInfo(\n moduleType: string,\n moduleId: string | number,\n parentModuleType?: string,\n parentModuleId?: string | number,\n parentPath?: string,\n ): Observable<unknown> {\n return this.store.dispatch(\n new SetModuleInfo(\n moduleType,\n moduleId,\n parentModuleType,\n parentModuleId,\n parentPath,\n ),\n );\n }\n\n loadEscalation(): Observable<unknown> {\n return this.store.dispatch(new GetEscalation());\n }\n\n loadFormulaProperties(): Observable<unknown> {\n return this.store.dispatch(new GetFormulaProperties());\n }\n\n loadGroups(): Observable<unknown> {\n return this.store.dispatch(new GetGroups());\n }\n\n loadRolesForModule(): Observable<unknown> {\n return this.store.dispatch(new GetRolesForModule());\n }\n\n loadStep(stepId: string | number): Observable<unknown> {\n return this.store.dispatch(new GetStep(stepId));\n }\n\n validateFlow(): Observable<unknown> {\n return this.store.dispatch(new ValidateFlow());\n }\n\n createStep(payload: StepPayload): Observable<unknown> {\n return this.store.dispatch(new CreateStep(payload));\n }\n\n updateStep(\n stepId: string | number,\n payload: StepPayload,\n ): Observable<unknown> {\n return this.store.dispatch(new UpdateStep(stepId, payload));\n }\n\n createConnection(payload: ConnectionPayload): Observable<unknown> {\n return this.store.dispatch(new CreateConnection(payload));\n }\n\n updateConnection(\n connectionId: string | number,\n payload: ConnectionPayload,\n ): Observable<unknown> {\n return this.store.dispatch(new UpdateConnection(connectionId, payload));\n }\n\n publishEscalation(isPublished: boolean): Observable<unknown> {\n return this.store.dispatch(new PublishEscalation(isPublished));\n }\n\n deleteStep(stepId: string | number): Observable<unknown> {\n return this.store.dispatch(new DeleteStep(stepId));\n }\n\n deleteConnection(connectionId: string | number): Observable<unknown> {\n return this.store.dispatch(new DeleteConnection(connectionId));\n }\n}\n","// shared/models/api.model.ts\n\nexport interface Response<T> {\n endpoint: string;\n status: number;\n code: number;\n locale: string;\n message?: string | null;\n errors?: any | null;\n data: T;\n cacheSession?: string;\n}\n","import {\n Component,\n inject,\n linkedSignal,\n signal,\n computed,\n effect,\n} from '@angular/core';\nimport { DynamicFormConfig } from '@masterteam/components';\nimport { Card } from '@masterteam/components/card';\nimport {\n NodeActionEvent,\n SBAction,\n StructureBuilder,\n} from '@masterteam/structure-builder';\nimport { EscalationFacade } from '../../store/escalation';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\nimport { Skeleton } from 'primeng/skeleton';\n\n@Component({\n selector: 'mt-escalation-builder',\n imports: [StructureBuilder, Card, ReactiveFormsModule, DynamicForm, Skeleton],\n templateUrl: './escalation-builder.html',\n styles: [],\n host: {},\n})\nexport class EscalationBuilder {\n private escalationFacade = inject(EscalationFacade);\n groups = this.escalationFacade.groups;\n roles = this.escalationFacade.roles;\n escalation = this.escalationFacade.escalation;\n loading = this.escalationFacade.isLoading('getEscalation');\n loadingStep = this.escalationFacade.isLoading('getStep');\n\n selectedStep = this.escalationFacade.selectedStep;\n\n nodeFields = signal<any>({\n name: 'name',\n });\n nodeFormControl = new FormControl();\n\n private isEditingInitialNode = signal<boolean>(false);\n\n availableNodes = [\n {\n id: 'FormStep',\n label: 'New Step',\n name: {\n en: 'New Step',\n ar: ' خطوة جديدة',\n },\n targetType: '1',\n icon: 'general.plus-circle',\n color: '#000000',\n },\n ];\n\n // Base form sections - defined once for reusability\n private readonly baseNameFields = {\n key: 'settings',\n type: 'none',\n bodyClass: 'space-y-2',\n fields: [\n {\n key: 'name.en',\n label: 'Name (English)',\n placeholder: 'Enter name in English',\n cssClass: 'w-full',\n required: true,\n },\n {\n key: 'name.ar',\n label: 'Name (Arabic)',\n placeholder: 'Enter name in Arabic',\n cssClass: 'w-full',\n required: true,\n },\n ],\n };\n\n // Approver section with dynamic options\n private readonly approverSection = computed(() => ({\n key: 'settings',\n type: 'header',\n label: 'Approver',\n headerClass:\n 'rounded-t-xl bg-slate-50 px-4 py-3 text-sm font-semibold text-slate-900 border border-slate-200 border-b-0',\n bodyClass: 'rounded-b-xl border border-slate-200 p-4 space-y-3',\n cssClass: ' ',\n fields: [\n {\n key: 'targetType',\n type: 'radio-button',\n orientation: 'horizontal',\n defaultValue: '1',\n options: [\n { label: 'Group', value: '1' },\n { label: 'Role', value: '2' },\n ],\n optionLabel: 'title',\n optionValue: 'value',\n placeholder: 'Enter Role',\n cssClass: 'flex items-center gap-6 text-sm text-slate-700',\n required: true,\n },\n {\n key: 'group',\n label: 'Select',\n placeholder: 'Select group',\n cssClass: 'mt-2 pt-3 border-t border-slate-200 w-full',\n required: true,\n type: 'select',\n options: this.groups(),\n optionLabel: 'title',\n optionValue: 'id',\n relations: [{ key: 'targetType', value: '1', action: 'show' }],\n },\n {\n key: 'role',\n label: 'Select',\n placeholder: 'Enter target value',\n cssClass: 'mt-2 pt-3 border-t border-slate-200 w-full',\n required: true,\n type: 'select',\n options: this.roles(),\n optionLabel: 'title',\n optionValue: 'id',\n relations: [{ key: 'targetType', value: '2', action: 'show' }],\n },\n ],\n }));\n\n private readonly slaSection = {\n key: 'slaSection',\n type: 'none',\n bodyClass: 'space-y-1',\n fields: [\n {\n key: 'sla',\n label: 'SLA',\n placeholder: 'Enter SLA',\n cssClass: 'w-full',\n required: true,\n },\n ],\n } as const;\n\n // Dynamic form configuration using linkedSignal\n // Automatically rebuilds when isEditingInitialNode changes\n nodeForm = linkedSignal<DynamicFormConfig>(() => {\n const sections: any[] = [this.baseNameFields];\n\n // Conditionally include approver and SLA sections based on isEditingInitialNode\n // Initial nodes only show name fields\n if (!this.isEditingInitialNode()) {\n sections.push(this.approverSection());\n sections.push(this.slaSection);\n }\n\n return {\n sections,\n layout: {},\n };\n });\n\n // Sample connection form configuration\n connectionForm = signal<DynamicFormConfig>({\n sections: [\n {\n key: 'basic',\n label: 'Basic Information',\n type: 'none',\n cssClass: 'p-4',\n order: 1,\n fields: [\n {\n key: 'priority',\n label: 'Priority',\n },\n ],\n },\n ],\n });\n\n // Nodes currently in the flow\n steps = computed(() => {\n return this.escalationFacade.steps().map((step) => ({\n ...step,\n color: '#000000',\n }));\n });\n\n // Connections between nodes\n connections = computed(() => {\n return this.escalationFacade.connections().map((connection) => ({\n ...connection,\n from: connection.source,\n to: connection.target,\n }));\n });\n\n // Node Actions\n nodeActions = signal([\n {\n key: 'edit',\n icon: 'general.edit-05',\n variant: 'outlined',\n size: 'small',\n tooltip: 'Edit',\n },\n {\n key: 'delete',\n icon: 'general.trash-01',\n variant: 'outlined',\n size: 'small',\n severity: 'danger',\n tooltip: 'Delete',\n },\n ]);\n\n constructor() {\n // Effect to watch selectedStep and patch form when it changes\n effect(() => {\n const step = this.selectedStep();\n\n if (step) {\n // Patch form with complete step data\n this.nodeFormControl.patchValue({\n name: step.name,\n targetType: step.targetType || '1',\n group: step.targetType === '1' ? parseInt(step.targetValue!) : null,\n role: step.targetType === '2' ? step.targetValue : null,\n sla: step.sla,\n });\n\n console.log('Form patched with step data:', step);\n }\n });\n }\n\n onNodeActionsEvent(event: NodeActionEvent) {\n console.log('Node action event:', event);\n }\n\n clearForm(): void {\n // Reset isEditingInitialNode flag\n this.isEditingInitialNode.set(false);\n\n // Reset form to default values\n this.nodeFormControl.reset({\n name: { en: '', ar: '' },\n targetType: '1',\n group: null,\n role: null,\n sla: 0,\n });\n\n console.log('Form cleared for new step');\n }\n\n onStructureAction(event: SBAction) {\n console.log('Structure action received:', event);\n\n switch (event.action) {\n case 'createNode':\n if (event.data) {\n // Get form values\n const formValue = this.nodeFormControl.value;\n\n // Prepare step payload without properties\n const stepPayload = {\n name: formValue.name || { en: 'New Step', ar: 'خطوة جديدة' },\n targetType: formValue.targetType,\n targetValue:\n formValue.targetType === '1' ? formValue.group : formValue.role,\n sla: formValue.sla || 0,\n };\n\n // Create step via facade\n this.escalationFacade.createStep(stepPayload).subscribe({\n next: () => {\n console.log('Step created successfully:', stepPayload);\n },\n error: (error) => {\n console.error('Failed to create step:', error);\n },\n });\n }\n break;\n\n case 'startUpdating':\n if (event.data) {\n this.clearForm();\n\n const stepId = event.data.id;\n\n // Set the flag based on whether node is initial\n // This will trigger nodeForm to rebuild automatically via linkedSignal\n this.isEditingInitialNode.set(!!event.data.isInitial);\n\n // Load step data\n this.escalationFacade.loadStep(stepId);\n }\n break;\n\n case 'startCreating':\n // Reset form for new step\n this.clearForm();\n break;\n\n case 'updateNode':\n if (event.data) {\n // Get form values\n const formValue = this.nodeFormControl.value;\n const stepId = event.data.id;\n\n // Prepare step payload\n const stepPayload = {\n name: formValue.name || event.data.name,\n targetType: formValue.targetType,\n targetValue:\n formValue.targetType === '1' ? formValue.group : formValue.role,\n sla: formValue.sla || event.data.sla,\n };\n\n // Update step via facade\n this.escalationFacade.updateStep(stepId, stepPayload).subscribe({\n next: () => {\n console.log('Step updated successfully:', stepPayload);\n },\n error: (error) => {\n console.error('Failed to update step:', error);\n },\n });\n }\n break;\n\n case 'deleteNode':\n if (event.data) {\n const nodeIdToDelete = event.data.id;\n // Delete step from store\n this.escalationFacade.deleteStep(nodeIdToDelete).subscribe({\n next: () => {\n console.log('Node deleted:', nodeIdToDelete);\n },\n error: (error) => {\n console.error('Failed to delete node:', error);\n },\n });\n }\n break;\n\n case 'createConnection':\n if (event.data) {\n // Create connection in store\n const connectionPayload = {\n sourceStepId: event.data.from,\n targetStepId: event.data.to,\n priority: event.data.priority ?? 1,\n formula: event.data.formula ?? [],\n };\n this.escalationFacade.createConnection(connectionPayload).subscribe({\n next: () => {\n console.log('Connection created:', event.data);\n },\n error: (error) => {\n console.error('Failed to create connection:', error);\n },\n });\n }\n break;\n\n case 'updateConnection':\n if (event.data) {\n // Update connection in store\n const connectionId = event.data.id;\n const updatePayload = {\n sourceStepId: event.data.from,\n targetStepId: event.data.to,\n priority: event.data.priority ?? 1,\n formula: event.data.formula ?? [],\n };\n this.escalationFacade\n .updateConnection(connectionId, updatePayload)\n .subscribe({\n next: () => {\n console.log('Connection updated:', event.data);\n },\n error: (error) => {\n console.error('Failed to update connection:', error);\n },\n });\n }\n break;\n\n case 'deleteConnection':\n if (event.data) {\n const connectionIdToDelete = event.data.id;\n // Delete connection from store\n this.escalationFacade\n .deleteConnection(connectionIdToDelete)\n .subscribe({\n next: () => {\n console.log('Connection deleted:', connectionIdToDelete);\n },\n error: (error) => {\n console.error('Failed to delete connection:', error);\n },\n });\n }\n break;\n\n default:\n console.warn('Unknown structure action:', event.action);\n }\n }\n}\n","<mt-card class=\"h-[calc(100vh---spacing(26))] relative\" id=\"escalationCard\">\n @if (!loading()) {\n <mt-structure-builder\n class=\"flex-1\"\n [availableNodes]=\"availableNodes\"\n [connectionForm]=\"connectionForm()\"\n [nodeActions]=\"nodeActions()\"\n (nodeActionsEvent)=\"onNodeActionsEvent($event)\"\n [nodes]=\"steps()\"\n [connections]=\"connections()\"\n (action)=\"onStructureAction($event)\"\n [addModalType]=\"'drawer'\"\n [addModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\n [updateModalStyleClass]=\"'!w-[25rem] !absolute !shadow-none'\"\n [addModalHeader]=\"'Add Step'\"\n [updateModalHeader]=\"'Edit Step'\"\n [appendTo]=\"'escalationCard'\"\n [nodeFields]=\"nodeFields()\"\n >\n <ng-template\n #nodeDialog\n let-close=\"close\"\n let-save=\"save\"\n let-node=\"node\"\n >\n <div class=\"p-4\">\n @if (loadingStep()) {\n <!-- Loading skeleton -->\n <div class=\"space-y-4\">\n <!-- Form fields skeleton -->\n <div class=\"space-y-4\">\n <div>\n <p-skeleton\n width=\"8rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"8rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"10rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"3rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"6rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n <div>\n <p-skeleton\n width=\"4rem\"\n height=\"1rem\"\n styleClass=\"mb-2\"\n ></p-skeleton>\n <p-skeleton\n width=\"100%\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n </div>\n </div>\n } @else {\n <!-- Actual content - just the form, no tabs -->\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</mt-card>\n","import { EscalationState } from './escalation/escalation.state';\n\nexport const ESCALATION_STATES = [EscalationState];\n\nexport * from './escalation';\n","// Re-export app state\nexport * from './app.state';\n\n// Re-export workflow state\nexport * from './escalation';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAEa,aAAa,CAAA;AAIN,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,gBAAA;AACA,IAAA,cAAA;AACA,IAAA,UAAA;AAPlB,IAAA,OAAgB,IAAI,GAAG,8BAA8B;IAErD,WAAA,CACkB,UAAkB,EAClB,QAAyB,EACzB,gBAAyB,EACzB,cAAgC,EAChC,UAAmB,EAAA;QAJnB,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;QAChB,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,UAAU,GAAV,UAAU;IACzB;;MAEQ,aAAa,CAAA;AACxB,IAAA,OAAgB,IAAI,GAAG,6BAA6B;;MAGzC,oBAAoB,CAAA;AAC/B,IAAA,OAAgB,IAAI,GAAG,qCAAqC;;MAGjD,SAAS,CAAA;AACpB,IAAA,OAAgB,IAAI,GAAG,yBAAyB;;MAGrC,iBAAiB,CAAA;AAC5B,IAAA,OAAgB,IAAI,GAAG,mCAAmC;;MAG/C,OAAO,CAAA;AAGU,IAAA,MAAA;AAF5B,IAAA,OAAgB,IAAI,GAAG,uBAAuB;AAE9C,IAAA,WAAA,CAA4B,MAAuB,EAAA;QAAvB,IAAA,CAAA,MAAM,GAAN,MAAM;IAAoB;;MAG3C,YAAY,CAAA;AACvB,IAAA,OAAgB,IAAI,GAAG,4BAA4B;;MAGxC,UAAU,CAAA;AAGO,IAAA,OAAA;AAF5B,IAAA,OAAgB,IAAI,GAAG,0BAA0B;AAEjD,IAAA,WAAA,CAA4B,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AA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,WAAW,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,QAAQ,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,OAAA,EAAA,WAAA,EAAA,cAAA,EAAA,MAAA,EAAA,OAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAKjE,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EAAA,OAAA,EACxB,CAAC,gBAAgB,EAAE,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,QAAQ,CAAC,QAGvE,EAAE,EAAA,QAAA,EAAA,8/GAAA,EAAA;;;AEvBH,MAAM,iBAAiB,GAAG,CAAC,eAAe;;ACFjD;;ACAA;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,335 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import * as _masterteam_escalation from '@masterteam/escalation';
3
+ import { DynamicFormConfig } from '@masterteam/components';
4
+ import { NodeActionEvent, SBAction } from '@masterteam/structure-builder';
5
+ import { FormControl } from '@angular/forms';
6
+ import * as rxjs from 'rxjs';
7
+ import { Observable } from 'rxjs';
8
+ import { StateContext } from '@ngxs/store';
9
+
10
+ declare class EscalationBuilder {
11
+ private escalationFacade;
12
+ groups: _angular_core.Signal<_masterteam_escalation.GroupDefinition[]>;
13
+ roles: _angular_core.Signal<_masterteam_escalation.RoleDefinition[]>;
14
+ escalation: _angular_core.Signal<_masterteam_escalation.EscalationSchema | null>;
15
+ loading: _angular_core.Signal<boolean>;
16
+ loadingStep: _angular_core.Signal<boolean>;
17
+ selectedStep: _angular_core.Signal<_masterteam_escalation.StepSchema | null>;
18
+ nodeFields: _angular_core.WritableSignal<any>;
19
+ nodeFormControl: FormControl<any>;
20
+ private isEditingInitialNode;
21
+ availableNodes: {
22
+ id: string;
23
+ label: string;
24
+ name: {
25
+ en: string;
26
+ ar: string;
27
+ };
28
+ targetType: string;
29
+ icon: string;
30
+ color: string;
31
+ }[];
32
+ private readonly baseNameFields;
33
+ private readonly approverSection;
34
+ private readonly slaSection;
35
+ nodeForm: _angular_core.WritableSignal<DynamicFormConfig>;
36
+ connectionForm: _angular_core.WritableSignal<DynamicFormConfig>;
37
+ steps: _angular_core.Signal<{
38
+ color: string;
39
+ id: number;
40
+ name: string | Record<string, string>;
41
+ sla: number;
42
+ isInitial: boolean;
43
+ targetType?: string;
44
+ targetValue?: string;
45
+ loading?: boolean;
46
+ }[]>;
47
+ connections: _angular_core.Signal<{
48
+ from: number;
49
+ to: number;
50
+ id: number;
51
+ source: number;
52
+ target: number;
53
+ formula: any[];
54
+ priority: number;
55
+ loading?: boolean;
56
+ }[]>;
57
+ nodeActions: _angular_core.WritableSignal<({
58
+ key: string;
59
+ icon: string;
60
+ variant: string;
61
+ size: string;
62
+ tooltip: string;
63
+ severity?: undefined;
64
+ } | {
65
+ key: string;
66
+ icon: string;
67
+ variant: string;
68
+ size: string;
69
+ severity: string;
70
+ tooltip: string;
71
+ })[]>;
72
+ constructor();
73
+ onNodeActionsEvent(event: NodeActionEvent): void;
74
+ clearForm(): void;
75
+ onStructureAction(event: SBAction): void;
76
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EscalationBuilder, never>;
77
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EscalationBuilder, "mt-escalation-builder", never, {}, {}, never, never, true, never>;
78
+ }
79
+
80
+ interface LoadingStateShape<L extends string = string> {
81
+ loadingActive: L[];
82
+ errors: Partial<Record<L, string>>;
83
+ }
84
+
85
+ interface EscalationStepSchema {
86
+ id: number;
87
+ name: string | Record<string, string>;
88
+ sla: number;
89
+ isInitial: boolean;
90
+ targetType?: string;
91
+ targetValue?: string;
92
+ loading?: boolean;
93
+ }
94
+ interface EscalationConnection {
95
+ id: number;
96
+ source: number;
97
+ target: number;
98
+ formula: any[];
99
+ priority: number;
100
+ loading?: boolean;
101
+ }
102
+ interface EscalationSchema {
103
+ id: number;
104
+ displayName: Record<string, string>;
105
+ moduleId: number;
106
+ moduleType: string;
107
+ isValid: boolean;
108
+ isPublished: boolean;
109
+ stepsSchema: EscalationStepSchema[];
110
+ connections: EscalationConnection[];
111
+ }
112
+ interface FormulaProperty {
113
+ key: string;
114
+ name: string;
115
+ }
116
+ interface GroupDefinition {
117
+ id: number;
118
+ name: string;
119
+ [key: string]: unknown;
120
+ }
121
+ interface RoleDefinition {
122
+ id: number;
123
+ name: string;
124
+ [key: string]: unknown;
125
+ }
126
+ interface StepSchema {
127
+ id: number;
128
+ name: Record<string, string>;
129
+ sla: number;
130
+ isInitial: boolean;
131
+ targetType?: string;
132
+ targetValue?: string;
133
+ }
134
+ interface StepPayload {
135
+ name: Record<string, string>;
136
+ targetType?: string;
137
+ targetValue?: number | string;
138
+ sla: string | number;
139
+ }
140
+ interface StepResponse {
141
+ id: number;
142
+ name: string;
143
+ sla: number;
144
+ isInitial: boolean;
145
+ targetType?: string;
146
+ targetValue?: string;
147
+ }
148
+ interface ConnectionPayload {
149
+ sourceStepId: number | string;
150
+ targetStepId: number | string;
151
+ priority: string | number;
152
+ formula: any[];
153
+ }
154
+ interface ConnectionResponse {
155
+ id: number;
156
+ source: number;
157
+ target: number;
158
+ formula: any[];
159
+ priority: number;
160
+ }
161
+ interface PublishPayload {
162
+ IsPublished: boolean;
163
+ }
164
+ interface PublishResponse {
165
+ id: number;
166
+ displayName: string;
167
+ moduleId: number;
168
+ moduleType: string;
169
+ isValid: boolean;
170
+ isPublished: boolean;
171
+ }
172
+ type EscalationLoadingName = 'getEscalation' | 'getFormulaProperties' | 'getGroups' | 'getRolesForModule' | 'getStep' | 'validateFlow' | 'createStep' | 'updateStep' | 'createConnection' | 'updateConnection' | 'publishEscalation' | 'deleteStep' | 'deleteConnection';
173
+ interface EscalationStateModel extends LoadingStateShape<EscalationLoadingName> {
174
+ moduleType: string | null;
175
+ moduleId: string | number | null;
176
+ parentModuleType?: string | null;
177
+ parentModuleId?: string | number | null;
178
+ parentPath?: string;
179
+ escalation: EscalationSchema | null;
180
+ formulaProperties: FormulaProperty[];
181
+ groups: GroupDefinition[];
182
+ roles: RoleDefinition[];
183
+ selectedStep: StepSchema | null;
184
+ isFlowValid: boolean | null;
185
+ }
186
+
187
+ declare class SetModuleInfo {
188
+ readonly moduleType: string;
189
+ readonly moduleId: string | number;
190
+ readonly parentModuleType?: string | undefined;
191
+ readonly parentModuleId?: string | number | undefined;
192
+ readonly parentPath?: string | undefined;
193
+ static readonly type = "[Escalation] Set Module Info";
194
+ constructor(moduleType: string, moduleId: string | number, parentModuleType?: string | undefined, parentModuleId?: string | number | undefined, parentPath?: string | undefined);
195
+ }
196
+ declare class GetEscalation {
197
+ static readonly type = "[Escalation] Get Escalation";
198
+ }
199
+ declare class GetFormulaProperties {
200
+ static readonly type = "[Escalation] Get Formula Properties";
201
+ }
202
+ declare class GetGroups {
203
+ static readonly type = "[Escalation] Get Groups";
204
+ }
205
+ declare class GetRolesForModule {
206
+ static readonly type = "[Escalation] Get Roles For Module";
207
+ }
208
+ declare class GetStep {
209
+ readonly stepId: string | number;
210
+ static readonly type = "[Escalation] Get Step";
211
+ constructor(stepId: string | number);
212
+ }
213
+ declare class ValidateFlow {
214
+ static readonly type = "[Escalation] Validate Flow";
215
+ }
216
+ declare class CreateStep {
217
+ readonly payload: StepPayload;
218
+ static readonly type = "[Escalation] Create Step";
219
+ constructor(payload: StepPayload);
220
+ }
221
+ declare class UpdateStep {
222
+ readonly stepId: string | number;
223
+ readonly payload: StepPayload;
224
+ static readonly type = "[Escalation] Update Step";
225
+ constructor(stepId: string | number, payload: StepPayload);
226
+ }
227
+ declare class CreateConnection {
228
+ readonly payload: ConnectionPayload;
229
+ static readonly type = "[Escalation] Create Connection";
230
+ constructor(payload: ConnectionPayload);
231
+ }
232
+ declare class UpdateConnection {
233
+ readonly connectionId: string | number;
234
+ readonly payload: ConnectionPayload;
235
+ static readonly type = "[Escalation] Update Connection";
236
+ constructor(connectionId: string | number, payload: ConnectionPayload);
237
+ }
238
+ declare class PublishEscalation {
239
+ readonly isPublished: boolean;
240
+ static readonly type = "[Escalation] Publish Escalation";
241
+ constructor(isPublished: boolean);
242
+ }
243
+ declare class DeleteStep {
244
+ readonly stepId: string | number;
245
+ static readonly type = "[Escalation] Delete Step";
246
+ constructor(stepId: string | number);
247
+ }
248
+ declare class DeleteConnection {
249
+ readonly connectionId: string | number;
250
+ static readonly type = "[Escalation] Delete Connection";
251
+ constructor(connectionId: string | number);
252
+ }
253
+
254
+ interface Response<T> {
255
+ endpoint: string;
256
+ status: number;
257
+ code: number;
258
+ locale: string;
259
+ message?: string | null;
260
+ errors?: any | null;
261
+ data: T;
262
+ cacheSession?: string;
263
+ }
264
+
265
+ declare class EscalationState {
266
+ private readonly http;
267
+ private readonly baseUrl;
268
+ private readonly groupsUrl;
269
+ private readonly rolesUrl;
270
+ static moduleId(state: EscalationStateModel): string | number | null;
271
+ static moduleType(state: EscalationStateModel): string | null;
272
+ static escalation(state: EscalationStateModel): EscalationSchema | null;
273
+ static formulaProperties(state: EscalationStateModel): FormulaProperty[];
274
+ static groups(state: EscalationStateModel): GroupDefinition[];
275
+ static roles(state: EscalationStateModel): RoleDefinition[];
276
+ static selectedStep(state: EscalationStateModel): StepSchema | null;
277
+ static isFlowValid(state: EscalationStateModel): boolean | null;
278
+ static stepsSchema(state: EscalationStateModel): EscalationStepSchema[];
279
+ static connections(state: EscalationStateModel): EscalationConnection[];
280
+ static isLoadingFactory(state: EscalationStateModel): (loadingName: EscalationLoadingName) => boolean;
281
+ static errorFactory(state: EscalationStateModel): (loadingName: EscalationLoadingName) => string | null;
282
+ setModuleInfo(ctx: StateContext<EscalationStateModel>, action: SetModuleInfo): void;
283
+ getEscalation(ctx: StateContext<EscalationStateModel>, _action: GetEscalation): rxjs.Observable<Response<EscalationSchema> | null>;
284
+ getFormulaProperties(ctx: StateContext<EscalationStateModel>, _action: GetFormulaProperties): rxjs.Observable<null> | rxjs.Observable<never[] | Response<FormulaProperty[]>>;
285
+ getGroups(ctx: StateContext<EscalationStateModel>, _action: GetGroups): rxjs.Observable<GroupDefinition[]> | rxjs.Observable<never[] | Response<GroupDefinition[]>>;
286
+ getRolesForModule(ctx: StateContext<EscalationStateModel>, _action: GetRolesForModule): rxjs.Observable<never[] | Response<RoleDefinition[]>>;
287
+ getStep(ctx: StateContext<EscalationStateModel>, action: GetStep): rxjs.Observable<Response<StepSchema> | null>;
288
+ validateFlow(ctx: StateContext<EscalationStateModel>, _action: ValidateFlow): rxjs.Observable<Response<boolean> | null>;
289
+ createStep(ctx: StateContext<EscalationStateModel>, action: CreateStep): rxjs.Observable<Response<StepResponse> | null>;
290
+ updateStep(ctx: StateContext<EscalationStateModel>, action: UpdateStep): rxjs.Observable<Response<StepResponse> | null>;
291
+ createConnection(ctx: StateContext<EscalationStateModel>, action: CreateConnection): rxjs.Observable<Response<ConnectionResponse> | null>;
292
+ updateConnection(ctx: StateContext<EscalationStateModel>, action: UpdateConnection): rxjs.Observable<Response<ConnectionResponse> | null>;
293
+ publishEscalation(ctx: StateContext<EscalationStateModel>, action: PublishEscalation): rxjs.Observable<Response<PublishResponse> | null>;
294
+ deleteStep(ctx: StateContext<EscalationStateModel>, action: DeleteStep): rxjs.Observable<Response<boolean> | null>;
295
+ deleteConnection(ctx: StateContext<EscalationStateModel>, action: DeleteConnection): rxjs.Observable<Response<boolean> | null>;
296
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EscalationState, never>;
297
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EscalationState>;
298
+ }
299
+
300
+ declare class EscalationFacade {
301
+ private readonly store;
302
+ readonly moduleType: _angular_core.Signal<string | null>;
303
+ readonly moduleId: _angular_core.Signal<string | number | null>;
304
+ readonly escalation: _angular_core.Signal<EscalationSchema | null>;
305
+ readonly formulaProperties: _angular_core.Signal<FormulaProperty[]>;
306
+ readonly groups: _angular_core.Signal<GroupDefinition[]>;
307
+ readonly roles: _angular_core.Signal<RoleDefinition[]>;
308
+ readonly selectedStep: _angular_core.Signal<StepSchema | null>;
309
+ readonly isFlowValid: _angular_core.Signal<boolean | null>;
310
+ readonly steps: _angular_core.Signal<EscalationStepSchema[]>;
311
+ readonly connections: _angular_core.Signal<EscalationConnection[]>;
312
+ isLoading(loadingName: EscalationLoadingName): _angular_core.Signal<boolean>;
313
+ error(loadingName: EscalationLoadingName): _angular_core.Signal<string | null>;
314
+ setModuleInfo(moduleType: string, moduleId: string | number, parentModuleType?: string, parentModuleId?: string | number, parentPath?: string): Observable<unknown>;
315
+ loadEscalation(): Observable<unknown>;
316
+ loadFormulaProperties(): Observable<unknown>;
317
+ loadGroups(): Observable<unknown>;
318
+ loadRolesForModule(): Observable<unknown>;
319
+ loadStep(stepId: string | number): Observable<unknown>;
320
+ validateFlow(): Observable<unknown>;
321
+ createStep(payload: StepPayload): Observable<unknown>;
322
+ updateStep(stepId: string | number, payload: StepPayload): Observable<unknown>;
323
+ createConnection(payload: ConnectionPayload): Observable<unknown>;
324
+ updateConnection(connectionId: string | number, payload: ConnectionPayload): Observable<unknown>;
325
+ publishEscalation(isPublished: boolean): Observable<unknown>;
326
+ deleteStep(stepId: string | number): Observable<unknown>;
327
+ deleteConnection(connectionId: string | number): Observable<unknown>;
328
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EscalationFacade, never>;
329
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EscalationFacade>;
330
+ }
331
+
332
+ declare const ESCALATION_STATES: (typeof EscalationState)[];
333
+
334
+ export { CreateConnection, CreateStep, DeleteConnection, DeleteStep, ESCALATION_STATES, EscalationBuilder, EscalationFacade, EscalationState, GetEscalation, GetFormulaProperties, GetGroups, GetRolesForModule, GetStep, PublishEscalation, SetModuleInfo, UpdateConnection, UpdateStep, ValidateFlow };
335
+ export type { ConnectionPayload, ConnectionResponse, EscalationConnection, EscalationLoadingName, EscalationSchema, EscalationStateModel, EscalationStepSchema, FormulaProperty, GroupDefinition, PublishPayload, PublishResponse, Response, RoleDefinition, StepPayload, StepResponse, StepSchema };
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@masterteam/escalation",
3
+ "version": "0.0.1",
4
+ "publishConfig": {
5
+ "directory": ".",
6
+ "linkDirectory": false,
7
+ "access": "public"
8
+ },
9
+ "peerDependencies": {
10
+ "@angular/common": "^20.1.3",
11
+ "@angular/core": "^20.1.3",
12
+ "@angular/forms": "^20.1.3",
13
+ "@primeuix/themes": "^1.2.2",
14
+ "@tailwindcss/postcss": "^4.1.11",
15
+ "postcss": "^8.5.6",
16
+ "primeng": "^20.0.1",
17
+ "rxjs": "^7.8.2",
18
+ "tailwindcss": "^4.1.11",
19
+ "tailwindcss-primeui": "^0.6.1",
20
+ "@ngxs/store": "^20.1.0",
21
+ "@masterteam/components": "x",
22
+ "@masterteam/forms": "x",
23
+ "@masterteam/icons": "x",
24
+ "@masterteam/structure-builder": "x"
25
+ },
26
+ "dependencies": {
27
+ "tslib": "^2.3.0"
28
+ },
29
+ "sideEffects": false,
30
+ "exports": {
31
+ "./assets/escalation.css": {
32
+ "style": "./assets/escalation.css"
33
+ },
34
+ "./package.json": {
35
+ "default": "./package.json"
36
+ },
37
+ ".": {
38
+ "types": "./index.d.ts",
39
+ "default": "./fesm2022/masterteam-escalation.mjs"
40
+ }
41
+ },
42
+ "module": "fesm2022/masterteam-escalation.mjs",
43
+ "typings": "index.d.ts"
44
+ }