@ruc-lib/metaform 2.2.2 → 3.1.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.
Files changed (31) hide show
  1. package/README.md +1 -135
  2. package/fesm2022/ruc-lib-metaform.mjs +450 -0
  3. package/fesm2022/ruc-lib-metaform.mjs.map +1 -0
  4. package/index.d.ts +125 -2
  5. package/package.json +9 -36
  6. package/components/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.d.ts +0 -18
  7. package/components/ruc-meta-inputs/ruc-meta-inputs.component.d.ts +0 -23
  8. package/components/ruc-meta-radio-group/ruc-meta-radio-group.component.d.ts +0 -20
  9. package/components/ruc-meta-select/ruc-meta-select.component.d.ts +0 -17
  10. package/components/ruc-text-area/ruc-text-area.component.d.ts +0 -19
  11. package/esm2020/components/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.mjs +0 -42
  12. package/esm2020/components/ruc-meta-inputs/ruc-meta-inputs.component.mjs +0 -54
  13. package/esm2020/components/ruc-meta-radio-group/ruc-meta-radio-group.component.mjs +0 -38
  14. package/esm2020/components/ruc-meta-select/ruc-meta-select.component.mjs +0 -56
  15. package/esm2020/components/ruc-text-area/ruc-text-area.component.mjs +0 -39
  16. package/esm2020/index.mjs +0 -3
  17. package/esm2020/interfaces/metaFormsDefault.mjs +0 -2
  18. package/esm2020/lib/ruclib-metaform/ruclib-metaform.component.mjs +0 -105
  19. package/esm2020/lib/ruclib-metaform.module.mjs +0 -100
  20. package/esm2020/ruc-lib-metaform.mjs +0 -5
  21. package/esm2020/services/ruc-meta-form-validation.service.mjs +0 -29
  22. package/esm2020/services/ruc-meta-form.service.mjs +0 -23
  23. package/fesm2015/ruc-lib-metaform.mjs +0 -432
  24. package/fesm2015/ruc-lib-metaform.mjs.map +0 -1
  25. package/fesm2020/ruc-lib-metaform.mjs +0 -432
  26. package/fesm2020/ruc-lib-metaform.mjs.map +0 -1
  27. package/interfaces/metaFormsDefault.d.ts +0 -73
  28. package/lib/ruclib-metaform/ruclib-metaform.component.d.ts +0 -45
  29. package/lib/ruclib-metaform.module.d.ts +0 -27
  30. package/services/ruc-meta-form-validation.service.d.ts +0 -12
  31. package/services/ruc-meta-form.service.d.ts +0 -14
@@ -0,0 +1,450 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Input, Output, Component } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import * as i3 from '@angular/forms';
6
+ import { FormsModule } from '@angular/forms';
7
+ import * as i4 from '@angular/material/form-field';
8
+ import { MatFormFieldModule } from '@angular/material/form-field';
9
+ import * as i5 from '@angular/material/input';
10
+ import { MatInputModule } from '@angular/material/input';
11
+ import * as i4$1 from '@angular/material/radio';
12
+ import { MatRadioModule } from '@angular/material/radio';
13
+ import * as i4$2 from '@angular/material/checkbox';
14
+ import { MatCheckboxModule } from '@angular/material/checkbox';
15
+ import * as i6 from '@angular/material/select';
16
+ import { MatSelectModule } from '@angular/material/select';
17
+ import * as i7 from '@angular/material/autocomplete';
18
+ import { MatAutocompleteModule } from '@angular/material/autocomplete';
19
+ import * as i4$3 from '@angular/material/button';
20
+ import { MatButtonModule } from '@angular/material/button';
21
+ import * as i7$1 from '@angular/material/tooltip';
22
+ import { MatTooltipModule } from '@angular/material/tooltip';
23
+ import * as i5$1 from '@angular/material/stepper';
24
+ import { MatStepperModule } from '@angular/material/stepper';
25
+ import * as i6$1 from '@angular/cdk/text-field';
26
+ import { TextFieldModule } from '@angular/cdk/text-field';
27
+ import { RuclibMultiSelectComponent } from '@ruc-lib/multi-select';
28
+ import { RuclibMultiFileUploadComponent } from '@ruc-lib/multi-file-upload';
29
+ import { BehaviorSubject } from 'rxjs';
30
+ import * as i1 from '@angular/common/http';
31
+
32
+ class RucMetaFormValidationService {
33
+ constructor() {
34
+ this.defaultErrorMessage = 'Invalid Input';
35
+ }
36
+ nospaceValidator(formData) {
37
+ const re = / /;
38
+ if (formData.value.match(re)) {
39
+ return { nullTable: true };
40
+ }
41
+ else {
42
+ return false;
43
+ }
44
+ }
45
+ alphaNumericValidator(formData) {
46
+ const re = '^[a-zA-Z0-9_]+$';
47
+ return formData.value ? !formData.value.match(re) : false;
48
+ }
49
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaFormValidationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
50
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaFormValidationService, providedIn: 'root' }); }
51
+ }
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaFormValidationService, decorators: [{
53
+ type: Injectable,
54
+ args: [{
55
+ providedIn: 'root'
56
+ }]
57
+ }], ctorParameters: () => [] });
58
+
59
+ class RucMetaInputsComponent {
60
+ constructor(validationService) {
61
+ this.validationService = validationService;
62
+ this.transferUserInput = new EventEmitter();
63
+ this.options = [];
64
+ }
65
+ ngOnInit() {
66
+ this.errorMessage = this.validationService.defaultErrorMessage;
67
+ this.rucInputData.value === undefined ? '' : this.rucInputData.value;
68
+ this.options = this.rucInputData.autocomplete;
69
+ }
70
+ /**
71
+ *
72
+ * @param e
73
+ */
74
+ modelChangeFn(e) {
75
+ const validate = this.validationService.alphaNumericValidator(this.rucInputData);
76
+ this.rucInputData.errorMsg = validate;
77
+ if (this.rucInputData.autocomplete) {
78
+ this.filteredOptions = this._filter(this.rucInputData.value);
79
+ }
80
+ this.transferUserInput.emit(this.rucInputData);
81
+ }
82
+ _filter(value) {
83
+ const filterValue = value.toLowerCase();
84
+ return this.options.filter((option) => option.toLowerCase().includes(filterValue));
85
+ }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaInputsComponent, deps: [{ token: RucMetaFormValidationService }], target: i0.ɵɵFactoryTarget.Component }); }
87
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: RucMetaInputsComponent, isStandalone: true, selector: "ruc-meta-inputs", inputs: { rucInputData: "rucInputData", selectedParentId: "selectedParentId", customTheme: "customTheme" }, outputs: { transferUserInput: "transferUserInput" }, providers: [RucMetaFormValidationService], ngImport: i0, template: "<mat-form-field class=\"{{customTheme }}\" [ngStyle]=\"{ 'width.%': rucInputData?.width }\" [appearance]=\"rucInputData?.appearance || 'fill'\">\r\n <mat-label>{{rucInputData?.label}}</mat-label>\r\n <input type=\"{{rucInputData?.inputType}}\" color=\"accent\" matInput placeholder=\"{{rucInputData?.placeholder}}\" [(ngModel)]=\"rucInputData.value\"\r\n (ngModelChange)=\"modelChangeFn($event.target)\" required=\"{{rucInputData?.required}}\" size=\"{{rucInputData?.size}}\"\r\n maxlength=\"{{rucInputData?.maxlength}}\" min=\"{{rucInputData?.min}}\" max=\"{{rucInputData?.max}}\" pattern=\"{{rucInputData?.pattern}}\"\r\n step=\"{{rucInputData?.step}}\" autofocus=\"{{rucInputData?.autofocus}}\" width=\"{{rucInputData?.width}}\" height=\"{{rucInputData?.height}}\"\r\n matTooltip=\"{{rucInputData?.tooltip}}\"\r\n [matAutocomplete]=\"auto\" [matAutocompleteDisabled]=\"!rucInputData?.autocomplete\" [readonly]=\"rucInputData?.readonly\" [matTooltipPosition]=\"rucInputData?.tooltipPosition\"\r\n >\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n @for (option of filteredOptions; track option) {\r\n <mat-option [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n @if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n }\r\n", styles: [".example-full-width{width:100%}.example-form{min-width:150px;max-width:500px;width:100%}.form-error{color:red}.margin-right{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i7.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i7.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatStepperModule }] }); }
88
+ }
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaInputsComponent, decorators: [{
90
+ type: Component,
91
+ args: [{ selector: 'ruc-meta-inputs', imports: [
92
+ CommonModule,
93
+ FormsModule,
94
+ MatFormFieldModule,
95
+ MatInputModule,
96
+ MatRadioModule,
97
+ MatCheckboxModule,
98
+ MatSelectModule,
99
+ MatAutocompleteModule,
100
+ MatButtonModule,
101
+ MatTooltipModule,
102
+ TextFieldModule,
103
+ MatStepperModule,
104
+ ], providers: [RucMetaFormValidationService], template: "<mat-form-field class=\"{{customTheme }}\" [ngStyle]=\"{ 'width.%': rucInputData?.width }\" [appearance]=\"rucInputData?.appearance || 'fill'\">\r\n <mat-label>{{rucInputData?.label}}</mat-label>\r\n <input type=\"{{rucInputData?.inputType}}\" color=\"accent\" matInput placeholder=\"{{rucInputData?.placeholder}}\" [(ngModel)]=\"rucInputData.value\"\r\n (ngModelChange)=\"modelChangeFn($event.target)\" required=\"{{rucInputData?.required}}\" size=\"{{rucInputData?.size}}\"\r\n maxlength=\"{{rucInputData?.maxlength}}\" min=\"{{rucInputData?.min}}\" max=\"{{rucInputData?.max}}\" pattern=\"{{rucInputData?.pattern}}\"\r\n step=\"{{rucInputData?.step}}\" autofocus=\"{{rucInputData?.autofocus}}\" width=\"{{rucInputData?.width}}\" height=\"{{rucInputData?.height}}\"\r\n matTooltip=\"{{rucInputData?.tooltip}}\"\r\n [matAutocomplete]=\"auto\" [matAutocompleteDisabled]=\"!rucInputData?.autocomplete\" [readonly]=\"rucInputData?.readonly\" [matTooltipPosition]=\"rucInputData?.tooltipPosition\"\r\n >\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n @for (option of filteredOptions; track option) {\r\n <mat-option [value]=\"option\">\r\n {{option}}\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n @if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n }\r\n", styles: [".example-full-width{width:100%}.example-form{min-width:150px;max-width:500px;width:100%}.form-error{color:red}.margin-right{margin-right:10px}\n"] }]
105
+ }], ctorParameters: () => [{ type: RucMetaFormValidationService }], propDecorators: { rucInputData: [{
106
+ type: Input
107
+ }], selectedParentId: [{
108
+ type: Input
109
+ }], transferUserInput: [{
110
+ type: Output
111
+ }], customTheme: [{
112
+ type: Input
113
+ }] } });
114
+
115
+ class RucMetaRadioGroupComponent {
116
+ constructor(validationService) {
117
+ this.validationService = validationService;
118
+ this.transferUserInput = new EventEmitter();
119
+ }
120
+ ngOnInit() {
121
+ this.errorMessage = this.validationService.defaultErrorMessage;
122
+ }
123
+ /**
124
+ *
125
+ * @param e
126
+ */
127
+ modelChangeFn(e) {
128
+ this.rucInputData.value = e.value;
129
+ this.transferUserInput.emit(this.rucInputData);
130
+ }
131
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaRadioGroupComponent, deps: [{ token: RucMetaFormValidationService }], target: i0.ɵɵFactoryTarget.Component }); }
132
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: RucMetaRadioGroupComponent, isStandalone: true, selector: "ruc-meta-radio-group", inputs: { rucInputData: "rucInputData", customTheme: "customTheme" }, outputs: { transferUserInput: "transferUserInput" }, providers: [RucMetaFormValidationService], ngImport: i0, template: "<mat-label>{{rucInputData?.label}}</mat-label>\r\n<mat-radio-group\r\n aria-labelledby=\"radio-group-label\"\r\n class=\"{{customTheme}} radio-group\" [(ngModel)]=\"radioValue\">\r\n @for (item of rucInputData?.groupOptions; track item) {\r\n <mat-radio-button class=\"radio-button\" [value]=\"item.value\"\r\n (change)=\"modelChangeFn($event)\">\r\n {{item?.name}}\r\n </mat-radio-button>\r\n }\r\n</mat-radio-group>\r\n@if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n}\r\n", styles: [".form-error{color:red}.radio-group{display:flex;flex-direction:column;margin:15px 0;align-items:flex-start}.radio-button{margin:5px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: i4$1.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i4$1.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatStepperModule }] }); }
133
+ }
134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaRadioGroupComponent, decorators: [{
135
+ type: Component,
136
+ args: [{ selector: 'ruc-meta-radio-group', imports: [
137
+ FormsModule,
138
+ MatFormFieldModule,
139
+ MatInputModule,
140
+ MatRadioModule,
141
+ MatCheckboxModule,
142
+ MatSelectModule,
143
+ MatAutocompleteModule,
144
+ MatButtonModule,
145
+ MatTooltipModule,
146
+ TextFieldModule,
147
+ MatStepperModule
148
+ ], providers: [RucMetaFormValidationService], template: "<mat-label>{{rucInputData?.label}}</mat-label>\r\n<mat-radio-group\r\n aria-labelledby=\"radio-group-label\"\r\n class=\"{{customTheme}} radio-group\" [(ngModel)]=\"radioValue\">\r\n @for (item of rucInputData?.groupOptions; track item) {\r\n <mat-radio-button class=\"radio-button\" [value]=\"item.value\"\r\n (change)=\"modelChangeFn($event)\">\r\n {{item?.name}}\r\n </mat-radio-button>\r\n }\r\n</mat-radio-group>\r\n@if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n}\r\n", styles: [".form-error{color:red}.radio-group{display:flex;flex-direction:column;margin:15px 0;align-items:flex-start}.radio-button{margin:5px}\n"] }]
149
+ }], ctorParameters: () => [{ type: RucMetaFormValidationService }], propDecorators: { rucInputData: [{
150
+ type: Input
151
+ }], customTheme: [{
152
+ type: Input
153
+ }], transferUserInput: [{
154
+ type: Output
155
+ }] } });
156
+
157
+ class RucMetaCheckboxGroupComponent {
158
+ constructor(validationService) {
159
+ this.validationService = validationService;
160
+ this.transferUserInput = new EventEmitter();
161
+ }
162
+ ngOnInit() {
163
+ this.errorMessage = this.validationService.defaultErrorMessage;
164
+ }
165
+ /**
166
+ *
167
+ * @param e
168
+ */
169
+ modelChangeFn(e) {
170
+ const checkboxValues = [];
171
+ this.rucInputData.groupOptions.forEach((x) => {
172
+ if (x.value) {
173
+ checkboxValues.push(x.name);
174
+ }
175
+ });
176
+ this.rucInputData.value = checkboxValues;
177
+ this.transferUserInput.emit(this.rucInputData);
178
+ }
179
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaCheckboxGroupComponent, deps: [{ token: RucMetaFormValidationService }], target: i0.ɵɵFactoryTarget.Component }); }
180
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: RucMetaCheckboxGroupComponent, isStandalone: true, selector: "ruc-meta-checkbox-group", inputs: { rucInputData: "rucInputData" }, outputs: { transferUserInput: "transferUserInput" }, providers: [RucMetaFormValidationService], ngImport: i0, template: "<mat-label class=\"margin-\">{{rucInputData?.label}}</mat-label>\r\n<ul class=\"ruc-checkbox\">\r\n @for (item of rucInputData?.groupOptions; track item) {\r\n <li>\r\n <mat-checkbox [(ngModel)]=\"item.value\" (ngModelChange)=\"modelChangeFn($event)\">\r\n {{item?.name}}\r\n </mat-checkbox>\r\n </li>\r\n }\r\n</ul>\r\n@if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n}", styles: ["ul{list-style-type:none;margin-top:4px}.form-error{color:red}.ruc-checkbox{padding-left:10px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i4$2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatStepperModule }] }); }
181
+ }
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaCheckboxGroupComponent, decorators: [{
183
+ type: Component,
184
+ args: [{ selector: 'ruc-meta-checkbox-group', imports: [
185
+ FormsModule,
186
+ MatFormFieldModule,
187
+ MatInputModule,
188
+ MatRadioModule,
189
+ MatCheckboxModule,
190
+ MatSelectModule,
191
+ MatAutocompleteModule,
192
+ MatButtonModule,
193
+ MatTooltipModule,
194
+ TextFieldModule,
195
+ MatStepperModule
196
+ ], providers: [RucMetaFormValidationService], template: "<mat-label class=\"margin-\">{{rucInputData?.label}}</mat-label>\r\n<ul class=\"ruc-checkbox\">\r\n @for (item of rucInputData?.groupOptions; track item) {\r\n <li>\r\n <mat-checkbox [(ngModel)]=\"item.value\" (ngModelChange)=\"modelChangeFn($event)\">\r\n {{item?.name}}\r\n </mat-checkbox>\r\n </li>\r\n }\r\n</ul>\r\n@if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n}", styles: ["ul{list-style-type:none;margin-top:4px}.form-error{color:red}.ruc-checkbox{padding-left:10px}\n"] }]
197
+ }], ctorParameters: () => [{ type: RucMetaFormValidationService }], propDecorators: { rucInputData: [{
198
+ type: Input
199
+ }], transferUserInput: [{
200
+ type: Output
201
+ }] } });
202
+
203
+ class RucMetaFormService {
204
+ constructor(http) {
205
+ this.http = http;
206
+ this.formData = new BehaviorSubject([]);
207
+ }
208
+ getFormJson(form) {
209
+ this.formData.next(form);
210
+ }
211
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaFormService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
212
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaFormService, providedIn: 'root' }); }
213
+ }
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaFormService, decorators: [{
215
+ type: Injectable,
216
+ args: [{
217
+ providedIn: 'root'
218
+ }]
219
+ }], ctorParameters: () => [{ type: i1.HttpClient }] });
220
+
221
+ class RucMetaSelectComponent {
222
+ constructor(service, validationService) {
223
+ this.service = service;
224
+ this.validationService = validationService;
225
+ this.transferUserInput = new EventEmitter();
226
+ }
227
+ ngOnInit() {
228
+ this.errorMessage = this.validationService.defaultErrorMessage;
229
+ }
230
+ modelChangeFn(e) {
231
+ this.rucInputData.groupOptions.forEach((x) => {
232
+ if (x.value == e.value) {
233
+ this.rucInputData.selectedParentId = x.id;
234
+ }
235
+ });
236
+ if (this.rucInputData.dependentFields) {
237
+ this.removDependentFieldParentIdFromOther(this.rucInputData.dependentFields);
238
+ }
239
+ this.service.currentFormElement = this.rucInputData;
240
+ this.transferUserInput.emit(this.rucInputData);
241
+ }
242
+ removDependentFieldParentIdFromOther(child) {
243
+ child.forEach((x) => {
244
+ if (x.selectedParentId) {
245
+ delete x.selectedParentId;
246
+ x.value = '';
247
+ if (x.dependentFields) {
248
+ this.removDependentFieldParentIdFromOther(x.dependentFields);
249
+ }
250
+ }
251
+ });
252
+ }
253
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaSelectComponent, deps: [{ token: RucMetaFormService }, { token: RucMetaFormValidationService }], target: i0.ɵɵFactoryTarget.Component }); }
254
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: RucMetaSelectComponent, isStandalone: true, selector: "ruc-meta-select", inputs: { rucInputData: "rucInputData" }, outputs: { transferUserInput: "transferUserInput" }, providers: [RucMetaFormValidationService, RucMetaFormService], ngImport: i0, template: "<div class=\"select-label\">\r\n <mat-label>{{rucInputData?.label}}</mat-label>\r\n</div>\r\n<mat-form-field [ngStyle]=\"{ 'width.%': rucInputData?.width }\" matTooltip=\"{{rucInputData?.tooltip}}\" [appearance]=\"rucInputData?.appearance || 'fill'\">\r\n <mat-label>Choose an option</mat-label>\r\n <mat-select (selectionChange)=\"modelChangeFn($event)\" [(ngModel)]=\"rucInputData.value\">\r\n @for (item of rucInputData?.groupOptions; track item) {\r\n <mat-option [value]=\"item.value\" [disabled]=\"item?.disable\"> {{item.name}}</mat-option>\r\n }\r\n </mat-select>\r\n</mat-form-field>\r\n@if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n}", styles: [".form-error{color:red}::ng-deep .mat-icon{cursor:pointer}.select-label{margin-bottom:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatStepperModule }] }); }
255
+ }
256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucMetaSelectComponent, decorators: [{
257
+ type: Component,
258
+ args: [{ selector: 'ruc-meta-select', imports: [
259
+ CommonModule,
260
+ FormsModule,
261
+ MatFormFieldModule,
262
+ MatInputModule,
263
+ MatRadioModule,
264
+ MatCheckboxModule,
265
+ MatSelectModule,
266
+ MatAutocompleteModule,
267
+ MatButtonModule,
268
+ MatTooltipModule,
269
+ TextFieldModule,
270
+ MatStepperModule,
271
+ ], providers: [RucMetaFormValidationService, RucMetaFormService], template: "<div class=\"select-label\">\r\n <mat-label>{{rucInputData?.label}}</mat-label>\r\n</div>\r\n<mat-form-field [ngStyle]=\"{ 'width.%': rucInputData?.width }\" matTooltip=\"{{rucInputData?.tooltip}}\" [appearance]=\"rucInputData?.appearance || 'fill'\">\r\n <mat-label>Choose an option</mat-label>\r\n <mat-select (selectionChange)=\"modelChangeFn($event)\" [(ngModel)]=\"rucInputData.value\">\r\n @for (item of rucInputData?.groupOptions; track item) {\r\n <mat-option [value]=\"item.value\" [disabled]=\"item?.disable\"> {{item.name}}</mat-option>\r\n }\r\n </mat-select>\r\n</mat-form-field>\r\n@if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n}", styles: [".form-error{color:red}::ng-deep .mat-icon{cursor:pointer}.select-label{margin-bottom:8px}\n"] }]
272
+ }], ctorParameters: () => [{ type: RucMetaFormService }, { type: RucMetaFormValidationService }], propDecorators: { rucInputData: [{
273
+ type: Input
274
+ }], transferUserInput: [{
275
+ type: Output
276
+ }] } });
277
+
278
+ class RucTextAreaComponent {
279
+ constructor(validationService) {
280
+ this.validationService = validationService;
281
+ this.transferUserInput = new EventEmitter();
282
+ }
283
+ ngOnInit() {
284
+ this.errorMessage = this.validationService.defaultErrorMessage;
285
+ }
286
+ /**
287
+ *
288
+ * @param e
289
+ */
290
+ modelChangeFn(e) {
291
+ this.transferUserInput.emit(this.rucInputData);
292
+ }
293
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucTextAreaComponent, deps: [{ token: RucMetaFormValidationService }], target: i0.ɵɵFactoryTarget.Component }); }
294
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: RucTextAreaComponent, isStandalone: true, selector: "ruc-text-area", inputs: { rucInputData: "rucInputData", customTheme: "customTheme" }, outputs: { transferUserInput: "transferUserInput" }, providers: [RucMetaFormValidationService], ngImport: i0, template: "<mat-form-field [ngStyle]=\"{ 'width.%': rucInputData?.width }\" [appearance]=\"rucInputData?.appearance || 'fill'\" class=\"{{customTheme}}\">\r\n <mat-label>{{rucInputData?.label}}</mat-label>\r\n <textarea matInput\r\n placeholder=\"{{rucInputData?.placeholder}}\"\r\n cdkTextareaAutosize\r\n #autosize=\"cdkTextareaAutosize\"\r\n cdkAutosizeMinRows=\"{{rucInputData.min}}\"\r\n cdkAutosizeMaxRows=\"{{rucInputData.max}}\"\r\n [readonly]=\"rucInputData?.readonly\"\r\n [(ngModel)]=\"rucInputData.value\"\r\n matTooltip=\"{{rucInputData?.tooltip}}\"\r\n (ngModelChange)=\"modelChangeFn($event.target)\"></textarea>\r\n</mat-form-field>\r\n@if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n}\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "directive", type: i6$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatStepperModule }] }); }
295
+ }
296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucTextAreaComponent, decorators: [{
297
+ type: Component,
298
+ args: [{ selector: 'ruc-text-area', imports: [
299
+ CommonModule,
300
+ FormsModule,
301
+ MatFormFieldModule,
302
+ MatInputModule,
303
+ MatRadioModule,
304
+ MatCheckboxModule,
305
+ MatSelectModule,
306
+ MatAutocompleteModule,
307
+ MatButtonModule,
308
+ MatTooltipModule,
309
+ TextFieldModule,
310
+ MatStepperModule,
311
+ ], providers: [RucMetaFormValidationService], template: "<mat-form-field [ngStyle]=\"{ 'width.%': rucInputData?.width }\" [appearance]=\"rucInputData?.appearance || 'fill'\" class=\"{{customTheme}}\">\r\n <mat-label>{{rucInputData?.label}}</mat-label>\r\n <textarea matInput\r\n placeholder=\"{{rucInputData?.placeholder}}\"\r\n cdkTextareaAutosize\r\n #autosize=\"cdkTextareaAutosize\"\r\n cdkAutosizeMinRows=\"{{rucInputData.min}}\"\r\n cdkAutosizeMaxRows=\"{{rucInputData.max}}\"\r\n [readonly]=\"rucInputData?.readonly\"\r\n [(ngModel)]=\"rucInputData.value\"\r\n matTooltip=\"{{rucInputData?.tooltip}}\"\r\n (ngModelChange)=\"modelChangeFn($event.target)\"></textarea>\r\n</mat-form-field>\r\n@if (rucInputData?.errorMsg) {\r\n <div class=\"form-error\">\r\n {{rucInputData?.customErrorMessage ? rucInputData?.customErrorMessage : errorMessage}}\r\n </div>\r\n}\r\n" }]
312
+ }], ctorParameters: () => [{ type: RucMetaFormValidationService }], propDecorators: { rucInputData: [{
313
+ type: Input
314
+ }], transferUserInput: [{
315
+ type: Output
316
+ }], customTheme: [{
317
+ type: Input
318
+ }] } });
319
+
320
+ class RuclibMetaformComponent {
321
+ constructor(service) {
322
+ this.service = service;
323
+ this.rucEvent = new EventEmitter();
324
+ this.childRucEvent = new EventEmitter();
325
+ this.rucInputData = [];
326
+ }
327
+ ngOnInit() {
328
+ if (!this.isChild) {
329
+ this.service.getFormJson(this.rucInputData);
330
+ this.getFormJson();
331
+ }
332
+ else {
333
+ this.formData = this.childForm;
334
+ }
335
+ this.inputObjectDataMultiFileUpload = {
336
+ multifileSelection: true,
337
+ displayThumbnail: true,
338
+ label: 'Choose File',
339
+ uploadUrl: '/api/upload',
340
+ deleteUrl: '/api/delete',
341
+ };
342
+ }
343
+ /**
344
+ * The purpose of this function to pass data from dependentFields to parent field
345
+ * @param getObject
346
+ * @param j
347
+ */
348
+ passEvent(getObject, formElement) {
349
+ const eventOutput = getObject?.eventOutput
350
+ ? getObject.eventOutput
351
+ : this.service.currentFormElement;
352
+ if (getObject?.eventName == 'onUploading') {
353
+ formElement.value = getObject?.eventOutput.name
354
+ ? getObject?.eventOutput.name
355
+ : getObject?.eventOutput[0].name;
356
+ }
357
+ this.rucEvent.emit({
358
+ eventName: 'metaFormData',
359
+ eventOutput: eventOutput,
360
+ formData: this.formData,
361
+ rucComponentEvent: getObject?.eventName,
362
+ });
363
+ }
364
+ /**
365
+ * Initial function to load for data
366
+ */
367
+ getFormJson() {
368
+ this.metaFormSubscribeInputs = this.service.formData
369
+ .asObservable()
370
+ .subscribe((formData) => {
371
+ this.formData = formData;
372
+ this.service.metaFormData = this.formData;
373
+ });
374
+ }
375
+ /**
376
+ * This function is to emit form data
377
+ * @param event
378
+ */
379
+ getMetaFormData(event) {
380
+ this.rucEvent.emit({
381
+ eventName: 'metaFormData',
382
+ eventOutput: event,
383
+ formData: this.formData,
384
+ });
385
+ }
386
+ /**
387
+ * Clear form data
388
+ */
389
+ clearForm() {
390
+ this.formData.map((x) => {
391
+ x.value = '';
392
+ });
393
+ }
394
+ /**
395
+ * Destroy the subscriber
396
+ */
397
+ ngOnDestroy() {
398
+ if (this.metaFormSubscribeInputs) {
399
+ this.metaFormSubscribeInputs.unsubscribe();
400
+ }
401
+ }
402
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RuclibMetaformComponent, deps: [{ token: RucMetaFormService }], target: i0.ɵɵFactoryTarget.Component }); }
403
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: RuclibMetaformComponent, isStandalone: true, selector: "uxp-ruclib-metaform", inputs: { rucInputData: "rucInputData", childForm: "childForm", customTheme: "customTheme", isChild: "isChild", selectedParentId: "selectedParentId" }, outputs: { rucEvent: "rucEvent", childRucEvent: "childRucEvent" }, providers: [RucMetaFormService], ngImport: i0, template: "<form novalidate>\r\n @for (dynamicField of formData; track dynamicField; let j = $index) {\r\n @switch (dynamicField?.fieldType) {\r\n @case ('input') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.hasDependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId === dynamicField.dependentFieldParentId)\r\n ) {\r\n <ruc-meta-inputs\r\n [customTheme]=\"customTheme\"\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-inputs>\r\n }\r\n </div>\r\n }\r\n }\r\n @case ('radio') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.dependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId === dynamicField.dependentFieldParentId) ||\r\n (!selectedParentId && dynamicField.dependentFields && !isChild)\r\n ) {\r\n <ruc-meta-radio-group\r\n [customTheme]=\"customTheme\"\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-radio-group>\r\n }\r\n </div>\r\n }\r\n }\r\n @case ('checkbox') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.dependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId === dynamicField.dependentFieldParentId) ||\r\n (!selectedParentId && dynamicField.dependentFields && !isChild)\r\n ) {\r\n <ruc-meta-checkbox-group\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-checkbox-group>\r\n }\r\n </div>\r\n }\r\n }\r\n @case ('select') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.dependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId === dynamicField.dependentFieldParentId) ||\r\n (!selectedParentId && dynamicField.dependentFields && !isChild)\r\n ) {\r\n <ruc-meta-select\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-select>\r\n }\r\n </div>\r\n }\r\n }\r\n @case ('textarea') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-text-area\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-text-area>\r\n </div>\r\n }\r\n }\r\n @case ('rucMultiSelect') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <uxp-ruclib-multi-select\r\n [rucInputData]=\"dynamicField?.rucMultiselectInput?.rucInputData\"\r\n [dataSource]=\"dynamicField?.rucMultiselectInput?.dataSource\"\r\n [customTheme]=\"customTheme\"\r\n (rucEvent)=\"passEvent($event)\"\r\n ></uxp-ruclib-multi-select>\r\n </div>\r\n }\r\n }\r\n @case ('rucMultiFileUpload') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <uxp-ruclib-multi-file-upload\r\n [rucInputData]=\"dynamicField?.rucMultiFileUploadInput?.rucInputData\"\r\n [customTheme]=\"customTheme\"\r\n (rucEvent)=\"passEvent($event, dynamicField)\"\r\n ></uxp-ruclib-multi-file-upload>\r\n </div>\r\n }\r\n }\r\n @default {\r\n @if (dynamicField.hasDependentFields && dynamicField.value) {\r\n <uxp-ruclib-metaform\r\n #dynamicField.id\r\n [rucInputData]=\"formData\"\r\n [childForm]=\"dynamicField.dependentFields\"\r\n [isChild]=\"true\"\r\n [selectedParentId]=\"dynamicField.selectedParentId\"\r\n (rucEvent)=\"passEvent($event, dynamicField.id)\"\r\n ></uxp-ruclib-metaform>\r\n }\r\n }\r\n }\r\n @if (dynamicField.formType === 'stepper') {\r\n <mat-stepper linear #stepper>\r\n @for (stapperField of dynamicField.stepper; track stapperField; let s = $index) {\r\n @switch (stapperField?.fieldType) {\r\n @case ('input') {\r\n @if (stapperField.stepControl !== 'done') {\r\n <mat-step [stepControl]=\"stapperField.stepControl\">\r\n <ng-template matStepLabel>{{\r\n stapperField.stepperlabel\r\n }}</ng-template>\r\n @for (\r\n stepperFormData of stapperField.stepperFormData;\r\n track stepperFormData;\r\n let j = $index\r\n ) {\r\n @switch (stepperFormData?.fieldType) {\r\n @case ('input') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-meta-inputs\r\n [customTheme]=\"customTheme\"\r\n [rucInputData]=\"stepperFormData\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-inputs>\r\n </div>\r\n }\r\n @case ('textarea') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-text-area\r\n [rucInputData]=\"stepperFormData\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-text-area>\r\n </div>\r\n }\r\n @case ('radio') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-meta-radio-group\r\n [customTheme]=\"customTheme\"\r\n [rucInputData]=\"stepperFormData\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-radio-group>\r\n </div>\r\n }\r\n @case ('checkbox') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-meta-checkbox-group\r\n [rucInputData]=\"stepperFormData\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-checkbox-group>\r\n </div>\r\n }\r\n @case ('select') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.dependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId ===\r\n dynamicField.dependentFieldParentId) ||\r\n (!selectedParentId &&\r\n dynamicField.dependentFields &&\r\n !isChild)\r\n ) {\r\n <ruc-meta-select\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-select>\r\n }\r\n </div>\r\n }\r\n }\r\n }\r\n <div>\r\n @if (s > 0) {\r\n <button mat-button matStepperPrevious>Back</button>\r\n }\r\n @if (s < dynamicField.stepper.length) {\r\n <button mat-button matStepperNext>Next</button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n }\r\n @default {\r\n @if (stapperField.stepControl === 'done') {\r\n <mat-step>\r\n <ng-template matStepLabel>{{\r\n stapperField.stepControl\r\n }}</ng-template>\r\n <p>{{ stapperField.stepperlabel }}</p>\r\n <div>\r\n <button mat-button matStepperPrevious>Back</button>\r\n <button mat-button (click)=\"stepper.reset()\">\r\n Reset\r\n </button>\r\n </div>\r\n </mat-step>\r\n }\r\n }\r\n }\r\n }\r\n </mat-stepper>\r\n }\r\n }\r\n @if (!isChild) {\r\n <button mat-raised-button color=\"primary\" (click)=\"clearForm()\">\r\n Clear Form\r\n </button>\r\n }\r\n</form>\r\n", styles: [".form-error{color:red}.column-in-same-row{float:left}.column-in-new-row{clear:left}.margin-5{margin:1%}\n"], dependencies: [{ kind: "component", type: RuclibMetaformComponent, selector: "uxp-ruclib-metaform", inputs: ["rucInputData", "childForm", "customTheme", "isChild", "selectedParentId"], outputs: ["rucEvent", "childRucEvent"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatRadioModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4$3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: TextFieldModule }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i5$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i5$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i5$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i5$1.MatStepperNext, selector: "button[matStepperNext]" }, { kind: "directive", type: i5$1.MatStepperPrevious, selector: "button[matStepperPrevious]" }, { kind: "component", type: RuclibMultiSelectComponent, selector: "uxp-ruclib-multi-select", inputs: ["rucInputData", "customTheme", "dataSource"], outputs: ["rucEvent"] }, { kind: "component", type: RuclibMultiFileUploadComponent, selector: "uxp-ruclib-multi-file-upload", inputs: ["rucInputData", "customTheme"], outputs: ["rucEvent"] }, { kind: "component", type: RucMetaInputsComponent, selector: "ruc-meta-inputs", inputs: ["rucInputData", "selectedParentId", "customTheme"], outputs: ["transferUserInput"] }, { kind: "component", type: RucMetaRadioGroupComponent, selector: "ruc-meta-radio-group", inputs: ["rucInputData", "customTheme"], outputs: ["transferUserInput"] }, { kind: "component", type: RucMetaCheckboxGroupComponent, selector: "ruc-meta-checkbox-group", inputs: ["rucInputData"], outputs: ["transferUserInput"] }, { kind: "component", type: RucMetaSelectComponent, selector: "ruc-meta-select", inputs: ["rucInputData"], outputs: ["transferUserInput"] }, { kind: "component", type: RucTextAreaComponent, selector: "ruc-text-area", inputs: ["rucInputData", "customTheme"], outputs: ["transferUserInput"] }] }); }
404
+ }
405
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RuclibMetaformComponent, decorators: [{
406
+ type: Component,
407
+ args: [{ selector: 'uxp-ruclib-metaform', imports: [
408
+ CommonModule,
409
+ FormsModule,
410
+ MatFormFieldModule,
411
+ MatInputModule,
412
+ MatRadioModule,
413
+ MatCheckboxModule,
414
+ MatSelectModule,
415
+ MatAutocompleteModule,
416
+ MatButtonModule,
417
+ MatTooltipModule,
418
+ TextFieldModule,
419
+ MatStepperModule,
420
+ RuclibMultiSelectComponent,
421
+ RuclibMultiFileUploadComponent,
422
+ RuclibMetaformComponent,
423
+ RucMetaInputsComponent,
424
+ RucMetaRadioGroupComponent,
425
+ RucMetaCheckboxGroupComponent,
426
+ RucMetaSelectComponent,
427
+ RucTextAreaComponent,
428
+ ], providers: [RucMetaFormService], template: "<form novalidate>\r\n @for (dynamicField of formData; track dynamicField; let j = $index) {\r\n @switch (dynamicField?.fieldType) {\r\n @case ('input') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.hasDependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId === dynamicField.dependentFieldParentId)\r\n ) {\r\n <ruc-meta-inputs\r\n [customTheme]=\"customTheme\"\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-inputs>\r\n }\r\n </div>\r\n }\r\n }\r\n @case ('radio') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.dependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId === dynamicField.dependentFieldParentId) ||\r\n (!selectedParentId && dynamicField.dependentFields && !isChild)\r\n ) {\r\n <ruc-meta-radio-group\r\n [customTheme]=\"customTheme\"\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-radio-group>\r\n }\r\n </div>\r\n }\r\n }\r\n @case ('checkbox') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.dependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId === dynamicField.dependentFieldParentId) ||\r\n (!selectedParentId && dynamicField.dependentFields && !isChild)\r\n ) {\r\n <ruc-meta-checkbox-group\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-checkbox-group>\r\n }\r\n </div>\r\n }\r\n }\r\n @case ('select') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.dependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId === dynamicField.dependentFieldParentId) ||\r\n (!selectedParentId && dynamicField.dependentFields && !isChild)\r\n ) {\r\n <ruc-meta-select\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-select>\r\n }\r\n </div>\r\n }\r\n }\r\n @case ('textarea') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-text-area\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-text-area>\r\n </div>\r\n }\r\n }\r\n @case ('rucMultiSelect') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <uxp-ruclib-multi-select\r\n [rucInputData]=\"dynamicField?.rucMultiselectInput?.rucInputData\"\r\n [dataSource]=\"dynamicField?.rucMultiselectInput?.dataSource\"\r\n [customTheme]=\"customTheme\"\r\n (rucEvent)=\"passEvent($event)\"\r\n ></uxp-ruclib-multi-select>\r\n </div>\r\n }\r\n }\r\n @case ('rucMultiFileUpload') {\r\n @if (dynamicField.formType !== 'stepper') {\r\n <div\r\n [ngStyle]=\"{ 'width.%': dynamicField.sameRowColumnWidth - 2 }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <uxp-ruclib-multi-file-upload\r\n [rucInputData]=\"dynamicField?.rucMultiFileUploadInput?.rucInputData\"\r\n [customTheme]=\"customTheme\"\r\n (rucEvent)=\"passEvent($event, dynamicField)\"\r\n ></uxp-ruclib-multi-file-upload>\r\n </div>\r\n }\r\n }\r\n @default {\r\n @if (dynamicField.hasDependentFields && dynamicField.value) {\r\n <uxp-ruclib-metaform\r\n #dynamicField.id\r\n [rucInputData]=\"formData\"\r\n [childForm]=\"dynamicField.dependentFields\"\r\n [isChild]=\"true\"\r\n [selectedParentId]=\"dynamicField.selectedParentId\"\r\n (rucEvent)=\"passEvent($event, dynamicField.id)\"\r\n ></uxp-ruclib-metaform>\r\n }\r\n }\r\n }\r\n @if (dynamicField.formType === 'stepper') {\r\n <mat-stepper linear #stepper>\r\n @for (stapperField of dynamicField.stepper; track stapperField; let s = $index) {\r\n @switch (stapperField?.fieldType) {\r\n @case ('input') {\r\n @if (stapperField.stepControl !== 'done') {\r\n <mat-step [stepControl]=\"stapperField.stepControl\">\r\n <ng-template matStepLabel>{{\r\n stapperField.stepperlabel\r\n }}</ng-template>\r\n @for (\r\n stepperFormData of stapperField.stepperFormData;\r\n track stepperFormData;\r\n let j = $index\r\n ) {\r\n @switch (stepperFormData?.fieldType) {\r\n @case ('input') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-meta-inputs\r\n [customTheme]=\"customTheme\"\r\n [rucInputData]=\"stepperFormData\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-inputs>\r\n </div>\r\n }\r\n @case ('textarea') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-text-area\r\n [rucInputData]=\"stepperFormData\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-text-area>\r\n </div>\r\n }\r\n @case ('radio') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-meta-radio-group\r\n [customTheme]=\"customTheme\"\r\n [rucInputData]=\"stepperFormData\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-radio-group>\r\n </div>\r\n }\r\n @case ('checkbox') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n <ruc-meta-checkbox-group\r\n [rucInputData]=\"stepperFormData\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-checkbox-group>\r\n </div>\r\n }\r\n @case ('select') {\r\n <div\r\n [ngStyle]=\"{\r\n 'width.%': dynamicField.sameRowColumnWidth - 2\r\n }\"\r\n [ngClass]=\"\r\n dynamicField.sameRow === true\r\n ? 'margin-5 column-in-same-row'\r\n : 'margin-5 column-in-new-row'\r\n \"\r\n >\r\n @if (\r\n (!selectedParentId && !dynamicField.dependentFields) ||\r\n (selectedParentId &&\r\n selectedParentId ===\r\n dynamicField.dependentFieldParentId) ||\r\n (!selectedParentId &&\r\n dynamicField.dependentFields &&\r\n !isChild)\r\n ) {\r\n <ruc-meta-select\r\n [rucInputData]=\"dynamicField\"\r\n (transferUserInput)=\"getMetaFormData($event)\"\r\n ></ruc-meta-select>\r\n }\r\n </div>\r\n }\r\n }\r\n }\r\n <div>\r\n @if (s > 0) {\r\n <button mat-button matStepperPrevious>Back</button>\r\n }\r\n @if (s < dynamicField.stepper.length) {\r\n <button mat-button matStepperNext>Next</button>\r\n }\r\n </div>\r\n </mat-step>\r\n }\r\n }\r\n @default {\r\n @if (stapperField.stepControl === 'done') {\r\n <mat-step>\r\n <ng-template matStepLabel>{{\r\n stapperField.stepControl\r\n }}</ng-template>\r\n <p>{{ stapperField.stepperlabel }}</p>\r\n <div>\r\n <button mat-button matStepperPrevious>Back</button>\r\n <button mat-button (click)=\"stepper.reset()\">\r\n Reset\r\n </button>\r\n </div>\r\n </mat-step>\r\n }\r\n }\r\n }\r\n }\r\n </mat-stepper>\r\n }\r\n }\r\n @if (!isChild) {\r\n <button mat-raised-button color=\"primary\" (click)=\"clearForm()\">\r\n Clear Form\r\n </button>\r\n }\r\n</form>\r\n", styles: [".form-error{color:red}.column-in-same-row{float:left}.column-in-new-row{clear:left}.margin-5{margin:1%}\n"] }]
429
+ }], ctorParameters: () => [{ type: RucMetaFormService }], propDecorators: { rucEvent: [{
430
+ type: Output
431
+ }], childRucEvent: [{
432
+ type: Output
433
+ }], rucInputData: [{
434
+ type: Input
435
+ }], childForm: [{
436
+ type: Input
437
+ }], customTheme: [{
438
+ type: Input
439
+ }], isChild: [{
440
+ type: Input
441
+ }], selectedParentId: [{
442
+ type: Input
443
+ }] } });
444
+
445
+ /**
446
+ * Generated bundle index. Do not edit.
447
+ */
448
+
449
+ export { RuclibMetaformComponent };
450
+ //# sourceMappingURL=ruc-lib-metaform.mjs.map