@praxisui/metadata-editor 1.0.0-beta.7 → 2.0.0-beta.0

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ValidatorFn, FormBuilder, FormGroup, AbstractControl } from '@angular/forms';
2
- import { FieldControlType, FieldDefinition, FieldMetadata, IconPickerService } from '@praxisui/core';
2
+ import { FieldControlType, FieldDefinition, FieldMetadata, IconPickerService, AiCapabilityCatalog } from '@praxisui/core';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Type, OnChanges, SimpleChanges, OnInit, EventEmitter } from '@angular/core';
5
5
  import { MatDialog } from '@angular/material/dialog';
@@ -104,6 +104,8 @@ declare class DynamicEditorRendererComponent implements OnChanges {
104
104
  groupIcon(group: string): string;
105
105
  constructor(dialog: MatDialog, iconPicker: IconPickerService);
106
106
  isIconField(path: string): boolean;
107
+ useHelpSuffix(field: FieldMetadata): boolean;
108
+ private isSuffixCapable;
107
109
  openRegexHelp(): void;
108
110
  openIconPicker(path: string): Promise<void>;
109
111
  static ɵfac: i0.ɵɵFactoryDeclaration<DynamicEditorRendererComponent, never>;
@@ -130,17 +132,39 @@ declare class FieldMetadataEditorComponent implements OnInit {
130
132
  isDirty$: BehaviorSubject<boolean>;
131
133
  isValid$: BehaviorSubject<boolean>;
132
134
  isBusy$: BehaviorSubject<boolean>;
135
+ private readonly destroyRef;
136
+ private lastCurrencyPreset;
133
137
  constructor(registry: ConfigRegistryService, normalizer: SchemaNormalizerService, factory: DynamicFormFactoryService, ctxValidators: ContextValidatorRegistryService);
134
138
  ngOnInit(): void;
135
139
  private rebuildEditorForType;
140
+ private setupCurrencyPresetSync;
136
141
  apply(): void;
137
142
  onSave(): Partial<FieldDefinition> | undefined;
138
143
  getSettingsValue(): Partial<FieldDefinition>;
139
144
  /**
140
145
  * Constrói um patch delta a partir do valor atual do form, removendo
141
- * chaves não alteradas e valores nulos/strings vazias (exceto boolean/zero).
146
+ * chaves não alteradas.
147
+ * Semântica de patch: `null` representa remoção da propriedade (JSON Merge Patch).
142
148
  */
143
149
  private buildDeltaPatch;
150
+ /**
151
+ * Converte campos de textarea conhecidos para o tipo esperado em runtime.
152
+ * Evita persistir strings cruas quando o componente espera arrays.
153
+ */
154
+ private normalizeKnownTextareaPatchValues;
155
+ /**
156
+ * Interpreta textarea como lista simples de strings:
157
+ * - JSON array de strings
158
+ * - fallback linha a linha (um valor por linha)
159
+ */
160
+ private parseStringListTextarea;
161
+ /**
162
+ * Interpreta textarea como array:
163
+ * - JSON array (preferencial)
164
+ * - fallback linha a linha para array de strings
165
+ */
166
+ private parseArrayTextarea;
167
+ private tryParseJson;
144
168
  reset(): void;
145
169
  onControlTypeChange(next: FieldControlType): void;
146
170
  onControlTypeChangeEvent(event: Event): void;
@@ -184,7 +208,7 @@ declare class CascadeManagerTabComponent implements OnChanges {
184
208
  private readonly rules;
185
209
  private readonly selectedFieldSig;
186
210
  readonly editing: i0.WritableSignal<boolean>;
187
- editDepCsv: string;
211
+ editDepList: string[];
188
212
  editEnable: boolean;
189
213
  editReset: boolean;
190
214
  editMerge: 'merge' | 'replace';
@@ -202,6 +226,7 @@ declare class CascadeManagerTabComponent implements OnChanges {
202
226
  constructor(svc: CascadeRulesService);
203
227
  ngOnInit(): void;
204
228
  ngOnChanges(changes: SimpleChanges): void;
229
+ private _logCount;
205
230
  filteredFields(): Array<FieldDefinition | FieldMetadata>;
206
231
  labelFor(name: string): string;
207
232
  selectedField(): string | null;
@@ -229,9 +254,34 @@ declare class CascadeManagerTabComponent implements OnChanges {
229
254
  buildValuePathOverrides(deps: string[]): string | Record<string, string>;
230
255
  buildPreview(): string;
231
256
  copyPreview(): void;
257
+ availableDependencyFields(): Array<FieldDefinition | FieldMetadata>;
258
+ onDepListChange(): void;
259
+ getKeySuggestions(dep: string): string[];
260
+ getValuePathSuggestions(dep: string): string[];
232
261
  static ɵfac: i0.ɵɵFactoryDeclaration<CascadeManagerTabComponent, never>;
233
262
  static ɵcmp: i0.ɵɵComponentDeclaration<CascadeManagerTabComponent, "praxis-cascade-manager-tab", never, { "fields": { "alias": "fields"; "required": false; }; "connections": { "alias": "connections"; "required": false; }; }, { "apply": "apply"; "cancel": "cancel"; }, never, never, true, never>;
234
263
  }
235
264
 
236
- export { CascadeManagerTabComponent, CascadeRulesService, ConfigRegistryService, ContextValidatorRegistryService, DynamicEditorRendererComponent, DynamicFormFactoryService, EditorComponentRegistryService, FieldMetadataEditorComponent, SchemaNormalizerService };
265
+ /**
266
+ * Catálogo inicial de capacidades do editor de metadados (praxis-metadata-editor) para uso pela IA.
267
+ * Estrutura básica com Alvo e propriedades placeholder; expandir conforme implementação evoluir.
268
+ */
269
+
270
+ interface AiComponentProperty {
271
+ name: string;
272
+ type: string;
273
+ description: string;
274
+ intentExamples?: string[];
275
+ safetyNotes?: string;
276
+ }
277
+ interface AiComponentCapabilities {
278
+ componentId: string;
279
+ description: string;
280
+ targets: string[];
281
+ properties: AiComponentProperty[];
282
+ }
283
+ declare const METADATA_EDITOR_AI_CAPABILITIES: AiComponentCapabilities;
284
+ declare const METADATA_EDITOR_AI_CAPABILITY_CATALOG: AiCapabilityCatalog;
285
+
286
+ export { CascadeManagerTabComponent, CascadeRulesService, ConfigRegistryService, ContextValidatorRegistryService, DynamicEditorRendererComponent, DynamicFormFactoryService, EditorComponentRegistryService, FieldMetadataEditorComponent, METADATA_EDITOR_AI_CAPABILITIES, METADATA_EDITOR_AI_CAPABILITY_CATALOG, SchemaNormalizerService };
237
287
  export type { CascadeRuleViewModel, ConfigMap, EditorProperty };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/metadata-editor",
3
- "version": "1.0.0-beta.7",
3
+ "version": "2.0.0-beta.0",
4
4
  "description": "Metadata editor for Praxis UI fields and components with runtime integration.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.0.0",
@@ -15,18 +15,19 @@
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "https://github.com/codexrodrigues/praxis"
18
+ "url": "https://github.com/codexrodrigues/praxis-ui-angular"
19
19
  },
20
- "homepage": "https://github.com/codexrodrigues/praxis#readme",
20
+ "homepage": "https://praxisui.dev",
21
21
  "bugs": {
22
- "url": "https://github.com/codexrodrigues/praxis/issues"
22
+ "url": "https://github.com/codexrodrigues/praxis-ui-angular/issues"
23
23
  },
24
24
  "keywords": [
25
25
  "angular",
26
26
  "praxisui",
27
27
  "metadata",
28
28
  "editor",
29
- "ui"
29
+ "runtime-config",
30
+ "forms"
30
31
  ],
31
32
  "sideEffects": false,
32
33
  "module": "fesm2022/praxisui-metadata-editor.mjs",