@masterteam/workflow 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
2
2
  @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-space-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-slate-50:oklch(98.4% .003 247.858);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-900:oklch(20.8% .042 265.755);--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-semibold:600;--radius-xl:.75rem;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.static{position:static}.top-4{top:calc(var(--spacing)*4)}.right-4{right:calc(var(--spacing)*4)}.left-4{left:calc(var(--spacing)*4)}.z-10{z-index:10}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.flex{display:flex}.table{display:table}.h-full{height:100%}.\!w-\[25rem\]{width:25rem!important}.w-80{width:calc(var(--spacing)*80)}.w-full{width:100%}.flex-1{flex:1}.flex-col{flex-direction:column}.items-center{align-items:center}.gap-2{gap:calc(var(--spacing)*2)}.gap-6{gap:calc(var(--spacing)*6)}.gap-10{gap:calc(var(--spacing)*10)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-slate-200{border-color:var(--color-slate-200)}.bg-slate-50{background-color:var(--color-slate-50)}.p-4{padding:calc(var(--spacing)*4)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-3{padding-top:calc(var(--spacing)*3)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-slate-700{color:var(--color-slate-700)}.text-slate-900{color:var(--color-slate-900)}.\!shadow-none{--tw-shadow:0 0 #0000!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}}@keyframes enter{0%{opacity:var(--p-enter-opacity,1);transform:translate3d(var(--p-enter-translate-x,0),var(--p-enter-translate-y,0),0)scale3d(var(--p-enter-scale,1),var(--p-enter-scale,1),var(--p-enter-scale,1))rotate(var(--p-enter-rotate,0))}}@keyframes leave{to{opacity:var(--p-leave-opacity,1);transform:translate3d(var(--p-leave-translate-x,0),var(--p-leave-translate-y,0),0)scale3d(var(--p-leave-scale,1),var(--p-leave-scale,1),var(--p-leave-scale,1))rotate(var(--p-leave-rotate,0))}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
@@ -16,13 +16,19 @@ import { ToggleField } from '@masterteam/components/toggle-field';
16
16
  import { Button } from '@masterteam/components/button';
17
17
  import { SelectField } from '@masterteam/components/select-field';
18
18
 
19
- class SetWorkflowInfo {
19
+ class SetModuleInfo {
20
20
  moduleType;
21
21
  moduleId;
22
- static type = '[Workflow] Set Workflow Info';
23
- constructor(moduleType, moduleId) {
22
+ parentModuleType;
23
+ parentModuleId;
24
+ parentPath;
25
+ static type = '[Workflow] Set Module Info';
26
+ constructor(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {
24
27
  this.moduleType = moduleType;
25
28
  this.moduleId = moduleId;
29
+ this.parentModuleType = parentModuleType;
30
+ this.parentModuleId = parentModuleId;
31
+ this.parentPath = parentPath;
26
32
  }
27
33
  }
28
34
  class GetWorkflows {
@@ -202,16 +208,26 @@ let WorkflowState = class WorkflowState {
202
208
  static errorFactory(state) {
203
209
  return (loadingName) => state.errors?.[loadingName] ?? null;
204
210
  }
205
- setWorkflowInfo(ctx, action) {
211
+ setModuleInfo(ctx, action) {
212
+ let parentPath = '';
213
+ if (action.parentModuleType && action.parentModuleId) {
214
+ parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;
215
+ }
216
+ else if (action.parentPath) {
217
+ parentPath = action.parentPath;
218
+ }
206
219
  ctx.patchState({
207
220
  moduleType: action.moduleType,
208
221
  moduleId: action.moduleId,
222
+ parentModuleType: action.parentModuleType ?? null,
223
+ parentModuleId: action.parentModuleId ?? null,
224
+ parentPath: parentPath ?? '',
209
225
  });
210
226
  }
211
227
  getWorkflows(ctx, _action) {
212
228
  startLoading(ctx, 'getWorkflows');
213
229
  const state = ctx.getState();
214
- const { moduleId } = state;
230
+ const { moduleId, parentPath, moduleType } = state;
215
231
  if (!moduleId) {
216
232
  const message = 'Module ID is not set';
217
233
  setLoadingError(ctx, 'getWorkflows', message);
@@ -219,7 +235,7 @@ let WorkflowState = class WorkflowState {
219
235
  return of(null);
220
236
  }
221
237
  return this.http
222
- .get(`${this.baseUrl}/${moduleId}/requestSchema`)
238
+ .get(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/requestSchema`)
223
239
  .pipe(tap((response) => {
224
240
  const workflows = response?.data ?? [];
225
241
  ctx.patchState({ workflows });
@@ -241,7 +257,7 @@ let WorkflowState = class WorkflowState {
241
257
  startLoading(ctx, 'getWorkflow');
242
258
  const state = ctx.getState();
243
259
  const workflowId = action.workflowId;
244
- const { moduleId } = state;
260
+ const { moduleId, parentPath, moduleType } = state;
245
261
  if (!workflowId) {
246
262
  const message = 'Workflow ID is not set';
247
263
  setLoadingError(ctx, 'getWorkflow', message);
@@ -251,7 +267,7 @@ let WorkflowState = class WorkflowState {
251
267
  // Set the workflowId in state
252
268
  ctx.patchState({ workflowId });
253
269
  return this.http
254
- .get(`${this.baseUrl}/${moduleId}/requestSchema/${workflowId}`, {
270
+ .get(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/requestSchema/${workflowId}`, {
255
271
  params: { Mode: 'edit' },
256
272
  })
257
273
  .pipe(tap((response) => {
@@ -725,8 +741,8 @@ let WorkflowState = class WorkflowState {
725
741
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: WorkflowState });
726
742
  };
727
743
  __decorate([
728
- Action(SetWorkflowInfo)
729
- ], WorkflowState.prototype, "setWorkflowInfo", null);
744
+ Action(SetModuleInfo)
745
+ ], WorkflowState.prototype, "setModuleInfo", null);
730
746
  __decorate([
731
747
  Action(GetWorkflows)
732
748
  ], WorkflowState.prototype, "getWorkflows", null);
@@ -819,7 +835,7 @@ WorkflowState = __decorate([
819
835
  ], WorkflowState);
820
836
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: WorkflowState, decorators: [{
821
837
  type: Injectable
822
- }], propDecorators: { setWorkflowInfo: [], getWorkflows: [], getWorkflow: [], getFormulaProperties: [], getGroups: [], getRolesForModule: [], getStep: [], validateFlow: [], createStep: [], updateStep: [], createConnection: [], updateConnection: [], publishWorkflow: [], deleteStep: [], deleteConnection: [] } });
838
+ }], propDecorators: { setModuleInfo: [], getWorkflows: [], getWorkflow: [], getFormulaProperties: [], getGroups: [], getRolesForModule: [], getStep: [], validateFlow: [], createStep: [], updateStep: [], createConnection: [], updateConnection: [], publishWorkflow: [], deleteStep: [], deleteConnection: [] } });
823
839
 
824
840
  class WorkflowFacade {
825
841
  store = inject(Store);
@@ -843,8 +859,8 @@ class WorkflowFacade {
843
859
  const errorFactory = select(WorkflowState.errorFactory);
844
860
  return computed(() => errorFactory()(loadingName));
845
861
  }
846
- setWorkflowInfo(moduleType, moduleId) {
847
- return this.store.dispatch(new SetWorkflowInfo(moduleType, moduleId));
862
+ setModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {
863
+ return this.store.dispatch(new SetModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath));
848
864
  }
849
865
  loadWorkflows() {
850
866
  return this.store.dispatch(new GetWorkflows());
@@ -915,6 +931,9 @@ class workflowBuilder {
915
931
  selectedStep = this.workflowFacade.selectedStep;
916
932
  selectedWorkflowId = computed(() => this.workflow()?.id, ...(ngDevMode ? [{ debugName: "selectedWorkflowId" }] : []));
917
933
  selectedTab = signal('tab1', ...(ngDevMode ? [{ debugName: "selectedTab" }] : []));
934
+ nodeFields = signal({
935
+ name: 'title',
936
+ }, ...(ngDevMode ? [{ debugName: "nodeFields" }] : []));
918
937
  nodeFormControl = new FormControl();
919
938
  isPublished = signal(false, ...(ngDevMode ? [{ debugName: "isPublished" }] : []));
920
939
  isPublishDisabled = computed(() => !this.isFlowValid(), ...(ngDevMode ? [{ debugName: "isPublishDisabled" }] : []));
@@ -930,7 +949,7 @@ class workflowBuilder {
930
949
  const properties = this.workflow()?.properties || [];
931
950
  return properties.map((prop) => ({
932
951
  id: prop.id,
933
- name: prop.property.name,
952
+ name: prop.property.title,
934
953
  isVisible: false,
935
954
  isEditable: false,
936
955
  _original: prop, // Keep original for reference
@@ -978,14 +997,14 @@ class workflowBuilder {
978
997
  bodyClass: 'space-y-2',
979
998
  fields: [
980
999
  {
981
- key: 'name.en',
1000
+ key: 'title.en',
982
1001
  label: 'Name (English)',
983
1002
  placeholder: 'Enter name in English',
984
1003
  cssClass: 'w-full',
985
1004
  required: true,
986
1005
  },
987
1006
  {
988
- key: 'name.ar',
1007
+ key: 'title.ar',
989
1008
  label: 'Name (Arabic)',
990
1009
  placeholder: 'Enter name in Arabic',
991
1010
  cssClass: 'w-full',
@@ -1025,7 +1044,7 @@ class workflowBuilder {
1025
1044
  required: true,
1026
1045
  type: 'select',
1027
1046
  options: this.groups(),
1028
- optionLabel: 'name',
1047
+ optionLabel: 'title',
1029
1048
  optionValue: 'id',
1030
1049
  relations: [{ key: 'targetType', value: '1', action: 'show' }],
1031
1050
  },
@@ -1037,14 +1056,14 @@ class workflowBuilder {
1037
1056
  required: true,
1038
1057
  type: 'select',
1039
1058
  options: this.roles(),
1040
- optionLabel: 'name',
1059
+ optionLabel: 'title',
1041
1060
  optionValue: 'id',
1042
1061
  relations: [{ key: 'targetType', value: '2', action: 'show' }],
1043
1062
  },
1044
1063
  ],
1045
1064
  }), ...(ngDevMode ? [{ debugName: "approverSection" }] : []));
1046
1065
  slaSection = {
1047
- key: 'settings',
1066
+ key: 'slaSection',
1048
1067
  type: 'none',
1049
1068
  bodyClass: 'space-y-1',
1050
1069
  fields: [
@@ -1138,7 +1157,6 @@ class workflowBuilder {
1138
1157
  const workflow = this.workflow();
1139
1158
  if (workflow && workflow.isPublished !== undefined) {
1140
1159
  this.isPublished.set(workflow.isPublished);
1141
- console.log('Publish status initialized from workflow:', workflow.isPublished);
1142
1160
  }
1143
1161
  });
1144
1162
  // Effect to watch selectedStep and patch form when it changes
@@ -1147,7 +1165,7 @@ class workflowBuilder {
1147
1165
  if (step) {
1148
1166
  // Patch form with complete step data including targetType and targetValue
1149
1167
  this.nodeFormControl.patchValue({
1150
- name: step.name,
1168
+ title: step.title,
1151
1169
  targetType: step.targetType || '1',
1152
1170
  group: step.targetType === '1' ? parseInt(step.targetValue) : null,
1153
1171
  role: step.targetType === '2' ? step.targetValue : null,
@@ -1159,21 +1177,15 @@ class workflowBuilder {
1159
1177
  const stepProperty = step.properties?.find((p) => p.propertyId === prop.id);
1160
1178
  return {
1161
1179
  id: prop.id,
1162
- name: prop.property.name,
1180
+ name: prop?.property?.title,
1163
1181
  isVisible: stepProperty?.isRead || false,
1164
1182
  isEditable: stepProperty?.isWrite || false,
1165
1183
  _original: prop,
1166
1184
  };
1167
1185
  });
1168
1186
  this._propertiesTableData.set(updatedTableData);
1169
- console.log('Form patched with step data:', step);
1170
1187
  }
1171
1188
  });
1172
- // Effect to log form state changes (demonstrates reactive tracking)
1173
- effect(() => {
1174
- const state = this.formStateInfo();
1175
- console.log('🔄 Form configuration updated:', state);
1176
- });
1177
1189
  }
1178
1190
  onNodeActionsEvent(event) {
1179
1191
  console.log('Node action event:', event);
@@ -1185,11 +1197,7 @@ class workflowBuilder {
1185
1197
  this.isPublished.set(false);
1186
1198
  return;
1187
1199
  }
1188
- console.log('Publish toggled:', isPublished);
1189
1200
  this.workflowFacade.publishWorkflow(isPublished).subscribe({
1190
- next: () => {
1191
- console.log('Workflow publish status updated:', isPublished);
1192
- },
1193
1201
  error: (error) => {
1194
1202
  console.error('Failed to update workflow publish status:', error);
1195
1203
  // Revert the toggle on error
@@ -1216,7 +1224,7 @@ class workflowBuilder {
1216
1224
  const properties = this.workflow()?.properties || [];
1217
1225
  const resetTableData = properties.map((prop) => ({
1218
1226
  id: prop.id,
1219
- name: prop.property.name,
1227
+ name: prop?.property?.title,
1220
1228
  isVisible: false,
1221
1229
  isEditable: false,
1222
1230
  _original: prop,
@@ -1243,7 +1251,7 @@ class workflowBuilder {
1243
1251
  }));
1244
1252
  // Prepare step payload
1245
1253
  const stepPayload = {
1246
- name: formValue.name || { en: 'New Step', ar: 'خطوة جديدة' },
1254
+ title: formValue.title,
1247
1255
  targetType: formValue.targetType,
1248
1256
  targetValue: formValue.targetType === '1' ? formValue.group : formValue.role,
1249
1257
  sla: formValue.sla || 0,
@@ -1291,7 +1299,7 @@ class workflowBuilder {
1291
1299
  }));
1292
1300
  // Prepare step payload
1293
1301
  const stepPayload = {
1294
- name: formValue.name || event.data.name,
1302
+ title: formValue.title,
1295
1303
  targetType: formValue.targetType,
1296
1304
  targetValue: formValue.targetType === '1' ? formValue.group : formValue.role,
1297
1305
  sla: formValue.sla || event.data.sla,
@@ -1384,7 +1392,7 @@ class workflowBuilder {
1384
1392
  }
1385
1393
  }
1386
1394
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: workflowBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });
1387
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: workflowBuilder, isStandalone: true, selector: "mt-workflow-builder", ngImport: i0, template: "<mt-card class=\"h-full relative\" id=\"helloYususf\">\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 Properties'\"\n [appendTo]=\"'helloYususf'\"\n >\n <div flowContent>\n <!-- <div class=\"absolute top-4 left-4 z-10\">\n @if (workflows().length > 1) {\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <mt-select-field\n [options]=\"workflows()\"\n [ngModel]=\"selectedWorkflowId()\"\n (ngModelChange)=\"onWorkflowChange($event)\"\n optionLabel=\"displayName\"\n optionValue=\"id\"\n placeholder=\"Select Workflow\"\n />\n </mt-card>\n </div>\n }\n </div> -->\n <div class=\"absolute top-4 right-4 z-10\">\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <div class=\"flex items-center gap-10\">\n <div class=\"flex items-center gap-2\">\n <mt-button [severity]=\"'secondary'\" icon=\"dev.dataflow-01\" />\n <label>Enable Workflow</label>\n </div>\n\n <mt-toggle-field\n [ngModel]=\"isPublished()\"\n (ngModelChange)=\"onPublishToggle($event)\"\n [disabled]=\"isPublishDisabled()\"\n ></mt-toggle-field>\n </div>\n </mt-card>\n </div>\n </div>\n </div>\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 <!-- Tabs skeleton -->\n <div class=\"flex gap-2 mb-4\">\n <p-skeleton\n width=\"6rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n <p-skeleton\n width=\"8rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n\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 -->\n <mt-tabs\n [(active)]=\"selectedTab\"\n [options]=\"tabsList\"\n fluid\n size=\"large\"\n ></mt-tabs>\n @switch (selectedTab()) {\n @case (\"tab1\") {\n <div class=\"mt-4\">\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n </div>\n }\n @case (\"tab2\") {\n <div class=\"mt-4\">\n <mt-table\n [data]=\"propertiesTableData()\"\n [columns]=\"propertiesColumns()\"\n [selectableRows]=\"false\"\n [showGridlines]=\"true\"\n [stripedRows]=\"true\"\n ></mt-table>\n </div>\n }\n }\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</mt-card>\n", dependencies: [{ kind: "component", type: StructureBuilder, selector: "mt-structure-builder", inputs: ["availableNodes", "nodeForm", "connectionForm", "nodeActions", "nodeFields", "isAutoLayout", "addModalType", "updateModalType", "addModalStyleClass", "updateModalStyleClass", "addModalHeader", "updateModalHeader", "appendTo", "nodes", "connections"], outputs: ["nodeActionsEvent", "action", "nodesChange", "connectionsChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "generalSearch", "showFilters", "loading", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "labelPosition", "placeholder", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }] });
1395
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: workflowBuilder, isStandalone: true, selector: "mt-workflow-builder", ngImport: i0, template: "<mt-card class=\"h-full relative\" id=\"workflow-builder-card\">\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 Properties'\"\n [appendTo]=\"'workflow-builder-card'\"\n [nodeFields]=\"nodeFields()\"\n >\n <div flowContent>\n <!-- <div class=\"absolute top-4 left-4 z-10\">\n @if (workflows().length > 1) {\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <mt-select-field\n [options]=\"workflows()\"\n [ngModel]=\"selectedWorkflowId()\"\n (ngModelChange)=\"onWorkflowChange($event)\"\n optionLabel=\"displayName\"\n optionValue=\"id\"\n placeholder=\"Select Workflow\"\n />\n </mt-card>\n </div>\n }\n </div> -->\n <div class=\"absolute top-4 right-4 z-10\">\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <div class=\"flex items-center gap-10\">\n <div class=\"flex items-center gap-2\">\n <mt-button [severity]=\"'secondary'\" icon=\"dev.dataflow-01\" />\n <label>Enable Workflow</label>\n </div>\n\n <mt-toggle-field\n [ngModel]=\"isPublished()\"\n (ngModelChange)=\"onPublishToggle($event)\"\n [disabled]=\"isPublishDisabled()\"\n ></mt-toggle-field>\n </div>\n </mt-card>\n </div>\n </div>\n </div>\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 <!-- Tabs skeleton -->\n <div class=\"flex gap-2 mb-4\">\n <p-skeleton\n width=\"6rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n <p-skeleton\n width=\"8rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n\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 -->\n <mt-tabs\n [(active)]=\"selectedTab\"\n [options]=\"tabsList\"\n fluid\n size=\"large\"\n ></mt-tabs>\n @switch (selectedTab()) {\n @case (\"tab1\") {\n <div class=\"mt-4\">\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n </div>\n }\n @case (\"tab2\") {\n <div class=\"mt-4\">\n <mt-table\n [data]=\"propertiesTableData()\"\n [columns]=\"propertiesColumns()\"\n [selectableRows]=\"false\"\n [showGridlines]=\"true\"\n [stripedRows]=\"true\"\n ></mt-table>\n </div>\n }\n }\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</mt-card>\n", dependencies: [{ kind: "component", type: StructureBuilder, selector: "mt-structure-builder", inputs: ["availableNodes", "nodeForm", "connectionForm", "nodeActions", "nodeFields", "isAutoLayout", "addModalType", "updateModalType", "addModalStyleClass", "updateModalStyleClass", "addModalHeader", "updateModalHeader", "appendTo", "nodes", "connections"], outputs: ["nodeActionsEvent", "action", "nodesChange", "connectionsChange"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Tabs, selector: "mt-tabs", inputs: ["options", "optionLabel", "optionValue", "active", "size", "fluid", "disabled"], outputs: ["activeChange", "onChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "generalSearch", "showFilters", "loading", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { kind: "component", type: Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "labelPosition", "placeholder", "readonly", "pInputs", "required"], outputs: ["onChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }] });
1388
1396
  }
1389
1397
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: workflowBuilder, decorators: [{
1390
1398
  type: Component,
@@ -1400,7 +1408,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
1400
1408
  ToggleField,
1401
1409
  Button,
1402
1410
  SelectField,
1403
- ], host: {}, template: "<mt-card class=\"h-full relative\" id=\"helloYususf\">\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 Properties'\"\n [appendTo]=\"'helloYususf'\"\n >\n <div flowContent>\n <!-- <div class=\"absolute top-4 left-4 z-10\">\n @if (workflows().length > 1) {\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <mt-select-field\n [options]=\"workflows()\"\n [ngModel]=\"selectedWorkflowId()\"\n (ngModelChange)=\"onWorkflowChange($event)\"\n optionLabel=\"displayName\"\n optionValue=\"id\"\n placeholder=\"Select Workflow\"\n />\n </mt-card>\n </div>\n }\n </div> -->\n <div class=\"absolute top-4 right-4 z-10\">\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <div class=\"flex items-center gap-10\">\n <div class=\"flex items-center gap-2\">\n <mt-button [severity]=\"'secondary'\" icon=\"dev.dataflow-01\" />\n <label>Enable Workflow</label>\n </div>\n\n <mt-toggle-field\n [ngModel]=\"isPublished()\"\n (ngModelChange)=\"onPublishToggle($event)\"\n [disabled]=\"isPublishDisabled()\"\n ></mt-toggle-field>\n </div>\n </mt-card>\n </div>\n </div>\n </div>\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 <!-- Tabs skeleton -->\n <div class=\"flex gap-2 mb-4\">\n <p-skeleton\n width=\"6rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n <p-skeleton\n width=\"8rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n\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 -->\n <mt-tabs\n [(active)]=\"selectedTab\"\n [options]=\"tabsList\"\n fluid\n size=\"large\"\n ></mt-tabs>\n @switch (selectedTab()) {\n @case (\"tab1\") {\n <div class=\"mt-4\">\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n </div>\n }\n @case (\"tab2\") {\n <div class=\"mt-4\">\n <mt-table\n [data]=\"propertiesTableData()\"\n [columns]=\"propertiesColumns()\"\n [selectableRows]=\"false\"\n [showGridlines]=\"true\"\n [stripedRows]=\"true\"\n ></mt-table>\n </div>\n }\n }\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</mt-card>\n" }]
1411
+ ], host: {}, template: "<mt-card class=\"h-full relative\" id=\"workflow-builder-card\">\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 Properties'\"\n [appendTo]=\"'workflow-builder-card'\"\n [nodeFields]=\"nodeFields()\"\n >\n <div flowContent>\n <!-- <div class=\"absolute top-4 left-4 z-10\">\n @if (workflows().length > 1) {\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <mt-select-field\n [options]=\"workflows()\"\n [ngModel]=\"selectedWorkflowId()\"\n (ngModelChange)=\"onWorkflowChange($event)\"\n optionLabel=\"displayName\"\n optionValue=\"id\"\n placeholder=\"Select Workflow\"\n />\n </mt-card>\n </div>\n }\n </div> -->\n <div class=\"absolute top-4 right-4 z-10\">\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <div class=\"flex items-center gap-10\">\n <div class=\"flex items-center gap-2\">\n <mt-button [severity]=\"'secondary'\" icon=\"dev.dataflow-01\" />\n <label>Enable Workflow</label>\n </div>\n\n <mt-toggle-field\n [ngModel]=\"isPublished()\"\n (ngModelChange)=\"onPublishToggle($event)\"\n [disabled]=\"isPublishDisabled()\"\n ></mt-toggle-field>\n </div>\n </mt-card>\n </div>\n </div>\n </div>\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 <!-- Tabs skeleton -->\n <div class=\"flex gap-2 mb-4\">\n <p-skeleton\n width=\"6rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n <p-skeleton\n width=\"8rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n\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 -->\n <mt-tabs\n [(active)]=\"selectedTab\"\n [options]=\"tabsList\"\n fluid\n size=\"large\"\n ></mt-tabs>\n @switch (selectedTab()) {\n @case (\"tab1\") {\n <div class=\"mt-4\">\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n </div>\n }\n @case (\"tab2\") {\n <div class=\"mt-4\">\n <mt-table\n [data]=\"propertiesTableData()\"\n [columns]=\"propertiesColumns()\"\n [selectableRows]=\"false\"\n [showGridlines]=\"true\"\n [stripedRows]=\"true\"\n ></mt-table>\n </div>\n }\n }\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</mt-card>\n" }]
1404
1412
  }], ctorParameters: () => [] });
1405
1413
 
1406
1414
  // store/app.state.ts
@@ -1418,5 +1426,5 @@ const REQUEST_CONTEXT = new HttpContextToken(() => ({
1418
1426
  * Generated bundle index. Do not edit.
1419
1427
  */
1420
1428
 
1421
- export { CreateConnection, CreateStep, DeleteConnection, DeleteStep, GetFormulaProperties, GetGroups, GetRolesForModule, GetStep, GetWorkflow, GetWorkflows, PublishWorkflow, REQUEST_CONTEXT, SetWorkflowInfo, UpdateConnection, UpdateStep, ValidateFlow, WorkflowFacade, WorkflowState, workflowBuilder };
1429
+ export { CreateConnection, CreateStep, DeleteConnection, DeleteStep, GetFormulaProperties, GetGroups, GetRolesForModule, GetStep, GetWorkflow, GetWorkflows, PublishWorkflow, REQUEST_CONTEXT, SetModuleInfo, UpdateConnection, UpdateStep, ValidateFlow, WorkflowFacade, WorkflowState, workflowBuilder };
1422
1430
  //# sourceMappingURL=masterteam-workflow.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-workflow.mjs","sources":["../../../../packages/masterteam/workflow/src/store/workflow/workflow.actions.ts","../../../../packages/masterteam/workflow/src/store/utils/state-helpers.ts","../../../../packages/masterteam/workflow/src/store/workflow/workflow.state.ts","../../../../packages/masterteam/workflow/src/store/workflow/workflow.facade.ts","../../../../packages/masterteam/workflow/src/store/workflow/api.model.ts","../../../../packages/masterteam/workflow/src/lib/workflow-builder/workflow-builder.ts","../../../../packages/masterteam/workflow/src/lib/workflow-builder/workflow-builder.html","../../../../packages/masterteam/workflow/src/store/app.state.ts","../../../../packages/masterteam/workflow/src/store/index.ts","../../../../packages/masterteam/workflow/src/public-api.ts","../../../../packages/masterteam/workflow/src/masterteam-workflow.ts"],"sourcesContent":["import type { ConnectionPayload, StepPayload } from './workflow.model';\n\nexport class SetWorkflowInfo {\n static readonly type = '[Workflow] Set Workflow Info';\n\n constructor(\n public readonly moduleType: string,\n public readonly moduleId: string | number,\n ) {}\n}\n\nexport class GetWorkflows {\n static readonly type = '[Workflow] Get Workflows';\n}\n\nexport class GetWorkflow {\n static readonly type = '[Workflow] Get Workflow';\n\n constructor(public readonly workflowId: string | number) {}\n}\n\nexport class GetFormulaProperties {\n static readonly type = '[Workflow] Get Formula Properties';\n}\n\nexport class GetGroups {\n static readonly type = '[Workflow] Get Groups';\n}\n\nexport class GetRolesForModule {\n static readonly type = '[Workflow] Get Roles For Module';\n}\n\nexport class GetStep {\n static readonly type = '[Workflow] Get Step';\n\n constructor(public readonly stepId: string | number) {}\n}\n\nexport class ValidateFlow {\n static readonly type = '[Workflow] Validate Flow';\n}\n\nexport class CreateStep {\n static readonly type = '[Workflow] Create Step';\n\n constructor(public readonly payload: StepPayload) {}\n}\n\nexport class UpdateStep {\n static readonly type = '[Workflow] Update Step';\n\n constructor(\n public readonly stepId: string | number,\n public readonly payload: StepPayload,\n public readonly isInitial?: boolean,\n ) {}\n}\n\nexport class CreateConnection {\n static readonly type = '[Workflow] Create Connection';\n\n constructor(public readonly payload: ConnectionPayload) {}\n}\n\nexport class UpdateConnection {\n static readonly type = '[Workflow] Update Connection';\n\n constructor(\n public readonly connectionId: string | number,\n public readonly payload: ConnectionPayload,\n ) {}\n}\n\nexport class PublishWorkflow {\n static readonly type = '[Workflow] Publish Workflow';\n\n constructor(public readonly isPublished: boolean) {}\n}\n\nexport class DeleteStep {\n static readonly type = '[Workflow] Delete Step';\n\n constructor(public readonly stepId: string | number) {}\n}\n\nexport class DeleteConnection {\n static readonly type = '[Workflow] 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 WorkflowConnection,\n WorkflowListItem,\n WorkflowLoadingName,\n WorkflowSchema,\n WorkflowStateModel,\n WorkflowStepSchema,\n} from './workflow.model';\nimport {\n CreateConnection,\n CreateStep,\n DeleteConnection,\n DeleteStep,\n GetFormulaProperties,\n GetGroups,\n GetRolesForModule,\n GetStep,\n GetWorkflow,\n GetWorkflows,\n PublishWorkflow,\n SetWorkflowInfo,\n UpdateConnection,\n UpdateStep,\n ValidateFlow,\n} from './workflow.actions';\nimport { Response } from './api.model';\n\nconst DEFAULT_STATE: WorkflowStateModel = {\n workflowId: null,\n moduleType: null,\n moduleId: null,\n workflows: [],\n workflow: null,\n formulaProperties: [],\n groups: [],\n roles: [],\n selectedStep: null,\n isFlowValid: null,\n loadingActive: [],\n errors: {},\n};\n\n@State<WorkflowStateModel>({\n name: 'workflow',\n defaults: DEFAULT_STATE,\n})\n@Injectable()\nexport class WorkflowState {\n private readonly http = inject(HttpClient);\n private readonly baseUrl = 'ProcessBuilder';\n private readonly groupsUrl = 'identity/Groups';\n private readonly rolesUrl = 'identity/roles/scopes';\n\n @Selector()\n static workflowId(state: WorkflowStateModel): string | number | null {\n return state.workflowId;\n }\n\n @Selector()\n static moduleType(state: WorkflowStateModel): string | null {\n return state.moduleType;\n }\n\n @Selector()\n static moduleId(state: WorkflowStateModel): string | number | null {\n return state.moduleId;\n }\n\n @Selector()\n static workflows(state: WorkflowStateModel) {\n return state.workflows;\n }\n\n @Selector()\n static workflow(state: WorkflowStateModel): WorkflowSchema | null {\n return state.workflow;\n }\n\n @Selector()\n static formulaProperties(state: WorkflowStateModel): FormulaProperty[] {\n return state.formulaProperties;\n }\n\n @Selector()\n static groups(state: WorkflowStateModel): GroupDefinition[] {\n return state.groups;\n }\n\n @Selector()\n static roles(state: WorkflowStateModel): RoleDefinition[] {\n return state.roles;\n }\n\n @Selector()\n static selectedStep(state: WorkflowStateModel): StepSchema | null {\n return state.selectedStep;\n }\n\n @Selector()\n static isFlowValid(state: WorkflowStateModel): boolean | null {\n return state.isFlowValid;\n }\n\n @Selector()\n static stepsSchema(state: WorkflowStateModel): WorkflowStepSchema[] {\n return state.workflow?.stepsSchema ?? [];\n }\n\n @Selector()\n static connections(state: WorkflowStateModel): WorkflowConnection[] {\n return state.workflow?.connections ?? [];\n }\n\n @Selector()\n static isLoadingFactory(state: WorkflowStateModel) {\n return (loadingName: WorkflowLoadingName) =>\n state.loadingActive.includes(loadingName);\n }\n\n @Selector()\n static errorFactory(state: WorkflowStateModel) {\n return (loadingName: WorkflowLoadingName) =>\n state.errors?.[loadingName] ?? null;\n }\n\n @Action(SetWorkflowInfo)\n setWorkflowInfo(\n ctx: StateContext<WorkflowStateModel>,\n action: SetWorkflowInfo,\n ) {\n ctx.patchState({\n moduleType: action.moduleType,\n moduleId: action.moduleId,\n });\n }\n\n @Action(GetWorkflows)\n getWorkflows(ctx: StateContext<WorkflowStateModel>, _action: GetWorkflows) {\n startLoading(ctx, 'getWorkflows');\n\n const state = ctx.getState();\n const { moduleId } = state;\n\n if (!moduleId) {\n const message = 'Module ID is not set';\n setLoadingError(ctx, 'getWorkflows', message);\n endLoading(ctx, 'getWorkflows');\n return of(null);\n }\n\n return this.http\n .get<\n Response<WorkflowListItem[]>\n >(`${this.baseUrl}/${moduleId}/requestSchema`)\n .pipe(\n tap((response) => {\n const workflows = response?.data ?? [];\n ctx.patchState({ workflows });\n\n // Auto-select and load first workflow if available\n if (workflows.length > 0) {\n const firstWorkflow = workflows[0];\n ctx.patchState({ workflowId: firstWorkflow.id });\n ctx.dispatch(new GetWorkflow(firstWorkflow.id));\n }\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to load workflows';\n setLoadingError(ctx, 'getWorkflows', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'getWorkflows')),\n );\n }\n\n @Action(GetWorkflow)\n getWorkflow(ctx: StateContext<WorkflowStateModel>, action: GetWorkflow) {\n startLoading(ctx, 'getWorkflow');\n\n const state = ctx.getState();\n const workflowId = action.workflowId;\n const { moduleId } = state;\n\n if (!workflowId) {\n const message = 'Workflow ID is not set';\n setLoadingError(ctx, 'getWorkflow', message);\n endLoading(ctx, 'getWorkflow');\n return of(null);\n }\n\n // Set the workflowId in state\n ctx.patchState({ workflowId });\n\n return this.http\n .get<Response<WorkflowSchema>>(\n `${this.baseUrl}/${moduleId}/requestSchema/${workflowId}`,\n {\n params: { Mode: 'edit' },\n },\n )\n .pipe(\n tap((response) => {\n const workflow = response?.data ?? null;\n ctx.patchState({\n workflow,\n isFlowValid: workflow?.isValid ?? null,\n });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to load workflow';\n setLoadingError(ctx, 'getWorkflow', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'getWorkflow')),\n );\n }\n\n @Action(GetFormulaProperties)\n getFormulaProperties(\n ctx: StateContext<WorkflowStateModel>,\n _action: GetFormulaProperties,\n ) {\n startLoading(ctx, 'getFormulaProperties');\n\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow 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/${workflowId}`)\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<WorkflowStateModel>, _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<WorkflowStateModel>,\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<WorkflowStateModel>, action: GetStep) {\n startLoading(ctx, 'getStep');\n\n return this.http\n .get<Response<StepSchema>>(\n `${this.baseUrl}/stepSchema/${action.stepId}`,\n {\n params: { Mode: 'edit' },\n },\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<WorkflowStateModel>, _action: ValidateFlow) {\n startLoading(ctx, 'validateFlow');\n\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow 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/${workflowId}/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<WorkflowStateModel>, action: CreateStep) {\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow 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.workflow) {\n ctx.patchState({\n workflow: {\n ...state.workflow,\n stepsSchema: [...state.workflow.stepsSchema, tempStep],\n },\n });\n }\n\n startLoading(ctx, 'createStep');\n\n return this.http\n .post<\n Response<StepResponse>\n >(`${this.baseUrl}/requestSchema/${workflowId}/stepSchema`, action.payload)\n .pipe(\n tap((response) => {\n const createdStep = response?.data;\n const currentState = ctx.getState();\n if (createdStep && currentState.workflow) {\n const updatedSteps = currentState.workflow.stepsSchema.map(\n (step) =>\n step.id === tempId ? { ...createdStep, loading: false } : step,\n );\n\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n stepsSchema: updatedSteps,\n },\n });\n }\n // Validate flow after creating step\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const filteredSteps = currentState.workflow.stepsSchema.filter(\n (step) => step.id !== tempId,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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<WorkflowStateModel>, action: UpdateStep) {\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow ID is not set';\n setLoadingError(ctx, 'updateStep', message);\n return of(null);\n }\n\n if (state.workflow) {\n const updatedSteps = state.workflow.stepsSchema.map((step) =>\n step.id === action.stepId ? { ...step, loading: true } : step,\n );\n ctx.patchState({\n workflow: {\n ...state.workflow,\n stepsSchema: updatedSteps,\n },\n });\n }\n\n startLoading(ctx, 'updateStep');\n\n const endpoint = action.isInitial ? 'initialStepSchema' : 'stepSchema';\n\n return this.http\n .put<\n Response<StepResponse>\n >(`${this.baseUrl}/${endpoint}/${action.stepId}`, action.payload)\n .pipe(\n tap((response) => {\n const updatedStep = response?.data;\n const currentState = ctx.getState();\n if (updatedStep && currentState.workflow) {\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n stepsSchema: currentState.workflow.stepsSchema.map((step) =>\n step.id === updatedStep.id\n ? { ...updatedStep, loading: false }\n : step,\n ),\n },\n });\n }\n // Validate flow after updating step\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const errorSteps = currentState.workflow.stepsSchema.map((step) =>\n step.id === action.stepId ? { ...step, loading: false } : step,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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<WorkflowStateModel>,\n action: CreateConnection,\n ) {\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow 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.workflow) {\n ctx.patchState({\n workflow: {\n ...state.workflow,\n connections: [...state.workflow.connections, tempConnection],\n },\n });\n }\n\n startLoading(ctx, 'createConnection');\n\n return this.http\n .post<\n Response<ConnectionResponse>\n >(`${this.baseUrl}/requestSchema/${workflowId}/connection`, action.payload)\n .pipe(\n tap((response) => {\n const createdConnection = response?.data;\n const currentState = ctx.getState();\n if (createdConnection && currentState.workflow) {\n const updatedConnections = currentState.workflow.connections.map(\n (conn) =>\n conn.id === tempId\n ? { ...createdConnection, loading: false }\n : conn,\n );\n\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n connections: updatedConnections,\n },\n });\n }\n // Validate flow after creating connection\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const filteredConnections =\n currentState.workflow.connections.filter(\n (conn) => conn.id !== tempId,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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<WorkflowStateModel>,\n action: UpdateConnection,\n ) {\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow ID is not set';\n setLoadingError(ctx, 'updateConnection', message);\n return of(null);\n }\n\n if (state.workflow) {\n const updatedConnections = state.workflow.connections.map((conn) =>\n conn.id === action.connectionId ? { ...conn, loading: true } : conn,\n );\n ctx.patchState({\n workflow: {\n ...state.workflow,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'updateConnection');\n\n return this.http\n .put<\n Response<ConnectionResponse>\n >(`${this.baseUrl}/stepSchemaConnection/${action.connectionId}`, action.payload)\n .pipe(\n tap((response) => {\n const updatedConnection = response?.data;\n const currentState = ctx.getState();\n if (updatedConnection && currentState.workflow) {\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n connections: currentState.workflow.connections.map((conn) =>\n conn.id === updatedConnection.id\n ? { ...updatedConnection, loading: false }\n : conn,\n ),\n },\n });\n }\n // Validate flow after updating connection\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const errorConnections = currentState.workflow.connections.map(\n (conn) =>\n conn.id === action.connectionId\n ? { ...conn, loading: false }\n : conn,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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(PublishWorkflow)\n publishWorkflow(\n ctx: StateContext<WorkflowStateModel>,\n action: PublishWorkflow,\n ) {\n startLoading(ctx, 'publishWorkflow');\n\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow ID is not set';\n setLoadingError(ctx, 'publishWorkflow', message);\n endLoading(ctx, 'publishWorkflow');\n return of(null);\n }\n\n return this.http\n .put<\n Response<PublishResponse>\n >(`${this.baseUrl}/requestSchema/${workflowId}/publish`, { IsPublished: action.isPublished })\n .pipe(\n tap((response) => {\n const publishedData = response?.data;\n if (publishedData && state.workflow) {\n ctx.patchState({\n workflow: {\n ...state.workflow,\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 workflow';\n setLoadingError(ctx, 'publishWorkflow', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'publishWorkflow')),\n );\n }\n\n @Action(DeleteStep)\n deleteStep(ctx: StateContext<WorkflowStateModel>, action: DeleteStep) {\n const state = ctx.getState();\n\n if (state.workflow) {\n // Mark step as loading\n const updatedSteps = state.workflow.stepsSchema.map((step) =>\n step.id == action.stepId ? { ...step, loading: true } : step,\n );\n\n // Filter out all connections related to this step\n const updatedConnections = state.workflow.connections.filter(\n (conn) => conn.source != action.stepId && conn.target != action.stepId,\n );\n\n ctx.patchState({\n workflow: {\n ...state.workflow,\n stepsSchema: updatedSteps,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'deleteStep');\n\n return this.http\n .delete<Response<boolean>>(`${this.baseUrl}/stepSchema/${action.stepId}`)\n .pipe(\n tap(() => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n stepsSchema: currentState.workflow.stepsSchema.filter(\n (step) => step.id != action.stepId,\n ),\n },\n });\n }\n // Validate flow after deleting step\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n // Restore step loading state\n const errorSteps = currentState.workflow.stepsSchema.map((step) =>\n step.id == action.stepId ? { ...step, loading: false } : step,\n );\n\n // Restore connections related to this step from original state\n const relatedConnections =\n state.workflow?.connections.filter(\n (conn) =>\n conn.source == action.stepId || conn.target == action.stepId,\n ) || [];\n\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n stepsSchema: errorSteps,\n connections: [\n ...currentState.workflow.connections,\n ...relatedConnections,\n ],\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<WorkflowStateModel>,\n action: DeleteConnection,\n ) {\n const state = ctx.getState();\n\n if (state.workflow) {\n const updatedConnections = state.workflow.connections.map((conn) =>\n conn.id == action.connectionId ? { ...conn, loading: true } : conn,\n );\n ctx.patchState({\n workflow: {\n ...state.workflow,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'deleteConnection');\n\n return this.http\n .delete<\n Response<boolean>\n >(`${this.baseUrl}/stepSchemaConnection/${action.connectionId}`)\n .pipe(\n tap(() => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n connections: currentState.workflow.connections.filter(\n (conn) => conn.id != action.connectionId,\n ),\n },\n });\n }\n // Validate flow after deleting connection\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const errorConnections = currentState.workflow.connections.map(\n (conn) =>\n conn.id == action.connectionId\n ? { ...conn, loading: false }\n : conn,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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 WorkflowConnection,\n WorkflowListItem,\n WorkflowLoadingName,\n WorkflowSchema,\n WorkflowStepSchema,\n} from './workflow.model';\nimport {\n CreateConnection,\n CreateStep,\n DeleteConnection,\n DeleteStep,\n GetFormulaProperties,\n GetGroups,\n GetRolesForModule,\n GetStep,\n GetWorkflow,\n GetWorkflows,\n PublishWorkflow,\n SetWorkflowInfo,\n UpdateConnection,\n UpdateStep,\n ValidateFlow,\n} from './workflow.actions';\nimport { WorkflowState } from './workflow.state';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WorkflowFacade {\n private readonly store = inject(Store);\n\n readonly workflowId = select<string | number | null>(\n WorkflowState.workflowId,\n );\n readonly moduleType = select<string | null>(WorkflowState.moduleType);\n readonly moduleId = select<string | number | null>(WorkflowState.moduleId);\n readonly workflows = select<WorkflowListItem[]>(WorkflowState.workflows);\n readonly workflow = select<WorkflowSchema | null>(WorkflowState.workflow);\n readonly formulaProperties = select<FormulaProperty[]>(\n WorkflowState.formulaProperties,\n );\n readonly groups = select<GroupDefinition[]>(WorkflowState.groups);\n readonly roles = select<RoleDefinition[]>(WorkflowState.roles);\n readonly selectedStep = select<StepSchema | null>(WorkflowState.selectedStep);\n readonly isFlowValid = select<boolean | null>(WorkflowState.isFlowValid);\n readonly steps = select<WorkflowStepSchema[]>(WorkflowState.stepsSchema);\n readonly connections = select<WorkflowConnection[]>(\n WorkflowState.connections,\n );\n\n isLoading(loadingName: WorkflowLoadingName) {\n const loadingFactory = select<(name: WorkflowLoadingName) => boolean>(\n WorkflowState.isLoadingFactory,\n );\n return computed(() => loadingFactory()(loadingName));\n }\n\n error(loadingName: WorkflowLoadingName) {\n const errorFactory = select<(name: WorkflowLoadingName) => string | null>(\n WorkflowState.errorFactory,\n );\n return computed(() => errorFactory()(loadingName));\n }\n\n setWorkflowInfo(\n moduleType: string,\n moduleId: string | number,\n ): Observable<unknown> {\n return this.store.dispatch(new SetWorkflowInfo(moduleType, moduleId));\n }\n\n loadWorkflows(): Observable<unknown> {\n return this.store.dispatch(new GetWorkflows());\n }\n\n selectWorkflow(workflowId: string | number): Observable<unknown> {\n return this.store.dispatch(new GetWorkflow(workflowId));\n }\n\n loadWorkflow(): Observable<unknown> {\n return this.loadWorkflows();\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 isInitial?: boolean,\n ): Observable<unknown> {\n return this.store.dispatch(new UpdateStep(stepId, payload, isInitial));\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 publishWorkflow(isPublished: boolean): Observable<unknown> {\n return this.store.dispatch(new PublishWorkflow(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 { WorkflowFacade, WorkflowStepSchema } from '../../store/workflow';\nimport { Tabs } from '@masterteam/components/tabs';\nimport { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\nimport { Table } from '@masterteam/components/table';\nimport { ColumnDef } from '@masterteam/components/table';\nimport { Skeleton } from 'primeng/skeleton';\nimport { ToggleField } from '@masterteam/components/toggle-field';\nimport { Button } from '@masterteam/components/button';\nimport { SelectField } from '@masterteam/components/select-field';\n\n@Component({\n selector: 'mt-workflow-builder',\n imports: [\n StructureBuilder,\n Card,\n Tabs,\n ReactiveFormsModule,\n FormsModule,\n DynamicForm,\n Table,\n Skeleton,\n ToggleField,\n Button,\n SelectField,\n ],\n templateUrl: './workflow-builder.html',\n styles: [],\n host: {},\n})\nexport class workflowBuilder {\n private workflowFacade = inject(WorkflowFacade);\n groups = this.workflowFacade.groups;\n roles = this.workflowFacade.roles;\n workflows = this.workflowFacade.workflows;\n workflow = this.workflowFacade.workflow;\n loading = this.workflowFacade.isLoading('getWorkflow');\n loadingStep = this.workflowFacade.isLoading('getStep');\n isFlowValid = this.workflowFacade.isFlowValid;\n\n selectedStep = this.workflowFacade.selectedStep;\n selectedWorkflowId = computed(() => this.workflow()?.id);\n\n selectedTab = signal<any>('tab1');\n nodeFormControl = new FormControl();\n isPublished = signal<boolean>(false);\n isPublishDisabled = computed(() => !this.isFlowValid());\n\n private isEditingInitialNode = signal<boolean>(false);\n\n // Properties table data - writable signal that can be updated when loading step details\n private _propertiesTableData = signal<any[]>([]);\n\n // Computed that initializes from workflow properties\n propertiesTableData = computed(() => {\n const currentData = this._propertiesTableData();\n if (currentData.length > 0) {\n return currentData;\n }\n\n const properties = this.workflow()?.properties || [];\n return properties.map((prop) => ({\n id: prop.id,\n name: prop.property.name,\n isVisible: false,\n isEditable: false,\n _original: prop, // Keep original for reference\n }));\n });\n\n // Table columns configuration\n propertiesColumns = signal<ColumnDef[]>([\n {\n key: 'name',\n label: 'Name',\n type: 'text',\n },\n {\n key: 'isVisible',\n label: 'Visible',\n type: 'boolean',\n },\n {\n key: 'isEditable',\n label: 'Editable',\n type: 'boolean',\n },\n ]);\n\n tabsList = [\n { label: 'Settings', value: 'tab1' },\n { label: 'Permissions', value: 'tab2' },\n ];\n availableNodes = [\n {\n id: 'FormStep',\n label: 'Form Step',\n name: {\n en: 'Form 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: 'label',\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: 'name',\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: 'name',\n optionValue: 'id',\n relations: [{ key: 'targetType', value: '2', action: 'show' }],\n },\n ],\n }));\n\n private readonly slaSection = {\n key: 'settings',\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 computed signal\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 // Computed signal for form state info - useful for debugging or UI indicators\n formStateInfo = computed(() => ({\n isInitialNode: this.isEditingInitialNode(),\n sectionsCount: this.nodeForm().sections.length,\n hasApproverSection: !this.isEditingInitialNode(),\n hasSlaSection: !this.isEditingInitialNode(),\n formMode: this.isEditingInitialNode() ? 'initial-node' : 'standard-node',\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 (with positions) - linked to store via selectors\n steps = computed(() => {\n return this.workflowFacade.steps().map((step) => ({\n ...step,\n color: '#000000',\n }));\n });\n\n // Connections between nodes (matching your design) - linked to store via selectors\n connections = computed(() => {\n return this.workflowFacade.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 condition: (node: WorkflowStepSchema) => !node.isInitial,\n },\n ]);\n\n constructor() {\n // Effect to initialize isPublished from workflow.isPublished\n effect(() => {\n const workflow = this.workflow();\n if (workflow && workflow.isPublished !== undefined) {\n this.isPublished.set(workflow.isPublished);\n console.log(\n 'Publish status initialized from workflow:',\n workflow.isPublished,\n );\n }\n });\n\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 including targetType and targetValue\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 // Update properties table with step's property permissions\n const properties = this.workflow()?.properties || [];\n const updatedTableData = properties.map((prop) => {\n const stepProperty = step.properties?.find(\n (p) => p.propertyId === prop.id,\n );\n\n return {\n id: prop.id,\n name: prop.property.name,\n isVisible: stepProperty?.isRead || false,\n isEditable: stepProperty?.isWrite || false,\n _original: prop,\n };\n });\n\n this._propertiesTableData.set(updatedTableData);\n console.log('Form patched with step data:', step);\n }\n });\n\n // Effect to log form state changes (demonstrates reactive tracking)\n effect(() => {\n const state = this.formStateInfo();\n console.log('🔄 Form configuration updated:', state);\n });\n }\n\n onNodeActionsEvent(event: NodeActionEvent) {\n console.log('Node action event:', event);\n }\n\n onPublishToggle(isPublished: boolean): void {\n // Prevent publishing if workflow is not valid\n if (isPublished && !this.isFlowValid()) {\n console.warn('Cannot publish: Workflow is not valid');\n this.isPublished.set(false);\n return;\n }\n\n console.log('Publish toggled:', isPublished);\n this.workflowFacade.publishWorkflow(isPublished).subscribe({\n next: () => {\n console.log('Workflow publish status updated:', isPublished);\n },\n error: (error) => {\n console.error('Failed to update workflow publish status:', error);\n // Revert the toggle on error\n this.isPublished.set(!isPublished);\n },\n });\n }\n\n onWorkflowChange(workflowId: number): void {\n console.log('Workflow changed to:', workflowId);\n this.workflowFacade.selectWorkflow(workflowId);\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 // Reset properties table to default state (all unchecked)\n const properties = this.workflow()?.properties || [];\n const resetTableData = properties.map((prop) => ({\n id: prop.id,\n name: prop.property.name,\n isVisible: false,\n isEditable: false,\n _original: prop,\n }));\n\n this._propertiesTableData.set(resetTableData);\n\n // Reset to first tab\n this.selectedTab.set('tab1');\n\n console.log('Form and properties 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 // Get selected properties with isVisible and isEditable flags\n const propertiesPayload = this.propertiesTableData()\n .filter((prop) => prop.isVisible || prop.isEditable)\n .map((prop) => ({\n PropertyId: prop.id,\n isRead: prop.isVisible,\n isWrite: prop.isEditable,\n }));\n\n // Prepare step payload\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 properties: propertiesPayload,\n };\n\n // Create step via facade\n this.workflowFacade.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 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.workflowFacade.loadStep(stepId);\n }\n break;\n case 'startCreating':\n // Reset form and properties for new step\n this.clearForm();\n break;\n case 'updateNode':\n if (event.data) {\n // Get form values\n const formValue = this.nodeFormControl.value;\n const stepId = event.data.id;\n const isInitial = !!event.data.isInitial;\n\n // Get selected properties with isVisible and isEditable flags\n const propertiesPayload = this.propertiesTableData()\n .filter((prop) => prop.isVisible || prop.isEditable)\n .map((prop) => ({\n PropertyId: prop.id,\n isRead: prop.isVisible,\n isWrite: prop.isEditable,\n }));\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 properties: propertiesPayload,\n };\n\n // Update step via facade, passing isInitial flag\n this.workflowFacade\n .updateStep(stepId, stepPayload, isInitial)\n .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.workflowFacade.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.workflowFacade.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.workflowFacade\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.workflowFacade.deleteConnection(connectionIdToDelete).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-full relative\" id=\"helloYususf\">\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 Properties'\"\n [appendTo]=\"'helloYususf'\"\n >\n <div flowContent>\n <!-- <div class=\"absolute top-4 left-4 z-10\">\n @if (workflows().length > 1) {\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <mt-select-field\n [options]=\"workflows()\"\n [ngModel]=\"selectedWorkflowId()\"\n (ngModelChange)=\"onWorkflowChange($event)\"\n optionLabel=\"displayName\"\n optionValue=\"id\"\n placeholder=\"Select Workflow\"\n />\n </mt-card>\n </div>\n }\n </div> -->\n <div class=\"absolute top-4 right-4 z-10\">\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <div class=\"flex items-center gap-10\">\n <div class=\"flex items-center gap-2\">\n <mt-button [severity]=\"'secondary'\" icon=\"dev.dataflow-01\" />\n <label>Enable Workflow</label>\n </div>\n\n <mt-toggle-field\n [ngModel]=\"isPublished()\"\n (ngModelChange)=\"onPublishToggle($event)\"\n [disabled]=\"isPublishDisabled()\"\n ></mt-toggle-field>\n </div>\n </mt-card>\n </div>\n </div>\n </div>\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 <!-- Tabs skeleton -->\n <div class=\"flex gap-2 mb-4\">\n <p-skeleton\n width=\"6rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n <p-skeleton\n width=\"8rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n\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 -->\n <mt-tabs\n [(active)]=\"selectedTab\"\n [options]=\"tabsList\"\n fluid\n size=\"large\"\n ></mt-tabs>\n @switch (selectedTab()) {\n @case (\"tab1\") {\n <div class=\"mt-4\">\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n </div>\n }\n @case (\"tab2\") {\n <div class=\"mt-4\">\n <mt-table\n [data]=\"propertiesTableData()\"\n [columns]=\"propertiesColumns()\"\n [selectableRows]=\"false\"\n [showGridlines]=\"true\"\n [stripedRows]=\"true\"\n ></mt-table>\n </div>\n }\n }\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</mt-card>\n","// store/app.state.ts\n\nimport { HttpContextToken } from '@angular/common/http';\n\nexport const REQUEST_CONTEXT = new HttpContextToken<{ useBaseUrl: boolean }>(\n () => ({\n useBaseUrl: false,\n }),\n);\n","// Re-export app state\nexport * from './app.state';\n\n// Re-export workflow state\nexport * from './workflow';\n","/*\n * Public API Surface of structure-builder\n */\n\nexport * from './lib/workflow-builder/workflow-builder';\n\nexport * from './store';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAEa,eAAe,CAAA;AAIR,IAAA,UAAA;AACA,IAAA,QAAA;AAJlB,IAAA,OAAgB,IAAI,GAAG,8BAA8B;IAErD,WAAA,CACkB,UAAkB,EAClB,QAAyB,EAAA;QADzB,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,CAAA,QAAQ,GAAR,QAAQ;IACvB;;MAGQ,YAAY,CAAA;AACvB,IAAA,OAAgB,IAAI,GAAG,0BAA0B;;MAGtC,WAAW,CAAA;AAGM,IAAA,UAAA;AAF5B,IAAA,OAAgB,IAAI,GAAG,yBAAyB;AAEhD,IAAA,WAAA,CAA4B,UAA2B,EAAA;QAA3B,IAAA,CAAA,UAAU,GAAV,UAAU;IAAoB;;MAG/C,oBAAoB,CAAA;AAC/B,IAAA,OAAgB,IAAI,GAAG,mCAAmC;;MAG/C,SAAS,CAAA;AACpB,IAAA,OAAgB,IAAI,GAAG,uBAAuB;;MAGnC,iBAAiB,CAAA;AAC5B,IAAA,OAAgB,IAAI,GAAG,iCAAiC;;MAG7C,OAAO,CAAA;AAGU,IAAA,MAAA;AAF5B,IAAA,OAAgB,IAAI,GAAG,qBAAqB;AAE5C,IAAA,WAAA,CAA4B,MAAuB,EAAA;QAAvB,IAAA,CAAA,MAAM,GAAN,MAAM;IAAoB;;MAG3C,YAAY,CAAA;AACvB,IAAA,OAAgB,IAAI,GAAG,0BAA0B;;MAGtC,UAAU,CAAA;AAGO,IAAA,OAAA;AAF5B,IAAA,OAAgB,IAAI,GAAG,wBAAwB;AAE/C,IAAA,WAAA,CAA4B,OAAoB,EAAA;QAApB,IAAA,CAAA,OAAO,GAAP,OAAO;IAAgB;;MAGxC,UAAU,CAAA;AAIH,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,SAAA;AAL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A,UAAA,EAAA,CAAA;kBAnB3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EAAA,OAAA,EACtB;wBACP,gBAAgB;wBAChB,IAAI;wBACJ,IAAI;wBACJ,mBAAmB;wBACnB,WAAW;wBACX,WAAW;wBACX,KAAK;wBACL,QAAQ;wBACR,WAAW;wBACX,MAAM;wBACN,WAAW;AACZ,qBAAA,EAAA,IAAA,EAGK,EAAE,EAAA,QAAA,EAAA,w+LAAA,EAAA;;;AE3CV;AAIO,MAAM,eAAe,GAAG,IAAI,gBAAgB,CACjD,OAAO;AACL,IAAA,UAAU,EAAE,KAAK;AAClB,CAAA,CAAC;;ACPJ;;ACAA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"masterteam-workflow.mjs","sources":["../../../../packages/masterteam/workflow/src/store/workflow/workflow.actions.ts","../../../../packages/masterteam/workflow/src/store/utils/state-helpers.ts","../../../../packages/masterteam/workflow/src/store/workflow/workflow.state.ts","../../../../packages/masterteam/workflow/src/store/workflow/workflow.facade.ts","../../../../packages/masterteam/workflow/src/store/workflow/api.model.ts","../../../../packages/masterteam/workflow/src/lib/workflow-builder/workflow-builder.ts","../../../../packages/masterteam/workflow/src/lib/workflow-builder/workflow-builder.html","../../../../packages/masterteam/workflow/src/store/app.state.ts","../../../../packages/masterteam/workflow/src/store/index.ts","../../../../packages/masterteam/workflow/src/public-api.ts","../../../../packages/masterteam/workflow/src/masterteam-workflow.ts"],"sourcesContent":["import type { ConnectionPayload, StepPayload } from './workflow.model';\n\nexport class SetModuleInfo {\n static readonly type = '[Workflow] 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}\n\nexport class GetWorkflows {\n static readonly type = '[Workflow] Get Workflows';\n}\n\nexport class GetWorkflow {\n static readonly type = '[Workflow] Get Workflow';\n\n constructor(public readonly workflowId: string | number) {}\n}\n\nexport class GetFormulaProperties {\n static readonly type = '[Workflow] Get Formula Properties';\n}\n\nexport class GetGroups {\n static readonly type = '[Workflow] Get Groups';\n}\n\nexport class GetRolesForModule {\n static readonly type = '[Workflow] Get Roles For Module';\n}\n\nexport class GetStep {\n static readonly type = '[Workflow] Get Step';\n\n constructor(public readonly stepId: string | number) {}\n}\n\nexport class ValidateFlow {\n static readonly type = '[Workflow] Validate Flow';\n}\n\nexport class CreateStep {\n static readonly type = '[Workflow] Create Step';\n\n constructor(public readonly payload: StepPayload) {}\n}\n\nexport class UpdateStep {\n static readonly type = '[Workflow] Update Step';\n\n constructor(\n public readonly stepId: string | number,\n public readonly payload: StepPayload,\n public readonly isInitial?: boolean,\n ) {}\n}\n\nexport class CreateConnection {\n static readonly type = '[Workflow] Create Connection';\n\n constructor(public readonly payload: ConnectionPayload) {}\n}\n\nexport class UpdateConnection {\n static readonly type = '[Workflow] Update Connection';\n\n constructor(\n public readonly connectionId: string | number,\n public readonly payload: ConnectionPayload,\n ) {}\n}\n\nexport class PublishWorkflow {\n static readonly type = '[Workflow] Publish Workflow';\n\n constructor(public readonly isPublished: boolean) {}\n}\n\nexport class DeleteStep {\n static readonly type = '[Workflow] Delete Step';\n\n constructor(public readonly stepId: string | number) {}\n}\n\nexport class DeleteConnection {\n static readonly type = '[Workflow] 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 WorkflowConnection,\n WorkflowListItem,\n WorkflowLoadingName,\n WorkflowSchema,\n WorkflowStateModel,\n WorkflowStepSchema,\n} from './workflow.model';\nimport {\n CreateConnection,\n CreateStep,\n DeleteConnection,\n DeleteStep,\n GetFormulaProperties,\n GetGroups,\n GetRolesForModule,\n GetStep,\n GetWorkflow,\n GetWorkflows,\n PublishWorkflow,\n SetModuleInfo,\n UpdateConnection,\n UpdateStep,\n ValidateFlow,\n} from './workflow.actions';\nimport { Response } from './api.model';\n\nconst DEFAULT_STATE: WorkflowStateModel = {\n workflowId: null,\n moduleType: null,\n moduleId: null,\n workflows: [],\n workflow: null,\n formulaProperties: [],\n groups: [],\n roles: [],\n selectedStep: null,\n isFlowValid: null,\n loadingActive: [],\n errors: {},\n};\n\n@State<WorkflowStateModel>({\n name: 'workflow',\n defaults: DEFAULT_STATE,\n})\n@Injectable()\nexport class WorkflowState {\n private readonly http = inject(HttpClient);\n private readonly baseUrl = 'ProcessBuilder';\n private readonly groupsUrl = 'identity/Groups';\n private readonly rolesUrl = 'identity/roles/scopes';\n\n @Selector()\n static workflowId(state: WorkflowStateModel): string | number | null {\n return state.workflowId;\n }\n\n @Selector()\n static moduleType(state: WorkflowStateModel): string | null {\n return state.moduleType;\n }\n\n @Selector()\n static moduleId(state: WorkflowStateModel): string | number | null {\n return state.moduleId;\n }\n\n @Selector()\n static workflows(state: WorkflowStateModel) {\n return state.workflows;\n }\n\n @Selector()\n static workflow(state: WorkflowStateModel): WorkflowSchema | null {\n return state.workflow;\n }\n\n @Selector()\n static formulaProperties(state: WorkflowStateModel): FormulaProperty[] {\n return state.formulaProperties;\n }\n\n @Selector()\n static groups(state: WorkflowStateModel): GroupDefinition[] {\n return state.groups;\n }\n\n @Selector()\n static roles(state: WorkflowStateModel): RoleDefinition[] {\n return state.roles;\n }\n\n @Selector()\n static selectedStep(state: WorkflowStateModel): StepSchema | null {\n return state.selectedStep;\n }\n\n @Selector()\n static isFlowValid(state: WorkflowStateModel): boolean | null {\n return state.isFlowValid;\n }\n\n @Selector()\n static stepsSchema(state: WorkflowStateModel): WorkflowStepSchema[] {\n return state.workflow?.stepsSchema ?? [];\n }\n\n @Selector()\n static connections(state: WorkflowStateModel): WorkflowConnection[] {\n return state.workflow?.connections ?? [];\n }\n\n @Selector()\n static isLoadingFactory(state: WorkflowStateModel) {\n return (loadingName: WorkflowLoadingName) =>\n state.loadingActive.includes(loadingName);\n }\n\n @Selector()\n static errorFactory(state: WorkflowStateModel) {\n return (loadingName: WorkflowLoadingName) =>\n state.errors?.[loadingName] ?? null;\n }\n\n @Action(SetModuleInfo)\n setModuleInfo(ctx: StateContext<WorkflowStateModel>, action: SetModuleInfo) {\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\n @Action(GetWorkflows)\n getWorkflows(ctx: StateContext<WorkflowStateModel>, _action: GetWorkflows) {\n startLoading(ctx, 'getWorkflows');\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, 'getWorkflows', message);\n endLoading(ctx, 'getWorkflows');\n return of(null);\n }\n\n return this.http\n .get<\n Response<WorkflowListItem[]>\n >(`${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/requestSchema`)\n .pipe(\n tap((response) => {\n const workflows = response?.data ?? [];\n ctx.patchState({ workflows });\n\n // Auto-select and load first workflow if available\n if (workflows.length > 0) {\n const firstWorkflow = workflows[0];\n ctx.patchState({ workflowId: firstWorkflow.id });\n ctx.dispatch(new GetWorkflow(firstWorkflow.id));\n }\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to load workflows';\n setLoadingError(ctx, 'getWorkflows', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'getWorkflows')),\n );\n }\n\n @Action(GetWorkflow)\n getWorkflow(ctx: StateContext<WorkflowStateModel>, action: GetWorkflow) {\n startLoading(ctx, 'getWorkflow');\n\n const state = ctx.getState();\n const workflowId = action.workflowId;\n const { moduleId, parentPath, moduleType } = state;\n\n if (!workflowId) {\n const message = 'Workflow ID is not set';\n setLoadingError(ctx, 'getWorkflow', message);\n endLoading(ctx, 'getWorkflow');\n return of(null);\n }\n\n // Set the workflowId in state\n ctx.patchState({ workflowId });\n\n return this.http\n .get<Response<WorkflowSchema>>(\n `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}/requestSchema/${workflowId}`,\n {\n params: { Mode: 'edit' },\n },\n )\n .pipe(\n tap((response) => {\n const workflow = response?.data ?? null;\n ctx.patchState({\n workflow,\n isFlowValid: workflow?.isValid ?? null,\n });\n }),\n catchError((error) => {\n const message =\n error?.error?.message ??\n error?.message ??\n 'Failed to load workflow';\n setLoadingError(ctx, 'getWorkflow', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'getWorkflow')),\n );\n }\n\n @Action(GetFormulaProperties)\n getFormulaProperties(\n ctx: StateContext<WorkflowStateModel>,\n _action: GetFormulaProperties,\n ) {\n startLoading(ctx, 'getFormulaProperties');\n\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow 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/${workflowId}`)\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<WorkflowStateModel>, _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<WorkflowStateModel>,\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<WorkflowStateModel>, action: GetStep) {\n startLoading(ctx, 'getStep');\n\n return this.http\n .get<Response<StepSchema>>(\n `${this.baseUrl}/stepSchema/${action.stepId}`,\n {\n params: { Mode: 'edit' },\n },\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<WorkflowStateModel>, _action: ValidateFlow) {\n startLoading(ctx, 'validateFlow');\n\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow 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/${workflowId}/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<WorkflowStateModel>, action: CreateStep) {\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow 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.workflow) {\n ctx.patchState({\n workflow: {\n ...state.workflow,\n stepsSchema: [...state.workflow.stepsSchema, tempStep],\n },\n });\n }\n\n startLoading(ctx, 'createStep');\n\n return this.http\n .post<\n Response<StepResponse>\n >(`${this.baseUrl}/requestSchema/${workflowId}/stepSchema`, action.payload)\n .pipe(\n tap((response) => {\n const createdStep = response?.data;\n const currentState = ctx.getState();\n if (createdStep && currentState.workflow) {\n const updatedSteps = currentState.workflow.stepsSchema.map(\n (step) =>\n step.id === tempId ? { ...createdStep, loading: false } : step,\n );\n\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n stepsSchema: updatedSteps,\n },\n });\n }\n // Validate flow after creating step\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const filteredSteps = currentState.workflow.stepsSchema.filter(\n (step) => step.id !== tempId,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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<WorkflowStateModel>, action: UpdateStep) {\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow ID is not set';\n setLoadingError(ctx, 'updateStep', message);\n return of(null);\n }\n\n if (state.workflow) {\n const updatedSteps = state.workflow.stepsSchema.map((step) =>\n step.id === action.stepId ? { ...step, loading: true } : step,\n );\n ctx.patchState({\n workflow: {\n ...state.workflow,\n stepsSchema: updatedSteps,\n },\n });\n }\n\n startLoading(ctx, 'updateStep');\n\n const endpoint = action.isInitial ? 'initialStepSchema' : 'stepSchema';\n\n return this.http\n .put<\n Response<StepResponse>\n >(`${this.baseUrl}/${endpoint}/${action.stepId}`, action.payload)\n .pipe(\n tap((response) => {\n const updatedStep = response?.data;\n const currentState = ctx.getState();\n if (updatedStep && currentState.workflow) {\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n stepsSchema: currentState.workflow.stepsSchema.map((step) =>\n step.id === updatedStep.id\n ? { ...updatedStep, loading: false }\n : step,\n ),\n },\n });\n }\n // Validate flow after updating step\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const errorSteps = currentState.workflow.stepsSchema.map((step) =>\n step.id === action.stepId ? { ...step, loading: false } : step,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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<WorkflowStateModel>,\n action: CreateConnection,\n ) {\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow 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.workflow) {\n ctx.patchState({\n workflow: {\n ...state.workflow,\n connections: [...state.workflow.connections, tempConnection],\n },\n });\n }\n\n startLoading(ctx, 'createConnection');\n\n return this.http\n .post<\n Response<ConnectionResponse>\n >(`${this.baseUrl}/requestSchema/${workflowId}/connection`, action.payload)\n .pipe(\n tap((response) => {\n const createdConnection = response?.data;\n const currentState = ctx.getState();\n if (createdConnection && currentState.workflow) {\n const updatedConnections = currentState.workflow.connections.map(\n (conn) =>\n conn.id === tempId\n ? { ...createdConnection, loading: false }\n : conn,\n );\n\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n connections: updatedConnections,\n },\n });\n }\n // Validate flow after creating connection\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const filteredConnections =\n currentState.workflow.connections.filter(\n (conn) => conn.id !== tempId,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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<WorkflowStateModel>,\n action: UpdateConnection,\n ) {\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow ID is not set';\n setLoadingError(ctx, 'updateConnection', message);\n return of(null);\n }\n\n if (state.workflow) {\n const updatedConnections = state.workflow.connections.map((conn) =>\n conn.id === action.connectionId ? { ...conn, loading: true } : conn,\n );\n ctx.patchState({\n workflow: {\n ...state.workflow,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'updateConnection');\n\n return this.http\n .put<\n Response<ConnectionResponse>\n >(`${this.baseUrl}/stepSchemaConnection/${action.connectionId}`, action.payload)\n .pipe(\n tap((response) => {\n const updatedConnection = response?.data;\n const currentState = ctx.getState();\n if (updatedConnection && currentState.workflow) {\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n connections: currentState.workflow.connections.map((conn) =>\n conn.id === updatedConnection.id\n ? { ...updatedConnection, loading: false }\n : conn,\n ),\n },\n });\n }\n // Validate flow after updating connection\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const errorConnections = currentState.workflow.connections.map(\n (conn) =>\n conn.id === action.connectionId\n ? { ...conn, loading: false }\n : conn,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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(PublishWorkflow)\n publishWorkflow(\n ctx: StateContext<WorkflowStateModel>,\n action: PublishWorkflow,\n ) {\n startLoading(ctx, 'publishWorkflow');\n\n const state = ctx.getState();\n const workflowId = state.workflowId;\n\n if (!workflowId) {\n const message = 'Workflow ID is not set';\n setLoadingError(ctx, 'publishWorkflow', message);\n endLoading(ctx, 'publishWorkflow');\n return of(null);\n }\n\n return this.http\n .put<\n Response<PublishResponse>\n >(`${this.baseUrl}/requestSchema/${workflowId}/publish`, { IsPublished: action.isPublished })\n .pipe(\n tap((response) => {\n const publishedData = response?.data;\n if (publishedData && state.workflow) {\n ctx.patchState({\n workflow: {\n ...state.workflow,\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 workflow';\n setLoadingError(ctx, 'publishWorkflow', message);\n return of(null);\n }),\n finalize(() => endLoading(ctx, 'publishWorkflow')),\n );\n }\n\n @Action(DeleteStep)\n deleteStep(ctx: StateContext<WorkflowStateModel>, action: DeleteStep) {\n const state = ctx.getState();\n\n if (state.workflow) {\n // Mark step as loading\n const updatedSteps = state.workflow.stepsSchema.map((step) =>\n step.id == action.stepId ? { ...step, loading: true } : step,\n );\n\n // Filter out all connections related to this step\n const updatedConnections = state.workflow.connections.filter(\n (conn) => conn.source != action.stepId && conn.target != action.stepId,\n );\n\n ctx.patchState({\n workflow: {\n ...state.workflow,\n stepsSchema: updatedSteps,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'deleteStep');\n\n return this.http\n .delete<Response<boolean>>(`${this.baseUrl}/stepSchema/${action.stepId}`)\n .pipe(\n tap(() => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n stepsSchema: currentState.workflow.stepsSchema.filter(\n (step) => step.id != action.stepId,\n ),\n },\n });\n }\n // Validate flow after deleting step\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n // Restore step loading state\n const errorSteps = currentState.workflow.stepsSchema.map((step) =>\n step.id == action.stepId ? { ...step, loading: false } : step,\n );\n\n // Restore connections related to this step from original state\n const relatedConnections =\n state.workflow?.connections.filter(\n (conn) =>\n conn.source == action.stepId || conn.target == action.stepId,\n ) || [];\n\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n stepsSchema: errorSteps,\n connections: [\n ...currentState.workflow.connections,\n ...relatedConnections,\n ],\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<WorkflowStateModel>,\n action: DeleteConnection,\n ) {\n const state = ctx.getState();\n\n if (state.workflow) {\n const updatedConnections = state.workflow.connections.map((conn) =>\n conn.id == action.connectionId ? { ...conn, loading: true } : conn,\n );\n ctx.patchState({\n workflow: {\n ...state.workflow,\n connections: updatedConnections,\n },\n });\n }\n\n startLoading(ctx, 'deleteConnection');\n\n return this.http\n .delete<\n Response<boolean>\n >(`${this.baseUrl}/stepSchemaConnection/${action.connectionId}`)\n .pipe(\n tap(() => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\n connections: currentState.workflow.connections.filter(\n (conn) => conn.id != action.connectionId,\n ),\n },\n });\n }\n // Validate flow after deleting connection\n ctx.dispatch(new ValidateFlow());\n }),\n catchError((error) => {\n const currentState = ctx.getState();\n if (currentState.workflow) {\n const errorConnections = currentState.workflow.connections.map(\n (conn) =>\n conn.id == action.connectionId\n ? { ...conn, loading: false }\n : conn,\n );\n ctx.patchState({\n workflow: {\n ...currentState.workflow,\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 WorkflowConnection,\n WorkflowListItem,\n WorkflowLoadingName,\n WorkflowSchema,\n WorkflowStepSchema,\n} from './workflow.model';\nimport {\n CreateConnection,\n CreateStep,\n DeleteConnection,\n DeleteStep,\n GetFormulaProperties,\n GetGroups,\n GetRolesForModule,\n GetStep,\n GetWorkflow,\n GetWorkflows,\n PublishWorkflow,\n SetModuleInfo,\n UpdateConnection,\n UpdateStep,\n ValidateFlow,\n} from './workflow.actions';\nimport { WorkflowState } from './workflow.state';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WorkflowFacade {\n private readonly store = inject(Store);\n\n readonly workflowId = select<string | number | null>(\n WorkflowState.workflowId,\n );\n readonly moduleType = select<string | null>(WorkflowState.moduleType);\n readonly moduleId = select<string | number | null>(WorkflowState.moduleId);\n readonly workflows = select<WorkflowListItem[]>(WorkflowState.workflows);\n readonly workflow = select<WorkflowSchema | null>(WorkflowState.workflow);\n readonly formulaProperties = select<FormulaProperty[]>(\n WorkflowState.formulaProperties,\n );\n readonly groups = select<GroupDefinition[]>(WorkflowState.groups);\n readonly roles = select<RoleDefinition[]>(WorkflowState.roles);\n readonly selectedStep = select<StepSchema | null>(WorkflowState.selectedStep);\n readonly isFlowValid = select<boolean | null>(WorkflowState.isFlowValid);\n readonly steps = select<WorkflowStepSchema[]>(WorkflowState.stepsSchema);\n readonly connections = select<WorkflowConnection[]>(\n WorkflowState.connections,\n );\n\n isLoading(loadingName: WorkflowLoadingName) {\n const loadingFactory = select<(name: WorkflowLoadingName) => boolean>(\n WorkflowState.isLoadingFactory,\n );\n return computed(() => loadingFactory()(loadingName));\n }\n\n error(loadingName: WorkflowLoadingName) {\n const errorFactory = select<(name: WorkflowLoadingName) => string | null>(\n WorkflowState.errorFactory,\n );\n return computed(() => errorFactory()(loadingName));\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 loadWorkflows(): Observable<unknown> {\n return this.store.dispatch(new GetWorkflows());\n }\n\n selectWorkflow(workflowId: string | number): Observable<unknown> {\n return this.store.dispatch(new GetWorkflow(workflowId));\n }\n\n loadWorkflow(): Observable<unknown> {\n return this.loadWorkflows();\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 isInitial?: boolean,\n ): Observable<unknown> {\n return this.store.dispatch(new UpdateStep(stepId, payload, isInitial));\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 publishWorkflow(isPublished: boolean): Observable<unknown> {\n return this.store.dispatch(new PublishWorkflow(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 { WorkflowFacade, WorkflowStepSchema } from '../../store/workflow';\nimport { Tabs } from '@masterteam/components/tabs';\nimport { FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\nimport { Table } from '@masterteam/components/table';\nimport { ColumnDef } from '@masterteam/components/table';\nimport { Skeleton } from 'primeng/skeleton';\nimport { ToggleField } from '@masterteam/components/toggle-field';\nimport { Button } from '@masterteam/components/button';\nimport { SelectField } from '@masterteam/components/select-field';\n\n@Component({\n selector: 'mt-workflow-builder',\n imports: [\n StructureBuilder,\n Card,\n Tabs,\n ReactiveFormsModule,\n FormsModule,\n DynamicForm,\n Table,\n Skeleton,\n ToggleField,\n Button,\n SelectField,\n ],\n templateUrl: './workflow-builder.html',\n styles: [],\n host: {},\n})\nexport class workflowBuilder {\n private workflowFacade = inject(WorkflowFacade);\n groups = this.workflowFacade.groups;\n roles = this.workflowFacade.roles;\n workflows = this.workflowFacade.workflows;\n workflow = this.workflowFacade.workflow;\n loading = this.workflowFacade.isLoading('getWorkflow');\n loadingStep = this.workflowFacade.isLoading('getStep');\n isFlowValid = this.workflowFacade.isFlowValid;\n\n selectedStep = this.workflowFacade.selectedStep;\n selectedWorkflowId = computed(() => this.workflow()?.id);\n\n selectedTab = signal<any>('tab1');\n nodeFields = signal<any>({\n name: 'title',\n });\n nodeFormControl = new FormControl();\n isPublished = signal<boolean>(false);\n isPublishDisabled = computed(() => !this.isFlowValid());\n\n private isEditingInitialNode = signal<boolean>(false);\n\n // Properties table data - writable signal that can be updated when loading step details\n private _propertiesTableData = signal<any[]>([]);\n\n // Computed that initializes from workflow properties\n propertiesTableData = computed(() => {\n const currentData = this._propertiesTableData();\n if (currentData.length > 0) {\n return currentData;\n }\n\n const properties = this.workflow()?.properties || [];\n return properties.map((prop) => ({\n id: prop.id,\n name: prop.property.title,\n isVisible: false,\n isEditable: false,\n _original: prop, // Keep original for reference\n }));\n });\n\n // Table columns configuration\n propertiesColumns = signal<ColumnDef[]>([\n {\n key: 'name',\n label: 'Name',\n type: 'text',\n },\n {\n key: 'isVisible',\n label: 'Visible',\n type: 'boolean',\n },\n {\n key: 'isEditable',\n label: 'Editable',\n type: 'boolean',\n },\n ]);\n\n tabsList = [\n { label: 'Settings', value: 'tab1' },\n { label: 'Permissions', value: 'tab2' },\n ];\n availableNodes = [\n {\n id: 'FormStep',\n label: 'Form Step',\n name: {\n en: 'Form 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: 'title.en',\n label: 'Name (English)',\n placeholder: 'Enter name in English',\n cssClass: 'w-full',\n required: true,\n },\n {\n key: 'title.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: 'label',\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 computed signal\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 // Computed signal for form state info - useful for debugging or UI indicators\n formStateInfo = computed(() => ({\n isInitialNode: this.isEditingInitialNode(),\n sectionsCount: this.nodeForm().sections.length,\n hasApproverSection: !this.isEditingInitialNode(),\n hasSlaSection: !this.isEditingInitialNode(),\n formMode: this.isEditingInitialNode() ? 'initial-node' : 'standard-node',\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 (with positions) - linked to store via selectors\n steps = computed(() => {\n return this.workflowFacade.steps().map((step) => ({\n ...step,\n color: '#000000',\n }));\n });\n\n // Connections between nodes (matching your design) - linked to store via selectors\n connections = computed(() => {\n return this.workflowFacade.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 condition: (node: WorkflowStepSchema) => !node.isInitial,\n },\n ]);\n\n constructor() {\n // Effect to initialize isPublished from workflow.isPublished\n effect(() => {\n const workflow = this.workflow();\n if (workflow && workflow.isPublished !== undefined) {\n this.isPublished.set(workflow.isPublished);\n }\n });\n\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 including targetType and targetValue\n this.nodeFormControl.patchValue({\n title: step.title,\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 // Update properties table with step's property permissions\n const properties = this.workflow()?.properties || [];\n const updatedTableData = properties.map((prop) => {\n const stepProperty = step.properties?.find(\n (p) => p.propertyId === prop.id,\n );\n\n return {\n id: prop.id,\n name: prop?.property?.title,\n isVisible: stepProperty?.isRead || false,\n isEditable: stepProperty?.isWrite || false,\n _original: prop,\n };\n });\n\n this._propertiesTableData.set(updatedTableData);\n }\n });\n }\n\n onNodeActionsEvent(event: NodeActionEvent) {\n console.log('Node action event:', event);\n }\n\n onPublishToggle(isPublished: boolean): void {\n // Prevent publishing if workflow is not valid\n if (isPublished && !this.isFlowValid()) {\n console.warn('Cannot publish: Workflow is not valid');\n this.isPublished.set(false);\n return;\n }\n\n this.workflowFacade.publishWorkflow(isPublished).subscribe({\n error: (error) => {\n console.error('Failed to update workflow publish status:', error);\n // Revert the toggle on error\n this.isPublished.set(!isPublished);\n },\n });\n }\n\n onWorkflowChange(workflowId: number): void {\n console.log('Workflow changed to:', workflowId);\n this.workflowFacade.selectWorkflow(workflowId);\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 // Reset properties table to default state (all unchecked)\n const properties = this.workflow()?.properties || [];\n const resetTableData = properties.map((prop) => ({\n id: prop.id,\n name: prop?.property?.title,\n isVisible: false,\n isEditable: false,\n _original: prop,\n }));\n\n this._propertiesTableData.set(resetTableData);\n\n // Reset to first tab\n this.selectedTab.set('tab1');\n\n console.log('Form and properties 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 // Get selected properties with isVisible and isEditable flags\n const propertiesPayload = this.propertiesTableData()\n .filter((prop) => prop.isVisible || prop.isEditable)\n .map((prop) => ({\n PropertyId: prop.id,\n isRead: prop.isVisible,\n isWrite: prop.isEditable,\n }));\n\n // Prepare step payload\n const stepPayload = {\n title: formValue.title,\n targetType: formValue.targetType,\n targetValue:\n formValue.targetType === '1' ? formValue.group : formValue.role,\n sla: formValue.sla || 0,\n properties: propertiesPayload,\n };\n\n // Create step via facade\n this.workflowFacade.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 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.workflowFacade.loadStep(stepId);\n }\n break;\n case 'startCreating':\n // Reset form and properties for new step\n this.clearForm();\n break;\n case 'updateNode':\n if (event.data) {\n // Get form values\n const formValue = this.nodeFormControl.value;\n const stepId = event.data.id;\n const isInitial = !!event.data.isInitial;\n\n // Get selected properties with isVisible and isEditable flags\n const propertiesPayload = this.propertiesTableData()\n .filter((prop) => prop.isVisible || prop.isEditable)\n .map((prop) => ({\n PropertyId: prop.id,\n isRead: prop.isVisible,\n isWrite: prop.isEditable,\n }));\n\n // Prepare step payload\n const stepPayload = {\n title: formValue.title,\n targetType: formValue.targetType,\n targetValue:\n formValue.targetType === '1' ? formValue.group : formValue.role,\n sla: formValue.sla || event.data.sla,\n properties: propertiesPayload,\n };\n\n // Update step via facade, passing isInitial flag\n this.workflowFacade\n .updateStep(stepId, stepPayload, isInitial)\n .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.workflowFacade.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.workflowFacade.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.workflowFacade\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.workflowFacade.deleteConnection(connectionIdToDelete).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-full relative\" id=\"workflow-builder-card\">\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 Properties'\"\n [appendTo]=\"'workflow-builder-card'\"\n [nodeFields]=\"nodeFields()\"\n >\n <div flowContent>\n <!-- <div class=\"absolute top-4 left-4 z-10\">\n @if (workflows().length > 1) {\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <mt-select-field\n [options]=\"workflows()\"\n [ngModel]=\"selectedWorkflowId()\"\n (ngModelChange)=\"onWorkflowChange($event)\"\n optionLabel=\"displayName\"\n optionValue=\"id\"\n placeholder=\"Select Workflow\"\n />\n </mt-card>\n </div>\n }\n </div> -->\n <div class=\"absolute top-4 right-4 z-10\">\n <div class=\"flex flex-col gap-2 w-80\">\n <mt-card>\n <div class=\"flex items-center gap-10\">\n <div class=\"flex items-center gap-2\">\n <mt-button [severity]=\"'secondary'\" icon=\"dev.dataflow-01\" />\n <label>Enable Workflow</label>\n </div>\n\n <mt-toggle-field\n [ngModel]=\"isPublished()\"\n (ngModelChange)=\"onPublishToggle($event)\"\n [disabled]=\"isPublishDisabled()\"\n ></mt-toggle-field>\n </div>\n </mt-card>\n </div>\n </div>\n </div>\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 <!-- Tabs skeleton -->\n <div class=\"flex gap-2 mb-4\">\n <p-skeleton\n width=\"6rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n <p-skeleton\n width=\"8rem\"\n height=\"2.5rem\"\n borderRadius=\"0.5rem\"\n ></p-skeleton>\n </div>\n\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 -->\n <mt-tabs\n [(active)]=\"selectedTab\"\n [options]=\"tabsList\"\n fluid\n size=\"large\"\n ></mt-tabs>\n @switch (selectedTab()) {\n @case (\"tab1\") {\n <div class=\"mt-4\">\n <mt-dynamic-form\n [formConfig]=\"nodeForm()\"\n [formControl]=\"nodeFormControl\"\n ></mt-dynamic-form>\n </div>\n }\n @case (\"tab2\") {\n <div class=\"mt-4\">\n <mt-table\n [data]=\"propertiesTableData()\"\n [columns]=\"propertiesColumns()\"\n [selectableRows]=\"false\"\n [showGridlines]=\"true\"\n [stripedRows]=\"true\"\n ></mt-table>\n </div>\n }\n }\n }\n </div>\n </ng-template>\n </mt-structure-builder>\n }\n</mt-card>\n","// store/app.state.ts\n\nimport { HttpContextToken } from '@angular/common/http';\n\nexport const REQUEST_CONTEXT = new HttpContextToken<{ useBaseUrl: boolean }>(\n () => ({\n useBaseUrl: false,\n }),\n);\n","// Re-export app state\nexport * from './app.state';\n\n// Re-export workflow state\nexport * from './workflow';\n","/*\n * Public API Surface of structure-builder\n */\n\nexport * from './lib/workflow-builder/workflow-builder';\n\nexport * from './store';\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,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,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,OAAA,EAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAOG,eAAe,EAAA,UAAA,EAAA,CAAA;kBAnB3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EAAA,OAAA,EACtB;wBACP,gBAAgB;wBAChB,IAAI;wBACJ,IAAI;wBACJ,mBAAmB;wBACnB,WAAW;wBACX,WAAW;wBACX,KAAK;wBACL,QAAQ;wBACR,WAAW;wBACX,MAAM;wBACN,WAAW;AACZ,qBAAA,EAAA,IAAA,EAGK,EAAE,EAAA,QAAA,EAAA,iiMAAA,EAAA;;;AE3CV;AAIO,MAAM,eAAe,GAAG,IAAI,gBAAgB,CACjD,OAAO;AACL,IAAA,UAAU,EAAE,KAAK;AAClB,CAAA,CAAC;;ACPJ;;ACAA;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -16,7 +16,7 @@ interface LoadingStateShape<L extends string = string> {
16
16
 
17
17
  interface WorkflowStepSchema {
18
18
  id: number;
19
- name: string | Record<string, string>;
19
+ title: string | Record<string, string>;
20
20
  sla: number;
21
21
  isInitial: boolean;
22
22
  targetType?: string;
@@ -33,7 +33,7 @@ interface WorkflowConnection {
33
33
  }
34
34
  interface WorkflowPropertyConfig {
35
35
  id: number;
36
- name: string;
36
+ title: string;
37
37
  key: string;
38
38
  normalizedKey: string;
39
39
  configuration?: any;
@@ -64,7 +64,7 @@ interface WorkflowProperty {
64
64
  }
65
65
  interface WorkflowSchema {
66
66
  id: number;
67
- displayName: Record<string, string> | string;
67
+ title: Record<string, string> | string;
68
68
  moduleId: number;
69
69
  moduleType: string;
70
70
  isValid: boolean;
@@ -75,7 +75,7 @@ interface WorkflowSchema {
75
75
  }
76
76
  interface WorkflowListItem {
77
77
  id: number;
78
- displayName: string;
78
+ title: string;
79
79
  moduleId: number;
80
80
  moduleType: string;
81
81
  isValid: boolean;
@@ -83,16 +83,16 @@ interface WorkflowListItem {
83
83
  }
84
84
  interface FormulaProperty {
85
85
  key: string;
86
- name: string;
86
+ title: string;
87
87
  }
88
88
  interface GroupDefinition {
89
89
  id: number;
90
- name: string;
90
+ title: string;
91
91
  [key: string]: unknown;
92
92
  }
93
93
  interface RoleDefinition {
94
94
  id: number;
95
- name: string;
95
+ title: string;
96
96
  [key: string]: unknown;
97
97
  }
98
98
  interface StepPropertyItem {
@@ -106,7 +106,7 @@ interface StepPropertyItem {
106
106
  }
107
107
  interface StepSchema {
108
108
  id: number;
109
- name: Record<string, string>;
109
+ title: Record<string, string>;
110
110
  sla: number;
111
111
  isInitial: boolean;
112
112
  targetType?: string;
@@ -119,7 +119,7 @@ interface StepPropertyPayload {
119
119
  isWrite?: boolean;
120
120
  }
121
121
  interface StepPayload {
122
- name: Record<string, string>;
122
+ title: Record<string, string>;
123
123
  targetType?: string;
124
124
  targetValue?: number | string;
125
125
  sla: string | number;
@@ -127,7 +127,7 @@ interface StepPayload {
127
127
  }
128
128
  interface StepResponse {
129
129
  id: number;
130
- name: string;
130
+ title: string;
131
131
  sla: number;
132
132
  isInitial: boolean;
133
133
  targetType?: string;
@@ -152,7 +152,7 @@ interface PublishPayload {
152
152
  }
153
153
  interface PublishResponse {
154
154
  id: number;
155
- displayName: string;
155
+ title: string;
156
156
  moduleId: number;
157
157
  moduleType: string;
158
158
  isValid: boolean;
@@ -161,8 +161,11 @@ interface PublishResponse {
161
161
  type WorkflowLoadingName = 'getWorkflows' | 'getWorkflow' | 'getFormulaProperties' | 'getGroups' | 'getRolesForModule' | 'getStep' | 'validateFlow' | 'createStep' | 'updateStep' | 'createConnection' | 'updateConnection' | 'publishWorkflow' | 'deleteStep' | 'deleteConnection';
162
162
  interface WorkflowStateModel extends LoadingStateShape<WorkflowLoadingName> {
163
163
  workflowId: string | number | null;
164
+ parentModuleType?: string | null;
165
+ parentModuleId?: string | number | null;
164
166
  moduleType: string | null;
165
167
  moduleId: string | number | null;
168
+ parentPath?: string;
166
169
  workflows: WorkflowListItem[];
167
170
  workflow: WorkflowSchema | null;
168
171
  formulaProperties: FormulaProperty[];
@@ -172,11 +175,14 @@ interface WorkflowStateModel extends LoadingStateShape<WorkflowLoadingName> {
172
175
  isFlowValid: boolean | null;
173
176
  }
174
177
 
175
- declare class SetWorkflowInfo {
178
+ declare class SetModuleInfo {
176
179
  readonly moduleType: string;
177
180
  readonly moduleId: string | number;
178
- static readonly type = "[Workflow] Set Workflow Info";
179
- constructor(moduleType: string, moduleId: string | number);
181
+ readonly parentModuleType?: string | undefined;
182
+ readonly parentModuleId?: string | number | undefined;
183
+ readonly parentPath?: string | undefined;
184
+ static readonly type = "[Workflow] Set Module Info";
185
+ constructor(moduleType: string, moduleId: string | number, parentModuleType?: string | undefined, parentModuleId?: string | number | undefined, parentPath?: string | undefined);
180
186
  }
181
187
  declare class GetWorkflows {
182
188
  static readonly type = "[Workflow] Get Workflows";
@@ -258,7 +264,7 @@ declare class WorkflowFacade {
258
264
  readonly connections: _angular_core.Signal<WorkflowConnection[]>;
259
265
  isLoading(loadingName: WorkflowLoadingName): _angular_core.Signal<boolean>;
260
266
  error(loadingName: WorkflowLoadingName): _angular_core.Signal<string | null>;
261
- setWorkflowInfo(moduleType: string, moduleId: string | number): Observable<unknown>;
267
+ setModuleInfo(moduleType: string, moduleId: string | number, parentModuleType?: string, parentModuleId?: string | number, parentPath?: string): Observable<unknown>;
262
268
  loadWorkflows(): Observable<unknown>;
263
269
  selectWorkflow(workflowId: string | number): Observable<unknown>;
264
270
  loadWorkflow(): Observable<unknown>;
@@ -308,10 +314,10 @@ declare class WorkflowState {
308
314
  static connections(state: WorkflowStateModel): WorkflowConnection[];
309
315
  static isLoadingFactory(state: WorkflowStateModel): (loadingName: WorkflowLoadingName) => boolean;
310
316
  static errorFactory(state: WorkflowStateModel): (loadingName: WorkflowLoadingName) => string | null;
311
- setWorkflowInfo(ctx: StateContext<WorkflowStateModel>, action: SetWorkflowInfo): void;
317
+ setModuleInfo(ctx: StateContext<WorkflowStateModel>, action: SetModuleInfo): void;
312
318
  getWorkflows(ctx: StateContext<WorkflowStateModel>, _action: GetWorkflows): rxjs.Observable<Response<WorkflowListItem[]> | null>;
313
319
  getWorkflow(ctx: StateContext<WorkflowStateModel>, action: GetWorkflow): rxjs.Observable<Response<WorkflowSchema> | null>;
314
- getFormulaProperties(ctx: StateContext<WorkflowStateModel>, _action: GetFormulaProperties): rxjs.Observable<null> | rxjs.Observable<never[] | Response<FormulaProperty[]>>;
320
+ getFormulaProperties(ctx: StateContext<WorkflowStateModel>, _action: GetFormulaProperties): rxjs.Observable<null> | rxjs.Observable<Response<FormulaProperty[]> | never[]>;
315
321
  getGroups(ctx: StateContext<WorkflowStateModel>, _action: GetGroups): rxjs.Observable<GroupDefinition[]> | rxjs.Observable<never[] | Response<GroupDefinition[]>>;
316
322
  getRolesForModule(ctx: StateContext<WorkflowStateModel>, _action: GetRolesForModule): rxjs.Observable<never[] | Response<RoleDefinition[]>>;
317
323
  getStep(ctx: StateContext<WorkflowStateModel>, action: GetStep): rxjs.Observable<Response<StepSchema> | null>;
@@ -339,6 +345,7 @@ declare class workflowBuilder {
339
345
  selectedStep: _angular_core.Signal<_masterteam_workflow.StepSchema | null>;
340
346
  selectedWorkflowId: _angular_core.Signal<number | undefined>;
341
347
  selectedTab: _angular_core.WritableSignal<any>;
348
+ nodeFields: _angular_core.WritableSignal<any>;
342
349
  nodeFormControl: FormControl<any>;
343
350
  isPublished: _angular_core.WritableSignal<boolean>;
344
351
  isPublishDisabled: _angular_core.Signal<boolean>;
@@ -376,7 +383,7 @@ declare class workflowBuilder {
376
383
  steps: _angular_core.Signal<{
377
384
  color: string;
378
385
  id: number;
379
- name: string | Record<string, string>;
386
+ title: string | Record<string, string>;
380
387
  sla: number;
381
388
  isInitial: boolean;
382
389
  targetType?: string;
@@ -424,5 +431,5 @@ declare const REQUEST_CONTEXT: HttpContextToken<{
424
431
  useBaseUrl: boolean;
425
432
  }>;
426
433
 
427
- export { CreateConnection, CreateStep, DeleteConnection, DeleteStep, GetFormulaProperties, GetGroups, GetRolesForModule, GetStep, GetWorkflow, GetWorkflows, PublishWorkflow, REQUEST_CONTEXT, SetWorkflowInfo, UpdateConnection, UpdateStep, ValidateFlow, WorkflowFacade, WorkflowState, workflowBuilder };
434
+ export { CreateConnection, CreateStep, DeleteConnection, DeleteStep, GetFormulaProperties, GetGroups, GetRolesForModule, GetStep, GetWorkflow, GetWorkflows, PublishWorkflow, REQUEST_CONTEXT, SetModuleInfo, UpdateConnection, UpdateStep, ValidateFlow, WorkflowFacade, WorkflowState, workflowBuilder };
428
435
  export type { ConnectionPayload, ConnectionResponse, FormulaProperty, GroupDefinition, PublishPayload, PublishResponse, Response, RoleDefinition, StepPayload, StepPropertyItem, StepPropertyPayload, StepResponse, StepSchema, WorkflowConnection, WorkflowListItem, WorkflowLoadingName, WorkflowProperty, WorkflowPropertyConfig, WorkflowSchema, WorkflowStateModel, WorkflowStepSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/workflow",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "publishConfig": {
5
5
  "directory": ".",
6
6
  "linkDirectory": false,