@masterteam/governance 0.0.11 → 0.0.13

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.
@@ -403,8 +403,8 @@ let GovernanceState = class GovernanceState extends CrudStateBase {
403
403
  clearProperties(ctx) {
404
404
  ctx.patchState({ properties: [] });
405
405
  }
406
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceState, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
407
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceState });
406
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceState, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
407
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceState });
408
408
  };
409
409
  __decorate([
410
410
  Action(SetLevelId)
@@ -484,7 +484,7 @@ GovernanceState = __decorate([
484
484
  defaults: DEFAULTS,
485
485
  })
486
486
  ], GovernanceState);
487
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceState, decorators: [{
487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceState, decorators: [{
488
488
  type: Injectable
489
489
  }], propDecorators: { setLevelId: [], resetState: [], getRules: [], getRule: [], getRuleTypes: [], addRule: [], updateRule: [], deleteRule: [], toggleRuleActive: [], getModules: [], clearSelectedRule: [], getRequestSchemas: [], getProperties: [], clearRequestSchemas: [], clearProperties: [] } });
490
490
 
@@ -508,34 +508,34 @@ class GovernanceFacade {
508
508
  // ============================================================================
509
509
  // Loading Signals - Computed from slice (minimal reactivity)
510
510
  // ============================================================================
511
- isLoadingRules = computed(() => this.loadingActive().includes(GovernanceActionKey.GetRules), ...(ngDevMode ? [{ debugName: "isLoadingRules" }] : []));
512
- isLoadingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.GetRule), ...(ngDevMode ? [{ debugName: "isLoadingRule" }] : []));
513
- isLoadingRuleTypes = computed(() => this.loadingActive().includes(GovernanceActionKey.GetRuleTypes), ...(ngDevMode ? [{ debugName: "isLoadingRuleTypes" }] : []));
514
- isAddingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.AddRule), ...(ngDevMode ? [{ debugName: "isAddingRule" }] : []));
515
- isUpdatingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.UpdateRule), ...(ngDevMode ? [{ debugName: "isUpdatingRule" }] : []));
516
- isDeletingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.DeleteRule), ...(ngDevMode ? [{ debugName: "isDeletingRule" }] : []));
517
- isTogglingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.ToggleRuleActive), ...(ngDevMode ? [{ debugName: "isTogglingRule" }] : []));
518
- isLoadingModules = computed(() => this.loadingActive().includes(GovernanceActionKey.GetModules), ...(ngDevMode ? [{ debugName: "isLoadingModules" }] : []));
519
- isLoadingRequestSchemas = computed(() => this.loadingActive().includes(GovernanceActionKey.GetRequestSchemas), ...(ngDevMode ? [{ debugName: "isLoadingRequestSchemas" }] : []));
520
- isLoadingProperties = computed(() => this.loadingActive().includes(GovernanceActionKey.GetProperties), ...(ngDevMode ? [{ debugName: "isLoadingProperties" }] : []));
511
+ isLoadingRules = computed(() => this.loadingActive().includes(GovernanceActionKey.GetRules), ...(ngDevMode ? [{ debugName: "isLoadingRules" }] : /* istanbul ignore next */ []));
512
+ isLoadingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.GetRule), ...(ngDevMode ? [{ debugName: "isLoadingRule" }] : /* istanbul ignore next */ []));
513
+ isLoadingRuleTypes = computed(() => this.loadingActive().includes(GovernanceActionKey.GetRuleTypes), ...(ngDevMode ? [{ debugName: "isLoadingRuleTypes" }] : /* istanbul ignore next */ []));
514
+ isAddingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.AddRule), ...(ngDevMode ? [{ debugName: "isAddingRule" }] : /* istanbul ignore next */ []));
515
+ isUpdatingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.UpdateRule), ...(ngDevMode ? [{ debugName: "isUpdatingRule" }] : /* istanbul ignore next */ []));
516
+ isDeletingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.DeleteRule), ...(ngDevMode ? [{ debugName: "isDeletingRule" }] : /* istanbul ignore next */ []));
517
+ isTogglingRule = computed(() => this.loadingActive().includes(GovernanceActionKey.ToggleRuleActive), ...(ngDevMode ? [{ debugName: "isTogglingRule" }] : /* istanbul ignore next */ []));
518
+ isLoadingModules = computed(() => this.loadingActive().includes(GovernanceActionKey.GetModules), ...(ngDevMode ? [{ debugName: "isLoadingModules" }] : /* istanbul ignore next */ []));
519
+ isLoadingRequestSchemas = computed(() => this.loadingActive().includes(GovernanceActionKey.GetRequestSchemas), ...(ngDevMode ? [{ debugName: "isLoadingRequestSchemas" }] : /* istanbul ignore next */ []));
520
+ isLoadingProperties = computed(() => this.loadingActive().includes(GovernanceActionKey.GetProperties), ...(ngDevMode ? [{ debugName: "isLoadingProperties" }] : /* istanbul ignore next */ []));
521
521
  // ============================================================================
522
522
  // Error Signals - Computed from slice (minimal reactivity)
523
523
  // ============================================================================
524
- rulesError = computed(() => this.errors()[GovernanceActionKey.GetRules] ?? null, ...(ngDevMode ? [{ debugName: "rulesError" }] : []));
525
- ruleError = computed(() => this.errors()[GovernanceActionKey.GetRule] ?? null, ...(ngDevMode ? [{ debugName: "ruleError" }] : []));
526
- ruleTypesError = computed(() => this.errors()[GovernanceActionKey.GetRuleTypes] ?? null, ...(ngDevMode ? [{ debugName: "ruleTypesError" }] : []));
527
- addRuleError = computed(() => this.errors()[GovernanceActionKey.AddRule] ?? null, ...(ngDevMode ? [{ debugName: "addRuleError" }] : []));
528
- updateRuleError = computed(() => this.errors()[GovernanceActionKey.UpdateRule] ?? null, ...(ngDevMode ? [{ debugName: "updateRuleError" }] : []));
529
- deleteRuleError = computed(() => this.errors()[GovernanceActionKey.DeleteRule] ?? null, ...(ngDevMode ? [{ debugName: "deleteRuleError" }] : []));
530
- modulesError = computed(() => this.errors()[GovernanceActionKey.GetModules] ?? null, ...(ngDevMode ? [{ debugName: "modulesError" }] : []));
531
- requestSchemasError = computed(() => this.errors()[GovernanceActionKey.GetRequestSchemas] ?? null, ...(ngDevMode ? [{ debugName: "requestSchemasError" }] : []));
532
- propertiesError = computed(() => this.errors()[GovernanceActionKey.GetProperties] ?? null, ...(ngDevMode ? [{ debugName: "propertiesError" }] : []));
524
+ rulesError = computed(() => this.errors()[GovernanceActionKey.GetRules] ?? null, ...(ngDevMode ? [{ debugName: "rulesError" }] : /* istanbul ignore next */ []));
525
+ ruleError = computed(() => this.errors()[GovernanceActionKey.GetRule] ?? null, ...(ngDevMode ? [{ debugName: "ruleError" }] : /* istanbul ignore next */ []));
526
+ ruleTypesError = computed(() => this.errors()[GovernanceActionKey.GetRuleTypes] ?? null, ...(ngDevMode ? [{ debugName: "ruleTypesError" }] : /* istanbul ignore next */ []));
527
+ addRuleError = computed(() => this.errors()[GovernanceActionKey.AddRule] ?? null, ...(ngDevMode ? [{ debugName: "addRuleError" }] : /* istanbul ignore next */ []));
528
+ updateRuleError = computed(() => this.errors()[GovernanceActionKey.UpdateRule] ?? null, ...(ngDevMode ? [{ debugName: "updateRuleError" }] : /* istanbul ignore next */ []));
529
+ deleteRuleError = computed(() => this.errors()[GovernanceActionKey.DeleteRule] ?? null, ...(ngDevMode ? [{ debugName: "deleteRuleError" }] : /* istanbul ignore next */ []));
530
+ modulesError = computed(() => this.errors()[GovernanceActionKey.GetModules] ?? null, ...(ngDevMode ? [{ debugName: "modulesError" }] : /* istanbul ignore next */ []));
531
+ requestSchemasError = computed(() => this.errors()[GovernanceActionKey.GetRequestSchemas] ?? null, ...(ngDevMode ? [{ debugName: "requestSchemasError" }] : /* istanbul ignore next */ []));
532
+ propertiesError = computed(() => this.errors()[GovernanceActionKey.GetProperties] ?? null, ...(ngDevMode ? [{ debugName: "propertiesError" }] : /* istanbul ignore next */ []));
533
533
  // ============================================================================
534
534
  // Derived Data - Computed from data selectors
535
535
  // ============================================================================
536
- activeRules = computed(() => this.rules().filter((r) => r.isActive === true), ...(ngDevMode ? [{ debugName: "activeRules" }] : []));
537
- inactiveRules = computed(() => this.rules().filter((r) => r.isActive === false), ...(ngDevMode ? [{ debugName: "inactiveRules" }] : []));
538
- rulesCount = computed(() => this.rules().length, ...(ngDevMode ? [{ debugName: "rulesCount" }] : []));
536
+ activeRules = computed(() => this.rules().filter((r) => r.isActive === true), ...(ngDevMode ? [{ debugName: "activeRules" }] : /* istanbul ignore next */ []));
537
+ inactiveRules = computed(() => this.rules().filter((r) => r.isActive === false), ...(ngDevMode ? [{ debugName: "inactiveRules" }] : /* istanbul ignore next */ []));
538
+ rulesCount = computed(() => this.rules().length, ...(ngDevMode ? [{ debugName: "rulesCount" }] : /* istanbul ignore next */ []));
539
539
  // ============================================================================
540
540
  // Action Dispatchers
541
541
  // ============================================================================
@@ -587,10 +587,10 @@ class GovernanceFacade {
587
587
  clearProperties() {
588
588
  return this.store.dispatch(new ClearProperties());
589
589
  }
590
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
591
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceFacade, providedIn: 'root' });
590
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
591
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceFacade, providedIn: 'root' });
592
592
  }
593
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceFacade, decorators: [{
593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceFacade, decorators: [{
594
594
  type: Injectable,
595
595
  args: [{ providedIn: 'root' }]
596
596
  }] });
@@ -636,6 +636,16 @@ const GOVERNANCE_RULE_RECIPE_DEFINITIONS = [
636
636
  ruleTypeKeys: ['PropertyValueEquals', 'FieldValue'],
637
637
  labelKey: 'wizard.recipes.property-value.label',
638
638
  },
639
+ {
640
+ key: 'property-has-value',
641
+ ruleTypeKeys: ['PropertyHasValue'],
642
+ labelKey: 'wizard.recipes.property-has-value.label',
643
+ },
644
+ {
645
+ key: 'mandatory-gate-items-completed',
646
+ ruleTypeKeys: ['PhaseGateMandatoryItemsCompleted'],
647
+ labelKey: 'wizard.recipes.mandatory-gate-items-completed.label',
648
+ },
639
649
  ];
640
650
  const GOVERNANCE_APPLIES_TO_OPTIONS = [
641
651
  {
@@ -668,6 +678,14 @@ const GOVERNANCE_ACTION_OPTIONS = [
668
678
  value: 'delete',
669
679
  labelKey: 'wizard.actions.delete',
670
680
  },
681
+ {
682
+ value: 'manage-phase-gate',
683
+ labelKey: 'wizard.actions.manage-phase-gate',
684
+ },
685
+ {
686
+ value: 'move-phase-gate',
687
+ labelKey: 'wizard.actions.move-phase-gate',
688
+ },
671
689
  ];
672
690
  const GOVERNANCE_OPERATOR_OPTIONS = [
673
691
  {
@@ -761,7 +779,6 @@ function mapAppliesToToTargetScope(appliesTo) {
761
779
  case 'level':
762
780
  return 'Level';
763
781
  case 'phase-gate':
764
- return 'PhaseGate';
765
782
  case 'any-module':
766
783
  case 'specific-module':
767
784
  default:
@@ -771,24 +788,29 @@ function mapAppliesToToTargetScope(appliesTo) {
771
788
  function mapActionToOperationKey(actionKey) {
772
789
  switch (actionKey) {
773
790
  case 'update':
791
+ case 'manage-phase-gate':
774
792
  return 'Update';
775
793
  case 'delete':
776
794
  return 'Delete';
795
+ case 'move-phase-gate':
796
+ return 'MovePhaseGate';
777
797
  case 'create':
778
798
  default:
779
799
  return 'Create';
780
800
  }
781
801
  }
782
- function mapOperationKeyToAction(operationKey) {
802
+ function mapOperationKeyToAction(operationKey, isPhaseGateTarget = false) {
783
803
  switch (String(operationKey ?? '')
784
804
  .trim()
785
805
  .toLowerCase()) {
786
806
  case 'create':
787
- return 'create';
807
+ return isPhaseGateTarget ? null : 'create';
788
808
  case 'update':
789
- return 'update';
809
+ return isPhaseGateTarget ? 'manage-phase-gate' : 'update';
790
810
  case 'delete':
791
- return 'delete';
811
+ return isPhaseGateTarget ? null : 'delete';
812
+ case 'movephasegate':
813
+ return isPhaseGateTarget ? 'move-phase-gate' : null;
792
814
  default:
793
815
  return null;
794
816
  }
@@ -907,6 +929,14 @@ function buildRecipeConfiguration(formValue) {
907
929
  ? { propertyKey, operator, expectedValue }
908
930
  : undefined;
909
931
  }
932
+ case 'property-has-value': {
933
+ const propertyKey = toNullableString(formValue.propertyKey);
934
+ return propertyKey ? { propertyKey } : undefined;
935
+ }
936
+ case 'mandatory-gate-items-completed': {
937
+ const phaseGateSchemaId = toNullableNumber(formValue.phaseGateSchemaId);
938
+ return phaseGateSchemaId !== null ? { phaseGateSchemaId } : {};
939
+ }
910
940
  default:
911
941
  return undefined;
912
942
  }
@@ -923,9 +953,11 @@ function buildCreatePayload(formValue, ruleType) {
923
953
  errorMessage,
924
954
  ruleType: ruleTypeKey,
925
955
  targetScope: mapAppliesToToTargetScope(formValue.appliesTo),
926
- targetModuleKey: formValue.appliesTo === 'specific-module'
927
- ? (toNullableString(formValue.selectedModuleKey) ?? undefined)
928
- : undefined,
956
+ targetModuleKey: formValue.appliesTo === 'phase-gate'
957
+ ? 'PhaseGate'
958
+ : formValue.appliesTo === 'specific-module'
959
+ ? (toNullableString(formValue.selectedModuleKey) ?? undefined)
960
+ : undefined,
929
961
  targetOperationKey: formValue.actionKey !== null
930
962
  ? mapActionToOperationKey(formValue.actionKey)
931
963
  : undefined,
@@ -946,7 +978,7 @@ function mapRuleToWizardFormValue(rule) {
946
978
  return null;
947
979
  }
948
980
  const appliesTo = resolveAppliesTo(rule, recipeKey);
949
- const actionKey = mapOperationKeyToAction(rule.targetOperationKey);
981
+ const actionKey = mapOperationKeyToAction(rule.targetOperationKey, isPhaseGateTarget(rule));
950
982
  if (!actionKey) {
951
983
  return null;
952
984
  }
@@ -1006,21 +1038,41 @@ function mapRuleToWizardFormValue(rule) {
1006
1038
  formValue.blockedModuleKey = null;
1007
1039
  formValue.countedModuleKey = null;
1008
1040
  }
1041
+ if (recipeKey === 'property-has-value') {
1042
+ formValue.requiredModuleKey = null;
1043
+ formValue.blockedModuleKey = null;
1044
+ formValue.countedModuleKey = null;
1045
+ formValue.expectedValue = '';
1046
+ }
1047
+ if (recipeKey === 'mandatory-gate-items-completed') {
1048
+ formValue.requiredModuleKey = null;
1049
+ formValue.blockedModuleKey = null;
1050
+ formValue.countedModuleKey = null;
1051
+ formValue.propertyKey = null;
1052
+ formValue.expectedValue = '';
1053
+ }
1009
1054
  return formValue;
1010
1055
  }
1011
- function resolveAppliesTo(rule, recipeKey) {
1056
+ function isPhaseGateTarget(rule) {
1057
+ const scope = String(rule.targetScope ?? '')
1058
+ .trim()
1059
+ .toLowerCase();
1060
+ const targetModuleKey = String(rule.targetModuleKey ?? '')
1061
+ .trim()
1062
+ .toLowerCase();
1063
+ return scope === 'phasegate' || targetModuleKey === 'phasegate';
1064
+ }
1065
+ function resolveAppliesTo(rule, _recipeKey) {
1012
1066
  const scope = String(rule.targetScope ?? '').trim();
1013
- const targetModuleKey = String(rule.targetModuleKey ?? '').trim();
1014
1067
  if (scope === 'Level') {
1015
1068
  return 'level';
1016
1069
  }
1017
- if (scope === 'PhaseGate' ||
1018
- ((recipeKey === 'phase-gate-completed' ||
1019
- recipeKey === 'phase-gate-module-required') &&
1020
- targetModuleKey.toLowerCase() === 'phasegate')) {
1070
+ if (isPhaseGateTarget(rule)) {
1021
1071
  return 'phase-gate';
1022
1072
  }
1023
- return targetModuleKey ? 'specific-module' : 'any-module';
1073
+ return String(rule.targetModuleKey ?? '').trim()
1074
+ ? 'specific-module'
1075
+ : 'any-module';
1024
1076
  }
1025
1077
  function mapRuleToLegacyFormValue(rule) {
1026
1078
  const formData = {
@@ -1376,6 +1428,11 @@ function buildWizardFormConfig({ translate, isEdit, recipeKey, appliesToOptions,
1376
1428
  value: 'phase-gate-module-required',
1377
1429
  action: 'show',
1378
1430
  },
1431
+ {
1432
+ key: 'recipeKey',
1433
+ value: 'mandatory-gate-items-completed',
1434
+ action: 'show',
1435
+ },
1379
1436
  ],
1380
1437
  }),
1381
1438
  new SelectFieldConfig({
@@ -1430,6 +1487,11 @@ function buildWizardFormConfig({ translate, isEdit, recipeKey, appliesToOptions,
1430
1487
  value: 'property-value',
1431
1488
  action: 'show',
1432
1489
  },
1490
+ {
1491
+ key: 'recipeKey',
1492
+ value: 'property-has-value',
1493
+ action: 'show',
1494
+ },
1433
1495
  ],
1434
1496
  }),
1435
1497
  new SelectFieldConfig({
@@ -1844,6 +1906,20 @@ function resolveRecipeSummary({ value, moduleOptions, requestSchemaOptions, prop
1844
1906
  expectedValue: value.expectedValue || '',
1845
1907
  }).trim();
1846
1908
  }
1909
+ case 'property-has-value': {
1910
+ const propertyLabel = findOptionLabel(propertyOptions, value.propertyKey) ??
1911
+ value.propertyKey ??
1912
+ translate('wizard.summary.fallbacks.property');
1913
+ return translate('wizard.summary.property-has-value', {
1914
+ property: propertyLabel,
1915
+ });
1916
+ }
1917
+ case 'mandatory-gate-items-completed': {
1918
+ const phaseGateLabel = findOptionLabel(phaseGateOptions, value.phaseGateSchemaId);
1919
+ return translate('wizard.summary.mandatory-gate-items-completed', {
1920
+ phaseGate: phaseGateLabel ?? translate('wizard.summary.fallbacks.phase-gate'),
1921
+ });
1922
+ }
1847
1923
  default:
1848
1924
  return translate('wizard.summary-empty');
1849
1925
  }
@@ -1873,7 +1949,8 @@ function mapWizardFormValueToState(value) {
1873
1949
  phaseGateCompletedSchemaId: value.recipeKey === 'phase-gate-completed'
1874
1950
  ? value.phaseGateSchemaId
1875
1951
  : null,
1876
- phaseGateOptionalSchemaId: value.recipeKey === 'phase-gate-module-required'
1952
+ phaseGateOptionalSchemaId: value.recipeKey === 'phase-gate-module-required' ||
1953
+ value.recipeKey === 'mandatory-gate-items-completed'
1877
1954
  ? value.phaseGateSchemaId
1878
1955
  : null,
1879
1956
  };
@@ -1975,6 +2052,10 @@ function resolveRecipeDefinitionKeyForRuleType(ruleType) {
1975
2052
  case 'PropertyValueEquals':
1976
2053
  case 'FieldValue':
1977
2054
  return 'property-value';
2055
+ case 'PropertyHasValue':
2056
+ return 'property-has-value';
2057
+ case 'PhaseGateMandatoryItemsCompleted':
2058
+ return 'mandatory-gate-items-completed';
1978
2059
  default:
1979
2060
  return null;
1980
2061
  }
@@ -2086,8 +2167,8 @@ class GovernanceRuleForm {
2086
2167
  translocoService = inject(TranslocoService);
2087
2168
  facade = inject(GovernanceFacade);
2088
2169
  toast = inject(ToastService);
2089
- ruleForEdit = input(null, ...(ngDevMode ? [{ debugName: "ruleForEdit" }] : []));
2090
- dynamicFormRef = viewChild(DynamicForm, ...(ngDevMode ? [{ debugName: "dynamicFormRef" }] : []));
2170
+ ruleForEdit = input(null, ...(ngDevMode ? [{ debugName: "ruleForEdit" }] : /* istanbul ignore next */ []));
2171
+ dynamicFormRef = viewChild(DynamicForm, ...(ngDevMode ? [{ debugName: "dynamicFormRef" }] : /* istanbul ignore next */ []));
2091
2172
  selectedRule = this.facade.selectedRule;
2092
2173
  ruleTypes = this.facade.ruleTypes;
2093
2174
  isLoadingRule = this.facade.isLoadingRule;
@@ -2104,42 +2185,47 @@ class GovernanceRuleForm {
2104
2185
  activeLang = toSignal(this.translocoService.langChanges$, {
2105
2186
  initialValue: this.translocoService.getActiveLang(),
2106
2187
  });
2107
- langCode = computed(() => this.activeLang() === 'ar' ? 'ar' : 'en', ...(ngDevMode ? [{ debugName: "langCode" }] : []));
2108
- isEditMode = computed(() => !!this.ruleForEdit()?.id, ...(ngDevMode ? [{ debugName: "isEditMode" }] : []));
2109
- wizardState = computed(() => normalizeWizardFormState(this.wizardStateRaw()), ...(ngDevMode ? [{ debugName: "wizardState" }] : []));
2110
- wizardValue = computed(() => mapWizardStateToWizardValue(this.wizardState()), ...(ngDevMode ? [{ debugName: "wizardValue" }] : []));
2188
+ langCode = computed(() => this.activeLang() === 'ar' ? 'ar' : 'en', ...(ngDevMode ? [{ debugName: "langCode" }] : /* istanbul ignore next */ []));
2189
+ isEditMode = computed(() => !!this.ruleForEdit()?.id, ...(ngDevMode ? [{ debugName: "isEditMode" }] : /* istanbul ignore next */ []));
2190
+ wizardState = computed(() => normalizeWizardFormState(this.wizardStateRaw()), ...(ngDevMode ? [{ debugName: "wizardState" }] : /* istanbul ignore next */ []));
2191
+ wizardValue = computed(() => mapWizardStateToWizardValue(this.wizardState()), ...(ngDevMode ? [{ debugName: "wizardValue" }] : /* istanbul ignore next */ []));
2111
2192
  moduleOptions = computed(() => {
2112
2193
  const lang = this.langCode();
2113
2194
  return this.modules().map((module) => ({
2114
2195
  label: module.name[lang] || module.name.en,
2115
2196
  value: module.key,
2116
2197
  }));
2117
- }, ...(ngDevMode ? [{ debugName: "moduleOptions" }] : []));
2198
+ }, ...(ngDevMode ? [{ debugName: "moduleOptions" }] : /* istanbul ignore next */ []));
2118
2199
  requestSchemaOptions = computed(() => {
2119
2200
  const lang = this.langCode();
2120
2201
  return this.requestSchemas().map((schema) => ({
2121
2202
  label: schema.name[lang] || schema.name.en,
2122
2203
  value: String(schema.id),
2123
2204
  }));
2124
- }, ...(ngDevMode ? [{ debugName: "requestSchemaOptions" }] : []));
2205
+ }, ...(ngDevMode ? [{ debugName: "requestSchemaOptions" }] : /* istanbul ignore next */ []));
2125
2206
  propertyOptions = computed(() => {
2126
2207
  const lang = this.langCode();
2127
2208
  return this.properties().map((property) => ({
2128
2209
  label: property.name[lang] || property.name.en,
2129
2210
  value: property.key,
2130
2211
  }));
2131
- }, ...(ngDevMode ? [{ debugName: "propertyOptions" }] : []));
2212
+ }, ...(ngDevMode ? [{ debugName: "propertyOptions" }] : /* istanbul ignore next */ []));
2132
2213
  appliesToCardOptions = computed(() => GOVERNANCE_APPLIES_TO_OPTIONS.map((option) => ({
2133
2214
  id: option.value,
2134
2215
  name: this.translate(option.labelKey),
2135
- })), ...(ngDevMode ? [{ debugName: "appliesToCardOptions" }] : []));
2216
+ })), ...(ngDevMode ? [{ debugName: "appliesToCardOptions" }] : /* istanbul ignore next */ []));
2136
2217
  availableActionOptions = computed(() => {
2137
- return GOVERNANCE_ACTION_OPTIONS.filter((option) => hasCompatibleRecipe(this.ruleTypes(), this.wizardValue().appliesTo, option.value));
2138
- }, ...(ngDevMode ? [{ debugName: "availableActionOptions" }] : []));
2218
+ const appliesTo = this.wizardValue().appliesTo;
2219
+ const allowedActions = appliesTo === 'phase-gate'
2220
+ ? ['manage-phase-gate', 'move-phase-gate']
2221
+ : ['create', 'update', 'delete'];
2222
+ return GOVERNANCE_ACTION_OPTIONS.filter((option) => allowedActions.includes(option.value) &&
2223
+ hasCompatibleRecipe(this.ruleTypes(), appliesTo, option.value));
2224
+ }, ...(ngDevMode ? [{ debugName: "availableActionOptions" }] : /* istanbul ignore next */ []));
2139
2225
  actionCardOptions = computed(() => this.availableActionOptions().map((option) => ({
2140
2226
  id: option.value,
2141
2227
  name: buildActionPrompt(this.wizardValue().appliesTo, option.value, this.translate.bind(this)),
2142
- })), ...(ngDevMode ? [{ debugName: "actionCardOptions" }] : []));
2228
+ })), ...(ngDevMode ? [{ debugName: "actionCardOptions" }] : /* istanbul ignore next */ []));
2143
2229
  availableRecipeDefinitions = computed(() => {
2144
2230
  const actionKey = this.wizardValue().actionKey;
2145
2231
  if (!actionKey) {
@@ -2157,35 +2243,35 @@ class GovernanceRuleForm {
2157
2243
  })
2158
2244
  .filter((recipe, index, items) => !!recipe &&
2159
2245
  items.findIndex((item) => item?.key === recipe.key) === index);
2160
- }, ...(ngDevMode ? [{ debugName: "availableRecipeDefinitions" }] : []));
2246
+ }, ...(ngDevMode ? [{ debugName: "availableRecipeDefinitions" }] : /* istanbul ignore next */ []));
2161
2247
  recipeCardOptions = computed(() => this.availableRecipeDefinitions().map((recipe) => ({
2162
2248
  id: recipe.key,
2163
2249
  name: this.translate(recipe.labelKey),
2164
- })), ...(ngDevMode ? [{ debugName: "recipeCardOptions" }] : []));
2165
- selectedRuleType = computed(() => findRuleTypeByRecipe(this.ruleTypes(), this.wizardValue().recipeKey), ...(ngDevMode ? [{ debugName: "selectedRuleType" }] : []));
2250
+ })), ...(ngDevMode ? [{ debugName: "recipeCardOptions" }] : /* istanbul ignore next */ []));
2251
+ selectedRuleType = computed(() => findRuleTypeByRecipe(this.ruleTypes(), this.wizardValue().recipeKey), ...(ngDevMode ? [{ debugName: "selectedRuleType" }] : /* istanbul ignore next */ []));
2166
2252
  useLegacyEditor = computed(() => {
2167
2253
  if (!this.ruleForEdit()?.id) {
2168
2254
  return false;
2169
2255
  }
2170
2256
  const rule = this.selectedRule();
2171
2257
  return !!rule && !mapRuleToWizardFormValue(rule);
2172
- }, ...(ngDevMode ? [{ debugName: "useLegacyEditor" }] : []));
2258
+ }, ...(ngDevMode ? [{ debugName: "useLegacyEditor" }] : /* istanbul ignore next */ []));
2173
2259
  isInitializing = computed(() => {
2174
2260
  if (this.ruleForEdit()?.id && this.isLoadingRule()) {
2175
2261
  return true;
2176
2262
  }
2177
2263
  return this.ruleTypes().length === 0 && this.isLoadingRuleTypes();
2178
- }, ...(ngDevMode ? [{ debugName: "isInitializing" }] : []));
2264
+ }, ...(ngDevMode ? [{ debugName: "isInitializing" }] : /* istanbul ignore next */ []));
2179
2265
  noRecipesAvailable = computed(() => !this.useLegacyEditor() &&
2180
2266
  !!this.wizardValue().actionKey &&
2181
- this.recipeCardOptions().length === 0, ...(ngDevMode ? [{ debugName: "noRecipesAvailable" }] : []));
2267
+ this.recipeCardOptions().length === 0, ...(ngDevMode ? [{ debugName: "noRecipesAvailable" }] : /* istanbul ignore next */ []));
2182
2268
  hasReviewSummary = computed(() => {
2183
2269
  if (this.useLegacyEditor()) {
2184
2270
  return false;
2185
2271
  }
2186
2272
  const value = this.wizardValue();
2187
2273
  return !!value.actionKey && !!value.recipeKey;
2188
- }, ...(ngDevMode ? [{ debugName: "hasReviewSummary" }] : []));
2274
+ }, ...(ngDevMode ? [{ debugName: "hasReviewSummary" }] : /* istanbul ignore next */ []));
2189
2275
  canSubmit = computed(() => {
2190
2276
  if (this.useLegacyEditor()) {
2191
2277
  return this.legacyFormControl.valid;
@@ -2194,7 +2280,7 @@ class GovernanceRuleForm {
2194
2280
  !!this.selectedRuleType() &&
2195
2281
  !!this.wizardValue().actionKey &&
2196
2282
  !!this.wizardValue().recipeKey);
2197
- }, ...(ngDevMode ? [{ debugName: "canSubmit" }] : []));
2283
+ }, ...(ngDevMode ? [{ debugName: "canSubmit" }] : /* istanbul ignore next */ []));
2198
2284
  reviewSummary = computed(() => buildSummary({
2199
2285
  value: this.wizardValue(),
2200
2286
  moduleOptions: this.moduleOptions(),
@@ -2202,7 +2288,7 @@ class GovernanceRuleForm {
2202
2288
  propertyOptions: this.propertyOptions(),
2203
2289
  phaseGateOptions: this.getPhaseGateOptions(),
2204
2290
  translate: this.translate.bind(this),
2205
- }), ...(ngDevMode ? [{ debugName: "reviewSummary" }] : []));
2291
+ }), ...(ngDevMode ? [{ debugName: "reviewSummary" }] : /* istanbul ignore next */ []));
2206
2292
  wizardFormConfig = computed(() => buildWizardFormConfig({
2207
2293
  translate: this.translate.bind(this),
2208
2294
  isEdit: this.isEditMode(),
@@ -2215,7 +2301,7 @@ class GovernanceRuleForm {
2215
2301
  propertyOptions: this.propertyOptions(),
2216
2302
  phaseGateOptions: this.getPhaseGateOptions(),
2217
2303
  blockingStatuses: this.getBlockingStatusOptions(),
2218
- }), ...(ngDevMode ? [{ debugName: "wizardFormConfig" }] : []));
2304
+ }), ...(ngDevMode ? [{ debugName: "wizardFormConfig" }] : /* istanbul ignore next */ []));
2219
2305
  selectedLegacyRuleType = computed(() => {
2220
2306
  const ruleTypeKey = String(this.legacyFormValue()?.ruleType ?? '').trim();
2221
2307
  if (!ruleTypeKey) {
@@ -2225,7 +2311,7 @@ class GovernanceRuleForm {
2225
2311
  const catalogKey = readGovernanceRuleTypeKey(ruleType);
2226
2312
  return (catalogKey === ruleTypeKey || String(ruleType.type) === ruleTypeKey);
2227
2313
  }) ?? null);
2228
- }, ...(ngDevMode ? [{ debugName: "selectedLegacyRuleType" }] : []));
2314
+ }, ...(ngDevMode ? [{ debugName: "selectedLegacyRuleType" }] : /* istanbul ignore next */ []));
2229
2315
  scopeOptions = computed(() => {
2230
2316
  const ruleType = this.selectedLegacyRuleType();
2231
2317
  if (!ruleType) {
@@ -2239,7 +2325,7 @@ class GovernanceRuleForm {
2239
2325
  label: this.translateScopeLabel(scope),
2240
2326
  value: scope,
2241
2327
  }));
2242
- }, ...(ngDevMode ? [{ debugName: "scopeOptions" }] : []));
2328
+ }, ...(ngDevMode ? [{ debugName: "scopeOptions" }] : /* istanbul ignore next */ []));
2243
2329
  operationOptions = computed(() => {
2244
2330
  const ruleType = this.selectedLegacyRuleType();
2245
2331
  if (!ruleType) {
@@ -2248,6 +2334,10 @@ class GovernanceRuleForm {
2248
2334
  { label: this.translateOperationLabel('Create'), value: 'Create' },
2249
2335
  { label: this.translateOperationLabel('Update'), value: 'Update' },
2250
2336
  { label: this.translateOperationLabel('Delete'), value: 'Delete' },
2337
+ {
2338
+ label: this.translateOperationLabel('MovePhaseGate'),
2339
+ value: 'MovePhaseGate',
2340
+ },
2251
2341
  ];
2252
2342
  }
2253
2343
  return [
@@ -2257,7 +2347,7 @@ class GovernanceRuleForm {
2257
2347
  value: operation,
2258
2348
  })),
2259
2349
  ];
2260
- }, ...(ngDevMode ? [{ debugName: "operationOptions" }] : []));
2350
+ }, ...(ngDevMode ? [{ debugName: "operationOptions" }] : /* istanbul ignore next */ []));
2261
2351
  legacyFormConfig = computed(() => buildLegacyFormConfig({
2262
2352
  translate: this.translate.bind(this),
2263
2353
  isEdit: this.isEditMode(),
@@ -2269,7 +2359,7 @@ class GovernanceRuleForm {
2269
2359
  moduleOptions: this.moduleOptions(),
2270
2360
  requestSchemaOptions: this.requestSchemaOptions(),
2271
2361
  propertyOptions: this.propertyOptions(),
2272
- }), ...(ngDevMode ? [{ debugName: "legacyFormConfig" }] : []));
2362
+ }), ...(ngDevMode ? [{ debugName: "legacyFormConfig" }] : /* istanbul ignore next */ []));
2273
2363
  constructor() {
2274
2364
  effect(() => {
2275
2365
  if (this.wizardValue().appliesTo !== 'specific-module' &&
@@ -2323,16 +2413,14 @@ class GovernanceRuleForm {
2323
2413
  effect(() => {
2324
2414
  const recipeKey = this.wizardValue().recipeKey;
2325
2415
  const appliesTo = this.wizardValue().appliesTo;
2326
- const targetModuleKey = appliesTo === 'specific-module'
2327
- ? (this.wizardValue().selectedModuleKey ?? undefined)
2328
- : undefined;
2329
- const targetScope = appliesTo === 'level'
2330
- ? 'Level'
2331
- : appliesTo === 'phase-gate'
2332
- ? 'PhaseGate'
2333
- : 'Module';
2416
+ const targetModuleKey = appliesTo === 'phase-gate'
2417
+ ? 'PhaseGate'
2418
+ : appliesTo === 'specific-module'
2419
+ ? (this.wizardValue().selectedModuleKey ?? undefined)
2420
+ : undefined;
2421
+ const targetScope = mapAppliesToToTargetScope(appliesTo);
2334
2422
  const needsRequestSchemas = recipeKey === 'no-active-request';
2335
- const needsProperties = recipeKey === 'property-value';
2423
+ const needsProperties = recipeKey === 'property-value' || recipeKey === 'property-has-value';
2336
2424
  if (!needsRequestSchemas && !needsProperties) {
2337
2425
  this.clearReferenceData();
2338
2426
  return;
@@ -2428,6 +2516,8 @@ class GovernanceRuleForm {
2428
2516
  return this.translate('update');
2429
2517
  case 'Delete':
2430
2518
  return this.translate('delete');
2519
+ case 'MovePhaseGate':
2520
+ return this.translate('wizard.actions.move-phase-gate');
2431
2521
  default:
2432
2522
  return operation;
2433
2523
  }
@@ -2498,10 +2588,10 @@ class GovernanceRuleForm {
2498
2588
  value: readGovernanceRuleTypeKey(ruleType),
2499
2589
  }));
2500
2590
  }
2501
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceRuleForm, deps: [], target: i0.ɵɵFactoryTarget.Component });
2502
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: GovernanceRuleForm, isStandalone: true, selector: "mt-governance-rule-form", inputs: { ruleForEdit: { classPropertyName: "ruleForEdit", publicName: "ruleForEdit", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block h-full" }, viewQueries: [{ propertyName: "dynamicFormRef", first: true, predicate: DynamicForm, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'governance'\">\r\n <div\r\n [class]=\"\r\n 'governance-rule-form-content flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4 sm:p-5 ' +\r\n modal.contentClass\r\n \"\r\n >\r\n @if (isInitializing()) {\r\n <div class=\"space-y-4\">\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n </div>\r\n } @else if (useLegacyEditor()) {\r\n <section class=\"rounded-2xl border border-amber-200 bg-amber-50/70 p-4\">\r\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\r\n {{ t(\"wizard.legacy-title\") }}\r\n </p>\r\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\r\n {{ t(\"wizard.legacy-description\") }}\r\n </p>\r\n </section>\r\n\r\n <mt-dynamic-form\r\n [formConfig]=\"legacyFormConfig()\"\r\n [formControl]=\"legacyFormControl\"\r\n />\r\n } @else {\r\n @if (noRecipesAvailable()) {\r\n <section\r\n class=\"rounded-2xl border border-orange-200 bg-orange-50/80 p-4\"\r\n >\r\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\r\n {{ t(\"wizard.no-recipes-title\") }}\r\n </p>\r\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\r\n {{ t(\"wizard.no-recipes-description\") }}\r\n </p>\r\n </section>\r\n }\r\n\n <mt-dynamic-form\n [formConfig]=\"wizardFormConfig()\"\n [formControl]=\"wizardFormControl\"\n />\n\n @if (hasReviewSummary()) {\n <section class=\"flex flex-col gap-2\">\n <p\n class=\"m-0 text-xs font-semibold uppercase tracking-[0.18em] text-slate-500\"\n >\n {{ t(\"wizard.summary-title\") }}\n </p>\n <p-message\n severity=\"warn\"\n styleClass=\"w-full\"\n [text]=\"reviewSummary()\"\n />\n </section>\n }\n }\n </div>\r\n\r\n <div\r\n [class]=\"\r\n 'governance-rule-form-footer ' +\r\n modal.footerClass +\r\n ' flex-col gap-2 sm:flex-row sm:items-center sm:justify-end'\r\n \"\r\n >\r\n <mt-button\r\n severity=\"secondary\"\r\n [label]=\"'cancel' | transloco\"\r\n (click)=\"ref.close()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"ruleForEdit() ? t('update') : t('create')\"\r\n [loading]=\"isAddingRule() || isUpdatingRule()\"\r\n [disabled]=\"isAddingRule() || isUpdatingRule()\"\r\n (click)=\"onSubmit()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;min-height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant", "motionOptions"], outputs: ["onClose"] }, { 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: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2591
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceRuleForm, deps: [], target: i0.ɵɵFactoryTarget.Component });
2592
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GovernanceRuleForm, isStandalone: true, selector: "mt-governance-rule-form", inputs: { ruleForEdit: { classPropertyName: "ruleForEdit", publicName: "ruleForEdit", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block h-full" }, viewQueries: [{ propertyName: "dynamicFormRef", first: true, predicate: DynamicForm, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'governance'\">\r\n <div\r\n [class]=\"\r\n 'governance-rule-form-content flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4 sm:p-5 ' +\r\n modal.contentClass\r\n \"\r\n >\r\n @if (isInitializing()) {\r\n <div class=\"space-y-4\">\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n </div>\r\n } @else if (useLegacyEditor()) {\r\n <section class=\"rounded-lg border border-amber-200 bg-amber-50/70 p-4\">\r\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\r\n {{ t(\"wizard.legacy-title\") }}\r\n </p>\r\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\r\n {{ t(\"wizard.legacy-description\") }}\r\n </p>\r\n </section>\r\n\r\n <mt-dynamic-form\r\n [formConfig]=\"legacyFormConfig()\"\r\n [formControl]=\"legacyFormControl\"\r\n />\r\n } @else {\r\n @if (noRecipesAvailable()) {\r\n <section\r\n class=\"rounded-lg border border-orange-200 bg-orange-50/80 p-4\"\r\n >\r\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\r\n {{ t(\"wizard.no-recipes-title\") }}\r\n </p>\r\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\r\n {{ t(\"wizard.no-recipes-description\") }}\r\n </p>\r\n </section>\r\n }\r\n\r\n <mt-dynamic-form\r\n [formConfig]=\"wizardFormConfig()\"\r\n [formControl]=\"wizardFormControl\"\r\n />\r\n\r\n @if (hasReviewSummary()) {\r\n <section class=\"flex flex-col gap-2\">\r\n <p\r\n class=\"m-0 text-xs font-semibold uppercase tracking-[0.18em] text-slate-500\"\r\n >\r\n {{ t(\"wizard.summary-title\") }}\r\n </p>\r\n <p-message\r\n severity=\"warn\"\r\n styleClass=\"w-full\"\r\n [text]=\"reviewSummary()\"\r\n />\r\n </section>\r\n }\r\n }\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n 'governance-rule-form-footer ' +\r\n modal.footerClass +\r\n ' flex-col gap-2 sm:flex-row sm:items-center sm:justify-end'\r\n \"\r\n >\r\n <mt-button\r\n severity=\"secondary\"\r\n [label]=\"'cancel' | transloco\"\r\n (click)=\"ref.close()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"ruleForEdit() ? t('update') : t('create')\"\r\n [loading]=\"isAddingRule() || isUpdatingRule()\"\r\n [disabled]=\"isAddingRule() || isUpdatingRule()\"\r\n (click)=\"onSubmit()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;min-height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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"] }, { kind: "component", type: DynamicForm, selector: "mt-dynamic-form", inputs: ["formConfig", "forcedHiddenFieldKeys", "preserveForcedHiddenValues", "visibleSectionKeys"], outputs: ["runtimeMessagesChange"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant", "motionOptions"], outputs: ["onClose"] }, { 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: SkeletonModule }, { kind: "component", type: i2.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2503
2593
  }
2504
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceRuleForm, decorators: [{
2594
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceRuleForm, decorators: [{
2505
2595
  type: Component,
2506
2596
  args: [{ selector: 'mt-governance-rule-form', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2507
2597
  CommonModule,
@@ -2514,7 +2604,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
2514
2604
  TranslocoPipe,
2515
2605
  ], host: {
2516
2606
  class: 'block h-full',
2517
- }, template: "<ng-container *transloco=\"let t; prefix: 'governance'\">\r\n <div\r\n [class]=\"\r\n 'governance-rule-form-content flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4 sm:p-5 ' +\r\n modal.contentClass\r\n \"\r\n >\r\n @if (isInitializing()) {\r\n <div class=\"space-y-4\">\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n </div>\r\n } @else if (useLegacyEditor()) {\r\n <section class=\"rounded-2xl border border-amber-200 bg-amber-50/70 p-4\">\r\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\r\n {{ t(\"wizard.legacy-title\") }}\r\n </p>\r\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\r\n {{ t(\"wizard.legacy-description\") }}\r\n </p>\r\n </section>\r\n\r\n <mt-dynamic-form\r\n [formConfig]=\"legacyFormConfig()\"\r\n [formControl]=\"legacyFormControl\"\r\n />\r\n } @else {\r\n @if (noRecipesAvailable()) {\r\n <section\r\n class=\"rounded-2xl border border-orange-200 bg-orange-50/80 p-4\"\r\n >\r\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\r\n {{ t(\"wizard.no-recipes-title\") }}\r\n </p>\r\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\r\n {{ t(\"wizard.no-recipes-description\") }}\r\n </p>\r\n </section>\r\n }\r\n\n <mt-dynamic-form\n [formConfig]=\"wizardFormConfig()\"\n [formControl]=\"wizardFormControl\"\n />\n\n @if (hasReviewSummary()) {\n <section class=\"flex flex-col gap-2\">\n <p\n class=\"m-0 text-xs font-semibold uppercase tracking-[0.18em] text-slate-500\"\n >\n {{ t(\"wizard.summary-title\") }}\n </p>\n <p-message\n severity=\"warn\"\n styleClass=\"w-full\"\n [text]=\"reviewSummary()\"\n />\n </section>\n }\n }\n </div>\r\n\r\n <div\r\n [class]=\"\r\n 'governance-rule-form-footer ' +\r\n modal.footerClass +\r\n ' flex-col gap-2 sm:flex-row sm:items-center sm:justify-end'\r\n \"\r\n >\r\n <mt-button\r\n severity=\"secondary\"\r\n [label]=\"'cancel' | transloco\"\r\n (click)=\"ref.close()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"ruleForEdit() ? t('update') : t('create')\"\r\n [loading]=\"isAddingRule() || isUpdatingRule()\"\r\n [disabled]=\"isAddingRule() || isUpdatingRule()\"\r\n (click)=\"onSubmit()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;min-height:100%}\n"] }]
2607
+ }, template: "<ng-container *transloco=\"let t; prefix: 'governance'\">\r\n <div\r\n [class]=\"\r\n 'governance-rule-form-content flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4 sm:p-5 ' +\r\n modal.contentClass\r\n \"\r\n >\r\n @if (isInitializing()) {\r\n <div class=\"space-y-4\">\r\n <p-skeleton height=\"4rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n <p-skeleton height=\"12rem\" />\r\n </div>\r\n } @else if (useLegacyEditor()) {\r\n <section class=\"rounded-lg border border-amber-200 bg-amber-50/70 p-4\">\r\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\r\n {{ t(\"wizard.legacy-title\") }}\r\n </p>\r\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\r\n {{ t(\"wizard.legacy-description\") }}\r\n </p>\r\n </section>\r\n\r\n <mt-dynamic-form\r\n [formConfig]=\"legacyFormConfig()\"\r\n [formControl]=\"legacyFormControl\"\r\n />\r\n } @else {\r\n @if (noRecipesAvailable()) {\r\n <section\r\n class=\"rounded-lg border border-orange-200 bg-orange-50/80 p-4\"\r\n >\r\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\r\n {{ t(\"wizard.no-recipes-title\") }}\r\n </p>\r\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\r\n {{ t(\"wizard.no-recipes-description\") }}\r\n </p>\r\n </section>\r\n }\r\n\r\n <mt-dynamic-form\r\n [formConfig]=\"wizardFormConfig()\"\r\n [formControl]=\"wizardFormControl\"\r\n />\r\n\r\n @if (hasReviewSummary()) {\r\n <section class=\"flex flex-col gap-2\">\r\n <p\r\n class=\"m-0 text-xs font-semibold uppercase tracking-[0.18em] text-slate-500\"\r\n >\r\n {{ t(\"wizard.summary-title\") }}\r\n </p>\r\n <p-message\r\n severity=\"warn\"\r\n styleClass=\"w-full\"\r\n [text]=\"reviewSummary()\"\r\n />\r\n </section>\r\n }\r\n }\r\n </div>\r\n\r\n <div\r\n [class]=\"\r\n 'governance-rule-form-footer ' +\r\n modal.footerClass +\r\n ' flex-col gap-2 sm:flex-row sm:items-center sm:justify-end'\r\n \"\r\n >\r\n <mt-button\r\n severity=\"secondary\"\r\n [label]=\"'cancel' | transloco\"\r\n (click)=\"ref.close()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n\r\n <mt-button\r\n [label]=\"ruleForEdit() ? t('update') : t('create')\"\r\n [loading]=\"isAddingRule() || isUpdatingRule()\"\r\n [disabled]=\"isAddingRule() || isUpdatingRule()\"\r\n (click)=\"onSubmit()\"\r\n styleClass=\"w-full sm:w-auto\"\r\n />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block;min-height:100%}\n"] }]
2518
2608
  }], ctorParameters: () => [], propDecorators: { ruleForEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "ruleForEdit", required: false }] }], dynamicFormRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DynamicForm), { isSignal: true }] }] } });
2519
2609
 
2520
2610
  class GovernanceRulesList {
@@ -2523,6 +2613,7 @@ class GovernanceRulesList {
2523
2613
  // ============================================================================
2524
2614
  typeCol = viewChild.required('typeCol');
2525
2615
  scopeCol = viewChild.required('scopeCol');
2616
+ whenCol = viewChild.required('whenCol');
2526
2617
  priorityCol = viewChild.required('priorityCol');
2527
2618
  // ============================================================================
2528
2619
  // Services
@@ -2530,6 +2621,7 @@ class GovernanceRulesList {
2530
2621
  facade = inject(GovernanceFacade);
2531
2622
  modal = inject(ModalService);
2532
2623
  translocoService = inject(TranslocoService);
2624
+ ruleTypes = this.facade.ruleTypes;
2533
2625
  // ============================================================================
2534
2626
  // Breadcrumb
2535
2627
  // ============================================================================
@@ -2546,7 +2638,7 @@ class GovernanceRulesList {
2546
2638
  {
2547
2639
  label: this.translocoService.translate('governance.governance-rules'),
2548
2640
  },
2549
- ], ...(ngDevMode ? [{ debugName: "breadcrumbItems" }] : []));
2641
+ ], ...(ngDevMode ? [{ debugName: "breadcrumbItems" }] : /* istanbul ignore next */ []));
2550
2642
  // ============================================================================
2551
2643
  // Data Computed from Facade
2552
2644
  // ============================================================================
@@ -2564,7 +2656,26 @@ class GovernanceRulesList {
2564
2656
  default:
2565
2657
  return all;
2566
2658
  }
2567
- }, ...(ngDevMode ? [{ debugName: "rules" }] : []));
2659
+ }, ...(ngDevMode ? [{ debugName: "rules" }] : /* istanbul ignore next */ []));
2660
+ ruleTypeOptions = computed(() => {
2661
+ const ruleTypes = this.ruleTypes();
2662
+ if (ruleTypes.length > 0) {
2663
+ return ruleTypes
2664
+ .map((ruleType) => this.readRuleTypeKey(ruleType))
2665
+ .filter((key, index, items) => !!key && items.indexOf(key) === index)
2666
+ .map((key) => ({
2667
+ label: this.getRuleTypeLabel(key),
2668
+ value: key,
2669
+ }));
2670
+ }
2671
+ return this.rules()
2672
+ .map((rule) => rule.ruleTypeKey)
2673
+ .filter((key, index, items) => !!key && items.indexOf(key) === index)
2674
+ .map((key) => ({
2675
+ label: this.getRuleTypeLabel(key),
2676
+ value: key,
2677
+ }));
2678
+ }, ...(ngDevMode ? [{ debugName: "ruleTypeOptions" }] : /* istanbul ignore next */ []));
2568
2679
  // ============================================================================
2569
2680
  // Tabs
2570
2681
  // ============================================================================
@@ -2581,8 +2692,8 @@ class GovernanceRulesList {
2581
2692
  label: this.translocoService.translate('governance.inactive'),
2582
2693
  value: 'inactive',
2583
2694
  },
2584
- ], ...(ngDevMode ? [{ debugName: "tabs" }] : []));
2585
- activeTab = signal('all', ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
2695
+ ], ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
2696
+ activeTab = signal('all', ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
2586
2697
  // ============================================================================
2587
2698
  // Table Actions
2588
2699
  // ============================================================================
@@ -2595,8 +2706,8 @@ class GovernanceRulesList {
2595
2706
  this.openRuleDialog();
2596
2707
  },
2597
2708
  },
2598
- ], ...(ngDevMode ? [{ debugName: "tableActions" }] : []));
2599
- deletingRowIds = signal([], ...(ngDevMode ? [{ debugName: "deletingRowIds" }] : []));
2709
+ ], ...(ngDevMode ? [{ debugName: "tableActions" }] : /* istanbul ignore next */ []));
2710
+ deletingRowIds = signal([], ...(ngDevMode ? [{ debugName: "deletingRowIds" }] : /* istanbul ignore next */ []));
2600
2711
  rowActions = signal([
2601
2712
  {
2602
2713
  icon: 'custom.pencil',
@@ -2627,7 +2738,7 @@ class GovernanceRulesList {
2627
2738
  },
2628
2739
  loading: (row) => this.deletingRowIds().includes(row.id),
2629
2740
  },
2630
- ], ...(ngDevMode ? [{ debugName: "rowActions" }] : []));
2741
+ ], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
2631
2742
  // ============================================================================
2632
2743
  // Table Columns
2633
2744
  // ============================================================================
@@ -2653,37 +2764,20 @@ class GovernanceRulesList {
2653
2764
  filterConfig: {
2654
2765
  type: 'select',
2655
2766
  label: this.translocoService.translate('governance.rule-type'),
2656
- options: this.getRuleTypeOptions(),
2767
+ options: this.ruleTypeOptions(),
2657
2768
  },
2658
2769
  },
2659
2770
  {
2660
2771
  key: 'targetScope',
2661
- label: this.translocoService.translate('governance.scope'),
2772
+ label: this.translocoService.translate('governance.applies-to'),
2662
2773
  type: 'custom',
2663
2774
  customCellTpl: this.scopeCol(),
2664
- filterConfig: {
2665
- type: 'select',
2666
- label: this.translocoService.translate('governance.scope'),
2667
- options: [
2668
- {
2669
- label: this.translocoService.translate('governance.scope-level'),
2670
- value: 'Level',
2671
- },
2672
- {
2673
- label: this.translocoService.translate('governance.scope-module'),
2674
- value: 'Module',
2675
- },
2676
- {
2677
- label: this.translocoService.translate('governance.scope-phase-gate'),
2678
- value: 'PhaseGate',
2679
- },
2680
- ],
2681
- },
2682
2775
  },
2683
2776
  {
2684
- key: 'targetModuleKey',
2685
- label: this.translocoService.translate('governance.target-module'),
2686
- type: 'text',
2777
+ key: 'targetOperationKey',
2778
+ label: this.translocoService.translate('governance.when'),
2779
+ type: 'custom',
2780
+ customCellTpl: this.whenCol(),
2687
2781
  },
2688
2782
  {
2689
2783
  key: 'isActive',
@@ -2704,7 +2798,7 @@ class GovernanceRulesList {
2704
2798
  ],
2705
2799
  },
2706
2800
  },
2707
- ], ...(ngDevMode ? [{ debugName: "tableColumns" }] : []));
2801
+ ], ...(ngDevMode ? [{ debugName: "tableColumns" }] : /* istanbul ignore next */ []));
2708
2802
  // ============================================================================
2709
2803
  // Private
2710
2804
  // ============================================================================
@@ -2712,6 +2806,11 @@ class GovernanceRulesList {
2712
2806
  allRules = this.facade.rules;
2713
2807
  activeRules = this.facade.activeRules;
2714
2808
  inactiveRules = this.facade.inactiveRules;
2809
+ ngOnInit() {
2810
+ if (!this.ruleTypes().length) {
2811
+ this.facade.getRuleTypes();
2812
+ }
2813
+ }
2715
2814
  ngOnDestroy() {
2716
2815
  this.facade.resetState();
2717
2816
  }
@@ -2736,67 +2835,84 @@ class GovernanceRulesList {
2736
2835
  this.facade.toggleRuleActive(event.row.id);
2737
2836
  }
2738
2837
  }
2739
- getRuleTypeOptions() {
2740
- return [
2741
- {
2742
- label: this.translocoService.translate('governance.rule-types.ModuleExists'),
2743
- value: 'ModuleExists',
2744
- },
2745
- {
2746
- label: this.translocoService.translate('governance.rule-types.ModuleDoesNotExist'),
2747
- value: 'ModuleDoesNotExist',
2748
- },
2749
- {
2750
- label: this.translocoService.translate('governance.rule-types.ModuleMaxCount'),
2751
- value: 'ModuleMaxCount',
2752
- },
2753
- {
2754
- label: this.translocoService.translate('governance.rule-types.ModuleMinCount'),
2755
- value: 'ModuleMinCount',
2756
- },
2757
- {
2758
- label: this.translocoService.translate('governance.rule-types.FieldRequired'),
2759
- value: 'FieldRequired',
2760
- },
2761
- {
2762
- label: this.translocoService.translate('governance.rule-types.FieldValue'),
2763
- value: 'FieldValue',
2764
- },
2765
- {
2766
- label: this.translocoService.translate('governance.rule-types.PhaseGateModuleRequired'),
2767
- value: 'PhaseGateModuleRequired',
2768
- },
2769
- {
2770
- label: this.translocoService.translate('governance.rule-types.NoActiveRequest'),
2771
- value: 'NoActiveRequest',
2772
- },
2773
- ];
2838
+ getRuleTypeLabel(ruleTypeKey) {
2839
+ return this.translocoService.translate(`governance.rule-types.${ruleTypeKey}`);
2774
2840
  }
2775
2841
  getRuleTypeChipClass(ruleTypeKey) {
2776
2842
  const classes = {
2777
2843
  ModuleExists: 'bg-blue-100 text-blue-700',
2844
+ ModuleNotExists: 'bg-red-100 text-red-700',
2778
2845
  ModuleDoesNotExist: 'bg-red-100 text-red-700',
2779
2846
  ModuleMaxCount: 'bg-amber-100 text-amber-700',
2780
2847
  ModuleMinCount: 'bg-orange-100 text-orange-700',
2781
2848
  FieldRequired: 'bg-purple-100 text-purple-700',
2782
2849
  FieldValue: 'bg-indigo-100 text-indigo-700',
2850
+ PropertyValueEquals: 'bg-indigo-100 text-indigo-700',
2851
+ PropertyHasValue: 'bg-cyan-100 text-cyan-700',
2852
+ PhaseGateCompleted: 'bg-emerald-100 text-emerald-700',
2783
2853
  PhaseGateModuleRequired: 'bg-green-100 text-green-700',
2854
+ PhaseGateMandatoryItemsCompleted: 'bg-teal-100 text-teal-700',
2784
2855
  NoActiveRequest: 'bg-rose-100 text-rose-700',
2785
2856
  };
2786
2857
  return classes[ruleTypeKey] ?? 'bg-slate-100 text-slate-700';
2787
2858
  }
2788
- getScopeIcon(scope) {
2789
- const icons = {
2790
- Level: 'general.layers-three-01',
2791
- Module: 'general.cube-01',
2792
- PhaseGate: 'general.flag-01',
2793
- };
2794
- return icons[scope] ?? 'general.file-02';
2859
+ getAppliesToLabel(rule) {
2860
+ if (this.isPhaseGateRule(rule)) {
2861
+ return this.translocoService.translate('governance.wizard.applies-to.phase-gate.label');
2862
+ }
2863
+ if (rule.targetScope === 'Level') {
2864
+ return this.translocoService.translate('governance.wizard.applies-to.level.label');
2865
+ }
2866
+ if (rule.targetModuleKey) {
2867
+ return this.translocoService.translate('governance.wizard.applies-to.specific-module.label');
2868
+ }
2869
+ return this.translocoService.translate('governance.wizard.applies-to.any-module.label');
2870
+ }
2871
+ getAppliesToIcon(rule) {
2872
+ if (this.isPhaseGateRule(rule)) {
2873
+ return 'general.flag-01';
2874
+ }
2875
+ if (rule.targetScope === 'Level') {
2876
+ return 'general.layers-three-01';
2877
+ }
2878
+ return 'general.cube-01';
2879
+ }
2880
+ getWhenLabel(rule) {
2881
+ if (this.isPhaseGateRule(rule)) {
2882
+ switch (rule.targetOperationKey) {
2883
+ case 'Update':
2884
+ return this.translocoService.translate('governance.wizard.actions.manage-phase-gate');
2885
+ case 'MovePhaseGate':
2886
+ return this.translocoService.translate('governance.wizard.actions.move-phase-gate');
2887
+ default:
2888
+ break;
2889
+ }
2890
+ }
2891
+ switch (rule.targetOperationKey) {
2892
+ case 'Create':
2893
+ return this.translocoService.translate('governance.create');
2894
+ case 'Update':
2895
+ return this.translocoService.translate('governance.update');
2896
+ case 'Delete':
2897
+ return this.translocoService.translate('governance.delete');
2898
+ case 'MovePhaseGate':
2899
+ return this.translocoService.translate('governance.wizard.actions.move-phase-gate');
2900
+ default:
2901
+ return (rule.targetOperationKey ||
2902
+ this.translocoService.translate('governance.all'));
2903
+ }
2904
+ }
2905
+ isPhaseGateRule(rule) {
2906
+ return (rule.targetScope === 'PhaseGate' ||
2907
+ String(rule.targetModuleKey ?? '').toLowerCase() === 'phasegate');
2908
+ }
2909
+ readRuleTypeKey(ruleType) {
2910
+ return String(ruleType.key ?? ruleType.type ?? '').trim();
2795
2911
  }
2796
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceRulesList, deps: [], target: i0.ɵɵFactoryTarget.Component });
2797
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: GovernanceRulesList, isStandalone: true, selector: "mt-governance-rules-list", viewQueries: [{ propertyName: "typeCol", first: true, predicate: ["typeCol"], descendants: true, isSignal: true }, { propertyName: "scopeCol", first: true, predicate: ["scopeCol"], descendants: true, isSignal: true }, { propertyName: "priorityCol", first: true, predicate: ["priorityCol"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'governance'\">\r\n <div class=\"space-y-4\">\r\n <!-- Rule Type Column Template -->\r\n <ng-template #typeCol let-row>\r\n <mt-chip\r\n [label]=\"row.ruleTypeKey\"\r\n [styleClass]=\"getRuleTypeChipClass(row.ruleTypeKey)\"\r\n />\r\n </ng-template>\r\n\r\n <!-- Scope Column Template -->\r\n <ng-template #scopeCol let-row>\r\n <div class=\"flex items-center gap-2\">\r\n <mt-icon\r\n class=\"text-lg\"\r\n [icon]=\"getScopeIcon(row.targetScope)\"\r\n ></mt-icon>\r\n <span>{{ row.targetScope }}</span>\r\n @if (row.targetModuleKey) {\r\n <span class=\"text-slate-500\">\u2192 {{ row.targetModuleKey }}</span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Priority Column Template -->\r\n <ng-template #priorityCol let-row>\r\n <div\r\n class=\"flex items-center justify-center w-8 h-8 rounded-full bg-slate-100 text-slate-700 font-semibold text-sm\"\r\n >\r\n {{ row.priority }}\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Table -->\r\n <mt-table\r\n [tabs]=\"tabs()\"\r\n [(activeTab)]=\"activeTab\"\r\n [data]=\"rules()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [generalSearch]=\"true\"\r\n [showFilters]=\"true\"\r\n [loading]=\"loading()\"\r\n (cellChange)=\"onCellChange($event)\"\r\n >\r\n </mt-table>\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "exportable", "exportFilename", "actionShape", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: Chip, selector: "mt-chip", inputs: ["label", "icon", "image", "removable", "removeIcon", "styleClass"], outputs: ["onRemove", "onImageError"] }] });
2912
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceRulesList, deps: [], target: i0.ɵɵFactoryTarget.Component });
2913
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: GovernanceRulesList, isStandalone: true, selector: "mt-governance-rules-list", viewQueries: [{ propertyName: "typeCol", first: true, predicate: ["typeCol"], descendants: true, isSignal: true }, { propertyName: "scopeCol", first: true, predicate: ["scopeCol"], descendants: true, isSignal: true }, { propertyName: "whenCol", first: true, predicate: ["whenCol"], descendants: true, isSignal: true }, { propertyName: "priorityCol", first: true, predicate: ["priorityCol"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'governance'\">\r\n <div class=\"space-y-4\">\r\n <ng-template #typeCol let-row>\r\n <mt-chip\r\n [label]=\"getRuleTypeLabel(row.ruleTypeKey)\"\r\n [styleClass]=\"getRuleTypeChipClass(row.ruleTypeKey)\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template #scopeCol let-row>\r\n <div class=\"flex items-center gap-2\">\r\n <mt-icon class=\"text-lg\" [icon]=\"getAppliesToIcon(row)\"></mt-icon>\r\n <span>{{ getAppliesToLabel(row) }}</span>\r\n @if (\r\n row.targetModuleKey &&\r\n getAppliesToLabel(row) !== t(\"wizard.applies-to.phase-gate.label\")\r\n ) {\r\n <span class=\"text-slate-500\">&rarr; {{ row.targetModuleKey }}</span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #whenCol let-row>\r\n <span>{{ getWhenLabel(row) }}</span>\r\n </ng-template>\r\n\r\n <ng-template #priorityCol let-row>\r\n <div\r\n class=\"flex items-center justify-center w-8 h-8 rounded-full bg-slate-100 text-slate-700 font-semibold text-sm\"\r\n >\r\n {{ row.priority }}\r\n </div>\r\n </ng-template>\r\n\r\n <mt-table\r\n [tabs]=\"tabs()\"\r\n [(activeTab)]=\"activeTab\"\r\n [data]=\"rules()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [generalSearch]=\"true\"\r\n [showFilters]=\"true\"\r\n [loading]=\"loading()\"\r\n storageKey=\"governance-rules-list-table\"\r\n (cellChange)=\"onCellChange($event)\"\r\n >\r\n </mt-table>\r\n </div>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "exportable", "exportFilename", "actionShape", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "component", type: Chip, selector: "mt-chip", inputs: ["label", "icon", "image", "removable", "removeIcon", "styleClass"], outputs: ["onRemove", "onImageError"] }] });
2798
2914
  }
2799
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceRulesList, decorators: [{
2915
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: GovernanceRulesList, decorators: [{
2800
2916
  type: Component,
2801
2917
  args: [{ selector: 'mt-governance-rules-list', standalone: true, imports: [
2802
2918
  CommonModule,
@@ -2805,8 +2921,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
2805
2921
  TranslocoDirective,
2806
2922
  Icon,
2807
2923
  Chip,
2808
- ], template: "<ng-container *transloco=\"let t; prefix: 'governance'\">\r\n <div class=\"space-y-4\">\r\n <!-- Rule Type Column Template -->\r\n <ng-template #typeCol let-row>\r\n <mt-chip\r\n [label]=\"row.ruleTypeKey\"\r\n [styleClass]=\"getRuleTypeChipClass(row.ruleTypeKey)\"\r\n />\r\n </ng-template>\r\n\r\n <!-- Scope Column Template -->\r\n <ng-template #scopeCol let-row>\r\n <div class=\"flex items-center gap-2\">\r\n <mt-icon\r\n class=\"text-lg\"\r\n [icon]=\"getScopeIcon(row.targetScope)\"\r\n ></mt-icon>\r\n <span>{{ row.targetScope }}</span>\r\n @if (row.targetModuleKey) {\r\n <span class=\"text-slate-500\">\u2192 {{ row.targetModuleKey }}</span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Priority Column Template -->\r\n <ng-template #priorityCol let-row>\r\n <div\r\n class=\"flex items-center justify-center w-8 h-8 rounded-full bg-slate-100 text-slate-700 font-semibold text-sm\"\r\n >\r\n {{ row.priority }}\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Table -->\r\n <mt-table\r\n [tabs]=\"tabs()\"\r\n [(activeTab)]=\"activeTab\"\r\n [data]=\"rules()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [generalSearch]=\"true\"\r\n [showFilters]=\"true\"\r\n [loading]=\"loading()\"\r\n (cellChange)=\"onCellChange($event)\"\r\n >\r\n </mt-table>\r\n </div>\r\n</ng-container>\r\n" }]
2809
- }], propDecorators: { typeCol: [{ type: i0.ViewChild, args: ['typeCol', { isSignal: true }] }], scopeCol: [{ type: i0.ViewChild, args: ['scopeCol', { isSignal: true }] }], priorityCol: [{ type: i0.ViewChild, args: ['priorityCol', { isSignal: true }] }] } });
2924
+ ], template: "<ng-container *transloco=\"let t; prefix: 'governance'\">\r\n <div class=\"space-y-4\">\r\n <ng-template #typeCol let-row>\r\n <mt-chip\r\n [label]=\"getRuleTypeLabel(row.ruleTypeKey)\"\r\n [styleClass]=\"getRuleTypeChipClass(row.ruleTypeKey)\"\r\n />\r\n </ng-template>\r\n\r\n <ng-template #scopeCol let-row>\r\n <div class=\"flex items-center gap-2\">\r\n <mt-icon class=\"text-lg\" [icon]=\"getAppliesToIcon(row)\"></mt-icon>\r\n <span>{{ getAppliesToLabel(row) }}</span>\r\n @if (\r\n row.targetModuleKey &&\r\n getAppliesToLabel(row) !== t(\"wizard.applies-to.phase-gate.label\")\r\n ) {\r\n <span class=\"text-slate-500\">&rarr; {{ row.targetModuleKey }}</span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <ng-template #whenCol let-row>\r\n <span>{{ getWhenLabel(row) }}</span>\r\n </ng-template>\r\n\r\n <ng-template #priorityCol let-row>\r\n <div\r\n class=\"flex items-center justify-center w-8 h-8 rounded-full bg-slate-100 text-slate-700 font-semibold text-sm\"\r\n >\r\n {{ row.priority }}\r\n </div>\r\n </ng-template>\r\n\r\n <mt-table\r\n [tabs]=\"tabs()\"\r\n [(activeTab)]=\"activeTab\"\r\n [data]=\"rules()\"\r\n [columns]=\"tableColumns()\"\r\n [actions]=\"tableActions()\"\r\n [rowActions]=\"rowActions()\"\r\n [generalSearch]=\"true\"\r\n [showFilters]=\"true\"\r\n [loading]=\"loading()\"\r\n storageKey=\"governance-rules-list-table\"\r\n (cellChange)=\"onCellChange($event)\"\r\n >\r\n </mt-table>\r\n </div>\r\n</ng-container>\r\n" }]
2925
+ }], propDecorators: { typeCol: [{ type: i0.ViewChild, args: ['typeCol', { isSignal: true }] }], scopeCol: [{ type: i0.ViewChild, args: ['scopeCol', { isSignal: true }] }], whenCol: [{ type: i0.ViewChild, args: ['whenCol', { isSignal: true }] }], priorityCol: [{ type: i0.ViewChild, args: ['priorityCol', { isSignal: true }] }] } });
2810
2926
 
2811
2927
  /**
2812
2928
  * Generated bundle index. Do not edit.