@praxisui/dynamic-form 10.0.0-rc.83 → 10.0.0-rc.85
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-12-
|
|
3
|
+
"generatedAt": "2026-12-03T11:59:47.994Z",
|
|
4
4
|
"packageName": "@praxisui/dynamic-form",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.85",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 2,
|
|
@@ -23,7 +23,7 @@ import { MatBadgeModule } from '@angular/material/badge';
|
|
|
23
23
|
import { BehaviorSubject, map, Subscription, merge, of, timer, NEVER, EMPTY, defer, TimeoutError, Subject, Observable, firstValueFrom, filter as filter$1, take as take$1, timeout as timeout$1, throwError, combineLatest, forkJoin, race, from, debounceTime as debounceTime$1, takeUntil as takeUntil$1, catchError as catchError$1, defaultIfEmpty, switchMap as switchMap$1, finalize as finalize$1 } from 'rxjs';
|
|
24
24
|
import { filter, map as map$1, switchMap, take, timeout, throwIfEmpty, tap, catchError, ignoreElements, finalize, takeUntil, skip, debounceTime, startWith } from 'rxjs/operators';
|
|
25
25
|
import * as i1 from '@praxisui/core';
|
|
26
|
-
import { normalizeControlTypeKey, normalizeScalarArrayValue, serializeEntityLookupValueForPayload, PRAXIS_RUNTIME_FORM_VALUE_PROPOSAL_SCHEMA_VERSION, PraxisI18nService, PraxisIconButtonComponent, translateDecisionInspector, PraxisIconDirective, providePraxisI18nConfig, getFormColumnFieldNames, RULE_PROPERTY_SCHEMA, FIELD_METADATA_CAPABILITIES, migrateFormLayoutRule, PraxisJsonLogicService, normalizeFormLayoutItems, deepMerge, createDefaultFormConfig, normalizeFormConfig as normalizeFormConfig$1, ensureIds, createEmptyRichContentDocument, formIdentityIssues, resolveHidden, resolveOrder, resolveSpan, projectGroupedCommandPartialRows, isPraxisRuntimeGlobalActionEffect, ASYNC_CONFIG_STORAGE, withFormConfigSections, createFieldLayoutItem, getFormLayoutFieldNames, LoggerService, createCorporateLoggerConfig, ConsoleLoggerSink, ResourceDiscoveryService, PraxisRuntimeComponentObservationRegistryService, WidgetShellComponent, GlobalActionService, normalizeConfigPersistenceStrategy, SCHEMA_METADATA_CLIENT_OPTIONS, PraxisRuntimeFormValueSessionJournal, PraxisDecisionInspectorService, PraxisContextSwitchGuard, ResourceQuickConnectComponent, GenericCrudService, composeHeadersWithVersion, buildApiUrl, readStrongResourceEtag, normalizePraxisResourcePath, ApiEndpoint, mapFieldDefinitionsToMetadata, reconcileFormConfig, applyLocalFormCustomizations, materializeFormLayoutFromMetadata, syncWithServerMetadata, PRAXIS_LOADING_CTX, evaluateFieldAccess, stripDraftClearedValues, normalizePraxisEffectPolicy, buildPraxisEffectDistinctKey, resolveGroupedCommandPartialRowSpans, resolveOffset, buildSchemaIdStorageKeySegment, buildSchemaId, fetchWithETag, resolveControlTypeAlias, getTextTransformer, MemoryCacheAdapter, LocalStorageCacheAdapter, SchemaMetadataClient, DEFAULT_SCHEMA_REQUEST_TIMEOUT_MS, normalizeReactiveDeterminations, previewRuntimeFormValueProposal, applyRuntimeFormValueProposal, undoRuntimeFormValueApply, instanceKeyFor, CONNECTION_STORAGE, API_URL, PRAXIS_LOADING_RENDERER, FORM_HOOKS_PRESETS, EmptyStateCardComponent, isValidFormConfig, ComponentMetadataRegistry, FieldControlType, hasSemanticFieldCalibrationDiff, calibrateFieldMetadataFromSemantics, canOrganizeFormLayoutBySemantics, organizeFormLayoutBySemantics, isRequiredGlobalActionPayloadMissing, GLOBAL_ACTION_CATALOG, PRAXIS_GLOBAL_ACTION_CATALOG, getGlobalActionCatalog, SURFACE_OPEN_I18N_NAMESPACE, getGlobalActionUiSchema, getRequiredGlobalActionPayloadKeys, hasMeaningfulGlobalActionPayloadValue, SurfaceOpenActionEditorComponent, SURFACE_OPEN_I18N_CONFIG, IconPickerService, validateGlobalActionRefs, normalizeFormMetadata, mapCatalogFieldsToMetadata, uiLayoutJsonIdentity, DynamicFormService, projectComponentAuthoringManifest, cloneBoundedUiLayoutJsonDocument, derivePageChildRuntimeId } from '@praxisui/core';
|
|
26
|
+
import { normalizeControlTypeKey, normalizeScalarArrayValue, serializeEntityLookupValueForPayload, PRAXIS_RUNTIME_FORM_VALUE_PROPOSAL_SCHEMA_VERSION, PraxisI18nService, PraxisIconButtonComponent, translateDecisionInspector, PraxisIconDirective, providePraxisI18nConfig, getFormColumnFieldNames, RULE_PROPERTY_SCHEMA, FIELD_METADATA_CAPABILITIES, migrateFormLayoutRule, PraxisJsonLogicService, normalizeFormLayoutItems, deepMerge, createDefaultFormConfig, normalizeFormConfig as normalizeFormConfig$1, ensureIds, createEmptyRichContentDocument, formIdentityIssues, resolveHidden, resolveOrder, resolveSpan, projectGroupedCommandPartialRows, isPraxisRuntimeGlobalActionEffect, ASYNC_CONFIG_STORAGE, withFormConfigSections, createFieldLayoutItem, getFormLayoutFieldNames, resolveExplicitFormGridSpan, LoggerService, createCorporateLoggerConfig, ConsoleLoggerSink, ResourceDiscoveryService, PraxisRuntimeComponentObservationRegistryService, WidgetShellComponent, GlobalActionService, normalizeConfigPersistenceStrategy, SCHEMA_METADATA_CLIENT_OPTIONS, PraxisRuntimeFormValueSessionJournal, PraxisDecisionInspectorService, PraxisContextSwitchGuard, ResourceQuickConnectComponent, GenericCrudService, composeHeadersWithVersion, buildApiUrl, readStrongResourceEtag, normalizePraxisResourcePath, ApiEndpoint, mapFieldDefinitionsToMetadata, reconcileFormConfig, applyLocalFormCustomizations, materializeFormLayoutFromMetadata, syncWithServerMetadata, PRAXIS_LOADING_CTX, evaluateFieldAccess, stripDraftClearedValues, normalizePraxisEffectPolicy, buildPraxisEffectDistinctKey, resolveGroupedCommandPartialRowSpans, resolveOffset, buildSchemaIdStorageKeySegment, buildSchemaId, fetchWithETag, resolveControlTypeAlias, getTextTransformer, MemoryCacheAdapter, LocalStorageCacheAdapter, SchemaMetadataClient, DEFAULT_SCHEMA_REQUEST_TIMEOUT_MS, normalizeReactiveDeterminations, previewRuntimeFormValueProposal, applyRuntimeFormValueProposal, undoRuntimeFormValueApply, instanceKeyFor, CONNECTION_STORAGE, API_URL, PRAXIS_LOADING_RENDERER, FORM_HOOKS_PRESETS, EmptyStateCardComponent, isValidFormConfig, ComponentMetadataRegistry, FieldControlType, hasSemanticFieldCalibrationDiff, calibrateFieldMetadataFromSemantics, canOrganizeFormLayoutBySemantics, organizeFormLayoutBySemantics, isRequiredGlobalActionPayloadMissing, GLOBAL_ACTION_CATALOG, PRAXIS_GLOBAL_ACTION_CATALOG, getGlobalActionCatalog, SURFACE_OPEN_I18N_NAMESPACE, getGlobalActionUiSchema, getRequiredGlobalActionPayloadKeys, hasMeaningfulGlobalActionPayloadValue, SurfaceOpenActionEditorComponent, SURFACE_OPEN_I18N_CONFIG, IconPickerService, validateGlobalActionRefs, normalizeFormMetadata, mapCatalogFieldsToMetadata, uiLayoutJsonIdentity, DynamicFormService, projectComponentAuthoringManifest, cloneBoundedUiLayoutJsonDocument, derivePageChildRuntimeId } from '@praxisui/core';
|
|
27
27
|
import * as i1$1 from '@praxisui/dynamic-fields';
|
|
28
28
|
import { markControlSubmitAttempted, getControlTypeCatalog, SelectOptionRegistry, ConfirmDialogComponent, DynamicFieldLoaderDirective } from '@praxisui/dynamic-fields';
|
|
29
29
|
import { withAuthoringScopePolicy, BaseAiAdapter, AgenticAuthoringTurnClientService, PraxisAssistantSessionRegistryService, PraxisAssistantTurnOrchestratorService, createPraxisAssistantViewportLayout, PraxisAiAssistantShellComponent } from '@praxisui/ai';
|
|
@@ -13289,8 +13289,9 @@ class DynamicFormLayoutService {
|
|
|
13289
13289
|
const fieldsPerRow = options?.fieldsPerRow ?? 2;
|
|
13290
13290
|
const defaultSectionTitle = options?.defaultSectionTitle ?? 'Informações';
|
|
13291
13291
|
const layoutPreset = options?.layoutPreset ?? 'default';
|
|
13292
|
+
const layoutEligibleFields = fields.filter((field) => !this.isFieldHiddenFromLayout(field));
|
|
13292
13293
|
const groupedFields = new Map();
|
|
13293
|
-
for (const field of
|
|
13294
|
+
for (const field of layoutEligibleFields) {
|
|
13294
13295
|
const groupName = field.group || 'default';
|
|
13295
13296
|
if (!groupedFields.has(groupName)) {
|
|
13296
13297
|
groupedFields.set(groupName, []);
|
|
@@ -13553,6 +13554,12 @@ class DynamicFormLayoutService {
|
|
|
13553
13554
|
}
|
|
13554
13555
|
return { sectionIndex, rowIndex, colIndex, fieldIndex };
|
|
13555
13556
|
}
|
|
13557
|
+
isFieldHiddenFromLayout(field) {
|
|
13558
|
+
const candidate = field;
|
|
13559
|
+
return (candidate?.formHidden === true ||
|
|
13560
|
+
candidate?.hidden === true ||
|
|
13561
|
+
candidate?.visible === false);
|
|
13562
|
+
}
|
|
13556
13563
|
resolveExplicitColSpan(field) {
|
|
13557
13564
|
const rawColSpan = field.colSpan;
|
|
13558
13565
|
if (typeof rawColSpan === 'number' && Number.isFinite(rawColSpan)) {
|
|
@@ -13595,31 +13602,58 @@ class DynamicFormLayoutService {
|
|
|
13595
13602
|
const rows = [];
|
|
13596
13603
|
let currentColumns = [];
|
|
13597
13604
|
let usedSpan = 0;
|
|
13605
|
+
const flushCurrentRow = () => {
|
|
13606
|
+
if (currentColumns.length === 0) {
|
|
13607
|
+
return;
|
|
13608
|
+
}
|
|
13609
|
+
if (currentColumns.length >= 2 && usedSpan < 12) {
|
|
13610
|
+
const deficit = 12 - usedSpan;
|
|
13611
|
+
const expandable = [...currentColumns]
|
|
13612
|
+
.reverse()
|
|
13613
|
+
.find((entry) => !entry.explicit);
|
|
13614
|
+
if (expandable) {
|
|
13615
|
+
const expandedMd = Math.min(12, expandable.span + deficit);
|
|
13616
|
+
expandable.span = expandedMd;
|
|
13617
|
+
expandable.column.span = {
|
|
13618
|
+
...expandable.column.span,
|
|
13619
|
+
sm: expandedMd > 6 ? 12 : Math.max(base, expandedMd),
|
|
13620
|
+
md: expandedMd,
|
|
13621
|
+
lg: expandedMd,
|
|
13622
|
+
xl: expandedMd,
|
|
13623
|
+
};
|
|
13624
|
+
}
|
|
13625
|
+
}
|
|
13626
|
+
rows.push({
|
|
13627
|
+
id: this.genId('row'),
|
|
13628
|
+
columns: currentColumns.map((entry) => entry.column),
|
|
13629
|
+
});
|
|
13630
|
+
currentColumns = [];
|
|
13631
|
+
usedSpan = 0;
|
|
13632
|
+
};
|
|
13598
13633
|
for (const field of fields) {
|
|
13599
|
-
const
|
|
13634
|
+
const explicitSpan = this.resolveExplicitColSpan(field);
|
|
13635
|
+
const mdSpan = explicitSpan ?? base;
|
|
13600
13636
|
if (currentColumns.length > 0 && usedSpan + mdSpan > 12) {
|
|
13601
|
-
|
|
13602
|
-
currentColumns = [];
|
|
13603
|
-
usedSpan = 0;
|
|
13637
|
+
flushCurrentRow();
|
|
13604
13638
|
}
|
|
13605
13639
|
const smSpan = mdSpan > 6 ? 12 : Math.max(base, mdSpan);
|
|
13606
13640
|
const items = [createFieldLayoutItem(field.name, currentColumns.length)];
|
|
13607
13641
|
currentColumns.push({
|
|
13608
|
-
|
|
13609
|
-
|
|
13610
|
-
|
|
13611
|
-
|
|
13642
|
+
explicit: explicitSpan !== null,
|
|
13643
|
+
span: mdSpan,
|
|
13644
|
+
column: {
|
|
13645
|
+
id: this.genId('col'),
|
|
13646
|
+
items,
|
|
13647
|
+
fields: getFormLayoutFieldNames(items),
|
|
13648
|
+
span: { xs: 12, sm: smSpan, md: mdSpan, lg: mdSpan, xl: mdSpan },
|
|
13649
|
+
},
|
|
13612
13650
|
});
|
|
13613
13651
|
usedSpan += mdSpan;
|
|
13614
13652
|
if (usedSpan >= 12) {
|
|
13615
|
-
|
|
13616
|
-
currentColumns = [];
|
|
13617
|
-
usedSpan = 0;
|
|
13653
|
+
flushCurrentRow();
|
|
13618
13654
|
}
|
|
13619
13655
|
}
|
|
13620
|
-
|
|
13621
|
-
rows.push({ id: this.genId('row'), columns: currentColumns });
|
|
13622
|
-
}
|
|
13656
|
+
flushCurrentRow();
|
|
13623
13657
|
return rows;
|
|
13624
13658
|
}
|
|
13625
13659
|
createCompactPresentationRowsFromFields(fields) {
|
|
@@ -13648,52 +13682,8 @@ class DynamicFormLayoutService {
|
|
|
13648
13682
|
return rows;
|
|
13649
13683
|
}
|
|
13650
13684
|
resolveCompactPresentationSpan(field) {
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
return explicitColSpan;
|
|
13654
|
-
}
|
|
13655
|
-
const rawWidth = field.width;
|
|
13656
|
-
if (typeof rawWidth === 'number' && Number.isFinite(rawWidth)) {
|
|
13657
|
-
return this.clampGridSpan(Math.round(rawWidth));
|
|
13658
|
-
}
|
|
13659
|
-
const normalized = String(rawWidth ?? '').trim().toLowerCase();
|
|
13660
|
-
if (!normalized) {
|
|
13661
|
-
return this.inferCompactPresentationSpan(field);
|
|
13662
|
-
}
|
|
13663
|
-
const numeric = Number(normalized);
|
|
13664
|
-
if (Number.isFinite(numeric)) {
|
|
13665
|
-
return this.clampGridSpan(Math.round(numeric));
|
|
13666
|
-
}
|
|
13667
|
-
switch (normalized) {
|
|
13668
|
-
case 'full':
|
|
13669
|
-
case 'large':
|
|
13670
|
-
case 'wide':
|
|
13671
|
-
case 'xl':
|
|
13672
|
-
case '100%':
|
|
13673
|
-
case '12':
|
|
13674
|
-
return 12;
|
|
13675
|
-
case 'half':
|
|
13676
|
-
case 'medium':
|
|
13677
|
-
case 'md':
|
|
13678
|
-
case '50%':
|
|
13679
|
-
case '6':
|
|
13680
|
-
return 6;
|
|
13681
|
-
case 'third':
|
|
13682
|
-
case 'small':
|
|
13683
|
-
case 'sm':
|
|
13684
|
-
case '33%':
|
|
13685
|
-
case '33.333%':
|
|
13686
|
-
case '4':
|
|
13687
|
-
return 4;
|
|
13688
|
-
case 'quarter':
|
|
13689
|
-
case 'compact':
|
|
13690
|
-
case 'xs':
|
|
13691
|
-
case '25%':
|
|
13692
|
-
case '3':
|
|
13693
|
-
return 3;
|
|
13694
|
-
default:
|
|
13695
|
-
return this.inferCompactPresentationSpan(field);
|
|
13696
|
-
}
|
|
13685
|
+
return (resolveExplicitFormGridSpan(field) ??
|
|
13686
|
+
this.inferCompactPresentationSpan(field));
|
|
13697
13687
|
}
|
|
13698
13688
|
inferCompactPresentationSpan(field) {
|
|
13699
13689
|
const controlType = String(field.controlType ?? '').toLowerCase();
|
|
@@ -14761,6 +14751,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
14761
14751
|
args: [{ providedIn: 'root' }]
|
|
14762
14752
|
}] });
|
|
14763
14753
|
|
|
14754
|
+
const GENERATED_LAYOUT_ENGINE_VERSION = 2;
|
|
14764
14755
|
function exactSchemaOperationId(schema, rootUi) {
|
|
14765
14756
|
const records = [rootUi, schema].filter((value) => !!value && typeof value === 'object' && !Array.isArray(value));
|
|
14766
14757
|
for (const record of records) {
|
|
@@ -17479,7 +17470,7 @@ class PraxisDynamicForm {
|
|
|
17479
17470
|
if (!current())
|
|
17480
17471
|
return;
|
|
17481
17472
|
const source = String(snapshot.metadata?.source || '').trim().toLowerCase();
|
|
17482
|
-
if (remote && source === 'default') {
|
|
17473
|
+
if (remote && (source === 'default' || source === 'schema')) {
|
|
17483
17474
|
this.effectiveConfig = normalizeFormConfig$1(remote);
|
|
17484
17475
|
this.columnFieldsCache.clear();
|
|
17485
17476
|
this.cdr.markForCheck();
|
|
@@ -17525,6 +17516,7 @@ class PraxisDynamicForm {
|
|
|
17525
17516
|
metadata: {
|
|
17526
17517
|
...(generatedConfig.metadata || {}),
|
|
17527
17518
|
...(hostConfig.metadata || {}),
|
|
17519
|
+
layoutEngineVersion: GENERATED_LAYOUT_ENGINE_VERSION,
|
|
17528
17520
|
},
|
|
17529
17521
|
});
|
|
17530
17522
|
}
|
|
@@ -17536,6 +17528,9 @@ class PraxisDynamicForm {
|
|
|
17536
17528
|
const configKey = this.formConfigKey();
|
|
17537
17529
|
if (!this.config.metadata)
|
|
17538
17530
|
this.config.metadata = {};
|
|
17531
|
+
if (this.isAutoGeneratedConfigSource(this.config.metadata?.source, true)) {
|
|
17532
|
+
this.config.metadata.layoutEngineVersion = GENERATED_LAYOUT_ENGINE_VERSION;
|
|
17533
|
+
}
|
|
17539
17534
|
if (this.lastSchemaMeta) {
|
|
17540
17535
|
this.config.metadata.schemaId = this.lastSchemaMeta.schemaId;
|
|
17541
17536
|
this.config.metadata.serverHash = this.lastSchemaMeta.serverHash;
|
|
@@ -17701,9 +17696,16 @@ class PraxisDynamicForm {
|
|
|
17701
17696
|
: field;
|
|
17702
17697
|
});
|
|
17703
17698
|
const effectivePolicy = this.layoutPolicy ??
|
|
17704
|
-
(this.
|
|
17705
|
-
? {
|
|
17706
|
-
|
|
17699
|
+
(this.mode === 'dossier'
|
|
17700
|
+
? {
|
|
17701
|
+
source: 'schema',
|
|
17702
|
+
intent: 'detail',
|
|
17703
|
+
preset: 'compactPresentation',
|
|
17704
|
+
detailSummary: { columns: 2 },
|
|
17705
|
+
}
|
|
17706
|
+
: this.effectiveReadonly || this.effectivePresentation
|
|
17707
|
+
? { source: 'schema', intent: 'detail', preset: 'default' }
|
|
17708
|
+
: { source: 'schema', intent: 'command', preset: 'groupedCommand' });
|
|
17707
17709
|
const materialized = materializeFormLayoutFromMetadata(customizedFields, {
|
|
17708
17710
|
policy: effectivePolicy,
|
|
17709
17711
|
formLayout: this.schemaRootFormLayout,
|
|
@@ -17733,6 +17735,13 @@ class PraxisDynamicForm {
|
|
|
17733
17735
|
},
|
|
17734
17736
|
});
|
|
17735
17737
|
}
|
|
17738
|
+
isAutoGeneratedConfigSource(source, allowEmpty = false) {
|
|
17739
|
+
const normalized = String(source ?? '').trim().toLowerCase();
|
|
17740
|
+
if (!normalized) {
|
|
17741
|
+
return allowEmpty;
|
|
17742
|
+
}
|
|
17743
|
+
return normalized === 'default' || normalized === 'schema';
|
|
17744
|
+
}
|
|
17736
17745
|
async reconcileLoadedConfigWithServerSchema(persistChanges = true) {
|
|
17737
17746
|
const cycle = this.schemaInitializationCycle;
|
|
17738
17747
|
const current = this.persistenceGuard(true);
|
|
@@ -17750,7 +17759,51 @@ class PraxisDynamicForm {
|
|
|
17750
17759
|
(rawCurrentConfig.formBlocksBefore?.nodes?.length ?? 0) > 0 ||
|
|
17751
17760
|
(rawCurrentConfig.formBlocksBeforeActions?.nodes?.length ?? 0) > 0 ||
|
|
17752
17761
|
(rawCurrentConfig.formBlocksAfter?.nodes?.length ?? 0) > 0;
|
|
17753
|
-
|
|
17762
|
+
const isGeneratedDefaultConfig = this.isAutoGeneratedConfigSource(rawCurrentConfig.metadata?.source, false);
|
|
17763
|
+
const storedLayoutEngineVersion = Number(rawCurrentConfig.metadata?.layoutEngineVersion ?? 0);
|
|
17764
|
+
const storedServerHash = rawCurrentConfig.metadata?.serverHash;
|
|
17765
|
+
const latestServerHash = this.lastSchemaMeta?.serverHash;
|
|
17766
|
+
const schemaHashChanged = Boolean(storedServerHash &&
|
|
17767
|
+
latestServerHash &&
|
|
17768
|
+
storedServerHash !== latestServerHash);
|
|
17769
|
+
const shouldRegenerateDefaultLayout = persistChanges &&
|
|
17770
|
+
isGeneratedDefaultConfig &&
|
|
17771
|
+
(storedLayoutEngineVersion < GENERATED_LAYOUT_ENGINE_VERSION ||
|
|
17772
|
+
schemaHashChanged);
|
|
17773
|
+
if (shouldRegenerateDefaultLayout) {
|
|
17774
|
+
const fieldMetadata = mapFieldDefinitionsToMetadata(serverDefs);
|
|
17775
|
+
if (this.shouldUseSchemaLayoutPolicy() || this.hasSchemaRootFormLayout()) {
|
|
17776
|
+
const regenerated = this.createSchemaMaterializedConfig({
|
|
17777
|
+
...rawCurrentConfig,
|
|
17778
|
+
sections: [],
|
|
17779
|
+
fieldMetadata: [],
|
|
17780
|
+
}, fieldMetadata);
|
|
17781
|
+
this.effectiveConfig = normalizeFormConfig$1({
|
|
17782
|
+
...regenerated,
|
|
17783
|
+
metadata: {
|
|
17784
|
+
...(regenerated.metadata || {}),
|
|
17785
|
+
source: regenerated.metadata?.source ?? 'schema',
|
|
17786
|
+
layoutEngineVersion: GENERATED_LAYOUT_ENGINE_VERSION,
|
|
17787
|
+
},
|
|
17788
|
+
});
|
|
17789
|
+
}
|
|
17790
|
+
else {
|
|
17791
|
+
const generatedConfig = this.dynamicLayout.generateFormConfigFromMetadata(fieldMetadata, { fieldsPerRow: 2, layoutPreset: this.generatedLayoutPreset });
|
|
17792
|
+
this.effectiveConfig = normalizeFormConfig$1({
|
|
17793
|
+
...generatedConfig,
|
|
17794
|
+
...rawCurrentConfig,
|
|
17795
|
+
sections: generatedConfig.sections,
|
|
17796
|
+
fieldMetadata: generatedConfig.fieldMetadata,
|
|
17797
|
+
metadata: {
|
|
17798
|
+
...(rawCurrentConfig.metadata || {}),
|
|
17799
|
+
...(generatedConfig.metadata || {}),
|
|
17800
|
+
source: 'default',
|
|
17801
|
+
layoutEngineVersion: GENERATED_LAYOUT_ENGINE_VERSION,
|
|
17802
|
+
},
|
|
17803
|
+
});
|
|
17804
|
+
}
|
|
17805
|
+
}
|
|
17806
|
+
else if (!persistChanges &&
|
|
17754
17807
|
!hasAuthoredOrVisualLayout &&
|
|
17755
17808
|
(this.shouldUseSchemaLayoutPolicy() || this.hasSchemaRootFormLayout())) {
|
|
17756
17809
|
this.effectiveConfig = this.createSchemaMaterializedConfig(rawCurrentConfig, mapFieldDefinitionsToMetadata(serverDefs));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dynamic-form",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.85",
|
|
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": "^21.0.0",
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"@angular/forms": "^21.0.0",
|
|
10
10
|
"@angular/material": "^21.0.0",
|
|
11
11
|
"@angular/router": "^21.0.0",
|
|
12
|
-
"@praxisui/ai": "^10.0.0-rc.
|
|
13
|
-
"@praxisui/dynamic-fields": "^10.0.0-rc.
|
|
14
|
-
"@praxisui/metadata-editor": "^10.0.0-rc.
|
|
15
|
-
"@praxisui/rich-content": "^10.0.0-rc.
|
|
16
|
-
"@praxisui/settings-panel": "^10.0.0-rc.
|
|
17
|
-
"@praxisui/visual-builder": "^10.0.0-rc.
|
|
18
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
12
|
+
"@praxisui/ai": "^10.0.0-rc.85",
|
|
13
|
+
"@praxisui/dynamic-fields": "^10.0.0-rc.85",
|
|
14
|
+
"@praxisui/metadata-editor": "^10.0.0-rc.85",
|
|
15
|
+
"@praxisui/rich-content": "^10.0.0-rc.85",
|
|
16
|
+
"@praxisui/settings-panel": "^10.0.0-rc.85",
|
|
17
|
+
"@praxisui/visual-builder": "^10.0.0-rc.85",
|
|
18
|
+
"@praxisui/core": "^10.0.0-rc.85",
|
|
19
19
|
"rxjs": "^7.8.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
@@ -225,6 +225,7 @@ declare class DynamicFormLayoutService {
|
|
|
225
225
|
}): LayoutResult;
|
|
226
226
|
private resolvePath;
|
|
227
227
|
resolvePathByIds(config: FormConfig, ids: IdPath): FieldPath;
|
|
228
|
+
private isFieldHiddenFromLayout;
|
|
228
229
|
private resolveExplicitColSpan;
|
|
229
230
|
private createRowsFromFields;
|
|
230
231
|
private createCompactPresentationRowsFromFields;
|
|
@@ -1397,6 +1398,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy, PraxisR
|
|
|
1397
1398
|
private layoutPolicyRequestsPresentation;
|
|
1398
1399
|
private shouldPersistGeneratedConfig;
|
|
1399
1400
|
private createSchemaMaterializedConfig;
|
|
1401
|
+
private isAutoGeneratedConfigSource;
|
|
1400
1402
|
private reconcileLoadedConfigWithServerSchema;
|
|
1401
1403
|
private hostConfigHasAuthoredLocalFieldsNotInLocalConfig;
|
|
1402
1404
|
private syncWithServer;
|