@ng-forge/dynamic-forms 1.0.0 → 1.1.0-next.2
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/fesm2022/{ng-forge-dynamic-forms-array-field.component-CIheZh11.mjs → ng-forge-dynamic-forms-array-field.component-CftX-bCB.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-array-field.component-CIheZh11.mjs.map → ng-forge-dynamic-forms-array-field.component-CftX-bCB.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-C9aVachF.mjs → ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-CFSJLZPZ.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-C9aVachF.mjs.map → ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-CFSJLZPZ.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-container-field.component-DNafCSO8.mjs → ng-forge-dynamic-forms-container-field.component-B_bQ-f2g.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-container-field.component-DNafCSO8.mjs.map → ng-forge-dynamic-forms-container-field.component-B_bQ-f2g.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-css-wrapper.component-BmHGlmES.mjs → ng-forge-dynamic-forms-css-wrapper.component-D_yRuLpu.mjs} +4 -3
- package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-D_yRuLpu.mjs.map +1 -0
- package/fesm2022/{ng-forge-dynamic-forms-group-field.component-CKVIw2K5.mjs → ng-forge-dynamic-forms-group-field.component-Bl9WRPvF.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-group-field.component-CKVIw2K5.mjs.map → ng-forge-dynamic-forms-group-field.component-Bl9WRPvF.mjs.map} +1 -1
- package/fesm2022/ng-forge-dynamic-forms-integration.mjs +48 -18
- package/fesm2022/ng-forge-dynamic-forms-integration.mjs.map +1 -1
- package/fesm2022/ng-forge-dynamic-forms-internal.mjs +77 -35
- package/fesm2022/ng-forge-dynamic-forms-internal.mjs.map +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-ng-forge-dynamic-forms-CBawLbtp.mjs → ng-forge-dynamic-forms-ng-forge-dynamic-forms-fMB33l2f.mjs} +22 -14
- package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-fMB33l2f.mjs.map +1 -0
- package/fesm2022/{ng-forge-dynamic-forms-page-field.component-BRixkgyS.mjs → ng-forge-dynamic-forms-page-field.component-C9bQkVjQ.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-page-field.component-BRixkgyS.mjs.map → ng-forge-dynamic-forms-page-field.component-C9bQkVjQ.mjs.map} +1 -1
- package/fesm2022/ng-forge-dynamic-forms.mjs +1 -1
- package/package.json +1 -1
- package/types/ng-forge-dynamic-forms-integration.d.ts +28 -2
- package/types/ng-forge-dynamic-forms-internal.d.ts +35 -3
- package/fesm2022/ng-forge-dynamic-forms-css-wrapper.component-BmHGlmES.mjs.map +0 -1
- package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-CBawLbtp.mjs.map +0 -1
|
@@ -822,11 +822,11 @@ class PageOrchestratorComponent {
|
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
824
|
`, isInline: true, styles: [":host{display:block;position:relative;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [/* @ts-ignore */
|
|
825
|
-
import('./ng-forge-dynamic-forms-page-field.component-
|
|
826
|
-
import('./ng-forge-dynamic-forms-page-field.component-
|
|
825
|
+
import('./ng-forge-dynamic-forms-page-field.component-C9bQkVjQ.mjs').then(m => m.default)], () => [/* @ts-ignore */
|
|
826
|
+
import('./ng-forge-dynamic-forms-page-field.component-C9bQkVjQ.mjs').then(m => m.default)]] });
|
|
827
827
|
}
|
|
828
828
|
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.1", ngImport: i0, type: PageOrchestratorComponent, resolveDeferredDeps: () => [/* @ts-ignore */
|
|
829
|
-
import('./ng-forge-dynamic-forms-page-field.component-
|
|
829
|
+
import('./ng-forge-dynamic-forms-page-field.component-C9bQkVjQ.mjs').then(m => m.default)], resolveMetadata: PageFieldComponent => ({ decorators: [{
|
|
830
830
|
type: Component,
|
|
831
831
|
args: [{ selector: 'div[page-orchestrator]', imports: [PageFieldComponent], template: `
|
|
832
832
|
@for (pageField of pageFields(); track pageField.key; let i = $index) {
|
|
@@ -1872,10 +1872,14 @@ function evaluateBuiltInCrossFieldValidator(config, evaluationContext, sourceFie
|
|
|
1872
1872
|
logger.warn(`Cross-field validator references non-existent field "${sourceFieldKey}"`);
|
|
1873
1873
|
return null;
|
|
1874
1874
|
}
|
|
1875
|
-
|
|
1875
|
+
const errorObj = {
|
|
1876
1876
|
kind: config.type,
|
|
1877
1877
|
fieldTree: targetField,
|
|
1878
1878
|
};
|
|
1879
|
+
if ('value' in config && config.value !== undefined) {
|
|
1880
|
+
errorObj[config.type] = config.value;
|
|
1881
|
+
}
|
|
1882
|
+
return errorObj;
|
|
1879
1883
|
}
|
|
1880
1884
|
function applyBuiltInValidationLogic(config, fieldValue) {
|
|
1881
1885
|
switch (config.type) {
|
|
@@ -3932,16 +3936,20 @@ class FormStateManager {
|
|
|
3932
3936
|
this.deps.value.set(value);
|
|
3933
3937
|
}
|
|
3934
3938
|
reset() {
|
|
3939
|
+
const rootField = this.form()();
|
|
3935
3940
|
this.excludedValueStore.set({});
|
|
3936
3941
|
const defaults = this.defaultValues();
|
|
3937
|
-
|
|
3942
|
+
rootField.value.set(defaults);
|
|
3938
3943
|
this.deps.value.set(defaults);
|
|
3944
|
+
rootField.reset();
|
|
3939
3945
|
}
|
|
3940
3946
|
clear() {
|
|
3947
|
+
const rootField = this.form()();
|
|
3941
3948
|
this.excludedValueStore.set({});
|
|
3942
3949
|
const emptyValue = {};
|
|
3943
|
-
|
|
3950
|
+
rootField.value.set(emptyValue);
|
|
3944
3951
|
this.deps.value.set(emptyValue);
|
|
3952
|
+
rootField.reset();
|
|
3945
3953
|
}
|
|
3946
3954
|
submit() {
|
|
3947
3955
|
this.eventBus.dispatch(FormSubmitEvent);
|
|
@@ -4172,7 +4180,7 @@ function createDerivationRenderGate() {
|
|
|
4172
4180
|
if (!has || engine() !== 'idle')
|
|
4173
4181
|
return;
|
|
4174
4182
|
engine.set('loading');
|
|
4175
|
-
pendingTasks.run(() => import('./ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-
|
|
4183
|
+
pendingTasks.run(() => import('./ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-CFSJLZPZ.mjs')
|
|
4176
4184
|
.then(({ bootstrapDerivationOrchestrator }) => {
|
|
4177
4185
|
runInInjectionContext(injector, () => bootstrapDerivationOrchestrator());
|
|
4178
4186
|
engine.set('wired');
|
|
@@ -4671,28 +4679,28 @@ const DISPLAY_FIELD_TYPES_BASE = {
|
|
|
4671
4679
|
const BUILT_IN_FIELDS = [
|
|
4672
4680
|
{
|
|
4673
4681
|
name: 'row',
|
|
4674
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-container-field.component-
|
|
4682
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-container-field.component-B_bQ-f2g.mjs'),
|
|
4675
4683
|
mapper: rowFieldMapper,
|
|
4676
4684
|
valueHandling: 'flatten',
|
|
4677
4685
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
4678
4686
|
},
|
|
4679
4687
|
{
|
|
4680
4688
|
name: 'group',
|
|
4681
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-group-field.component-
|
|
4689
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-group-field.component-Bl9WRPvF.mjs'),
|
|
4682
4690
|
mapper: groupFieldMapper,
|
|
4683
4691
|
valueHandling: 'include',
|
|
4684
4692
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
4685
4693
|
},
|
|
4686
4694
|
{
|
|
4687
4695
|
name: 'array',
|
|
4688
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-array-field.component-
|
|
4696
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-array-field.component-CftX-bCB.mjs'),
|
|
4689
4697
|
mapper: arrayFieldMapper,
|
|
4690
4698
|
valueHandling: 'include',
|
|
4691
4699
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
4692
4700
|
},
|
|
4693
4701
|
{
|
|
4694
4702
|
name: 'page',
|
|
4695
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-page-field.component-
|
|
4703
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-page-field.component-C9bQkVjQ.mjs'),
|
|
4696
4704
|
mapper: pageFieldMapper,
|
|
4697
4705
|
valueHandling: 'flatten',
|
|
4698
4706
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
@@ -4710,7 +4718,7 @@ const BUILT_IN_FIELDS = [
|
|
|
4710
4718
|
},
|
|
4711
4719
|
{
|
|
4712
4720
|
name: 'container',
|
|
4713
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-container-field.component-
|
|
4721
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-container-field.component-B_bQ-f2g.mjs'),
|
|
4714
4722
|
mapper: containerFieldMapper,
|
|
4715
4723
|
valueHandling: 'flatten',
|
|
4716
4724
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
@@ -4719,7 +4727,7 @@ const BUILT_IN_FIELDS = [
|
|
|
4719
4727
|
const BUILT_IN_WRAPPERS = [
|
|
4720
4728
|
{
|
|
4721
4729
|
wrapperName: 'css',
|
|
4722
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-css-wrapper.component-
|
|
4730
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-css-wrapper.component-D_yRuLpu.mjs'),
|
|
4723
4731
|
},
|
|
4724
4732
|
{
|
|
4725
4733
|
wrapperName: 'row',
|
|
@@ -5114,4 +5122,4 @@ function arrayEvent(arrayKey) {
|
|
|
5114
5122
|
|
|
5115
5123
|
|
|
5116
5124
|
export { withValueExclusionDefaults as $, ArrayItemRegistryService as A, BUILT_IN_FIELDS as B, CONTAINER_FIELD_PROCESSORS as C, DfFieldOutlet as D, EventDispatcher as E, FormStateManager as F, PrependArrayItemEvent as G, PreviousPageEvent as H, InsertArrayItemEvent as I, TextAddonComponent as J, arrayEvent as K, createWrappers as L, MoveArrayItemEvent as M, NextPageEvent as N, isWrappersBundle as O, PROPERTY_OVERRIDE_STORE as P, provideDynamicForm as Q, RemoveAtIndexEvent as R, ShiftArrayItemEvent as S, TemplateAddonComponent as T, sanitizeFormConfig as U, withAddonActions as V, withCustomAddon as W, withEventFormValue as X, withLegacyStatusClasses as Y, withLoggerConfig as Z, withValidationExecutionDefaults as _, isSameWrapperChain as a, wrapperProps as a0, createWrapperChainController as b, createFieldResolutionPipe as c, createSchemaFromFields as d, createHiddenSignal as e, createRenderReadySignal as f, getNormalizedArrayMetadata as g, getFieldDefaultValue as h, injectFieldRegistry as i, DEV_MODE as j, DEFAULT_DEBOUNCE_MS as k, DERIVATION_WARNING_TRACKER as l, mapFieldToInputs as m, DERIVATION_LOG_CONFIG as n, AppendArrayItemEvent as o, ComponentAddonComponent as p, ConsoleLogger as q, resolveWrappers as r, DfTemplate as s, traverseFieldsWithContext as t, DynamicForm as u, FormClearEvent as v, FormResetEvent as w, FormSubmitEvent as x, PageChangeEvent as y, PopArrayItemEvent as z };
|
|
5117
|
-
//# sourceMappingURL=ng-forge-dynamic-forms-ng-forge-dynamic-forms-
|
|
5125
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-ng-forge-dynamic-forms-fMB33l2f.mjs.map
|