@praxisui/core 8.0.0-beta.19 → 8.0.0-beta.20
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/README.md +57 -0
- package/fesm2022/praxisui-core.mjs +1142 -57
- package/index.d.ts +998 -54
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -14,6 +14,21 @@
|
|
|
14
14
|
- Keep icon, config and dynamic widget infrastructure aligned in the host app
|
|
15
15
|
- Avoid duplicating low-level primitives across multiple business libraries
|
|
16
16
|
|
|
17
|
+
## Governed Semantic Decisions
|
|
18
|
+
|
|
19
|
+
`DomainKnowledgeService` is the shared client for the governed Domain Knowledge
|
|
20
|
+
change-set lifecycle exposed by `praxis-config-starter` at
|
|
21
|
+
`/api/praxis/config/domain-knowledge/change-sets`. It intentionally models the
|
|
22
|
+
separate platform boundaries for `create`, `validate`, governed status
|
|
23
|
+
transition and `apply`, so consuming UIs can continue an AI-authored semantic
|
|
24
|
+
decision without treating the frontend as the primary source of business rules.
|
|
25
|
+
|
|
26
|
+
Use it when a cockpit or runtime needs to propose safe evidence, review a
|
|
27
|
+
change-set projection, approve/reject the proposal, apply an approved change set
|
|
28
|
+
or read back safe summaries. Runtime surfaces must continue to treat the
|
|
29
|
+
resulting materializations as derived projections of the canonical semantic
|
|
30
|
+
decision.
|
|
31
|
+
|
|
17
32
|
## Form Layout Contract
|
|
18
33
|
|
|
19
34
|
`FormColumn.items` and the exported `FormLayoutItem` contract define the
|
|
@@ -282,15 +297,56 @@ Regra de leitura:
|
|
|
282
297
|
|
|
283
298
|
`@praxisui/core` preserva `x-ui.optionSource` como contrato canônico de opções remotas e lookups de entidade publicados por `/schemas/filtered`.
|
|
284
299
|
|
|
300
|
+
Os tipos públicos exportados para esse contrato ficam em `option-source.model`:
|
|
301
|
+
|
|
302
|
+
- `OptionSourceMetadata`
|
|
303
|
+
- `LookupFilteringMetadata`
|
|
304
|
+
- `LookupFilterDefinitionMetadata`
|
|
305
|
+
- `LookupSortOptionMetadata`
|
|
306
|
+
- `LookupFilterRequest`
|
|
307
|
+
- `OptionSourceFilterRequest`
|
|
308
|
+
- `LookupSelectionPolicyMetadata`
|
|
309
|
+
- `LookupCapabilitiesMetadata`
|
|
310
|
+
- `LookupDetailMetadata`
|
|
311
|
+
- `LookupCreateMetadata`
|
|
312
|
+
- `LookupDialogMetadata`
|
|
313
|
+
- `LookupResultColumnMetadata`
|
|
314
|
+
- `EntityLookupDisplayMetadata`
|
|
315
|
+
- `EntityLookupCollectionMetadata`
|
|
316
|
+
- `EntityLookupPayloadMode`
|
|
317
|
+
- `EntityLookupResult`
|
|
318
|
+
- `EntityRef`
|
|
319
|
+
|
|
285
320
|
Para `RESOURCE_ENTITY`, o `SchemaNormalizerService` mantém a semântica enriquecida usada pelos consumidores:
|
|
286
321
|
|
|
287
322
|
- identidade: `entityKey`, `valuePropertyPath`, `labelPropertyPath`, `codePropertyPath`
|
|
288
323
|
- exibição: `descriptionPropertyPaths`, `statusPropertyPath`, `disabledReasonPropertyPath`
|
|
289
324
|
- busca e cascata: `searchPropertyPaths`, `dependsOn`, `dependencyFilterMap`
|
|
325
|
+
- filtro rico: `filtering.availableFilters`, `defaultFilters`, `sortOptions`, `defaultSort`, `quickFilterFields`, `searchPlaceholder`
|
|
290
326
|
- seleção: `selectionPolicy.allowedStatuses`, `blockedStatuses`, `allowRetainInvalidExistingValue`
|
|
291
327
|
- operação: `capabilities.byIds`, `navigateToDetail`, `create`, `auditSnapshot`
|
|
292
328
|
- navegação: `detail.hrefTemplate`, `routeTemplate`, `openDetailMode`
|
|
293
329
|
|
|
330
|
+
O helper `serializeOptionSourceFilterRequest(...)` monta o envelope canônico de
|
|
331
|
+
Cut B para `POST /option-sources/{sourceKey}/options/filter`, preservando um
|
|
332
|
+
único shape para:
|
|
333
|
+
|
|
334
|
+
- `filter`: filtro legado do recurso hospedeiro
|
|
335
|
+
- `filters`: filtros estruturados do lookup
|
|
336
|
+
- `search`: quick search
|
|
337
|
+
- `sort`: chave metadata-driven de ordenação
|
|
338
|
+
- `includeIds`: reidratação e retenção fora da página atual
|
|
339
|
+
|
|
340
|
+
Para Cut C, o core também publica helpers canônicos para cardinalidade e
|
|
341
|
+
payload de coleção:
|
|
342
|
+
|
|
343
|
+
- `resolveEntityLookupPayloadMode(...)`
|
|
344
|
+
- `isEntityLookupPayloadModeCompatible(...)`
|
|
345
|
+
- `serializeEntityLookupValueForPayload(...)`
|
|
346
|
+
|
|
347
|
+
Assim, `id`, `entityRef`, `ids` e `entityRefs` continuam sob a mesma semântica
|
|
348
|
+
compartilhada entre runtime, submit de formulário e integrações futuras.
|
|
349
|
+
|
|
294
350
|
O mapper de `FieldDefinition` para `FieldMetadata` deriva apenas a ponte runtime necessária (`dependencyFields` e `dependencyFilterMap`) a partir de `optionSource.dependsOn`. Ele não inventa política de reset, reload ou persistência; essas decisões continuam explícitas no metadata do campo.
|
|
295
351
|
|
|
296
352
|
## `x-ui.analytics` no runtime
|
|
@@ -376,6 +432,7 @@ shell: {
|
|
|
376
432
|
- `trackEvent` → `{ eventName, payload }`
|
|
377
433
|
- `log` → `{ level, message, payload }`
|
|
378
434
|
- `api.get` / `api.post` / `api.patch` → `{ url, params|body }`
|
|
435
|
+
- `navigation.openRoute` → `{ path, query?, fragment?, replaceUrl?, state? }`
|
|
379
436
|
- `route.register` → `{ path, componentId|loadChildren, data?, resolve?, guards?, canMatch?, canActivateChild?, replace?, position? }`
|
|
380
437
|
|
|
381
438
|
### 5) Rotas dinâmicas (route.register)
|