@praxisui/editorial-forms 1.0.0-beta.61 → 1.0.0-beta.63
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 +1750 -182
- package/fesm2022/praxisui-editorial-forms.mjs.map +1 -1
- package/index.d.ts +314 -8
- package/package.json +2 -2
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { makeEnvironmentProviders, InjectionToken, inject, input, output, signal, computed, effect, ChangeDetectionStrategy, Component, reflectComponentType, Input } from '@angular/core';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
2
|
+
import { makeEnvironmentProviders, InjectionToken, inject, DestroyRef, viewChild, ViewContainerRef, input, output, signal, computed, effect, ChangeDetectionStrategy, Component, reflectComponentType, Input } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { PraxisI18nService, PraxisIconDirective, DynamicWidgetLoaderDirective, providePraxisI18n } from '@praxisui/core';
|
|
5
|
+
import * as i1 from '@angular/material/icon';
|
|
6
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Root provider entrypoint for the editorial runtime package.
|
|
@@ -173,16 +174,23 @@ function resolveEditorialDataBlockAdapter(adapters, context) {
|
|
|
173
174
|
}
|
|
174
175
|
|
|
175
176
|
class EditorialDataCollectionBlockOutletComponent {
|
|
177
|
+
i18n = inject(PraxisI18nService);
|
|
176
178
|
adapters = inject(EDITORIAL_DATA_BLOCK_ADAPTER, {
|
|
177
179
|
optional: true,
|
|
178
180
|
}) ?? [];
|
|
181
|
+
destroyRef = inject(DestroyRef);
|
|
179
182
|
adapterRegistry = new EditorialDataBlockAdapterRegistry(this.adapters);
|
|
183
|
+
adapterHost = viewChild('adapterHost', ...(ngDevMode ? [{ debugName: "adapterHost", read: ViewContainerRef }] : [{ read: ViewContainerRef }]));
|
|
180
184
|
loadVersion = 0;
|
|
181
185
|
lastAdapterEventSignature = null;
|
|
186
|
+
componentRef = null;
|
|
187
|
+
renderedComponentType = null;
|
|
188
|
+
componentOutputSubscriptions = [];
|
|
182
189
|
block = input.required(...(ngDevMode ? [{ debugName: "block" }] : []));
|
|
183
190
|
runtimeContext = input(null, ...(ngDevMode ? [{ debugName: "runtimeContext" }] : []));
|
|
184
191
|
solution = input(null, ...(ngDevMode ? [{ debugName: "solution" }] : []));
|
|
185
192
|
instance = input(null, ...(ngDevMode ? [{ debugName: "instance" }] : []));
|
|
193
|
+
runtimeContextChange = output();
|
|
186
194
|
operationalEvent = output();
|
|
187
195
|
resolvedComponent = signal(null, ...(ngDevMode ? [{ debugName: "resolvedComponent" }] : []));
|
|
188
196
|
state = signal({ kind: 'idle' }, ...(ngDevMode ? [{ debugName: "state" }] : []));
|
|
@@ -231,23 +239,39 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
231
239
|
return errorState.message;
|
|
232
240
|
}
|
|
233
241
|
if (snapshotState?.readiness === 'invalid') {
|
|
234
|
-
return
|
|
242
|
+
return this.t('dataCollection.fallback.invalid', 'O bloco "{formBlockId}" foi materializado com estado invalido. Revise formBlockId, formConfigRef e a configuracao editorial herdada.', { formBlockId: block.formBlockId });
|
|
235
243
|
}
|
|
236
244
|
if (snapshotState?.readiness === 'missingConfig') {
|
|
237
|
-
return
|
|
245
|
+
return this.t('dataCollection.fallback.missingConfig', 'O bloco "{formBlockId}" nao encontrou configuracao de coleta. Chave consultada: {lookupKey}.', {
|
|
246
|
+
formBlockId: block.formBlockId,
|
|
247
|
+
lookupKey: snapshotState.resolvedFormConfigLookupKey ?? 'nenhuma chave candidata',
|
|
248
|
+
});
|
|
238
249
|
}
|
|
239
250
|
if (adapterResolution.status === 'incompatible') {
|
|
240
|
-
return
|
|
251
|
+
return this.t('dataCollection.fallback.incompatible', 'O bloco "{formBlockId}" encontrou adapters registrados ({adapterIds}), mas nenhum declarou compatibilidade para esta coleta.', {
|
|
252
|
+
formBlockId: block.formBlockId,
|
|
253
|
+
adapterIds: adapterResolution.adapterIds.join(', ') || 'nenhum',
|
|
254
|
+
});
|
|
241
255
|
}
|
|
242
256
|
if (!resolution.formConfig && adapterResolution.status === 'missing') {
|
|
243
|
-
return
|
|
257
|
+
return this.t('dataCollection.fallback.missingAdapter', 'O bloco "{formBlockId}" nao encontrou configuracao de coleta nem adaptador registrado. Verifique o provider do host e a materializacao do FormConfig editorial.', { formBlockId: block.formBlockId });
|
|
244
258
|
}
|
|
245
259
|
if (!resolution.formConfig) {
|
|
246
|
-
return
|
|
260
|
+
return this.t('dataCollection.fallback.adapterWithoutConfig', 'O bloco "{formBlockId}" encontrou um adaptador, mas nao encontrou FormConfig em {lookupKey}.', {
|
|
261
|
+
formBlockId: block.formBlockId,
|
|
262
|
+
lookupKey: resolution.lookupKey ?? 'nenhuma chave conhecida',
|
|
263
|
+
});
|
|
247
264
|
}
|
|
248
|
-
return
|
|
265
|
+
return this.t('dataCollection.fallback.unresolvedEngine', 'Existe configuracao para "{formBlockId}" ({source}), mas nenhum adaptador de coleta foi registrado para materializar a engine.', {
|
|
266
|
+
formBlockId: block.formBlockId,
|
|
267
|
+
source: resolution.source,
|
|
268
|
+
});
|
|
249
269
|
}, ...(ngDevMode ? [{ debugName: "fallbackMessage" }] : []));
|
|
270
|
+
effectiveSurface = computed(() => this.block().surface === 'plain' ? 'plain' : 'card', ...(ngDevMode ? [{ debugName: "effectiveSurface" }] : []));
|
|
250
271
|
constructor() {
|
|
272
|
+
this.destroyRef.onDestroy(() => {
|
|
273
|
+
this.destroyRenderedComponent();
|
|
274
|
+
});
|
|
251
275
|
effect(() => {
|
|
252
276
|
const context = this.adapterContext();
|
|
253
277
|
const resolution = this.resolution();
|
|
@@ -261,9 +285,9 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
261
285
|
if (adapterResolution.status === 'incompatible') {
|
|
262
286
|
this.state.set({
|
|
263
287
|
kind: 'error',
|
|
264
|
-
title: 'Adaptador incompatível',
|
|
265
|
-
message:
|
|
266
|
-
details:
|
|
288
|
+
title: this.t('dataCollection.error.incompatibleTitle', 'Adaptador incompatível'),
|
|
289
|
+
message: this.t('dataCollection.error.incompatibleMessage', 'Nenhum adaptador registrado aceitou o bloco "{formBlockId}".', { formBlockId: context.block.formBlockId }),
|
|
290
|
+
details: this.t('dataCollection.error.availableAdapters', 'Adapters disponiveis: {adapterIds}.', { adapterIds: adapterResolution.adapterIds.join(', ') || 'nenhum' }),
|
|
267
291
|
});
|
|
268
292
|
}
|
|
269
293
|
return;
|
|
@@ -272,9 +296,9 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
272
296
|
this.resolvedComponent.set(null);
|
|
273
297
|
this.state.set({
|
|
274
298
|
kind: 'error',
|
|
275
|
-
title: 'Configuracao de coleta ausente',
|
|
276
|
-
message:
|
|
277
|
-
details:
|
|
299
|
+
title: this.t('dataCollection.error.missingConfigTitle', 'Configuracao de coleta ausente'),
|
|
300
|
+
message: this.t('dataCollection.error.missingConfigMessage', 'O bloco "{formBlockId}" nao possui FormConfig resolvido para a engine de coleta.', { formBlockId: context.block.formBlockId }),
|
|
301
|
+
details: this.t('dataCollection.error.lookupSource', 'Origem consultada: {lookupKey}.', { lookupKey: resolution.lookupKey ?? 'nenhuma chave candidata' }),
|
|
278
302
|
});
|
|
279
303
|
return;
|
|
280
304
|
}
|
|
@@ -282,12 +306,12 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
282
306
|
const component = adapter.component ?? null;
|
|
283
307
|
if (!component) {
|
|
284
308
|
this.resolvedComponent.set(null);
|
|
285
|
-
this.emitAdapterResolutionEvent('invalid', adapter, 'Registre um componente compatível ou implemente resolveComponent().');
|
|
309
|
+
this.emitAdapterResolutionEvent('invalid', adapter, this.t('dataCollection.error.adapterRegistrationHint', 'Registre um componente compatível ou implemente resolveComponent().'));
|
|
286
310
|
this.state.set({
|
|
287
311
|
kind: 'error',
|
|
288
|
-
title: 'Adaptador incompleto',
|
|
289
|
-
message:
|
|
290
|
-
details: 'Registre um componente compatível ou implemente resolveComponent().',
|
|
312
|
+
title: this.t('dataCollection.error.incompleteAdapterTitle', 'Adaptador incompleto'),
|
|
313
|
+
message: this.t('dataCollection.error.incompleteAdapterMessage', 'O adaptador "{adapterName}" nao expôs um componente de coleta.', { adapterName: adapter.displayName ?? adapter.adapterId }),
|
|
314
|
+
details: this.t('dataCollection.error.adapterRegistrationHint', 'Registre um componente compatível ou implemente resolveComponent().'),
|
|
291
315
|
});
|
|
292
316
|
return;
|
|
293
317
|
}
|
|
@@ -296,10 +320,26 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
296
320
|
}
|
|
297
321
|
this.state.set({
|
|
298
322
|
kind: 'loading',
|
|
299
|
-
message:
|
|
323
|
+
message: this.t('dataCollection.loadingMessage', 'Carregando a engine de coleta para "{formBlockId}"...', { formBlockId: context.block.formBlockId }),
|
|
300
324
|
});
|
|
301
325
|
void this.loadAdapterComponent(adapter, context, requestVersion);
|
|
302
326
|
});
|
|
327
|
+
effect(() => {
|
|
328
|
+
const component = this.adapterComponent();
|
|
329
|
+
const host = this.adapterHost();
|
|
330
|
+
if (!host || !component) {
|
|
331
|
+
this.destroyRenderedComponent();
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
if (this.renderedComponentType !== component) {
|
|
335
|
+
this.destroyRenderedComponent();
|
|
336
|
+
host.clear();
|
|
337
|
+
this.componentRef = host.createComponent(component);
|
|
338
|
+
this.renderedComponentType = component;
|
|
339
|
+
this.bindComponentOutputs(this.componentRef);
|
|
340
|
+
}
|
|
341
|
+
this.applyComponentInputs();
|
|
342
|
+
});
|
|
303
343
|
}
|
|
304
344
|
async loadAdapterComponent(adapter, context, requestVersion) {
|
|
305
345
|
try {
|
|
@@ -313,9 +353,12 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
313
353
|
this.resolvedComponent.set(null);
|
|
314
354
|
this.state.set({
|
|
315
355
|
kind: 'error',
|
|
316
|
-
title: 'Falha ao carregar a engine',
|
|
317
|
-
message:
|
|
318
|
-
|
|
356
|
+
title: this.t('dataCollection.error.loadFailureTitle', 'Falha ao carregar a engine'),
|
|
357
|
+
message: this.t('dataCollection.error.loadFailureMessage', 'O adaptador "{adapterName}" falhou ao preparar a coleta do bloco "{formBlockId}".', {
|
|
358
|
+
adapterName: adapter.displayName ?? adapter.adapterId,
|
|
359
|
+
formBlockId: context.block.formBlockId,
|
|
360
|
+
}),
|
|
361
|
+
details: this.t('dataCollection.error.loadFailureDetails', 'Valide o provider opcional do host e a disponibilidade do componente compatível.'),
|
|
319
362
|
});
|
|
320
363
|
}
|
|
321
364
|
}
|
|
@@ -327,9 +370,12 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
327
370
|
this.resolvedComponent.set(null);
|
|
328
371
|
this.state.set({
|
|
329
372
|
kind: 'error',
|
|
330
|
-
title: 'Componente nao resolvido',
|
|
331
|
-
message:
|
|
332
|
-
|
|
373
|
+
title: this.t('dataCollection.error.unresolvedComponentTitle', 'Componente nao resolvido'),
|
|
374
|
+
message: this.t('dataCollection.error.unresolvedComponentMessage', 'O adaptador "{adapterName}" nao retornou um componente para o bloco "{formBlockId}".', {
|
|
375
|
+
adapterName: adapter.displayName ?? adapter.adapterId,
|
|
376
|
+
formBlockId: context.block.formBlockId,
|
|
377
|
+
}),
|
|
378
|
+
details: this.t('dataCollection.error.unresolvedComponentDetails', 'Implemente component ou resolveComponent() com um componente Angular compatível.'),
|
|
333
379
|
});
|
|
334
380
|
return;
|
|
335
381
|
}
|
|
@@ -339,8 +385,11 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
339
385
|
this.emitAdapterResolutionEvent('invalid', adapter, validation.reason);
|
|
340
386
|
this.state.set({
|
|
341
387
|
kind: 'error',
|
|
342
|
-
title: 'Componente incompatível',
|
|
343
|
-
message:
|
|
388
|
+
title: this.t('dataCollection.error.invalidComponentTitle', 'Componente incompatível'),
|
|
389
|
+
message: this.t('dataCollection.error.invalidComponentMessage', 'O adaptador "{adapterName}" retornou um componente incompatível para "{formBlockId}".', {
|
|
390
|
+
adapterName: adapter.displayName ?? adapter.adapterId,
|
|
391
|
+
formBlockId: context.block.formBlockId,
|
|
392
|
+
}),
|
|
344
393
|
details: validation.reason,
|
|
345
394
|
});
|
|
346
395
|
return;
|
|
@@ -408,9 +457,71 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
408
457
|
},
|
|
409
458
|
});
|
|
410
459
|
}
|
|
460
|
+
applyComponentInputs() {
|
|
461
|
+
if (!this.componentRef) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
const inputs = {
|
|
465
|
+
block: this.block(),
|
|
466
|
+
runtimeContext: this.runtimeContext(),
|
|
467
|
+
solution: this.solution(),
|
|
468
|
+
instance: this.instance(),
|
|
469
|
+
resolvedFormConfig: this.resolution().formConfig,
|
|
470
|
+
...(this.adapter()?.buildInputs?.(this.adapterContext()) ?? {}),
|
|
471
|
+
};
|
|
472
|
+
for (const [key, value] of Object.entries(inputs)) {
|
|
473
|
+
this.componentRef.setInput(key, value);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
bindComponentOutputs(componentRef) {
|
|
477
|
+
this.componentOutputSubscriptions = [];
|
|
478
|
+
const instance = componentRef.instance;
|
|
479
|
+
const valueChange = instance['valueChange'];
|
|
480
|
+
if (!isSubscribableOutput(valueChange)) {
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
this.componentOutputSubscriptions.push(valueChange.subscribe((event) => {
|
|
484
|
+
const payload = extractFormDataChangeEvent(event);
|
|
485
|
+
if (!payload) {
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
this.runtimeContextChange.emit(this.mergeFormDataIntoRuntimeContext(payload));
|
|
489
|
+
}));
|
|
490
|
+
}
|
|
491
|
+
mergeFormDataIntoRuntimeContext(payload) {
|
|
492
|
+
const runtimeContext = this.runtimeContext();
|
|
493
|
+
const currentFormData = readRuntimeFormData(runtimeContext);
|
|
494
|
+
const nextFormData = payload.mode === 'replace'
|
|
495
|
+
? { ...payload.formData }
|
|
496
|
+
: { ...currentFormData, ...payload.formData };
|
|
497
|
+
for (const key of payload.removedKeys ?? []) {
|
|
498
|
+
delete nextFormData[key];
|
|
499
|
+
}
|
|
500
|
+
return {
|
|
501
|
+
...(runtimeContext ?? {}),
|
|
502
|
+
formData: nextFormData,
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
destroyRenderedComponent() {
|
|
506
|
+
for (const subscription of this.componentOutputSubscriptions) {
|
|
507
|
+
subscription.unsubscribe();
|
|
508
|
+
}
|
|
509
|
+
this.componentOutputSubscriptions = [];
|
|
510
|
+
this.componentRef?.destroy();
|
|
511
|
+
this.componentRef = null;
|
|
512
|
+
this.renderedComponentType = null;
|
|
513
|
+
}
|
|
514
|
+
t(key, fallback, params) {
|
|
515
|
+
return this.i18n.t(`praxis.editorialForms.${key}`, params, fallback);
|
|
516
|
+
}
|
|
411
517
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialDataCollectionBlockOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
412
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialDataCollectionBlockOutletComponent, isStandalone: true, selector: "praxis-editorial-data-collection-block-outlet", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: true, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null }, solution: { classPropertyName: "solution", publicName: "solution", isSignal: true, isRequired: false, transformFunction: null }, instance: { classPropertyName: "instance", publicName: "instance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { operationalEvent: "operationalEvent" }, ngImport: i0, template: `
|
|
413
|
-
<section
|
|
518
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialDataCollectionBlockOutletComponent, isStandalone: true, selector: "praxis-editorial-data-collection-block-outlet", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: true, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null }, solution: { classPropertyName: "solution", publicName: "solution", isSignal: true, isRequired: false, transformFunction: null }, instance: { classPropertyName: "instance", publicName: "instance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { runtimeContextChange: "runtimeContextChange", operationalEvent: "operationalEvent" }, viewQueries: [{ propertyName: "adapterHost", first: true, predicate: ["adapterHost"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: `
|
|
519
|
+
<section
|
|
520
|
+
class="data-block"
|
|
521
|
+
[class.block-card]="effectiveSurface() === 'card'"
|
|
522
|
+
[class.block-plain]="effectiveSurface() === 'plain'"
|
|
523
|
+
[attr.data-surface]="effectiveSurface()"
|
|
524
|
+
>
|
|
414
525
|
@if (block().title) {
|
|
415
526
|
<h3>{{ block().title }}</h3>
|
|
416
527
|
}
|
|
@@ -420,12 +531,10 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
420
531
|
}
|
|
421
532
|
|
|
422
533
|
@if (adapterComponent(); as adapterComponent) {
|
|
423
|
-
<ng-
|
|
424
|
-
*ngComponentOutlet="adapterComponent; inputs: adapterInputs()"
|
|
425
|
-
/>
|
|
534
|
+
<ng-template #adapterHost></ng-template>
|
|
426
535
|
} @else if (loadingState(); as loadingState) {
|
|
427
536
|
<div class="feedback status" role="status" aria-live="polite" aria-atomic="true">
|
|
428
|
-
<strong>Preparando coleta</strong>
|
|
537
|
+
<strong>{{ t('dataCollection.loadingTitle', 'Preparando coleta') }}</strong>
|
|
429
538
|
<p>{{ loadingState.message }}</p>
|
|
430
539
|
</div>
|
|
431
540
|
} @else if (errorState(); as errorState) {
|
|
@@ -438,17 +547,22 @@ class EditorialDataCollectionBlockOutletComponent {
|
|
|
438
547
|
</div>
|
|
439
548
|
} @else {
|
|
440
549
|
<div class="feedback status" role="status" aria-live="polite" aria-atomic="true">
|
|
441
|
-
<strong>Coleta nao disponivel</strong>
|
|
550
|
+
<strong>{{ t('dataCollection.unavailableTitle', 'Coleta nao disponivel') }}</strong>
|
|
442
551
|
<p>{{ fallbackMessage() }}</p>
|
|
443
552
|
</div>
|
|
444
553
|
}
|
|
445
554
|
</section>
|
|
446
|
-
`, isInline: true, styles: [":host{display:block}.block-card{display:grid;gap:12px;padding:18px;border-radius:18px;background:var(--md-sys-color-surface-container-low, #f7f2fa);border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 65%,transparent)}h3,p{margin:0}.description,.feedback{color:var(--md-sys-color-on-surface-variant, #49454f)}.feedback{display:grid;gap:6px;padding:12px 14px;border-radius:14px;border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 70%,transparent);background:var(--md-sys-color-surface, #fff)}.feedback strong{color:var(--md-sys-color-on-surface, #1b1b1f)}.error{border-color:color-mix(in srgb,var(--md-sys-color-error, #b3261e) 50%,transparent);background:color-mix(in srgb,var(--md-sys-color-error-container, #f9dedc) 35%,var(--md-sys-color-surface, #fff))}.details{font-size:.9rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }
|
|
555
|
+
`, isInline: true, styles: [":host{display:block}.data-block{display:grid;gap:12px}.block-card{display:grid;gap:12px;padding:18px;border-radius:var(--editorial-card-radius, 18px);background:var(--editorial-surface-secondary, var(--md-sys-color-surface-container-low, #f7f2fa));border:1px solid color-mix(in srgb,var(--editorial-border-color, var(--md-sys-color-outline-variant, #cac4d0)) 65%,transparent);box-shadow:var(--editorial-card-shadow, none)}.block-plain{padding:0;border:0;background:transparent;box-shadow:none}h3,p{margin:0}.description,.feedback{color:var(--md-sys-color-on-surface-variant, #49454f)}.feedback{display:grid;gap:6px;padding:12px 14px;border-radius:14px;border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 70%,transparent);background:var(--md-sys-color-surface, #fff)}.feedback strong{color:var(--md-sys-color-on-surface, #1b1b1f)}.error{border-color:color-mix(in srgb,var(--md-sys-color-error, #b3261e) 50%,transparent);background:color-mix(in srgb,var(--md-sys-color-error-container, #f9dedc) 35%,var(--md-sys-color-surface, #fff))}.details{font-size:.9rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
447
556
|
}
|
|
448
557
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialDataCollectionBlockOutletComponent, decorators: [{
|
|
449
558
|
type: Component,
|
|
450
|
-
args: [{ selector: 'praxis-editorial-data-collection-block-outlet', standalone: true, imports: [CommonModule
|
|
451
|
-
<section
|
|
559
|
+
args: [{ selector: 'praxis-editorial-data-collection-block-outlet', standalone: true, imports: [CommonModule], template: `
|
|
560
|
+
<section
|
|
561
|
+
class="data-block"
|
|
562
|
+
[class.block-card]="effectiveSurface() === 'card'"
|
|
563
|
+
[class.block-plain]="effectiveSurface() === 'plain'"
|
|
564
|
+
[attr.data-surface]="effectiveSurface()"
|
|
565
|
+
>
|
|
452
566
|
@if (block().title) {
|
|
453
567
|
<h3>{{ block().title }}</h3>
|
|
454
568
|
}
|
|
@@ -458,12 +572,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
458
572
|
}
|
|
459
573
|
|
|
460
574
|
@if (adapterComponent(); as adapterComponent) {
|
|
461
|
-
<ng-
|
|
462
|
-
*ngComponentOutlet="adapterComponent; inputs: adapterInputs()"
|
|
463
|
-
/>
|
|
575
|
+
<ng-template #adapterHost></ng-template>
|
|
464
576
|
} @else if (loadingState(); as loadingState) {
|
|
465
577
|
<div class="feedback status" role="status" aria-live="polite" aria-atomic="true">
|
|
466
|
-
<strong>Preparando coleta</strong>
|
|
578
|
+
<strong>{{ t('dataCollection.loadingTitle', 'Preparando coleta') }}</strong>
|
|
467
579
|
<p>{{ loadingState.message }}</p>
|
|
468
580
|
</div>
|
|
469
581
|
} @else if (errorState(); as errorState) {
|
|
@@ -476,30 +588,680 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
476
588
|
</div>
|
|
477
589
|
} @else {
|
|
478
590
|
<div class="feedback status" role="status" aria-live="polite" aria-atomic="true">
|
|
479
|
-
<strong>Coleta nao disponivel</strong>
|
|
591
|
+
<strong>{{ t('dataCollection.unavailableTitle', 'Coleta nao disponivel') }}</strong>
|
|
480
592
|
<p>{{ fallbackMessage() }}</p>
|
|
481
593
|
</div>
|
|
482
594
|
}
|
|
483
595
|
</section>
|
|
484
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.block-card{display:grid;gap:12px;padding:18px;border-radius:18px;background:var(--md-sys-color-surface-container-low, #f7f2fa);border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 65%,transparent)}h3,p{margin:0}.description,.feedback{color:var(--md-sys-color-on-surface-variant, #49454f)}.feedback{display:grid;gap:6px;padding:12px 14px;border-radius:14px;border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 70%,transparent);background:var(--md-sys-color-surface, #fff)}.feedback strong{color:var(--md-sys-color-on-surface, #1b1b1f)}.error{border-color:color-mix(in srgb,var(--md-sys-color-error, #b3261e) 50%,transparent);background:color-mix(in srgb,var(--md-sys-color-error-container, #f9dedc) 35%,var(--md-sys-color-surface, #fff))}.details{font-size:.9rem}\n"] }]
|
|
485
|
-
}], ctorParameters: () => [], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: true }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }], solution: [{ type: i0.Input, args: [{ isSignal: true, alias: "solution", required: false }] }], instance: [{ type: i0.Input, args: [{ isSignal: true, alias: "instance", required: false }] }], operationalEvent: [{ type: i0.Output, args: ["operationalEvent"] }] } });
|
|
596
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.data-block{display:grid;gap:12px}.block-card{display:grid;gap:12px;padding:18px;border-radius:var(--editorial-card-radius, 18px);background:var(--editorial-surface-secondary, var(--md-sys-color-surface-container-low, #f7f2fa));border:1px solid color-mix(in srgb,var(--editorial-border-color, var(--md-sys-color-outline-variant, #cac4d0)) 65%,transparent);box-shadow:var(--editorial-card-shadow, none)}.block-plain{padding:0;border:0;background:transparent;box-shadow:none}h3,p{margin:0}.description,.feedback{color:var(--md-sys-color-on-surface-variant, #49454f)}.feedback{display:grid;gap:6px;padding:12px 14px;border-radius:14px;border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 70%,transparent);background:var(--md-sys-color-surface, #fff)}.feedback strong{color:var(--md-sys-color-on-surface, #1b1b1f)}.error{border-color:color-mix(in srgb,var(--md-sys-color-error, #b3261e) 50%,transparent);background:color-mix(in srgb,var(--md-sys-color-error-container, #f9dedc) 35%,var(--md-sys-color-surface, #fff))}.details{font-size:.9rem}\n"] }]
|
|
597
|
+
}], ctorParameters: () => [], propDecorators: { adapterHost: [{ type: i0.ViewChild, args: ['adapterHost', { ...{ read: ViewContainerRef }, isSignal: true }] }], block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: true }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }], solution: [{ type: i0.Input, args: [{ isSignal: true, alias: "solution", required: false }] }], instance: [{ type: i0.Input, args: [{ isSignal: true, alias: "instance", required: false }] }], runtimeContextChange: [{ type: i0.Output, args: ["runtimeContextChange"] }], operationalEvent: [{ type: i0.Output, args: ["operationalEvent"] }] } });
|
|
598
|
+
function isSubscribableOutput(candidate) {
|
|
599
|
+
return !!candidate && typeof candidate === 'object' && typeof candidate.subscribe === 'function';
|
|
600
|
+
}
|
|
601
|
+
function extractFormDataChangeEvent(event) {
|
|
602
|
+
if (!event || typeof event !== 'object') {
|
|
603
|
+
return null;
|
|
604
|
+
}
|
|
605
|
+
const formData = event.formData;
|
|
606
|
+
if (!formData || typeof formData !== 'object' || Array.isArray(formData)) {
|
|
607
|
+
return null;
|
|
608
|
+
}
|
|
609
|
+
const mode = event.mode;
|
|
610
|
+
const removedKeys = event.removedKeys;
|
|
611
|
+
return {
|
|
612
|
+
formData: { ...formData },
|
|
613
|
+
mode: mode === 'replace' ? 'replace' : 'merge',
|
|
614
|
+
removedKeys: Array.isArray(removedKeys)
|
|
615
|
+
? removedKeys.filter((item) => typeof item === 'string')
|
|
616
|
+
: undefined,
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
function readRuntimeFormData(runtimeContext) {
|
|
620
|
+
const formData = runtimeContext?.['formData'];
|
|
621
|
+
if (!formData || typeof formData !== 'object' || Array.isArray(formData)) {
|
|
622
|
+
return {};
|
|
623
|
+
}
|
|
624
|
+
return formData;
|
|
625
|
+
}
|
|
486
626
|
function isResolvedDataCollectionBlock(block) {
|
|
487
627
|
return 'dataCollectionState' in block;
|
|
488
628
|
}
|
|
489
629
|
|
|
630
|
+
class EditorialIntroHeroBlockComponent {
|
|
631
|
+
block = input.required(...(ngDevMode ? [{ debugName: "block" }] : []));
|
|
632
|
+
actionTriggered = output();
|
|
633
|
+
triggerAction(action) {
|
|
634
|
+
this.actionTriggered.emit(action.actionId);
|
|
635
|
+
}
|
|
636
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialIntroHeroBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
637
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialIntroHeroBlockComponent, isStandalone: true, selector: "praxis-editorial-intro-hero-block", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered" }, ngImport: i0, template: `
|
|
638
|
+
<section class="intro-hero" [attr.data-align]="block().align ?? 'center'">
|
|
639
|
+
@if (block().icon?.name) {
|
|
640
|
+
<div class="hero-icon"><mat-icon aria-hidden="true" [praxisIcon]="block().icon?.name"></mat-icon></div>
|
|
641
|
+
}
|
|
642
|
+
<div class="hero-copy">
|
|
643
|
+
<h3>{{ block().title }}</h3>
|
|
644
|
+
@if (block().subtitle) {
|
|
645
|
+
<p class="subtitle">{{ block().subtitle }}</p>
|
|
646
|
+
}
|
|
647
|
+
@if (block().description) {
|
|
648
|
+
<p class="description">{{ block().description }}</p>
|
|
649
|
+
}
|
|
650
|
+
</div>
|
|
651
|
+
|
|
652
|
+
@if (block().highlightItems?.length) {
|
|
653
|
+
<div class="hero-highlights">
|
|
654
|
+
@for (item of block().highlightItems; track item.id) {
|
|
655
|
+
<article class="highlight-card">
|
|
656
|
+
@if (item.icon?.name) {
|
|
657
|
+
<mat-icon class="highlight-icon" aria-hidden="true" [praxisIcon]="item.icon?.name"></mat-icon>
|
|
658
|
+
}
|
|
659
|
+
<strong>{{ item.title }}</strong>
|
|
660
|
+
@if (item.description) {
|
|
661
|
+
<p>{{ item.description }}</p>
|
|
662
|
+
}
|
|
663
|
+
</article>
|
|
664
|
+
}
|
|
665
|
+
</div>
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
@if (block().primaryAction || block().secondaryAction) {
|
|
669
|
+
<div class="hero-actions">
|
|
670
|
+
@if (block().primaryAction; as action) {
|
|
671
|
+
<button
|
|
672
|
+
type="button"
|
|
673
|
+
class="hero-action primary"
|
|
674
|
+
[attr.data-appearance]="action.appearance ?? 'primary'"
|
|
675
|
+
(click)="triggerAction(action)"
|
|
676
|
+
>
|
|
677
|
+
@if (action.icon?.name) {
|
|
678
|
+
<mat-icon aria-hidden="true" [praxisIcon]="action.icon?.name"></mat-icon>
|
|
679
|
+
}
|
|
680
|
+
<span>{{ action.label }}</span>
|
|
681
|
+
</button>
|
|
682
|
+
}
|
|
683
|
+
@if (block().secondaryAction; as action) {
|
|
684
|
+
<button
|
|
685
|
+
type="button"
|
|
686
|
+
class="hero-action secondary"
|
|
687
|
+
[attr.data-appearance]="action.appearance ?? 'secondary'"
|
|
688
|
+
(click)="triggerAction(action)"
|
|
689
|
+
>
|
|
690
|
+
@if (action.icon?.name) {
|
|
691
|
+
<mat-icon aria-hidden="true" [praxisIcon]="action.icon?.name"></mat-icon>
|
|
692
|
+
}
|
|
693
|
+
<span>{{ action.label }}</span>
|
|
694
|
+
</button>
|
|
695
|
+
}
|
|
696
|
+
</div>
|
|
697
|
+
}
|
|
698
|
+
</section>
|
|
699
|
+
`, isInline: true, styles: [".intro-hero{display:grid;gap:18px;text-align:center}.intro-hero[data-align=left]{text-align:left}.hero-icon{width:64px;height:64px;border-radius:18px;background:color-mix(in srgb,var(--editorial-accent, #264a8a) 18%,#fff);color:var(--editorial-accent, #264a8a);display:grid;place-items:center;justify-self:center;font-weight:700}.hero-icon mat-icon,.highlight-icon{width:22px;height:22px;font-size:22px;line-height:22px}.intro-hero[data-align=left] .hero-icon{justify-self:start}.hero-copy{display:grid;gap:10px}.hero-copy h3,.hero-copy p{margin:0}.hero-copy h3{font-size:var(--editorial-hero-title-size, 1.75rem);line-height:1.15}.subtitle,.description{font-size:var(--editorial-body-size, 1rem);color:var(--editorial-text-secondary, #7b8aa0)}.hero-highlights{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.hero-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.intro-hero[data-align=left] .hero-actions{justify-content:flex-start}.hero-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 20px;border-radius:var(--editorial-button-radius, var(--editorial-card-radius, 18px));border:1px solid transparent;cursor:pointer;font:inherit;font-weight:600;transition:background-color .12s ease,color .12s ease,border-color .12s ease,box-shadow .12s ease}.hero-action mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.hero-action.primary{background:var(--editorial-cta-primary, var(--editorial-accent, #264a8a));color:var(--editorial-cta-primary-text, #fff);box-shadow:var(--editorial-card-shadow, none)}.hero-action.secondary{background:color-mix(in srgb,var(--editorial-accent, #264a8a) 8%,#fff);border-color:color-mix(in srgb,var(--editorial-accent, #264a8a) 20%,transparent);color:var(--editorial-accent, #264a8a)}.highlight-card{display:grid;gap:6px;padding:14px;border-radius:var(--editorial-card-radius, 18px);background:var(--editorial-surface-primary, #fff);border:1px solid var(--editorial-border-color, #d9deea);box-shadow:var(--editorial-card-shadow, none)}.highlight-card p{margin:0;color:var(--editorial-text-secondary, #7b8aa0)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
700
|
+
}
|
|
701
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialIntroHeroBlockComponent, decorators: [{
|
|
702
|
+
type: Component,
|
|
703
|
+
args: [{ selector: 'praxis-editorial-intro-hero-block', standalone: true, imports: [CommonModule, MatIconModule, PraxisIconDirective], template: `
|
|
704
|
+
<section class="intro-hero" [attr.data-align]="block().align ?? 'center'">
|
|
705
|
+
@if (block().icon?.name) {
|
|
706
|
+
<div class="hero-icon"><mat-icon aria-hidden="true" [praxisIcon]="block().icon?.name"></mat-icon></div>
|
|
707
|
+
}
|
|
708
|
+
<div class="hero-copy">
|
|
709
|
+
<h3>{{ block().title }}</h3>
|
|
710
|
+
@if (block().subtitle) {
|
|
711
|
+
<p class="subtitle">{{ block().subtitle }}</p>
|
|
712
|
+
}
|
|
713
|
+
@if (block().description) {
|
|
714
|
+
<p class="description">{{ block().description }}</p>
|
|
715
|
+
}
|
|
716
|
+
</div>
|
|
717
|
+
|
|
718
|
+
@if (block().highlightItems?.length) {
|
|
719
|
+
<div class="hero-highlights">
|
|
720
|
+
@for (item of block().highlightItems; track item.id) {
|
|
721
|
+
<article class="highlight-card">
|
|
722
|
+
@if (item.icon?.name) {
|
|
723
|
+
<mat-icon class="highlight-icon" aria-hidden="true" [praxisIcon]="item.icon?.name"></mat-icon>
|
|
724
|
+
}
|
|
725
|
+
<strong>{{ item.title }}</strong>
|
|
726
|
+
@if (item.description) {
|
|
727
|
+
<p>{{ item.description }}</p>
|
|
728
|
+
}
|
|
729
|
+
</article>
|
|
730
|
+
}
|
|
731
|
+
</div>
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
@if (block().primaryAction || block().secondaryAction) {
|
|
735
|
+
<div class="hero-actions">
|
|
736
|
+
@if (block().primaryAction; as action) {
|
|
737
|
+
<button
|
|
738
|
+
type="button"
|
|
739
|
+
class="hero-action primary"
|
|
740
|
+
[attr.data-appearance]="action.appearance ?? 'primary'"
|
|
741
|
+
(click)="triggerAction(action)"
|
|
742
|
+
>
|
|
743
|
+
@if (action.icon?.name) {
|
|
744
|
+
<mat-icon aria-hidden="true" [praxisIcon]="action.icon?.name"></mat-icon>
|
|
745
|
+
}
|
|
746
|
+
<span>{{ action.label }}</span>
|
|
747
|
+
</button>
|
|
748
|
+
}
|
|
749
|
+
@if (block().secondaryAction; as action) {
|
|
750
|
+
<button
|
|
751
|
+
type="button"
|
|
752
|
+
class="hero-action secondary"
|
|
753
|
+
[attr.data-appearance]="action.appearance ?? 'secondary'"
|
|
754
|
+
(click)="triggerAction(action)"
|
|
755
|
+
>
|
|
756
|
+
@if (action.icon?.name) {
|
|
757
|
+
<mat-icon aria-hidden="true" [praxisIcon]="action.icon?.name"></mat-icon>
|
|
758
|
+
}
|
|
759
|
+
<span>{{ action.label }}</span>
|
|
760
|
+
</button>
|
|
761
|
+
}
|
|
762
|
+
</div>
|
|
763
|
+
}
|
|
764
|
+
</section>
|
|
765
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".intro-hero{display:grid;gap:18px;text-align:center}.intro-hero[data-align=left]{text-align:left}.hero-icon{width:64px;height:64px;border-radius:18px;background:color-mix(in srgb,var(--editorial-accent, #264a8a) 18%,#fff);color:var(--editorial-accent, #264a8a);display:grid;place-items:center;justify-self:center;font-weight:700}.hero-icon mat-icon,.highlight-icon{width:22px;height:22px;font-size:22px;line-height:22px}.intro-hero[data-align=left] .hero-icon{justify-self:start}.hero-copy{display:grid;gap:10px}.hero-copy h3,.hero-copy p{margin:0}.hero-copy h3{font-size:var(--editorial-hero-title-size, 1.75rem);line-height:1.15}.subtitle,.description{font-size:var(--editorial-body-size, 1rem);color:var(--editorial-text-secondary, #7b8aa0)}.hero-highlights{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.hero-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.intro-hero[data-align=left] .hero-actions{justify-content:flex-start}.hero-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 20px;border-radius:var(--editorial-button-radius, var(--editorial-card-radius, 18px));border:1px solid transparent;cursor:pointer;font:inherit;font-weight:600;transition:background-color .12s ease,color .12s ease,border-color .12s ease,box-shadow .12s ease}.hero-action mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.hero-action.primary{background:var(--editorial-cta-primary, var(--editorial-accent, #264a8a));color:var(--editorial-cta-primary-text, #fff);box-shadow:var(--editorial-card-shadow, none)}.hero-action.secondary{background:color-mix(in srgb,var(--editorial-accent, #264a8a) 8%,#fff);border-color:color-mix(in srgb,var(--editorial-accent, #264a8a) 20%,transparent);color:var(--editorial-accent, #264a8a)}.highlight-card{display:grid;gap:6px;padding:14px;border-radius:var(--editorial-card-radius, 18px);background:var(--editorial-surface-primary, #fff);border:1px solid var(--editorial-border-color, #d9deea);box-shadow:var(--editorial-card-shadow, none)}.highlight-card p{margin:0;color:var(--editorial-text-secondary, #7b8aa0)}\n"] }]
|
|
766
|
+
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: true }] }], actionTriggered: [{ type: i0.Output, args: ["actionTriggered"] }] } });
|
|
767
|
+
|
|
768
|
+
class EditorialReviewSectionsBlockComponent {
|
|
769
|
+
i18n = inject(PraxisI18nService);
|
|
770
|
+
block = input.required(...(ngDevMode ? [{ debugName: "block" }] : []));
|
|
771
|
+
runtimeContext = input(null, ...(ngDevMode ? [{ debugName: "runtimeContext" }] : []));
|
|
772
|
+
visibleFields(fields) {
|
|
773
|
+
return fields.filter((field) => {
|
|
774
|
+
if (!field.hideWhenEmpty) {
|
|
775
|
+
return true;
|
|
776
|
+
}
|
|
777
|
+
return this.readValue(field) != null && this.readValue(field) !== '';
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
resolveValue(field) {
|
|
781
|
+
const value = this.readValue(field);
|
|
782
|
+
if (value == null || value === '') {
|
|
783
|
+
return this.t('review.empty', '-');
|
|
784
|
+
}
|
|
785
|
+
return this.formatValue(value, field.format);
|
|
786
|
+
}
|
|
787
|
+
readValue(field) {
|
|
788
|
+
return getValueAtPath(this.runtimeContext() ?? {}, field.valuePath);
|
|
789
|
+
}
|
|
790
|
+
formatValue(value, format) {
|
|
791
|
+
switch (format) {
|
|
792
|
+
case 'date':
|
|
793
|
+
return this.formatDateValue(value);
|
|
794
|
+
case 'phone':
|
|
795
|
+
return this.formatPhoneValue(value);
|
|
796
|
+
case 'email':
|
|
797
|
+
return String(value);
|
|
798
|
+
case 'boolean':
|
|
799
|
+
return this.formatBooleanValue(value);
|
|
800
|
+
case 'list':
|
|
801
|
+
return this.formatListValue(value);
|
|
802
|
+
case 'text':
|
|
803
|
+
default:
|
|
804
|
+
if (Array.isArray(value)) {
|
|
805
|
+
return this.formatListValue(value);
|
|
806
|
+
}
|
|
807
|
+
if (typeof value === 'boolean') {
|
|
808
|
+
return this.formatBooleanValue(value);
|
|
809
|
+
}
|
|
810
|
+
return String(value);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
formatDateValue(value) {
|
|
814
|
+
if (value == null || value === '') {
|
|
815
|
+
return this.t('review.empty', '-');
|
|
816
|
+
}
|
|
817
|
+
return this.i18n.formatDate(value);
|
|
818
|
+
}
|
|
819
|
+
formatPhoneValue(value) {
|
|
820
|
+
const raw = String(value ?? '').trim();
|
|
821
|
+
if (!raw) {
|
|
822
|
+
return this.t('review.empty', '-');
|
|
823
|
+
}
|
|
824
|
+
const digits = raw.replace(/\D+/g, '');
|
|
825
|
+
if (digits.length === 11) {
|
|
826
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2, 7)}-${digits.slice(7)}`;
|
|
827
|
+
}
|
|
828
|
+
if (digits.length === 10) {
|
|
829
|
+
return `(${digits.slice(0, 2)}) ${digits.slice(2, 6)}-${digits.slice(6)}`;
|
|
830
|
+
}
|
|
831
|
+
if (digits.length > 11) {
|
|
832
|
+
return `+${digits}`;
|
|
833
|
+
}
|
|
834
|
+
return raw;
|
|
835
|
+
}
|
|
836
|
+
formatBooleanValue(value) {
|
|
837
|
+
return value
|
|
838
|
+
? this.t('review.boolean.true', 'Sim')
|
|
839
|
+
: this.t('review.boolean.false', 'Nao');
|
|
840
|
+
}
|
|
841
|
+
formatListValue(value) {
|
|
842
|
+
if (!Array.isArray(value)) {
|
|
843
|
+
return String(value);
|
|
844
|
+
}
|
|
845
|
+
return value.map((item) => String(item)).join(', ');
|
|
846
|
+
}
|
|
847
|
+
t(key, fallback) {
|
|
848
|
+
return this.i18n.t(`praxis.editorialForms.${key}`, undefined, fallback);
|
|
849
|
+
}
|
|
850
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialReviewSectionsBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
851
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialReviewSectionsBlockComponent, isStandalone: true, selector: "praxis-editorial-review-sections-block", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: true, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
852
|
+
<section class="review-sections">
|
|
853
|
+
@if (block().title) {
|
|
854
|
+
<header class="review-header">
|
|
855
|
+
<h3>{{ block().title }}</h3>
|
|
856
|
+
@if (block().description) {
|
|
857
|
+
<p>{{ block().description }}</p>
|
|
858
|
+
}
|
|
859
|
+
</header>
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
<div class="review-sections-grid">
|
|
863
|
+
@for (section of block().sections; track section.id) {
|
|
864
|
+
<article class="review-section">
|
|
865
|
+
<header class="review-section-header">
|
|
866
|
+
@if (section.icon?.name) {
|
|
867
|
+
<mat-icon class="section-icon" aria-hidden="true" [praxisIcon]="section.icon?.name"></mat-icon>
|
|
868
|
+
}
|
|
869
|
+
<h4>{{ section.title }}</h4>
|
|
870
|
+
</header>
|
|
871
|
+
<dl class="review-grid">
|
|
872
|
+
@for (field of visibleFields(section.fields); track field.key) {
|
|
873
|
+
<div>
|
|
874
|
+
<dt>{{ field.label }}</dt>
|
|
875
|
+
<dd>{{ resolveValue(field) }}</dd>
|
|
876
|
+
</div>
|
|
877
|
+
}
|
|
878
|
+
</dl>
|
|
879
|
+
</article>
|
|
880
|
+
}
|
|
881
|
+
</div>
|
|
882
|
+
</section>
|
|
883
|
+
`, isInline: true, styles: [".review-sections,.review-header{display:grid;gap:10px}.review-header h3,.review-header p,.review-section h4{margin:0}.review-header p{color:var(--editorial-text-secondary, #7b8aa0)}.review-sections-grid{display:grid;gap:14px}.review-section{display:grid;gap:12px;padding:18px;border-radius:var(--editorial-card-radius, 18px);border:1px solid var(--editorial-border-color, #d9deea);background:var(--editorial-surface-primary, #fff);box-shadow:var(--editorial-card-shadow, none)}.review-section-header{display:inline-flex;align-items:center;gap:10px}.section-icon{display:grid;place-items:center;width:18px;height:18px;color:var(--editorial-accent, #264a8a);font-size:18px;line-height:18px}.review-grid{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin:0}.review-grid dt{margin-bottom:4px;color:var(--editorial-text-secondary, #7b8aa0);font-size:.82rem}.review-grid dd{margin:0;font-weight:600;color:var(--editorial-text-primary, #24324a)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
884
|
+
}
|
|
885
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialReviewSectionsBlockComponent, decorators: [{
|
|
886
|
+
type: Component,
|
|
887
|
+
args: [{ selector: 'praxis-editorial-review-sections-block', standalone: true, imports: [CommonModule, MatIconModule, PraxisIconDirective], template: `
|
|
888
|
+
<section class="review-sections">
|
|
889
|
+
@if (block().title) {
|
|
890
|
+
<header class="review-header">
|
|
891
|
+
<h3>{{ block().title }}</h3>
|
|
892
|
+
@if (block().description) {
|
|
893
|
+
<p>{{ block().description }}</p>
|
|
894
|
+
}
|
|
895
|
+
</header>
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
<div class="review-sections-grid">
|
|
899
|
+
@for (section of block().sections; track section.id) {
|
|
900
|
+
<article class="review-section">
|
|
901
|
+
<header class="review-section-header">
|
|
902
|
+
@if (section.icon?.name) {
|
|
903
|
+
<mat-icon class="section-icon" aria-hidden="true" [praxisIcon]="section.icon?.name"></mat-icon>
|
|
904
|
+
}
|
|
905
|
+
<h4>{{ section.title }}</h4>
|
|
906
|
+
</header>
|
|
907
|
+
<dl class="review-grid">
|
|
908
|
+
@for (field of visibleFields(section.fields); track field.key) {
|
|
909
|
+
<div>
|
|
910
|
+
<dt>{{ field.label }}</dt>
|
|
911
|
+
<dd>{{ resolveValue(field) }}</dd>
|
|
912
|
+
</div>
|
|
913
|
+
}
|
|
914
|
+
</dl>
|
|
915
|
+
</article>
|
|
916
|
+
}
|
|
917
|
+
</div>
|
|
918
|
+
</section>
|
|
919
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".review-sections,.review-header{display:grid;gap:10px}.review-header h3,.review-header p,.review-section h4{margin:0}.review-header p{color:var(--editorial-text-secondary, #7b8aa0)}.review-sections-grid{display:grid;gap:14px}.review-section{display:grid;gap:12px;padding:18px;border-radius:var(--editorial-card-radius, 18px);border:1px solid var(--editorial-border-color, #d9deea);background:var(--editorial-surface-primary, #fff);box-shadow:var(--editorial-card-shadow, none)}.review-section-header{display:inline-flex;align-items:center;gap:10px}.section-icon{display:grid;place-items:center;width:18px;height:18px;color:var(--editorial-accent, #264a8a);font-size:18px;line-height:18px}.review-grid{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin:0}.review-grid dt{margin-bottom:4px;color:var(--editorial-text-secondary, #7b8aa0);font-size:.82rem}.review-grid dd{margin:0;font-weight:600;color:var(--editorial-text-primary, #24324a)}\n"] }]
|
|
920
|
+
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: true }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }] } });
|
|
921
|
+
|
|
922
|
+
class EditorialSelectionCardsBlockComponent {
|
|
923
|
+
i18n = inject(PraxisI18nService);
|
|
924
|
+
block = input.required(...(ngDevMode ? [{ debugName: "block" }] : []));
|
|
925
|
+
runtimeContext = input(null, ...(ngDevMode ? [{ debugName: "runtimeContext" }] : []));
|
|
926
|
+
runtimeContextChange = output();
|
|
927
|
+
valueChange = output();
|
|
928
|
+
groupId = computed(() => `selection-group-${this.block().blockId}`, ...(ngDevMode ? [{ debugName: "groupId" }] : []));
|
|
929
|
+
gridTemplateColumns = computed(() => {
|
|
930
|
+
const columns = this.block().columns ?? 2;
|
|
931
|
+
return `repeat(${columns}, minmax(0, 1fr))`;
|
|
932
|
+
}, ...(ngDevMode ? [{ debugName: "gridTemplateColumns" }] : []));
|
|
933
|
+
groupAriaLabel = computed(() => this.block().title
|
|
934
|
+
|| this.t('selection.group.label', 'Grupo de selecao'), ...(ngDevMode ? [{ debugName: "groupAriaLabel" }] : []));
|
|
935
|
+
isSelected(value) {
|
|
936
|
+
const currentValue = this.currentValue();
|
|
937
|
+
if (Array.isArray(currentValue)) {
|
|
938
|
+
return currentValue.includes(value);
|
|
939
|
+
}
|
|
940
|
+
return currentValue === value;
|
|
941
|
+
}
|
|
942
|
+
toggleValue(value) {
|
|
943
|
+
const field = this.block().field;
|
|
944
|
+
if (this.block().selectionMode === 'single') {
|
|
945
|
+
const currentValue = this.currentValue();
|
|
946
|
+
const nextValue = currentValue === value ? null : value;
|
|
947
|
+
this.runtimeContextChange.emit(this.buildNextRuntimeContext(field, nextValue));
|
|
948
|
+
this.valueChange.emit({ field, value: nextValue });
|
|
949
|
+
return;
|
|
950
|
+
}
|
|
951
|
+
const currentValue = this.currentValue();
|
|
952
|
+
const current = Array.isArray(currentValue) ? [...currentValue] : [];
|
|
953
|
+
const index = current.indexOf(value);
|
|
954
|
+
if (index >= 0) {
|
|
955
|
+
current.splice(index, 1);
|
|
956
|
+
}
|
|
957
|
+
else {
|
|
958
|
+
current.push(value);
|
|
959
|
+
}
|
|
960
|
+
this.runtimeContextChange.emit(this.buildNextRuntimeContext(field, current));
|
|
961
|
+
this.valueChange.emit({ field, value: current });
|
|
962
|
+
}
|
|
963
|
+
itemTabIndex(value) {
|
|
964
|
+
if (this.block().selectionMode !== 'single') {
|
|
965
|
+
return 0;
|
|
966
|
+
}
|
|
967
|
+
const currentValue = this.currentValue();
|
|
968
|
+
if (currentValue === value) {
|
|
969
|
+
return 0;
|
|
970
|
+
}
|
|
971
|
+
const firstValue = this.enabledItemValues()[0];
|
|
972
|
+
return firstValue === value && currentValue == null ? 0 : -1;
|
|
973
|
+
}
|
|
974
|
+
handleKeydown(event, value) {
|
|
975
|
+
if (event.key === ' ' || event.key === 'Enter') {
|
|
976
|
+
event.preventDefault();
|
|
977
|
+
this.toggleValue(value);
|
|
978
|
+
return;
|
|
979
|
+
}
|
|
980
|
+
if (!['ArrowRight', 'ArrowDown', 'ArrowLeft', 'ArrowUp'].includes(event.key)) {
|
|
981
|
+
return;
|
|
982
|
+
}
|
|
983
|
+
const enabledValues = this.enabledItemValues();
|
|
984
|
+
const currentIndex = enabledValues.indexOf(value);
|
|
985
|
+
if (currentIndex < 0) {
|
|
986
|
+
return;
|
|
987
|
+
}
|
|
988
|
+
event.preventDefault();
|
|
989
|
+
const nextIndex = event.key === 'ArrowRight' || event.key === 'ArrowDown'
|
|
990
|
+
? (currentIndex + 1) % enabledValues.length
|
|
991
|
+
: (currentIndex - 1 + enabledValues.length) % enabledValues.length;
|
|
992
|
+
const nextValue = enabledValues[nextIndex];
|
|
993
|
+
this.focusItem(nextValue);
|
|
994
|
+
if (this.block().selectionMode === 'single') {
|
|
995
|
+
this.toggleValue(nextValue);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
buildItemAriaLabel(label, value) {
|
|
999
|
+
const selected = this.isSelected(value)
|
|
1000
|
+
? this.t('selection.state.selected', 'selecionado')
|
|
1001
|
+
: this.t('selection.state.unselected', 'nao selecionado');
|
|
1002
|
+
return `${label}, ${selected}`;
|
|
1003
|
+
}
|
|
1004
|
+
currentValue() {
|
|
1005
|
+
const formData = this.readFormData();
|
|
1006
|
+
const value = formData[this.block().field];
|
|
1007
|
+
if (Array.isArray(value)) {
|
|
1008
|
+
return value.filter((item) => typeof item === 'string');
|
|
1009
|
+
}
|
|
1010
|
+
return typeof value === 'string' ? value : null;
|
|
1011
|
+
}
|
|
1012
|
+
buildNextRuntimeContext(field, value) {
|
|
1013
|
+
const context = this.runtimeContext();
|
|
1014
|
+
const nextContext = context ? { ...context } : {};
|
|
1015
|
+
const formData = this.cloneFormData();
|
|
1016
|
+
if (value == null) {
|
|
1017
|
+
delete formData[field];
|
|
1018
|
+
}
|
|
1019
|
+
else {
|
|
1020
|
+
formData[field] = value;
|
|
1021
|
+
}
|
|
1022
|
+
nextContext['formData'] = formData;
|
|
1023
|
+
return nextContext;
|
|
1024
|
+
}
|
|
1025
|
+
readFormData() {
|
|
1026
|
+
const context = this.runtimeContext();
|
|
1027
|
+
if (!context) {
|
|
1028
|
+
return {};
|
|
1029
|
+
}
|
|
1030
|
+
const existing = context['formData'];
|
|
1031
|
+
if (existing && typeof existing === 'object' && !Array.isArray(existing)) {
|
|
1032
|
+
return existing;
|
|
1033
|
+
}
|
|
1034
|
+
return {};
|
|
1035
|
+
}
|
|
1036
|
+
cloneFormData() {
|
|
1037
|
+
return { ...this.readFormData() };
|
|
1038
|
+
}
|
|
1039
|
+
enabledItemValues() {
|
|
1040
|
+
return this.block().items
|
|
1041
|
+
.filter((item) => !item.disabled)
|
|
1042
|
+
.map((item) => item.value);
|
|
1043
|
+
}
|
|
1044
|
+
focusItem(value) {
|
|
1045
|
+
const container = document.getElementById(this.groupId());
|
|
1046
|
+
const buttons = container?.querySelectorAll('.selection-card');
|
|
1047
|
+
const targetIndex = this.block().items.findIndex((candidate) => candidate.value === value);
|
|
1048
|
+
const element = targetIndex >= 0 ? buttons?.[targetIndex] : null;
|
|
1049
|
+
element?.focus();
|
|
1050
|
+
}
|
|
1051
|
+
t(key, fallback) {
|
|
1052
|
+
return this.i18n.t(`praxis.editorialForms.${key}`, undefined, fallback);
|
|
1053
|
+
}
|
|
1054
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialSelectionCardsBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1055
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialSelectionCardsBlockComponent, isStandalone: true, selector: "praxis-editorial-selection-cards-block", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: true, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { runtimeContextChange: "runtimeContextChange", valueChange: "valueChange" }, ngImport: i0, template: `
|
|
1056
|
+
<section class="selection-block">
|
|
1057
|
+
@if (block().title) {
|
|
1058
|
+
<header class="selection-header">
|
|
1059
|
+
<h3>{{ block().title }}</h3>
|
|
1060
|
+
@if (block().description) {
|
|
1061
|
+
<p>{{ block().description }}</p>
|
|
1062
|
+
}
|
|
1063
|
+
</header>
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
<div
|
|
1067
|
+
class="selection-grid"
|
|
1068
|
+
[attr.data-icon-position]="block().style?.iconPosition ?? 'left'"
|
|
1069
|
+
[style.grid-template-columns]="gridTemplateColumns()"
|
|
1070
|
+
[attr.id]="groupId()"
|
|
1071
|
+
[attr.role]="block().selectionMode === 'single' ? 'radiogroup' : 'group'"
|
|
1072
|
+
[attr.aria-label]="groupAriaLabel()"
|
|
1073
|
+
>
|
|
1074
|
+
@for (item of block().items; track item.id) {
|
|
1075
|
+
<button
|
|
1076
|
+
type="button"
|
|
1077
|
+
class="selection-card"
|
|
1078
|
+
[class.selected]="isSelected(item.value)"
|
|
1079
|
+
[attr.data-variant]="block().style?.variant ?? 'default'"
|
|
1080
|
+
[attr.data-tone]="item.tone ?? 'default'"
|
|
1081
|
+
[disabled]="item.disabled"
|
|
1082
|
+
[attr.role]="block().selectionMode === 'single' ? 'radio' : 'checkbox'"
|
|
1083
|
+
[attr.aria-checked]="isSelected(item.value)"
|
|
1084
|
+
[attr.aria-disabled]="item.disabled ? 'true' : null"
|
|
1085
|
+
[attr.tabindex]="itemTabIndex(item.value)"
|
|
1086
|
+
[attr.aria-label]="buildItemAriaLabel(item.label, item.value)"
|
|
1087
|
+
(click)="toggleValue(item.value)"
|
|
1088
|
+
(keydown)="handleKeydown($event, item.value)"
|
|
1089
|
+
>
|
|
1090
|
+
<span class="selection-leading">
|
|
1091
|
+
@if (item.icon?.name) {
|
|
1092
|
+
<mat-icon class="selection-icon" aria-hidden="true" [praxisIcon]="item.icon?.name"></mat-icon>
|
|
1093
|
+
}
|
|
1094
|
+
<span class="selection-copy">
|
|
1095
|
+
<strong>{{ item.label }}</strong>
|
|
1096
|
+
@if (item.description) {
|
|
1097
|
+
<span>{{ item.description }}</span>
|
|
1098
|
+
}
|
|
1099
|
+
</span>
|
|
1100
|
+
</span>
|
|
1101
|
+
@if (block().style?.showCheckmark ?? true) {
|
|
1102
|
+
<span class="selection-check" aria-hidden="true">
|
|
1103
|
+
@if (isSelected(item.value)) {
|
|
1104
|
+
<mat-icon aria-hidden="true" praxisIcon="check"></mat-icon>
|
|
1105
|
+
}
|
|
1106
|
+
</span>
|
|
1107
|
+
}
|
|
1108
|
+
</button>
|
|
1109
|
+
}
|
|
1110
|
+
</div>
|
|
1111
|
+
</section>
|
|
1112
|
+
`, isInline: true, styles: [".selection-block,.selection-header{display:grid;gap:10px}.selection-header h3,.selection-header p{margin:0}.selection-header p{color:var(--editorial-text-secondary, #7b8aa0)}.selection-grid{display:grid;gap:14px}.selection-card{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-height:72px;padding:16px;border-radius:var(--editorial-card-radius, 18px);border:1px solid var(--editorial-border-color, #d9deea);background:var(--editorial-surface-primary, #fff);color:var(--editorial-text-primary, #24324a);box-shadow:var(--editorial-card-shadow, none);cursor:pointer;text-align:left;transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease,transform .12s ease}.selection-card:hover:not([disabled]){transform:translateY(-1px)}.selection-card.selected{border-color:var(--editorial-accent, #264a8a);box-shadow:0 0 0 2px color-mix(in srgb,var(--editorial-accent, #264a8a) 22%,transparent);background:color-mix(in srgb,var(--editorial-accent, #264a8a) 8%,#fff)}.selection-card[data-variant=accent]{background:color-mix(in srgb,var(--editorial-accent, #264a8a) 4%,#fff);border-color:color-mix(in srgb,var(--editorial-accent, #264a8a) 18%,transparent)}.selection-card[data-variant=outline]{box-shadow:none;background:transparent}.selection-card[data-tone=accent] .selection-icon{background:color-mix(in srgb,var(--editorial-accent, #264a8a) 18%,#fff);color:var(--editorial-accent, #264a8a)}.selection-card[data-tone=muted] .selection-icon{background:var(--editorial-surface-secondary, #eef2f8);color:var(--editorial-text-secondary, #7b8aa0)}.selection-card[disabled]{opacity:.5;cursor:not-allowed}.selection-leading{display:inline-flex;align-items:center;gap:12px;min-width:0;flex:1 1 auto}.selection-grid[data-icon-position=top] .selection-card{flex-direction:column;align-items:stretch}.selection-grid[data-icon-position=top] .selection-leading{display:grid;gap:10px}.selection-grid[data-icon-position=top] .selection-check{align-self:flex-end}.selection-icon,.selection-check{display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:color-mix(in srgb,var(--editorial-accent, #264a8a) 14%,#fff);color:var(--editorial-accent, #264a8a);font-size:.75rem;font-weight:700;flex:0 0 auto}.selection-icon,.selection-check mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.selection-copy{display:grid;gap:4px;min-width:0}.selection-copy span{color:var(--editorial-text-secondary, #7b8aa0);font-size:.9rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1113
|
+
}
|
|
1114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialSelectionCardsBlockComponent, decorators: [{
|
|
1115
|
+
type: Component,
|
|
1116
|
+
args: [{ selector: 'praxis-editorial-selection-cards-block', standalone: true, imports: [CommonModule, MatIconModule, PraxisIconDirective], template: `
|
|
1117
|
+
<section class="selection-block">
|
|
1118
|
+
@if (block().title) {
|
|
1119
|
+
<header class="selection-header">
|
|
1120
|
+
<h3>{{ block().title }}</h3>
|
|
1121
|
+
@if (block().description) {
|
|
1122
|
+
<p>{{ block().description }}</p>
|
|
1123
|
+
}
|
|
1124
|
+
</header>
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
<div
|
|
1128
|
+
class="selection-grid"
|
|
1129
|
+
[attr.data-icon-position]="block().style?.iconPosition ?? 'left'"
|
|
1130
|
+
[style.grid-template-columns]="gridTemplateColumns()"
|
|
1131
|
+
[attr.id]="groupId()"
|
|
1132
|
+
[attr.role]="block().selectionMode === 'single' ? 'radiogroup' : 'group'"
|
|
1133
|
+
[attr.aria-label]="groupAriaLabel()"
|
|
1134
|
+
>
|
|
1135
|
+
@for (item of block().items; track item.id) {
|
|
1136
|
+
<button
|
|
1137
|
+
type="button"
|
|
1138
|
+
class="selection-card"
|
|
1139
|
+
[class.selected]="isSelected(item.value)"
|
|
1140
|
+
[attr.data-variant]="block().style?.variant ?? 'default'"
|
|
1141
|
+
[attr.data-tone]="item.tone ?? 'default'"
|
|
1142
|
+
[disabled]="item.disabled"
|
|
1143
|
+
[attr.role]="block().selectionMode === 'single' ? 'radio' : 'checkbox'"
|
|
1144
|
+
[attr.aria-checked]="isSelected(item.value)"
|
|
1145
|
+
[attr.aria-disabled]="item.disabled ? 'true' : null"
|
|
1146
|
+
[attr.tabindex]="itemTabIndex(item.value)"
|
|
1147
|
+
[attr.aria-label]="buildItemAriaLabel(item.label, item.value)"
|
|
1148
|
+
(click)="toggleValue(item.value)"
|
|
1149
|
+
(keydown)="handleKeydown($event, item.value)"
|
|
1150
|
+
>
|
|
1151
|
+
<span class="selection-leading">
|
|
1152
|
+
@if (item.icon?.name) {
|
|
1153
|
+
<mat-icon class="selection-icon" aria-hidden="true" [praxisIcon]="item.icon?.name"></mat-icon>
|
|
1154
|
+
}
|
|
1155
|
+
<span class="selection-copy">
|
|
1156
|
+
<strong>{{ item.label }}</strong>
|
|
1157
|
+
@if (item.description) {
|
|
1158
|
+
<span>{{ item.description }}</span>
|
|
1159
|
+
}
|
|
1160
|
+
</span>
|
|
1161
|
+
</span>
|
|
1162
|
+
@if (block().style?.showCheckmark ?? true) {
|
|
1163
|
+
<span class="selection-check" aria-hidden="true">
|
|
1164
|
+
@if (isSelected(item.value)) {
|
|
1165
|
+
<mat-icon aria-hidden="true" praxisIcon="check"></mat-icon>
|
|
1166
|
+
}
|
|
1167
|
+
</span>
|
|
1168
|
+
}
|
|
1169
|
+
</button>
|
|
1170
|
+
}
|
|
1171
|
+
</div>
|
|
1172
|
+
</section>
|
|
1173
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".selection-block,.selection-header{display:grid;gap:10px}.selection-header h3,.selection-header p{margin:0}.selection-header p{color:var(--editorial-text-secondary, #7b8aa0)}.selection-grid{display:grid;gap:14px}.selection-card{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-height:72px;padding:16px;border-radius:var(--editorial-card-radius, 18px);border:1px solid var(--editorial-border-color, #d9deea);background:var(--editorial-surface-primary, #fff);color:var(--editorial-text-primary, #24324a);box-shadow:var(--editorial-card-shadow, none);cursor:pointer;text-align:left;transition:background-color .12s ease,border-color .12s ease,box-shadow .12s ease,transform .12s ease}.selection-card:hover:not([disabled]){transform:translateY(-1px)}.selection-card.selected{border-color:var(--editorial-accent, #264a8a);box-shadow:0 0 0 2px color-mix(in srgb,var(--editorial-accent, #264a8a) 22%,transparent);background:color-mix(in srgb,var(--editorial-accent, #264a8a) 8%,#fff)}.selection-card[data-variant=accent]{background:color-mix(in srgb,var(--editorial-accent, #264a8a) 4%,#fff);border-color:color-mix(in srgb,var(--editorial-accent, #264a8a) 18%,transparent)}.selection-card[data-variant=outline]{box-shadow:none;background:transparent}.selection-card[data-tone=accent] .selection-icon{background:color-mix(in srgb,var(--editorial-accent, #264a8a) 18%,#fff);color:var(--editorial-accent, #264a8a)}.selection-card[data-tone=muted] .selection-icon{background:var(--editorial-surface-secondary, #eef2f8);color:var(--editorial-text-secondary, #7b8aa0)}.selection-card[disabled]{opacity:.5;cursor:not-allowed}.selection-leading{display:inline-flex;align-items:center;gap:12px;min-width:0;flex:1 1 auto}.selection-grid[data-icon-position=top] .selection-card{flex-direction:column;align-items:stretch}.selection-grid[data-icon-position=top] .selection-leading{display:grid;gap:10px}.selection-grid[data-icon-position=top] .selection-check{align-self:flex-end}.selection-icon,.selection-check{display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:color-mix(in srgb,var(--editorial-accent, #264a8a) 14%,#fff);color:var(--editorial-accent, #264a8a);font-size:.75rem;font-weight:700;flex:0 0 auto}.selection-icon,.selection-check mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.selection-copy{display:grid;gap:4px;min-width:0}.selection-copy span{color:var(--editorial-text-secondary, #7b8aa0);font-size:.9rem}\n"] }]
|
|
1174
|
+
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: true }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }], runtimeContextChange: [{ type: i0.Output, args: ["runtimeContextChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
1175
|
+
|
|
1176
|
+
class EditorialSuccessPanelBlockComponent {
|
|
1177
|
+
block = input.required(...(ngDevMode ? [{ debugName: "block" }] : []));
|
|
1178
|
+
actionTriggered = output();
|
|
1179
|
+
triggerAction(action) {
|
|
1180
|
+
this.actionTriggered.emit(action.actionId);
|
|
1181
|
+
}
|
|
1182
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialSuccessPanelBlockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1183
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialSuccessPanelBlockComponent, isStandalone: true, selector: "praxis-editorial-success-panel-block", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered" }, ngImport: i0, template: `
|
|
1184
|
+
<section class="success-panel" [attr.data-tone]="block().tone ?? 'success'">
|
|
1185
|
+
@if (block().icon?.name) {
|
|
1186
|
+
<div class="success-icon"><mat-icon aria-hidden="true" [praxisIcon]="block().icon?.name"></mat-icon></div>
|
|
1187
|
+
}
|
|
1188
|
+
<h3>{{ block().title }}</h3>
|
|
1189
|
+
@if (block().description) {
|
|
1190
|
+
<p>{{ block().description }}</p>
|
|
1191
|
+
}
|
|
1192
|
+
@if (block().secondaryMessage) {
|
|
1193
|
+
<p class="secondary-message">{{ block().secondaryMessage }}</p>
|
|
1194
|
+
}
|
|
1195
|
+
@if (block().nextSteps?.length) {
|
|
1196
|
+
<ul>
|
|
1197
|
+
@for (item of block().nextSteps; track item) {
|
|
1198
|
+
<li>{{ item }}</li>
|
|
1199
|
+
}
|
|
1200
|
+
</ul>
|
|
1201
|
+
}
|
|
1202
|
+
@if (block().primaryAction; as action) {
|
|
1203
|
+
<button type="button" class="success-action" (click)="triggerAction(action)">
|
|
1204
|
+
@if (action.icon?.name) {
|
|
1205
|
+
<mat-icon aria-hidden="true" [praxisIcon]="action.icon?.name"></mat-icon>
|
|
1206
|
+
}
|
|
1207
|
+
<span>{{ action.label }}</span>
|
|
1208
|
+
</button>
|
|
1209
|
+
}
|
|
1210
|
+
</section>
|
|
1211
|
+
`, isInline: true, styles: [".success-panel{display:grid;gap:12px;text-align:center;padding:20px;border-radius:var(--editorial-card-radius, 18px);background:color-mix(in srgb,var(--editorial-success, #35b37e) 10%,#fff);border:1px solid color-mix(in srgb,var(--editorial-success, #35b37e) 32%,transparent);box-shadow:var(--editorial-card-shadow, none)}.success-panel[data-tone=accent]{background:color-mix(in srgb,var(--editorial-accent, #264a8a) 10%,#fff);border-color:color-mix(in srgb,var(--editorial-accent, #264a8a) 24%,transparent)}.success-panel[data-tone=neutral]{background:var(--editorial-surface-primary, #fff);border-color:var(--editorial-border-color, #d9deea)}.success-panel h3,.success-panel p,.success-panel ul{margin:0}.success-panel ul{padding-left:20px;text-align:left}.secondary-message{color:var(--editorial-text-secondary, #7b8aa0);font-size:var(--editorial-body-size, 1rem)}.success-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:999px;background:var(--editorial-success, #35b37e);color:#fff;justify-self:center;font-weight:700}.success-panel[data-tone=accent] .success-icon{background:var(--editorial-accent, #264a8a)}.success-panel[data-tone=neutral] .success-icon{background:var(--editorial-surface-secondary, #eef2f8);color:var(--editorial-text-primary, #24324a)}.success-icon mat-icon{width:20px;height:20px;font-size:20px;line-height:20px}.success-action{justify-self:center;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 20px;border:0;border-radius:var(--editorial-button-radius, var(--editorial-card-radius, 18px));background:var(--editorial-cta-primary, var(--editorial-success, #35b37e));color:var(--editorial-cta-primary-text, #fff);box-shadow:var(--editorial-card-shadow, none);cursor:pointer;font:inherit;font-weight:600}.success-action mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1212
|
+
}
|
|
1213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialSuccessPanelBlockComponent, decorators: [{
|
|
1214
|
+
type: Component,
|
|
1215
|
+
args: [{ selector: 'praxis-editorial-success-panel-block', standalone: true, imports: [CommonModule, MatIconModule, PraxisIconDirective], template: `
|
|
1216
|
+
<section class="success-panel" [attr.data-tone]="block().tone ?? 'success'">
|
|
1217
|
+
@if (block().icon?.name) {
|
|
1218
|
+
<div class="success-icon"><mat-icon aria-hidden="true" [praxisIcon]="block().icon?.name"></mat-icon></div>
|
|
1219
|
+
}
|
|
1220
|
+
<h3>{{ block().title }}</h3>
|
|
1221
|
+
@if (block().description) {
|
|
1222
|
+
<p>{{ block().description }}</p>
|
|
1223
|
+
}
|
|
1224
|
+
@if (block().secondaryMessage) {
|
|
1225
|
+
<p class="secondary-message">{{ block().secondaryMessage }}</p>
|
|
1226
|
+
}
|
|
1227
|
+
@if (block().nextSteps?.length) {
|
|
1228
|
+
<ul>
|
|
1229
|
+
@for (item of block().nextSteps; track item) {
|
|
1230
|
+
<li>{{ item }}</li>
|
|
1231
|
+
}
|
|
1232
|
+
</ul>
|
|
1233
|
+
}
|
|
1234
|
+
@if (block().primaryAction; as action) {
|
|
1235
|
+
<button type="button" class="success-action" (click)="triggerAction(action)">
|
|
1236
|
+
@if (action.icon?.name) {
|
|
1237
|
+
<mat-icon aria-hidden="true" [praxisIcon]="action.icon?.name"></mat-icon>
|
|
1238
|
+
}
|
|
1239
|
+
<span>{{ action.label }}</span>
|
|
1240
|
+
</button>
|
|
1241
|
+
}
|
|
1242
|
+
</section>
|
|
1243
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".success-panel{display:grid;gap:12px;text-align:center;padding:20px;border-radius:var(--editorial-card-radius, 18px);background:color-mix(in srgb,var(--editorial-success, #35b37e) 10%,#fff);border:1px solid color-mix(in srgb,var(--editorial-success, #35b37e) 32%,transparent);box-shadow:var(--editorial-card-shadow, none)}.success-panel[data-tone=accent]{background:color-mix(in srgb,var(--editorial-accent, #264a8a) 10%,#fff);border-color:color-mix(in srgb,var(--editorial-accent, #264a8a) 24%,transparent)}.success-panel[data-tone=neutral]{background:var(--editorial-surface-primary, #fff);border-color:var(--editorial-border-color, #d9deea)}.success-panel h3,.success-panel p,.success-panel ul{margin:0}.success-panel ul{padding-left:20px;text-align:left}.secondary-message{color:var(--editorial-text-secondary, #7b8aa0);font-size:var(--editorial-body-size, 1rem)}.success-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:999px;background:var(--editorial-success, #35b37e);color:#fff;justify-self:center;font-weight:700}.success-panel[data-tone=accent] .success-icon{background:var(--editorial-accent, #264a8a)}.success-panel[data-tone=neutral] .success-icon{background:var(--editorial-surface-secondary, #eef2f8);color:var(--editorial-text-primary, #24324a)}.success-icon mat-icon{width:20px;height:20px;font-size:20px;line-height:20px}.success-action{justify-self:center;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 20px;border:0;border-radius:var(--editorial-button-radius, var(--editorial-card-radius, 18px));background:var(--editorial-cta-primary, var(--editorial-success, #35b37e));color:var(--editorial-cta-primary-text, #fff);box-shadow:var(--editorial-card-shadow, none);cursor:pointer;font:inherit;font-weight:600}.success-action mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}\n"] }]
|
|
1244
|
+
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: true }] }], actionTriggered: [{ type: i0.Output, args: ["actionTriggered"] }] } });
|
|
1245
|
+
|
|
490
1246
|
class EditorialBlockRendererComponent {
|
|
491
1247
|
block = input.required(...(ngDevMode ? [{ debugName: "block" }] : []));
|
|
492
1248
|
runtimeContext = input(null, ...(ngDevMode ? [{ debugName: "runtimeContext" }] : []));
|
|
493
1249
|
solution = input(null, ...(ngDevMode ? [{ debugName: "solution" }] : []));
|
|
494
1250
|
instance = input(null, ...(ngDevMode ? [{ debugName: "instance" }] : []));
|
|
1251
|
+
runtimeContextChange = output();
|
|
495
1252
|
operationalEvent = output();
|
|
1253
|
+
blockAction = output();
|
|
1254
|
+
introHero = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "introHero" }] : []));
|
|
496
1255
|
hero = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "hero" }] : []));
|
|
497
1256
|
richText = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "richText" }] : []));
|
|
498
1257
|
policyList = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "policyList" }] : []));
|
|
499
1258
|
timeline = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "timeline" }] : []));
|
|
500
1259
|
review = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "review" }] : []));
|
|
1260
|
+
reviewSections = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "reviewSections" }] : []));
|
|
501
1261
|
contextSummary = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "contextSummary" }] : []));
|
|
1262
|
+
selectionCards = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "selectionCards" }] : []));
|
|
502
1263
|
infoCards = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "infoCards" }] : []));
|
|
1264
|
+
successPanel = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "successPanel" }] : []));
|
|
503
1265
|
faq = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "faq" }] : []));
|
|
504
1266
|
dataCollection = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "dataCollection" }] : []));
|
|
505
1267
|
customWidget = computed(() => this.block(), ...(ngDevMode ? [{ debugName: "customWidget" }] : []));
|
|
@@ -518,8 +1280,14 @@ class EditorialBlockRendererComponent {
|
|
|
518
1280
|
return valuePath ? `${contextPath}.${valuePath}` : contextPath;
|
|
519
1281
|
}
|
|
520
1282
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialBlockRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
521
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialBlockRendererComponent, isStandalone: true, selector: "praxis-editorial-block-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: true, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null }, solution: { classPropertyName: "solution", publicName: "solution", isSignal: true, isRequired: false, transformFunction: null }, instance: { classPropertyName: "instance", publicName: "instance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { operationalEvent: "operationalEvent" }, ngImport: i0, template: `
|
|
1283
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialBlockRendererComponent, isStandalone: true, selector: "praxis-editorial-block-renderer", inputs: { block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: true, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null }, solution: { classPropertyName: "solution", publicName: "solution", isSignal: true, isRequired: false, transformFunction: null }, instance: { classPropertyName: "instance", publicName: "instance", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { runtimeContextChange: "runtimeContextChange", operationalEvent: "operationalEvent", blockAction: "blockAction" }, ngImport: i0, template: `
|
|
522
1284
|
@switch (block().kind) {
|
|
1285
|
+
@case ('introHero') {
|
|
1286
|
+
<praxis-editorial-intro-hero-block
|
|
1287
|
+
[block]="introHero()"
|
|
1288
|
+
(actionTriggered)="blockAction.emit({ blockId: introHero().blockId, actionId: $event })"
|
|
1289
|
+
/>
|
|
1290
|
+
}
|
|
523
1291
|
@case ('hero') {
|
|
524
1292
|
<section class="block-card hero-block">
|
|
525
1293
|
@if (hero().subtitle) {
|
|
@@ -601,6 +1369,12 @@ class EditorialBlockRendererComponent {
|
|
|
601
1369
|
</dl>
|
|
602
1370
|
</section>
|
|
603
1371
|
}
|
|
1372
|
+
@case ('reviewSections') {
|
|
1373
|
+
<praxis-editorial-review-sections-block
|
|
1374
|
+
[block]="reviewSections()"
|
|
1375
|
+
[runtimeContext]="runtimeContext()"
|
|
1376
|
+
/>
|
|
1377
|
+
}
|
|
604
1378
|
@case ('contextSummary') {
|
|
605
1379
|
<section class="block-card">
|
|
606
1380
|
@if (contextSummary().title) {
|
|
@@ -616,6 +1390,13 @@ class EditorialBlockRendererComponent {
|
|
|
616
1390
|
</dl>
|
|
617
1391
|
</section>
|
|
618
1392
|
}
|
|
1393
|
+
@case ('selectionCards') {
|
|
1394
|
+
<praxis-editorial-selection-cards-block
|
|
1395
|
+
[block]="selectionCards()"
|
|
1396
|
+
[runtimeContext]="runtimeContext()"
|
|
1397
|
+
(runtimeContextChange)="runtimeContextChange.emit($event)"
|
|
1398
|
+
/>
|
|
1399
|
+
}
|
|
619
1400
|
@case ('infoCards') {
|
|
620
1401
|
<section class="block-card">
|
|
621
1402
|
<div class="cards-grid">
|
|
@@ -630,6 +1411,12 @@ class EditorialBlockRendererComponent {
|
|
|
630
1411
|
</div>
|
|
631
1412
|
</section>
|
|
632
1413
|
}
|
|
1414
|
+
@case ('successPanel') {
|
|
1415
|
+
<praxis-editorial-success-panel-block
|
|
1416
|
+
[block]="successPanel()"
|
|
1417
|
+
(actionTriggered)="blockAction.emit({ blockId: successPanel().blockId, actionId: $event })"
|
|
1418
|
+
/>
|
|
1419
|
+
}
|
|
633
1420
|
@case ('faqAccordion') {
|
|
634
1421
|
<section class="block-card stack-sm">
|
|
635
1422
|
@for (item of faq().items; track item.id) {
|
|
@@ -646,6 +1433,7 @@ class EditorialBlockRendererComponent {
|
|
|
646
1433
|
[runtimeContext]="runtimeContext()"
|
|
647
1434
|
[solution]="solution()"
|
|
648
1435
|
[instance]="instance()"
|
|
1436
|
+
(runtimeContextChange)="runtimeContextChange.emit($event)"
|
|
649
1437
|
(operationalEvent)="operationalEvent.emit($event)"
|
|
650
1438
|
/>
|
|
651
1439
|
}
|
|
@@ -666,7 +1454,7 @@ class EditorialBlockRendererComponent {
|
|
|
666
1454
|
/>
|
|
667
1455
|
}
|
|
668
1456
|
}
|
|
669
|
-
`, isInline: true, styles: [":host{display:block}.block-card{display:grid;gap:12px;padding:18px;border-radius:18px;background:var(--md-sys-color-surface-container-low, #f7f2fa);border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 65%,transparent)}.eyebrow{margin:0;font-size:.8rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--md-sys-color-primary, #6750a4)}h3,p,ul,ol,dl{margin:0}.description,.content,.timeline-item span,.policy-item p,.info-card p,.faq-item p{color:var(--md-sys-color-on-surface-variant, #49454f)}.hero-block h3 span{color:var(--md-sys-color-primary, #6750a4)}.review-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.review-grid dt{margin-bottom:4px;font-size:.78rem;color:var(--md-sys-color-on-surface-variant, #49454f)}.review-grid dd{margin:0;font-weight:600}.list-reset{list-style:none;padding:0;margin:0}.stack-sm{display:grid;gap:10px}.timeline{display:grid;gap:12px;padding-left:18px;margin:0}.timeline-item{display:grid;gap:4px}.policy-item,.faq-item,.info-card{padding:12px;border-radius:14px;background:var(--md-sys-color-surface, #fff)}.cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.notice-block{border-left:4px solid var(--md-sys-color-primary, #6750a4)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: DynamicWidgetLoaderDirective, selector: "[dynamicWidgetLoader]", inputs: ["dynamicWidgetLoader", "context", "strictValidation", "autoWireOutputs"], outputs: ["widgetEvent"], exportAs: ["dynamicWidgetLoader"] }, { kind: "component", type: EditorialDataCollectionBlockOutletComponent, selector: "praxis-editorial-data-collection-block-outlet", inputs: ["block", "runtimeContext", "solution", "instance"], outputs: ["operationalEvent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1457
|
+
`, isInline: true, styles: [":host{display:block}.block-card{display:grid;gap:12px;padding:18px;border-radius:18px;background:var(--md-sys-color-surface-container-low, #f7f2fa);border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 65%,transparent)}.eyebrow{margin:0;font-size:.8rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--md-sys-color-primary, #6750a4)}h3,p,ul,ol,dl{margin:0}.description,.content,.timeline-item span,.policy-item p,.info-card p,.faq-item p{color:var(--md-sys-color-on-surface-variant, #49454f)}.hero-block h3 span{color:var(--md-sys-color-primary, #6750a4)}.review-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.review-grid dt{margin-bottom:4px;font-size:.78rem;color:var(--md-sys-color-on-surface-variant, #49454f)}.review-grid dd{margin:0;font-weight:600}.list-reset{list-style:none;padding:0;margin:0}.stack-sm{display:grid;gap:10px}.timeline{display:grid;gap:12px;padding-left:18px;margin:0}.timeline-item{display:grid;gap:4px}.policy-item,.faq-item,.info-card{padding:12px;border-radius:14px;background:var(--md-sys-color-surface, #fff)}.cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.notice-block{border-left:4px solid var(--md-sys-color-primary, #6750a4)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: DynamicWidgetLoaderDirective, selector: "[dynamicWidgetLoader]", inputs: ["dynamicWidgetLoader", "context", "strictValidation", "autoWireOutputs"], outputs: ["widgetEvent"], exportAs: ["dynamicWidgetLoader"] }, { kind: "component", type: EditorialDataCollectionBlockOutletComponent, selector: "praxis-editorial-data-collection-block-outlet", inputs: ["block", "runtimeContext", "solution", "instance"], outputs: ["runtimeContextChange", "operationalEvent"] }, { kind: "component", type: EditorialIntroHeroBlockComponent, selector: "praxis-editorial-intro-hero-block", inputs: ["block"], outputs: ["actionTriggered"] }, { kind: "component", type: EditorialSelectionCardsBlockComponent, selector: "praxis-editorial-selection-cards-block", inputs: ["block", "runtimeContext"], outputs: ["runtimeContextChange", "valueChange"] }, { kind: "component", type: EditorialReviewSectionsBlockComponent, selector: "praxis-editorial-review-sections-block", inputs: ["block", "runtimeContext"] }, { kind: "component", type: EditorialSuccessPanelBlockComponent, selector: "praxis-editorial-success-panel-block", inputs: ["block"], outputs: ["actionTriggered"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
670
1458
|
}
|
|
671
1459
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialBlockRendererComponent, decorators: [{
|
|
672
1460
|
type: Component,
|
|
@@ -674,8 +1462,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
674
1462
|
CommonModule,
|
|
675
1463
|
DynamicWidgetLoaderDirective,
|
|
676
1464
|
EditorialDataCollectionBlockOutletComponent,
|
|
1465
|
+
EditorialIntroHeroBlockComponent,
|
|
1466
|
+
EditorialSelectionCardsBlockComponent,
|
|
1467
|
+
EditorialReviewSectionsBlockComponent,
|
|
1468
|
+
EditorialSuccessPanelBlockComponent,
|
|
677
1469
|
], template: `
|
|
678
1470
|
@switch (block().kind) {
|
|
1471
|
+
@case ('introHero') {
|
|
1472
|
+
<praxis-editorial-intro-hero-block
|
|
1473
|
+
[block]="introHero()"
|
|
1474
|
+
(actionTriggered)="blockAction.emit({ blockId: introHero().blockId, actionId: $event })"
|
|
1475
|
+
/>
|
|
1476
|
+
}
|
|
679
1477
|
@case ('hero') {
|
|
680
1478
|
<section class="block-card hero-block">
|
|
681
1479
|
@if (hero().subtitle) {
|
|
@@ -757,6 +1555,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
757
1555
|
</dl>
|
|
758
1556
|
</section>
|
|
759
1557
|
}
|
|
1558
|
+
@case ('reviewSections') {
|
|
1559
|
+
<praxis-editorial-review-sections-block
|
|
1560
|
+
[block]="reviewSections()"
|
|
1561
|
+
[runtimeContext]="runtimeContext()"
|
|
1562
|
+
/>
|
|
1563
|
+
}
|
|
760
1564
|
@case ('contextSummary') {
|
|
761
1565
|
<section class="block-card">
|
|
762
1566
|
@if (contextSummary().title) {
|
|
@@ -772,6 +1576,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
772
1576
|
</dl>
|
|
773
1577
|
</section>
|
|
774
1578
|
}
|
|
1579
|
+
@case ('selectionCards') {
|
|
1580
|
+
<praxis-editorial-selection-cards-block
|
|
1581
|
+
[block]="selectionCards()"
|
|
1582
|
+
[runtimeContext]="runtimeContext()"
|
|
1583
|
+
(runtimeContextChange)="runtimeContextChange.emit($event)"
|
|
1584
|
+
/>
|
|
1585
|
+
}
|
|
775
1586
|
@case ('infoCards') {
|
|
776
1587
|
<section class="block-card">
|
|
777
1588
|
<div class="cards-grid">
|
|
@@ -786,6 +1597,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
786
1597
|
</div>
|
|
787
1598
|
</section>
|
|
788
1599
|
}
|
|
1600
|
+
@case ('successPanel') {
|
|
1601
|
+
<praxis-editorial-success-panel-block
|
|
1602
|
+
[block]="successPanel()"
|
|
1603
|
+
(actionTriggered)="blockAction.emit({ blockId: successPanel().blockId, actionId: $event })"
|
|
1604
|
+
/>
|
|
1605
|
+
}
|
|
789
1606
|
@case ('faqAccordion') {
|
|
790
1607
|
<section class="block-card stack-sm">
|
|
791
1608
|
@for (item of faq().items; track item.id) {
|
|
@@ -802,6 +1619,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
802
1619
|
[runtimeContext]="runtimeContext()"
|
|
803
1620
|
[solution]="solution()"
|
|
804
1621
|
[instance]="instance()"
|
|
1622
|
+
(runtimeContextChange)="runtimeContextChange.emit($event)"
|
|
805
1623
|
(operationalEvent)="operationalEvent.emit($event)"
|
|
806
1624
|
/>
|
|
807
1625
|
}
|
|
@@ -823,17 +1641,215 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
823
1641
|
}
|
|
824
1642
|
}
|
|
825
1643
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.block-card{display:grid;gap:12px;padding:18px;border-radius:18px;background:var(--md-sys-color-surface-container-low, #f7f2fa);border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 65%,transparent)}.eyebrow{margin:0;font-size:.8rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--md-sys-color-primary, #6750a4)}h3,p,ul,ol,dl{margin:0}.description,.content,.timeline-item span,.policy-item p,.info-card p,.faq-item p{color:var(--md-sys-color-on-surface-variant, #49454f)}.hero-block h3 span{color:var(--md-sys-color-primary, #6750a4)}.review-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.review-grid dt{margin-bottom:4px;font-size:.78rem;color:var(--md-sys-color-on-surface-variant, #49454f)}.review-grid dd{margin:0;font-weight:600}.list-reset{list-style:none;padding:0;margin:0}.stack-sm{display:grid;gap:10px}.timeline{display:grid;gap:12px;padding-left:18px;margin:0}.timeline-item{display:grid;gap:4px}.policy-item,.faq-item,.info-card{padding:12px;border-radius:14px;background:var(--md-sys-color-surface, #fff)}.cards-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.notice-block{border-left:4px solid var(--md-sys-color-primary, #6750a4)}\n"] }]
|
|
826
|
-
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: true }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }], solution: [{ type: i0.Input, args: [{ isSignal: true, alias: "solution", required: false }] }], instance: [{ type: i0.Input, args: [{ isSignal: true, alias: "instance", required: false }] }], operationalEvent: [{ type: i0.Output, args: ["operationalEvent"] }] } });
|
|
1644
|
+
}], propDecorators: { block: [{ type: i0.Input, args: [{ isSignal: true, alias: "block", required: true }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }], solution: [{ type: i0.Input, args: [{ isSignal: true, alias: "solution", required: false }] }], instance: [{ type: i0.Input, args: [{ isSignal: true, alias: "instance", required: false }] }], runtimeContextChange: [{ type: i0.Output, args: ["runtimeContextChange"] }], operationalEvent: [{ type: i0.Output, args: ["operationalEvent"] }], blockAction: [{ type: i0.Output, args: ["blockAction"] }] } });
|
|
1645
|
+
|
|
1646
|
+
function resolveRuntimeOrientation(layout, stepper, compactViewport = false) {
|
|
1647
|
+
if (compactViewport && layout?.responsive?.mobileOrientation) {
|
|
1648
|
+
return layout.responsive.mobileOrientation;
|
|
1649
|
+
}
|
|
1650
|
+
return stepper?.orientation ?? layout?.orientation ?? 'horizontal';
|
|
1651
|
+
}
|
|
1652
|
+
function resolveShellVariant(layout) {
|
|
1653
|
+
return layout?.shellVariant ?? 'corporate-wizard';
|
|
1654
|
+
}
|
|
1655
|
+
function resolveDensity(layout) {
|
|
1656
|
+
return layout?.density ?? 'comfortable';
|
|
1657
|
+
}
|
|
1658
|
+
function buildRuntimeLayoutCss(layout) {
|
|
1659
|
+
if (!layout) {
|
|
1660
|
+
return '';
|
|
1661
|
+
}
|
|
1662
|
+
return [
|
|
1663
|
+
layout.maxWidth ? `max-width:${layout.maxWidth};width:100%;margin-inline:auto` : '',
|
|
1664
|
+
layout.spacing?.pagePadding ? `--editorial-page-padding:${layout.spacing.pagePadding}` : '',
|
|
1665
|
+
layout.spacing?.shellPadding ? `--editorial-shell-padding:${layout.spacing.shellPadding}` : '',
|
|
1666
|
+
layout.spacing?.blockGap ? `--editorial-block-gap:${layout.spacing.blockGap}` : '',
|
|
1667
|
+
layout.spacing?.sectionGap ? `--editorial-section-gap:${layout.spacing.sectionGap}` : '',
|
|
1668
|
+
layout.spacing?.actionGap ? `--editorial-action-gap:${layout.spacing.actionGap}` : '',
|
|
1669
|
+
].filter(Boolean).join(';');
|
|
1670
|
+
}
|
|
1671
|
+
function getStepDisplayState(step, steps, activeStepId, isBlocked) {
|
|
1672
|
+
if (step.stepId === activeStepId && isBlocked) {
|
|
1673
|
+
return 'blocked';
|
|
1674
|
+
}
|
|
1675
|
+
if (step.stepId === activeStepId) {
|
|
1676
|
+
return 'active';
|
|
1677
|
+
}
|
|
1678
|
+
const activeIndex = steps.findIndex((item) => item.stepId === activeStepId);
|
|
1679
|
+
const stepIndex = steps.findIndex((item) => item.stepId === step.stepId);
|
|
1680
|
+
if (activeIndex >= 0 && stepIndex >= 0 && stepIndex < activeIndex) {
|
|
1681
|
+
return 'completed';
|
|
1682
|
+
}
|
|
1683
|
+
return 'pending';
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1686
|
+
class EditorialStepperComponent {
|
|
1687
|
+
i18n = inject(PraxisI18nService);
|
|
1688
|
+
steps = input.required(...(ngDevMode ? [{ debugName: "steps" }] : []));
|
|
1689
|
+
activeStepId = input(null, ...(ngDevMode ? [{ debugName: "activeStepId" }] : []));
|
|
1690
|
+
config = input(null, ...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
1691
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
1692
|
+
progressionBlocked = input(false, ...(ngDevMode ? [{ debugName: "progressionBlocked" }] : []));
|
|
1693
|
+
isStepSelectionBlocked = input(() => false, ...(ngDevMode ? [{ debugName: "isStepSelectionBlocked" }] : []));
|
|
1694
|
+
stepSelected = output();
|
|
1695
|
+
effectiveOrientation = computed(() => this.config()?.orientation ?? this.orientation(), ...(ngDevMode ? [{ debugName: "effectiveOrientation" }] : []));
|
|
1696
|
+
stepperAriaLabel = computed(() => this.t('stepper.ariaLabel', 'Etapas da jornada'), ...(ngDevMode ? [{ debugName: "stepperAriaLabel" }] : []));
|
|
1697
|
+
stepState(step) {
|
|
1698
|
+
return getStepDisplayState(step, this.steps(), this.activeStepId(), this.progressionBlocked());
|
|
1699
|
+
}
|
|
1700
|
+
stepNumber(step) {
|
|
1701
|
+
return this.steps().findIndex((item) => item.stepId === step.stepId) + 1;
|
|
1702
|
+
}
|
|
1703
|
+
isSelectionBlocked(stepId) {
|
|
1704
|
+
if (this.config()?.allowStepJump) {
|
|
1705
|
+
return false;
|
|
1706
|
+
}
|
|
1707
|
+
return this.isStepSelectionBlocked()(stepId);
|
|
1708
|
+
}
|
|
1709
|
+
onStepClick(stepId) {
|
|
1710
|
+
if (this.isSelectionBlocked(stepId)) {
|
|
1711
|
+
return;
|
|
1712
|
+
}
|
|
1713
|
+
this.stepSelected.emit(stepId);
|
|
1714
|
+
}
|
|
1715
|
+
buildStepAriaLabel(step) {
|
|
1716
|
+
const state = this.stepState(step);
|
|
1717
|
+
const status = state === 'completed'
|
|
1718
|
+
? this.t('stepper.state.completed', 'concluida')
|
|
1719
|
+
: state === 'active'
|
|
1720
|
+
? this.t('stepper.state.active', 'etapa atual')
|
|
1721
|
+
: state === 'blocked'
|
|
1722
|
+
? this.t('stepper.state.blocked', 'bloqueada')
|
|
1723
|
+
: this.t('stepper.state.pending', 'pendente');
|
|
1724
|
+
return `${this.stepNumber(step)}. ${step.label}, ${status}`;
|
|
1725
|
+
}
|
|
1726
|
+
t(key, fallback) {
|
|
1727
|
+
return this.i18n.t(`praxis.editorialForms.${key}`, undefined, fallback);
|
|
1728
|
+
}
|
|
1729
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1730
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialStepperComponent, isStandalone: true, selector: "praxis-editorial-stepper", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: true, transformFunction: null }, activeStepId: { classPropertyName: "activeStepId", publicName: "activeStepId", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, progressionBlocked: { classPropertyName: "progressionBlocked", publicName: "progressionBlocked", isSignal: true, isRequired: false, transformFunction: null }, isStepSelectionBlocked: { classPropertyName: "isStepSelectionBlocked", publicName: "isStepSelectionBlocked", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stepSelected: "stepSelected" }, ngImport: i0, template: `
|
|
1731
|
+
<ol
|
|
1732
|
+
class="steps-nav"
|
|
1733
|
+
[class.vertical]="effectiveOrientation() === 'vertical'"
|
|
1734
|
+
[class.horizontal]="effectiveOrientation() === 'horizontal'"
|
|
1735
|
+
[attr.data-variant]="config()?.variant ?? 'icon-label'"
|
|
1736
|
+
[attr.data-align]="config()?.align ?? 'start'"
|
|
1737
|
+
[attr.data-size]="config()?.size ?? 'md'"
|
|
1738
|
+
[attr.aria-label]="stepperAriaLabel()"
|
|
1739
|
+
>
|
|
1740
|
+
@for (step of steps(); track step.stepId; let last = $last) {
|
|
1741
|
+
<li
|
|
1742
|
+
class="stepper-item"
|
|
1743
|
+
[attr.data-state]="stepState(step)"
|
|
1744
|
+
[attr.aria-posinset]="stepNumber(step)"
|
|
1745
|
+
[attr.aria-setsize]="steps().length"
|
|
1746
|
+
>
|
|
1747
|
+
<button
|
|
1748
|
+
type="button"
|
|
1749
|
+
class="step-chip"
|
|
1750
|
+
[class.active]="activeStepId() === step.stepId"
|
|
1751
|
+
[class.completed]="stepState(step) === 'completed'"
|
|
1752
|
+
[class.blocked]="stepState(step) === 'blocked'"
|
|
1753
|
+
[disabled]="isSelectionBlocked(step.stepId)"
|
|
1754
|
+
[attr.aria-current]="activeStepId() === step.stepId ? 'step' : null"
|
|
1755
|
+
[attr.aria-label]="buildStepAriaLabel(step)"
|
|
1756
|
+
(click)="onStepClick(step.stepId)"
|
|
1757
|
+
>
|
|
1758
|
+
<span class="step-icon" [attr.data-state]="stepState(step)" aria-hidden="true">
|
|
1759
|
+
@if (stepState(step) === 'completed') {
|
|
1760
|
+
<mat-icon aria-hidden="true" praxisIcon="check"></mat-icon>
|
|
1761
|
+
} @else if (step.icon?.name) {
|
|
1762
|
+
<mat-icon aria-hidden="true" [praxisIcon]="step.icon?.name"></mat-icon>
|
|
1763
|
+
} @else {
|
|
1764
|
+
<span>{{ stepNumber(step) }}</span>
|
|
1765
|
+
}
|
|
1766
|
+
</span>
|
|
1767
|
+
@if ((config()?.showLabels ?? true) !== false) {
|
|
1768
|
+
<span class="step-copy">
|
|
1769
|
+
<span class="step-label">{{ step.label }}</span>
|
|
1770
|
+
@if ((config()?.showDescriptions ?? false) && step.description) {
|
|
1771
|
+
<span class="step-description">{{ step.description }}</span>
|
|
1772
|
+
}
|
|
1773
|
+
</span>
|
|
1774
|
+
}
|
|
1775
|
+
</button>
|
|
1776
|
+
@if ((config()?.showConnectors ?? true) && !last) {
|
|
1777
|
+
<span class="step-connector" [attr.data-style]="config()?.connectorStyle ?? 'solid'"></span>
|
|
1778
|
+
}
|
|
1779
|
+
</li>
|
|
1780
|
+
}
|
|
1781
|
+
</ol>
|
|
1782
|
+
`, isInline: true, styles: [":host{display:block}.steps-nav{display:flex;gap:12px;list-style:none;padding:0;margin:0}.steps-nav.horizontal[data-align=center]{justify-content:center}.steps-nav.horizontal[data-align=space-between]{justify-content:space-between}.steps-nav.vertical{flex-direction:column}.stepper-item{display:flex;align-items:center;gap:12px;min-width:0}.steps-nav.vertical .stepper-item{align-items:stretch;flex-direction:column}.step-chip{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:10px 14px;border-radius:var(--editorial-step-radius, 999px);border:1px solid var(--editorial-border-color, #d9deea);background:var(--editorial-surface-primary, #fff);color:var(--editorial-text-primary, #24324a);cursor:pointer;text-align:left}.steps-nav[data-size=sm] .step-chip{min-height:42px;padding:8px 12px;gap:8px}.steps-nav[data-size=lg] .step-chip{min-height:56px;padding:12px 18px;gap:12px}.step-chip.active{border-color:var(--editorial-step-active, var(--editorial-accent, #264a8a));box-shadow:0 0 0 var(--editorial-active-step-border-width, 2px) color-mix(in srgb,var(--editorial-accent, #264a8a) 24%,transparent)}.step-chip.completed .step-icon{background:var(--editorial-step-completed, var(--editorial-success, #35b37e));color:#fff}.step-chip.blocked .step-icon{background:var(--editorial-step-blocked, #c84b4b);color:#fff}.step-chip[disabled]{opacity:.72;cursor:not-allowed}.step-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;background:var(--editorial-step-pending, #eef1f7);color:var(--editorial-text-secondary, #7b8aa0);font-size:.75rem;font-weight:700;flex:0 0 auto}.steps-nav[data-size=sm] .step-icon{width:28px;height:28px;font-size:.7rem}.steps-nav[data-size=lg] .step-icon{width:42px;height:42px;font-size:.9rem}.step-icon mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.step-chip.active .step-icon{background:var(--editorial-step-active, var(--editorial-accent, #264a8a));color:var(--editorial-accent-contrast, #fff)}.step-copy{display:grid;gap:2px;min-width:0}.step-label{font-weight:700;white-space:nowrap}.step-description{color:var(--editorial-text-secondary, #7b8aa0);font-size:.85rem}.step-connector{display:block;flex:1 1 auto;min-width:32px;height:2px;background:var(--editorial-connector, #8fd8c0);border-radius:999px}.steps-nav.vertical .step-connector{width:2px;min-width:2px;min-height:24px;margin-left:16px;height:24px}.step-connector[data-style=dashed]{background:repeating-linear-gradient(90deg,var(--editorial-connector, #8fd8c0) 0 8px,transparent 8px 14px)}.steps-nav.vertical .step-connector[data-style=dashed]{background:repeating-linear-gradient(180deg,var(--editorial-connector, #8fd8c0) 0 8px,transparent 8px 14px)}.steps-nav[data-variant=simple] .step-copy{display:none}.steps-nav[data-variant=simple-circle]{gap:20px}.steps-nav.horizontal[data-variant=simple-circle] .stepper-item{flex:1 1 0;flex-direction:column;align-items:center;gap:10px}.steps-nav.horizontal[data-variant=simple-circle] .step-chip{flex-direction:column;justify-content:flex-start;min-height:auto;padding:0;gap:8px;border:0;background:transparent;box-shadow:none;text-align:center}.steps-nav.horizontal[data-variant=simple-circle] .step-copy{justify-items:center}.steps-nav.horizontal[data-variant=simple-circle] .step-label{white-space:normal;font-size:.92rem}.steps-nav.horizontal[data-variant=simple-circle] .step-connector{width:100%;min-width:56px;margin-top:18px}.steps-nav.horizontal[data-variant=simple-circle][data-size=sm] .step-connector{margin-top:14px}.steps-nav.horizontal[data-variant=simple-circle][data-size=lg] .step-connector{margin-top:22px}.steps-nav.vertical[data-variant=simple-circle] .stepper-item{align-items:start;gap:10px}.steps-nav.vertical[data-variant=simple-circle] .step-chip{padding:0;border:0;background:transparent;box-shadow:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1783
|
+
}
|
|
1784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialStepperComponent, decorators: [{
|
|
1785
|
+
type: Component,
|
|
1786
|
+
args: [{ selector: 'praxis-editorial-stepper', standalone: true, imports: [CommonModule, MatIconModule, PraxisIconDirective], template: `
|
|
1787
|
+
<ol
|
|
1788
|
+
class="steps-nav"
|
|
1789
|
+
[class.vertical]="effectiveOrientation() === 'vertical'"
|
|
1790
|
+
[class.horizontal]="effectiveOrientation() === 'horizontal'"
|
|
1791
|
+
[attr.data-variant]="config()?.variant ?? 'icon-label'"
|
|
1792
|
+
[attr.data-align]="config()?.align ?? 'start'"
|
|
1793
|
+
[attr.data-size]="config()?.size ?? 'md'"
|
|
1794
|
+
[attr.aria-label]="stepperAriaLabel()"
|
|
1795
|
+
>
|
|
1796
|
+
@for (step of steps(); track step.stepId; let last = $last) {
|
|
1797
|
+
<li
|
|
1798
|
+
class="stepper-item"
|
|
1799
|
+
[attr.data-state]="stepState(step)"
|
|
1800
|
+
[attr.aria-posinset]="stepNumber(step)"
|
|
1801
|
+
[attr.aria-setsize]="steps().length"
|
|
1802
|
+
>
|
|
1803
|
+
<button
|
|
1804
|
+
type="button"
|
|
1805
|
+
class="step-chip"
|
|
1806
|
+
[class.active]="activeStepId() === step.stepId"
|
|
1807
|
+
[class.completed]="stepState(step) === 'completed'"
|
|
1808
|
+
[class.blocked]="stepState(step) === 'blocked'"
|
|
1809
|
+
[disabled]="isSelectionBlocked(step.stepId)"
|
|
1810
|
+
[attr.aria-current]="activeStepId() === step.stepId ? 'step' : null"
|
|
1811
|
+
[attr.aria-label]="buildStepAriaLabel(step)"
|
|
1812
|
+
(click)="onStepClick(step.stepId)"
|
|
1813
|
+
>
|
|
1814
|
+
<span class="step-icon" [attr.data-state]="stepState(step)" aria-hidden="true">
|
|
1815
|
+
@if (stepState(step) === 'completed') {
|
|
1816
|
+
<mat-icon aria-hidden="true" praxisIcon="check"></mat-icon>
|
|
1817
|
+
} @else if (step.icon?.name) {
|
|
1818
|
+
<mat-icon aria-hidden="true" [praxisIcon]="step.icon?.name"></mat-icon>
|
|
1819
|
+
} @else {
|
|
1820
|
+
<span>{{ stepNumber(step) }}</span>
|
|
1821
|
+
}
|
|
1822
|
+
</span>
|
|
1823
|
+
@if ((config()?.showLabels ?? true) !== false) {
|
|
1824
|
+
<span class="step-copy">
|
|
1825
|
+
<span class="step-label">{{ step.label }}</span>
|
|
1826
|
+
@if ((config()?.showDescriptions ?? false) && step.description) {
|
|
1827
|
+
<span class="step-description">{{ step.description }}</span>
|
|
1828
|
+
}
|
|
1829
|
+
</span>
|
|
1830
|
+
}
|
|
1831
|
+
</button>
|
|
1832
|
+
@if ((config()?.showConnectors ?? true) && !last) {
|
|
1833
|
+
<span class="step-connector" [attr.data-style]="config()?.connectorStyle ?? 'solid'"></span>
|
|
1834
|
+
}
|
|
1835
|
+
</li>
|
|
1836
|
+
}
|
|
1837
|
+
</ol>
|
|
1838
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.steps-nav{display:flex;gap:12px;list-style:none;padding:0;margin:0}.steps-nav.horizontal[data-align=center]{justify-content:center}.steps-nav.horizontal[data-align=space-between]{justify-content:space-between}.steps-nav.vertical{flex-direction:column}.stepper-item{display:flex;align-items:center;gap:12px;min-width:0}.steps-nav.vertical .stepper-item{align-items:stretch;flex-direction:column}.step-chip{display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:10px 14px;border-radius:var(--editorial-step-radius, 999px);border:1px solid var(--editorial-border-color, #d9deea);background:var(--editorial-surface-primary, #fff);color:var(--editorial-text-primary, #24324a);cursor:pointer;text-align:left}.steps-nav[data-size=sm] .step-chip{min-height:42px;padding:8px 12px;gap:8px}.steps-nav[data-size=lg] .step-chip{min-height:56px;padding:12px 18px;gap:12px}.step-chip.active{border-color:var(--editorial-step-active, var(--editorial-accent, #264a8a));box-shadow:0 0 0 var(--editorial-active-step-border-width, 2px) color-mix(in srgb,var(--editorial-accent, #264a8a) 24%,transparent)}.step-chip.completed .step-icon{background:var(--editorial-step-completed, var(--editorial-success, #35b37e));color:#fff}.step-chip.blocked .step-icon{background:var(--editorial-step-blocked, #c84b4b);color:#fff}.step-chip[disabled]{opacity:.72;cursor:not-allowed}.step-icon{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;background:var(--editorial-step-pending, #eef1f7);color:var(--editorial-text-secondary, #7b8aa0);font-size:.75rem;font-weight:700;flex:0 0 auto}.steps-nav[data-size=sm] .step-icon{width:28px;height:28px;font-size:.7rem}.steps-nav[data-size=lg] .step-icon{width:42px;height:42px;font-size:.9rem}.step-icon mat-icon{width:18px;height:18px;font-size:18px;line-height:18px}.step-chip.active .step-icon{background:var(--editorial-step-active, var(--editorial-accent, #264a8a));color:var(--editorial-accent-contrast, #fff)}.step-copy{display:grid;gap:2px;min-width:0}.step-label{font-weight:700;white-space:nowrap}.step-description{color:var(--editorial-text-secondary, #7b8aa0);font-size:.85rem}.step-connector{display:block;flex:1 1 auto;min-width:32px;height:2px;background:var(--editorial-connector, #8fd8c0);border-radius:999px}.steps-nav.vertical .step-connector{width:2px;min-width:2px;min-height:24px;margin-left:16px;height:24px}.step-connector[data-style=dashed]{background:repeating-linear-gradient(90deg,var(--editorial-connector, #8fd8c0) 0 8px,transparent 8px 14px)}.steps-nav.vertical .step-connector[data-style=dashed]{background:repeating-linear-gradient(180deg,var(--editorial-connector, #8fd8c0) 0 8px,transparent 8px 14px)}.steps-nav[data-variant=simple] .step-copy{display:none}.steps-nav[data-variant=simple-circle]{gap:20px}.steps-nav.horizontal[data-variant=simple-circle] .stepper-item{flex:1 1 0;flex-direction:column;align-items:center;gap:10px}.steps-nav.horizontal[data-variant=simple-circle] .step-chip{flex-direction:column;justify-content:flex-start;min-height:auto;padding:0;gap:8px;border:0;background:transparent;box-shadow:none;text-align:center}.steps-nav.horizontal[data-variant=simple-circle] .step-copy{justify-items:center}.steps-nav.horizontal[data-variant=simple-circle] .step-label{white-space:normal;font-size:.92rem}.steps-nav.horizontal[data-variant=simple-circle] .step-connector{width:100%;min-width:56px;margin-top:18px}.steps-nav.horizontal[data-variant=simple-circle][data-size=sm] .step-connector{margin-top:14px}.steps-nav.horizontal[data-variant=simple-circle][data-size=lg] .step-connector{margin-top:22px}.steps-nav.vertical[data-variant=simple-circle] .stepper-item{align-items:start;gap:10px}.steps-nav.vertical[data-variant=simple-circle] .step-chip{padding:0;border:0;background:transparent;box-shadow:none}\n"] }]
|
|
1839
|
+
}], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: true }] }], activeStepId: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeStepId", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], progressionBlocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "progressionBlocked", required: false }] }], isStepSelectionBlocked: [{ type: i0.Input, args: [{ isSignal: true, alias: "isStepSelectionBlocked", required: false }] }], stepSelected: [{ type: i0.Output, args: ["stepSelected"] }] } });
|
|
827
1840
|
|
|
828
1841
|
function resolveEditorialRuntimeSnapshot(input) {
|
|
829
1842
|
const diagnostics = [];
|
|
830
1843
|
const solution = input.solution;
|
|
831
1844
|
const instance = input.instance;
|
|
832
1845
|
const context = mergeContext(instance?.context ?? {}, instance?.overrides?.contextPatch ?? {}, input.runtimeContext ?? {});
|
|
1846
|
+
const runtimeProblemType = solution?.problemType ?? instance?.template.problemType ?? null;
|
|
833
1847
|
const effectiveThemePreset = resolveEffectiveThemePreset(solution, instance, diagnostics);
|
|
834
|
-
const effectiveCompliancePresets = resolveEffectiveCompliancePresets(solution, instance, diagnostics);
|
|
1848
|
+
const effectiveCompliancePresets = resolveEffectiveCompliancePresets(solution, instance, runtimeProblemType, diagnostics);
|
|
835
1849
|
validateContextContract(solution?.contextContract ?? [], context, diagnostics);
|
|
836
1850
|
validateComplianceContext(effectiveCompliancePresets, context, diagnostics);
|
|
1851
|
+
validateComplianceRequirements(effectiveCompliancePresets, context, diagnostics);
|
|
1852
|
+
diagnoseUnsupportedPresentationConfig(solution?.presentation ?? null, diagnostics);
|
|
837
1853
|
const journeys = mergeJourneys(solution, instance, diagnostics);
|
|
838
1854
|
applyCompliancePresetBlocks(journeys, effectiveCompliancePresets, solution, instance);
|
|
839
1855
|
applyJourneyOverrides(journeys, instance?.overrides?.journeyOverrides ?? [], diagnostics, instance);
|
|
@@ -855,6 +1871,7 @@ function resolveEditorialRuntimeSnapshot(input) {
|
|
|
855
1871
|
description: solution?.description ?? null,
|
|
856
1872
|
problemType: solution?.problemType ?? instance?.template.problemType ?? null,
|
|
857
1873
|
context,
|
|
1874
|
+
presentation: resolveEffectivePresentation(solution?.presentation ?? null, effectiveThemePreset),
|
|
858
1875
|
effectiveThemePreset,
|
|
859
1876
|
effectiveCompliancePresets,
|
|
860
1877
|
journeys,
|
|
@@ -885,13 +1902,13 @@ function resolveEffectiveThemePreset(solution, instance, diagnostics) {
|
|
|
885
1902
|
}
|
|
886
1903
|
return resolved;
|
|
887
1904
|
}
|
|
888
|
-
function resolveEffectiveCompliancePresets(solution, instance, diagnostics) {
|
|
1905
|
+
function resolveEffectiveCompliancePresets(solution, instance, runtimeProblemType, diagnostics) {
|
|
889
1906
|
if (instance?.selectedCompliancePresets?.length) {
|
|
890
|
-
return instance.selectedCompliancePresets;
|
|
1907
|
+
return filterCompliancePresetsByProblemType(instance.selectedCompliancePresets, runtimeProblemType, diagnostics);
|
|
891
1908
|
}
|
|
892
1909
|
const requestedPresetIds = instance?.overrides?.compliancePresetIds;
|
|
893
1910
|
if (!requestedPresetIds?.length) {
|
|
894
|
-
return solution?.compliancePresets ?? [];
|
|
1911
|
+
return filterCompliancePresetsByProblemType(solution?.compliancePresets ?? [], runtimeProblemType, diagnostics);
|
|
895
1912
|
}
|
|
896
1913
|
const resolved = [];
|
|
897
1914
|
for (const presetId of requestedPresetIds) {
|
|
@@ -908,7 +1925,7 @@ function resolveEffectiveCompliancePresets(solution, instance, diagnostics) {
|
|
|
908
1925
|
}
|
|
909
1926
|
resolved.push(preset);
|
|
910
1927
|
}
|
|
911
|
-
return resolved;
|
|
1928
|
+
return filterCompliancePresetsByProblemType(resolved, runtimeProblemType, diagnostics);
|
|
912
1929
|
}
|
|
913
1930
|
function validateContextContract(contract, context, diagnostics) {
|
|
914
1931
|
for (const field of contract) {
|
|
@@ -945,6 +1962,40 @@ function validateComplianceContext(presets, context, diagnostics) {
|
|
|
945
1962
|
}
|
|
946
1963
|
}
|
|
947
1964
|
}
|
|
1965
|
+
function validateComplianceRequirements(presets, context, diagnostics) {
|
|
1966
|
+
for (const preset of presets) {
|
|
1967
|
+
for (const key of preset.requiredEvidenceKeys ?? []) {
|
|
1968
|
+
const value = resolveComplianceValue(context, key);
|
|
1969
|
+
if (value != null && value !== '' && (!Array.isArray(value) || value.length > 0)) {
|
|
1970
|
+
continue;
|
|
1971
|
+
}
|
|
1972
|
+
diagnostics.push({
|
|
1973
|
+
code: 'compliance-evidence-missing',
|
|
1974
|
+
severity: 'error',
|
|
1975
|
+
message: `Compliance preset "${preset.presetId}" requer a evidência "${key}".`,
|
|
1976
|
+
scopeKind: 'global',
|
|
1977
|
+
path: `compliancePreset:${preset.presetId}:evidence:${key}`,
|
|
1978
|
+
});
|
|
1979
|
+
}
|
|
1980
|
+
for (const key of preset.requiredAcceptances ?? []) {
|
|
1981
|
+
const value = resolveComplianceValue(context, key);
|
|
1982
|
+
const accepted = value === true
|
|
1983
|
+
|| value === 'true'
|
|
1984
|
+
|| value === 'accepted'
|
|
1985
|
+
|| value === 'ACCEPTED';
|
|
1986
|
+
if (accepted) {
|
|
1987
|
+
continue;
|
|
1988
|
+
}
|
|
1989
|
+
diagnostics.push({
|
|
1990
|
+
code: 'compliance-acceptance-missing',
|
|
1991
|
+
severity: 'error',
|
|
1992
|
+
message: `Compliance preset "${preset.presetId}" requer o aceite "${key}".`,
|
|
1993
|
+
scopeKind: 'global',
|
|
1994
|
+
path: `compliancePreset:${preset.presetId}:acceptance:${key}`,
|
|
1995
|
+
});
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
948
1999
|
function mergeJourneys(solution, instance, diagnostics) {
|
|
949
2000
|
const resolvedJourneys = new Map();
|
|
950
2001
|
const order = [];
|
|
@@ -990,6 +2041,11 @@ function createResolvedStep(step, source, instance) {
|
|
|
990
2041
|
stepId: step.stepId,
|
|
991
2042
|
label: step.label,
|
|
992
2043
|
description: step.description,
|
|
2044
|
+
kind: step.kind,
|
|
2045
|
+
icon: step.icon,
|
|
2046
|
+
visual: step.visual,
|
|
2047
|
+
optional: step.optional,
|
|
2048
|
+
editableFromReview: step.editableFromReview,
|
|
993
2049
|
blocks: step.blocks.map((block) => createResolvedBlock(block, {
|
|
994
2050
|
...source,
|
|
995
2051
|
blockId: block.blockId,
|
|
@@ -1058,6 +2114,11 @@ function mergeJourney(base, override, source, diagnostics, instance) {
|
|
|
1058
2114
|
stepId: step.stepId,
|
|
1059
2115
|
label: step.label || existing.label,
|
|
1060
2116
|
description: step.description ?? existing.description,
|
|
2117
|
+
kind: step.kind ?? existing.kind,
|
|
2118
|
+
icon: step.icon ?? existing.icon,
|
|
2119
|
+
visual: step.visual ?? existing.visual,
|
|
2120
|
+
optional: step.optional ?? existing.optional,
|
|
2121
|
+
editableFromReview: step.editableFromReview ?? existing.editableFromReview,
|
|
1061
2122
|
blocks: mergedBlocks,
|
|
1062
2123
|
});
|
|
1063
2124
|
}
|
|
@@ -1089,6 +2150,111 @@ function applyCompliancePresetBlocks(journeys, presets, solution, instance) {
|
|
|
1089
2150
|
}
|
|
1090
2151
|
}
|
|
1091
2152
|
}
|
|
2153
|
+
function filterCompliancePresetsByProblemType(presets, runtimeProblemType, diagnostics) {
|
|
2154
|
+
if (!runtimeProblemType) {
|
|
2155
|
+
return presets;
|
|
2156
|
+
}
|
|
2157
|
+
return presets.filter((preset) => {
|
|
2158
|
+
if (!preset.problemTypes?.length || preset.problemTypes.includes(runtimeProblemType)) {
|
|
2159
|
+
return true;
|
|
2160
|
+
}
|
|
2161
|
+
diagnostics.push({
|
|
2162
|
+
code: 'compliance-preset-problem-type-mismatch',
|
|
2163
|
+
severity: 'warning',
|
|
2164
|
+
message: `Compliance preset "${preset.presetId}" nao se aplica ao problemType "${runtimeProblemType}".`,
|
|
2165
|
+
scopeKind: 'global',
|
|
2166
|
+
path: `compliancePreset:${preset.presetId}:problemType`,
|
|
2167
|
+
});
|
|
2168
|
+
return false;
|
|
2169
|
+
});
|
|
2170
|
+
}
|
|
2171
|
+
function resolveComplianceValue(context, key) {
|
|
2172
|
+
const direct = getValueAtPath(context, key);
|
|
2173
|
+
if (direct != null && direct !== '') {
|
|
2174
|
+
return direct;
|
|
2175
|
+
}
|
|
2176
|
+
return getValueAtPath(context, `formData.${key}`);
|
|
2177
|
+
}
|
|
2178
|
+
function resolveEffectivePresentation(basePresentation, themePreset) {
|
|
2179
|
+
if (!basePresentation && !themePreset) {
|
|
2180
|
+
return null;
|
|
2181
|
+
}
|
|
2182
|
+
const layout = {
|
|
2183
|
+
...(basePresentation?.layout ?? {}),
|
|
2184
|
+
};
|
|
2185
|
+
if (themePreset?.maxWidth != null && !layout.maxWidth) {
|
|
2186
|
+
layout.maxWidth = String(themePreset.maxWidth);
|
|
2187
|
+
}
|
|
2188
|
+
if (themePreset?.pageSpacing != null) {
|
|
2189
|
+
layout.spacing = {
|
|
2190
|
+
...(layout.spacing ?? {}),
|
|
2191
|
+
pagePadding: layout.spacing?.pagePadding ?? String(themePreset.pageSpacing),
|
|
2192
|
+
};
|
|
2193
|
+
}
|
|
2194
|
+
if (themePreset?.shellVariant && !layout.shellVariant) {
|
|
2195
|
+
layout.shellVariant = mapThemeShellVariant(themePreset.shellVariant);
|
|
2196
|
+
}
|
|
2197
|
+
const theme = {
|
|
2198
|
+
...(basePresentation?.theme ?? {}),
|
|
2199
|
+
color: {
|
|
2200
|
+
...(basePresentation?.theme?.color ?? {}),
|
|
2201
|
+
pageBackground: basePresentation?.theme?.color?.pageBackground ?? themePreset?.background,
|
|
2202
|
+
},
|
|
2203
|
+
};
|
|
2204
|
+
return {
|
|
2205
|
+
...(basePresentation ?? {}),
|
|
2206
|
+
layout,
|
|
2207
|
+
theme,
|
|
2208
|
+
};
|
|
2209
|
+
}
|
|
2210
|
+
function diagnoseUnsupportedPresentationConfig(presentation, diagnostics) {
|
|
2211
|
+
if (!presentation) {
|
|
2212
|
+
return;
|
|
2213
|
+
}
|
|
2214
|
+
const unsupportedEntries = [];
|
|
2215
|
+
if (presentation.layout?.contentAlign) {
|
|
2216
|
+
unsupportedEntries.push({
|
|
2217
|
+
path: 'presentation.layout.contentAlign',
|
|
2218
|
+
reason: 'contentAlign ainda nao afeta o shell do runtime.',
|
|
2219
|
+
});
|
|
2220
|
+
}
|
|
2221
|
+
if (presentation.layout?.responsive?.tabletOrientation) {
|
|
2222
|
+
unsupportedEntries.push({
|
|
2223
|
+
path: 'presentation.layout.responsive.tabletOrientation',
|
|
2224
|
+
reason: 'tabletOrientation ainda nao possui comportamento responsivo dedicado.',
|
|
2225
|
+
});
|
|
2226
|
+
}
|
|
2227
|
+
if (presentation.motion) {
|
|
2228
|
+
unsupportedEntries.push({
|
|
2229
|
+
path: 'presentation.motion',
|
|
2230
|
+
reason: 'motion ainda nao possui integracao operacional no renderer do runtime.',
|
|
2231
|
+
});
|
|
2232
|
+
}
|
|
2233
|
+
for (const entry of unsupportedEntries) {
|
|
2234
|
+
diagnostics.push({
|
|
2235
|
+
code: 'presentation-config-unsupported',
|
|
2236
|
+
severity: 'warning',
|
|
2237
|
+
message: `Configuracao de presentation ignorada em "${entry.path}". ${entry.reason}`,
|
|
2238
|
+
scopeKind: 'global',
|
|
2239
|
+
path: entry.path,
|
|
2240
|
+
});
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
function mapThemeShellVariant(shellVariant) {
|
|
2244
|
+
if (shellVariant === 'wizard') {
|
|
2245
|
+
return 'corporate-wizard';
|
|
2246
|
+
}
|
|
2247
|
+
if (shellVariant === 'split') {
|
|
2248
|
+
return 'sidebar-journey';
|
|
2249
|
+
}
|
|
2250
|
+
if (shellVariant === 'plain') {
|
|
2251
|
+
return 'compliance-flow';
|
|
2252
|
+
}
|
|
2253
|
+
if (shellVariant === 'card') {
|
|
2254
|
+
return 'compact-form';
|
|
2255
|
+
}
|
|
2256
|
+
return 'editorial-rich';
|
|
2257
|
+
}
|
|
1092
2258
|
function applyJourneyOverrides(journeys, overrides, diagnostics, instance) {
|
|
1093
2259
|
for (const journeyOverride of overrides) {
|
|
1094
2260
|
const journey = journeys.find((candidate) => candidate.journeyId === journeyOverride.journeyId);
|
|
@@ -1352,7 +2518,7 @@ function buildDataCollectionState(block, instance) {
|
|
|
1352
2518
|
resolvedFormConfigSource: resolution.source,
|
|
1353
2519
|
resolvedFormConfigLookupKey: resolution.lookupKey,
|
|
1354
2520
|
hasResolvedFormConfig,
|
|
1355
|
-
expectedAdapter: '
|
|
2521
|
+
expectedAdapter: 'optional',
|
|
1356
2522
|
readiness,
|
|
1357
2523
|
};
|
|
1358
2524
|
}
|
|
@@ -1474,7 +2640,97 @@ function deriveRuntimeFallbackState(snapshot, scope = {}) {
|
|
|
1474
2640
|
};
|
|
1475
2641
|
}
|
|
1476
2642
|
|
|
2643
|
+
function buildRuntimeCssVars(theme) {
|
|
2644
|
+
if (!theme) {
|
|
2645
|
+
return '';
|
|
2646
|
+
}
|
|
2647
|
+
const vars = [
|
|
2648
|
+
['--editorial-page-background', theme.color?.pageBackground],
|
|
2649
|
+
['--editorial-surface-primary', theme.color?.surfacePrimary],
|
|
2650
|
+
['--editorial-surface-secondary', theme.color?.surfaceSecondary],
|
|
2651
|
+
['--editorial-border-color', theme.color?.border],
|
|
2652
|
+
['--editorial-text-primary', theme.color?.textPrimary],
|
|
2653
|
+
['--editorial-text-secondary', theme.color?.textSecondary],
|
|
2654
|
+
['--editorial-accent', theme.color?.accent],
|
|
2655
|
+
['--editorial-accent-contrast', theme.color?.accentContrast],
|
|
2656
|
+
['--editorial-success', theme.color?.success],
|
|
2657
|
+
['--editorial-warning', theme.color?.warning],
|
|
2658
|
+
['--editorial-danger', theme.color?.danger],
|
|
2659
|
+
['--editorial-muted', theme.color?.muted],
|
|
2660
|
+
['--editorial-step-active', theme.color?.stepActive],
|
|
2661
|
+
['--editorial-step-completed', theme.color?.stepCompleted],
|
|
2662
|
+
['--editorial-step-pending', theme.color?.stepPending],
|
|
2663
|
+
['--editorial-step-blocked', theme.color?.stepBlocked],
|
|
2664
|
+
['--editorial-connector', theme.color?.connector],
|
|
2665
|
+
['--editorial-cta-primary', theme.color?.ctaPrimary],
|
|
2666
|
+
['--editorial-cta-primary-text', theme.color?.ctaPrimaryText],
|
|
2667
|
+
['--editorial-cta-secondary', theme.color?.ctaSecondary],
|
|
2668
|
+
['--editorial-cta-secondary-text', theme.color?.ctaSecondaryText],
|
|
2669
|
+
['--editorial-shell-radius', theme.radius?.shell],
|
|
2670
|
+
['--editorial-card-radius', theme.radius?.card],
|
|
2671
|
+
['--editorial-button-radius', theme.radius?.button],
|
|
2672
|
+
['--editorial-field-radius', theme.radius?.field],
|
|
2673
|
+
['--editorial-step-radius', theme.radius?.step],
|
|
2674
|
+
['--editorial-shell-shadow', theme.shadow?.shell],
|
|
2675
|
+
['--editorial-card-shadow', theme.shadow?.card],
|
|
2676
|
+
['--editorial-floating-shadow', theme.shadow?.floating],
|
|
2677
|
+
['--editorial-shell-border-width', theme.borderWidth?.shell],
|
|
2678
|
+
['--editorial-card-border-width', theme.borderWidth?.card],
|
|
2679
|
+
['--editorial-field-border-width', theme.borderWidth?.field],
|
|
2680
|
+
['--editorial-active-step-border-width', theme.borderWidth?.activeStep],
|
|
2681
|
+
['--editorial-title-font-family', theme.typography?.titleFontFamily],
|
|
2682
|
+
['--editorial-body-font-family', theme.typography?.bodyFontFamily],
|
|
2683
|
+
['--editorial-hero-title-size', theme.typography?.heroTitleSize],
|
|
2684
|
+
['--editorial-step-title-size', theme.typography?.stepTitleSize],
|
|
2685
|
+
['--editorial-body-size', theme.typography?.bodySize],
|
|
2686
|
+
['--editorial-caption-size', theme.typography?.captionSize],
|
|
2687
|
+
];
|
|
2688
|
+
const textPrimaryRgb = toRgbTuple(theme.color?.textPrimary);
|
|
2689
|
+
const textSecondaryRgb = toRgbTuple(theme.color?.textSecondary);
|
|
2690
|
+
const surfacePrimaryRgb = toRgbTuple(theme.color?.surfacePrimary);
|
|
2691
|
+
const surfaceSecondaryRgb = toRgbTuple(theme.color?.surfaceSecondary);
|
|
2692
|
+
if (textPrimaryRgb) {
|
|
2693
|
+
vars.push(['--editorial-text-primary-rgb', textPrimaryRgb]);
|
|
2694
|
+
}
|
|
2695
|
+
if (textSecondaryRgb) {
|
|
2696
|
+
vars.push(['--editorial-text-secondary-rgb', textSecondaryRgb]);
|
|
2697
|
+
}
|
|
2698
|
+
if (surfacePrimaryRgb) {
|
|
2699
|
+
vars.push(['--editorial-surface-primary-rgb', surfacePrimaryRgb]);
|
|
2700
|
+
}
|
|
2701
|
+
if (surfaceSecondaryRgb) {
|
|
2702
|
+
vars.push(['--editorial-surface-secondary-rgb', surfaceSecondaryRgb]);
|
|
2703
|
+
}
|
|
2704
|
+
return vars
|
|
2705
|
+
.filter(([, value]) => Boolean(value))
|
|
2706
|
+
.map(([key, value]) => `${key}:${value}`)
|
|
2707
|
+
.join(';');
|
|
2708
|
+
}
|
|
2709
|
+
function toRgbTuple(value) {
|
|
2710
|
+
if (!value) {
|
|
2711
|
+
return undefined;
|
|
2712
|
+
}
|
|
2713
|
+
const normalized = value.trim();
|
|
2714
|
+
const hex = normalized.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i);
|
|
2715
|
+
if (hex) {
|
|
2716
|
+
const raw = hex[1];
|
|
2717
|
+
const expanded = raw.length === 3
|
|
2718
|
+
? raw.split('').map((char) => `${char}${char}`).join('')
|
|
2719
|
+
: raw;
|
|
2720
|
+
const r = parseInt(expanded.slice(0, 2), 16);
|
|
2721
|
+
const g = parseInt(expanded.slice(2, 4), 16);
|
|
2722
|
+
const b = parseInt(expanded.slice(4, 6), 16);
|
|
2723
|
+
return `${r}, ${g}, ${b}`;
|
|
2724
|
+
}
|
|
2725
|
+
const rgb = normalized.match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,\/]+[\d.]+)?\s*\)$/i);
|
|
2726
|
+
if (rgb) {
|
|
2727
|
+
return `${rgb[1]}, ${rgb[2]}, ${rgb[3]}`;
|
|
2728
|
+
}
|
|
2729
|
+
return undefined;
|
|
2730
|
+
}
|
|
2731
|
+
|
|
1477
2732
|
class EditorialFormRuntimeComponent {
|
|
2733
|
+
i18n = inject(PraxisI18nService);
|
|
1478
2734
|
solution = input(null, ...(ngDevMode ? [{ debugName: "solution" }] : []));
|
|
1479
2735
|
instance = input(null, ...(ngDevMode ? [{ debugName: "instance" }] : []));
|
|
1480
2736
|
runtimeContext = input(null, ...(ngDevMode ? [{ debugName: "runtimeContext" }] : []));
|
|
@@ -1485,12 +2741,14 @@ class EditorialFormRuntimeComponent {
|
|
|
1485
2741
|
state = new EditorialRuntimeState();
|
|
1486
2742
|
solutionState = signal(null, ...(ngDevMode ? [{ debugName: "solutionState" }] : []));
|
|
1487
2743
|
instanceState = signal(null, ...(ngDevMode ? [{ debugName: "instanceState" }] : []));
|
|
2744
|
+
runtimeContextState = signal(null, ...(ngDevMode ? [{ debugName: "runtimeContextState" }] : []));
|
|
2745
|
+
compactViewport = signal(false, ...(ngDevMode ? [{ debugName: "compactViewport" }] : []));
|
|
1488
2746
|
lastSnapshotSignature = null;
|
|
1489
2747
|
lastDiagnosticsSignature = null;
|
|
1490
2748
|
lastFallbackSignature = null;
|
|
1491
2749
|
lastBlockingSignature = null;
|
|
1492
2750
|
lastOverrideConflictSignature = null;
|
|
1493
|
-
runtime = this.state.connect(this.solutionState, this.instanceState, this.
|
|
2751
|
+
runtime = this.state.connect(this.solutionState, this.instanceState, this.runtimeContextState);
|
|
1494
2752
|
snapshot = computed(() => this.runtime.snapshot(), ...(ngDevMode ? [{ debugName: "snapshot" }] : []));
|
|
1495
2753
|
resolvedHostConfig = computed(() => ({
|
|
1496
2754
|
...DEFAULT_EDITORIAL_RUNTIME_HOST_CONFIG,
|
|
@@ -1515,28 +2773,38 @@ class EditorialFormRuntimeComponent {
|
|
|
1515
2773
|
activeStepHasErrors = computed(() => this.activeStepDiagnostics().some((item) => item.severity === 'error'), ...(ngDevMode ? [{ debugName: "activeStepHasErrors" }] : []));
|
|
1516
2774
|
activeStepHasWarnings = computed(() => this.activeStepDiagnostics().some((item) => item.severity === 'warning'), ...(ngDevMode ? [{ debugName: "activeStepHasWarnings" }] : []));
|
|
1517
2775
|
diagnosticsMessage = computed(() => this.fallbackState().mode === 'blocked'
|
|
1518
|
-
? 'Existem inconsistencias bloqueadoras que impedem a progressao segura do fluxo editorial.'
|
|
2776
|
+
? this.t('runtime.diagnostics.message.blocked', 'Existem inconsistencias bloqueadoras que impedem a progressao segura do fluxo editorial.')
|
|
1519
2777
|
: this.fallbackState().mode === 'degraded'
|
|
1520
|
-
? 'O runtime esta operando de forma degradada e requer atencao operacional.'
|
|
2778
|
+
? this.t('runtime.diagnostics.message.degraded', 'O runtime esta operando de forma degradada e requer atencao operacional.')
|
|
1521
2779
|
: this.runtimeDiagnostics().hasErrors
|
|
1522
|
-
? 'Existem inconsistencias que podem comprometer a experiencia editorial.'
|
|
1523
|
-
: 'Existem avisos operacionais para revisar nesta instancia editorial.', ...(ngDevMode ? [{ debugName: "diagnosticsMessage" }] : []));
|
|
2780
|
+
? this.t('runtime.diagnostics.message.error', 'Existem inconsistencias que podem comprometer a experiencia editorial.')
|
|
2781
|
+
: this.t('runtime.diagnostics.message.warning', 'Existem avisos operacionais para revisar nesta instancia editorial.'), ...(ngDevMode ? [{ debugName: "diagnosticsMessage" }] : []));
|
|
1524
2782
|
activeGlobalDiagnostics = computed(() => this.globalDiagnostics().filter((item) => item.severity === 'error'), ...(ngDevMode ? [{ debugName: "activeGlobalDiagnostics" }] : []));
|
|
1525
2783
|
visibleBlocks = computed(() => getVisibleBlocks(this.activeStep()?.blocks, this.resolvedContext()), ...(ngDevMode ? [{ debugName: "visibleBlocks" }] : []));
|
|
1526
2784
|
runtimeTitle = computed(() => this.snapshot().title, ...(ngDevMode ? [{ debugName: "runtimeTitle" }] : []));
|
|
1527
2785
|
runtimeDescription = computed(() => this.snapshot().description, ...(ngDevMode ? [{ debugName: "runtimeDescription" }] : []));
|
|
1528
2786
|
runtimeEyebrow = computed(() => this.snapshot().problemType, ...(ngDevMode ? [{ debugName: "runtimeEyebrow" }] : []));
|
|
2787
|
+
presentation = computed(() => this.snapshot().presentation, ...(ngDevMode ? [{ debugName: "presentation" }] : []));
|
|
2788
|
+
runtimeCssVars = computed(() => buildRuntimeCssVars(this.presentation()?.theme), ...(ngDevMode ? [{ debugName: "runtimeCssVars" }] : []));
|
|
2789
|
+
runtimeLayoutCss = computed(() => buildRuntimeLayoutCss(this.presentation()?.layout), ...(ngDevMode ? [{ debugName: "runtimeLayoutCss" }] : []));
|
|
2790
|
+
runtimeStyleAttr = computed(() => [this.runtimeCssVars(), this.runtimeLayoutCss()].filter(Boolean).join(';'), ...(ngDevMode ? [{ debugName: "runtimeStyleAttr" }] : []));
|
|
2791
|
+
effectiveOrientation = computed(() => resolveRuntimeOrientation(this.presentation()?.layout, this.presentation()?.stepper, this.compactViewport()), ...(ngDevMode ? [{ debugName: "effectiveOrientation" }] : []));
|
|
2792
|
+
shellVariant = computed(() => resolveShellVariant(this.presentation()?.layout), ...(ngDevMode ? [{ debugName: "shellVariant" }] : []));
|
|
2793
|
+
effectiveDensity = computed(() => resolveDensity(this.presentation()?.layout), ...(ngDevMode ? [{ debugName: "effectiveDensity" }] : []));
|
|
2794
|
+
stepperConfig = computed(() => this.presentation()?.stepper ?? null, ...(ngDevMode ? [{ debugName: "stepperConfig" }] : []));
|
|
2795
|
+
stepperVisible = computed(() => this.stepperConfig()?.visible !== false, ...(ngDevMode ? [{ debugName: "stepperVisible" }] : []));
|
|
2796
|
+
stepSelectionBlocker = (stepId) => this.isStepSelectionBlocked(stepId);
|
|
1529
2797
|
fallbackLabel = computed(() => {
|
|
1530
2798
|
if (this.fallbackState().mode === 'blocked') {
|
|
1531
|
-
return 'Runtime bloqueado';
|
|
2799
|
+
return this.t('runtime.fallback.blocked', 'Runtime bloqueado');
|
|
1532
2800
|
}
|
|
1533
2801
|
if (this.fallbackState().mode === 'degraded') {
|
|
1534
|
-
return 'Runtime degradado';
|
|
2802
|
+
return this.t('runtime.fallback.degraded', 'Runtime degradado');
|
|
1535
2803
|
}
|
|
1536
2804
|
if (this.fallbackState().mode === 'warning') {
|
|
1537
|
-
return 'Runtime com aviso';
|
|
2805
|
+
return this.t('runtime.fallback.warning', 'Runtime com aviso');
|
|
1538
2806
|
}
|
|
1539
|
-
return 'Runtime saudavel';
|
|
2807
|
+
return this.t('runtime.fallback.healthy', 'Runtime saudavel');
|
|
1540
2808
|
}, ...(ngDevMode ? [{ debugName: "fallbackLabel" }] : []));
|
|
1541
2809
|
currentStepIndex = computed(() => {
|
|
1542
2810
|
const journey = this.activeJourney();
|
|
@@ -1555,6 +2823,25 @@ class EditorialFormRuntimeComponent {
|
|
|
1555
2823
|
effect(() => {
|
|
1556
2824
|
this.solutionState.set(this.solution());
|
|
1557
2825
|
this.instanceState.set(this.instance());
|
|
2826
|
+
this.runtimeContextState.set(this.runtimeContext());
|
|
2827
|
+
});
|
|
2828
|
+
effect((onCleanup) => {
|
|
2829
|
+
const breakpoint = this.presentation()?.layout?.responsive?.collapseStepperBelow;
|
|
2830
|
+
if (typeof window === 'undefined' || typeof window.matchMedia !== 'function' || !breakpoint) {
|
|
2831
|
+
this.compactViewport.set(false);
|
|
2832
|
+
return;
|
|
2833
|
+
}
|
|
2834
|
+
const media = window.matchMedia(`(max-width: ${breakpoint})`);
|
|
2835
|
+
const sync = () => this.compactViewport.set(media.matches);
|
|
2836
|
+
sync();
|
|
2837
|
+
const listener = () => sync();
|
|
2838
|
+
if (typeof media.addEventListener === 'function') {
|
|
2839
|
+
media.addEventListener('change', listener);
|
|
2840
|
+
onCleanup(() => media.removeEventListener('change', listener));
|
|
2841
|
+
return;
|
|
2842
|
+
}
|
|
2843
|
+
media.addListener(listener);
|
|
2844
|
+
onCleanup(() => media.removeListener(listener));
|
|
1558
2845
|
});
|
|
1559
2846
|
effect(() => {
|
|
1560
2847
|
const snapshot = this.snapshot();
|
|
@@ -1684,6 +2971,18 @@ class EditorialFormRuntimeComponent {
|
|
|
1684
2971
|
this.state.selectStep(next.stepId);
|
|
1685
2972
|
}
|
|
1686
2973
|
}
|
|
2974
|
+
handleBlockAction(action) {
|
|
2975
|
+
if (action.actionId === 'next-step') {
|
|
2976
|
+
this.goToNextStep();
|
|
2977
|
+
return;
|
|
2978
|
+
}
|
|
2979
|
+
if (action.actionId === 'previous-step') {
|
|
2980
|
+
this.goToPreviousStep();
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
updateRuntimeContext(nextContext) {
|
|
2984
|
+
this.runtimeContextState.set(nextContext);
|
|
2985
|
+
}
|
|
1687
2986
|
journeyErrorCount(journeyId) {
|
|
1688
2987
|
return this.countDiagnostics((item) => item.journeyId === journeyId && item.severity === 'error');
|
|
1689
2988
|
}
|
|
@@ -1698,20 +2997,22 @@ class EditorialFormRuntimeComponent {
|
|
|
1698
2997
|
}
|
|
1699
2998
|
formatDiagnosticSeverity(item) {
|
|
1700
2999
|
if (item.severity === 'error') {
|
|
1701
|
-
return 'Erro';
|
|
3000
|
+
return this.t('runtime.diagnostics.severity.error', 'Erro');
|
|
1702
3001
|
}
|
|
1703
3002
|
if (item.severity === 'warning') {
|
|
1704
|
-
return 'Aviso';
|
|
3003
|
+
return this.t('runtime.diagnostics.severity.warning', 'Aviso');
|
|
1705
3004
|
}
|
|
1706
|
-
return 'Info';
|
|
3005
|
+
return this.t('runtime.diagnostics.severity.info', 'Info');
|
|
1707
3006
|
}
|
|
1708
3007
|
formatDiagnosticScope(item) {
|
|
1709
3008
|
const parts = [
|
|
1710
|
-
item.scopeKind === 'global'
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
formatScopeLabel('
|
|
1714
|
-
|
|
3009
|
+
item.scopeKind === 'global'
|
|
3010
|
+
? this.t('runtime.scope.global', 'Escopo: runtime global')
|
|
3011
|
+
: null,
|
|
3012
|
+
formatScopeLabel(this.t('runtime.scope.journey', 'Jornada'), item.journeyLabel, item.journeyId),
|
|
3013
|
+
formatScopeLabel(this.t('runtime.scope.step', 'Etapa'), item.stepLabel, item.stepId),
|
|
3014
|
+
formatScopeLabel(this.t('runtime.scope.block', 'Bloco'), item.blockLabel, item.blockId),
|
|
3015
|
+
item.path ? `${this.t('runtime.scope.path', 'Path')}: ${item.path}` : null,
|
|
1715
3016
|
].filter((value) => Boolean(value));
|
|
1716
3017
|
return parts.join(' | ');
|
|
1717
3018
|
}
|
|
@@ -1730,13 +3031,16 @@ class EditorialFormRuntimeComponent {
|
|
|
1730
3031
|
if (stepId === activeStepId) {
|
|
1731
3032
|
return false;
|
|
1732
3033
|
}
|
|
3034
|
+
if (this.stepperConfig()?.allowStepJump === false) {
|
|
3035
|
+
return true;
|
|
3036
|
+
}
|
|
1733
3037
|
return this.isForwardNavigationBlocked();
|
|
1734
3038
|
}
|
|
1735
3039
|
navigationBlockingMessage() {
|
|
1736
3040
|
if (this.activeGlobalDiagnostics().length) {
|
|
1737
|
-
return 'A navegacao de avanço foi bloqueada porque o runtime possui erro global que precisa ser corrigido antes de continuar.';
|
|
3041
|
+
return this.t('runtime.navigation.globalBlocked', 'A navegacao de avanço foi bloqueada porque o runtime possui erro global que precisa ser corrigido antes de continuar.');
|
|
1738
3042
|
}
|
|
1739
|
-
return 'A navegacao de avanço foi bloqueada porque a etapa atual possui erro estrutural.';
|
|
3043
|
+
return this.t('runtime.navigation.stepBlocked', 'A navegacao de avanço foi bloqueada porque a etapa atual possui erro estrutural.');
|
|
1740
3044
|
}
|
|
1741
3045
|
countDiagnostics(predicate) {
|
|
1742
3046
|
return this.diagnosticItems().filter(predicate).length;
|
|
@@ -1751,9 +3055,21 @@ class EditorialFormRuntimeComponent {
|
|
|
1751
3055
|
}
|
|
1752
3056
|
this.operationalEvent.emit(event);
|
|
1753
3057
|
}
|
|
3058
|
+
t(key, fallback, params) {
|
|
3059
|
+
return this.i18n.t(`praxis.editorialForms.${key}`, params, fallback);
|
|
3060
|
+
}
|
|
1754
3061
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialFormRuntimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1755
3062
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.17", type: EditorialFormRuntimeComponent, isStandalone: true, selector: "praxis-editorial-form-runtime", inputs: { solution: { classPropertyName: "solution", publicName: "solution", isSignal: true, isRequired: false, transformFunction: null }, instance: { classPropertyName: "instance", publicName: "instance", isSignal: true, isRequired: false, transformFunction: null }, runtimeContext: { classPropertyName: "runtimeContext", publicName: "runtimeContext", isSignal: true, isRequired: false, transformFunction: null }, hostConfig: { classPropertyName: "hostConfig", publicName: "hostConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { snapshotChange: "snapshotChange", fallbackChange: "fallbackChange", operationalEvent: "operationalEvent" }, ngImport: i0, template: `
|
|
1756
|
-
<section
|
|
3063
|
+
<section
|
|
3064
|
+
class="editorial-runtime"
|
|
3065
|
+
[class.orientation-horizontal]="effectiveOrientation() === 'horizontal'"
|
|
3066
|
+
[class.orientation-vertical]="effectiveOrientation() === 'vertical'"
|
|
3067
|
+
[class.density-compact]="effectiveDensity() === 'compact'"
|
|
3068
|
+
[class.density-comfortable]="effectiveDensity() === 'comfortable'"
|
|
3069
|
+
[class.density-relaxed]="effectiveDensity() === 'relaxed'"
|
|
3070
|
+
[attr.data-shell-variant]="shellVariant()"
|
|
3071
|
+
[style]="runtimeStyleAttr()"
|
|
3072
|
+
>
|
|
1757
3073
|
@if (runtimeDiagnostics().items.length) {
|
|
1758
3074
|
<section
|
|
1759
3075
|
class="diagnostics-panel"
|
|
@@ -1763,18 +3079,26 @@ class EditorialFormRuntimeComponent {
|
|
|
1763
3079
|
[attr.aria-live]="runtimeDiagnostics().hasErrors ? 'assertive' : 'polite'"
|
|
1764
3080
|
aria-atomic="true"
|
|
1765
3081
|
>
|
|
1766
|
-
<h2>Diagnosticos do runtime</h2>
|
|
3082
|
+
<h2>{{ t('runtime.diagnostics.title', 'Diagnosticos do runtime') }}</h2>
|
|
1767
3083
|
<p>{{ diagnosticsMessage() }}</p>
|
|
1768
|
-
<div
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
3084
|
+
<div
|
|
3085
|
+
class="diagnostics-summary"
|
|
3086
|
+
[attr.aria-label]="t('runtime.diagnostics.severitySummary', 'Resumo de severidade')"
|
|
3087
|
+
>
|
|
3088
|
+
<span class="summary-pill error">{{ t('runtime.diagnostics.errorsCount', 'Erros: {count}', { count: diagnosticsErrorCount() }) }}</span>
|
|
3089
|
+
<span class="summary-pill warning">{{ t('runtime.diagnostics.warningsCount', 'Avisos: {count}', { count: diagnosticsWarningCount() }) }}</span>
|
|
3090
|
+
<span class="summary-pill info">{{ t('runtime.diagnostics.infoCount', 'Infos: {count}', { count: diagnosticsInfoCount() }) }}</span>
|
|
1772
3091
|
</div>
|
|
1773
3092
|
<details class="diagnostics-details">
|
|
1774
|
-
<summary>
|
|
3093
|
+
<summary>
|
|
3094
|
+
{{ t('runtime.diagnostics.details', 'Ver detalhes ({count})', { count: diagnosticItems().length }) }}
|
|
3095
|
+
</summary>
|
|
1775
3096
|
@if (globalDiagnostics().length) {
|
|
1776
|
-
<section
|
|
1777
|
-
|
|
3097
|
+
<section
|
|
3098
|
+
class="diagnostic-group global"
|
|
3099
|
+
[attr.aria-label]="t('runtime.diagnostics.globalErrors', 'Erros globais do runtime')"
|
|
3100
|
+
>
|
|
3101
|
+
<h3>{{ t('runtime.diagnostics.globalErrors', 'Erros globais do runtime') }}</h3>
|
|
1778
3102
|
<ul class="diagnostics-list">
|
|
1779
3103
|
@for (item of globalDiagnostics(); track item.code + ':' + (item.path ?? $index)) {
|
|
1780
3104
|
<li>
|
|
@@ -1818,7 +3142,10 @@ class EditorialFormRuntimeComponent {
|
|
|
1818
3142
|
</header>
|
|
1819
3143
|
|
|
1820
3144
|
@if (journeys().length > 1) {
|
|
1821
|
-
<nav
|
|
3145
|
+
<nav
|
|
3146
|
+
class="journey-tabs"
|
|
3147
|
+
[attr.aria-label]="t('runtime.journeys.ariaLabel', 'Jornadas editoriais')"
|
|
3148
|
+
>
|
|
1822
3149
|
@for (journey of journeys(); track journey.journeyId) {
|
|
1823
3150
|
<button
|
|
1824
3151
|
type="button"
|
|
@@ -1830,11 +3157,17 @@ class EditorialFormRuntimeComponent {
|
|
|
1830
3157
|
>
|
|
1831
3158
|
{{ journey.label }}
|
|
1832
3159
|
@if (journeyErrorCount(journey.journeyId)) {
|
|
1833
|
-
<span
|
|
3160
|
+
<span
|
|
3161
|
+
class="status-badge error"
|
|
3162
|
+
[attr.aria-label]="t('runtime.journeys.errors', 'Jornada com erros')"
|
|
3163
|
+
>
|
|
1834
3164
|
{{ journeyErrorCount(journey.journeyId) }}
|
|
1835
3165
|
</span>
|
|
1836
3166
|
} @else if (journeyWarningCount(journey.journeyId)) {
|
|
1837
|
-
<span
|
|
3167
|
+
<span
|
|
3168
|
+
class="status-badge warning"
|
|
3169
|
+
[attr.aria-label]="t('runtime.journeys.warnings', 'Jornada com avisos')"
|
|
3170
|
+
>
|
|
1838
3171
|
{{ journeyWarningCount(journey.journeyId) }}
|
|
1839
3172
|
</span>
|
|
1840
3173
|
}
|
|
@@ -1852,32 +3185,16 @@ class EditorialFormRuntimeComponent {
|
|
|
1852
3185
|
}
|
|
1853
3186
|
</header>
|
|
1854
3187
|
|
|
1855
|
-
@if (journey.steps.length > 1) {
|
|
1856
|
-
<
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
(click)="selectStep(step.stepId)"
|
|
1866
|
-
>
|
|
1867
|
-
{{ step.label }}
|
|
1868
|
-
@if (stepErrorCount(step.stepId)) {
|
|
1869
|
-
<span class="status-badge error" aria-label="Etapa com erros">
|
|
1870
|
-
{{ stepErrorCount(step.stepId) }}
|
|
1871
|
-
</span>
|
|
1872
|
-
} @else if (stepWarningCount(step.stepId)) {
|
|
1873
|
-
<span class="status-badge warning" aria-label="Etapa com avisos">
|
|
1874
|
-
{{ stepWarningCount(step.stepId) }}
|
|
1875
|
-
</span>
|
|
1876
|
-
}
|
|
1877
|
-
</button>
|
|
1878
|
-
</li>
|
|
1879
|
-
}
|
|
1880
|
-
</ol>
|
|
3188
|
+
@if (journey.steps.length > 1 && stepperVisible()) {
|
|
3189
|
+
<praxis-editorial-stepper
|
|
3190
|
+
[steps]="journey.steps"
|
|
3191
|
+
[activeStepId]="activeStep()?.stepId ?? null"
|
|
3192
|
+
[config]="stepperConfig()"
|
|
3193
|
+
[orientation]="effectiveOrientation()"
|
|
3194
|
+
[progressionBlocked]="isForwardNavigationBlocked()"
|
|
3195
|
+
[isStepSelectionBlocked]="stepSelectionBlocker"
|
|
3196
|
+
(stepSelected)="selectStep($event)"
|
|
3197
|
+
/>
|
|
1881
3198
|
}
|
|
1882
3199
|
|
|
1883
3200
|
@if (activeStep(); as step) {
|
|
@@ -1894,7 +3211,12 @@ class EditorialFormRuntimeComponent {
|
|
|
1894
3211
|
}
|
|
1895
3212
|
</div>
|
|
1896
3213
|
<div class="step-counter">
|
|
1897
|
-
|
|
3214
|
+
{{
|
|
3215
|
+
t('runtime.step.counter', 'Etapa {current} de {total}', {
|
|
3216
|
+
current: currentStepIndex() + 1,
|
|
3217
|
+
total: journey.steps.length,
|
|
3218
|
+
})
|
|
3219
|
+
}}
|
|
1898
3220
|
</div>
|
|
1899
3221
|
</header>
|
|
1900
3222
|
|
|
@@ -1907,7 +3229,7 @@ class EditorialFormRuntimeComponent {
|
|
|
1907
3229
|
[attr.aria-live]="activeStepHasErrors() ? 'assertive' : 'polite'"
|
|
1908
3230
|
aria-atomic="true"
|
|
1909
3231
|
>
|
|
1910
|
-
<h4>Situacao desta etapa</h4>
|
|
3232
|
+
<h4>{{ t('runtime.step.statusTitle', 'Situacao desta etapa') }}</h4>
|
|
1911
3233
|
<ul class="diagnostics-list contextual">
|
|
1912
3234
|
@for (item of activeStepDiagnostics(); track item.code + ':' + (item.path ?? $index)) {
|
|
1913
3235
|
<li>
|
|
@@ -1929,7 +3251,7 @@ class EditorialFormRuntimeComponent {
|
|
|
1929
3251
|
aria-live="assertive"
|
|
1930
3252
|
aria-atomic="true"
|
|
1931
3253
|
>
|
|
1932
|
-
<h4>Erro global do runtime</h4>
|
|
3254
|
+
<h4>{{ t('runtime.step.globalErrorTitle', 'Erro global do runtime') }}</h4>
|
|
1933
3255
|
<ul class="diagnostics-list contextual">
|
|
1934
3256
|
@for (item of activeGlobalDiagnostics(); track item.code + ':' + (item.path ?? $index)) {
|
|
1935
3257
|
<li>
|
|
@@ -1951,6 +3273,8 @@ class EditorialFormRuntimeComponent {
|
|
|
1951
3273
|
[runtimeContext]="resolvedContext()"
|
|
1952
3274
|
[solution]="solution()"
|
|
1953
3275
|
[instance]="instance()"
|
|
3276
|
+
(runtimeContextChange)="updateRuntimeContext($event)"
|
|
3277
|
+
(blockAction)="handleBlockAction($event)"
|
|
1954
3278
|
(operationalEvent)="emitOperationalEvent($event)"
|
|
1955
3279
|
/>
|
|
1956
3280
|
}
|
|
@@ -1958,16 +3282,26 @@ class EditorialFormRuntimeComponent {
|
|
|
1958
3282
|
|
|
1959
3283
|
@if (journey.steps.length > 1) {
|
|
1960
3284
|
<footer class="step-actions">
|
|
1961
|
-
<button
|
|
1962
|
-
|
|
3285
|
+
<button
|
|
3286
|
+
type="button"
|
|
3287
|
+
class="secondary"
|
|
3288
|
+
(click)="goToPreviousStep()"
|
|
3289
|
+
[disabled]="!hasPreviousStep()"
|
|
3290
|
+
>
|
|
3291
|
+
{{ t('runtime.actions.previous', 'Etapa anterior') }}
|
|
1963
3292
|
</button>
|
|
1964
3293
|
<button
|
|
1965
3294
|
type="button"
|
|
3295
|
+
class="primary"
|
|
1966
3296
|
(click)="goToNextStep()"
|
|
1967
3297
|
[disabled]="!hasNextStep() || isForwardNavigationBlocked()"
|
|
1968
3298
|
[attr.aria-describedby]="isForwardNavigationBlocked() ? 'navigation-blocking-note' : null"
|
|
1969
3299
|
>
|
|
1970
|
-
{{
|
|
3300
|
+
{{
|
|
3301
|
+
isForwardNavigationBlocked()
|
|
3302
|
+
? t('runtime.actions.nextBlocked', 'Corrija os erros para avancar')
|
|
3303
|
+
: t('runtime.actions.next', 'Proxima etapa')
|
|
3304
|
+
}}
|
|
1971
3305
|
</button>
|
|
1972
3306
|
</footer>
|
|
1973
3307
|
@if (isForwardNavigationBlocked()) {
|
|
@@ -1981,23 +3315,36 @@ class EditorialFormRuntimeComponent {
|
|
|
1981
3315
|
</section>
|
|
1982
3316
|
} @else {
|
|
1983
3317
|
<section class="empty-state">
|
|
1984
|
-
<h2>Editorial runtime sem jornada</h2>
|
|
1985
|
-
<p>
|
|
3318
|
+
<h2>{{ t('runtime.empty.noJourneyTitle', 'Editorial runtime sem jornada') }}</h2>
|
|
3319
|
+
<p>
|
|
3320
|
+
{{ t('runtime.empty.noJourneyDescription', 'Nenhuma jornada editorial foi resolvida para o estado atual.') }}
|
|
3321
|
+
</p>
|
|
1986
3322
|
</section>
|
|
1987
3323
|
}
|
|
1988
3324
|
} @else {
|
|
1989
3325
|
<section class="empty-state">
|
|
1990
|
-
<h2>Editorial runtime vazio</h2>
|
|
1991
|
-
<p>
|
|
3326
|
+
<h2>{{ t('runtime.empty.noSolutionTitle', 'Editorial runtime vazio') }}</h2>
|
|
3327
|
+
<p>
|
|
3328
|
+
{{ t('runtime.empty.noSolutionDescription', 'Forneca uma solution ou instance editorial para materializar a jornada.') }}
|
|
3329
|
+
</p>
|
|
1992
3330
|
</section>
|
|
1993
3331
|
}
|
|
1994
3332
|
</section>
|
|
1995
|
-
`, isInline: true, styles: [":host{display:block}.editorial-runtime{display:grid;gap:24px;padding:24px;color:var(--md-sys-color-on-surface, #1b1b1f);background:var(--md-sys-color-surface, #fdf8fd)}.runtime-header,.journey-card,.empty-state,.diagnostics-panel{border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 70%,transparent);border-radius:20px;background:var(--md-sys-color-surface-container-low, #f7f2fa);padding:20px}.diagnostics-panel{display:grid;gap:10px}.diagnostics-panel.warning{border-color:color-mix(in srgb,#b26a00 55%,var(--md-sys-color-outline-variant, #cac4d0));background:color-mix(in srgb,#fff4de 78%,var(--md-sys-color-surface-container-low, #f7f2fa))}.diagnostics-panel.error{border-color:color-mix(in srgb,#b3261e 60%,var(--md-sys-color-outline-variant, #cac4d0));background:color-mix(in srgb,#fde7e9 78%,var(--md-sys-color-surface-container-low, #f7f2fa))}.diagnostics-list{margin:0;padding-left:18px;display:grid;gap:8px}.diagnostics-summary{display:flex;flex-wrap:wrap;gap:8px}.summary-pill{display:inline-flex;align-items:center;min-height:32px;padding:6px 10px;border-radius:999px;font-size:.85rem;border:1px solid transparent;background:color-mix(in srgb,var(--md-sys-color-surface, #fff) 85%,transparent)}.summary-pill.error{border-color:color-mix(in srgb,#b3261e 45%,transparent)}.summary-pill.warning{border-color:color-mix(in srgb,#b26a00 45%,transparent)}.summary-pill.info{border-color:color-mix(in srgb,#00639b 45%,transparent)}.status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;min-height:22px;padding:0 6px;border-radius:999px;font-size:.75rem;font-weight:700;background:var(--md-sys-color-surface, #fff)}.status-badge.error{color:#8c1d18;background:#fde7e9}.status-badge.warning{color:#7a4b00;background:#fff4de}.diagnostics-details summary{cursor:pointer;font-weight:600}.diagnostic-group{display:grid;gap:8px;padding:12px 0}.diagnostic-group.global{border-bottom:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 65%,transparent);margin-bottom:12px}.step-panel.error{border-left:4px solid #b3261e}.step-panel.warning{border-left:4px solid #b26a00}.step-diagnostics{display:grid;gap:8px;padding:14px 16px;border-radius:16px}.step-diagnostics.error{background:#fde7e9;color:#5b1210}.step-diagnostics.warning{background:#fff4de;color:#6b4300}.step-diagnostics.global{background:#fde7e9;color:#5b1210;border:1px solid color-mix(in srgb,#b3261e 35%,transparent)}.diagnostics-list.contextual{padding-left:16px}.diagnostic-location{display:block;margin-top:4px;font-size:.82rem;opacity:.85}.step-blocking-note{font-size:.9rem;color:#8c1d18}.eyebrow{margin:0 0 8px;text-transform:uppercase;letter-spacing:.08em;font-size
|
|
3333
|
+
`, isInline: true, styles: [":host{display:block}.editorial-runtime{display:grid;gap:24px;padding:var(--editorial-page-padding, 24px);color:var(--editorial-text-primary, var(--md-sys-color-on-surface, #1b1b1f));background:var(--editorial-page-background, var(--md-sys-color-surface, #fdf8fd));font-family:var(--editorial-body-font-family, inherit)}.runtime-header,.journey-card,.empty-state,.diagnostics-panel{border:var(--editorial-shell-border-width, 1px) solid color-mix(in srgb,var(--editorial-border-color, var(--md-sys-color-outline-variant, #cac4d0)) 70%,transparent);border-radius:var(--editorial-shell-radius, 20px);background:var(--editorial-surface-secondary, var(--md-sys-color-surface-container-low, #f7f2fa));padding:var(--editorial-shell-padding, 20px);box-shadow:var(--editorial-shell-shadow, none)}.diagnostics-panel{display:grid;gap:10px}.diagnostics-panel.warning{border-color:color-mix(in srgb,#b26a00 55%,var(--md-sys-color-outline-variant, #cac4d0));background:color-mix(in srgb,#fff4de 78%,var(--md-sys-color-surface-container-low, #f7f2fa))}.diagnostics-panel.error{border-color:color-mix(in srgb,#b3261e 60%,var(--md-sys-color-outline-variant, #cac4d0));background:color-mix(in srgb,#fde7e9 78%,var(--md-sys-color-surface-container-low, #f7f2fa))}.diagnostics-list{margin:0;padding-left:18px;display:grid;gap:8px}.diagnostics-summary{display:flex;flex-wrap:wrap;gap:8px}.summary-pill{display:inline-flex;align-items:center;min-height:32px;padding:6px 10px;border-radius:999px;font-size:.85rem;border:1px solid transparent;background:color-mix(in srgb,var(--md-sys-color-surface, #fff) 85%,transparent)}.summary-pill.error{border-color:color-mix(in srgb,#b3261e 45%,transparent)}.summary-pill.warning{border-color:color-mix(in srgb,#b26a00 45%,transparent)}.summary-pill.info{border-color:color-mix(in srgb,#00639b 45%,transparent)}.status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;min-height:22px;padding:0 6px;border-radius:999px;font-size:.75rem;font-weight:700;background:var(--md-sys-color-surface, #fff)}.status-badge.error{color:#8c1d18;background:#fde7e9}.status-badge.warning{color:#7a4b00;background:#fff4de}.diagnostics-details summary{cursor:pointer;font-weight:600}.diagnostic-group{display:grid;gap:8px;padding:12px 0}.diagnostic-group.global{border-bottom:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 65%,transparent);margin-bottom:12px}.step-panel.error{border-left:4px solid #b3261e}.step-panel.warning{border-left:4px solid #b26a00}.step-diagnostics{display:grid;gap:8px;padding:14px 16px;border-radius:16px}.step-diagnostics.error{background:#fde7e9;color:#5b1210}.step-diagnostics.warning{background:#fff4de;color:#6b4300}.step-diagnostics.global{background:#fde7e9;color:#5b1210;border:1px solid color-mix(in srgb,#b3261e 35%,transparent)}.diagnostics-list.contextual{padding-left:16px}.diagnostic-location{display:block;margin-top:4px;font-size:.82rem;opacity:.85}.step-blocking-note{font-size:.9rem;color:#8c1d18}.eyebrow{margin:0 0 8px;text-transform:uppercase;letter-spacing:.08em;font-size:var(--editorial-caption-size, .75rem);color:var(--editorial-accent, var(--md-sys-color-primary, #6750a4));font-weight:700}.runtime-state-pill{justify-self:start;display:inline-flex;align-items:center;min-height:30px;padding:4px 10px;border-radius:999px;font-size:.8rem;font-weight:700;background:color-mix(in srgb,var(--md-sys-color-surface, #fff) 88%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 70%,transparent)}.runtime-state-pill[data-mode=warning]{color:#7a4b00;background:#fff4de}.runtime-state-pill[data-mode=degraded]{color:#8c1d18;background:#fde7e9}.runtime-state-pill[data-mode=blocked]{color:#8c1d18;background:#fde7e9;border-color:color-mix(in srgb,#b3261e 55%,transparent)}h1,h2,h3,p{margin:0}h1{font-size:var(--editorial-hero-title-size, 2rem);line-height:1.1}.step-header h3{font-size:var(--editorial-step-title-size, 1.25rem);line-height:1.2}.runtime-header,.journey-card,.journey-header,.step-panel{display:grid;gap:12px}.editorial-runtime[data-shell-variant=sidebar-journey] .journey-card,.orientation-vertical .journey-card{grid-template-columns:minmax(220px,280px) minmax(0,1fr);align-items:start}.description,.journey-header p,.step-header p,.step-counter,.empty-state p{font-size:var(--editorial-body-size, 1rem);color:var(--editorial-text-secondary, var(--md-sys-color-on-surface-variant, #49454f))}.journey-tabs,.step-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.journey-tab,.step-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 12px;border-radius:var(--editorial-button-radius, 999px);border:1px solid color-mix(in srgb,var(--editorial-border-color, var(--md-sys-color-outline-variant, #cac4d0)) 75%,transparent);background:var(--editorial-surface-primary, var(--md-sys-color-surface, #fff));color:inherit;box-shadow:var(--editorial-card-shadow, none);cursor:pointer}.journey-tab.active,.step-actions button.primary{background:var(--editorial-cta-primary, var(--editorial-accent, var(--md-sys-color-primary, #6750a4)));color:var(--editorial-cta-primary-text, var(--editorial-accent-contrast, var(--md-sys-color-on-primary, #fff)));border-color:transparent}.step-actions button.secondary{color:var(--editorial-cta-primary, var(--editorial-accent, var(--md-sys-color-primary, #6750a4)))}.step-header{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}.block-stack{display:grid;gap:var(--editorial-block-gap, 16px)}.step-actions button[disabled]{opacity:.5;cursor:not-allowed}.density-compact{--editorial-page-padding: 16px;--editorial-shell-padding: 16px;--editorial-block-gap: 12px}.density-comfortable{--editorial-page-padding: 24px;--editorial-shell-padding: 20px;--editorial-block-gap: 16px}.density-relaxed{--editorial-page-padding: 32px;--editorial-shell-padding: 28px;--editorial-block-gap: 20px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: EditorialBlockRendererComponent, selector: "praxis-editorial-block-renderer", inputs: ["block", "runtimeContext", "solution", "instance"], outputs: ["runtimeContextChange", "operationalEvent", "blockAction"] }, { kind: "component", type: EditorialStepperComponent, selector: "praxis-editorial-stepper", inputs: ["steps", "activeStepId", "config", "orientation", "progressionBlocked", "isStepSelectionBlocked"], outputs: ["stepSelected"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1996
3334
|
}
|
|
1997
3335
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: EditorialFormRuntimeComponent, decorators: [{
|
|
1998
3336
|
type: Component,
|
|
1999
|
-
args: [{ selector: 'praxis-editorial-form-runtime', standalone: true, imports: [CommonModule, EditorialBlockRendererComponent], template: `
|
|
2000
|
-
<section
|
|
3337
|
+
args: [{ selector: 'praxis-editorial-form-runtime', standalone: true, imports: [CommonModule, EditorialBlockRendererComponent, EditorialStepperComponent], template: `
|
|
3338
|
+
<section
|
|
3339
|
+
class="editorial-runtime"
|
|
3340
|
+
[class.orientation-horizontal]="effectiveOrientation() === 'horizontal'"
|
|
3341
|
+
[class.orientation-vertical]="effectiveOrientation() === 'vertical'"
|
|
3342
|
+
[class.density-compact]="effectiveDensity() === 'compact'"
|
|
3343
|
+
[class.density-comfortable]="effectiveDensity() === 'comfortable'"
|
|
3344
|
+
[class.density-relaxed]="effectiveDensity() === 'relaxed'"
|
|
3345
|
+
[attr.data-shell-variant]="shellVariant()"
|
|
3346
|
+
[style]="runtimeStyleAttr()"
|
|
3347
|
+
>
|
|
2001
3348
|
@if (runtimeDiagnostics().items.length) {
|
|
2002
3349
|
<section
|
|
2003
3350
|
class="diagnostics-panel"
|
|
@@ -2007,18 +3354,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2007
3354
|
[attr.aria-live]="runtimeDiagnostics().hasErrors ? 'assertive' : 'polite'"
|
|
2008
3355
|
aria-atomic="true"
|
|
2009
3356
|
>
|
|
2010
|
-
<h2>Diagnosticos do runtime</h2>
|
|
3357
|
+
<h2>{{ t('runtime.diagnostics.title', 'Diagnosticos do runtime') }}</h2>
|
|
2011
3358
|
<p>{{ diagnosticsMessage() }}</p>
|
|
2012
|
-
<div
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
3359
|
+
<div
|
|
3360
|
+
class="diagnostics-summary"
|
|
3361
|
+
[attr.aria-label]="t('runtime.diagnostics.severitySummary', 'Resumo de severidade')"
|
|
3362
|
+
>
|
|
3363
|
+
<span class="summary-pill error">{{ t('runtime.diagnostics.errorsCount', 'Erros: {count}', { count: diagnosticsErrorCount() }) }}</span>
|
|
3364
|
+
<span class="summary-pill warning">{{ t('runtime.diagnostics.warningsCount', 'Avisos: {count}', { count: diagnosticsWarningCount() }) }}</span>
|
|
3365
|
+
<span class="summary-pill info">{{ t('runtime.diagnostics.infoCount', 'Infos: {count}', { count: diagnosticsInfoCount() }) }}</span>
|
|
2016
3366
|
</div>
|
|
2017
3367
|
<details class="diagnostics-details">
|
|
2018
|
-
<summary>
|
|
3368
|
+
<summary>
|
|
3369
|
+
{{ t('runtime.diagnostics.details', 'Ver detalhes ({count})', { count: diagnosticItems().length }) }}
|
|
3370
|
+
</summary>
|
|
2019
3371
|
@if (globalDiagnostics().length) {
|
|
2020
|
-
<section
|
|
2021
|
-
|
|
3372
|
+
<section
|
|
3373
|
+
class="diagnostic-group global"
|
|
3374
|
+
[attr.aria-label]="t('runtime.diagnostics.globalErrors', 'Erros globais do runtime')"
|
|
3375
|
+
>
|
|
3376
|
+
<h3>{{ t('runtime.diagnostics.globalErrors', 'Erros globais do runtime') }}</h3>
|
|
2022
3377
|
<ul class="diagnostics-list">
|
|
2023
3378
|
@for (item of globalDiagnostics(); track item.code + ':' + (item.path ?? $index)) {
|
|
2024
3379
|
<li>
|
|
@@ -2062,7 +3417,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2062
3417
|
</header>
|
|
2063
3418
|
|
|
2064
3419
|
@if (journeys().length > 1) {
|
|
2065
|
-
<nav
|
|
3420
|
+
<nav
|
|
3421
|
+
class="journey-tabs"
|
|
3422
|
+
[attr.aria-label]="t('runtime.journeys.ariaLabel', 'Jornadas editoriais')"
|
|
3423
|
+
>
|
|
2066
3424
|
@for (journey of journeys(); track journey.journeyId) {
|
|
2067
3425
|
<button
|
|
2068
3426
|
type="button"
|
|
@@ -2074,11 +3432,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2074
3432
|
>
|
|
2075
3433
|
{{ journey.label }}
|
|
2076
3434
|
@if (journeyErrorCount(journey.journeyId)) {
|
|
2077
|
-
<span
|
|
3435
|
+
<span
|
|
3436
|
+
class="status-badge error"
|
|
3437
|
+
[attr.aria-label]="t('runtime.journeys.errors', 'Jornada com erros')"
|
|
3438
|
+
>
|
|
2078
3439
|
{{ journeyErrorCount(journey.journeyId) }}
|
|
2079
3440
|
</span>
|
|
2080
3441
|
} @else if (journeyWarningCount(journey.journeyId)) {
|
|
2081
|
-
<span
|
|
3442
|
+
<span
|
|
3443
|
+
class="status-badge warning"
|
|
3444
|
+
[attr.aria-label]="t('runtime.journeys.warnings', 'Jornada com avisos')"
|
|
3445
|
+
>
|
|
2082
3446
|
{{ journeyWarningCount(journey.journeyId) }}
|
|
2083
3447
|
</span>
|
|
2084
3448
|
}
|
|
@@ -2096,32 +3460,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2096
3460
|
}
|
|
2097
3461
|
</header>
|
|
2098
3462
|
|
|
2099
|
-
@if (journey.steps.length > 1) {
|
|
2100
|
-
<
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
(click)="selectStep(step.stepId)"
|
|
2110
|
-
>
|
|
2111
|
-
{{ step.label }}
|
|
2112
|
-
@if (stepErrorCount(step.stepId)) {
|
|
2113
|
-
<span class="status-badge error" aria-label="Etapa com erros">
|
|
2114
|
-
{{ stepErrorCount(step.stepId) }}
|
|
2115
|
-
</span>
|
|
2116
|
-
} @else if (stepWarningCount(step.stepId)) {
|
|
2117
|
-
<span class="status-badge warning" aria-label="Etapa com avisos">
|
|
2118
|
-
{{ stepWarningCount(step.stepId) }}
|
|
2119
|
-
</span>
|
|
2120
|
-
}
|
|
2121
|
-
</button>
|
|
2122
|
-
</li>
|
|
2123
|
-
}
|
|
2124
|
-
</ol>
|
|
3463
|
+
@if (journey.steps.length > 1 && stepperVisible()) {
|
|
3464
|
+
<praxis-editorial-stepper
|
|
3465
|
+
[steps]="journey.steps"
|
|
3466
|
+
[activeStepId]="activeStep()?.stepId ?? null"
|
|
3467
|
+
[config]="stepperConfig()"
|
|
3468
|
+
[orientation]="effectiveOrientation()"
|
|
3469
|
+
[progressionBlocked]="isForwardNavigationBlocked()"
|
|
3470
|
+
[isStepSelectionBlocked]="stepSelectionBlocker"
|
|
3471
|
+
(stepSelected)="selectStep($event)"
|
|
3472
|
+
/>
|
|
2125
3473
|
}
|
|
2126
3474
|
|
|
2127
3475
|
@if (activeStep(); as step) {
|
|
@@ -2138,7 +3486,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2138
3486
|
}
|
|
2139
3487
|
</div>
|
|
2140
3488
|
<div class="step-counter">
|
|
2141
|
-
|
|
3489
|
+
{{
|
|
3490
|
+
t('runtime.step.counter', 'Etapa {current} de {total}', {
|
|
3491
|
+
current: currentStepIndex() + 1,
|
|
3492
|
+
total: journey.steps.length,
|
|
3493
|
+
})
|
|
3494
|
+
}}
|
|
2142
3495
|
</div>
|
|
2143
3496
|
</header>
|
|
2144
3497
|
|
|
@@ -2151,7 +3504,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2151
3504
|
[attr.aria-live]="activeStepHasErrors() ? 'assertive' : 'polite'"
|
|
2152
3505
|
aria-atomic="true"
|
|
2153
3506
|
>
|
|
2154
|
-
<h4>Situacao desta etapa</h4>
|
|
3507
|
+
<h4>{{ t('runtime.step.statusTitle', 'Situacao desta etapa') }}</h4>
|
|
2155
3508
|
<ul class="diagnostics-list contextual">
|
|
2156
3509
|
@for (item of activeStepDiagnostics(); track item.code + ':' + (item.path ?? $index)) {
|
|
2157
3510
|
<li>
|
|
@@ -2173,7 +3526,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2173
3526
|
aria-live="assertive"
|
|
2174
3527
|
aria-atomic="true"
|
|
2175
3528
|
>
|
|
2176
|
-
<h4>Erro global do runtime</h4>
|
|
3529
|
+
<h4>{{ t('runtime.step.globalErrorTitle', 'Erro global do runtime') }}</h4>
|
|
2177
3530
|
<ul class="diagnostics-list contextual">
|
|
2178
3531
|
@for (item of activeGlobalDiagnostics(); track item.code + ':' + (item.path ?? $index)) {
|
|
2179
3532
|
<li>
|
|
@@ -2195,6 +3548,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2195
3548
|
[runtimeContext]="resolvedContext()"
|
|
2196
3549
|
[solution]="solution()"
|
|
2197
3550
|
[instance]="instance()"
|
|
3551
|
+
(runtimeContextChange)="updateRuntimeContext($event)"
|
|
3552
|
+
(blockAction)="handleBlockAction($event)"
|
|
2198
3553
|
(operationalEvent)="emitOperationalEvent($event)"
|
|
2199
3554
|
/>
|
|
2200
3555
|
}
|
|
@@ -2202,16 +3557,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2202
3557
|
|
|
2203
3558
|
@if (journey.steps.length > 1) {
|
|
2204
3559
|
<footer class="step-actions">
|
|
2205
|
-
<button
|
|
2206
|
-
|
|
3560
|
+
<button
|
|
3561
|
+
type="button"
|
|
3562
|
+
class="secondary"
|
|
3563
|
+
(click)="goToPreviousStep()"
|
|
3564
|
+
[disabled]="!hasPreviousStep()"
|
|
3565
|
+
>
|
|
3566
|
+
{{ t('runtime.actions.previous', 'Etapa anterior') }}
|
|
2207
3567
|
</button>
|
|
2208
3568
|
<button
|
|
2209
3569
|
type="button"
|
|
3570
|
+
class="primary"
|
|
2210
3571
|
(click)="goToNextStep()"
|
|
2211
3572
|
[disabled]="!hasNextStep() || isForwardNavigationBlocked()"
|
|
2212
3573
|
[attr.aria-describedby]="isForwardNavigationBlocked() ? 'navigation-blocking-note' : null"
|
|
2213
3574
|
>
|
|
2214
|
-
{{
|
|
3575
|
+
{{
|
|
3576
|
+
isForwardNavigationBlocked()
|
|
3577
|
+
? t('runtime.actions.nextBlocked', 'Corrija os erros para avancar')
|
|
3578
|
+
: t('runtime.actions.next', 'Proxima etapa')
|
|
3579
|
+
}}
|
|
2215
3580
|
</button>
|
|
2216
3581
|
</footer>
|
|
2217
3582
|
@if (isForwardNavigationBlocked()) {
|
|
@@ -2225,28 +3590,45 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2225
3590
|
</section>
|
|
2226
3591
|
} @else {
|
|
2227
3592
|
<section class="empty-state">
|
|
2228
|
-
<h2>Editorial runtime sem jornada</h2>
|
|
2229
|
-
<p>
|
|
3593
|
+
<h2>{{ t('runtime.empty.noJourneyTitle', 'Editorial runtime sem jornada') }}</h2>
|
|
3594
|
+
<p>
|
|
3595
|
+
{{ t('runtime.empty.noJourneyDescription', 'Nenhuma jornada editorial foi resolvida para o estado atual.') }}
|
|
3596
|
+
</p>
|
|
2230
3597
|
</section>
|
|
2231
3598
|
}
|
|
2232
3599
|
} @else {
|
|
2233
3600
|
<section class="empty-state">
|
|
2234
|
-
<h2>Editorial runtime vazio</h2>
|
|
2235
|
-
<p>
|
|
3601
|
+
<h2>{{ t('runtime.empty.noSolutionTitle', 'Editorial runtime vazio') }}</h2>
|
|
3602
|
+
<p>
|
|
3603
|
+
{{ t('runtime.empty.noSolutionDescription', 'Forneca uma solution ou instance editorial para materializar a jornada.') }}
|
|
3604
|
+
</p>
|
|
2236
3605
|
</section>
|
|
2237
3606
|
}
|
|
2238
3607
|
</section>
|
|
2239
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.editorial-runtime{display:grid;gap:24px;padding:24px;color:var(--md-sys-color-on-surface, #1b1b1f);background:var(--md-sys-color-surface, #fdf8fd)}.runtime-header,.journey-card,.empty-state,.diagnostics-panel{border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 70%,transparent);border-radius:20px;background:var(--md-sys-color-surface-container-low, #f7f2fa);padding:20px}.diagnostics-panel{display:grid;gap:10px}.diagnostics-panel.warning{border-color:color-mix(in srgb,#b26a00 55%,var(--md-sys-color-outline-variant, #cac4d0));background:color-mix(in srgb,#fff4de 78%,var(--md-sys-color-surface-container-low, #f7f2fa))}.diagnostics-panel.error{border-color:color-mix(in srgb,#b3261e 60%,var(--md-sys-color-outline-variant, #cac4d0));background:color-mix(in srgb,#fde7e9 78%,var(--md-sys-color-surface-container-low, #f7f2fa))}.diagnostics-list{margin:0;padding-left:18px;display:grid;gap:8px}.diagnostics-summary{display:flex;flex-wrap:wrap;gap:8px}.summary-pill{display:inline-flex;align-items:center;min-height:32px;padding:6px 10px;border-radius:999px;font-size:.85rem;border:1px solid transparent;background:color-mix(in srgb,var(--md-sys-color-surface, #fff) 85%,transparent)}.summary-pill.error{border-color:color-mix(in srgb,#b3261e 45%,transparent)}.summary-pill.warning{border-color:color-mix(in srgb,#b26a00 45%,transparent)}.summary-pill.info{border-color:color-mix(in srgb,#00639b 45%,transparent)}.status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;min-height:22px;padding:0 6px;border-radius:999px;font-size:.75rem;font-weight:700;background:var(--md-sys-color-surface, #fff)}.status-badge.error{color:#8c1d18;background:#fde7e9}.status-badge.warning{color:#7a4b00;background:#fff4de}.diagnostics-details summary{cursor:pointer;font-weight:600}.diagnostic-group{display:grid;gap:8px;padding:12px 0}.diagnostic-group.global{border-bottom:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 65%,transparent);margin-bottom:12px}.step-panel.error{border-left:4px solid #b3261e}.step-panel.warning{border-left:4px solid #b26a00}.step-diagnostics{display:grid;gap:8px;padding:14px 16px;border-radius:16px}.step-diagnostics.error{background:#fde7e9;color:#5b1210}.step-diagnostics.warning{background:#fff4de;color:#6b4300}.step-diagnostics.global{background:#fde7e9;color:#5b1210;border:1px solid color-mix(in srgb,#b3261e 35%,transparent)}.diagnostics-list.contextual{padding-left:16px}.diagnostic-location{display:block;margin-top:4px;font-size:.82rem;opacity:.85}.step-blocking-note{font-size:.9rem;color:#8c1d18}.eyebrow{margin:0 0 8px;text-transform:uppercase;letter-spacing:.08em;font-size
|
|
3608
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.editorial-runtime{display:grid;gap:24px;padding:var(--editorial-page-padding, 24px);color:var(--editorial-text-primary, var(--md-sys-color-on-surface, #1b1b1f));background:var(--editorial-page-background, var(--md-sys-color-surface, #fdf8fd));font-family:var(--editorial-body-font-family, inherit)}.runtime-header,.journey-card,.empty-state,.diagnostics-panel{border:var(--editorial-shell-border-width, 1px) solid color-mix(in srgb,var(--editorial-border-color, var(--md-sys-color-outline-variant, #cac4d0)) 70%,transparent);border-radius:var(--editorial-shell-radius, 20px);background:var(--editorial-surface-secondary, var(--md-sys-color-surface-container-low, #f7f2fa));padding:var(--editorial-shell-padding, 20px);box-shadow:var(--editorial-shell-shadow, none)}.diagnostics-panel{display:grid;gap:10px}.diagnostics-panel.warning{border-color:color-mix(in srgb,#b26a00 55%,var(--md-sys-color-outline-variant, #cac4d0));background:color-mix(in srgb,#fff4de 78%,var(--md-sys-color-surface-container-low, #f7f2fa))}.diagnostics-panel.error{border-color:color-mix(in srgb,#b3261e 60%,var(--md-sys-color-outline-variant, #cac4d0));background:color-mix(in srgb,#fde7e9 78%,var(--md-sys-color-surface-container-low, #f7f2fa))}.diagnostics-list{margin:0;padding-left:18px;display:grid;gap:8px}.diagnostics-summary{display:flex;flex-wrap:wrap;gap:8px}.summary-pill{display:inline-flex;align-items:center;min-height:32px;padding:6px 10px;border-radius:999px;font-size:.85rem;border:1px solid transparent;background:color-mix(in srgb,var(--md-sys-color-surface, #fff) 85%,transparent)}.summary-pill.error{border-color:color-mix(in srgb,#b3261e 45%,transparent)}.summary-pill.warning{border-color:color-mix(in srgb,#b26a00 45%,transparent)}.summary-pill.info{border-color:color-mix(in srgb,#00639b 45%,transparent)}.status-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;min-height:22px;padding:0 6px;border-radius:999px;font-size:.75rem;font-weight:700;background:var(--md-sys-color-surface, #fff)}.status-badge.error{color:#8c1d18;background:#fde7e9}.status-badge.warning{color:#7a4b00;background:#fff4de}.diagnostics-details summary{cursor:pointer;font-weight:600}.diagnostic-group{display:grid;gap:8px;padding:12px 0}.diagnostic-group.global{border-bottom:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 65%,transparent);margin-bottom:12px}.step-panel.error{border-left:4px solid #b3261e}.step-panel.warning{border-left:4px solid #b26a00}.step-diagnostics{display:grid;gap:8px;padding:14px 16px;border-radius:16px}.step-diagnostics.error{background:#fde7e9;color:#5b1210}.step-diagnostics.warning{background:#fff4de;color:#6b4300}.step-diagnostics.global{background:#fde7e9;color:#5b1210;border:1px solid color-mix(in srgb,#b3261e 35%,transparent)}.diagnostics-list.contextual{padding-left:16px}.diagnostic-location{display:block;margin-top:4px;font-size:.82rem;opacity:.85}.step-blocking-note{font-size:.9rem;color:#8c1d18}.eyebrow{margin:0 0 8px;text-transform:uppercase;letter-spacing:.08em;font-size:var(--editorial-caption-size, .75rem);color:var(--editorial-accent, var(--md-sys-color-primary, #6750a4));font-weight:700}.runtime-state-pill{justify-self:start;display:inline-flex;align-items:center;min-height:30px;padding:4px 10px;border-radius:999px;font-size:.8rem;font-weight:700;background:color-mix(in srgb,var(--md-sys-color-surface, #fff) 88%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, #cac4d0) 70%,transparent)}.runtime-state-pill[data-mode=warning]{color:#7a4b00;background:#fff4de}.runtime-state-pill[data-mode=degraded]{color:#8c1d18;background:#fde7e9}.runtime-state-pill[data-mode=blocked]{color:#8c1d18;background:#fde7e9;border-color:color-mix(in srgb,#b3261e 55%,transparent)}h1,h2,h3,p{margin:0}h1{font-size:var(--editorial-hero-title-size, 2rem);line-height:1.1}.step-header h3{font-size:var(--editorial-step-title-size, 1.25rem);line-height:1.2}.runtime-header,.journey-card,.journey-header,.step-panel{display:grid;gap:12px}.editorial-runtime[data-shell-variant=sidebar-journey] .journey-card,.orientation-vertical .journey-card{grid-template-columns:minmax(220px,280px) minmax(0,1fr);align-items:start}.description,.journey-header p,.step-header p,.step-counter,.empty-state p{font-size:var(--editorial-body-size, 1rem);color:var(--editorial-text-secondary, var(--md-sys-color-on-surface-variant, #49454f))}.journey-tabs,.step-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.journey-tab,.step-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:10px 12px;border-radius:var(--editorial-button-radius, 999px);border:1px solid color-mix(in srgb,var(--editorial-border-color, var(--md-sys-color-outline-variant, #cac4d0)) 75%,transparent);background:var(--editorial-surface-primary, var(--md-sys-color-surface, #fff));color:inherit;box-shadow:var(--editorial-card-shadow, none);cursor:pointer}.journey-tab.active,.step-actions button.primary{background:var(--editorial-cta-primary, var(--editorial-accent, var(--md-sys-color-primary, #6750a4)));color:var(--editorial-cta-primary-text, var(--editorial-accent-contrast, var(--md-sys-color-on-primary, #fff)));border-color:transparent}.step-actions button.secondary{color:var(--editorial-cta-primary, var(--editorial-accent, var(--md-sys-color-primary, #6750a4)))}.step-header{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}.block-stack{display:grid;gap:var(--editorial-block-gap, 16px)}.step-actions button[disabled]{opacity:.5;cursor:not-allowed}.density-compact{--editorial-page-padding: 16px;--editorial-shell-padding: 16px;--editorial-block-gap: 12px}.density-comfortable{--editorial-page-padding: 24px;--editorial-shell-padding: 20px;--editorial-block-gap: 16px}.density-relaxed{--editorial-page-padding: 32px;--editorial-shell-padding: 28px;--editorial-block-gap: 20px}\n"] }]
|
|
2240
3609
|
}], ctorParameters: () => [], propDecorators: { solution: [{ type: i0.Input, args: [{ isSignal: true, alias: "solution", required: false }] }], instance: [{ type: i0.Input, args: [{ isSignal: true, alias: "instance", required: false }] }], runtimeContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "runtimeContext", required: false }] }], hostConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "hostConfig", required: false }] }], snapshotChange: [{ type: i0.Output, args: ["snapshotChange"] }], fallbackChange: [{ type: i0.Output, args: ["fallbackChange"] }], operationalEvent: [{ type: i0.Output, args: ["operationalEvent"] }] } });
|
|
2241
3610
|
function buildSnapshotSignature(snapshot) {
|
|
2242
|
-
return
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
3611
|
+
return stableSerializeForSignature(snapshot);
|
|
3612
|
+
}
|
|
3613
|
+
function stableSerializeForSignature(value) {
|
|
3614
|
+
if (value == null) {
|
|
3615
|
+
return String(value);
|
|
3616
|
+
}
|
|
3617
|
+
if (typeof value === 'string'
|
|
3618
|
+
|| typeof value === 'number'
|
|
3619
|
+
|| typeof value === 'boolean') {
|
|
3620
|
+
return JSON.stringify(value);
|
|
3621
|
+
}
|
|
3622
|
+
if (Array.isArray(value)) {
|
|
3623
|
+
return `[${value.map((item) => stableSerializeForSignature(item)).join(',')}]`;
|
|
3624
|
+
}
|
|
3625
|
+
if (typeof value === 'object') {
|
|
3626
|
+
const entries = Object.entries(value)
|
|
3627
|
+
.sort(([left], [right]) => left.localeCompare(right))
|
|
3628
|
+
.map(([key, entryValue]) => `${JSON.stringify(key)}:${stableSerializeForSignature(entryValue)}`);
|
|
3629
|
+
return `{${entries.join(',')}}`;
|
|
3630
|
+
}
|
|
3631
|
+
return JSON.stringify(String(value));
|
|
2250
3632
|
}
|
|
2251
3633
|
function dedupeDiagnostics(items) {
|
|
2252
3634
|
const seen = new Set();
|
|
@@ -2357,6 +3739,192 @@ function provideEditorialDynamicFormAdapter(options) {
|
|
|
2357
3739
|
return provideEditorialDataBlockAdapter(createEditorialDynamicFormAdapter(options));
|
|
2358
3740
|
}
|
|
2359
3741
|
|
|
3742
|
+
const PRAXIS_EDITORIAL_FORMS_EN_US = {
|
|
3743
|
+
'praxis.editorialForms.runtime.diagnostics.title': 'Runtime diagnostics',
|
|
3744
|
+
'praxis.editorialForms.runtime.diagnostics.severitySummary': 'Severity summary',
|
|
3745
|
+
'praxis.editorialForms.runtime.diagnostics.globalErrors': 'Global runtime errors',
|
|
3746
|
+
'praxis.editorialForms.runtime.diagnostics.details': 'View details ({count})',
|
|
3747
|
+
'praxis.editorialForms.runtime.journeys.ariaLabel': 'Editorial journeys',
|
|
3748
|
+
'praxis.editorialForms.runtime.journeys.errors': 'Journey has errors',
|
|
3749
|
+
'praxis.editorialForms.runtime.journeys.warnings': 'Journey has warnings',
|
|
3750
|
+
'praxis.editorialForms.runtime.step.counter': 'Step {current} of {total}',
|
|
3751
|
+
'praxis.editorialForms.runtime.step.statusTitle': 'Current step status',
|
|
3752
|
+
'praxis.editorialForms.runtime.step.globalErrorTitle': 'Global runtime error',
|
|
3753
|
+
'praxis.editorialForms.runtime.actions.previous': 'Previous step',
|
|
3754
|
+
'praxis.editorialForms.runtime.actions.next': 'Next step',
|
|
3755
|
+
'praxis.editorialForms.runtime.actions.nextBlocked': 'Fix the errors to continue',
|
|
3756
|
+
'praxis.editorialForms.runtime.empty.noJourneyTitle': 'Editorial runtime without journey',
|
|
3757
|
+
'praxis.editorialForms.runtime.empty.noJourneyDescription': 'No editorial journey was resolved for the current state.',
|
|
3758
|
+
'praxis.editorialForms.runtime.empty.noSolutionTitle': 'Empty editorial runtime',
|
|
3759
|
+
'praxis.editorialForms.runtime.empty.noSolutionDescription': 'Provide an editorial solution or instance to materialize the journey.',
|
|
3760
|
+
'praxis.editorialForms.runtime.fallback.blocked': 'Runtime blocked',
|
|
3761
|
+
'praxis.editorialForms.runtime.fallback.degraded': 'Runtime degraded',
|
|
3762
|
+
'praxis.editorialForms.runtime.fallback.warning': 'Runtime warning',
|
|
3763
|
+
'praxis.editorialForms.runtime.fallback.healthy': 'Runtime healthy',
|
|
3764
|
+
'praxis.editorialForms.runtime.navigation.globalBlocked': 'Forward navigation was blocked because the runtime has a global error that must be fixed before continuing.',
|
|
3765
|
+
'praxis.editorialForms.runtime.navigation.stepBlocked': 'Forward navigation was blocked because the current step has a structural error.',
|
|
3766
|
+
'praxis.editorialForms.runtime.diagnostics.severity.error': 'Error',
|
|
3767
|
+
'praxis.editorialForms.runtime.diagnostics.severity.warning': 'Warning',
|
|
3768
|
+
'praxis.editorialForms.runtime.diagnostics.severity.info': 'Info',
|
|
3769
|
+
'praxis.editorialForms.runtime.diagnostics.errorsCount': 'Errors: {count}',
|
|
3770
|
+
'praxis.editorialForms.runtime.diagnostics.warningsCount': 'Warnings: {count}',
|
|
3771
|
+
'praxis.editorialForms.runtime.diagnostics.infoCount': 'Info: {count}',
|
|
3772
|
+
'praxis.editorialForms.runtime.diagnostics.message.blocked': 'Blocking inconsistencies prevent the editorial flow from progressing safely.',
|
|
3773
|
+
'praxis.editorialForms.runtime.diagnostics.message.degraded': 'The runtime is operating in a degraded mode and requires operational attention.',
|
|
3774
|
+
'praxis.editorialForms.runtime.diagnostics.message.error': 'There are inconsistencies that may compromise the editorial experience.',
|
|
3775
|
+
'praxis.editorialForms.runtime.diagnostics.message.warning': 'There are operational warnings to review for this editorial instance.',
|
|
3776
|
+
'praxis.editorialForms.runtime.scope.global': 'Scope: global runtime',
|
|
3777
|
+
'praxis.editorialForms.runtime.scope.journey': 'Journey',
|
|
3778
|
+
'praxis.editorialForms.runtime.scope.step': 'Step',
|
|
3779
|
+
'praxis.editorialForms.runtime.scope.block': 'Block',
|
|
3780
|
+
'praxis.editorialForms.runtime.scope.path': 'Path',
|
|
3781
|
+
'praxis.editorialForms.stepper.ariaLabel': 'Journey steps',
|
|
3782
|
+
'praxis.editorialForms.stepper.state.completed': 'completed',
|
|
3783
|
+
'praxis.editorialForms.stepper.state.active': 'current step',
|
|
3784
|
+
'praxis.editorialForms.stepper.state.blocked': 'blocked',
|
|
3785
|
+
'praxis.editorialForms.stepper.state.pending': 'pending',
|
|
3786
|
+
'praxis.editorialForms.selection.state.selected': 'selected',
|
|
3787
|
+
'praxis.editorialForms.selection.state.unselected': 'not selected',
|
|
3788
|
+
'praxis.editorialForms.selection.group.label': 'Selection group',
|
|
3789
|
+
'praxis.editorialForms.review.empty': '-',
|
|
3790
|
+
'praxis.editorialForms.review.boolean.true': 'Yes',
|
|
3791
|
+
'praxis.editorialForms.review.boolean.false': 'No',
|
|
3792
|
+
'praxis.editorialForms.dataCollection.loadingTitle': 'Preparing data collection',
|
|
3793
|
+
'praxis.editorialForms.dataCollection.unavailableTitle': 'Data collection unavailable',
|
|
3794
|
+
'praxis.editorialForms.dataCollection.error.incompatibleTitle': 'Incompatible adapter',
|
|
3795
|
+
'praxis.editorialForms.dataCollection.error.missingConfigTitle': 'Missing data collection configuration',
|
|
3796
|
+
'praxis.editorialForms.dataCollection.error.incompleteAdapterTitle': 'Incomplete adapter',
|
|
3797
|
+
'praxis.editorialForms.dataCollection.error.loadFailureTitle': 'Failed to load engine',
|
|
3798
|
+
'praxis.editorialForms.dataCollection.error.unresolvedComponentTitle': 'Component not resolved',
|
|
3799
|
+
'praxis.editorialForms.dataCollection.error.invalidComponentTitle': 'Incompatible component',
|
|
3800
|
+
'praxis.editorialForms.dataCollection.fallback.invalid': 'Block "{formBlockId}" was materialized with an invalid state. Review formBlockId, formConfigRef and inherited editorial configuration.',
|
|
3801
|
+
'praxis.editorialForms.dataCollection.fallback.missingConfig': 'Block "{formBlockId}" did not find data collection configuration. Lookup key checked: {lookupKey}.',
|
|
3802
|
+
'praxis.editorialForms.dataCollection.fallback.incompatible': 'Block "{formBlockId}" found registered adapters ({adapterIds}), but none declared compatibility for this data collection.',
|
|
3803
|
+
'praxis.editorialForms.dataCollection.fallback.missingAdapter': 'Block "{formBlockId}" did not find data collection configuration nor a registered adapter. Check the host provider and editorial FormConfig materialization.',
|
|
3804
|
+
'praxis.editorialForms.dataCollection.fallback.adapterWithoutConfig': 'Block "{formBlockId}" found an adapter, but did not find FormConfig at {lookupKey}.',
|
|
3805
|
+
'praxis.editorialForms.dataCollection.fallback.unresolvedEngine': 'Configuration exists for "{formBlockId}" ({source}), but no data collection adapter was registered to materialize the engine.',
|
|
3806
|
+
'praxis.editorialForms.dataCollection.error.incompatibleMessage': 'No registered adapter accepted block "{formBlockId}".',
|
|
3807
|
+
'praxis.editorialForms.dataCollection.error.availableAdapters': 'Available adapters: {adapterIds}.',
|
|
3808
|
+
'praxis.editorialForms.dataCollection.error.missingConfigMessage': 'Block "{formBlockId}" has no resolved FormConfig for the data collection engine.',
|
|
3809
|
+
'praxis.editorialForms.dataCollection.error.lookupSource': 'Lookup source: {lookupKey}.',
|
|
3810
|
+
'praxis.editorialForms.dataCollection.error.adapterRegistrationHint': 'Register a compatible component or implement resolveComponent().',
|
|
3811
|
+
'praxis.editorialForms.dataCollection.error.incompleteAdapterMessage': 'Adapter "{adapterName}" did not expose a data collection component.',
|
|
3812
|
+
'praxis.editorialForms.dataCollection.loadingMessage': 'Loading the data collection engine for "{formBlockId}"...',
|
|
3813
|
+
'praxis.editorialForms.dataCollection.error.loadFailureMessage': 'Adapter "{adapterName}" failed while preparing block "{formBlockId}".',
|
|
3814
|
+
'praxis.editorialForms.dataCollection.error.loadFailureDetails': 'Validate the optional host provider and the availability of a compatible component.',
|
|
3815
|
+
'praxis.editorialForms.dataCollection.error.unresolvedComponentMessage': 'Adapter "{adapterName}" did not return a component for block "{formBlockId}".',
|
|
3816
|
+
'praxis.editorialForms.dataCollection.error.unresolvedComponentDetails': 'Implement component or resolveComponent() with a compatible Angular component.',
|
|
3817
|
+
'praxis.editorialForms.dataCollection.error.invalidComponentMessage': 'Adapter "{adapterName}" returned an incompatible component for "{formBlockId}".',
|
|
3818
|
+
};
|
|
3819
|
+
|
|
3820
|
+
const PRAXIS_EDITORIAL_FORMS_PT_BR = {
|
|
3821
|
+
'praxis.editorialForms.runtime.diagnostics.title': 'Diagnosticos do runtime',
|
|
3822
|
+
'praxis.editorialForms.runtime.diagnostics.severitySummary': 'Resumo de severidade',
|
|
3823
|
+
'praxis.editorialForms.runtime.diagnostics.globalErrors': 'Erros globais do runtime',
|
|
3824
|
+
'praxis.editorialForms.runtime.diagnostics.details': 'Ver detalhes ({count})',
|
|
3825
|
+
'praxis.editorialForms.runtime.journeys.ariaLabel': 'Jornadas editoriais',
|
|
3826
|
+
'praxis.editorialForms.runtime.journeys.errors': 'Jornada com erros',
|
|
3827
|
+
'praxis.editorialForms.runtime.journeys.warnings': 'Jornada com avisos',
|
|
3828
|
+
'praxis.editorialForms.runtime.step.counter': 'Etapa {current} de {total}',
|
|
3829
|
+
'praxis.editorialForms.runtime.step.statusTitle': 'Situacao desta etapa',
|
|
3830
|
+
'praxis.editorialForms.runtime.step.globalErrorTitle': 'Erro global do runtime',
|
|
3831
|
+
'praxis.editorialForms.runtime.actions.previous': 'Etapa anterior',
|
|
3832
|
+
'praxis.editorialForms.runtime.actions.next': 'Proxima etapa',
|
|
3833
|
+
'praxis.editorialForms.runtime.actions.nextBlocked': 'Corrija os erros para avancar',
|
|
3834
|
+
'praxis.editorialForms.runtime.empty.noJourneyTitle': 'Editorial runtime sem jornada',
|
|
3835
|
+
'praxis.editorialForms.runtime.empty.noJourneyDescription': 'Nenhuma jornada editorial foi resolvida para o estado atual.',
|
|
3836
|
+
'praxis.editorialForms.runtime.empty.noSolutionTitle': 'Editorial runtime vazio',
|
|
3837
|
+
'praxis.editorialForms.runtime.empty.noSolutionDescription': 'Forneca uma solution ou instance editorial para materializar a jornada.',
|
|
3838
|
+
'praxis.editorialForms.runtime.fallback.blocked': 'Runtime bloqueado',
|
|
3839
|
+
'praxis.editorialForms.runtime.fallback.degraded': 'Runtime degradado',
|
|
3840
|
+
'praxis.editorialForms.runtime.fallback.warning': 'Runtime com aviso',
|
|
3841
|
+
'praxis.editorialForms.runtime.fallback.healthy': 'Runtime saudavel',
|
|
3842
|
+
'praxis.editorialForms.runtime.navigation.globalBlocked': 'A navegacao de avanço foi bloqueada porque o runtime possui erro global que precisa ser corrigido antes de continuar.',
|
|
3843
|
+
'praxis.editorialForms.runtime.navigation.stepBlocked': 'A navegacao de avanço foi bloqueada porque a etapa atual possui erro estrutural.',
|
|
3844
|
+
'praxis.editorialForms.runtime.diagnostics.severity.error': 'Erro',
|
|
3845
|
+
'praxis.editorialForms.runtime.diagnostics.severity.warning': 'Aviso',
|
|
3846
|
+
'praxis.editorialForms.runtime.diagnostics.severity.info': 'Info',
|
|
3847
|
+
'praxis.editorialForms.runtime.diagnostics.errorsCount': 'Erros: {count}',
|
|
3848
|
+
'praxis.editorialForms.runtime.diagnostics.warningsCount': 'Avisos: {count}',
|
|
3849
|
+
'praxis.editorialForms.runtime.diagnostics.infoCount': 'Infos: {count}',
|
|
3850
|
+
'praxis.editorialForms.runtime.diagnostics.message.blocked': 'Existem inconsistencias bloqueadoras que impedem a progressao segura do fluxo editorial.',
|
|
3851
|
+
'praxis.editorialForms.runtime.diagnostics.message.degraded': 'O runtime esta operando de forma degradada e requer atencao operacional.',
|
|
3852
|
+
'praxis.editorialForms.runtime.diagnostics.message.error': 'Existem inconsistencias que podem comprometer a experiencia editorial.',
|
|
3853
|
+
'praxis.editorialForms.runtime.diagnostics.message.warning': 'Existem avisos operacionais para revisar nesta instancia editorial.',
|
|
3854
|
+
'praxis.editorialForms.runtime.scope.global': 'Escopo: runtime global',
|
|
3855
|
+
'praxis.editorialForms.runtime.scope.journey': 'Jornada',
|
|
3856
|
+
'praxis.editorialForms.runtime.scope.step': 'Etapa',
|
|
3857
|
+
'praxis.editorialForms.runtime.scope.block': 'Bloco',
|
|
3858
|
+
'praxis.editorialForms.runtime.scope.path': 'Path',
|
|
3859
|
+
'praxis.editorialForms.stepper.ariaLabel': 'Etapas da jornada',
|
|
3860
|
+
'praxis.editorialForms.stepper.state.completed': 'concluida',
|
|
3861
|
+
'praxis.editorialForms.stepper.state.active': 'etapa atual',
|
|
3862
|
+
'praxis.editorialForms.stepper.state.blocked': 'bloqueada',
|
|
3863
|
+
'praxis.editorialForms.stepper.state.pending': 'pendente',
|
|
3864
|
+
'praxis.editorialForms.selection.state.selected': 'selecionado',
|
|
3865
|
+
'praxis.editorialForms.selection.state.unselected': 'nao selecionado',
|
|
3866
|
+
'praxis.editorialForms.selection.group.label': 'Grupo de selecao',
|
|
3867
|
+
'praxis.editorialForms.review.empty': '-',
|
|
3868
|
+
'praxis.editorialForms.review.boolean.true': 'Sim',
|
|
3869
|
+
'praxis.editorialForms.review.boolean.false': 'Nao',
|
|
3870
|
+
'praxis.editorialForms.dataCollection.loadingTitle': 'Preparando coleta',
|
|
3871
|
+
'praxis.editorialForms.dataCollection.unavailableTitle': 'Coleta nao disponivel',
|
|
3872
|
+
'praxis.editorialForms.dataCollection.error.incompatibleTitle': 'Adaptador incompatível',
|
|
3873
|
+
'praxis.editorialForms.dataCollection.error.missingConfigTitle': 'Configuracao de coleta ausente',
|
|
3874
|
+
'praxis.editorialForms.dataCollection.error.incompleteAdapterTitle': 'Adaptador incompleto',
|
|
3875
|
+
'praxis.editorialForms.dataCollection.error.loadFailureTitle': 'Falha ao carregar a engine',
|
|
3876
|
+
'praxis.editorialForms.dataCollection.error.unresolvedComponentTitle': 'Componente nao resolvido',
|
|
3877
|
+
'praxis.editorialForms.dataCollection.error.invalidComponentTitle': 'Componente incompatível',
|
|
3878
|
+
'praxis.editorialForms.dataCollection.fallback.invalid': 'O bloco "{formBlockId}" foi materializado com estado invalido. Revise formBlockId, formConfigRef e a configuracao editorial herdada.',
|
|
3879
|
+
'praxis.editorialForms.dataCollection.fallback.missingConfig': 'O bloco "{formBlockId}" nao encontrou configuracao de coleta. Chave consultada: {lookupKey}.',
|
|
3880
|
+
'praxis.editorialForms.dataCollection.fallback.incompatible': 'O bloco "{formBlockId}" encontrou adapters registrados ({adapterIds}), mas nenhum declarou compatibilidade para esta coleta.',
|
|
3881
|
+
'praxis.editorialForms.dataCollection.fallback.missingAdapter': 'O bloco "{formBlockId}" nao encontrou configuracao de coleta nem adaptador registrado. Verifique o provider do host e a materializacao do FormConfig editorial.',
|
|
3882
|
+
'praxis.editorialForms.dataCollection.fallback.adapterWithoutConfig': 'O bloco "{formBlockId}" encontrou um adaptador, mas nao encontrou FormConfig em {lookupKey}.',
|
|
3883
|
+
'praxis.editorialForms.dataCollection.fallback.unresolvedEngine': 'Existe configuracao para "{formBlockId}" ({source}), mas nenhum adaptador de coleta foi registrado para materializar a engine.',
|
|
3884
|
+
'praxis.editorialForms.dataCollection.error.incompatibleMessage': 'Nenhum adaptador registrado aceitou o bloco "{formBlockId}".',
|
|
3885
|
+
'praxis.editorialForms.dataCollection.error.availableAdapters': 'Adapters disponiveis: {adapterIds}.',
|
|
3886
|
+
'praxis.editorialForms.dataCollection.error.missingConfigMessage': 'O bloco "{formBlockId}" nao possui FormConfig resolvido para a engine de coleta.',
|
|
3887
|
+
'praxis.editorialForms.dataCollection.error.lookupSource': 'Origem consultada: {lookupKey}.',
|
|
3888
|
+
'praxis.editorialForms.dataCollection.error.adapterRegistrationHint': 'Registre um componente compatível ou implemente resolveComponent().',
|
|
3889
|
+
'praxis.editorialForms.dataCollection.error.incompleteAdapterMessage': 'O adaptador "{adapterName}" nao expôs um componente de coleta.',
|
|
3890
|
+
'praxis.editorialForms.dataCollection.loadingMessage': 'Carregando a engine de coleta para "{formBlockId}"...',
|
|
3891
|
+
'praxis.editorialForms.dataCollection.error.loadFailureMessage': 'O adaptador "{adapterName}" falhou ao preparar a coleta do bloco "{formBlockId}".',
|
|
3892
|
+
'praxis.editorialForms.dataCollection.error.loadFailureDetails': 'Valide o provider opcional do host e a disponibilidade do componente compatível.',
|
|
3893
|
+
'praxis.editorialForms.dataCollection.error.unresolvedComponentMessage': 'O adaptador "{adapterName}" nao retornou um componente para o bloco "{formBlockId}".',
|
|
3894
|
+
'praxis.editorialForms.dataCollection.error.unresolvedComponentDetails': 'Implemente component ou resolveComponent() com um componente Angular compatível.',
|
|
3895
|
+
'praxis.editorialForms.dataCollection.error.invalidComponentMessage': 'O adaptador "{adapterName}" retornou um componente incompatível para "{formBlockId}".',
|
|
3896
|
+
};
|
|
3897
|
+
|
|
3898
|
+
function createPraxisEditorialFormsI18nConfig(options = {}) {
|
|
3899
|
+
const dictionaries = {
|
|
3900
|
+
'pt-BR': {
|
|
3901
|
+
...PRAXIS_EDITORIAL_FORMS_PT_BR,
|
|
3902
|
+
...(options.dictionaries?.['pt-BR'] ?? {}),
|
|
3903
|
+
},
|
|
3904
|
+
'en-US': {
|
|
3905
|
+
...PRAXIS_EDITORIAL_FORMS_EN_US,
|
|
3906
|
+
...(options.dictionaries?.['en-US'] ?? {}),
|
|
3907
|
+
},
|
|
3908
|
+
};
|
|
3909
|
+
for (const [locale, dictionary] of Object.entries(options.dictionaries ?? {})) {
|
|
3910
|
+
if (locale === 'pt-BR' || locale === 'en-US') {
|
|
3911
|
+
continue;
|
|
3912
|
+
}
|
|
3913
|
+
dictionaries[locale] = {
|
|
3914
|
+
...(dictionaries[locale] ?? {}),
|
|
3915
|
+
...dictionary,
|
|
3916
|
+
};
|
|
3917
|
+
}
|
|
3918
|
+
return {
|
|
3919
|
+
locale: options.locale,
|
|
3920
|
+
fallbackLocale: options.fallbackLocale ?? 'pt-BR',
|
|
3921
|
+
dictionaries,
|
|
3922
|
+
};
|
|
3923
|
+
}
|
|
3924
|
+
function providePraxisEditorialFormsI18n(options = {}) {
|
|
3925
|
+
return providePraxisI18n(createPraxisEditorialFormsI18nConfig(options));
|
|
3926
|
+
}
|
|
3927
|
+
|
|
2360
3928
|
class HarnessDataEngineComponent {
|
|
2361
3929
|
config;
|
|
2362
3930
|
formId;
|
|
@@ -2607,5 +4175,5 @@ function getHarnessDataEngineComponent() {
|
|
|
2607
4175
|
* Generated bundle index. Do not edit.
|
|
2608
4176
|
*/
|
|
2609
4177
|
|
|
2610
|
-
export { DEFAULT_EDITORIAL_RUNTIME_HOST_CONFIG, EDITORIAL_DATA_BLOCK_ADAPTER, EditorialBlockRendererComponent, EditorialDataBlockAdapterRegistry, EditorialDataCollectionBlockOutletComponent, EditorialFormRuntimeComponent, EditorialRuntimeState, HarnessDataEngineComponent, createEditorialDynamicFormAdapter, createEditorialRuntimeHarnessCatalog, deriveRuntimeFallbackState, getHarnessDataEngineComponent, getValueAtPath, getVisibleBlocks, isBlockVisible, matchesVisibilityRule, provideEditorialDataBlockAdapter, provideEditorialDynamicFormAdapter, providePraxisEditorialForms, resolveActiveJourney, resolveActiveStep, resolveEditorialDataBlockAdapter, resolveEditorialDataBlockFormConfig, resolveEditorialDataBlockFormConfigDetails, resolveEditorialRuntimeSnapshot };
|
|
4178
|
+
export { DEFAULT_EDITORIAL_RUNTIME_HOST_CONFIG, EDITORIAL_DATA_BLOCK_ADAPTER, EditorialBlockRendererComponent, EditorialDataBlockAdapterRegistry, EditorialDataCollectionBlockOutletComponent, EditorialFormRuntimeComponent, EditorialIntroHeroBlockComponent, EditorialReviewSectionsBlockComponent, EditorialRuntimeState, EditorialSelectionCardsBlockComponent, EditorialStepperComponent, EditorialSuccessPanelBlockComponent, HarnessDataEngineComponent, PRAXIS_EDITORIAL_FORMS_EN_US, PRAXIS_EDITORIAL_FORMS_PT_BR, buildRuntimeCssVars, buildRuntimeLayoutCss, createEditorialDynamicFormAdapter, createEditorialRuntimeHarnessCatalog, createPraxisEditorialFormsI18nConfig, deriveRuntimeFallbackState, getHarnessDataEngineComponent, getStepDisplayState, getValueAtPath, getVisibleBlocks, isBlockVisible, matchesVisibilityRule, provideEditorialDataBlockAdapter, provideEditorialDynamicFormAdapter, providePraxisEditorialForms, providePraxisEditorialFormsI18n, resolveActiveJourney, resolveActiveStep, resolveDensity, resolveEditorialDataBlockAdapter, resolveEditorialDataBlockFormConfig, resolveEditorialDataBlockFormConfigDetails, resolveEditorialRuntimeSnapshot, resolveRuntimeOrientation, resolveShellVariant };
|
|
2611
4179
|
//# sourceMappingURL=praxisui-editorial-forms.mjs.map
|