@masterteam/governance 0.0.8 → 0.0.9

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.
@@ -822,6 +822,26 @@ function trimBilingualValue(value) {
822
822
  ar: value.ar.trim(),
823
823
  };
824
824
  }
825
+ function normalizeKeySegment(value) {
826
+ return value
827
+ .normalize('NFKD')
828
+ .replace(/[\u0300-\u036f]/g, '')
829
+ .toLowerCase()
830
+ .replace(/[^a-z0-9]+/g, '-')
831
+ .replace(/^-+|-+$/g, '');
832
+ }
833
+ function resolveRuleKey(currentKey, name, fallback) {
834
+ const existingKey = toNullableString(currentKey);
835
+ if (existingKey) {
836
+ return existingKey;
837
+ }
838
+ const nameKey = normalizeKeySegment(name.en);
839
+ if (nameKey) {
840
+ return nameKey;
841
+ }
842
+ const fallbackKey = normalizeKeySegment(String(fallback ?? ''));
843
+ return fallbackKey || 'governance-rule';
844
+ }
825
845
  function buildRecipeConfiguration(formValue) {
826
846
  switch (formValue.recipeKey) {
827
847
  case 'require-module': {
@@ -894,12 +914,13 @@ function buildCreatePayload(formValue, ruleType) {
894
914
  const name = trimBilingualValue(formValue.name);
895
915
  const description = trimBilingualValue(formValue.description);
896
916
  const errorMessage = trimBilingualValue(formValue.errorMessage);
917
+ const ruleTypeKey = readGovernanceRuleTypeKey(ruleType);
897
918
  return {
898
- key: formValue.key.trim(),
919
+ key: resolveRuleKey(formValue.key, name, ruleTypeKey),
899
920
  name,
900
921
  description: description.en || description.ar ? description : undefined,
901
922
  errorMessage,
902
- ruleType: readGovernanceRuleTypeKey(ruleType),
923
+ ruleType: ruleTypeKey,
903
924
  targetScope: mapAppliesToToTargetScope(formValue.appliesTo),
904
925
  targetModuleKey: formValue.appliesTo === 'specific-module'
905
926
  ? (toNullableString(formValue.selectedModuleKey) ?? undefined)
@@ -1032,12 +1053,13 @@ function packLegacyFormToCreateDto(formValue) {
1032
1053
  const name = trimBilingualValue(formValue.name);
1033
1054
  const description = trimBilingualValue(formValue.description);
1034
1055
  const errorMessage = trimBilingualValue(formValue.errorMessage);
1056
+ const ruleType = String(formValue.ruleType ?? '');
1035
1057
  return {
1036
- key: String(formValue.key ?? '').trim(),
1058
+ key: resolveRuleKey(formValue.key, name, ruleType),
1037
1059
  name,
1038
1060
  description: description.en || description.ar ? description : undefined,
1039
1061
  errorMessage,
1040
- ruleType: String(formValue.ruleType ?? ''),
1062
+ ruleType,
1041
1063
  targetScope: String(formValue.targetScope ?? ''),
1042
1064
  targetModuleKey: String(formValue.targetModuleKey ?? '') || undefined,
1043
1065
  targetOperationKey: String(formValue.targetOperationKey ?? '') || undefined,
@@ -1085,24 +1107,13 @@ function buildWizardFormConfig({ translate, isEdit, recipeKey, appliesToOptions,
1085
1107
  label: translate('basic-information'),
1086
1108
  order: 1,
1087
1109
  fields: [
1088
- new TextFieldConfig({
1089
- key: 'key',
1090
- label: translate('rule-key'),
1091
- validators: [
1092
- ValidatorConfig.required(translate('wizard.required-message')),
1093
- ValidatorConfig.pattern('^[a-z0-9-]+$', translate('wizard.key-pattern-message')),
1094
- ],
1095
- readonly: isEdit,
1096
- order: 1,
1097
- colSpan: 12,
1098
- }),
1099
1110
  new TextFieldConfig({
1100
1111
  key: 'name.en',
1101
1112
  label: translate('name-en'),
1102
1113
  validators: [
1103
1114
  ValidatorConfig.required(translate('wizard.required-message')),
1104
1115
  ],
1105
- order: 2,
1116
+ order: 1,
1106
1117
  colSpan: 6,
1107
1118
  }),
1108
1119
  new TextFieldConfig({
@@ -1111,21 +1122,21 @@ function buildWizardFormConfig({ translate, isEdit, recipeKey, appliesToOptions,
1111
1122
  validators: [
1112
1123
  ValidatorConfig.required(translate('wizard.required-message')),
1113
1124
  ],
1114
- order: 3,
1125
+ order: 2,
1115
1126
  colSpan: 6,
1116
1127
  }),
1117
1128
  new TextareaFieldConfig({
1118
1129
  key: 'description.en',
1119
1130
  label: translate('description-en'),
1120
1131
  rows: 3,
1121
- order: 4,
1132
+ order: 3,
1122
1133
  colSpan: 6,
1123
1134
  }),
1124
1135
  new TextareaFieldConfig({
1125
1136
  key: 'description.ar',
1126
1137
  label: translate('description-ar'),
1127
1138
  rows: 3,
1128
- order: 5,
1139
+ order: 4,
1129
1140
  colSpan: 6,
1130
1141
  }),
1131
1142
  new TextareaFieldConfig({
@@ -1135,7 +1146,7 @@ function buildWizardFormConfig({ translate, isEdit, recipeKey, appliesToOptions,
1135
1146
  ValidatorConfig.required(translate('wizard.required-message')),
1136
1147
  ],
1137
1148
  rows: 3,
1138
- order: 6,
1149
+ order: 5,
1139
1150
  colSpan: 6,
1140
1151
  }),
1141
1152
  new TextareaFieldConfig({
@@ -1145,7 +1156,7 @@ function buildWizardFormConfig({ translate, isEdit, recipeKey, appliesToOptions,
1145
1156
  ValidatorConfig.required(translate('wizard.required-message')),
1146
1157
  ],
1147
1158
  rows: 3,
1148
- order: 7,
1159
+ order: 6,
1149
1160
  colSpan: 6,
1150
1161
  }),
1151
1162
  ],
@@ -1503,18 +1514,6 @@ function buildLegacyFormConfig({ translate, isEdit, langCode, selectedRuleType,
1503
1514
  label: translate('basic-information'),
1504
1515
  order: 1,
1505
1516
  fields: [
1506
- new TextFieldConfig({
1507
- key: 'key',
1508
- label: translate('rule-key'),
1509
- placeholder: translate('wizard.rule-key-placeholder'),
1510
- validators: [
1511
- ValidatorConfig.required(),
1512
- ValidatorConfig.pattern('^[a-z0-9-]+$', translate('wizard.key-pattern-message')),
1513
- ],
1514
- order: 1,
1515
- colSpan: 12,
1516
- readonly: isEdit,
1517
- }),
1518
1517
  new NumberFieldConfig({
1519
1518
  key: 'priority',
1520
1519
  label: translate('priority'),
@@ -1522,7 +1521,7 @@ function buildLegacyFormConfig({ translate, isEdit, langCode, selectedRuleType,
1522
1521
  validators: [ValidatorConfig.required(), ValidatorConfig.min(0)],
1523
1522
  min: 0,
1524
1523
  max: 1000,
1525
- order: 2,
1524
+ order: 1,
1526
1525
  colSpan: 6,
1527
1526
  }),
1528
1527
  new TextFieldConfig({
@@ -1530,7 +1529,7 @@ function buildLegacyFormConfig({ translate, isEdit, langCode, selectedRuleType,
1530
1529
  label: translate('name-en'),
1531
1530
  placeholder: translate('name-en-placeholder'),
1532
1531
  validators: [ValidatorConfig.required()],
1533
- order: 3,
1532
+ order: 2,
1534
1533
  colSpan: 6,
1535
1534
  }),
1536
1535
  new TextFieldConfig({
@@ -1538,21 +1537,21 @@ function buildLegacyFormConfig({ translate, isEdit, langCode, selectedRuleType,
1538
1537
  label: translate('name-ar'),
1539
1538
  placeholder: translate('name-ar-placeholder'),
1540
1539
  validators: [ValidatorConfig.required()],
1541
- order: 4,
1540
+ order: 3,
1542
1541
  colSpan: 6,
1543
1542
  }),
1544
1543
  new TextareaFieldConfig({
1545
1544
  key: 'description.en',
1546
1545
  label: translate('description-en'),
1547
1546
  placeholder: translate('description-en-placeholder'),
1548
- order: 5,
1547
+ order: 4,
1549
1548
  colSpan: 6,
1550
1549
  }),
1551
1550
  new TextareaFieldConfig({
1552
1551
  key: 'description.ar',
1553
1552
  label: translate('description-ar'),
1554
1553
  placeholder: translate('description-ar-placeholder'),
1555
- order: 6,
1554
+ order: 5,
1556
1555
  colSpan: 6,
1557
1556
  }),
1558
1557
  new TextareaFieldConfig({
@@ -1560,7 +1559,7 @@ function buildLegacyFormConfig({ translate, isEdit, langCode, selectedRuleType,
1560
1559
  label: translate('error-message-en'),
1561
1560
  placeholder: translate('error-message-en-placeholder'),
1562
1561
  validators: [ValidatorConfig.required()],
1563
- order: 7,
1562
+ order: 6,
1564
1563
  colSpan: 6,
1565
1564
  }),
1566
1565
  new TextareaFieldConfig({
@@ -1568,7 +1567,7 @@ function buildLegacyFormConfig({ translate, isEdit, langCode, selectedRuleType,
1568
1567
  label: translate('error-message-ar'),
1569
1568
  placeholder: translate('error-message-ar-placeholder'),
1570
1569
  validators: [ValidatorConfig.required()],
1571
- order: 8,
1570
+ order: 7,
1572
1571
  colSpan: 6,
1573
1572
  }),
1574
1573
  ],
@@ -2499,7 +2498,7 @@ class GovernanceRuleForm {
2499
2498
  }));
2500
2499
  }
2501
2500
  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'\">\n <div\n [class]=\"\n 'governance-rule-form-content flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4 sm:p-5 ' +\n modal.contentClass\n \"\n >\n @if (isInitializing()) {\n <div class=\"space-y-4\">\n <p-skeleton height=\"4rem\" />\n <p-skeleton height=\"12rem\" />\n <p-skeleton height=\"12rem\" />\n </div>\n } @else if (useLegacyEditor()) {\n <section class=\"rounded-2xl border border-amber-200 bg-amber-50/70 p-4\">\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\n {{ t(\"wizard.legacy-title\") }}\n </p>\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\n {{ t(\"wizard.legacy-description\") }}\n </p>\n </section>\n\n <mt-dynamic-form\n [formConfig]=\"legacyFormConfig()\"\n [formControl]=\"legacyFormControl\"\n />\n } @else {\n @if (noRecipesAvailable()) {\n <section\n class=\"rounded-2xl border border-orange-200 bg-orange-50/80 p-4\"\n >\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\n {{ t(\"wizard.no-recipes-title\") }}\n </p>\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\n {{ t(\"wizard.no-recipes-description\") }}\n </p>\n </section>\n }\n\n <mt-dynamic-form\n [formConfig]=\"wizardFormConfig()\"\n [formControl]=\"wizardFormControl\"\n />\n\n @if (hasReviewSummary()) {\n <section class=\"rounded-2xl border border-slate-900 bg-slate-900 p-4\">\n <p\n class=\"m-0 text-xs font-semibold uppercase tracking-[0.18em] text-white/70\"\n >\n {{ t(\"wizard.summary-title\") }}\n </p>\n <p class=\"mt-2 mb-0 text-sm leading-6 text-white\">\n {{ reviewSummary() }}\n </p>\n </section>\n }\n }\n </div>\n\n <div\n [class]=\"\n 'governance-rule-form-footer ' +\n modal.footerClass +\n ' flex-col gap-2 sm:flex-row sm:items-center sm:justify-end'\n \"\n >\n <mt-button\n variant=\"outlined\"\n [label]=\"'cancel' | transloco\"\n (click)=\"ref.close()\"\n styleClass=\"w-full sm:w-auto\"\n />\n\n <mt-button\n [label]=\"ruleForEdit() ? t('update') : t('create')\"\n [loading]=\"isAddingRule() || isUpdatingRule()\"\n [disabled]=\"isAddingRule() || isUpdatingRule()\"\n (click)=\"onSubmit()\"\n styleClass=\"w-full sm:w-auto\"\n />\n </div>\n</ng-container>\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: "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 });
2501
+ 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\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=\"rounded-2xl border border-slate-900 bg-slate-900 p-4\">\r\n <p\r\n class=\"m-0 text-xs font-semibold uppercase tracking-[0.18em] text-white/70\"\r\n >\r\n {{ t(\"wizard.summary-title\") }}\r\n </p>\r\n <p class=\"mt-2 mb-0 text-sm leading-6 text-white\">\r\n {{ reviewSummary() }}\r\n </p>\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\n severity=\"secondary\"\n [label]=\"'cancel' | transloco\"\n (click)=\"ref.close()\"\n styleClass=\"w-full sm:w-auto\"\n />\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: "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
2502
  }
2504
2503
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImport: i0, type: GovernanceRuleForm, decorators: [{
2505
2504
  type: Component,
@@ -2513,7 +2512,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
2513
2512
  TranslocoPipe,
2514
2513
  ], host: {
2515
2514
  class: 'block h-full',
2516
- }, template: "<ng-container *transloco=\"let t; prefix: 'governance'\">\n <div\n [class]=\"\n 'governance-rule-form-content flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4 sm:p-5 ' +\n modal.contentClass\n \"\n >\n @if (isInitializing()) {\n <div class=\"space-y-4\">\n <p-skeleton height=\"4rem\" />\n <p-skeleton height=\"12rem\" />\n <p-skeleton height=\"12rem\" />\n </div>\n } @else if (useLegacyEditor()) {\n <section class=\"rounded-2xl border border-amber-200 bg-amber-50/70 p-4\">\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\n {{ t(\"wizard.legacy-title\") }}\n </p>\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\n {{ t(\"wizard.legacy-description\") }}\n </p>\n </section>\n\n <mt-dynamic-form\n [formConfig]=\"legacyFormConfig()\"\n [formControl]=\"legacyFormControl\"\n />\n } @else {\n @if (noRecipesAvailable()) {\n <section\n class=\"rounded-2xl border border-orange-200 bg-orange-50/80 p-4\"\n >\n <p class=\"m-0 text-sm font-semibold text-slate-900\">\n {{ t(\"wizard.no-recipes-title\") }}\n </p>\n <p class=\"mt-1 mb-0 text-sm leading-6 text-slate-600\">\n {{ t(\"wizard.no-recipes-description\") }}\n </p>\n </section>\n }\n\n <mt-dynamic-form\n [formConfig]=\"wizardFormConfig()\"\n [formControl]=\"wizardFormControl\"\n />\n\n @if (hasReviewSummary()) {\n <section class=\"rounded-2xl border border-slate-900 bg-slate-900 p-4\">\n <p\n class=\"m-0 text-xs font-semibold uppercase tracking-[0.18em] text-white/70\"\n >\n {{ t(\"wizard.summary-title\") }}\n </p>\n <p class=\"mt-2 mb-0 text-sm leading-6 text-white\">\n {{ reviewSummary() }}\n </p>\n </section>\n }\n }\n </div>\n\n <div\n [class]=\"\n 'governance-rule-form-footer ' +\n modal.footerClass +\n ' flex-col gap-2 sm:flex-row sm:items-center sm:justify-end'\n \"\n >\n <mt-button\n variant=\"outlined\"\n [label]=\"'cancel' | transloco\"\n (click)=\"ref.close()\"\n styleClass=\"w-full sm:w-auto\"\n />\n\n <mt-button\n [label]=\"ruleForEdit() ? t('update') : t('create')\"\n [loading]=\"isAddingRule() || isUpdatingRule()\"\n [disabled]=\"isAddingRule() || isUpdatingRule()\"\n (click)=\"onSubmit()\"\n styleClass=\"w-full sm:w-auto\"\n />\n </div>\n</ng-container>\n", styles: [":host{display:block;min-height:100%}\n"] }]
2515
+ }, 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\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=\"rounded-2xl border border-slate-900 bg-slate-900 p-4\">\r\n <p\r\n class=\"m-0 text-xs font-semibold uppercase tracking-[0.18em] text-white/70\"\r\n >\r\n {{ t(\"wizard.summary-title\") }}\r\n </p>\r\n <p class=\"mt-2 mb-0 text-sm leading-6 text-white\">\r\n {{ reviewSummary() }}\r\n </p>\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\n severity=\"secondary\"\n [label]=\"'cancel' | transloco\"\n (click)=\"ref.close()\"\n styleClass=\"w-full sm:w-auto\"\n />\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"] }]
2517
2516
  }], ctorParameters: () => [], propDecorators: { ruleForEdit: [{ type: i0.Input, args: [{ isSignal: true, alias: "ruleForEdit", required: false }] }], dynamicFormRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DynamicForm), { isSignal: true }] }] } });
2518
2517
 
2519
2518
  class GovernanceRulesList {