ngx-t-forms 2.0.8 → 2.0.9

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 (119) hide show
  1. package/fesm2022/{ngx-t-forms-api-value-access-rules.component-B9s7Hx-j.mjs → ngx-t-forms-api-value-access-rules.component-DjZDnTHz.mjs} +11 -11
  2. package/fesm2022/{ngx-t-forms-api-value-access-rules.component-B9s7Hx-j.mjs.map → ngx-t-forms-api-value-access-rules.component-DjZDnTHz.mjs.map} +1 -1
  3. package/fesm2022/ngx-t-forms-api-value-access-rules.component-Zg1ddSDb.mjs +813 -0
  4. package/fesm2022/ngx-t-forms-api-value-access-rules.component-Zg1ddSDb.mjs.map +1 -0
  5. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-vhdr4NMu.mjs → ngx-t-forms-calculated-field-rules.component-E3l7DQo7.mjs} +11 -11
  6. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-vhdr4NMu.mjs.map → ngx-t-forms-calculated-field-rules.component-E3l7DQo7.mjs.map} +1 -1
  7. package/fesm2022/ngx-t-forms-calculated-field-rules.component-ZepKycLR.mjs +532 -0
  8. package/fesm2022/ngx-t-forms-calculated-field-rules.component-ZepKycLR.mjs.map +1 -0
  9. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-DLnB3R7t.mjs +297 -0
  10. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-DLnB3R7t.mjs.map +1 -0
  11. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-Br3EWLav.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-sOC54w4T.mjs} +9 -9
  12. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-Br3EWLav.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-sOC54w4T.mjs.map} +1 -1
  13. package/fesm2022/ngx-t-forms-form-input-selector.component-BjwzDiCY.mjs +187 -0
  14. package/fesm2022/ngx-t-forms-form-input-selector.component-BjwzDiCY.mjs.map +1 -0
  15. package/fesm2022/{ngx-t-forms-form-input-selector.component-CR3ZVWLw.mjs → ngx-t-forms-form-input-selector.component-CB03sPjA.mjs} +6 -6
  16. package/fesm2022/{ngx-t-forms-form-input-selector.component-CR3ZVWLw.mjs.map → ngx-t-forms-form-input-selector.component-CB03sPjA.mjs.map} +1 -1
  17. package/fesm2022/{ngx-t-forms-form-json-view.component-CMdtaqhR.mjs → ngx-t-forms-form-json-view.component-C1AZujJH.mjs} +2 -2
  18. package/fesm2022/{ngx-t-forms-form-json-view.component-CMdtaqhR.mjs.map → ngx-t-forms-form-json-view.component-C1AZujJH.mjs.map} +1 -1
  19. package/fesm2022/ngx-t-forms-form-json-view.component-CqtTYCRH.mjs +28 -0
  20. package/fesm2022/ngx-t-forms-form-json-view.component-CqtTYCRH.mjs.map +1 -0
  21. package/fesm2022/ngx-t-forms-form-section-stepper.component-Ba5WCLzp.mjs +673 -0
  22. package/fesm2022/ngx-t-forms-form-section-stepper.component-Ba5WCLzp.mjs.map +1 -0
  23. package/fesm2022/ngx-t-forms-form-section-stepper.component-C_dciQhe.mjs +225 -0
  24. package/fesm2022/ngx-t-forms-form-section-stepper.component-C_dciQhe.mjs.map +1 -0
  25. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-pWNcCGY8.mjs → ngx-t-forms-forms-builder-menu.component-CPIcPREp.mjs} +10 -10
  26. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-pWNcCGY8.mjs.map → ngx-t-forms-forms-builder-menu.component-CPIcPREp.mjs.map} +1 -1
  27. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DbxEBvpt.mjs +735 -0
  28. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DbxEBvpt.mjs.map +1 -0
  29. package/fesm2022/ngx-t-forms-input-editor.component-BnsC-jsN.mjs +445 -0
  30. package/fesm2022/ngx-t-forms-input-editor.component-BnsC-jsN.mjs.map +1 -0
  31. package/fesm2022/{ngx-t-forms-input-editor.component-_ER-4SAR.mjs → ngx-t-forms-input-editor.component-__grERM8.mjs} +5 -5
  32. package/fesm2022/{ngx-t-forms-input-editor.component-_ER-4SAR.mjs.map → ngx-t-forms-input-editor.component-__grERM8.mjs.map} +1 -1
  33. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DS6s98ZX.mjs +111 -0
  34. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-DS6s98ZX.mjs.map +1 -0
  35. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-Bq0rr62p.mjs → ngx-t-forms-mat-chip-list-editor.component-DcdHYqhN.mjs} +2 -2
  36. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-Bq0rr62p.mjs.map → ngx-t-forms-mat-chip-list-editor.component-DcdHYqhN.mjs.map} +1 -1
  37. package/fesm2022/{ngx-t-forms-mat-slider-editor.component-BOT4I9Wg.mjs → ngx-t-forms-mat-slider-editor.component-C9rintm4.mjs} +2 -2
  38. package/fesm2022/{ngx-t-forms-mat-slider-editor.component-BOT4I9Wg.mjs.map → ngx-t-forms-mat-slider-editor.component-C9rintm4.mjs.map} +1 -1
  39. package/fesm2022/ngx-t-forms-mat-slider-editor.component-ChiiJYK2.mjs +130 -0
  40. package/fesm2022/ngx-t-forms-mat-slider-editor.component-ChiiJYK2.mjs.map +1 -0
  41. package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-CawhiguI.mjs → ngx-t-forms-mat-slider-toggle-editor.component-CItK6kXf.mjs} +2 -2
  42. package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-CawhiguI.mjs.map → ngx-t-forms-mat-slider-toggle-editor.component-CItK6kXf.mjs.map} +1 -1
  43. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DFcLzkSF.mjs +171 -0
  44. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DFcLzkSF.mjs.map +1 -0
  45. package/fesm2022/ngx-t-forms-missing-form-configs.component-DNkGCH0e.mjs +104 -0
  46. package/fesm2022/ngx-t-forms-missing-form-configs.component-DNkGCH0e.mjs.map +1 -0
  47. package/fesm2022/{ngx-t-forms-missing-form-configs.component-DEx_YKAi.mjs → ngx-t-forms-missing-form-configs.component-Da3SdUn6.mjs} +4 -4
  48. package/fesm2022/{ngx-t-forms-missing-form-configs.component-DEx_YKAi.mjs.map → ngx-t-forms-missing-form-configs.component-Da3SdUn6.mjs.map} +1 -1
  49. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-4hrEpLk3.mjs +258 -0
  50. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-4hrEpLk3.mjs.map +1 -0
  51. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CrHAIRAw.mjs +455 -0
  52. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CrHAIRAw.mjs.map +1 -0
  53. package/fesm2022/{ngx-t-forms-ngx-t-forms-R8Bkco8q.mjs → ngx-t-forms-ngx-t-forms-1Roar4qK.mjs} +630 -175
  54. package/fesm2022/ngx-t-forms-ngx-t-forms-1Roar4qK.mjs.map +1 -0
  55. package/fesm2022/ngx-t-forms-ngx-t-forms-DaAFB-HX.mjs +14694 -0
  56. package/fesm2022/ngx-t-forms-ngx-t-forms-DaAFB-HX.mjs.map +1 -0
  57. package/fesm2022/{ngx-t-forms-pipeline-generator.component-CDCDamaQ.mjs → ngx-t-forms-pipeline-generator.component-BQDykLNH.mjs} +13 -13
  58. package/fesm2022/{ngx-t-forms-pipeline-generator.component-CDCDamaQ.mjs.map → ngx-t-forms-pipeline-generator.component-BQDykLNH.mjs.map} +1 -1
  59. package/fesm2022/ngx-t-forms-pipeline-generator.component-U0d8jQKW.mjs +1362 -0
  60. package/fesm2022/ngx-t-forms-pipeline-generator.component-U0d8jQKW.mjs.map +1 -0
  61. package/fesm2022/{ngx-t-forms-required-inputs.component-zHQPB3m_.mjs → ngx-t-forms-required-inputs.component-BGK3DNu0.mjs} +10 -10
  62. package/fesm2022/{ngx-t-forms-required-inputs.component-zHQPB3m_.mjs.map → ngx-t-forms-required-inputs.component-BGK3DNu0.mjs.map} +1 -1
  63. package/fesm2022/ngx-t-forms-required-inputs.component-S3cbA-zG.mjs +383 -0
  64. package/fesm2022/ngx-t-forms-required-inputs.component-S3cbA-zG.mjs.map +1 -0
  65. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CKStotqz.mjs → ngx-t-forms-rest-api-call-setup.component-CCaRUSVQ.mjs} +4 -4
  66. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CKStotqz.mjs.map → ngx-t-forms-rest-api-call-setup.component-CCaRUSVQ.mjs.map} +1 -1
  67. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-DDg4fCFx.mjs +457 -0
  68. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-DDg4fCFx.mjs.map +1 -0
  69. package/fesm2022/{ngx-t-forms-section-report.component-Us4jxjhq.mjs → ngx-t-forms-section-report.component-C8Ja_G_3.mjs} +5 -5
  70. package/fesm2022/{ngx-t-forms-section-report.component-Us4jxjhq.mjs.map → ngx-t-forms-section-report.component-C8Ja_G_3.mjs.map} +1 -1
  71. package/fesm2022/ngx-t-forms-section-report.component-C_h0KIR4.mjs +314 -0
  72. package/fesm2022/ngx-t-forms-section-report.component-C_h0KIR4.mjs.map +1 -0
  73. package/fesm2022/ngx-t-forms-selection-options-editor.component-CllhwZ5Y.mjs +231 -0
  74. package/fesm2022/ngx-t-forms-selection-options-editor.component-CllhwZ5Y.mjs.map +1 -0
  75. package/fesm2022/{ngx-t-forms-selection-options-editor.component-BwFboSq2.mjs → ngx-t-forms-selection-options-editor.component-cYkn1O48.mjs} +5 -5
  76. package/fesm2022/{ngx-t-forms-selection-options-editor.component-BwFboSq2.mjs.map → ngx-t-forms-selection-options-editor.component-cYkn1O48.mjs.map} +1 -1
  77. package/fesm2022/ngx-t-forms-validators-config.component-BPJZRtjT.mjs +434 -0
  78. package/fesm2022/ngx-t-forms-validators-config.component-BPJZRtjT.mjs.map +1 -0
  79. package/fesm2022/{ngx-t-forms-validators-config.component-CX0M2OH1.mjs → ngx-t-forms-validators-config.component-CGXCCl45.mjs} +7 -7
  80. package/fesm2022/{ngx-t-forms-validators-config.component-CX0M2OH1.mjs.map → ngx-t-forms-validators-config.component-CGXCCl45.mjs.map} +1 -1
  81. package/fesm2022/ngx-t-forms.mjs +1 -1
  82. package/lib/components/form-builder/elements/form-section-stepper/form-section-stepper.component.d.ts +2 -0
  83. package/lib/components/form-builder/elements/form-submissions-config/form-submissions-config.component.d.ts +1 -1
  84. package/lib/components/form-builder/elements/input-element-editor/input-element-editor.component.d.ts +2 -2
  85. package/lib/components/forms/forms.component.d.ts +1 -1
  86. package/lib/components/forms/store/Form-actions-formBuilder.d.ts +1 -0
  87. package/lib/components/forms/store/Form-selectors-FormBuilder.d.ts +1 -1
  88. package/lib/components/forms/store/forms-store.service.d.ts +2 -1
  89. package/lib/components/index.d.ts +2 -1
  90. package/lib/components/t-dynamic-data-edit/elements/mscoa-segment-config/mscoa-segment-config.component.d.ts +5 -9
  91. package/lib/components/t-form-input/elements/mscoa-form-input/elements/account-value/account-value.component.d.ts +3 -3
  92. package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-chart/mscoa-chart.component.d.ts +67 -52
  93. package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-computation/mscoa-computation.component.d.ts +10 -10
  94. package/lib/components/t-form-input/elements/mscoa-form-input/elements/mscoa-reactive-form-field/mscoa-reactive-form-field.component.d.ts +8 -6
  95. package/lib/components/t-form-input/elements/mscoa-form-input/elements/scoa-account-table/scoa-account-table.component.d.ts +8 -8
  96. package/lib/components/t-form-input/elements/mscoa-form-input/elements/scoa-input/scoa-input.component.d.ts +1 -1
  97. package/lib/components/t-form-input/elements/mscoa-form-input/mscoa-form-input.component.d.ts +4 -3
  98. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-actions.d.ts +5 -5
  99. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-component-store.service.d.ts +27 -31
  100. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-effects.d.ts +2 -2
  101. package/lib/components/t-form-input/elements/mscoa-form-input/store/mscoa-selectors.d.ts +20 -24
  102. package/lib/components/t-form-input/elements/multiple-input-input-element/core/multiple-input-table-edit/multiple-input-table-edit.component.d.ts +1 -1
  103. package/lib/components/t-form-input/elements/select-input-element/elements/select-input/select-input.component.d.ts +20 -0
  104. package/lib/components/t-form-input/elements/select-input-element/select-input-element.component.d.ts +0 -3
  105. package/lib/components/t-form-input/t-form-input.component.d.ts +3 -2
  106. package/lib/components/workflow-builder/store/workflow-builder-store.service.d.ts +18 -0
  107. package/lib/components/workflow-builder/store/workflowEditorActions.d.ts +4 -0
  108. package/lib/components/workflow-builder/store/workflowEditorEffects.d.ts +2 -0
  109. package/lib/components/workflow-builder/store/workflowEditorSelectors.d.ts +2 -0
  110. package/lib/components/workflow-builder/workflow-builder.component.d.ts +12 -0
  111. package/lib/services/core/t-form-builder/functions/addScoaExtensionInput.d.ts +2 -0
  112. package/lib/services/core/t-form-tower-controller/functions/allFormInputs.d.ts +2 -3
  113. package/lib/services/core/t-form-tower-controller/functions/getAllFunctionTypes.d.ts +2 -0
  114. package/package.json +3 -2
  115. package/fesm2022/ngx-t-forms-form-section-stepper.component-DEtijO30.mjs +0 -220
  116. package/fesm2022/ngx-t-forms-form-section-stepper.component-DEtijO30.mjs.map +0 -1
  117. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CYWVyEYn.mjs +0 -230
  118. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CYWVyEYn.mjs.map +0 -1
  119. package/fesm2022/ngx-t-forms-ngx-t-forms-R8Bkco8q.mjs.map +0 -1
@@ -0,0 +1,187 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, Optional, Self, Output, Input, HostBinding } from '@angular/core';
3
+ import { Subject, BehaviorSubject, take, tap } from 'rxjs';
4
+ import * as i2 from '@angular/common';
5
+ import { CommonModule } from '@angular/common';
6
+ import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-DaAFB-HX.mjs';
7
+ import { map } from 'rxjs/operators';
8
+ import { g as getInputIllustration } from './ngx-t-forms-getInputIllustration-GCSKx5e5.mjs';
9
+ import { MatFormFieldControl } from '@angular/material/form-field';
10
+ import * as i1 from '@angular/forms';
11
+ import * as i4 from '@angular/material/divider';
12
+ import * as i3 from '@angular/material/core';
13
+ import * as i6 from '@angular/material/icon';
14
+ import * as i6$1 from '@angular/material/list';
15
+ import * as i8 from '@angular/material/tooltip';
16
+
17
+ const _forTrack0 = ($index, $item) => $item.id;
18
+ function FormInputSelectorComponent_For_2_span_4_Template(rf, ctx) { if (rf & 1) {
19
+ i0.ɵɵelementStart(0, "span", 7);
20
+ i0.ɵɵtext(1, " Item List Input ");
21
+ i0.ɵɵelementEnd();
22
+ } }
23
+ function FormInputSelectorComponent_For_2_Template(rf, ctx) { if (rf & 1) {
24
+ const _r1 = i0.ɵɵgetCurrentView();
25
+ i0.ɵɵelementStart(0, "mat-list-item", 1);
26
+ i0.ɵɵlistener("click", function FormInputSelectorComponent_For_2_Template_mat_list_item_click_0_listener() { const input_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.selectInput(input_r2.id)); });
27
+ i0.ɵɵelement(1, "img", 2);
28
+ i0.ɵɵelementStart(2, "span", 3);
29
+ i0.ɵɵtext(3);
30
+ i0.ɵɵelementEnd();
31
+ i0.ɵɵtemplate(4, FormInputSelectorComponent_For_2_span_4_Template, 2, 0, "span", 4);
32
+ i0.ɵɵelementStart(5, "span", 5)(6, "mat-icon", 6);
33
+ i0.ɵɵtext(7);
34
+ i0.ɵɵelementEnd()()();
35
+ i0.ɵɵelement(8, "mat-divider");
36
+ } if (rf & 2) {
37
+ const input_r2 = ctx.$implicit;
38
+ const ctx_r2 = i0.ɵɵnextContext();
39
+ i0.ɵɵproperty("disabled", ctx_r2.disabled)("activated", input_r2.selected);
40
+ i0.ɵɵadvance();
41
+ i0.ɵɵproperty("src", input_r2.illustration, i0.ɵɵsanitizeUrl)("alt", input_r2.label);
42
+ i0.ɵɵadvance(2);
43
+ i0.ɵɵtextInterpolate1(" ", input_r2.label, " ");
44
+ i0.ɵɵadvance();
45
+ i0.ɵɵproperty("ngIf", input_r2.multipleInputInEditId);
46
+ i0.ɵɵadvance(2);
47
+ i0.ɵɵproperty("color", input_r2.selected ? "primary" : "");
48
+ i0.ɵɵadvance();
49
+ i0.ɵɵtextInterpolate1(" ", input_r2.selected ? "check_circle" : "radio_button_unchecked", " ");
50
+ } }
51
+ function FormInputSelectorComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
52
+ i0.ɵɵelementStart(0, "mat-list-item")(1, "span", 8);
53
+ i0.ɵɵtext(2, " No form inputs found ");
54
+ i0.ɵɵelementEnd()();
55
+ } }
56
+ class FormInputSelectorComponent {
57
+ static { this.nextId = 0; }
58
+ constructor(ngControl, _elementRef) {
59
+ this.ngControl = ngControl;
60
+ this._elementRef = _elementRef;
61
+ this.stateChanges = new Subject();
62
+ this.errors = [];
63
+ this.id = `lib-form-input-selector-${FormInputSelectorComponent.nextId++}`;
64
+ this.placeholder = '';
65
+ this.focused = false;
66
+ this.required = false;
67
+ this.touched = false;
68
+ this.onTouched = () => { };
69
+ this._value = new BehaviorSubject(undefined);
70
+ this.formInputs = [];
71
+ this.disabled = false;
72
+ this.change = new EventEmitter();
73
+ }
74
+ get empty() {
75
+ return !this.value;
76
+ }
77
+ get shouldLabelFloat() {
78
+ return this.focused || !this.empty;
79
+ }
80
+ get errorState() {
81
+ const hasError = !!this.ngControl?.control?.errors || (this.errors || []).length > 0 && this.touched;
82
+ return !this.value && !!this.required || hasError;
83
+ }
84
+ setDescribedByIds(ids) {
85
+ // Ensure the component view is initialized
86
+ if (this._elementRef && this._elementRef.nativeElement) {
87
+ const controlElement = this._elementRef.nativeElement.querySelector('.lib-form-input-selector');
88
+ // Check if the controlElement exists before attempting to set its attribute
89
+ if (controlElement) {
90
+ controlElement.setAttribute('aria-describedby', ids.join(' '));
91
+ }
92
+ }
93
+ }
94
+ onContainerClick(event) {
95
+ this.markAsTouched();
96
+ this.stateChanges.next();
97
+ }
98
+ markAsTouched() {
99
+ console.log('markAsTouched');
100
+ if (!this.touched) {
101
+ this.onTouched();
102
+ this.touched = true;
103
+ }
104
+ }
105
+ set value(value) {
106
+ if (this._value.getValue() === value) {
107
+ return;
108
+ }
109
+ this._value.next(value);
110
+ }
111
+ get value() {
112
+ return this._value.getValue();
113
+ }
114
+ get value$() {
115
+ return this._value.asObservable();
116
+ }
117
+ selectInput(id) {
118
+ this.value$.pipe(take(1), tap((value) => {
119
+ if (value === id) {
120
+ this.change.emit(undefined);
121
+ return;
122
+ }
123
+ this.change.emit(id);
124
+ })).subscribe();
125
+ }
126
+ get filteredInputs$() {
127
+ return this.value$.pipe(map((value) => {
128
+ const inputs = () => {
129
+ const selectedInput = this.formInputs.find((input) => input.id === value);
130
+ if (selectedInput) {
131
+ return [{ ...selectedInput, selected: true, illustration: this.getInputIllustration(selectedInput) }];
132
+ }
133
+ return this.formInputs.map(input => ({ ...input, selected: false, illustration: this.getInputIllustration(input) }));
134
+ };
135
+ return inputs().map((input) => {
136
+ return {
137
+ ...input,
138
+ illustration: this.getInputIllustration(input)
139
+ };
140
+ });
141
+ }));
142
+ }
143
+ getInputIllustration(input) {
144
+ return getInputIllustration(input.element);
145
+ }
146
+ static { this.ɵfac = function FormInputSelectorComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FormInputSelectorComponent)(i0.ɵɵdirectiveInject(i1.NgControl, 10), i0.ɵɵdirectiveInject(i0.ElementRef)); }; }
147
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormInputSelectorComponent, selectors: [["lib-form-input-selector"]], hostVars: 1, hostBindings: function FormInputSelectorComponent_HostBindings(rf, ctx) { if (rf & 2) {
148
+ i0.ɵɵhostProperty("id", ctx.id);
149
+ } }, inputs: { errors: "errors", value: "value", formInputs: "formInputs", disabled: "disabled" }, outputs: { change: "change" }, features: [i0.ɵɵProvidersFeature([{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }])], decls: 6, vars: 5, consts: [[1, "inputList"], ["matRipple", "", "matTooltip", "Select form input", 3, "click", "disabled", "activated"], ["matListItemAvatar", "", 2, "margin-left", "8px", 3, "src", "alt"], ["matListItemTitle", ""], ["matListItemLine", "", 4, "ngIf"], ["matListItemMeta", ""], [3, "color"], ["matListItemLine", ""], ["matLine", ""]], template: function FormInputSelectorComponent_Template(rf, ctx) { if (rf & 1) {
150
+ i0.ɵɵelementStart(0, "mat-nav-list", 0);
151
+ i0.ɵɵrepeaterCreate(1, FormInputSelectorComponent_For_2_Template, 9, 8, null, null, _forTrack0);
152
+ i0.ɵɵpipe(3, "async");
153
+ i0.ɵɵtemplate(4, FormInputSelectorComponent_Conditional_4_Template, 3, 0, "mat-list-item");
154
+ i0.ɵɵpipe(5, "async");
155
+ i0.ɵɵelementEnd();
156
+ } if (rf & 2) {
157
+ let tmp_1_0;
158
+ i0.ɵɵadvance();
159
+ i0.ɵɵrepeater(i0.ɵɵpipeBind1(3, 1, ctx.filteredInputs$));
160
+ i0.ɵɵadvance(3);
161
+ i0.ɵɵconditional(((tmp_1_0 = i0.ɵɵpipeBind1(5, 3, ctx.filteredInputs$)) == null ? null : tmp_1_0.length) === 0 ? 4 : -1);
162
+ } }, dependencies: [CommonModule, i2.NgIf, i2.AsyncPipe, MatModulesModule, i4.MatDivider, i3.MatLine, i6.MatIcon, i6$1.MatNavList, i6$1.MatListItem, i6$1.MatListItemAvatar, i6$1.MatListItemLine, i6$1.MatListItemTitle, i6$1.MatListItemMeta, i3.MatRipple, i8.MatTooltip], styles: ["mat-nav-list[_ngcontent-%COMP%]{max-height:600px;overflow:auto}"] }); }
163
+ }
164
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormInputSelectorComponent, [{
165
+ type: Component,
166
+ args: [{ selector: 'lib-form-input-selector', standalone: true, imports: [CommonModule, MatModulesModule], providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }], template: "\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n", styles: ["mat-nav-list{max-height:600px;overflow:auto}\n"] }]
167
+ }], () => [{ type: i1.NgControl, decorators: [{
168
+ type: Optional
169
+ }, {
170
+ type: Self
171
+ }] }, { type: i0.ElementRef }], { errors: [{
172
+ type: Input
173
+ }], id: [{
174
+ type: HostBinding
175
+ }], value: [{
176
+ type: Input
177
+ }], formInputs: [{
178
+ type: Input
179
+ }], disabled: [{
180
+ type: Input
181
+ }], change: [{
182
+ type: Output
183
+ }] }); })();
184
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FormInputSelectorComponent, { className: "FormInputSelectorComponent", filePath: "lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.ts", lineNumber: 24 }); })();
185
+
186
+ export { FormInputSelectorComponent };
187
+ //# sourceMappingURL=ngx-t-forms-form-input-selector.component-BjwzDiCY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-form-input-selector.component-BjwzDiCY.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.html","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.ts"],"sourcesContent":["\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n","import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { BehaviorSubject, Observable, Subject, take, tap } from 'rxjs';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { map } from 'rxjs/operators';\r\nimport { getInputIllustration } from '../../../../shared/functions/getInputIllustration';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\ninterface IFormColumnUiList extends FormColumnInputs {\r\n selected: boolean,\r\n illustration: string\r\n}\r\n@Component({\r\n selector: 'lib-form-input-selector',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule],\r\n templateUrl: './form-input-selector.component.html',\r\n styleUrl: './form-input-selector.component.css',\r\n providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }],\r\n})\r\nexport class FormInputSelectorComponent implements MatFormFieldControl<string | undefined> {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @HostBinding() id = `lib-form-input-selector-${FormInputSelectorComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.lib-form-input-selector');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n _value = new BehaviorSubject<string | undefined>(undefined)\r\n @Input() set value(value: string | undefined) {\r\n if (this._value.getValue() === value) {\r\n return\r\n }\r\n this._value.next(value)\r\n }\r\n get value() {\r\n return this._value.getValue()\r\n }\r\n get value$() {\r\n return this._value.asObservable()\r\n\r\n }\r\n @Input() formInputs: Array<FormColumnInputs> = []\r\n @Input() disabled: boolean = false\r\n @Output() change = new EventEmitter<any>()\r\n selectInput(id: string) {\r\n this.value$.pipe(\r\n take(1),\r\n tap((value) => {\r\n if (value === id) {\r\n this.change.emit(undefined)\r\n return;\r\n }\r\n this.change.emit(id)\r\n })\r\n ).subscribe()\r\n\r\n }\r\n get filteredInputs$():Observable<Array<IFormColumnUiList>> {\r\n return this.value$.pipe(\r\n map((value: string | undefined) => {\r\n const inputs = () => {\r\n const selectedInput = this.formInputs.find((input) => input.id === value)\r\n if (selectedInput) {\r\n return [{ ...selectedInput, selected: true , illustration: this.getInputIllustration(selectedInput) }]\r\n }\r\n return this.formInputs.map(input => ({ ...input, selected: false, illustration: this.getInputIllustration(input) }))\r\n }\r\n return inputs().map(\r\n (input) => {\r\n return {\r\n ...input,\r\n illustration: this.getInputIllustration(input)\r\n }\r\n\r\n })}\r\n\r\n )\r\n )\r\n }\r\n getInputIllustration(input: FormColumnInputs) {\r\n return getInputIllustration(input.element)\r\n }\r\n}\r\n"],"names":["i3","i4","i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;;;IAgBgB,EAA0D,CAAA,cAAA,CAAA,CAAA,EAAA,MAAA,EAAA,CAAA,CAAA;IACtD,EACJ,CAAA,MAAA,CAAA,CAAA,EAAA,mBAAA,CAAA;IAAA,EAAO,CAAA,YAAA,EAAA;;;;IAdX,EAIyC,CAAA,cAAA,CAAA,CAAA,EAAA,eAAA,EAAA,CAAA,CAAA;AAFzC,IAAA,EAAA,CAAA,UAAA,CAAA,OAAA,EAAA,SAAA,wEAAA,GAAA,EAAA,MAAA,QA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,yBAAyB,cACvB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAG7B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,0BAA4B,EAAE,CAAC,EAAA,QAAA,EAAA,m7CAAA,EAAA,MAAA,EAAA,CAAA,gDAAA,CAAA,EAAA;;sBAU1E;;sBAAY;8CAJd,MAAM,EAAA,CAAA;kBAAd;YACY,EAAE,EAAA,CAAA;kBAAhB;YAkDY,KAAK,EAAA,CAAA;kBAAjB;YAaQ,UAAU,EAAA,CAAA;kBAAlB;YACQ,QAAQ,EAAA,CAAA;kBAAhB;YACS,MAAM,EAAA,CAAA;kBAAf;;kFAtEU,0BAA0B,EAAA,EAAA,SAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,kGAAA,EAAA,UAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;;;"}
@@ -3,15 +3,15 @@ import { EventEmitter, Output, Input, HostBinding, Optional, Self, Component } f
3
3
  import { Subject, BehaviorSubject, take, tap } from 'rxjs';
4
4
  import * as i2 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
- import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-R8Bkco8q.mjs';
6
+ import { M as MatModulesModule } from './ngx-t-forms-ngx-t-forms-1Roar4qK.mjs';
7
7
  import { map } from 'rxjs/operators';
8
8
  import { g as getInputIllustration } from './ngx-t-forms-getInputIllustration-GCSKx5e5.mjs';
9
9
  import { MatFormFieldControl } from '@angular/material/form-field';
10
10
  import * as i1 from '@angular/forms';
11
11
  import * as i4 from '@angular/material/divider';
12
- import * as i2$1 from '@angular/material/core';
13
- import * as i5 from '@angular/material/icon';
14
- import * as i6 from '@angular/material/list';
12
+ import * as i3 from '@angular/material/core';
13
+ import * as i6 from '@angular/material/icon';
14
+ import * as i6$1 from '@angular/material/list';
15
15
  import * as i8 from '@angular/material/tooltip';
16
16
 
17
17
  class FormInputSelectorComponent {
@@ -105,7 +105,7 @@ class FormInputSelectorComponent {
105
105
  return getInputIllustration(input.element);
106
106
  }
107
107
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FormInputSelectorComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
108
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: FormInputSelectorComponent, isStandalone: true, selector: "lib-form-input-selector", inputs: { errors: "errors", value: "value", formInputs: "formInputs", disabled: "disabled" }, outputs: { change: "change" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }], ngImport: i0, template: "\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n", styles: ["mat-nav-list{max-height:600px;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i2$1.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i6.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: i2$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
108
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: FormInputSelectorComponent, isStandalone: true, selector: "lib-form-input-selector", inputs: { errors: "errors", value: "value", formInputs: "formInputs", disabled: "disabled" }, outputs: { change: "change" }, host: { properties: { "id": "this.id" } }, providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }], ngImport: i0, template: "\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n", styles: ["mat-nav-list{max-height:600px;overflow:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatModulesModule }, { kind: "component", type: i4.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i3.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6$1.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6$1.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6$1.MatListItemAvatar, selector: "[matListItemAvatar]" }, { kind: "directive", type: i6$1.MatListItemLine, selector: "[matListItemLine]" }, { kind: "directive", type: i6$1.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6$1.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "directive", type: i3.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
109
109
  }
110
110
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: FormInputSelectorComponent, decorators: [{
111
111
  type: Component,
@@ -129,4 +129,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
129
129
  }] } });
130
130
 
131
131
  export { FormInputSelectorComponent };
132
- //# sourceMappingURL=ngx-t-forms-form-input-selector.component-CR3ZVWLw.mjs.map
132
+ //# sourceMappingURL=ngx-t-forms-form-input-selector.component-CB03sPjA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-form-input-selector.component-CR3ZVWLw.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { BehaviorSubject, Observable, Subject, take, tap } from 'rxjs';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { map } from 'rxjs/operators';\r\nimport { getInputIllustration } from '../../../../shared/functions/getInputIllustration';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\ninterface IFormColumnUiList extends FormColumnInputs {\r\n selected: boolean,\r\n illustration: string\r\n}\r\n@Component({\r\n selector: 'lib-form-input-selector',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule],\r\n templateUrl: './form-input-selector.component.html',\r\n styleUrl: './form-input-selector.component.css',\r\n providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }],\r\n})\r\nexport class FormInputSelectorComponent implements MatFormFieldControl<string | undefined> {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @HostBinding() id = `lib-form-input-selector-${FormInputSelectorComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.lib-form-input-selector');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n _value = new BehaviorSubject<string | undefined>(undefined)\r\n @Input() set value(value: string | undefined) {\r\n if (this._value.getValue() === value) {\r\n return\r\n }\r\n this._value.next(value)\r\n }\r\n get value() {\r\n return this._value.getValue()\r\n }\r\n get value$() {\r\n return this._value.asObservable()\r\n\r\n }\r\n @Input() formInputs: Array<FormColumnInputs> = []\r\n @Input() disabled: boolean = false\r\n @Output() change = new EventEmitter<any>()\r\n selectInput(id: string) {\r\n this.value$.pipe(\r\n take(1),\r\n tap((value) => {\r\n if (value === id) {\r\n this.change.emit(undefined)\r\n return;\r\n }\r\n this.change.emit(id)\r\n })\r\n ).subscribe()\r\n\r\n }\r\n get filteredInputs$():Observable<Array<IFormColumnUiList>> {\r\n return this.value$.pipe(\r\n map((value: string | undefined) => {\r\n const inputs = () => {\r\n const selectedInput = this.formInputs.find((input) => input.id === value)\r\n if (selectedInput) {\r\n return [{ ...selectedInput, selected: true , illustration: this.getInputIllustration(selectedInput) }]\r\n }\r\n return this.formInputs.map(input => ({ ...input, selected: false, illustration: this.getInputIllustration(input) }))\r\n }\r\n return inputs().map(\r\n (input) => {\r\n return {\r\n ...input,\r\n illustration: this.getInputIllustration(input)\r\n }\r\n\r\n })}\r\n\r\n )\r\n )\r\n }\r\n getInputIllustration(input: FormColumnInputs) {\r\n return getInputIllustration(input.element)\r\n }\r\n}\r\n","\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n"],"names":["i3","i4","i7"],"mappings":";;;;;;;;;;;;;;;;MAuBa,0BAA0B,CAAA;aAE9B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QACvB,IAAM,CAAA,MAAA,GAAoC,EAAE;AACxC,QAAA,IAAA,CAAA,EAAE,GAAG,CAA2B,wBAAA,EAAA,0BAA0B,CAAE,MAAM,EAAE,EAAE;QAErF,IAAW,CAAA,WAAA,GAAW,EAAE;QAExB,IAAO,CAAA,OAAA,GAAY,KAAK;QAOxB,IAAQ,CAAA,QAAA,GAAY,KAAK;QAyBzB,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAK,GAAG;AAYpB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,eAAe,CAAqB,SAAS,CAAC;QAclD,IAAU,CAAA,UAAA,GAA4B,EAAE;QACxC,IAAQ,CAAA,QAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAO;;AA5D1C,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,CAAC,IAAI,CAAC,KAAK;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A,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAK7B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBARtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,cACvB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAG7B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,0BAA4B,EAAE,CAAC,EAAA,QAAA,EAAA,m7CAAA,EAAA,MAAA,EAAA,CAAA,gDAAA,CAAA,EAAA;;0BAU1E;;0BAAY;kEAJd,MAAM,EAAA,CAAA;sBAAd;gBACY,EAAE,EAAA,CAAA;sBAAhB;gBAkDY,KAAK,EAAA,CAAA;sBAAjB;gBAaQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,MAAM,EAAA,CAAA;sBAAf;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-form-input-selector.component-CB03sPjA.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/form-input-selector/form-input-selector.component.html"],"sourcesContent":["import { Component, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, Self } from '@angular/core';\r\nimport { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { BehaviorSubject, Observable, Subject, take, tap } from 'rxjs';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\nimport { map } from 'rxjs/operators';\r\nimport { getInputIllustration } from '../../../../shared/functions/getInputIllustration';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { NgControl } from '@angular/forms';\r\nimport { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\ninterface IFormColumnUiList extends FormColumnInputs {\r\n selected: boolean,\r\n illustration: string\r\n}\r\n@Component({\r\n selector: 'lib-form-input-selector',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule],\r\n templateUrl: './form-input-selector.component.html',\r\n styleUrl: './form-input-selector.component.css',\r\n providers: [{ provide: MatFormFieldControl, useExisting: FormInputSelectorComponent }],\r\n})\r\nexport class FormInputSelectorComponent implements MatFormFieldControl<string | undefined> {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n @Input() errors:IConfigElementError[] |undefined = [];\r\n @HostBinding() id = `lib-form-input-selector-${FormInputSelectorComponent .nextId++}`;\r\n \r\n placeholder: string = ''\r\n constructor(@Optional() @Self() public ngControl: NgControl, private _elementRef: ElementRef<HTMLElement>,) { }\r\n focused: boolean = false;\r\n get empty() {\r\n return !this.value\r\n }\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n required: boolean = false;\r\nget errorState(): boolean {\r\n const hasError = !!this.ngControl?.control?.errors || (this.errors||[]).length > 0 && this.touched\r\n return !this.value && !!this.required || hasError\r\n }\r\n\r\n controlType?: string | undefined;\r\n autofilled?: boolean | undefined;\r\n userAriaDescribedBy?: string | undefined;\r\n disableAutomaticLabeling?: boolean | undefined;\r\n setDescribedByIds(ids: string[]) {\r\n // Ensure the component view is initialized\r\n if (this._elementRef && this._elementRef.nativeElement) {\r\n const controlElement = this._elementRef.nativeElement.querySelector('.lib-form-input-selector');\r\n // Check if the controlElement exists before attempting to set its attribute\r\n if (controlElement) {\r\n controlElement.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n }\r\n onContainerClick(event: MouseEvent): void {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n\r\n touched: boolean = false;\r\n onTouched = () => {};\r\n markAsTouched() {\r\n console.log('markAsTouched') \r\n if (!this.touched) {\r\n this.onTouched();\r\n this.touched = true;\r\n }\r\n } \r\n\r\n\r\n\r\n\r\n _value = new BehaviorSubject<string | undefined>(undefined)\r\n @Input() set value(value: string | undefined) {\r\n if (this._value.getValue() === value) {\r\n return\r\n }\r\n this._value.next(value)\r\n }\r\n get value() {\r\n return this._value.getValue()\r\n }\r\n get value$() {\r\n return this._value.asObservable()\r\n\r\n }\r\n @Input() formInputs: Array<FormColumnInputs> = []\r\n @Input() disabled: boolean = false\r\n @Output() change = new EventEmitter<any>()\r\n selectInput(id: string) {\r\n this.value$.pipe(\r\n take(1),\r\n tap((value) => {\r\n if (value === id) {\r\n this.change.emit(undefined)\r\n return;\r\n }\r\n this.change.emit(id)\r\n })\r\n ).subscribe()\r\n\r\n }\r\n get filteredInputs$():Observable<Array<IFormColumnUiList>> {\r\n return this.value$.pipe(\r\n map((value: string | undefined) => {\r\n const inputs = () => {\r\n const selectedInput = this.formInputs.find((input) => input.id === value)\r\n if (selectedInput) {\r\n return [{ ...selectedInput, selected: true , illustration: this.getInputIllustration(selectedInput) }]\r\n }\r\n return this.formInputs.map(input => ({ ...input, selected: false, illustration: this.getInputIllustration(input) }))\r\n }\r\n return inputs().map(\r\n (input) => {\r\n return {\r\n ...input,\r\n illustration: this.getInputIllustration(input)\r\n }\r\n\r\n })}\r\n\r\n )\r\n )\r\n }\r\n getInputIllustration(input: FormColumnInputs) {\r\n return getInputIllustration(input.element)\r\n }\r\n}\r\n","\r\n\r\n <mat-nav-list class=\"inputList\"> \r\n @for(input of filteredInputs$|async;track input.id){\r\n <mat-list-item \r\n [disabled]=\"disabled\"\r\n (click)=\"selectInput(input.id)\" \r\n [activated]=\"input.selected\"\r\n matRipple matTooltip=\"Select form input\">\r\n <img matListItemAvatar \r\n style=\"margin-left: 8px;\" [src]=\"input.illustration \"\r\n [alt]=\"input.label\">\r\n \r\n <span matListItemTitle >\r\n {{ input.label}}\r\n </span>\r\n <span *ngIf=\"input.multipleInputInEditId\" matListItemLine>\r\n Item List Input\r\n </span>\r\n <span matListItemMeta>\r\n <mat-icon [color]=\"input.selected?'primary':''\">\r\n \r\n {{input.selected?'check_circle':'radio_button_unchecked'}}\r\n \r\n </mat-icon>\r\n </span>\r\n \r\n </mat-list-item>\r\n <mat-divider></mat-divider>\r\n }\r\n @if((filteredInputs$|async)?.length===0){\r\n <mat-list-item>\r\n <span matLine>\r\n No form inputs found\r\n </span>\r\n </mat-list-item>\r\n }\r\n </mat-nav-list>\r\n\r\n"],"names":["i3","i4","i5","i6","i7"],"mappings":";;;;;;;;;;;;;;;;MAuBa,0BAA0B,CAAA;aAE9B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;IAMlB,WAAuC,CAAA,SAAoB,EAAU,WAAoC,EAAA;QAAlE,IAAS,CAAA,SAAA,GAAT,SAAS;QAAqB,IAAW,CAAA,WAAA,GAAX,WAAW;AALhF,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QACvB,IAAM,CAAA,MAAA,GAAoC,EAAE;AACxC,QAAA,IAAA,CAAA,EAAE,GAAG,CAA2B,wBAAA,EAAA,0BAA0B,CAAE,MAAM,EAAE,EAAE;QAErF,IAAW,CAAA,WAAA,GAAW,EAAE;QAExB,IAAO,CAAA,OAAA,GAAY,KAAK;QAOxB,IAAQ,CAAA,QAAA,GAAY,KAAK;QAyBzB,IAAO,CAAA,OAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAK,GAAG;AAYpB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,eAAe,CAAqB,SAAS,CAAC;QAclD,IAAU,CAAA,UAAA,GAA4B,EAAE;QACxC,IAAQ,CAAA,QAAA,GAAY,KAAK;AACxB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAO;;AA5D1C,IAAA,IAAI,KAAK,GAAA;AACP,QAAA,OAAO,CAAC,IAAI,CAAC,KAAK;;AAEpB,IAAA,IAAI,gBAAgB,GAAA;QAClB,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK;;AAGtC,IAAA,IAAI,UAAU,GAAA;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AAA;kBARtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,cACvB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAG7B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,0BAA4B,EAAE,CAAC,EAAA,QAAA,EAAA,m7CAAA,EAAA,MAAA,EAAA,CAAA,gDAAA,CAAA,EAAA;;0BAU1E;;0BAAY;kEAJd,MAAM,EAAA,CAAA;sBAAd;gBACY,EAAE,EAAA,CAAA;sBAAhB;gBAkDY,KAAK,EAAA,CAAA;sBAAjB;gBAaQ,UAAU,EAAA,CAAA;sBAAlB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACS,MAAM,EAAA,CAAA;sBAAf;;;;;"}
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Component } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
- import { F as FormsStoreService, M as MatModulesModule, b as TDynamicDataViewComponent } from './ngx-t-forms-ngx-t-forms-R8Bkco8q.mjs';
5
+ import { F as FormsStoreService, M as MatModulesModule, b as TDynamicDataViewComponent } from './ngx-t-forms-ngx-t-forms-1Roar4qK.mjs';
6
6
  import { map } from 'rxjs';
7
7
 
8
8
  class FormJsonViewComponent {
@@ -19,4 +19,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImpor
19
19
  }], ctorParameters: () => [{ type: FormsStoreService }] });
20
20
 
21
21
  export { FormJsonViewComponent };
22
- //# sourceMappingURL=ngx-t-forms-form-json-view.component-CMdtaqhR.mjs.map
22
+ //# sourceMappingURL=ngx-t-forms-form-json-view.component-C1AZujJH.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-form-json-view.component-CMdtaqhR.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.html"],"sourcesContent":["import { Component } from '@angular/core';\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\n\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\nimport { TDynamicDataViewComponent } from '../../../t-dynamic-data-view/t-dynamic-data-view.component';\r\n\r\nimport { map } from 'rxjs';\r\n\r\n\r\n\r\n@Component({\r\n selector: 'app-form-json-view',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, TDynamicDataViewComponent],\r\n templateUrl: './form-json-view.component.html',\r\n styleUrl: './form-json-view.component.scss',\r\n})\r\nexport class FormJsonViewComponent {\r\n\r\n form$ = this.store.selectors.selectFormInEdit$.pipe(\r\n map(form => form?.form)\r\n )\r\n constructor(private store: FormsStoreService) {\r\n \r\n }\r\n\r\n\r\n}\r\n","\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>"],"names":["i1.FormsStoreService"],"mappings":";;;;;;;MAmBa,qBAAqB,CAAA;AAKhC,IAAA,WAAA,CAAoB,KAAwB,EAAA;QAAxB,IAAK,CAAA,KAAA,GAAL,KAAK;QAHzB,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CACjD,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,IAAI,CAAC,CACxB;;8GAJU,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,8ECnBlC,gFACwE,EAAA,MAAA,EAAA,CAAA,mQAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDc5D,YAAY,EAAE,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,gBAAgB,+BAAE,yBAAyB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAIxD,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,CAAC,EAAA,QAAA,EAAA,gFAAA,EAAA,MAAA,EAAA,CAAA,mQAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-form-json-view.component-C1AZujJH.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.html"],"sourcesContent":["import { Component } from '@angular/core';\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\n\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\nimport { TDynamicDataViewComponent } from '../../../t-dynamic-data-view/t-dynamic-data-view.component';\r\n\r\nimport { map } from 'rxjs';\r\n\r\n\r\n\r\n@Component({\r\n selector: 'app-form-json-view',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, TDynamicDataViewComponent],\r\n templateUrl: './form-json-view.component.html',\r\n styleUrl: './form-json-view.component.scss',\r\n})\r\nexport class FormJsonViewComponent {\r\n\r\n form$ = this.store.selectors.selectFormInEdit$.pipe(\r\n map(form => form?.form)\r\n )\r\n constructor(private store: FormsStoreService) {\r\n \r\n }\r\n\r\n\r\n}\r\n","\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>"],"names":["i1.FormsStoreService"],"mappings":";;;;;;;MAmBa,qBAAqB,CAAA;AAKhC,IAAA,WAAA,CAAoB,KAAwB,EAAA;QAAxB,IAAK,CAAA,KAAA,GAAL,KAAK;QAHzB,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CACjD,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,IAAI,CAAC,CACxB;;8GAJU,qBAAqB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,8ECnBlC,gFACwE,EAAA,MAAA,EAAA,CAAA,mQAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDc5D,YAAY,EAAE,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,gBAAgB,+BAAE,yBAAyB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAIxD,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,CAAC,EAAA,QAAA,EAAA,gFAAA,EAAA,MAAA,EAAA,CAAA,mQAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,28 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
5
+ import { F as FormsStoreService, M as MatModulesModule, b as TDynamicDataViewComponent } from './ngx-t-forms-ngx-t-forms-DaAFB-HX.mjs';
6
+ import { map } from 'rxjs';
7
+
8
+ class FormJsonViewComponent {
9
+ constructor(store) {
10
+ this.store = store;
11
+ this.form$ = this.store.selectors.selectFormInEdit$.pipe(map(form => form?.form));
12
+ }
13
+ static { this.ɵfac = function FormJsonViewComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FormJsonViewComponent)(i0.ɵɵdirectiveInject(FormsStoreService)); }; }
14
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormJsonViewComponent, selectors: [["app-form-json-view"]], decls: 2, vars: 3, consts: [[3, "data"]], template: function FormJsonViewComponent_Template(rf, ctx) { if (rf & 1) {
15
+ i0.ɵɵelement(0, "lib-t-dynamic-data-view", 0);
16
+ i0.ɵɵpipe(1, "async");
17
+ } if (rf & 2) {
18
+ i0.ɵɵproperty("data", i0.ɵɵpipeBind1(1, 1, ctx.form$));
19
+ } }, dependencies: [CommonModule, i2.AsyncPipe, MatModulesModule, TDynamicDataViewComponent], styles: ["pre[_ngcontent-%COMP%]{margin:0;border:1px solid #ccc;background-color:#353535;padding:10px}code[_ngcontent-%COMP%]{color:#b0e0e6;font-size:14px}.token.punctuation[_ngcontent-%COMP%]{color:#999}.token.property[_ngcontent-%COMP%]{color:#905}.token.string[_ngcontent-%COMP%]{color:#690}.token.number[_ngcontent-%COMP%], .token.boolean[_ngcontent-%COMP%]{color:#905}.token.keyword[_ngcontent-%COMP%]{color:#07a}"] }); }
20
+ }
21
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormJsonViewComponent, [{
22
+ type: Component,
23
+ args: [{ selector: 'app-form-json-view', standalone: true, imports: [CommonModule, MatModulesModule, TDynamicDataViewComponent], template: "\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>", styles: ["pre{margin:0;border:1px solid #ccc;background-color:#353535;padding:10px}code{color:#b0e0e6;font-size:14px}.token.punctuation{color:#999}.token.property{color:#905}.token.string{color:#690}.token.number,.token.boolean{color:#905}.token.keyword{color:#07a}\n"] }]
24
+ }], () => [{ type: FormsStoreService }], null); })();
25
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FormJsonViewComponent, { className: "FormJsonViewComponent", filePath: "lib/components/form-builder/elements/form-json-view/form-json-view.component.ts", lineNumber: 20 }); })();
26
+
27
+ export { FormJsonViewComponent };
28
+ //# sourceMappingURL=ngx-t-forms-form-json-view.component-CqtTYCRH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-form-json-view.component-CqtTYCRH.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.ts","../../../projects/ngx-t-forms/src/lib/components/form-builder/elements/form-json-view/form-json-view.component.html"],"sourcesContent":["import { Component } from '@angular/core';\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatModulesModule } from '../../../../shared/modules/mat-modules.module';\r\n\r\nimport { FormsStoreService } from '../../../forms/store/forms-store.service';\r\nimport { TDynamicDataViewComponent } from '../../../t-dynamic-data-view/t-dynamic-data-view.component';\r\n\r\nimport { map } from 'rxjs';\r\n\r\n\r\n\r\n@Component({\r\n selector: 'app-form-json-view',\r\n standalone: true,\r\n imports: [CommonModule, MatModulesModule, TDynamicDataViewComponent],\r\n templateUrl: './form-json-view.component.html',\r\n styleUrl: './form-json-view.component.scss',\r\n})\r\nexport class FormJsonViewComponent {\r\n\r\n form$ = this.store.selectors.selectFormInEdit$.pipe(\r\n map(form => form?.form)\r\n )\r\n constructor(private store: FormsStoreService) {\r\n \r\n }\r\n\r\n\r\n}\r\n","\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>"],"names":["i1.FormsStoreService"],"mappings":";;;;;;;MAmBa,qBAAqB,CAAA;AAKhC,IAAA,WAAA,CAAoB,KAAwB,EAAA;QAAxB,IAAK,CAAA,KAAA,GAAL,KAAK;QAHzB,IAAK,CAAA,KAAA,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CACjD,GAAG,CAAC,IAAI,IAAI,IAAI,EAAE,IAAI,CAAC,CACxB;;sHAJU,qBAAqB,EAAA,EAAA,CAAA,iBAAA,CAAAA,iBAAA,CAAA,CAAA,CAAA,EAAA,CAAA;oEAArB,qBAAqB,EAAA,SAAA,EAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,CAAA,CAAA,EAAA,MAAA,CAAA,CAAA,EAAA,QAAA,EAAA,SAAA,8BAAA,CAAA,EAAA,EAAA,GAAA,EAAA,EAAA,IAAA,EAAA,GAAA,CAAA,EAAA;YClBlC,EAAwE,CAAA,SAAA,CAAA,CAAA,EAAA,yBAAA,EAAA,CAAA,CAAA;;;YAA/C,EAAoB,CAAA,UAAA,CAAA,MAAA,EAAA,EAAA,CAAA,WAAA,CAAA,CAAA,EAAA,CAAA,EAAA,GAAA,CAAA,KAAA,CAAA,CAAA;4BDcjC,YAAY,EAAA,EAAA,CAAA,SAAA,EAAE,gBAAgB,EAAE,yBAAyB,CAAA,EAAA,MAAA,EAAA,CAAA,0ZAAA,CAAA,EAAA,CAAA,CAAA;;iFAIxD,qBAAqB,EAAA,CAAA;cAPjC,SAAS;2BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EACP,OAAA,EAAA,CAAC,YAAY,EAAE,gBAAgB,EAAE,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