@ng-forge/dynamic-forms 1.2.0-next.2 → 1.2.0-next.4
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-B5t7W5fo.mjs → ng-forge-dynamic-forms-array-field.component-BLPWSurR.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-array-field.component-B5t7W5fo.mjs.map → ng-forge-dynamic-forms-array-field.component-BLPWSurR.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-D_DGkAXj.mjs → ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-jHiY95pr.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-D_DGkAXj.mjs.map → ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-jHiY95pr.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-container-field.component-CrWGMLMJ.mjs → ng-forge-dynamic-forms-container-field.component-ug5tp6kt.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-container-field.component-CrWGMLMJ.mjs.map → ng-forge-dynamic-forms-container-field.component-ug5tp6kt.mjs.map} +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-group-field.component-Ds_k0Tkn.mjs → ng-forge-dynamic-forms-group-field.component-DyD00a1U.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-group-field.component-Ds_k0Tkn.mjs.map → ng-forge-dynamic-forms-group-field.component-DyD00a1U.mjs.map} +1 -1
- package/fesm2022/ng-forge-dynamic-forms-internal.mjs +4 -5
- package/fesm2022/ng-forge-dynamic-forms-internal.mjs.map +1 -1
- package/fesm2022/{ng-forge-dynamic-forms-ng-forge-dynamic-forms-DtnrCyH2.mjs → ng-forge-dynamic-forms-ng-forge-dynamic-forms-BGRxIQ2V.mjs} +166 -145
- package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-BGRxIQ2V.mjs.map +1 -0
- package/fesm2022/{ng-forge-dynamic-forms-page-field.component-PWJ-9bnw.mjs → ng-forge-dynamic-forms-page-field.component-B7A2v1vN.mjs} +2 -2
- package/fesm2022/{ng-forge-dynamic-forms-page-field.component-PWJ-9bnw.mjs.map → ng-forge-dynamic-forms-page-field.component-B7A2v1vN.mjs.map} +1 -1
- package/fesm2022/ng-forge-dynamic-forms.mjs +1 -1
- package/package.json +1 -1
- package/types/ng-forge-dynamic-forms.d.ts +36 -14
- package/fesm2022/ng-forge-dynamic-forms-ng-forge-dynamic-forms-DtnrCyH2.mjs.map +0 -1
|
@@ -403,14 +403,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
403
403
|
}]
|
|
404
404
|
}], ctorParameters: () => [], propDecorators: { dfFieldOutlet: [{ type: i0.Input, args: [{ isSignal: true, alias: "dfFieldOutlet", required: true }] }], dfFieldOutletEnvironmentInjector: [{ type: i0.Input, args: [{ isSignal: true, alias: "dfFieldOutletEnvironmentInjector", required: false }] }] } });
|
|
405
405
|
|
|
406
|
+
function isTreeValidationErrors(result) {
|
|
407
|
+
const isError = (v) => typeof v === 'object' && v !== null && 'kind' in v;
|
|
408
|
+
return Array.isArray(result) ? result.every(isError) && result.length > 0 : isError(result);
|
|
409
|
+
}
|
|
406
410
|
function wrapSubmissionAction(action) {
|
|
407
411
|
return async (formTree) => {
|
|
408
412
|
const result = action(formTree);
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
return;
|
|
412
|
-
}
|
|
413
|
-
await Promise.resolve(result);
|
|
413
|
+
const resolved = isObservable(result) ? await firstValueFrom(result) : await Promise.resolve(result);
|
|
414
|
+
return isTreeValidationErrors(resolved) ? resolved : undefined;
|
|
414
415
|
};
|
|
415
416
|
}
|
|
416
417
|
function createSubmissionHandler(options) {
|
|
@@ -436,10 +437,6 @@ class FormSubmitEvent {
|
|
|
436
437
|
type = 'submit';
|
|
437
438
|
}
|
|
438
439
|
|
|
439
|
-
class NextPageEvent {
|
|
440
|
-
type = 'next-page';
|
|
441
|
-
}
|
|
442
|
-
|
|
443
440
|
class PageChangeEvent {
|
|
444
441
|
currentPageIndex;
|
|
445
442
|
totalPages;
|
|
@@ -455,105 +452,9 @@ class PageChangeEvent {
|
|
|
455
452
|
}
|
|
456
453
|
}
|
|
457
454
|
|
|
458
|
-
class
|
|
459
|
-
type = 'previous-page';
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
class FormResetEvent {
|
|
463
|
-
type = 'form-reset';
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
class FormClearEvent {
|
|
467
|
-
type = 'form-clear';
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
class AppendArrayItemEvent {
|
|
471
|
-
arrayKey;
|
|
472
|
-
template;
|
|
473
|
-
type = 'append-array-item';
|
|
474
|
-
constructor(
|
|
475
|
-
arrayKey,
|
|
476
|
-
template) {
|
|
477
|
-
this.arrayKey = arrayKey;
|
|
478
|
-
this.template = template;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
class PrependArrayItemEvent {
|
|
483
|
-
arrayKey;
|
|
484
|
-
template;
|
|
485
|
-
type = 'prepend-array-item';
|
|
486
|
-
constructor(
|
|
487
|
-
arrayKey,
|
|
488
|
-
template) {
|
|
489
|
-
this.arrayKey = arrayKey;
|
|
490
|
-
this.template = template;
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
class InsertArrayItemEvent {
|
|
495
|
-
arrayKey;
|
|
496
|
-
index;
|
|
497
|
-
template;
|
|
498
|
-
type = 'insert-array-item';
|
|
499
|
-
constructor(
|
|
500
|
-
arrayKey,
|
|
501
|
-
index,
|
|
502
|
-
template) {
|
|
503
|
-
this.arrayKey = arrayKey;
|
|
504
|
-
this.index = index;
|
|
505
|
-
this.template = template;
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
class PopArrayItemEvent {
|
|
510
|
-
arrayKey;
|
|
511
|
-
type = 'pop-array-item';
|
|
512
|
-
constructor(
|
|
513
|
-
arrayKey) {
|
|
514
|
-
this.arrayKey = arrayKey;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
class ShiftArrayItemEvent {
|
|
519
|
-
arrayKey;
|
|
520
|
-
type = 'shift-array-item';
|
|
521
|
-
constructor(
|
|
522
|
-
arrayKey) {
|
|
523
|
-
this.arrayKey = arrayKey;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
class MoveArrayItemEvent {
|
|
528
|
-
arrayKey;
|
|
529
|
-
fromIndex;
|
|
530
|
-
toIndex;
|
|
531
|
-
type = 'move-array-item';
|
|
532
|
-
constructor(
|
|
533
|
-
arrayKey,
|
|
534
|
-
fromIndex,
|
|
535
|
-
toIndex) {
|
|
536
|
-
this.arrayKey = arrayKey;
|
|
537
|
-
this.fromIndex = fromIndex;
|
|
538
|
-
this.toIndex = toIndex;
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
class RemoveAtIndexEvent {
|
|
543
|
-
arrayKey;
|
|
544
|
-
index;
|
|
545
|
-
type = 'remove-at-index';
|
|
546
|
-
constructor(
|
|
547
|
-
arrayKey,
|
|
548
|
-
index) {
|
|
549
|
-
this.arrayKey = arrayKey;
|
|
550
|
-
this.index = index;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
class PageNavigationStateChangeEvent {
|
|
455
|
+
class PagerStateEvent {
|
|
555
456
|
state;
|
|
556
|
-
type = '
|
|
457
|
+
type = 'pager-state';
|
|
557
458
|
constructor(state) {
|
|
558
459
|
this.state = state;
|
|
559
460
|
}
|
|
@@ -614,20 +515,18 @@ class PageOrchestratorComponent {
|
|
|
614
515
|
totalPages,
|
|
615
516
|
isFirstPage: isFirstVisiblePage,
|
|
616
517
|
isLastPage: isLastVisiblePage,
|
|
617
|
-
navigationDisabled: false,
|
|
618
518
|
};
|
|
619
519
|
}, /* @ts-ignore */
|
|
620
520
|
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
621
|
-
currentPageValid = computed(() =>
|
|
622
|
-
|
|
521
|
+
currentPageValid = computed(() => this.isPageValid(this.currentPageIndex()), /* @ts-ignore */
|
|
522
|
+
...(ngDevMode ? [{ debugName: "currentPageValid" }] : /* istanbul ignore next */ []));
|
|
523
|
+
isPageValid(pageIndex) {
|
|
623
524
|
const pages = this.pageFields();
|
|
624
525
|
const form = this.form();
|
|
625
|
-
|
|
526
|
+
if (pageIndex < 0 || pageIndex >= pages.length) {
|
|
626
527
|
return true;
|
|
627
528
|
}
|
|
628
|
-
|
|
629
|
-
const pageFields = currentPage.fields || [];
|
|
630
|
-
const leafKeys = collectLeafFieldKeys(pageFields);
|
|
529
|
+
const leafKeys = collectLeafFieldKeys(pages[pageIndex].fields || []);
|
|
631
530
|
for (const fieldKey of leafKeys) {
|
|
632
531
|
const field = form[fieldKey];
|
|
633
532
|
if (field && typeof field === 'function') {
|
|
@@ -638,8 +537,7 @@ class PageOrchestratorComponent {
|
|
|
638
537
|
}
|
|
639
538
|
}
|
|
640
539
|
return true;
|
|
641
|
-
}
|
|
642
|
-
...(ngDevMode ? [{ debugName: "currentPageValid" }] : /* istanbul ignore next */ []));
|
|
540
|
+
}
|
|
643
541
|
extendedFieldSignalContext = computed(() => ({
|
|
644
542
|
...this.fieldSignalContext(),
|
|
645
543
|
currentPageValid: this.currentPageValid,
|
|
@@ -660,7 +558,7 @@ class PageOrchestratorComponent {
|
|
|
660
558
|
if (currentVisiblePosition === -1 && visibleIndices.length > 0) {
|
|
661
559
|
const nearest = this.findNearestVisiblePage(state.currentPageIndex, visibleIndices);
|
|
662
560
|
if (nearest !== -1) {
|
|
663
|
-
this.
|
|
561
|
+
this.executePageChange(nearest);
|
|
664
562
|
}
|
|
665
563
|
}
|
|
666
564
|
});
|
|
@@ -682,13 +580,6 @@ class PageOrchestratorComponent {
|
|
|
682
580
|
newPageIndex: currentState.currentPageIndex,
|
|
683
581
|
error: 'Already on the last visible page',
|
|
684
582
|
};
|
|
685
|
-
}
|
|
686
|
-
if (currentState.navigationDisabled) {
|
|
687
|
-
return {
|
|
688
|
-
success: false,
|
|
689
|
-
newPageIndex: currentState.currentPageIndex,
|
|
690
|
-
error: 'Navigation is currently disabled',
|
|
691
|
-
};
|
|
692
583
|
}
|
|
693
584
|
const currentVisiblePosition = visibleIndices.indexOf(currentState.currentPageIndex);
|
|
694
585
|
if (currentVisiblePosition === -1 || currentVisiblePosition >= visibleIndices.length - 1) {
|
|
@@ -699,7 +590,7 @@ class PageOrchestratorComponent {
|
|
|
699
590
|
};
|
|
700
591
|
}
|
|
701
592
|
const nextVisiblePageIndex = visibleIndices[currentVisiblePosition + 1];
|
|
702
|
-
return this.
|
|
593
|
+
return this.executePageChange(nextVisiblePageIndex);
|
|
703
594
|
}
|
|
704
595
|
navigateToPreviousPage() {
|
|
705
596
|
const currentState = this.state();
|
|
@@ -710,13 +601,6 @@ class PageOrchestratorComponent {
|
|
|
710
601
|
newPageIndex: currentState.currentPageIndex,
|
|
711
602
|
error: 'Already on the first visible page',
|
|
712
603
|
};
|
|
713
|
-
}
|
|
714
|
-
if (currentState.navigationDisabled) {
|
|
715
|
-
return {
|
|
716
|
-
success: false,
|
|
717
|
-
newPageIndex: currentState.currentPageIndex,
|
|
718
|
-
error: 'Navigation is currently disabled',
|
|
719
|
-
};
|
|
720
604
|
}
|
|
721
605
|
const currentVisiblePosition = visibleIndices.indexOf(currentState.currentPageIndex);
|
|
722
606
|
if (currentVisiblePosition <= 0) {
|
|
@@ -727,9 +611,31 @@ class PageOrchestratorComponent {
|
|
|
727
611
|
};
|
|
728
612
|
}
|
|
729
613
|
const prevVisiblePageIndex = visibleIndices[currentVisiblePosition - 1];
|
|
730
|
-
return this.
|
|
614
|
+
return this.executePageChange(prevVisiblePageIndex);
|
|
731
615
|
}
|
|
732
616
|
navigateToPage(pageIndex) {
|
|
617
|
+
const currentIndex = this.state().currentPageIndex;
|
|
618
|
+
const visibleIndices = this.visiblePageIndices();
|
|
619
|
+
if (pageIndex <= currentIndex || !visibleIndices.includes(pageIndex)) {
|
|
620
|
+
return this.executePageChange(pageIndex);
|
|
621
|
+
}
|
|
622
|
+
const disableWhenPageInvalid = this.formOptions?.()?.nextButton?.disableWhenPageInvalid ?? true;
|
|
623
|
+
if (!disableWhenPageInvalid) {
|
|
624
|
+
return this.executePageChange(pageIndex);
|
|
625
|
+
}
|
|
626
|
+
const crossedPages = visibleIndices.filter((index) => index >= currentIndex && index < pageIndex);
|
|
627
|
+
const firstInvalidPage = crossedPages.find((index) => !this.isPageValid(index));
|
|
628
|
+
if (firstInvalidPage === undefined) {
|
|
629
|
+
return this.executePageChange(pageIndex);
|
|
630
|
+
}
|
|
631
|
+
this.executePageChange(firstInvalidPage);
|
|
632
|
+
return {
|
|
633
|
+
success: false,
|
|
634
|
+
newPageIndex: firstInvalidPage,
|
|
635
|
+
error: `Cannot navigate to page ${pageIndex}: page ${firstInvalidPage} has invalid fields`,
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
executePageChange(pageIndex) {
|
|
733
639
|
const currentState = this.state();
|
|
734
640
|
const totalPages = currentState.totalPages;
|
|
735
641
|
if (pageIndex < 0 || pageIndex >= totalPages) {
|
|
@@ -786,7 +692,13 @@ class PageOrchestratorComponent {
|
|
|
786
692
|
.subscribe(() => {
|
|
787
693
|
this.navigateToPreviousPage();
|
|
788
694
|
});
|
|
789
|
-
|
|
695
|
+
this.eventBus
|
|
696
|
+
.on('go-to-page')
|
|
697
|
+
.pipe(takeUntilDestroyed())
|
|
698
|
+
.subscribe((event) => {
|
|
699
|
+
this.navigateToPage(event.pageIndex);
|
|
700
|
+
});
|
|
701
|
+
explicitEffect([this.state], ([state]) => this.eventBus.dispatch(PagerStateEvent, state));
|
|
790
702
|
}
|
|
791
703
|
evaluatePageHidden(page) {
|
|
792
704
|
if (!page.logic || page.logic.length === 0) {
|
|
@@ -862,10 +774,10 @@ class PageOrchestratorComponent {
|
|
|
862
774
|
}
|
|
863
775
|
}
|
|
864
776
|
`, isInline: true, styles: [":host{display:block;position:relative;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [/* @ts-ignore */
|
|
865
|
-
import('./ng-forge-dynamic-forms-page-field.component-
|
|
777
|
+
import('./ng-forge-dynamic-forms-page-field.component-B7A2v1vN.mjs').then(m => m.default)]] });
|
|
866
778
|
}
|
|
867
779
|
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.1", ngImport: i0, type: PageOrchestratorComponent, resolveDeferredDeps: () => [/* @ts-ignore */
|
|
868
|
-
import('./ng-forge-dynamic-forms-page-field.component-
|
|
780
|
+
import('./ng-forge-dynamic-forms-page-field.component-B7A2v1vN.mjs').then(m => m.default)], resolveMetadata: PageFieldComponent => ({ decorators: [{
|
|
869
781
|
type: Component,
|
|
870
782
|
args: [{ selector: 'div[page-orchestrator]', imports: [PageFieldComponent], template: `
|
|
871
783
|
@for (pageField of pageFields(); track pageField.key; let i = $index) {
|
|
@@ -3879,7 +3791,7 @@ function createDerivationRenderGate() {
|
|
|
3879
3791
|
if (!has || engine() !== 'idle')
|
|
3880
3792
|
return;
|
|
3881
3793
|
engine.set('loading');
|
|
3882
|
-
pendingTasks.run(() => import('./ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-
|
|
3794
|
+
pendingTasks.run(() => import('./ng-forge-dynamic-forms-bootstrap-derivation-orchestrator-jHiY95pr.mjs')
|
|
3883
3795
|
.then(({ bootstrapDerivationOrchestrator }) => {
|
|
3884
3796
|
runInInjectionContext(injector, () => bootstrapDerivationOrchestrator());
|
|
3885
3797
|
engine.set('wired');
|
|
@@ -4210,7 +4122,7 @@ class DynamicForm {
|
|
|
4210
4122
|
events = outputFromObservable(this.eventBus.events$);
|
|
4211
4123
|
initialized = outputFromObservable(this.initialized$);
|
|
4212
4124
|
onPageChange = outputFromObservable(this.eventBus.on('page-change'));
|
|
4213
|
-
onPageNavigationStateChange = outputFromObservable(this.eventBus.on('
|
|
4125
|
+
onPageNavigationStateChange = outputFromObservable(this.eventBus.on('pager-state'));
|
|
4214
4126
|
constructor() {
|
|
4215
4127
|
this.dispatcher?.connect(this.eventBus);
|
|
4216
4128
|
this.destroyRef.onDestroy(() => this.dispatcher?.disconnect());
|
|
@@ -4434,28 +4346,28 @@ const DISPLAY_FIELD_TYPES_BASE = {
|
|
|
4434
4346
|
const BUILT_IN_FIELDS = [
|
|
4435
4347
|
{
|
|
4436
4348
|
name: 'row',
|
|
4437
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-container-field.component-
|
|
4349
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-container-field.component-ug5tp6kt.mjs'),
|
|
4438
4350
|
mapper: rowFieldMapper,
|
|
4439
4351
|
valueHandling: 'flatten',
|
|
4440
4352
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
4441
4353
|
},
|
|
4442
4354
|
{
|
|
4443
4355
|
name: 'group',
|
|
4444
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-group-field.component-
|
|
4356
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-group-field.component-DyD00a1U.mjs'),
|
|
4445
4357
|
mapper: groupFieldMapper,
|
|
4446
4358
|
valueHandling: 'include',
|
|
4447
4359
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
4448
4360
|
},
|
|
4449
4361
|
{
|
|
4450
4362
|
name: 'array',
|
|
4451
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-array-field.component-
|
|
4363
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-array-field.component-BLPWSurR.mjs'),
|
|
4452
4364
|
mapper: arrayFieldMapper,
|
|
4453
4365
|
valueHandling: 'include',
|
|
4454
4366
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
4455
4367
|
},
|
|
4456
4368
|
{
|
|
4457
4369
|
name: 'page',
|
|
4458
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-page-field.component-
|
|
4370
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-page-field.component-B7A2v1vN.mjs'),
|
|
4459
4371
|
mapper: pageFieldMapper,
|
|
4460
4372
|
valueHandling: 'flatten',
|
|
4461
4373
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
@@ -4473,7 +4385,7 @@ const BUILT_IN_FIELDS = [
|
|
|
4473
4385
|
},
|
|
4474
4386
|
{
|
|
4475
4387
|
name: 'container',
|
|
4476
|
-
loadComponent: () => import('./ng-forge-dynamic-forms-container-field.component-
|
|
4388
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-container-field.component-ug5tp6kt.mjs'),
|
|
4477
4389
|
mapper: containerFieldMapper,
|
|
4478
4390
|
valueHandling: 'flatten',
|
|
4479
4391
|
...CONTAINER_FIELD_TYPES_BASE,
|
|
@@ -4875,6 +4787,115 @@ function sanitizeFormConfigPure(config, fieldRegistry, typeRegistry, options = {
|
|
|
4875
4787
|
return { sanitized: { ...config, fields: fields }, warnings };
|
|
4876
4788
|
}
|
|
4877
4789
|
|
|
4790
|
+
class GoToPageEvent {
|
|
4791
|
+
pageIndex;
|
|
4792
|
+
type = 'go-to-page';
|
|
4793
|
+
constructor(
|
|
4794
|
+
pageIndex) {
|
|
4795
|
+
this.pageIndex = pageIndex;
|
|
4796
|
+
}
|
|
4797
|
+
}
|
|
4798
|
+
|
|
4799
|
+
class NextPageEvent {
|
|
4800
|
+
type = 'next-page';
|
|
4801
|
+
}
|
|
4802
|
+
|
|
4803
|
+
class PreviousPageEvent {
|
|
4804
|
+
type = 'previous-page';
|
|
4805
|
+
}
|
|
4806
|
+
|
|
4807
|
+
class FormResetEvent {
|
|
4808
|
+
type = 'form-reset';
|
|
4809
|
+
}
|
|
4810
|
+
|
|
4811
|
+
class FormClearEvent {
|
|
4812
|
+
type = 'form-clear';
|
|
4813
|
+
}
|
|
4814
|
+
|
|
4815
|
+
class AppendArrayItemEvent {
|
|
4816
|
+
arrayKey;
|
|
4817
|
+
template;
|
|
4818
|
+
type = 'append-array-item';
|
|
4819
|
+
constructor(
|
|
4820
|
+
arrayKey,
|
|
4821
|
+
template) {
|
|
4822
|
+
this.arrayKey = arrayKey;
|
|
4823
|
+
this.template = template;
|
|
4824
|
+
}
|
|
4825
|
+
}
|
|
4826
|
+
|
|
4827
|
+
class PrependArrayItemEvent {
|
|
4828
|
+
arrayKey;
|
|
4829
|
+
template;
|
|
4830
|
+
type = 'prepend-array-item';
|
|
4831
|
+
constructor(
|
|
4832
|
+
arrayKey,
|
|
4833
|
+
template) {
|
|
4834
|
+
this.arrayKey = arrayKey;
|
|
4835
|
+
this.template = template;
|
|
4836
|
+
}
|
|
4837
|
+
}
|
|
4838
|
+
|
|
4839
|
+
class InsertArrayItemEvent {
|
|
4840
|
+
arrayKey;
|
|
4841
|
+
index;
|
|
4842
|
+
template;
|
|
4843
|
+
type = 'insert-array-item';
|
|
4844
|
+
constructor(
|
|
4845
|
+
arrayKey,
|
|
4846
|
+
index,
|
|
4847
|
+
template) {
|
|
4848
|
+
this.arrayKey = arrayKey;
|
|
4849
|
+
this.index = index;
|
|
4850
|
+
this.template = template;
|
|
4851
|
+
}
|
|
4852
|
+
}
|
|
4853
|
+
|
|
4854
|
+
class PopArrayItemEvent {
|
|
4855
|
+
arrayKey;
|
|
4856
|
+
type = 'pop-array-item';
|
|
4857
|
+
constructor(
|
|
4858
|
+
arrayKey) {
|
|
4859
|
+
this.arrayKey = arrayKey;
|
|
4860
|
+
}
|
|
4861
|
+
}
|
|
4862
|
+
|
|
4863
|
+
class ShiftArrayItemEvent {
|
|
4864
|
+
arrayKey;
|
|
4865
|
+
type = 'shift-array-item';
|
|
4866
|
+
constructor(
|
|
4867
|
+
arrayKey) {
|
|
4868
|
+
this.arrayKey = arrayKey;
|
|
4869
|
+
}
|
|
4870
|
+
}
|
|
4871
|
+
|
|
4872
|
+
class MoveArrayItemEvent {
|
|
4873
|
+
arrayKey;
|
|
4874
|
+
fromIndex;
|
|
4875
|
+
toIndex;
|
|
4876
|
+
type = 'move-array-item';
|
|
4877
|
+
constructor(
|
|
4878
|
+
arrayKey,
|
|
4879
|
+
fromIndex,
|
|
4880
|
+
toIndex) {
|
|
4881
|
+
this.arrayKey = arrayKey;
|
|
4882
|
+
this.fromIndex = fromIndex;
|
|
4883
|
+
this.toIndex = toIndex;
|
|
4884
|
+
}
|
|
4885
|
+
}
|
|
4886
|
+
|
|
4887
|
+
class RemoveAtIndexEvent {
|
|
4888
|
+
arrayKey;
|
|
4889
|
+
index;
|
|
4890
|
+
type = 'remove-at-index';
|
|
4891
|
+
constructor(
|
|
4892
|
+
arrayKey,
|
|
4893
|
+
index) {
|
|
4894
|
+
this.arrayKey = arrayKey;
|
|
4895
|
+
this.index = index;
|
|
4896
|
+
}
|
|
4897
|
+
}
|
|
4898
|
+
|
|
4878
4899
|
function arrayEvent(arrayKey) {
|
|
4879
4900
|
return {
|
|
4880
4901
|
append: (template) => new AppendArrayItemEvent(arrayKey, template),
|
|
@@ -4890,5 +4911,5 @@ function arrayEvent(arrayKey) {
|
|
|
4890
4911
|
|
|
4891
4912
|
|
|
4892
4913
|
|
|
4893
|
-
export {
|
|
4894
|
-
//# sourceMappingURL=ng-forge-dynamic-forms-ng-forge-dynamic-forms-
|
|
4914
|
+
export { withEventFormValue as $, ArrayItemRegistryService as A, BUILT_IN_FIELDS as B, CONTAINER_FIELD_PROCESSORS as C, DfFieldOutlet as D, EventDispatcher as E, FIELD_WINDOWING as F, GoToPageEvent as G, PageChangeEvent as H, InsertArrayItemEvent as I, PagerStateEvent as J, PopArrayItemEvent as K, PrependArrayItemEvent as L, MoveArrayItemEvent as M, NextPageEvent as N, PreviousPageEvent as O, PROPERTY_OVERRIDE_STORE as P, TextAddonComponent as Q, RemoveAtIndexEvent as R, ShiftArrayItemEvent as S, TemplateAddonComponent as T, arrayEvent as U, createWrappers as V, isWrappersBundle as W, provideDynamicForm as X, sanitizeFormConfig as Y, withAddonActions as Z, withCustomAddon as _, isSameWrapperChain as a, withFieldWindowing as a0, withLegacyStatusClasses as a1, withLoggerConfig as a2, withPagePreload as a3, withValidationExecutionDefaults as a4, withValueExclusionDefaults as a5, wrapperProps as a6, createWrapperChainController as b, createFieldResolutionPipe as c, createSchemaFromFields as d, createHiddenSignal as e, createRenderReadySignal as f, getNormalizedArrayMetadata as g, getFieldDefaultValue as h, injectFieldRegistry as i, resolveFieldWindowing as j, DEV_MODE as k, DEFAULT_DEBOUNCE_MS as l, mapFieldToInputs as m, DERIVATION_WARNING_TRACKER as n, FormStateManager as o, DERIVATION_LOG_CONFIG as p, AppendArrayItemEvent as q, resolveWrappers as r, ComponentAddonComponent as s, traverseFieldsWithContext as t, ConsoleLogger as u, DfTemplate as v, DynamicForm as w, FormClearEvent as x, FormResetEvent as y, FormSubmitEvent as z };
|
|
4915
|
+
//# sourceMappingURL=ng-forge-dynamic-forms-ng-forge-dynamic-forms-BGRxIQ2V.mjs.map
|