@praxisui/crud 8.0.0-beta.17 → 8.0.0-beta.18

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.
@@ -5290,6 +5290,12 @@ const CRUD_AI_CAPABILITIES = {
5290
5290
  { path: 'resource.path', category: 'resource', valueKind: 'string', description: 'Endpoint base do recurso.' },
5291
5291
  { path: 'resource.idField', category: 'resource', valueKind: 'string', description: 'Campo identificador do recurso.' },
5292
5292
  { path: 'resource.endpointKey', category: 'resource', valueKind: 'string', description: 'Chave de endpoint (ApiEndpoint).' },
5293
+ { path: 'queryContext.meta.domainCatalog', category: 'resource', valueKind: 'object', description: 'Referencia leve para contexto semantico/governanca resolvido via Domain Catalog; nao materializa regras em FormConfig.' },
5294
+ { path: 'queryContext.meta.domainCatalog.schemaVersion', category: 'resource', valueKind: 'string', description: 'Versao do contrato DomainCatalogContextHint usado em runtime e prompts.' },
5295
+ { path: 'queryContext.meta.domainCatalog.resourceKey', category: 'resource', valueKind: 'string', description: 'ResourceKey semantico estavel usado para resolver vocabulario/governanca de dominio.' },
5296
+ { path: 'queryContext.meta.domainCatalog.releaseId', category: 'resource', valueKind: 'string', description: 'Release opcional do Domain Catalog usada como fonte do contexto.' },
5297
+ { path: 'queryContext.meta.domainCatalog.query', category: 'resource', valueKind: 'string', description: 'Probe de campo/conceito usado para buscar itens relevantes, como cpf, salario ou status.' },
5298
+ { path: 'queryContext.meta.domainCatalog.intent', category: 'resource', valueKind: 'enum', allowedValues: ['authoring', 'explain', 'validate', 'ai-access-control'], description: 'Intencao de uso do contexto para orientar LLMs e validadores sem expor dados alem do necessario.' },
5293
5299
  // --- Table / Form ---
5294
5300
  { path: 'table', category: 'table', valueKind: 'object', description: 'TableConfig completo (usar catalogo de tabela).' },
5295
5301
  { path: 'form', category: 'form', valueKind: 'object', description: 'FormConfig completo (usar catalogo de formulario).' },
@@ -5450,6 +5456,20 @@ const permissionsSchema = {
5450
5456
  denyWhenMissingCapability: { type: 'boolean' },
5451
5457
  },
5452
5458
  };
5459
+ const domainGovernanceContextSchema = {
5460
+ type: 'object',
5461
+ required: ['resourceKey', 'query'],
5462
+ properties: {
5463
+ resourceKey: { type: 'string' },
5464
+ releaseId: { type: 'string' },
5465
+ query: { type: 'string' },
5466
+ itemTypes: {
5467
+ type: 'array',
5468
+ items: { enum: ['governance', 'vocabulary', 'relationship'] },
5469
+ },
5470
+ intent: { enum: ['authoring', 'explain', 'validate', 'ai-access-control'] },
5471
+ },
5472
+ };
5453
5473
  const childDelegateSchema = {
5454
5474
  type: 'object',
5455
5475
  required: ['childComponentId', 'childOperationId', 'reason'],
@@ -5486,6 +5506,7 @@ const PRAXIS_CRUD_AUTHORING_MANIFEST = {
5486
5506
  { kind: 'dialogHost', resolver: 'crud-dialog-host-defaults', description: 'Route/modal/drawer defaults consumed by CrudLauncherService and DynamicFormDialogHostComponent.' },
5487
5507
  { kind: 'formBinding', resolver: 'crud-action-form-contract-by-action-id', description: 'CRUD-owned form binding fields: formId, schemaUrl, submitUrl, submitMethod, params and initialValue.' },
5488
5508
  { kind: 'permissions', resolver: 'crud-resource-capabilities', description: 'CRUD action availability derived from resource capabilities and action permissions.' },
5509
+ { kind: 'domainGovernanceContext', resolver: 'domain-catalog-context-by-resource-key', description: 'Read-only semantic/governance context resolved from Domain Catalog and referenced from CRUD queryContext.meta.' },
5489
5510
  { kind: 'childOperation', resolver: 'child-authoring-manifest-operation', description: 'Delegated form/table/dialog/settings-panel operation owned by the child component manifest.' },
5490
5511
  ],
5491
5512
  operations: [
@@ -5509,6 +5530,26 @@ const PRAXIS_CRUD_AUTHORING_MANIFEST = {
5509
5530
  submissionImpact: 'affects-remote-binding',
5510
5531
  preconditions: ['crud-metadata-loaded', 'api-metadata-available'],
5511
5532
  },
5533
+ {
5534
+ operationId: 'domain.governanceContext.attach',
5535
+ title: 'Attach Domain Catalog governance context',
5536
+ scope: 'dataBinding',
5537
+ targetKind: 'domainGovernanceContext',
5538
+ target: { kind: 'domainGovernanceContext', resolver: 'domain-catalog-context-by-resource-key', ambiguityPolicy: 'fail', required: true },
5539
+ inputSchema: domainGovernanceContextSchema,
5540
+ effects: [{ kind: 'compile-domain-patch', handler: 'crud-domain-governance-context-attach', handlerContract: {
5541
+ reads: ['CrudMetadata.resource', 'CrudMetadata.queryContext', 'DomainCatalogService.getGovernanceContext', 'DOMAIN_CATALOG_COMPONENT_CONTEXT_PACK', 'api_metadata'],
5542
+ writes: ['CrudMetadata.queryContext.meta.domainCatalog'],
5543
+ identityKeys: ['resourceKey', 'releaseId', 'query'],
5544
+ inputSchema: domainGovernanceContextSchema,
5545
+ failureModes: ['resource-key-missing', 'domain-catalog-release-not-found', 'governance-context-empty', 'ai-usage-forbidden'],
5546
+ description: 'Resolves read-only domain vocabulary/governance context and stores only a lightweight reference/probe under queryContext.meta.domainCatalog.',
5547
+ } }],
5548
+ validators: ['resource-key-stable', 'domain-catalog-context-resolvable', 'domain-catalog-read-only', 'ai-usage-visibility-respected', 'no-form-config-rule-materialization'],
5549
+ affectedPaths: ['queryContext.meta.domainCatalog'],
5550
+ submissionImpact: 'config-only',
5551
+ preconditions: ['crud-metadata-loaded', 'api-metadata-available', 'domain-catalog-service-available'],
5552
+ },
5512
5553
  {
5513
5554
  operationId: 'list.surface.configure',
5514
5555
  title: 'Configure CRUD list surface',
@@ -5678,6 +5719,10 @@ const PRAXIS_CRUD_AUTHORING_MANIFEST = {
5678
5719
  { validatorId: 'resource-key-stable', level: 'error', code: 'CRUD_RESOURCE_KEY_STABLE', description: 'Resource key must remain stable for surfaces/actions/capabilities.' },
5679
5720
  { validatorId: 'id-field-known', level: 'error', code: 'CRUD_ID_FIELD_KNOWN', description: 'CRUD id field must exist for edit/view/delete flows.' },
5680
5721
  { validatorId: 'resource-capabilities-resolvable', level: 'error', code: 'CRUD_CAPABILITIES_RESOLVABLE', description: 'Resource capabilities must be resolvable before action enablement is authored.' },
5722
+ { validatorId: 'domain-catalog-context-resolvable', level: 'error', code: 'CRUD_DOMAIN_CATALOG_CONTEXT_RESOLVABLE', description: 'Domain Catalog governance context must resolve for the resource key and requested probe before authoring uses it.' },
5723
+ { validatorId: 'domain-catalog-read-only', level: 'error', code: 'CRUD_DOMAIN_CATALOG_READ_ONLY', description: 'Domain Catalog is read-only semantic context; CRUD may reference a probe but must not persist copied catalog rules.' },
5724
+ { validatorId: 'ai-usage-visibility-respected', level: 'error', code: 'CRUD_AI_USAGE_VISIBILITY_RESPECTED', description: 'Authoring must respect Domain Catalog aiUsage.visibility before exposing field data, prompts or generated patches.' },
5725
+ { validatorId: 'no-form-config-rule-materialization', level: 'error', code: 'CRUD_NO_FORM_RULE_MATERIALIZATION', description: 'Shared domain governance must not be materialized into FormConfig rules unless a backend policy explicitly authorizes it.' },
5681
5726
  { validatorId: 'table-child-operation-delegated', level: 'error', code: 'CRUD_TABLE_CHILD_DELEGATED', description: 'Table semantics must be delegated to praxis-table.' },
5682
5727
  { validatorId: 'query-context-valid', level: 'error', code: 'CRUD_QUERY_CONTEXT_VALID', description: 'Query context must be valid for the bound resource.' },
5683
5728
  { validatorId: 'filter-criteria-bridge-valid', level: 'warning', code: 'CRUD_FILTER_CRITERIA_BRIDGE_VALID', description: 'filterCriteria is a bridge; prefer queryContext for new remote authoring.' },
@@ -5714,6 +5759,7 @@ const PRAXIS_CRUD_AUTHORING_MANIFEST = {
5714
5759
  'CrudMetadata is the canonical CRUD document shape.',
5715
5760
  'CrudAuthoringDocument wraps CrudMetadata without introducing host-local aliases.',
5716
5761
  'Resource path and resource key have separate semantics: path is operational, key is discovery/capability identity.',
5762
+ 'Domain Catalog context is referenced through resourceKey/release/probe and stays read-only; CRUD may attach queryContext.meta.domainCatalog but must not copy shared governance rules into FormConfig.',
5717
5763
  'Open mode round-trip must preserve route, formId, form contract, params, initialValue and back policy.',
5718
5764
  'FormConfig and FieldMetadata edits must delegate to dynamic-form or metadata-editor manifests.',
5719
5765
  'TableConfig edits must delegate to praxis-table; CRUD owns only shell orchestration and list surface binding.',
@@ -5722,6 +5768,7 @@ const PRAXIS_CRUD_AUTHORING_MANIFEST = {
5722
5768
  ],
5723
5769
  examples: [
5724
5770
  { id: 'crud-bind-funcionarios-resource', request: 'Bind this CRUD to funcionarios using id as the identifier.', operationId: 'resource.bind', target: 'resource:funcionarios', params: { resourcePath: '/funcionarios', resourceKey: 'funcionarios', idField: 'id' }, isPositive: true },
5771
+ { id: 'crud-attach-lgpd-cpf-context', request: 'Use the Domain Catalog LGPD context for cpf before changing the employee CRUD.', operationId: 'domain.governanceContext.attach', target: 'domainCatalog:human-resources.funcionarios:cpf', params: { resourceKey: 'human-resources.funcionarios', query: 'cpf', itemTypes: ['governance'], intent: 'authoring' }, isPositive: true },
5725
5772
  { id: 'crud-list-query-context', request: 'Filter the list by active employees using the canonical query context.', operationId: 'list.surface.configure', target: 'listSurface', params: { queryContext: { filters: [{ field: 'active', operator: 'eq', value: true }] } }, isPositive: true },
5726
5773
  { id: 'crud-create-modal', request: 'Open create in a modal with the employee form.', operationId: 'surface.create.configure', target: 'action:create', params: { actionId: 'create', openMode: 'modal', formId: 'employee-create' }, isPositive: true },
5727
5774
  { id: 'crud-edit-route-with-id', request: 'Edit should navigate to /employees/:id and map the row id.', operationId: 'surface.edit.configure', target: 'action:edit', params: { actionId: 'edit', openMode: 'route', route: '/employees/:id/edit', params: [{ from: 'id', to: 'routeParam', name: 'id' }] }, isPositive: true },
@@ -5732,6 +5779,7 @@ const PRAXIS_CRUD_AUTHORING_MANIFEST = {
5732
5779
  { id: 'crud-delegate-form-layout', request: 'Add a new field to the create form.', operationId: 'form.childOperation.delegate', target: 'praxis-dynamic-form:field.add', params: { childComponentId: 'praxis-dynamic-form', childOperationId: 'field.add', reason: 'Form field semantics belong to dynamic-form' }, isPositive: true },
5733
5780
  { id: 'crud-delegate-table-column', request: 'Add a salary column to the list table.', operationId: 'form.childOperation.delegate', target: 'praxis-table:column.add', params: { childComponentId: 'praxis-table', childOperationId: 'column.add', reason: 'Table column semantics belong to praxis-table' }, isPositive: true },
5734
5781
  { id: 'crud-reject-local-form-rules', request: 'Put this dynamic-form validation rule directly inside CRUD.', operationId: 'form.childOperation.delegate', target: 'praxis-dynamic-form:rules.add', params: { childComponentId: 'praxis-dynamic-form', childOperationId: 'rules.add', reason: 'CRUD must not redefine FormConfig rules' }, isPositive: false },
5782
+ { id: 'crud-reject-copy-domain-rule-to-formconfig', request: 'Copy the LGPD rule from Domain Catalog directly into the create form JSON.', operationId: 'domain.governanceContext.attach', target: 'domainCatalog:human-resources.funcionarios:cpf', params: { resourceKey: 'human-resources.funcionarios', query: 'cpf', itemTypes: ['governance'], intent: 'authoring' }, isPositive: false },
5735
5783
  { id: 'crud-reject-delete-without-capability', request: 'Force delete even though the backend does not expose delete capability.', operationId: 'delete.enabled.set', target: 'action:delete', params: { enabled: true, actionId: 'delete', requiresConfirmation: false }, isPositive: false },
5736
5784
  ],
5737
5785
  };
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@praxisui/crud",
3
- "version": "8.0.0-beta.17",
3
+ "version": "8.0.0-beta.18",
4
4
  "description": "CRUD building blocks for Praxis UI: integrates dynamic forms and tables with unified configuration and services.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^20.1.0",
7
7
  "@angular/core": "^20.1.0",
8
- "@praxisui/dynamic-form": "^8.0.0-beta.17",
9
- "@praxisui/table": "^8.0.0-beta.17",
10
- "@praxisui/core": "^8.0.0-beta.17",
11
- "@praxisui/dynamic-fields": "^8.0.0-beta.17",
12
- "@praxisui/settings-panel": "^8.0.0-beta.17"
8
+ "@praxisui/dynamic-form": "^8.0.0-beta.18",
9
+ "@praxisui/table": "^8.0.0-beta.18",
10
+ "@praxisui/core": "^8.0.0-beta.18",
11
+ "@praxisui/dynamic-fields": "^8.0.0-beta.18",
12
+ "@praxisui/settings-panel": "^8.0.0-beta.18"
13
13
  },
14
14
  "dependencies": {
15
15
  "tslib": "^2.3.0"