@ng-forge/dynamic-forms-material 1.2.0-next.5 → 1.2.0-next.7
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-material-lazy-addon-button.mjs +106 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-button.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs +34 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-addon-icon.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs +60 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-button.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs +76 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-checkbox.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs +124 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-datepicker.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs +196 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-input.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs +136 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-multi-checkbox.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs +92 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-radio.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs +106 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-select.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs +76 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-slider.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs +92 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-textarea.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs +76 -0
- package/fesm2022/ng-forge-dynamic-forms-material-lazy-toggle.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-QsDJRuUx.mjs +26 -0
- package/fesm2022/ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-QsDJRuUx.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs +14 -0
- package/fesm2022/ng-forge-dynamic-forms-material-shared.mjs.map +1 -0
- package/fesm2022/ng-forge-dynamic-forms-material.mjs +42 -93
- package/fesm2022/ng-forge-dynamic-forms-material.mjs.map +1 -1
- package/package.json +55 -3
- package/types/ng-forge-dynamic-forms-material-lazy-addon-button.d.ts +18 -0
- package/types/ng-forge-dynamic-forms-material-lazy-addon-icon.d.ts +17 -0
- package/types/ng-forge-dynamic-forms-material-lazy-button.d.ts +114 -0
- package/types/ng-forge-dynamic-forms-material-lazy-checkbox.d.ts +26 -0
- package/types/ng-forge-dynamic-forms-material-lazy-datepicker.d.ts +37 -0
- package/types/ng-forge-dynamic-forms-material-lazy-input.d.ts +55 -0
- package/types/ng-forge-dynamic-forms-material-lazy-multi-checkbox.d.ts +29 -0
- package/types/ng-forge-dynamic-forms-material-lazy-radio.d.ts +24 -0
- package/types/ng-forge-dynamic-forms-material-lazy-select.d.ts +35 -0
- package/types/ng-forge-dynamic-forms-material-lazy-slider.d.ts +27 -0
- package/types/ng-forge-dynamic-forms-material-lazy-textarea.d.ts +31 -0
- package/types/ng-forge-dynamic-forms-material-lazy-toggle.d.ts +28 -0
- package/types/ng-forge-dynamic-forms-material-shared.d.ts +91 -0
- package/types/ng-forge-dynamic-forms-material.d.ts +10 -161
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, input, computed, ChangeDetectionStrategy, Component, signal, forwardRef, linkedSignal, isSignal } from '@angular/core';
|
|
3
3
|
import { FormField } from '@angular/forms/signals';
|
|
4
4
|
import { MatCheckbox } from '@angular/material/checkbox';
|
|
5
5
|
import * as i1 from '@ng-forge/dynamic-forms/integration';
|
|
6
|
-
import { injectNgForgeField, NgForgeControl, DynamicTextPipe, NgForgeFieldHost,
|
|
6
|
+
import { injectNgForgeField, NgForgeControl, DynamicTextPipe, NgForgeFieldHost, injectNgForgeAddons, DfAddonSlot, ADDON_PRESET_HANDLER, FIELD_SIGNAL_CONTEXT, NgForgeAddons, isEqual, injectNgForgeAction, NgForgeActionHost, DEFAULT_PROPS, ARRAY_CONTEXT, injectNonFieldLogicResolver, buildBaseInputs, valueFieldMapper, optionsFieldMapper, checkboxFieldMapper, submitButtonFieldMapper, nextButtonFieldMapper, previousButtonFieldMapper, addArrayItemButtonMapper, prependArrayItemButtonMapper, insertArrayItemButtonMapper, removeArrayItemButtonMapper, popArrayItemButtonMapper, shiftArrayItemButtonMapper, datepickerFieldMapper, ADDON_TYPE_DEFINITIONS, injectNgForgeAddonAction, NgForgeAddonAction } from '@ng-forge/dynamic-forms/integration';
|
|
7
7
|
import { MatError, MatInput, MatHint } from '@angular/material/input';
|
|
8
8
|
import { AsyncPipe } from '@angular/common';
|
|
9
|
+
import { MATERIAL_CONFIG, MAT_INPUT_TYPE_OVERRIDE, runMatPresetAction } from '@ng-forge/dynamic-forms-material/shared';
|
|
10
|
+
export { MATERIAL_CONFIG, MAT_INPUT_TYPE_OVERRIDE } from '@ng-forge/dynamic-forms-material/shared';
|
|
9
11
|
import { MatFormField, MatLabel, MatSuffix, MatError as MatError$1, MatPrefix } from '@angular/material/form-field';
|
|
10
12
|
import { MatDatepicker, MatDatepickerInput, MatDatepickerToggle } from '@angular/material/datepicker';
|
|
11
13
|
import { provideNativeDateAdapter } from '@angular/material/core';
|
|
@@ -19,8 +21,6 @@ import { MatSlideToggle } from '@angular/material/slide-toggle';
|
|
|
19
21
|
import { MatIcon } from '@angular/material/icon';
|
|
20
22
|
import { MatProgressSpinner } from '@angular/material/progress-spinner';
|
|
21
23
|
|
|
22
|
-
const MATERIAL_CONFIG = new InjectionToken('MATERIAL_CONFIG');
|
|
23
|
-
|
|
24
24
|
class MatCheckboxFieldComponent {
|
|
25
25
|
materialConfig = inject(MATERIAL_CONFIG, { optional: true });
|
|
26
26
|
ngf = injectNgForgeField();
|
|
@@ -84,11 +84,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
84
84
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n"] }]
|
|
85
85
|
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
86
86
|
|
|
87
|
-
var matCheckbox_component = /*#__PURE__*/Object.freeze({
|
|
88
|
-
__proto__: null,
|
|
89
|
-
default: MatCheckboxFieldComponent
|
|
90
|
-
});
|
|
91
|
-
|
|
92
87
|
class MatDatepickerFieldComponent {
|
|
93
88
|
materialConfig = inject(MATERIAL_CONFIG, { optional: true });
|
|
94
89
|
ngf = injectNgForgeField();
|
|
@@ -198,17 +193,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
198
193
|
`, providers: [provideNativeDateAdapter()], changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", "mat-form-field{width:100%}\n"] }]
|
|
199
194
|
}], propDecorators: { minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
200
195
|
|
|
201
|
-
var matDatepicker_component = /*#__PURE__*/Object.freeze({
|
|
202
|
-
__proto__: null,
|
|
203
|
-
default: MatDatepickerFieldComponent
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
function runMatPresetAction(preset, ctx, collaborators) {
|
|
207
|
-
return runPresetAction(preset, ctx, collaborators, 'Material', 'mat-input');
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
const MAT_INPUT_TYPE_OVERRIDE = new InjectionToken('MAT_INPUT_TYPE_OVERRIDE');
|
|
211
|
-
|
|
212
196
|
class MatInputFieldComponent {
|
|
213
197
|
materialConfig = inject(MATERIAL_CONFIG, { optional: true });
|
|
214
198
|
ngf = injectNgForgeField();
|
|
@@ -391,11 +375,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
391
375
|
], styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", "mat-form-field{width:100%}:host([hidden]){display:none!important}:host{--df-mat-addon-prefix-outer-padding: .75em;--df-mat-addon-prefix-inner-padding: .5em;--df-mat-addon-suffix-inner-padding: .5em;--df-mat-addon-suffix-outer-padding: .75em;--df-mat-addon-prefix-text-outer-padding: 1em;--df-mat-addon-prefix-text-inner-padding: 1em;--df-mat-addon-suffix-text-inner-padding: 1em;--df-mat-addon-suffix-text-outer-padding: 1em}df-addon-slot[matprefix]{padding-left:var(--df-mat-addon-prefix-outer-padding);padding-right:var(--df-mat-addon-prefix-inner-padding)}df-addon-slot[matsuffix]{padding-left:var(--df-mat-addon-suffix-inner-padding);padding-right:var(--df-mat-addon-suffix-outer-padding)}df-addon-slot[matprefix].df-mat-addon-text{padding-left:var(--df-mat-addon-prefix-text-outer-padding);padding-right:var(--df-mat-addon-prefix-text-inner-padding)}df-addon-slot[matsuffix].df-mat-addon-text{padding-left:var(--df-mat-addon-suffix-text-inner-padding);padding-right:var(--df-mat-addon-suffix-text-outer-padding)}\n"] }]
|
|
392
376
|
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
|
|
393
377
|
|
|
394
|
-
var matInput_component = /*#__PURE__*/Object.freeze({
|
|
395
|
-
__proto__: null,
|
|
396
|
-
default: MatInputFieldComponent
|
|
397
|
-
});
|
|
398
|
-
|
|
399
378
|
class MatMultiCheckboxFieldComponent {
|
|
400
379
|
ngf = injectNgForgeField();
|
|
401
380
|
options = input([], /* @ts-ignore */
|
|
@@ -520,11 +499,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
520
499
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n"] }]
|
|
521
500
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
522
501
|
|
|
523
|
-
var matMultiCheckbox_component = /*#__PURE__*/Object.freeze({
|
|
524
|
-
__proto__: null,
|
|
525
|
-
default: MatMultiCheckboxFieldComponent
|
|
526
|
-
});
|
|
527
|
-
|
|
528
502
|
class MatRadioFieldComponent {
|
|
529
503
|
ngf = injectNgForgeField();
|
|
530
504
|
options = input([], /* @ts-ignore */
|
|
@@ -605,11 +579,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
605
579
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n"] }]
|
|
606
580
|
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
607
581
|
|
|
608
|
-
var matRadio_component = /*#__PURE__*/Object.freeze({
|
|
609
|
-
__proto__: null,
|
|
610
|
-
default: MatRadioFieldComponent
|
|
611
|
-
});
|
|
612
|
-
|
|
613
582
|
class MatSelectFieldComponent {
|
|
614
583
|
materialConfig = inject(MATERIAL_CONFIG, { optional: true });
|
|
615
584
|
ngf = injectNgForgeField();
|
|
@@ -702,11 +671,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
702
671
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", "mat-form-field{width:100%}\n"] }]
|
|
703
672
|
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
704
673
|
|
|
705
|
-
var matSelect_component = /*#__PURE__*/Object.freeze({
|
|
706
|
-
__proto__: null,
|
|
707
|
-
default: MatSelectFieldComponent
|
|
708
|
-
});
|
|
709
|
-
|
|
710
674
|
class MatSliderFieldComponent {
|
|
711
675
|
ngf = injectNgForgeField();
|
|
712
676
|
step = input(/* @ts-ignore */
|
|
@@ -771,11 +735,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
771
735
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", ".slider-container{width:100%}\n"] }]
|
|
772
736
|
}], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
773
737
|
|
|
774
|
-
var matSlider_component = /*#__PURE__*/Object.freeze({
|
|
775
|
-
__proto__: null,
|
|
776
|
-
default: MatSliderFieldComponent
|
|
777
|
-
});
|
|
778
|
-
|
|
779
738
|
class MatButtonFieldComponent {
|
|
780
739
|
action = injectNgForgeAction();
|
|
781
740
|
props = input(/* @ts-ignore */
|
|
@@ -825,11 +784,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
825
784
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", "button{min-width:fit-content}\n"] }]
|
|
826
785
|
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
827
786
|
|
|
828
|
-
var matButton_component = /*#__PURE__*/Object.freeze({
|
|
829
|
-
__proto__: null,
|
|
830
|
-
default: MatButtonFieldComponent
|
|
831
|
-
});
|
|
832
|
-
|
|
833
787
|
|
|
834
788
|
class MatTextareaFieldComponent {
|
|
835
789
|
materialConfig = inject(MATERIAL_CONFIG, { optional: true });
|
|
@@ -910,11 +864,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
910
864
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n", "mat-form-field{width:100%}\n"] }]
|
|
911
865
|
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
912
866
|
|
|
913
|
-
var matTextarea_component = /*#__PURE__*/Object.freeze({
|
|
914
|
-
__proto__: null,
|
|
915
|
-
default: MatTextareaFieldComponent
|
|
916
|
-
});
|
|
917
|
-
|
|
918
867
|
class MatToggleFieldComponent {
|
|
919
868
|
materialConfig = inject(MATERIAL_CONFIG, { optional: true });
|
|
920
869
|
ngf = injectNgForgeField();
|
|
@@ -978,11 +927,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
978
927
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;width:100%}:host([hidden]){display:none!important}.df-mat-field{display:flex;flex-direction:column;gap:var(--df-field-gap, .5rem);width:100%}.df-mat-label{font-weight:var(--df-label-font-weight, 500);color:var(--df-label-color, inherit)}.df-mat-hint{color:var(--df-hint-color, rgba(0, 0, 0, .6));font-size:var(--df-hint-font-size, .875rem)}.df-mat-error{color:var(--df-error-color, #f44336);font-size:var(--df-error-font-size, .875rem)}\n"] }]
|
|
979
928
|
}], propDecorators: { props: [{ type: i0.Input, args: [{ isSignal: true, alias: "props", required: false }] }] } });
|
|
980
929
|
|
|
981
|
-
var matToggle_component = /*#__PURE__*/Object.freeze({
|
|
982
|
-
__proto__: null,
|
|
983
|
-
default: MatToggleFieldComponent
|
|
984
|
-
});
|
|
985
|
-
|
|
986
930
|
|
|
987
931
|
const MatField = {
|
|
988
932
|
Input: 'input',
|
|
@@ -1051,10 +995,20 @@ const BUTTON_FIELD_TYPES_BASE = {
|
|
|
1051
995
|
renderReadyWhen: [],
|
|
1052
996
|
valueHandling: 'exclude',
|
|
1053
997
|
};
|
|
998
|
+
const loadInputComponent = () => import('@ng-forge/dynamic-forms-material/lazy/input').then(({ MatInputFieldComponent }) => MatInputFieldComponent);
|
|
999
|
+
const loadSelectComponent = () => import('@ng-forge/dynamic-forms-material/lazy/select').then(({ MatSelectFieldComponent }) => MatSelectFieldComponent);
|
|
1000
|
+
const loadCheckboxComponent = () => import('@ng-forge/dynamic-forms-material/lazy/checkbox').then(({ MatCheckboxFieldComponent }) => MatCheckboxFieldComponent);
|
|
1001
|
+
const loadButtonComponent = () => import('@ng-forge/dynamic-forms-material/lazy/button').then(({ MatButtonFieldComponent }) => MatButtonFieldComponent);
|
|
1002
|
+
const loadTextareaComponent = () => import('@ng-forge/dynamic-forms-material/lazy/textarea').then(({ MatTextareaFieldComponent }) => MatTextareaFieldComponent);
|
|
1003
|
+
const loadRadioComponent = () => import('@ng-forge/dynamic-forms-material/lazy/radio').then(({ MatRadioFieldComponent }) => MatRadioFieldComponent);
|
|
1004
|
+
const loadMultiCheckboxComponent = () => import('@ng-forge/dynamic-forms-material/lazy/multi-checkbox').then(({ MatMultiCheckboxFieldComponent }) => MatMultiCheckboxFieldComponent);
|
|
1005
|
+
const loadDatepickerComponent = () => import('@ng-forge/dynamic-forms-material/lazy/datepicker').then(({ MatDatepickerFieldComponent }) => MatDatepickerFieldComponent);
|
|
1006
|
+
const loadSliderComponent = () => import('@ng-forge/dynamic-forms-material/lazy/slider').then(({ MatSliderFieldComponent }) => MatSliderFieldComponent);
|
|
1007
|
+
const loadToggleComponent = () => import('@ng-forge/dynamic-forms-material/lazy/toggle').then(({ MatToggleFieldComponent }) => MatToggleFieldComponent);
|
|
1054
1008
|
const MATERIAL_FIELD_TYPES = [
|
|
1055
1009
|
{
|
|
1056
1010
|
name: MatField.Input,
|
|
1057
|
-
loadComponent:
|
|
1011
|
+
loadComponent: loadInputComponent,
|
|
1058
1012
|
mapper: valueFieldMapper,
|
|
1059
1013
|
propsToMeta: ['type'],
|
|
1060
1014
|
scope: ['text-input', 'numeric'],
|
|
@@ -1065,81 +1019,81 @@ const MATERIAL_FIELD_TYPES = [
|
|
|
1065
1019
|
},
|
|
1066
1020
|
{
|
|
1067
1021
|
name: MatField.Select,
|
|
1068
|
-
loadComponent:
|
|
1022
|
+
loadComponent: loadSelectComponent,
|
|
1069
1023
|
mapper: optionsFieldMapper,
|
|
1070
1024
|
scope: 'single-select',
|
|
1071
1025
|
...VALUE_FIELD_TYPES_BASE,
|
|
1072
1026
|
},
|
|
1073
1027
|
{
|
|
1074
1028
|
name: MatField.Checkbox,
|
|
1075
|
-
loadComponent:
|
|
1029
|
+
loadComponent: loadCheckboxComponent,
|
|
1076
1030
|
mapper: checkboxFieldMapper,
|
|
1077
1031
|
scope: 'boolean',
|
|
1078
1032
|
...VALUE_FIELD_TYPES_BASE,
|
|
1079
1033
|
},
|
|
1080
1034
|
{
|
|
1081
1035
|
name: MatField.Button,
|
|
1082
|
-
loadComponent:
|
|
1036
|
+
loadComponent: loadButtonComponent,
|
|
1083
1037
|
mapper: buttonFieldMapper,
|
|
1084
1038
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1085
1039
|
},
|
|
1086
1040
|
{
|
|
1087
1041
|
name: MatField.Submit,
|
|
1088
|
-
loadComponent:
|
|
1042
|
+
loadComponent: loadButtonComponent,
|
|
1089
1043
|
mapper: submitButtonFieldMapper,
|
|
1090
1044
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1091
1045
|
},
|
|
1092
1046
|
{
|
|
1093
1047
|
name: MatField.Next,
|
|
1094
|
-
loadComponent:
|
|
1048
|
+
loadComponent: loadButtonComponent,
|
|
1095
1049
|
mapper: nextButtonFieldMapper,
|
|
1096
1050
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1097
1051
|
},
|
|
1098
1052
|
{
|
|
1099
1053
|
name: MatField.Previous,
|
|
1100
|
-
loadComponent:
|
|
1054
|
+
loadComponent: loadButtonComponent,
|
|
1101
1055
|
mapper: previousButtonFieldMapper,
|
|
1102
1056
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1103
1057
|
},
|
|
1104
1058
|
{
|
|
1105
1059
|
name: MatField.AddArrayItem,
|
|
1106
|
-
loadComponent:
|
|
1060
|
+
loadComponent: loadButtonComponent,
|
|
1107
1061
|
mapper: addArrayItemButtonMapper,
|
|
1108
1062
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1109
1063
|
},
|
|
1110
1064
|
{
|
|
1111
1065
|
name: MatField.PrependArrayItem,
|
|
1112
|
-
loadComponent:
|
|
1066
|
+
loadComponent: loadButtonComponent,
|
|
1113
1067
|
mapper: prependArrayItemButtonMapper,
|
|
1114
1068
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1115
1069
|
},
|
|
1116
1070
|
{
|
|
1117
1071
|
name: MatField.InsertArrayItem,
|
|
1118
|
-
loadComponent:
|
|
1072
|
+
loadComponent: loadButtonComponent,
|
|
1119
1073
|
mapper: insertArrayItemButtonMapper,
|
|
1120
1074
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1121
1075
|
},
|
|
1122
1076
|
{
|
|
1123
1077
|
name: MatField.RemoveArrayItem,
|
|
1124
|
-
loadComponent:
|
|
1078
|
+
loadComponent: loadButtonComponent,
|
|
1125
1079
|
mapper: removeArrayItemButtonMapper,
|
|
1126
1080
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1127
1081
|
},
|
|
1128
1082
|
{
|
|
1129
1083
|
name: MatField.PopArrayItem,
|
|
1130
|
-
loadComponent:
|
|
1084
|
+
loadComponent: loadButtonComponent,
|
|
1131
1085
|
mapper: popArrayItemButtonMapper,
|
|
1132
1086
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1133
1087
|
},
|
|
1134
1088
|
{
|
|
1135
1089
|
name: MatField.ShiftArrayItem,
|
|
1136
|
-
loadComponent:
|
|
1090
|
+
loadComponent: loadButtonComponent,
|
|
1137
1091
|
mapper: shiftArrayItemButtonMapper,
|
|
1138
1092
|
...BUTTON_FIELD_TYPES_BASE,
|
|
1139
1093
|
},
|
|
1140
1094
|
{
|
|
1141
1095
|
name: MatField.Textarea,
|
|
1142
|
-
loadComponent:
|
|
1096
|
+
loadComponent: loadTextareaComponent,
|
|
1143
1097
|
mapper: valueFieldMapper,
|
|
1144
1098
|
propsToMeta: ['rows', 'cols'],
|
|
1145
1099
|
scope: 'text-input',
|
|
@@ -1147,35 +1101,35 @@ const MATERIAL_FIELD_TYPES = [
|
|
|
1147
1101
|
},
|
|
1148
1102
|
{
|
|
1149
1103
|
name: MatField.Radio,
|
|
1150
|
-
loadComponent:
|
|
1104
|
+
loadComponent: loadRadioComponent,
|
|
1151
1105
|
mapper: optionsFieldMapper,
|
|
1152
1106
|
scope: 'single-select',
|
|
1153
1107
|
...VALUE_FIELD_TYPES_BASE,
|
|
1154
1108
|
},
|
|
1155
1109
|
{
|
|
1156
1110
|
name: MatField.MultiCheckbox,
|
|
1157
|
-
loadComponent:
|
|
1111
|
+
loadComponent: loadMultiCheckboxComponent,
|
|
1158
1112
|
mapper: optionsFieldMapper,
|
|
1159
1113
|
scope: 'multi-select',
|
|
1160
1114
|
...VALUE_FIELD_TYPES_BASE,
|
|
1161
1115
|
},
|
|
1162
1116
|
{
|
|
1163
1117
|
name: MatField.Datepicker,
|
|
1164
|
-
loadComponent:
|
|
1118
|
+
loadComponent: loadDatepickerComponent,
|
|
1165
1119
|
mapper: datepickerFieldMapper,
|
|
1166
1120
|
scope: 'date',
|
|
1167
1121
|
...VALUE_FIELD_TYPES_BASE,
|
|
1168
1122
|
},
|
|
1169
1123
|
{
|
|
1170
1124
|
name: MatField.Slider,
|
|
1171
|
-
loadComponent:
|
|
1125
|
+
loadComponent: loadSliderComponent,
|
|
1172
1126
|
mapper: valueFieldMapper,
|
|
1173
1127
|
scope: 'numeric',
|
|
1174
1128
|
...VALUE_FIELD_TYPES_BASE,
|
|
1175
1129
|
},
|
|
1176
1130
|
{
|
|
1177
1131
|
name: MatField.Toggle,
|
|
1178
|
-
loadComponent:
|
|
1132
|
+
loadComponent: loadToggleComponent,
|
|
1179
1133
|
mapper: checkboxFieldMapper,
|
|
1180
1134
|
scope: 'boolean',
|
|
1181
1135
|
...VALUE_FIELD_TYPES_BASE,
|
|
@@ -1183,8 +1137,13 @@ const MATERIAL_FIELD_TYPES = [
|
|
|
1183
1137
|
];
|
|
1184
1138
|
|
|
1185
1139
|
|
|
1140
|
+
const MATERIAL_FIELD_ERRORS_WRAPPER = {
|
|
1141
|
+
wrapperName: 'field-errors',
|
|
1142
|
+
loadComponent: () => import('./ng-forge-dynamic-forms-material-mat-field-errors-wrapper.component-QsDJRuUx.mjs'),
|
|
1143
|
+
rendersFieldErrors: true,
|
|
1144
|
+
};
|
|
1186
1145
|
function withMaterialFields(config) {
|
|
1187
|
-
const base = [...MATERIAL_FIELD_TYPES, withMaterialAddons()];
|
|
1146
|
+
const base = [...MATERIAL_FIELD_TYPES, withMaterialAddons(), MATERIAL_FIELD_ERRORS_WRAPPER];
|
|
1188
1147
|
if (config) {
|
|
1189
1148
|
base.push({
|
|
1190
1149
|
ɵkind: 'material-config',
|
|
@@ -1197,7 +1156,7 @@ function withMaterialFields(config) {
|
|
|
1197
1156
|
/* -- Material addon types ----------------------------------------------- */
|
|
1198
1157
|
const MAT_ICON_KIND = {
|
|
1199
1158
|
type: 'mat-icon',
|
|
1200
|
-
loadComponent: () =>
|
|
1159
|
+
loadComponent: () => import('@ng-forge/dynamic-forms-material/lazy/addon-icon').then((m) => m.MatIconAddonComponent),
|
|
1201
1160
|
validate: (addon, fieldKey) => {
|
|
1202
1161
|
if (typeof addon.icon !== 'string' || addon.icon.length === 0) {
|
|
1203
1162
|
throw new DynamicFormError(`Addon type 'mat-icon' requires a non-empty 'icon' string (field: '${fieldKey}').`);
|
|
@@ -1206,7 +1165,7 @@ const MAT_ICON_KIND = {
|
|
|
1206
1165
|
};
|
|
1207
1166
|
const MAT_BUTTON_KIND = {
|
|
1208
1167
|
type: 'mat-button',
|
|
1209
|
-
loadComponent: () =>
|
|
1168
|
+
loadComponent: () => import('@ng-forge/dynamic-forms-material/lazy/addon-button').then((m) => m.MatButtonAddonComponent),
|
|
1210
1169
|
validate: (addon, fieldKey) => {
|
|
1211
1170
|
const set = [addon.preset, addon.actionRef, addon.action].filter((v) => v !== undefined);
|
|
1212
1171
|
if (set.length > 1) {
|
|
@@ -1252,11 +1211,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1252
1211
|
}]
|
|
1253
1212
|
}], propDecorators: { addon: [{ type: i0.Input, args: [{ isSignal: true, alias: "addon", required: true }] }], fieldInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "fieldInputs", required: false }] }] } });
|
|
1254
1213
|
|
|
1255
|
-
var matIconAddon_component = /*#__PURE__*/Object.freeze({
|
|
1256
|
-
__proto__: null,
|
|
1257
|
-
MatIconAddonComponent: MatIconAddonComponent
|
|
1258
|
-
});
|
|
1259
|
-
|
|
1260
1214
|
class MatButtonAddonComponent {
|
|
1261
1215
|
action = injectNgForgeAddonAction();
|
|
1262
1216
|
addon = this.action.addon;
|
|
@@ -1351,12 +1305,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
|
|
|
1351
1305
|
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".df-mat-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"] }]
|
|
1352
1306
|
}] });
|
|
1353
1307
|
|
|
1354
|
-
var matButtonAddon_component = /*#__PURE__*/Object.freeze({
|
|
1355
|
-
__proto__: null,
|
|
1356
|
-
MatButtonAddonComponent: MatButtonAddonComponent
|
|
1357
|
-
});
|
|
1358
|
-
|
|
1359
1308
|
|
|
1360
1309
|
|
|
1361
|
-
export {
|
|
1310
|
+
export { MATERIAL_FIELD_TYPES, MatButtonAddonComponent, MatButtonFieldComponent, MatCheckboxFieldComponent, MatDatepickerFieldComponent, MatField, MatIconAddonComponent, MatInputFieldComponent, MatMultiCheckboxFieldComponent, MatRadioFieldComponent, MatSelectFieldComponent, MatSliderFieldComponent, MatTextareaFieldComponent, MatToggleFieldComponent, withMaterialAddons, withMaterialFields };
|
|
1362
1311
|
//# sourceMappingURL=ng-forge-dynamic-forms-material.mjs.map
|