@praxisui/metadata-editor 9.0.0-beta.9 → 9.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/metadata-editor",
3
- "version": "9.0.0-beta.9",
3
+ "version": "9.0.0-rc.1",
4
4
  "description": "Metadata editor for Praxis UI fields and components with runtime integration.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
@@ -8,10 +8,10 @@
8
8
  "@angular/cdk": "^21.0.0",
9
9
  "@angular/forms": "^21.0.0",
10
10
  "@angular/material": "^21.0.0",
11
- "@praxisui/ai": "^9.0.0-beta.9",
12
- "@praxisui/core": "^9.0.0-beta.9",
13
- "@praxisui/dynamic-fields": "^9.0.0-beta.9",
14
- "@praxisui/settings-panel": "^9.0.0-beta.9",
11
+ "@praxisui/ai": "^9.0.0-rc.1",
12
+ "@praxisui/core": "^9.0.0-rc.1",
13
+ "@praxisui/dynamic-fields": "^9.0.0-rc.1",
14
+ "@praxisui/settings-panel": "^9.0.0-rc.1",
15
15
  "rxjs": "~7.8.0"
16
16
  },
17
17
  "dependencies": {
@@ -25,6 +25,7 @@
25
25
  "keywords": [
26
26
  "angular",
27
27
  "praxisui",
28
+ "praxis",
28
29
  "metadata",
29
30
  "editor",
30
31
  "runtime-config",
@@ -40,7 +41,10 @@
40
41
  ".": {
41
42
  "types": "./types/praxisui-metadata-editor.d.ts",
42
43
  "default": "./fesm2022/praxisui-metadata-editor.mjs"
44
+ },
45
+ "./ai/component-registry.json": {
46
+ "default": "./ai/component-registry.json"
43
47
  }
44
48
  },
45
49
  "type": "module"
46
- }
50
+ }
@@ -1,5 +1,5 @@
1
- import { ValidatorFn, FormBuilder, FormGroup, AbstractControl } from '@angular/forms';
2
- import { FieldControlType, FieldDefinition, FieldMetadata, IconPickerService, AiCapabilityCatalog, ComponentAuthoringManifest, ComponentDocMeta } from '@praxisui/core';
1
+ import { ValidatorFn, FormBuilder, FormGroup, AbstractControl, FormControl } from '@angular/forms';
2
+ import { FieldControlType, FieldDefinition, FieldMetadata, IconPickerService, PraxisI18nService, AiCapabilityCatalog, ComponentAuthoringManifest, ComponentDocMeta } from '@praxisui/core';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Type, OnChanges, SimpleChanges, OnInit, EventEmitter, Provider } from '@angular/core';
5
5
  import { MatDialog } from '@angular/material/dialog';
@@ -9,14 +9,19 @@ import { BehaviorSubject } from 'rxjs';
9
9
  interface EditorProperty {
10
10
  name: string;
11
11
  label: string;
12
+ labelKey?: string;
12
13
  editorType: 'text' | 'number' | 'textarea' | 'select' | 'checkbox' | string;
13
14
  defaultValue?: any;
14
15
  placeholder?: string;
16
+ placeholderKey?: string;
17
+ searchPlaceholderKey?: string;
15
18
  hint?: string;
19
+ hintKey?: string;
16
20
  required?: boolean;
17
21
  options?: Array<{
18
22
  value: any;
19
23
  text: string;
24
+ textKey?: string;
20
25
  }> | {
21
26
  type: 'static' | 'http' | 'fn';
22
27
  config?: any;
@@ -24,6 +29,7 @@ interface EditorProperty {
24
29
  validators?: ValidatorFn[];
25
30
  visibleWhen?: (formValue: any) => boolean;
26
31
  group?: string;
32
+ groupKey?: string;
27
33
  row?: string;
28
34
  inline?: boolean;
29
35
  order?: number;
@@ -88,6 +94,7 @@ declare class EditorComponentRegistryService {
88
94
  declare class DynamicEditorRendererComponent implements OnChanges {
89
95
  private dialog;
90
96
  private iconPicker;
97
+ private i18n?;
91
98
  properties: EditorProperty[];
92
99
  form: FormGroup;
93
100
  fields: FieldMetadata[];
@@ -100,15 +107,23 @@ declare class DynamicEditorRendererComponent implements OnChanges {
100
107
  private groupWeight;
101
108
  isInitiallyExpanded(_group: string): boolean;
102
109
  rowClass(row: FieldMetadata[]): string;
110
+ isPresentationRulesRow(row: FieldMetadata[]): boolean;
111
+ isPresentationChoiceRow(row: FieldMetadata[]): boolean;
112
+ canRenderPresentationRulesRow(row: FieldMetadata[]): boolean;
113
+ canRenderPresentationChoiceRow(row: FieldMetadata[]): boolean;
114
+ hasControlsForRow(row: FieldMetadata[]): boolean;
115
+ controlFor(path: string): FormControl;
103
116
  private mapEditorType;
104
117
  groupIcon(group: string): string;
105
- constructor(dialog: MatDialog, iconPicker: IconPickerService);
118
+ constructor(dialog: MatDialog, iconPicker: IconPickerService, i18n?: PraxisI18nService | undefined);
106
119
  isIconField(path: string): boolean;
107
120
  useHelpSuffix(field: FieldMetadata): boolean;
108
121
  private isSuffixCapable;
109
122
  openRegexHelp(): void;
110
123
  openIconPicker(path: string): Promise<void>;
111
- static ɵfac: i0.ɵɵFactoryDeclaration<DynamicEditorRendererComponent, never>;
124
+ private resolveEditorText;
125
+ private resolveOptions;
126
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicEditorRendererComponent, [null, null, { optional: true; }]>;
112
127
  static ɵcmp: i0.ɵɵComponentDeclaration<DynamicEditorRendererComponent, "praxis-dynamic-editor-renderer", never, { "properties": { "alias": "properties"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, {}, never, never, true, never>;
113
128
  }
114
129
 
@@ -154,6 +169,7 @@ declare class FieldMetadataEditorComponent implements OnInit {
154
169
  * Evita persistir strings cruas quando o componente espera arrays.
155
170
  */
156
171
  private normalizeKnownTextareaPatchValues;
172
+ private normalizePresentationPatchValues;
157
173
  private normalizeEntityLookupPatchValues;
158
174
  private normalizeStringListProperty;
159
175
  private normalizeJsonObjectProperty;
@@ -205,8 +221,10 @@ declare class CascadeRulesService {
205
221
  getFieldLabelMap(fields: Array<FieldDefinition | FieldMetadata>): Map<string, string>;
206
222
  hydrateRule(field: FieldDefinition | FieldMetadata): CascadeRuleViewModel | null;
207
223
  dehydratePatch(rule: CascadeRuleViewModel): Partial<FieldDefinition>;
224
+ clearPatch(): Partial<FieldDefinition>;
208
225
  /** Suggest a basic mapping dep->dep and a default valuePath */
209
226
  suggest(rule: CascadeRuleViewModel, inferredValueKey?: string): CascadeRuleViewModel;
227
+ private normalizeDependencyFields;
210
228
  static ɵfac: i0.ɵɵFactoryDeclaration<CascadeRulesService, never>;
211
229
  static ɵprov: i0.ɵɵInjectableDeclaration<CascadeRulesService>;
212
230
  }