@praxisui/dynamic-form 5.0.0-beta.0 → 7.0.0-beta.0
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 +47 -60
- package/fesm2022/praxisui-dynamic-form.mjs +187 -121
- package/index.d.ts +15 -15
- package/package.json +6 -5
package/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
7
7
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
8
8
|
import { CdkDragStart, CdkDragMove, CdkDragEnd, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
9
9
|
import * as _praxisui_core from '@praxisui/core';
|
|
10
|
-
import { AsyncConfigStorage, FormLayout, FieldMetadata, FormLayoutRule, FormRuleTargetType as FormRuleTargetType$1, PraxisJsonLogicService, FormSection, FormRow, FormColumn, FormConfig, FormActionButton, AiCapability, BackConfig, ApiEndpoint, ApiUrlEntry, FormHooksLayout, EndpointConfig, FormSubmitEvent, FormReadyEvent, FormValueChangeEvent, SyncResult, FormInitializationError, LoadingState, FormCustomActionEvent, FormActionConfirmationEvent,
|
|
10
|
+
import { AsyncConfigStorage, FormLayout, FieldMetadata, FormLayoutRule, FormRuleTargetType as FormRuleTargetType$1, PraxisJsonLogicService, FormSection, FormRow, FormColumn, FormConfig, FormActionButton, AiCapability, BackConfig, ApiEndpoint, ApiUrlEntry, FormHooksLayout, EndpointConfig, FormSubmitEvent, FormReadyEvent, FormValueChangeEvent, SyncResult, FormInitializationError, LoadingState, FormCustomActionEvent, FormActionConfirmationEvent, RichContentDocument, JsonLogicRecord, GenericCrudService, ConnectionStorage, DynamicFormService, ErrorMessageService, SchemaNormalizerService, ComponentMetadataRegistry, GlobalConfigService, ComponentKeyService, LoadingOrchestrator, ApiUrlConfig, PraxisLoadingRenderer, FormHooksRegistry, FormHookPreset, LoggerService, FormSectionHeaderAction, FormSectionHeaderConfig, FormConfigState, FieldDefinition, ComponentDocMeta, Breakpoint, IconPickerService, SurfaceOpenPayload, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog } from '@praxisui/core';
|
|
11
11
|
import * as rxjs from 'rxjs';
|
|
12
12
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
13
13
|
import { SettingsPanelService, SettingsValueProvider } from '@praxisui/settings-panel';
|
|
@@ -512,10 +512,11 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
512
512
|
private readonly DEBUG;
|
|
513
513
|
resourcePath?: string;
|
|
514
514
|
resourceId?: string | number;
|
|
515
|
+
initialValue?: Record<string, unknown> | null;
|
|
515
516
|
/**
|
|
516
|
-
* Shared editorial context for
|
|
517
|
+
* Shared editorial context for rich content hosted around the form.
|
|
517
518
|
* Treat this input as immutable: in-place mutations do not invalidate the cached
|
|
518
|
-
*
|
|
519
|
+
* merged context snapshot used to avoid re-binding on every change detection pass.
|
|
519
520
|
*/
|
|
520
521
|
editorialContext: Record<string, unknown> | null;
|
|
521
522
|
mode: 'create' | 'edit' | 'view';
|
|
@@ -610,10 +611,6 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
610
611
|
}>;
|
|
611
612
|
/** Forwarded from DynamicFieldLoader to allow host-side observability. */
|
|
612
613
|
fieldRenderError: EventEmitter<DynamicFieldRenderErrorEvent>;
|
|
613
|
-
/** Re-emits events from editorial widgets hosted before, before actions, or after the form. */
|
|
614
|
-
widgetEvent: EventEmitter<WidgetEventEnvelope & {
|
|
615
|
-
placement: "before" | "beforeActions" | "after";
|
|
616
|
-
}>;
|
|
617
614
|
isLoading: boolean;
|
|
618
615
|
submitting: boolean;
|
|
619
616
|
submitError: string | null;
|
|
@@ -654,24 +651,26 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
654
651
|
private resolvedPrefs;
|
|
655
652
|
private editorialWidgetContextCache;
|
|
656
653
|
private editorialWidgetContextDeps;
|
|
657
|
-
|
|
658
|
-
get
|
|
659
|
-
get
|
|
654
|
+
private readonly emptyEditorialRichContentDocument;
|
|
655
|
+
get formBlocksBefore(): RichContentDocument | null;
|
|
656
|
+
get formBlocksAfter(): RichContentDocument | null;
|
|
657
|
+
get formBlocksBeforeActions(): RichContentDocument | null;
|
|
658
|
+
get formBlocksBeforeDocument(): RichContentDocument;
|
|
659
|
+
get formBlocksBeforeActionsDocument(): RichContentDocument;
|
|
660
|
+
get formBlocksAfterDocument(): RichContentDocument;
|
|
660
661
|
get beforeActionsPlacement(): 'insideLastSection' | 'afterSections';
|
|
661
662
|
get actionPlacement(): 'insideLastSection' | 'afterSections' | 'top';
|
|
662
663
|
/**
|
|
663
|
-
* Precedence for editorial
|
|
664
|
+
* Precedence for editorial rich-content interpolation:
|
|
664
665
|
* 1. form runtime context
|
|
665
666
|
* 2. config.editorialContext
|
|
666
667
|
* 3. host editorialContext input
|
|
667
668
|
* Later layers override earlier ones.
|
|
668
|
-
* Widget explicit inputs still win after interpolation because they are bound directly.
|
|
669
669
|
*
|
|
670
670
|
* Invariant: config.editorialContext and editorialContext must be replaced immutably.
|
|
671
671
|
* In-place mutations do not invalidate the cached merged context snapshot.
|
|
672
672
|
*/
|
|
673
|
-
|
|
674
|
-
onEditorialWidgetEvent(placement: 'before' | 'beforeActions' | 'after', event: WidgetEventEnvelope): void;
|
|
673
|
+
getEditorialRichContentContext(): JsonLogicRecord;
|
|
675
674
|
private reactiveValidate$?;
|
|
676
675
|
private warnedMissingId;
|
|
677
676
|
private schemaState;
|
|
@@ -759,6 +758,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
759
758
|
private buildRestoreTargetContext;
|
|
760
759
|
private isCompatibleRuntimeStateContext;
|
|
761
760
|
private restoreFormRuntimeState;
|
|
761
|
+
private getNormalizedInitialValue;
|
|
762
762
|
/**
|
|
763
763
|
* Backward-compatible required validation for DATE_RANGE controls.
|
|
764
764
|
* Some core builds do not enforce required start/end for dateRange fields.
|
|
@@ -1011,7 +1011,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
1011
1011
|
private applyPresentationVars;
|
|
1012
1012
|
private applyPresentationConfig;
|
|
1013
1013
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicForm, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
1014
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicForm, "praxis-dynamic-form", never, { "resourcePath": { "alias": "resourcePath"; "required": false; }; "resourceId": { "alias": "resourceId"; "required": false; }; "editorialContext": { "alias": "editorialContext"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "config": { "alias": "config"; "required": false; }; "schemaSource": { "alias": "schemaSource"; "required": false; }; "schemaUrl": { "alias": "schemaUrl"; "required": false; }; "submitUrl": { "alias": "submitUrl"; "required": false; }; "submitMethod": { "alias": "submitMethod"; "required": false; }; "responseSchemaUrl": { "alias": "responseSchemaUrl"; "required": false; }; "apiEndpointKey": { "alias": "apiEndpointKey"; "required": false; }; "apiUrlEntry": { "alias": "apiUrlEntry"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "backConfig": { "alias": "backConfig"; "required": false; }; "hooks": { "alias": "hooks"; "required": false; }; "removeEmptyContainersOnSave": { "alias": "removeEmptyContainersOnSave"; "required": false; }; "reactiveValidation": { "alias": "reactiveValidation"; "required": false; }; "reactiveValidationDebounceMs": { "alias": "reactiveValidationDebounceMs"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "readonlyModeGlobal": { "alias": "readonlyModeGlobal"; "required": false; }; "disabledModeGlobal": { "alias": "disabledModeGlobal"; "required": false; }; "presentationModeGlobal": { "alias": "presentationModeGlobal"; "required": false; }; "visibleGlobal": { "alias": "visibleGlobal"; "required": false; }; "customEndpoints": { "alias": "customEndpoints"; "required": false; }; }, { "formSubmit": "formSubmit"; "formCancel": "formCancel"; "formReset": "formReset"; "configChange": "configChange"; "formReady": "formReady"; "valueChange": "valueChange"; "syncCompleted": "syncCompleted"; "initializationError": "initializationError"; "loadingStateChange": "loadingStateChange"; "enableCustomizationChange": "enableCustomizationChange"; "customAction": "customAction"; "actionConfirmation": "actionConfirmation"; "schemaStatusChange": "schemaStatusChange"; "fieldRenderError": "fieldRenderError";
|
|
1014
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicForm, "praxis-dynamic-form", never, { "resourcePath": { "alias": "resourcePath"; "required": false; }; "resourceId": { "alias": "resourceId"; "required": false; }; "initialValue": { "alias": "initialValue"; "required": false; }; "editorialContext": { "alias": "editorialContext"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "config": { "alias": "config"; "required": false; }; "schemaSource": { "alias": "schemaSource"; "required": false; }; "schemaUrl": { "alias": "schemaUrl"; "required": false; }; "submitUrl": { "alias": "submitUrl"; "required": false; }; "submitMethod": { "alias": "submitMethod"; "required": false; }; "responseSchemaUrl": { "alias": "responseSchemaUrl"; "required": false; }; "apiEndpointKey": { "alias": "apiEndpointKey"; "required": false; }; "apiUrlEntry": { "alias": "apiUrlEntry"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "backConfig": { "alias": "backConfig"; "required": false; }; "hooks": { "alias": "hooks"; "required": false; }; "removeEmptyContainersOnSave": { "alias": "removeEmptyContainersOnSave"; "required": false; }; "reactiveValidation": { "alias": "reactiveValidation"; "required": false; }; "reactiveValidationDebounceMs": { "alias": "reactiveValidationDebounceMs"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "readonlyModeGlobal": { "alias": "readonlyModeGlobal"; "required": false; }; "disabledModeGlobal": { "alias": "disabledModeGlobal"; "required": false; }; "presentationModeGlobal": { "alias": "presentationModeGlobal"; "required": false; }; "visibleGlobal": { "alias": "visibleGlobal"; "required": false; }; "customEndpoints": { "alias": "customEndpoints"; "required": false; }; }, { "formSubmit": "formSubmit"; "formCancel": "formCancel"; "formReset": "formReset"; "configChange": "configChange"; "formReady": "formReady"; "valueChange": "valueChange"; "syncCompleted": "syncCompleted"; "initializationError": "initializationError"; "loadingStateChange": "loadingStateChange"; "enableCustomizationChange": "enableCustomizationChange"; "customAction": "customAction"; "actionConfirmation": "actionConfirmation"; "schemaStatusChange": "schemaStatusChange"; "fieldRenderError": "fieldRenderError"; }, never, never, true, never>;
|
|
1015
1015
|
}
|
|
1016
1016
|
|
|
1017
1017
|
declare class FormConfigService {
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dynamic-form",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-beta.0",
|
|
4
4
|
"description": "Angular dynamic form engine for Praxis UI: metadata-driven forms, hooks, and services integrating @praxisui/* packages.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
8
|
"@angular/cdk": "^20.0.0",
|
|
9
|
-
"@praxisui/
|
|
10
|
-
"@praxisui/
|
|
11
|
-
"@praxisui/
|
|
12
|
-
"@praxisui/
|
|
9
|
+
"@praxisui/rich-content": "^7.0.0-beta.0",
|
|
10
|
+
"@praxisui/settings-panel": "^7.0.0-beta.0",
|
|
11
|
+
"@praxisui/visual-builder": "^7.0.0-beta.0",
|
|
12
|
+
"@praxisui/core": "^7.0.0-beta.0",
|
|
13
|
+
"@praxisui/cron-builder": "^7.0.0-beta.0"
|
|
13
14
|
},
|
|
14
15
|
"dependencies": {
|
|
15
16
|
"tslib": "^2.3.0",
|