@praxisui/editorial-forms 1.0.0-beta.61
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/LICENSE +6 -0
- package/README.md +421 -0
- package/fesm2022/praxisui-editorial-forms.mjs +2611 -0
- package/fesm2022/praxisui-editorial-forms.mjs.map +1 -0
- package/index.d.ts +438 -0
- package/package.json +46 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { EnvironmentProviders, Type, InjectionToken } from '@angular/core';
|
|
3
|
+
import * as _praxisui_core from '@praxisui/core';
|
|
4
|
+
import { EditorialProblemType, EditorialThemePreset, EditorialCompliancePreset, EditorialBlock, EditorialDataCollectionBlock, EditorialSolutionDefinition, EditorialTemplateInstance, FormConfig, EditorialBlockVisibilityRule, EditorialHeroBlock, EditorialRichTextBlock, EditorialPolicyListBlock, EditorialTimelineStepsBlock, EditorialReviewSummaryBlock, EditorialContextSummaryBlock, EditorialInfoCardsBlock, EditorialFaqAccordionBlock } from '@praxisui/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Root provider entrypoint for the editorial runtime package.
|
|
8
|
+
*
|
|
9
|
+
* Intentionally minimal in v1:
|
|
10
|
+
* - no global singleton graph yet
|
|
11
|
+
* - no dependency on @praxisui/dynamic-form
|
|
12
|
+
* - safe to consume from apps without pulling generic form authoring
|
|
13
|
+
*/
|
|
14
|
+
declare function providePraxisEditorialForms(): EnvironmentProviders;
|
|
15
|
+
|
|
16
|
+
type EditorialRuntimeDiagnosticSeverity = 'info' | 'warning' | 'error';
|
|
17
|
+
type EditorialRuntimeDiagnosticScopeKind = 'global' | 'journey' | 'step' | 'block';
|
|
18
|
+
type EditorialRuntimeDiagnosticCode = 'solution-missing' | 'theme-preset-not-found' | 'compliance-preset-not-found' | 'context-required-missing' | 'compliance-context-required-missing' | 'data-collection-config-missing' | 'data-collection-config-ambiguous' | 'data-collection-adapter-missing' | 'data-collection-invalid' | 'instance-journey-block-conflict' | 'journey-override-target-missing' | 'step-override-target-missing' | 'block-override-invalid' | 'block-override-conflict' | 'block-override-target-missing';
|
|
19
|
+
interface EditorialRuntimeDiagnostic {
|
|
20
|
+
code: EditorialRuntimeDiagnosticCode;
|
|
21
|
+
severity: EditorialRuntimeDiagnosticSeverity;
|
|
22
|
+
message: string;
|
|
23
|
+
scopeKind?: EditorialRuntimeDiagnosticScopeKind;
|
|
24
|
+
path?: string;
|
|
25
|
+
journeyId?: string;
|
|
26
|
+
journeyLabel?: string;
|
|
27
|
+
stepId?: string;
|
|
28
|
+
stepLabel?: string;
|
|
29
|
+
blockId?: string;
|
|
30
|
+
blockLabel?: string;
|
|
31
|
+
}
|
|
32
|
+
interface EditorialRuntimeDiagnostics {
|
|
33
|
+
items: EditorialRuntimeDiagnostic[];
|
|
34
|
+
hasErrors: boolean;
|
|
35
|
+
hasWarnings: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
type EditorialResolvedBlockSourceKind = 'solution' | 'themePreset' | 'compliancePreset' | 'instanceJourney' | 'instanceOverride';
|
|
39
|
+
type EditorialResolvedBlockCompositionOperation = 'seed' | 'compliance-append' | 'instance-journey-append' | 'instance-override-append' | 'instance-override-insert-before' | 'instance-override-insert-after' | 'instance-override-replace' | 'instance-override-remove';
|
|
40
|
+
interface EditorialResolvedBlockSourceRef {
|
|
41
|
+
kind: EditorialResolvedBlockSourceKind;
|
|
42
|
+
sourceId: string;
|
|
43
|
+
solutionId?: string;
|
|
44
|
+
presetId?: string;
|
|
45
|
+
instanceId?: string;
|
|
46
|
+
journeyId?: string;
|
|
47
|
+
stepId?: string;
|
|
48
|
+
blockId?: string;
|
|
49
|
+
}
|
|
50
|
+
interface EditorialResolvedBlockCompositionEntry {
|
|
51
|
+
operation: EditorialResolvedBlockCompositionOperation;
|
|
52
|
+
source: EditorialResolvedBlockSourceRef;
|
|
53
|
+
}
|
|
54
|
+
interface EditorialResolvedBlockProvenance {
|
|
55
|
+
primarySource: EditorialResolvedBlockSourceRef;
|
|
56
|
+
trail: EditorialResolvedBlockCompositionEntry[];
|
|
57
|
+
}
|
|
58
|
+
interface EditorialResolvedDataCollectionState {
|
|
59
|
+
formBlockId: string;
|
|
60
|
+
formConfigRef?: string;
|
|
61
|
+
hasInlineFormConfig: boolean;
|
|
62
|
+
resolvedFormConfigSource: 'block.formConfig' | 'instance.overrides.runtimeFormConfigs' | 'instance.compatibilityFormConfigs' | 'unresolved';
|
|
63
|
+
resolvedFormConfigLookupKey?: string;
|
|
64
|
+
hasResolvedFormConfig: boolean;
|
|
65
|
+
expectedAdapter: 'optional' | 'required';
|
|
66
|
+
readiness: 'ready' | 'requiresAdapter' | 'missingConfig' | 'invalid';
|
|
67
|
+
}
|
|
68
|
+
type EditorialResolvedBlockBase<TBlock extends EditorialBlock = EditorialBlock> = TBlock & {
|
|
69
|
+
provenance: EditorialResolvedBlockProvenance;
|
|
70
|
+
};
|
|
71
|
+
type EditorialResolvedDataCollectionBlock = EditorialDataCollectionBlock & {
|
|
72
|
+
provenance: EditorialResolvedBlockProvenance;
|
|
73
|
+
dataCollectionState: EditorialResolvedDataCollectionState;
|
|
74
|
+
};
|
|
75
|
+
type EditorialResolvedBlock = EditorialResolvedBlockBase<Exclude<EditorialBlock, EditorialDataCollectionBlock>> | EditorialResolvedDataCollectionBlock;
|
|
76
|
+
interface EditorialResolvedStep {
|
|
77
|
+
stepId: string;
|
|
78
|
+
label: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
blocks: EditorialResolvedBlock[];
|
|
81
|
+
}
|
|
82
|
+
interface EditorialResolvedJourney {
|
|
83
|
+
journeyId: string;
|
|
84
|
+
label: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
steps: EditorialResolvedStep[];
|
|
87
|
+
}
|
|
88
|
+
interface EditorialRuntimeSnapshot {
|
|
89
|
+
solutionId: string | null;
|
|
90
|
+
instanceId: string | null;
|
|
91
|
+
title: string | null;
|
|
92
|
+
description: string | null;
|
|
93
|
+
problemType: EditorialProblemType | null;
|
|
94
|
+
context: Record<string, unknown>;
|
|
95
|
+
effectiveThemePreset: EditorialThemePreset | null;
|
|
96
|
+
effectiveCompliancePresets: EditorialCompliancePreset[];
|
|
97
|
+
journeys: EditorialResolvedJourney[];
|
|
98
|
+
diagnostics: EditorialRuntimeDiagnostics;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface EditorialRuntimeInput {
|
|
102
|
+
solution: EditorialSolutionDefinition | null;
|
|
103
|
+
instance: EditorialTemplateInstance | null;
|
|
104
|
+
runtimeContext?: Record<string, unknown> | null;
|
|
105
|
+
}
|
|
106
|
+
interface EditorialRuntimeHostConfig {
|
|
107
|
+
emitOperationalEvents?: boolean;
|
|
108
|
+
forwardAdapterOperationalEvents?: boolean;
|
|
109
|
+
}
|
|
110
|
+
declare const DEFAULT_EDITORIAL_RUNTIME_HOST_CONFIG: Required<EditorialRuntimeHostConfig>;
|
|
111
|
+
|
|
112
|
+
type EditorialRuntimeFallbackMode = 'normal' | 'warning' | 'degraded' | 'blocked';
|
|
113
|
+
interface EditorialRuntimeFallbackState {
|
|
114
|
+
mode: EditorialRuntimeFallbackMode;
|
|
115
|
+
progressionBlocked: boolean;
|
|
116
|
+
hasGlobalErrors: boolean;
|
|
117
|
+
hasActiveStepErrors: boolean;
|
|
118
|
+
hasWarnings: boolean;
|
|
119
|
+
requiresEngineAttention: boolean;
|
|
120
|
+
diagnostics: EditorialRuntimeDiagnostic[];
|
|
121
|
+
blockingDiagnostics: EditorialRuntimeDiagnostic[];
|
|
122
|
+
}
|
|
123
|
+
interface EditorialRuntimeFallbackScope {
|
|
124
|
+
journeyId?: string | null;
|
|
125
|
+
stepId?: string | null;
|
|
126
|
+
}
|
|
127
|
+
declare function deriveRuntimeFallbackState(snapshot: EditorialRuntimeSnapshot, scope?: EditorialRuntimeFallbackScope): EditorialRuntimeFallbackState;
|
|
128
|
+
|
|
129
|
+
type EditorialRuntimeOperationalEventType = 'diagnostics-emitted' | 'fallback-changed' | 'blocking-error-detected' | 'override-conflict-detected' | 'data-collection-adapter-resolved' | 'data-collection-adapter-missing' | 'data-collection-adapter-incompatible' | 'data-collection-adapter-invalid';
|
|
130
|
+
type EditorialRuntimeOperationalEventSeverity = 'info' | 'warning' | 'error';
|
|
131
|
+
interface EditorialRuntimeOperationalEventBase<TType extends EditorialRuntimeOperationalEventType, TPayload> {
|
|
132
|
+
eventType: TType;
|
|
133
|
+
timestamp: number;
|
|
134
|
+
severity: EditorialRuntimeOperationalEventSeverity;
|
|
135
|
+
journeyId?: string;
|
|
136
|
+
stepId?: string;
|
|
137
|
+
blockId?: string;
|
|
138
|
+
payload: TPayload;
|
|
139
|
+
}
|
|
140
|
+
type EditorialRuntimeOperationalEvent = EditorialRuntimeOperationalEventBase<'diagnostics-emitted', {
|
|
141
|
+
diagnostics: EditorialRuntimeDiagnostic[];
|
|
142
|
+
errorCount: number;
|
|
143
|
+
warningCount: number;
|
|
144
|
+
infoCount: number;
|
|
145
|
+
}> | EditorialRuntimeOperationalEventBase<'fallback-changed', {
|
|
146
|
+
fallback: EditorialRuntimeFallbackState;
|
|
147
|
+
}> | EditorialRuntimeOperationalEventBase<'blocking-error-detected', {
|
|
148
|
+
diagnostics: EditorialRuntimeDiagnostic[];
|
|
149
|
+
scope: 'global' | 'step';
|
|
150
|
+
}> | EditorialRuntimeOperationalEventBase<'override-conflict-detected', {
|
|
151
|
+
diagnostics: EditorialRuntimeDiagnostic[];
|
|
152
|
+
}> | EditorialRuntimeOperationalEventBase<'data-collection-adapter-resolved', {
|
|
153
|
+
adapterId: string;
|
|
154
|
+
formBlockId: string;
|
|
155
|
+
}> | EditorialRuntimeOperationalEventBase<'data-collection-adapter-missing', {
|
|
156
|
+
formBlockId: string;
|
|
157
|
+
adapterIds: string[];
|
|
158
|
+
}> | EditorialRuntimeOperationalEventBase<'data-collection-adapter-incompatible', {
|
|
159
|
+
formBlockId: string;
|
|
160
|
+
adapterIds: string[];
|
|
161
|
+
}> | EditorialRuntimeOperationalEventBase<'data-collection-adapter-invalid', {
|
|
162
|
+
adapterId: string;
|
|
163
|
+
formBlockId: string;
|
|
164
|
+
reason: string;
|
|
165
|
+
}>;
|
|
166
|
+
|
|
167
|
+
declare class EditorialFormRuntimeComponent {
|
|
168
|
+
readonly solution: _angular_core.InputSignal<EditorialSolutionDefinition | null>;
|
|
169
|
+
readonly instance: _angular_core.InputSignal<EditorialTemplateInstance | null>;
|
|
170
|
+
readonly runtimeContext: _angular_core.InputSignal<Record<string, unknown> | null>;
|
|
171
|
+
readonly hostConfig: _angular_core.InputSignal<EditorialRuntimeHostConfig | null>;
|
|
172
|
+
readonly snapshotChange: _angular_core.OutputEmitterRef<EditorialRuntimeSnapshot>;
|
|
173
|
+
readonly fallbackChange: _angular_core.OutputEmitterRef<EditorialRuntimeFallbackState>;
|
|
174
|
+
readonly operationalEvent: _angular_core.OutputEmitterRef<EditorialRuntimeOperationalEvent>;
|
|
175
|
+
private readonly state;
|
|
176
|
+
private readonly solutionState;
|
|
177
|
+
private readonly instanceState;
|
|
178
|
+
private lastSnapshotSignature;
|
|
179
|
+
private lastDiagnosticsSignature;
|
|
180
|
+
private lastFallbackSignature;
|
|
181
|
+
private lastBlockingSignature;
|
|
182
|
+
private lastOverrideConflictSignature;
|
|
183
|
+
private readonly runtime;
|
|
184
|
+
protected readonly snapshot: _angular_core.Signal<EditorialRuntimeSnapshot>;
|
|
185
|
+
protected readonly resolvedHostConfig: _angular_core.Signal<{
|
|
186
|
+
emitOperationalEvents: boolean;
|
|
187
|
+
forwardAdapterOperationalEvents: boolean;
|
|
188
|
+
}>;
|
|
189
|
+
protected readonly journeys: _angular_core.Signal<EditorialResolvedJourney[]>;
|
|
190
|
+
protected readonly activeJourney: _angular_core.Signal<EditorialResolvedJourney | null>;
|
|
191
|
+
protected readonly activeStep: _angular_core.Signal<EditorialResolvedStep | null>;
|
|
192
|
+
protected readonly resolvedContext: _angular_core.Signal<Record<string, unknown>>;
|
|
193
|
+
protected readonly runtimeDiagnostics: _angular_core.Signal<EditorialRuntimeDiagnostics>;
|
|
194
|
+
protected readonly fallbackState: _angular_core.Signal<EditorialRuntimeFallbackState>;
|
|
195
|
+
protected readonly diagnosticItems: _angular_core.Signal<EditorialRuntimeDiagnostic[]>;
|
|
196
|
+
protected readonly globalDiagnostics: _angular_core.Signal<EditorialRuntimeDiagnostic[]>;
|
|
197
|
+
protected readonly contextualDiagnostics: _angular_core.Signal<EditorialRuntimeDiagnostic[]>;
|
|
198
|
+
protected readonly diagnosticsErrorCount: _angular_core.Signal<number>;
|
|
199
|
+
protected readonly diagnosticsWarningCount: _angular_core.Signal<number>;
|
|
200
|
+
protected readonly diagnosticsInfoCount: _angular_core.Signal<number>;
|
|
201
|
+
protected readonly activeStepDiagnostics: _angular_core.Signal<EditorialRuntimeDiagnostic[]>;
|
|
202
|
+
protected readonly activeStepHasErrors: _angular_core.Signal<boolean>;
|
|
203
|
+
protected readonly activeStepHasWarnings: _angular_core.Signal<boolean>;
|
|
204
|
+
protected readonly diagnosticsMessage: _angular_core.Signal<"Existem inconsistencias bloqueadoras que impedem a progressao segura do fluxo editorial." | "O runtime esta operando de forma degradada e requer atencao operacional." | "Existem inconsistencias que podem comprometer a experiencia editorial." | "Existem avisos operacionais para revisar nesta instancia editorial.">;
|
|
205
|
+
protected readonly activeGlobalDiagnostics: _angular_core.Signal<EditorialRuntimeDiagnostic[]>;
|
|
206
|
+
protected readonly visibleBlocks: _angular_core.Signal<_praxisui_core.EditorialBlock[]>;
|
|
207
|
+
protected readonly runtimeTitle: _angular_core.Signal<string | null>;
|
|
208
|
+
protected readonly runtimeDescription: _angular_core.Signal<string | null>;
|
|
209
|
+
protected readonly runtimeEyebrow: _angular_core.Signal<_praxisui_core.EditorialProblemType | null>;
|
|
210
|
+
protected readonly fallbackLabel: _angular_core.Signal<"Runtime bloqueado" | "Runtime degradado" | "Runtime com aviso" | "Runtime saudavel">;
|
|
211
|
+
protected readonly currentStepIndex: _angular_core.Signal<number>;
|
|
212
|
+
protected readonly hasPreviousStep: _angular_core.Signal<boolean>;
|
|
213
|
+
protected readonly hasNextStep: _angular_core.Signal<boolean>;
|
|
214
|
+
constructor();
|
|
215
|
+
protected selectJourney(journeyId: string): void;
|
|
216
|
+
protected selectStep(stepId: string): void;
|
|
217
|
+
protected goToPreviousStep(): void;
|
|
218
|
+
protected goToNextStep(): void;
|
|
219
|
+
protected journeyErrorCount(journeyId: string): number;
|
|
220
|
+
protected journeyWarningCount(journeyId: string): number;
|
|
221
|
+
protected stepErrorCount(stepId: string): number;
|
|
222
|
+
protected stepWarningCount(stepId: string): number;
|
|
223
|
+
protected formatDiagnosticSeverity(item: EditorialRuntimeDiagnostic): string;
|
|
224
|
+
protected formatDiagnosticScope(item: EditorialRuntimeDiagnostic): string;
|
|
225
|
+
protected isForwardNavigationBlocked(): boolean;
|
|
226
|
+
protected isJourneySelectionBlocked(journeyId: string): boolean;
|
|
227
|
+
protected isStepSelectionBlocked(stepId: string): boolean;
|
|
228
|
+
protected navigationBlockingMessage(): string;
|
|
229
|
+
private countDiagnostics;
|
|
230
|
+
protected emitOperationalEvent(event: EditorialRuntimeOperationalEvent): void;
|
|
231
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditorialFormRuntimeComponent, never>;
|
|
232
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EditorialFormRuntimeComponent, "praxis-editorial-form-runtime", never, { "solution": { "alias": "solution"; "required": false; "isSignal": true; }; "instance": { "alias": "instance"; "required": false; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; "hostConfig": { "alias": "hostConfig"; "required": false; "isSignal": true; }; }, { "snapshotChange": "snapshotChange"; "fallbackChange": "fallbackChange"; "operationalEvent": "operationalEvent"; }, never, never, true, never>;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
type EditorialDataBlockComponentInputs = Record<string, unknown>;
|
|
236
|
+
interface EditorialDataBlockContext {
|
|
237
|
+
block: EditorialDataCollectionBlock;
|
|
238
|
+
runtimeContext: Record<string, unknown> | null;
|
|
239
|
+
solution: EditorialSolutionDefinition | null;
|
|
240
|
+
instance: EditorialTemplateInstance | null;
|
|
241
|
+
resolvedFormConfig: FormConfig | null;
|
|
242
|
+
}
|
|
243
|
+
interface EditorialDataBlockAdapter {
|
|
244
|
+
readonly adapterId: string;
|
|
245
|
+
readonly displayName?: string;
|
|
246
|
+
readonly component?: Type<unknown>;
|
|
247
|
+
resolveComponent?(context: EditorialDataBlockContext): Promise<Type<unknown>> | Type<unknown>;
|
|
248
|
+
supports?(context: EditorialDataBlockContext): boolean;
|
|
249
|
+
buildInputs?(context: EditorialDataBlockContext): EditorialDataBlockComponentInputs;
|
|
250
|
+
validateComponent?(component: Type<unknown>, context: EditorialDataBlockContext): {
|
|
251
|
+
ok: true;
|
|
252
|
+
} | {
|
|
253
|
+
ok: false;
|
|
254
|
+
reason: string;
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
declare const EDITORIAL_DATA_BLOCK_ADAPTER: InjectionToken<readonly EditorialDataBlockAdapter[]>;
|
|
258
|
+
interface EditorialDataBlockResolution {
|
|
259
|
+
source: 'block.formConfig' | 'instance.overrides.runtimeFormConfigs' | 'instance.compatibilityFormConfigs' | 'unresolved';
|
|
260
|
+
formConfig: FormConfig | null;
|
|
261
|
+
lookupKey?: string;
|
|
262
|
+
ambiguous?: boolean;
|
|
263
|
+
matchedSources?: Array<'block.formConfig' | 'instance.overrides.runtimeFormConfigs' | 'instance.compatibilityFormConfigs'>;
|
|
264
|
+
matchedKeys?: string[];
|
|
265
|
+
}
|
|
266
|
+
declare function resolveEditorialDataBlockFormConfigDetails(block: EditorialDataCollectionBlock, instance: EditorialTemplateInstance | null): EditorialDataBlockResolution;
|
|
267
|
+
declare function resolveEditorialDataBlockFormConfig(block: EditorialDataCollectionBlock, instance: EditorialTemplateInstance | null): FormConfig | null;
|
|
268
|
+
|
|
269
|
+
type EditorialDataBlockAdapterResolutionStatus = 'resolved' | 'missing' | 'incompatible';
|
|
270
|
+
interface EditorialDataBlockAdapterResolution {
|
|
271
|
+
status: EditorialDataBlockAdapterResolutionStatus;
|
|
272
|
+
adapter: EditorialDataBlockAdapter | null;
|
|
273
|
+
adapterIds: string[];
|
|
274
|
+
registrySize: number;
|
|
275
|
+
}
|
|
276
|
+
declare class EditorialDataBlockAdapterRegistry {
|
|
277
|
+
private readonly adapters;
|
|
278
|
+
constructor(adapters: ReadonlyArray<EditorialDataBlockAdapter>);
|
|
279
|
+
resolve(context: EditorialDataBlockContext): EditorialDataBlockAdapterResolution;
|
|
280
|
+
}
|
|
281
|
+
declare function provideEditorialDataBlockAdapter(adapter: EditorialDataBlockAdapter): EnvironmentProviders;
|
|
282
|
+
declare function resolveEditorialDataBlockAdapter(adapters: ReadonlyArray<EditorialDataBlockAdapter>, context: EditorialDataBlockContext): EditorialDataBlockAdapterResolution;
|
|
283
|
+
|
|
284
|
+
type DataCollectionOutletState = {
|
|
285
|
+
kind: 'idle';
|
|
286
|
+
} | {
|
|
287
|
+
kind: 'loading';
|
|
288
|
+
message: string;
|
|
289
|
+
} | {
|
|
290
|
+
kind: 'ready';
|
|
291
|
+
} | {
|
|
292
|
+
kind: 'error';
|
|
293
|
+
title: string;
|
|
294
|
+
message: string;
|
|
295
|
+
details?: string;
|
|
296
|
+
};
|
|
297
|
+
declare class EditorialDataCollectionBlockOutletComponent {
|
|
298
|
+
private readonly adapters;
|
|
299
|
+
private readonly adapterRegistry;
|
|
300
|
+
private loadVersion;
|
|
301
|
+
private lastAdapterEventSignature;
|
|
302
|
+
readonly block: _angular_core.InputSignal<EditorialDataCollectionBlock | EditorialResolvedDataCollectionBlock>;
|
|
303
|
+
readonly runtimeContext: _angular_core.InputSignal<Record<string, unknown> | null>;
|
|
304
|
+
readonly solution: _angular_core.InputSignal<EditorialSolutionDefinition | null>;
|
|
305
|
+
readonly instance: _angular_core.InputSignal<EditorialTemplateInstance | null>;
|
|
306
|
+
readonly operationalEvent: _angular_core.OutputEmitterRef<EditorialRuntimeOperationalEvent>;
|
|
307
|
+
private readonly resolvedComponent;
|
|
308
|
+
protected readonly state: _angular_core.WritableSignal<DataCollectionOutletState>;
|
|
309
|
+
protected readonly adapterContext: _angular_core.Signal<{
|
|
310
|
+
block: EditorialDataCollectionBlock | EditorialResolvedDataCollectionBlock;
|
|
311
|
+
runtimeContext: Record<string, unknown> | null;
|
|
312
|
+
solution: EditorialSolutionDefinition | null;
|
|
313
|
+
instance: EditorialTemplateInstance | null;
|
|
314
|
+
resolvedFormConfig: _praxisui_core.FormConfig | null;
|
|
315
|
+
}>;
|
|
316
|
+
private readonly resolution;
|
|
317
|
+
protected readonly adapterResolution: _angular_core.Signal<EditorialDataBlockAdapterResolution>;
|
|
318
|
+
protected readonly adapter: _angular_core.Signal<EditorialDataBlockAdapter | null>;
|
|
319
|
+
protected readonly adapterComponent: _angular_core.Signal<Type<unknown> | null>;
|
|
320
|
+
protected readonly loadingState: _angular_core.Signal<{
|
|
321
|
+
kind: "loading";
|
|
322
|
+
message: string;
|
|
323
|
+
} | null>;
|
|
324
|
+
protected readonly errorState: _angular_core.Signal<{
|
|
325
|
+
kind: "error";
|
|
326
|
+
title: string;
|
|
327
|
+
message: string;
|
|
328
|
+
details?: string;
|
|
329
|
+
} | null>;
|
|
330
|
+
protected readonly adapterInputs: _angular_core.Signal<{}>;
|
|
331
|
+
protected readonly fallbackMessage: _angular_core.Signal<string>;
|
|
332
|
+
constructor();
|
|
333
|
+
private loadAdapterComponent;
|
|
334
|
+
private applyResolvedComponent;
|
|
335
|
+
private emitAdapterResolutionEvent;
|
|
336
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditorialDataCollectionBlockOutletComponent, never>;
|
|
337
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EditorialDataCollectionBlockOutletComponent, "praxis-editorial-data-collection-block-outlet", never, { "block": { "alias": "block"; "required": true; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; "solution": { "alias": "solution"; "required": false; "isSignal": true; }; "instance": { "alias": "instance"; "required": false; "isSignal": true; }; }, { "operationalEvent": "operationalEvent"; }, never, never, true, never>;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
interface EditorialDynamicFormAdapterOptions {
|
|
341
|
+
component: Type<DynamicFormCompatibleComponent>;
|
|
342
|
+
}
|
|
343
|
+
interface DynamicFormCompatibleComponent {
|
|
344
|
+
config: FormConfig;
|
|
345
|
+
formId?: string;
|
|
346
|
+
editorialContext?: Record<string, unknown> | null;
|
|
347
|
+
}
|
|
348
|
+
declare function createEditorialDynamicFormAdapter(options: EditorialDynamicFormAdapterOptions): EditorialDataBlockAdapter;
|
|
349
|
+
declare function provideEditorialDynamicFormAdapter(options: EditorialDynamicFormAdapterOptions): _angular_core.EnvironmentProviders;
|
|
350
|
+
|
|
351
|
+
interface ResolveEditorialRuntimeSnapshotInput {
|
|
352
|
+
solution: EditorialSolutionDefinition | null;
|
|
353
|
+
instance: EditorialTemplateInstance | null;
|
|
354
|
+
runtimeContext?: Record<string, unknown> | null;
|
|
355
|
+
}
|
|
356
|
+
declare function resolveEditorialRuntimeSnapshot(input: ResolveEditorialRuntimeSnapshotInput): EditorialRuntimeSnapshot;
|
|
357
|
+
|
|
358
|
+
declare class EditorialRuntimeState {
|
|
359
|
+
private readonly journeyId;
|
|
360
|
+
private readonly stepId;
|
|
361
|
+
readonly activeJourneyId: _angular_core.Signal<string | null>;
|
|
362
|
+
readonly activeStepId: _angular_core.Signal<string | null>;
|
|
363
|
+
connect(solution: () => EditorialSolutionDefinition | null, instance: () => EditorialTemplateInstance | null, runtimeContext: () => Record<string, unknown> | null): {
|
|
364
|
+
snapshot: () => EditorialRuntimeSnapshot;
|
|
365
|
+
journeys: () => EditorialResolvedJourney[];
|
|
366
|
+
activeJourney: () => EditorialResolvedJourney | null;
|
|
367
|
+
activeStep: () => EditorialResolvedStep | null;
|
|
368
|
+
};
|
|
369
|
+
selectJourney(journeyId: string): void;
|
|
370
|
+
selectStep(stepId: string): void;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
declare function resolveActiveJourney<TJourney extends {
|
|
374
|
+
journeyId: string;
|
|
375
|
+
}>(journeys: ReadonlyArray<TJourney>, journeyId: string | null | undefined): TJourney | null;
|
|
376
|
+
declare function resolveActiveStep<TStep extends {
|
|
377
|
+
stepId: string;
|
|
378
|
+
}>(journey: {
|
|
379
|
+
steps: ReadonlyArray<TStep>;
|
|
380
|
+
} | null, stepId: string | null | undefined): TStep | null;
|
|
381
|
+
declare function getVisibleBlocks(blocks: ReadonlyArray<EditorialBlock> | null | undefined, runtimeContext: Record<string, unknown> | null | undefined): EditorialBlock[];
|
|
382
|
+
declare function isBlockVisible(block: EditorialBlock, runtimeContext: Record<string, unknown> | null | undefined): boolean;
|
|
383
|
+
declare function matchesVisibilityRule(rule: EditorialBlockVisibilityRule, runtimeContext: Record<string, unknown> | null | undefined): boolean;
|
|
384
|
+
declare function getValueAtPath(source: Record<string, unknown>, path: string): unknown;
|
|
385
|
+
|
|
386
|
+
declare class EditorialBlockRendererComponent {
|
|
387
|
+
readonly block: _angular_core.InputSignal<EditorialBlock>;
|
|
388
|
+
readonly runtimeContext: _angular_core.InputSignal<Record<string, unknown> | null>;
|
|
389
|
+
readonly solution: _angular_core.InputSignal<EditorialSolutionDefinition | null>;
|
|
390
|
+
readonly instance: _angular_core.InputSignal<EditorialTemplateInstance | null>;
|
|
391
|
+
readonly operationalEvent: _angular_core.OutputEmitterRef<EditorialRuntimeOperationalEvent>;
|
|
392
|
+
protected readonly hero: _angular_core.Signal<EditorialHeroBlock>;
|
|
393
|
+
protected readonly richText: _angular_core.Signal<EditorialRichTextBlock>;
|
|
394
|
+
protected readonly policyList: _angular_core.Signal<EditorialPolicyListBlock>;
|
|
395
|
+
protected readonly timeline: _angular_core.Signal<EditorialTimelineStepsBlock>;
|
|
396
|
+
protected readonly review: _angular_core.Signal<EditorialReviewSummaryBlock>;
|
|
397
|
+
protected readonly contextSummary: _angular_core.Signal<EditorialContextSummaryBlock>;
|
|
398
|
+
protected readonly infoCards: _angular_core.Signal<EditorialInfoCardsBlock>;
|
|
399
|
+
protected readonly faq: _angular_core.Signal<EditorialFaqAccordionBlock>;
|
|
400
|
+
protected readonly dataCollection: _angular_core.Signal<EditorialDataCollectionBlock>;
|
|
401
|
+
protected readonly customWidget: _angular_core.Signal<_praxisui_core.EditorialCustomWidgetBlock>;
|
|
402
|
+
protected resolveValue(valuePath?: string, fallback?: string): string;
|
|
403
|
+
protected resolveContextPath(valuePath?: string): string | undefined;
|
|
404
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditorialBlockRendererComponent, never>;
|
|
405
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EditorialBlockRendererComponent, "praxis-editorial-block-renderer", never, { "block": { "alias": "block"; "required": true; "isSignal": true; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; "isSignal": true; }; "solution": { "alias": "solution"; "required": false; "isSignal": true; }; "instance": { "alias": "instance"; "required": false; "isSignal": true; }; }, { "operationalEvent": "operationalEvent"; }, never, never, true, never>;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
declare class HarnessDataEngineComponent {
|
|
409
|
+
config: FormConfig;
|
|
410
|
+
formId?: string;
|
|
411
|
+
editorialContext: Record<string, unknown> | null;
|
|
412
|
+
block: EditorialDataCollectionBlock | null;
|
|
413
|
+
runtimeContext: Record<string, unknown> | null;
|
|
414
|
+
solution: EditorialSolutionDefinition | null;
|
|
415
|
+
instance: EditorialTemplateInstance | null;
|
|
416
|
+
resolvedFormConfig: FormConfig | null;
|
|
417
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<HarnessDataEngineComponent, never>;
|
|
418
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<HarnessDataEngineComponent, "praxis-editorial-harness-data-engine", never, { "config": { "alias": "config"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "editorialContext": { "alias": "editorialContext"; "required": false; }; "block": { "alias": "block"; "required": false; }; "runtimeContext": { "alias": "runtimeContext"; "required": false; }; "solution": { "alias": "solution"; "required": false; }; "instance": { "alias": "instance"; "required": false; }; "resolvedFormConfig": { "alias": "resolvedFormConfig"; "required": false; }; }, {}, never, never, true, never>;
|
|
419
|
+
}
|
|
420
|
+
interface EditorialRuntimeFixture {
|
|
421
|
+
id: string;
|
|
422
|
+
title: string;
|
|
423
|
+
input: EditorialRuntimeInput;
|
|
424
|
+
expectedFallbackMode: EditorialRuntimeFallbackMode;
|
|
425
|
+
expectsAdapter: boolean;
|
|
426
|
+
}
|
|
427
|
+
interface EditorialRuntimeHarnessCatalog {
|
|
428
|
+
healthy: EditorialRuntimeFixture;
|
|
429
|
+
warning: EditorialRuntimeFixture;
|
|
430
|
+
globalError: EditorialRuntimeFixture;
|
|
431
|
+
dataCollectionMissingAdapter: EditorialRuntimeFixture;
|
|
432
|
+
dataCollectionWithAdapter: EditorialRuntimeFixture;
|
|
433
|
+
}
|
|
434
|
+
declare function createEditorialRuntimeHarnessCatalog(): EditorialRuntimeHarnessCatalog;
|
|
435
|
+
declare function getHarnessDataEngineComponent(): Type<unknown>;
|
|
436
|
+
|
|
437
|
+
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 };
|
|
438
|
+
export type { DynamicFormCompatibleComponent, EditorialDataBlockAdapter, EditorialDataBlockAdapterResolution, EditorialDataBlockAdapterResolutionStatus, EditorialDataBlockComponentInputs, EditorialDataBlockContext, EditorialDataBlockResolution, EditorialDynamicFormAdapterOptions, EditorialResolvedBlock, EditorialResolvedBlockBase, EditorialResolvedBlockCompositionEntry, EditorialResolvedBlockCompositionOperation, EditorialResolvedBlockProvenance, EditorialResolvedBlockSourceKind, EditorialResolvedBlockSourceRef, EditorialResolvedDataCollectionBlock, EditorialResolvedDataCollectionState, EditorialResolvedJourney, EditorialResolvedStep, EditorialRuntimeDiagnostic, EditorialRuntimeDiagnosticCode, EditorialRuntimeDiagnosticScopeKind, EditorialRuntimeDiagnosticSeverity, EditorialRuntimeDiagnostics, EditorialRuntimeFallbackMode, EditorialRuntimeFallbackScope, EditorialRuntimeFallbackState, EditorialRuntimeFixture, EditorialRuntimeHarnessCatalog, EditorialRuntimeHostConfig, EditorialRuntimeInput, EditorialRuntimeOperationalEvent, EditorialRuntimeOperationalEventBase, EditorialRuntimeOperationalEventSeverity, EditorialRuntimeOperationalEventType, EditorialRuntimeSnapshot, ResolveEditorialRuntimeSnapshotInput };
|
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@praxisui/editorial-forms",
|
|
3
|
+
"version": "1.0.0-beta.61",
|
|
4
|
+
"description": "Editorial form runtime for Praxis UI: journeys, presets, semantic blocks, and specialist hosting for editorial experiences.",
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^20.0.0",
|
|
7
|
+
"@angular/core": "^20.0.0",
|
|
8
|
+
"@praxisui/core": "^1.0.0-beta.61"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"tslib": "^2.3.0"
|
|
12
|
+
},
|
|
13
|
+
"license": "Apache-2.0",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/codexrodrigues/praxis-ui-angular"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://praxisui.dev",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/codexrodrigues/praxis-ui-angular/issues"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"angular",
|
|
27
|
+
"praxisui",
|
|
28
|
+
"editorial",
|
|
29
|
+
"forms",
|
|
30
|
+
"journeys",
|
|
31
|
+
"presets",
|
|
32
|
+
"runtime"
|
|
33
|
+
],
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"module": "fesm2022/praxisui-editorial-forms.mjs",
|
|
36
|
+
"typings": "index.d.ts",
|
|
37
|
+
"exports": {
|
|
38
|
+
"./package.json": {
|
|
39
|
+
"default": "./package.json"
|
|
40
|
+
},
|
|
41
|
+
".": {
|
|
42
|
+
"types": "./index.d.ts",
|
|
43
|
+
"default": "./fesm2022/praxisui-editorial-forms.mjs"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|