@praxisui/editorial-forms 1.0.0-beta.61 → 1.0.0-beta.64
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 +243 -343
- package/fesm2022/praxisui-editorial-forms.mjs +1867 -221
- package/fesm2022/praxisui-editorial-forms.mjs.map +1 -1
- package/index.d.ts +322 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,421 +1,321 @@
|
|
|
1
1
|
# @praxisui/editorial-forms
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Specialist Angular runtime for editorial experiences: journeys, semantic blocks, presets, runtime snapshots, and operational fallbacks.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`@praxisui/editorial-forms` is designed for flows that are more than a regular form. Use it when the experience has editorial structure, guided steps, reusable content blocks, compliance context, or host-level operational rules.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- `docs/continuation-plan.md`
|
|
9
|
-
- `docs/editorial-authoring-plan.md`
|
|
10
|
-
- `docs/event-registration-promotion-plan.md`
|
|
11
|
-
- `docs/employee-onboarding-promotion-plan.md`
|
|
12
|
-
- `docs/privacy-consent-promotion-plan.md`
|
|
13
|
-
- `docs/recovery-playbook.md`
|
|
14
|
-
- `docs/dynamic-form-hygiene-plan.md`
|
|
7
|
+
## Documentation
|
|
15
8
|
|
|
16
|
-
|
|
9
|
+
- Official docs: https://praxisui.dev
|
|
10
|
+
- Package source: https://github.com/codexrodrigues/praxis-ui-angular/tree/main/projects/praxis-editorial-forms
|
|
11
|
+
- Architecture notes: https://github.com/codexrodrigues/praxis-ui-angular/blob/main/projects/praxis-editorial-forms/docs/architecture.md
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
## When to use
|
|
19
14
|
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- runtime especializado
|
|
15
|
+
- Build guided journeys instead of a single flat form
|
|
16
|
+
- Compose semantic blocks with audit-friendly runtime resolution
|
|
17
|
+
- Keep host observability outside DOM parsing
|
|
18
|
+
- Support graceful degradation when an optional form engine is unavailable
|
|
19
|
+
- Separate editorial runtime concerns from `FormConfig` authoring concerns
|
|
26
20
|
|
|
27
|
-
|
|
21
|
+
## When not to use
|
|
28
22
|
|
|
29
|
-
|
|
23
|
+
- Plain schema-driven forms without editorial flow
|
|
24
|
+
- Screens that only need `@praxisui/dynamic-form`
|
|
25
|
+
- Cases where the host does not need snapshots, fallbacks, or runtime diagnostics
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
## Install
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
Proibido:
|
|
37
|
-
|
|
38
|
-
- `@praxisui/core -> @praxisui/editorial-forms`
|
|
39
|
-
- crescimento do dominio editorial central em `@praxisui/dynamic-form`
|
|
40
|
-
|
|
41
|
-
## Adaptador opcional para `dataCollection`
|
|
42
|
-
|
|
43
|
-
O runtime central nao embute `PraxisDynamicForm`.
|
|
44
|
-
|
|
45
|
-
Para blocos `dataCollection`, a lib agora expoe:
|
|
46
|
-
|
|
47
|
-
- contrato raiz `EditorialDataBlockAdapter`
|
|
48
|
-
- token multi `EDITORIAL_DATA_BLOCK_ADAPTER`
|
|
49
|
-
- `provideEditorialDataBlockAdapter(...)`
|
|
50
|
-
- `EditorialDataBlockAdapterRegistry`
|
|
51
|
-
- outlet do renderer que resolve `formBlockId` e delega para o adaptador registrado
|
|
52
|
-
|
|
53
|
-
Para consolidacao do motor editorial, a lib agora expoe tambem:
|
|
54
|
-
|
|
55
|
-
- `EditorialRuntimeInput`
|
|
56
|
-
- `EditorialRuntimeHostConfig`
|
|
57
|
-
- `EditorialRuntimeSnapshot`
|
|
58
|
-
- `EditorialResolvedJourney`
|
|
59
|
-
- `EditorialResolvedStep`
|
|
60
|
-
- `EditorialResolvedBlock`
|
|
61
|
-
- `EditorialRuntimeDiagnostic`
|
|
62
|
-
- `EditorialRuntimeOperationalEvent`
|
|
63
|
-
- `resolveEditorialRuntimeSnapshot(...)`
|
|
64
|
-
|
|
65
|
-
Nesta fase, o `themePreset` entra no snapshot como preset efetivo de shell/metadados.
|
|
66
|
-
|
|
67
|
-
Ele ainda nao e tratado como origem de bloco nem materializa blocos por si so.
|
|
68
|
-
|
|
69
|
-
O snapshot resolvido agora tambem formaliza:
|
|
29
|
+
```bash
|
|
30
|
+
npm i @praxisui/editorial-forms
|
|
31
|
+
```
|
|
70
32
|
|
|
71
|
-
|
|
72
|
-
- politica deterministica de override da instance (`append`, `insertBefore`, `insertAfter`, `replace`, `remove`)
|
|
73
|
-
- estado resolvido de `dataCollection` antes da engine concreta via `dataCollectionState`
|
|
33
|
+
Peer dependencies:
|
|
74
34
|
|
|
75
|
-
|
|
35
|
+
- `@angular/common` `^20.0.0`
|
|
36
|
+
- `@angular/core` `^20.0.0`
|
|
37
|
+
- `@praxisui/core` `^1.0.0`
|
|
76
38
|
|
|
77
|
-
|
|
78
|
-
- erro contextual de jornada/etapa/bloco
|
|
39
|
+
Optional integration:
|
|
79
40
|
|
|
80
|
-
|
|
41
|
+
- `@praxisui/dynamic-form` if your `dataCollection` blocks should render real forms instead of fallback content
|
|
81
42
|
|
|
82
|
-
|
|
43
|
+
## Core concepts
|
|
83
44
|
|
|
84
|
-
- `
|
|
85
|
-
- `
|
|
86
|
-
- `
|
|
87
|
-
- `
|
|
45
|
+
- `solution`: canonical editorial definition
|
|
46
|
+
- `instance`: host/runtime instance with overrides and compatibility inputs
|
|
47
|
+
- `journey`: resolved experience path
|
|
48
|
+
- `presentation`: visual shell contract for orientation, density, theme tokens, and stepper behavior
|
|
49
|
+
- `snapshot`: stable resolved state emitted to the host
|
|
50
|
+
- `fallback`: operational state exposed as `normal`, `warning`, `degraded`, or `blocked`
|
|
51
|
+
- `operationalEvent`: lightweight technical event for logs, monitoring, and runbooks
|
|
88
52
|
|
|
89
|
-
|
|
53
|
+
## Quick start
|
|
90
54
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
55
|
+
```ts
|
|
56
|
+
import { Component } from '@angular/core';
|
|
57
|
+
import {
|
|
58
|
+
EditorialFormRuntimeComponent,
|
|
59
|
+
type EditorialRuntimeHostConfig,
|
|
60
|
+
type EditorialRuntimeInput,
|
|
61
|
+
} from '@praxisui/editorial-forms';
|
|
62
|
+
|
|
63
|
+
@Component({
|
|
64
|
+
selector: 'app-editorial-runtime-demo',
|
|
65
|
+
standalone: true,
|
|
66
|
+
imports: [EditorialFormRuntimeComponent],
|
|
67
|
+
template: `
|
|
68
|
+
<praxis-editorial-form-runtime
|
|
69
|
+
[solution]="solution"
|
|
70
|
+
[instance]="instance"
|
|
71
|
+
[runtimeContext]="runtimeContext"
|
|
72
|
+
[hostConfig]="hostConfig"
|
|
73
|
+
(snapshotChange)="onSnapshot($event)"
|
|
74
|
+
(fallbackChange)="onFallback($event)"
|
|
75
|
+
/>
|
|
76
|
+
`,
|
|
77
|
+
})
|
|
78
|
+
export class EditorialRuntimeDemoComponent {
|
|
79
|
+
solution: EditorialRuntimeInput['solution'] = {
|
|
80
|
+
solutionId: 'privacy-consent',
|
|
81
|
+
journeys: [
|
|
82
|
+
{
|
|
83
|
+
id: 'privacy-consent-journey',
|
|
84
|
+
title: 'Privacy consent',
|
|
85
|
+
steps: [
|
|
86
|
+
{
|
|
87
|
+
id: 'review',
|
|
88
|
+
title: 'Review and confirm',
|
|
89
|
+
blocks: [
|
|
90
|
+
{
|
|
91
|
+
id: 'consent-form',
|
|
92
|
+
type: 'dataCollection',
|
|
93
|
+
formBlockId: 'consent-form',
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
instance: EditorialRuntimeInput['instance'] = {
|
|
103
|
+
journeyId: 'privacy-consent-journey',
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
runtimeContext: EditorialRuntimeInput['runtimeContext'] = {
|
|
107
|
+
locale: 'en-US',
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
hostConfig: EditorialRuntimeHostConfig = {
|
|
111
|
+
emitOperationalEvents: true,
|
|
112
|
+
forwardAdapterOperationalEvents: true,
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
onSnapshot(snapshot: unknown) {
|
|
116
|
+
console.log('snapshot', snapshot);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
onFallback(state: unknown) {
|
|
120
|
+
console.log('fallback', state);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
96
124
|
|
|
97
|
-
##
|
|
125
|
+
## Stable host contract
|
|
98
126
|
|
|
99
|
-
|
|
127
|
+
`EditorialFormRuntimeComponent` exposes these stable inputs:
|
|
100
128
|
|
|
101
129
|
- `solution`
|
|
102
130
|
- `instance`
|
|
103
131
|
- `runtimeContext`
|
|
104
132
|
- `hostConfig`
|
|
105
133
|
|
|
106
|
-
|
|
134
|
+
Stable outputs:
|
|
107
135
|
|
|
108
136
|
- `snapshotChange`
|
|
109
137
|
- `fallbackChange`
|
|
110
138
|
- `operationalEvent`
|
|
111
139
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- `snapshotChange` e o sinal estavel para leitura de estado resolvido, auditoria e derivacao de UX de produto
|
|
115
|
-
- `fallbackChange` e o sinal estavel para status operacional exposto ao usuario (`normal`, `warning`, `degraded`, `blocked`)
|
|
116
|
-
- `operationalEvent` e telemetria tecnica leve para logs, monitoracao, debugging e runbooks do host
|
|
117
|
-
- hosts controlados e de produto nao devem depender de parse de DOM para observabilidade
|
|
118
|
-
- hosts de produto nao devem expor o stream bruto de `operationalEvent` na superficie principal da pagina
|
|
119
|
-
|
|
120
|
-
Politica de fallback para hosts de produto:
|
|
121
|
-
|
|
122
|
-
- `normal`: UX nominal; sem contingencia adicional
|
|
123
|
-
- `warning`: UX nominal com monitoramento; nao bloquear progressao
|
|
124
|
-
- `degraded`: UX com contingencia parcial; manter o fluxo quando possivel e encaminhar observabilidade interna
|
|
125
|
-
- `blocked`: UX indisponivel ou bloqueada; impedir progressao e acionar canal de suporte/rollback do host
|
|
126
|
-
|
|
127
|
-
`hostConfig` hoje controla:
|
|
128
|
-
|
|
129
|
-
- `emitOperationalEvents`
|
|
130
|
-
- `forwardAdapterOperationalEvents`
|
|
131
|
-
|
|
132
|
-
`operationalEvent` segue envelope estavel com:
|
|
133
|
-
|
|
134
|
-
- `eventType`
|
|
135
|
-
- `timestamp`
|
|
136
|
-
- `severity`
|
|
137
|
-
- `journeyId`/`stepId`/`blockId` quando aplicavel
|
|
138
|
-
- `payload` tipado por tipo de evento
|
|
139
|
-
|
|
140
|
-
Quando o host quiser reutilizar `@praxisui/dynamic-form`, o caminho e registrar o provider opcional:
|
|
141
|
-
|
|
142
|
-
```ts
|
|
143
|
-
import { provideEditorialDynamicFormAdapter } from '@praxisui/editorial-forms';
|
|
144
|
-
import { PraxisDynamicForm } from '@praxisui/dynamic-form';
|
|
145
|
-
|
|
146
|
-
providers: [
|
|
147
|
-
provideEditorialDynamicFormAdapter({ component: PraxisDynamicForm }),
|
|
148
|
-
];
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Decisao de superficie publica desta fase:
|
|
152
|
-
|
|
153
|
-
- factory `createEditorialDynamicFormAdapter(...)`
|
|
154
|
-
- provider `provideEditorialDynamicFormAdapter(...)`
|
|
155
|
-
- exportados pelo pacote raiz `@praxisui/editorial-forms`
|
|
156
|
-
- documentados assim para evitar ambiguidade sobre sub-entrypoint, que nao foi mantido nesta iteracao
|
|
157
|
-
|
|
158
|
-
Sem esse provider, blocos `dataCollection` degradam para fallback acessivel e informativo no runtime editorial.
|
|
159
|
-
|
|
160
|
-
Mesmo sem provider, o snapshot ja deixa claro:
|
|
161
|
-
|
|
162
|
-
- `formBlockId`
|
|
163
|
-
- `formConfigRef`
|
|
164
|
-
- se existe config inline
|
|
165
|
-
- origem da config resolvida
|
|
166
|
-
- prontidao do bloco (`requiresAdapter`, `missingConfig`, `invalid`)
|
|
167
|
-
|
|
168
|
-
Politica deterministica atual de resolucao de config para `dataCollection`:
|
|
169
|
-
|
|
170
|
-
1. `block.formConfig`
|
|
171
|
-
2. `instance.overrides.runtimeFormConfigs`
|
|
172
|
-
3. `instance.compatibilityFormConfigs`
|
|
173
|
-
|
|
174
|
-
Regras complementares:
|
|
175
|
-
|
|
176
|
-
- quando `formConfigRef` e `formBlockId` apontarem para candidatos diferentes, a primeira correspondencia valida na ordem acima continua sendo aplicada
|
|
177
|
-
- quando mais de uma fonte candidata for encontrada, o runtime nao falha silenciosamente: ele mantem a selecao deterministica e emite diagnostico `data-collection-config-ambiguous`
|
|
178
|
-
- `resolvedFormConfigSource` e `resolvedFormConfigLookupKey` continuam sendo a referencia auditavel para o host
|
|
140
|
+
Recommended host usage:
|
|
179
141
|
|
|
180
|
-
|
|
142
|
+
- use `snapshotChange` for resolved state, audit trails, and product UX derivation
|
|
143
|
+
- use `fallbackChange` for operational UX decisions
|
|
144
|
+
- use `operationalEvent` for technical telemetry, not as primary user-facing UI content
|
|
145
|
+
- keep `runtimeContext` immutable from the host side; the runtime now emits refreshed state as blocks and adapters materialize `formData`
|
|
181
146
|
|
|
182
|
-
|
|
147
|
+
## Presentation layer
|
|
183
148
|
|
|
184
|
-
|
|
149
|
+
The runtime now supports an optional `presentation` contract inside the editorial `solution`.
|
|
185
150
|
|
|
186
|
-
|
|
151
|
+
Current V1 coverage:
|
|
187
152
|
|
|
188
|
-
|
|
153
|
+
- horizontal or vertical stepper
|
|
154
|
+
- responsive collapse to mobile orientation through `layout.responsive.mobileOrientation`
|
|
155
|
+
- density variants (`compact`, `comfortable`, `relaxed`)
|
|
156
|
+
- theme tokens applied as CSS variables
|
|
157
|
+
- shell max width and spacing overrides
|
|
158
|
+
- visual step metadata (`kind`, `icon`, `visual`)
|
|
189
159
|
|
|
190
|
-
|
|
191
|
-
- `npm run build:praxis-editorial-forms`
|
|
192
|
-
- `npm run typecheck`
|
|
160
|
+
Contractualized and currently effective in the renderer:
|
|
193
161
|
|
|
194
|
-
|
|
162
|
+
- `presentation.layout.orientation`
|
|
163
|
+
- `presentation.layout.density`
|
|
164
|
+
- `presentation.layout.maxWidth`
|
|
165
|
+
- `presentation.layout.spacing.pagePadding`
|
|
166
|
+
- `presentation.layout.spacing.shellPadding`
|
|
167
|
+
- `presentation.layout.spacing.blockGap`
|
|
168
|
+
- `presentation.layout.spacing.sectionGap`
|
|
169
|
+
- `presentation.layout.spacing.actionGap`
|
|
170
|
+
- `presentation.layout.responsive.mobileOrientation`
|
|
171
|
+
- `presentation.layout.responsive.collapseStepperBelow`
|
|
172
|
+
- `presentation.layout.shellVariant`
|
|
173
|
+
- `presentation.theme.*` tokens mapped in `buildRuntimeCssVars(...)`
|
|
174
|
+
- `presentation.stepper.visible`
|
|
175
|
+
- `presentation.stepper.orientation`
|
|
176
|
+
- `presentation.stepper.showLabels`
|
|
177
|
+
- `presentation.stepper.showDescriptions`
|
|
178
|
+
- `presentation.stepper.showConnectors`
|
|
179
|
+
- `presentation.stepper.connectorStyle`
|
|
180
|
+
- `presentation.stepper.allowStepJump`
|
|
195
181
|
|
|
196
|
-
|
|
197
|
-
- specs dos hosts controlados no app
|
|
198
|
-
- Playwright do runtime editorial em host real
|
|
182
|
+
Accepted by schema but currently diagnosed as unsupported:
|
|
199
183
|
|
|
200
|
-
|
|
184
|
+
- `presentation.layout.contentAlign`
|
|
185
|
+
- `presentation.layout.responsive.tabletOrientation`
|
|
186
|
+
- `presentation.stepper.size`
|
|
187
|
+
- `presentation.stepper.align`
|
|
188
|
+
- `presentation.stepper.variant` values without distinct renderer behavior from `icon-label`
|
|
201
189
|
|
|
202
|
-
|
|
203
|
-
- bateria Playwright consolidada com `22 passed`
|
|
204
|
-
- runtime editorial em host real:
|
|
205
|
-
- `/lab/editorial-runtime`
|
|
206
|
-
- `/experiments/editorial-runtime/privacy-consent`
|
|
207
|
-
- `/experiments/editorial-runtime/event-registration`
|
|
208
|
-
- `/experiments/editorial-runtime/employee-onboarding`
|
|
209
|
-
- bateria Playwright consolidada com `8 passed`
|
|
190
|
+
Important note:
|
|
210
191
|
|
|
211
|
-
|
|
192
|
+
- when these unsupported keys are present, the runtime emits `presentation-config-unsupported` diagnostics in the snapshot instead of silently pretending support
|
|
212
193
|
|
|
213
|
-
|
|
214
|
-
- valida `solutionId`, jornada `privacy-consent-journey`, labels de step e `consent-form`
|
|
215
|
-
- valida degradacao com diagnostico `data-collection-adapter-missing`
|
|
216
|
-
- valida reativacao com evento `data-collection-adapter-resolved`
|
|
217
|
-
- `event-registration-editorial-runtime.page.spec.ts`
|
|
218
|
-
- valida `solutionId`, jornada `event-registration-journey`, labels de step e `registration-form`
|
|
219
|
-
- valida degradacao com diagnostico `data-collection-adapter-missing`
|
|
220
|
-
- valida reativacao com evento `data-collection-adapter-resolved`
|
|
221
|
-
- `employee-onboarding-editorial-runtime.page.spec.ts`
|
|
222
|
-
- valida `solutionId`, jornada `employee-onboarding-journey` e os dois blocos `dataCollection`
|
|
223
|
-
- valida `identity-form` e `operations-form` como blocos resolvidos no snapshot
|
|
224
|
-
- valida degradacao com diagnostico `data-collection-adapter-missing`
|
|
225
|
-
- valida reativacao com evento `data-collection-adapter-resolved`
|
|
194
|
+
Current V1 presentational blocks:
|
|
226
195
|
|
|
227
|
-
|
|
196
|
+
- `introHero`
|
|
197
|
+
- `selectionCards`
|
|
198
|
+
- `reviewSections`
|
|
199
|
+
- `successPanel`
|
|
228
200
|
|
|
229
|
-
|
|
201
|
+
Important note for hosts:
|
|
230
202
|
|
|
231
|
-
-
|
|
232
|
-
-
|
|
203
|
+
- `selectionCards` and `dataCollection` now feed the same runtime context shape through immutable `runtimeContextChange` emissions
|
|
204
|
+
- review blocks should consume `snapshot.context.formData` paths to stay consistent with the canonical runtime state
|
|
205
|
+
- internal runtime copy now resolves through `PraxisI18nService`; the package exports `providePraxisEditorialFormsI18n(...)` with built-in `pt-BR` and `en-US` dictionaries
|
|
206
|
+
- `reviewSections` now supports `EditorialReviewSectionField.format` for `date`, `phone`, `email`, `boolean` and `list`, while preserving plain text fallback when `format` is omitted
|
|
233
207
|
|
|
234
|
-
|
|
208
|
+
If your host wants to override or extend the built-in runtime copy, register the package i18n provider:
|
|
235
209
|
|
|
236
|
-
|
|
237
|
-
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
Essa rota:
|
|
254
|
-
|
|
255
|
-
- nao e feature final
|
|
256
|
-
- nao e showcase publico de produto
|
|
257
|
-
- existe para validar integracao host-runtime em Angular real
|
|
258
|
-
|
|
259
|
-
Ela exercita:
|
|
260
|
-
|
|
261
|
-
- fixture saudavel
|
|
262
|
-
- fixture com warning
|
|
263
|
-
- fixture com erro global
|
|
264
|
-
- `dataCollection` sem adapter
|
|
265
|
-
- `dataCollection` com adapter opcional registrado
|
|
266
|
-
|
|
267
|
-
E expõe de forma tecnica:
|
|
268
|
-
|
|
269
|
-
- resumo do snapshot recebido via `snapshotChange`
|
|
270
|
-
- fallback recebido via `fallbackChange`
|
|
271
|
-
- stream recente de `operationalEvent`
|
|
272
|
-
|
|
273
|
-
Para validar localmente a integracao:
|
|
274
|
-
|
|
275
|
-
1. `npm run build:praxis-core`
|
|
276
|
-
2. `npm run build:praxis-editorial-forms`
|
|
277
|
-
3. `npm run typecheck`
|
|
278
|
-
4. `npm run build -- --configuration development`
|
|
279
|
-
|
|
280
|
-
## Primeiro caso experimental quase real
|
|
281
|
-
|
|
282
|
-
Agora existe tambem uma rota experimental isolada para o primeiro caso editorial real no novo runtime:
|
|
283
|
-
|
|
284
|
-
- path: `/experiments/editorial-runtime/privacy-consent`
|
|
285
|
-
|
|
286
|
-
`privacy-consent` foi escolhido primeiro porque:
|
|
287
|
-
|
|
288
|
-
- e o caso mais enxuto e regulatorio do catalogo editorial novo
|
|
289
|
-
- permite validar `dataCollection` com menor variabilidade de jornada
|
|
290
|
-
- reaproveita o catalogo editorial canonico sem recolocar `FormConfig` no centro do motor
|
|
291
|
-
|
|
292
|
-
Essa rota deixa explicito:
|
|
293
|
-
|
|
294
|
-
- rota antiga relacionada: `/legacy/privacy-consent-template`
|
|
295
|
-
- rota nova experimental: `/experiments/editorial-runtime/privacy-consent`
|
|
296
|
-
- a rota nova consome `getEditorialSolutionById('privacy-consent')`
|
|
297
|
-
- o host fornece `runtimeContext`, `hostConfig`, `snapshotChange`, `fallbackChange` e `operationalEvent`
|
|
298
|
-
- o adapter opcional de `dataCollection` pode ser ligado ou desligado localmente para validar o comportamento real do host
|
|
299
|
-
|
|
300
|
-
Essa pagina:
|
|
301
|
-
|
|
302
|
-
- nao substitui o demo legado
|
|
303
|
-
- nao representa UX final de produto
|
|
304
|
-
- nao substitui o laboratorio tecnico `/lab/editorial-runtime`
|
|
305
|
-
|
|
306
|
-
Primeira superficie tecnica da fase de authoring:
|
|
307
|
-
|
|
308
|
-
- `/lab/editorial-authoring`
|
|
309
|
-
|
|
310
|
-
## Terceiro caso experimental quase real
|
|
311
|
-
|
|
312
|
-
Agora existe tambem uma terceira rota experimental isolada para o fluxo mais complexo entre os casos canônicos atuais:
|
|
313
|
-
|
|
314
|
-
- path: `/experiments/editorial-runtime/employee-onboarding`
|
|
315
|
-
|
|
316
|
-
`employee-onboarding` foi escolhido como terceiro passo porque:
|
|
317
|
-
|
|
318
|
-
- possui dois blocos `dataCollection` (`identity-form` e `operations-form`)
|
|
319
|
-
- amplia a validacao do runtime em jornada multi-step com mais variabilidade operacional
|
|
320
|
-
- mantem comparacao simples com o demo legado `/demo/employee-onboarding-template`
|
|
321
|
-
|
|
322
|
-
Essa rota deixa explicito:
|
|
323
|
-
|
|
324
|
-
- rota antiga relacionada: `/demo/employee-onboarding-template`
|
|
325
|
-
- rota nova experimental: `/experiments/editorial-runtime/employee-onboarding`
|
|
326
|
-
- a rota nova consome `getEditorialSolutionById('employee-onboarding')`
|
|
327
|
-
- o host fornece `runtimeContext`, `hostConfig`, `snapshotChange`, `fallbackChange` e `operationalEvent`
|
|
328
|
-
- o host deriva dois `runtimeFormConfigs` locais a partir do template legado apenas para alimentar `identity-form` e `operations-form`
|
|
329
|
-
- o adapter opcional de `dataCollection` pode ser ligado ou desligado localmente para validar o comportamento real do host
|
|
210
|
+
```ts
|
|
211
|
+
import { providePraxisEditorialFormsI18n } from '@praxisui/editorial-forms';
|
|
212
|
+
|
|
213
|
+
export const appConfig = {
|
|
214
|
+
providers: [
|
|
215
|
+
providePraxisEditorialFormsI18n({
|
|
216
|
+
locale: 'en-US',
|
|
217
|
+
dictionaries: {
|
|
218
|
+
'en-US': {
|
|
219
|
+
'praxis.editorialForms.runtime.actions.next': 'Continue',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
}),
|
|
223
|
+
],
|
|
224
|
+
};
|
|
225
|
+
```
|
|
330
226
|
|
|
331
|
-
##
|
|
227
|
+
## Optional `dataCollection` adapter
|
|
332
228
|
|
|
333
|
-
|
|
229
|
+
The core runtime does not hardwire `@praxisui/dynamic-form`.
|
|
334
230
|
|
|
335
|
-
|
|
336
|
-
- laboratorio tecnico isolado em `/lab/editorial-runtime`
|
|
337
|
-
- tres integracoes quase reais e isoladas:
|
|
338
|
-
- `/experiments/editorial-runtime/privacy-consent`
|
|
339
|
-
- `/experiments/editorial-runtime/event-registration`
|
|
340
|
-
- `/experiments/editorial-runtime/employee-onboarding`
|
|
341
|
-
- validacao E2E do editor tecnico que ainda serve de engine adaptada para `dataCollection`
|
|
342
|
-
- validacao E2E das rotas editoriais experimentais e do laboratorio tecnico
|
|
231
|
+
If your host wants to render `dataCollection` blocks with Praxis Dynamic Form, register the optional adapter:
|
|
343
232
|
|
|
344
|
-
|
|
233
|
+
```ts
|
|
234
|
+
import { provideEditorialDynamicFormAdapter } from '@praxisui/editorial-forms';
|
|
235
|
+
import { PraxisDynamicForm } from '@praxisui/dynamic-form';
|
|
345
236
|
|
|
346
|
-
|
|
237
|
+
export const appConfig = {
|
|
238
|
+
providers: [
|
|
239
|
+
provideEditorialDynamicFormAdapter({ component: PraxisDynamicForm }),
|
|
240
|
+
],
|
|
241
|
+
};
|
|
242
|
+
```
|
|
347
243
|
|
|
348
|
-
-
|
|
349
|
-
- substituir os demos legados
|
|
350
|
-
- criar o editor especialista de autoria editorial
|
|
244
|
+
Without this provider, `dataCollection` blocks degrade to an accessible fallback and the runtime keeps exposing the missing-adapter state through snapshot diagnostics and operational events.
|
|
351
245
|
|
|
352
|
-
|
|
246
|
+
## Public API highlights
|
|
353
247
|
|
|
354
|
-
-
|
|
355
|
-
-
|
|
356
|
-
-
|
|
248
|
+
- `EditorialFormRuntimeComponent`
|
|
249
|
+
- `resolveEditorialRuntimeSnapshot(...)`
|
|
250
|
+
- `EditorialDataBlockAdapter`
|
|
251
|
+
- `EDITORIAL_DATA_BLOCK_ADAPTER`
|
|
252
|
+
- `provideEditorialDataBlockAdapter(...)`
|
|
253
|
+
- `createEditorialDynamicFormAdapter(...)`
|
|
254
|
+
- `provideEditorialDynamicFormAdapter(...)`
|
|
357
255
|
|
|
358
|
-
|
|
256
|
+
Runtime model types:
|
|
359
257
|
|
|
360
|
-
|
|
258
|
+
- `EditorialRuntimeInput`
|
|
259
|
+
- `EditorialRuntimeHostConfig`
|
|
260
|
+
- `EditorialRuntimeSnapshot`
|
|
261
|
+
- `EditorialResolvedJourney`
|
|
262
|
+
- `EditorialResolvedStep`
|
|
263
|
+
- `EditorialResolvedBlock`
|
|
264
|
+
- `EditorialRuntimeDiagnostic`
|
|
265
|
+
- `EditorialRuntimeOperationalEvent`
|
|
361
266
|
|
|
362
|
-
|
|
267
|
+
Presentation model types from `@praxisui/core`:
|
|
363
268
|
|
|
364
|
-
-
|
|
365
|
-
-
|
|
366
|
-
- `
|
|
367
|
-
- `
|
|
368
|
-
-
|
|
369
|
-
- definicao de fallback/observabilidade da UX final
|
|
269
|
+
- `EditorialWizardPresentation`
|
|
270
|
+
- `EditorialLayoutConfig`
|
|
271
|
+
- `EditorialThemeTokens`
|
|
272
|
+
- `EditorialStepperConfig`
|
|
273
|
+
- `EditorialStepVisualConfig`
|
|
370
274
|
|
|
371
|
-
|
|
275
|
+
## Resolution and fallback behavior
|
|
372
276
|
|
|
373
|
-
|
|
374
|
-
- `event-registration`: segundo candidato
|
|
375
|
-
- `employee-onboarding`: caso de robustez antes de rollout
|
|
277
|
+
The resolved snapshot formalizes:
|
|
376
278
|
|
|
377
|
-
|
|
279
|
+
- deterministic block provenance with `primarySource` and `trail`
|
|
280
|
+
- instance override policy with `append`, `insertBefore`, `insertAfter`, `replace`, and `remove`
|
|
281
|
+
- resolved `dataCollectionState` before the concrete form engine renders
|
|
378
282
|
|
|
379
|
-
|
|
380
|
-
- `/controlled/editorial-runtime/privacy-consent`
|
|
283
|
+
Current `dataCollection` config resolution order:
|
|
381
284
|
|
|
382
|
-
|
|
285
|
+
1. `block.formConfig`
|
|
286
|
+
2. `instance.overrides.runtimeFormConfigs`
|
|
287
|
+
3. `instance.compatibilityFormConfigs`
|
|
383
288
|
|
|
384
|
-
|
|
385
|
-
- remove inspector e toggles manuais do experimento
|
|
386
|
-
- mantem observabilidade operacional discreta
|
|
387
|
-
- assume o caminho principal do fluxo
|
|
388
|
-
- mantem a rota experimental
|
|
389
|
-
- mantem o legado apenas como contingencia explicita em `/legacy/privacy-consent-template`
|
|
289
|
+
Fallback states:
|
|
390
290
|
|
|
391
|
-
|
|
291
|
+
- `normal`
|
|
292
|
+
- `warning`
|
|
293
|
+
- `degraded`
|
|
294
|
+
- `blocked`
|
|
392
295
|
|
|
393
|
-
|
|
394
|
-
- nao representa UX final de produto
|
|
395
|
-
- nao substitui o laboratorio tecnico `/lab/editorial-runtime`
|
|
296
|
+
## Architecture rule
|
|
396
297
|
|
|
397
|
-
|
|
298
|
+
Allowed:
|
|
398
299
|
|
|
399
|
-
|
|
300
|
+
- `@praxisui/editorial-forms -> @praxisui/core`
|
|
301
|
+
- `@praxisui/editorial-forms -> @praxisui/dynamic-form` only through optional adapter/provider integration
|
|
400
302
|
|
|
401
|
-
|
|
303
|
+
Avoid:
|
|
402
304
|
|
|
403
|
-
|
|
305
|
+
- `@praxisui/core -> @praxisui/editorial-forms`
|
|
306
|
+
- moving editorial domain growth back into `@praxisui/dynamic-form`
|
|
404
307
|
|
|
405
|
-
|
|
406
|
-
- exercita melhor a combinacao de `hero`, `contextSummary`, `legalNotice`, `reviewSummary` e `footerLinks`
|
|
407
|
-
- mantem comparacao simples com o demo legado `/demo/event-registration-template`
|
|
308
|
+
## Validation status
|
|
408
309
|
|
|
409
|
-
|
|
310
|
+
The package is covered by:
|
|
410
311
|
|
|
411
|
-
-
|
|
412
|
-
-
|
|
413
|
-
-
|
|
414
|
-
- o host fornece `runtimeContext`, `hostConfig`, `snapshotChange`, `fallbackChange` e `operationalEvent`
|
|
415
|
-
- o adapter opcional de `dataCollection` pode ser ligado ou desligado localmente para validar o comportamento real do host
|
|
312
|
+
- unit specs for runtime resolution and component behavior
|
|
313
|
+
- controlled host specs for real Angular integration
|
|
314
|
+
- end-to-end validation of editorial runtime flows in host routes
|
|
416
315
|
|
|
417
|
-
|
|
316
|
+
## More reading
|
|
418
317
|
|
|
419
|
-
-
|
|
420
|
-
-
|
|
421
|
-
-
|
|
318
|
+
- Architecture: https://github.com/codexrodrigues/praxis-ui-angular/blob/main/projects/praxis-editorial-forms/docs/architecture.md
|
|
319
|
+
- Continuation plan: https://github.com/codexrodrigues/praxis-ui-angular/blob/main/projects/praxis-editorial-forms/docs/continuation-plan.md
|
|
320
|
+
- Authoring plan: https://github.com/codexrodrigues/praxis-ui-angular/blob/main/projects/praxis-editorial-forms/docs/editorial-authoring-plan.md
|
|
321
|
+
- Recovery playbook: https://github.com/codexrodrigues/praxis-ui-angular/blob/main/projects/praxis-editorial-forms/docs/recovery-playbook.md
|