ngx-t-forms 3.1.7 → 3.1.8

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 (115) hide show
  1. package/fesm2022/{ngx-t-forms-api-endpoint-config.component-CCwUtGOH.mjs → ngx-t-forms-api-endpoint-config.component-B4a-L4Eq.mjs} +6 -6
  2. package/fesm2022/{ngx-t-forms-api-endpoint-config.component-CCwUtGOH.mjs.map → ngx-t-forms-api-endpoint-config.component-B4a-L4Eq.mjs.map} +1 -1
  3. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-BUCFidjW.mjs → ngx-t-forms-auto-complete-input-element.component-DqRunUz4.mjs} +4 -4
  4. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-BUCFidjW.mjs.map → ngx-t-forms-auto-complete-input-element.component-DqRunUz4.mjs.map} +1 -1
  5. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-C92Y7CW_.mjs → ngx-t-forms-basic-input-input-element.component-t8bTUgZ1.mjs} +14 -6
  6. package/fesm2022/ngx-t-forms-basic-input-input-element.component-t8bTUgZ1.mjs.map +1 -0
  7. package/fesm2022/ngx-t-forms-calculated-field-rules.component-PcjMdAKu.mjs +603 -0
  8. package/fesm2022/ngx-t-forms-calculated-field-rules.component-PcjMdAKu.mjs.map +1 -0
  9. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CWJMjBoK.mjs → ngx-t-forms-chip-options-creator-editor.component-Ca4rim_J.mjs} +2 -2
  10. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CWJMjBoK.mjs.map → ngx-t-forms-chip-options-creator-editor.component-Ca4rim_J.mjs.map} +1 -1
  11. package/fesm2022/{ngx-t-forms-conditional-display-config.component-zauBVptA.mjs → ngx-t-forms-conditional-display-config.component-Di7p76_n.mjs} +2 -2
  12. package/fesm2022/{ngx-t-forms-conditional-display-config.component-zauBVptA.mjs.map → ngx-t-forms-conditional-display-config.component-Di7p76_n.mjs.map} +1 -1
  13. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-C096Ib2V.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-CXMmDwKS.mjs} +2 -2
  14. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-C096Ib2V.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-CXMmDwKS.mjs.map} +1 -1
  15. package/fesm2022/{ngx-t-forms-data-source-picker.component-WkSQqjd-.mjs → ngx-t-forms-data-source-picker.component-DioXvLi3.mjs} +6 -6
  16. package/fesm2022/{ngx-t-forms-data-source-picker.component-WkSQqjd-.mjs.map → ngx-t-forms-data-source-picker.component-DioXvLi3.mjs.map} +1 -1
  17. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-Dtzq25sw.mjs → ngx-t-forms-date-picker-input-element.component-h0S6qZDT.mjs} +6 -6
  18. package/fesm2022/ngx-t-forms-date-picker-input-element.component-h0S6qZDT.mjs.map +1 -0
  19. package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-W8KV-zoC.mjs → ngx-t-forms-date-range-picker-input-element.component-8c1ErbgP.mjs} +6 -6
  20. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-8c1ErbgP.mjs.map +1 -0
  21. package/fesm2022/{ngx-t-forms-date-time-picker-input-element.component-CQXZDwAo.mjs → ngx-t-forms-date-time-picker-input-element.component-BgjGlXeq.mjs} +7 -6
  22. package/fesm2022/ngx-t-forms-date-time-picker-input-element.component-BgjGlXeq.mjs.map +1 -0
  23. package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-3LcpNBQI.mjs → ngx-t-forms-document-list-label-config-editor.component-BhVM8PFR.mjs} +3 -3
  24. package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-3LcpNBQI.mjs.map → ngx-t-forms-document-list-label-config-editor.component-BhVM8PFR.mjs.map} +1 -1
  25. package/fesm2022/{ngx-t-forms-document-picker.component-CvATcveO.mjs → ngx-t-forms-document-picker.component-DYpsBHxT.mjs} +6 -254
  26. package/fesm2022/ngx-t-forms-document-picker.component-DYpsBHxT.mjs.map +1 -0
  27. package/fesm2022/{ngx-t-forms-editor-input-element.component-BqofP5-4.mjs → ngx-t-forms-editor-input-element.component-CzNSb79n.mjs} +5 -5
  28. package/fesm2022/{ngx-t-forms-editor-input-element.component-BqofP5-4.mjs.map → ngx-t-forms-editor-input-element.component-CzNSb79n.mjs.map} +1 -1
  29. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-BAQx2BLX.mjs → ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs} +7 -7
  30. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-BAQx2BLX.mjs.map → ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs.map} +1 -1
  31. package/fesm2022/{ngx-t-forms-form-input-selector.component-M6O7-j2Q.mjs → ngx-t-forms-form-input-selector.component-B3ES53R-.mjs} +2 -2
  32. package/fesm2022/{ngx-t-forms-form-input-selector.component-M6O7-j2Q.mjs.map → ngx-t-forms-form-input-selector.component-B3ES53R-.mjs.map} +1 -1
  33. package/fesm2022/{ngx-t-forms-form-json-view.component-Dd-EMosV.mjs → ngx-t-forms-form-json-view.component-Cu_ZEw1V.mjs} +2 -2
  34. package/fesm2022/{ngx-t-forms-form-json-view.component-Dd-EMosV.mjs.map → ngx-t-forms-form-json-view.component-Cu_ZEw1V.mjs.map} +1 -1
  35. package/fesm2022/{ngx-t-forms-form-section-stepper.component-B1dYMlCC.mjs → ngx-t-forms-form-section-stepper.component-DmTGnRgi.mjs} +4 -4
  36. package/fesm2022/{ngx-t-forms-form-section-stepper.component-B1dYMlCC.mjs.map → ngx-t-forms-form-section-stepper.component-DmTGnRgi.mjs.map} +1 -1
  37. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-S2qfSAT-.mjs → ngx-t-forms-forms-builder-menu.component-6m2BM9e9.mjs} +4 -4
  38. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-S2qfSAT-.mjs.map → ngx-t-forms-forms-builder-menu.component-6m2BM9e9.mjs.map} +1 -1
  39. package/fesm2022/ngx-t-forms-forms-native-date-adapter-CCJT5ep1.mjs +187 -0
  40. package/fesm2022/ngx-t-forms-forms-native-date-adapter-CCJT5ep1.mjs.map +1 -0
  41. package/fesm2022/{ngx-t-forms-geo-location.component-whY7YIMk.mjs → ngx-t-forms-geo-location.component-DgXSaH0t.mjs} +4 -4
  42. package/fesm2022/{ngx-t-forms-geo-location.component-whY7YIMk.mjs.map → ngx-t-forms-geo-location.component-DgXSaH0t.mjs.map} +1 -1
  43. package/fesm2022/{ngx-t-forms-header-template-editor.component-BLn_-jPM.mjs → ngx-t-forms-header-template-editor.component-NJLm6jkA.mjs} +2 -2
  44. package/fesm2022/{ngx-t-forms-header-template-editor.component-BLn_-jPM.mjs.map → ngx-t-forms-header-template-editor.component-NJLm6jkA.mjs.map} +1 -1
  45. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-D05NKiWm.mjs → ngx-t-forms-image-capture-input-element.component-iqPS9cPK.mjs} +4 -4
  46. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-D05NKiWm.mjs.map → ngx-t-forms-image-capture-input-element.component-iqPS9cPK.mjs.map} +1 -1
  47. package/fesm2022/{ngx-t-forms-index-BnK4nGDh.mjs → ngx-t-forms-index-zLon09cE.mjs} +2 -2
  48. package/fesm2022/ngx-t-forms-index-zLon09cE.mjs.map +1 -0
  49. package/fesm2022/{ngx-t-forms-input-custom.component-CGz6j56m.mjs → ngx-t-forms-input-custom.component-BOy_3JqU.mjs} +78 -23
  50. package/fesm2022/ngx-t-forms-input-custom.component-BOy_3JqU.mjs.map +1 -0
  51. package/fesm2022/{ngx-t-forms-input-editor.component-DxrkUbed.mjs → ngx-t-forms-input-editor.component-IUrZNmA5.mjs} +3 -3
  52. package/fesm2022/{ngx-t-forms-input-editor.component-DxrkUbed.mjs.map → ngx-t-forms-input-editor.component-IUrZNmA5.mjs.map} +1 -1
  53. package/fesm2022/{ngx-t-forms-map-mat-options-keys-Cu_L5CRA.mjs → ngx-t-forms-map-mat-options-keys-CtTAw9jk.mjs} +2 -2
  54. package/fesm2022/{ngx-t-forms-map-mat-options-keys-Cu_L5CRA.mjs.map → ngx-t-forms-map-mat-options-keys-CtTAw9jk.mjs.map} +1 -1
  55. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-B98Hv4M1.mjs → ngx-t-forms-mat-chip-list-editor.component-C9bxVpQ1.mjs} +2 -2
  56. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-B98Hv4M1.mjs.map → ngx-t-forms-mat-chip-list-editor.component-C9bxVpQ1.mjs.map} +1 -1
  57. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CSnHK6ZR.mjs → ngx-t-forms-missing-form-configs.component-BpiCchqY.mjs} +2 -2
  58. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CSnHK6ZR.mjs.map → ngx-t-forms-missing-form-configs.component-BpiCchqY.mjs.map} +1 -1
  59. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BUj7wGyx.mjs → ngx-t-forms-mscoa-chart-toolbar.component-CjUf0zTA.mjs} +2 -2
  60. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BUj7wGyx.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-CjUf0zTA.mjs.map} +1 -1
  61. package/fesm2022/{ngx-t-forms-mscoa-config.component-CBqzX9H7.mjs → ngx-t-forms-mscoa-config.component-soUwIbVA.mjs} +6 -6
  62. package/fesm2022/{ngx-t-forms-mscoa-config.component-CBqzX9H7.mjs.map → ngx-t-forms-mscoa-config.component-soUwIbVA.mjs.map} +1 -1
  63. package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-Cr1HXTjG.mjs → ngx-t-forms-mscoa-segment-config.component--3DvQm1K.mjs} +2 -2
  64. package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-Cr1HXTjG.mjs.map → ngx-t-forms-mscoa-segment-config.component--3DvQm1K.mjs.map} +1 -1
  65. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BZxpJRxJ.mjs +2472 -0
  66. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BZxpJRxJ.mjs.map +1 -0
  67. package/fesm2022/{ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs → ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs} +3890 -434
  68. package/fesm2022/ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs.map +1 -0
  69. package/fesm2022/{ngx-t-forms-paginated-selection-table-lMTD1N6B.mjs → ngx-t-forms-paginated-selection-table-DzZE-Zde.mjs} +8 -6
  70. package/fesm2022/ngx-t-forms-paginated-selection-table-DzZE-Zde.mjs.map +1 -0
  71. package/fesm2022/{ngx-t-forms-payload-template-editor.component-Dx0pI0A1.mjs → ngx-t-forms-payload-template-editor.component-CVj-G4MC.mjs} +2 -2
  72. package/fesm2022/{ngx-t-forms-payload-template-editor.component-Dx0pI0A1.mjs.map → ngx-t-forms-payload-template-editor.component-CVj-G4MC.mjs.map} +1 -1
  73. package/fesm2022/{ngx-t-forms-pipeline-generator.component-VySkMHQI.mjs → ngx-t-forms-pipeline-generator.component-BMyZKOXv.mjs} +2 -2
  74. package/fesm2022/{ngx-t-forms-pipeline-generator.component-VySkMHQI.mjs.map → ngx-t-forms-pipeline-generator.component-BMyZKOXv.mjs.map} +1 -1
  75. package/fesm2022/{ngx-t-forms-quill-input.component-BLaPFcJE.mjs → ngx-t-forms-quill-input.component-oUnmMDGi.mjs} +2 -2
  76. package/fesm2022/{ngx-t-forms-quill-input.component-BLaPFcJE.mjs.map → ngx-t-forms-quill-input.component-oUnmMDGi.mjs.map} +1 -1
  77. package/fesm2022/{ngx-t-forms-record-list-manager.component-qlizX9F4.mjs → ngx-t-forms-record-list-manager.component-CdQU6loA.mjs} +2 -2
  78. package/fesm2022/{ngx-t-forms-record-list-manager.component-qlizX9F4.mjs.map → ngx-t-forms-record-list-manager.component-CdQU6loA.mjs.map} +1 -1
  79. package/fesm2022/{ngx-t-forms-required-inputs.component-DY37Qrnj.mjs → ngx-t-forms-required-inputs.component-BtfEsmva.mjs} +2 -2
  80. package/fesm2022/{ngx-t-forms-required-inputs.component-DY37Qrnj.mjs.map → ngx-t-forms-required-inputs.component-BtfEsmva.mjs.map} +1 -1
  81. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CLYe2Lf_.mjs → ngx-t-forms-rest-api-call-setup.component-B5w1Lvfo.mjs} +2 -2
  82. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-CLYe2Lf_.mjs.map → ngx-t-forms-rest-api-call-setup.component-B5w1Lvfo.mjs.map} +1 -1
  83. package/fesm2022/{ngx-t-forms-section-report.component-foLHlD-I.mjs → ngx-t-forms-section-report.component-CocLNrN5.mjs} +2 -2
  84. package/fesm2022/{ngx-t-forms-section-report.component-foLHlD-I.mjs.map → ngx-t-forms-section-report.component-CocLNrN5.mjs.map} +1 -1
  85. package/fesm2022/{ngx-t-forms-select-input-element.component-CvrNfvXa.mjs → ngx-t-forms-select-input-element.component-B03O4cAK.mjs} +4 -4
  86. package/fesm2022/{ngx-t-forms-select-input-element.component-CvrNfvXa.mjs.map → ngx-t-forms-select-input-element.component-B03O4cAK.mjs.map} +1 -1
  87. package/fesm2022/{ngx-t-forms-selection-options-editor.component-D4luMX5c.mjs → ngx-t-forms-selection-options-editor.component-CBdC0WCz.mjs} +2 -2
  88. package/fesm2022/{ngx-t-forms-selection-options-editor.component-D4luMX5c.mjs.map → ngx-t-forms-selection-options-editor.component-CBdC0WCz.mjs.map} +1 -1
  89. package/fesm2022/{ngx-t-forms-textarea-input-element.component-BWyxWDvp.mjs → ngx-t-forms-textarea-input-element.component-GXiLEsTp.mjs} +4 -4
  90. package/fesm2022/{ngx-t-forms-textarea-input-element.component-BWyxWDvp.mjs.map → ngx-t-forms-textarea-input-element.component-GXiLEsTp.mjs.map} +1 -1
  91. package/fesm2022/{ngx-t-forms-toggle-input-element.component-CpYC2ivQ.mjs → ngx-t-forms-toggle-input-element.component-WErP0SsA.mjs} +4 -4
  92. package/fesm2022/{ngx-t-forms-toggle-input-element.component-CpYC2ivQ.mjs.map → ngx-t-forms-toggle-input-element.component-WErP0SsA.mjs.map} +1 -1
  93. package/fesm2022/{ngx-t-forms-token-text-input.component-BAjGepTM.mjs → ngx-t-forms-token-text-input.component-BMzPBtY_.mjs} +2 -2
  94. package/fesm2022/{ngx-t-forms-token-text-input.component-BAjGepTM.mjs.map → ngx-t-forms-token-text-input.component-BMzPBtY_.mjs.map} +1 -1
  95. package/fesm2022/{ngx-t-forms-validators-config.component-DVB88bgW.mjs → ngx-t-forms-validators-config.component-DWDBsV6a.mjs} +2 -2
  96. package/fesm2022/{ngx-t-forms-validators-config.component-DVB88bgW.mjs.map → ngx-t-forms-validators-config.component-DWDBsV6a.mjs.map} +1 -1
  97. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-LoF_fpHu.mjs → ngx-t-forms-workflow-adjudication.component-DxObFakZ.mjs} +76 -17
  98. package/fesm2022/ngx-t-forms-workflow-adjudication.component-DxObFakZ.mjs.map +1 -0
  99. package/fesm2022/ngx-t-forms.mjs +1 -1
  100. package/package.json +2 -2
  101. package/types/ngx-t-forms.d.ts +463 -99
  102. package/fesm2022/ngx-t-forms-basic-input-input-element.component-C92Y7CW_.mjs.map +0 -1
  103. package/fesm2022/ngx-t-forms-calculated-field-rules.component-33ZARq4R.mjs +0 -603
  104. package/fesm2022/ngx-t-forms-calculated-field-rules.component-33ZARq4R.mjs.map +0 -1
  105. package/fesm2022/ngx-t-forms-date-picker-input-element.component-Dtzq25sw.mjs.map +0 -1
  106. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-W8KV-zoC.mjs.map +0 -1
  107. package/fesm2022/ngx-t-forms-date-time-picker-input-element.component-CQXZDwAo.mjs.map +0 -1
  108. package/fesm2022/ngx-t-forms-document-picker.component-CvATcveO.mjs.map +0 -1
  109. package/fesm2022/ngx-t-forms-index-BnK4nGDh.mjs.map +0 -1
  110. package/fesm2022/ngx-t-forms-input-custom.component-CGz6j56m.mjs.map +0 -1
  111. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CfZLcuuu.mjs +0 -2336
  112. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CfZLcuuu.mjs.map +0 -1
  113. package/fesm2022/ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs.map +0 -1
  114. package/fesm2022/ngx-t-forms-paginated-selection-table-lMTD1N6B.mjs.map +0 -1
  115. package/fesm2022/ngx-t-forms-workflow-adjudication.component-LoF_fpHu.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, ElementRef, input, viewChild, computed, PLATFORM_ID, ChangeDetectionStrategy, Component, output } from '@angular/core';
3
- import * as i1 from '@angular/forms';
3
+ import * as i1$1 from '@angular/forms';
4
4
  import { NgControl, ReactiveFormsModule } from '@angular/forms';
5
5
  import * as i2$1 from '@angular/material/form-field';
6
6
  import { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
@@ -10,9 +10,9 @@ import * as i2 from '@angular/material/button';
10
10
  import { MatButtonModule } from '@angular/material/button';
11
11
  import * as i5 from '@angular/material/tooltip';
12
12
  import { MatTooltipModule } from '@angular/material/tooltip';
13
- import { B as BaseCustomInput, a4 as getInputErrorMessage, a5 as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs';
13
+ import { B as BaseCustomInput, a4 as getInputErrorMessage, a5 as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs';
14
14
  import { isPlatformBrowser } from '@angular/common';
15
- import * as i4 from '@angular/material/progress-bar';
15
+ import * as i1 from '@angular/material/progress-bar';
16
16
  import { MatProgressBarModule } from '@angular/material/progress-bar';
17
17
  import * as i8 from '@angular/material/toolbar';
18
18
  import { MatToolbarModule } from '@angular/material/toolbar';
@@ -176,7 +176,7 @@ class FileUploaderComponent extends BaseCustomInput {
176
176
  this.stateChanges.next();
177
177
  }
178
178
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FileUploaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
179
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FileUploaderComponent, isStandalone: true, selector: "lib-file-uploader", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.floating": "shouldLabelFloat", "id": "id" } }, providers: [{ provide: MatFormFieldControl, useExisting: FileUploaderComponent }], viewQueries: [{ propertyName: "uploader", first: true, predicate: ["uploader"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (loading) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n}\r\n\r\n@if (!shouldLabelFloat) {\r\n <section>\r\n <br>\r\n <div\r\n [style.border-color]=\"dragOver ? ' var(--mat-stepper-header-selected-state-icon-background-color)' : '#ccc;'\"\r\n (dragover)=\"onDragOver($event)\"\r\n (drop)=\"onDrop($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n class=\"drop-zone\">\r\n <div>\r\n <mat-icon>\r\n cloud_upload\r\n </mat-icon>\r\n </div>\r\n <div>\r\n @if (!!errorMessage) {\r\n <span class=\"mat-mdc-form-field-error\">\r\n {{ errorMessage }}\r\n </span>\r\n } @else {\r\n Drag and drop files or click to upload\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n}\r\n\r\n<input\r\n style=\"display: none\"\r\n hidden\r\n [readonly]=\"isReadOnly()\"\r\n [disabled]=\"isReadOnly()\"\r\n [type]=\"inputConfig().type || 'file'\"\r\n [accept]=\"uploadAccept()\"\r\n (change)=\"onFileSelected($event)\"\r\n #uploader\r\n/>\r\n\r\n@if (!!shouldLabelFloat) {\r\n <div\r\n [style.border-color]=\"dragOver ? 'var(--mat-stepper-header-selected-state-icon-background-color)' : '#ccc;'\"\r\n class=\"drop-zone\"\r\n (dragover)=\"onDragOver($event)\"\r\n (drop)=\"onDrop($event)\"\r\n (dragleave)=\"onDragLeave($event)\">\r\n <img style=\"width: 100%;\" [src]=\"previewSrc()\" alt=\"\">\r\n <mat-toolbar style=\" height: min-content !important;\">\r\n <mat-icon\r\n [style.color]=\"dragOver ? 'var(--mat-stepper-header-selected-state-icon-background-color)' : ''\">\r\n cloud_upload\r\n </mat-icon>\r\n <span class=\"spacer\"></span>\r\n <div style=\"padding: 8px;\">\r\n @if (!!fileName) {\r\n <div style=\"\r\n line-height: normal;width: 100%;\r\n white-space:normal;overflow: hidden;text-overflow: ellipsis;\r\n font-size: 0.75em;color:var(--mat-stepper-header-selected-state-icon-background-color);\">\r\n {{ fileName }}\r\n </div>\r\n }\r\n <div style=\"font-size: 0.875em;\">\r\n Drag and drop files or click to upload\r\n </div>\r\n </div>\r\n\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"clearFile($event)\" [disabled]=\"isReadOnly()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n </div>\r\n}\r\n", styles: [".fileUploader{opacity:0;display:none;transition:opacity .2s;height:50px}:host.floating .fileUploader{opacity:1}.drop-zone{border:2px dashed #ccc;padding:20px;text-align:center;cursor:pointer}.drop-zone:hover{border-color:var(--mat-stepper-header-selected-state-icon-background-color)}\n"], dependencies: [{ kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
179
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FileUploaderComponent, isStandalone: true, selector: "lib-file-uploader", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.floating": "shouldLabelFloat", "id": "id" } }, providers: [{ provide: MatFormFieldControl, useExisting: FileUploaderComponent }], viewQueries: [{ propertyName: "uploader", first: true, predicate: ["uploader"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "@if (loading) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n}\r\n\r\n@if (!shouldLabelFloat) {\r\n <section>\r\n <br>\r\n <div\r\n [style.border-color]=\"dragOver ? ' var(--mat-stepper-header-selected-state-icon-background-color)' : '#ccc;'\"\r\n (dragover)=\"onDragOver($event)\"\r\n (drop)=\"onDrop($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n class=\"drop-zone\">\r\n <div>\r\n <mat-icon>\r\n cloud_upload\r\n </mat-icon>\r\n </div>\r\n <div>\r\n @if (!!errorMessage) {\r\n <span class=\"mat-mdc-form-field-error\">\r\n {{ errorMessage }}\r\n </span>\r\n } @else {\r\n Drag and drop files or click to upload\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n}\r\n\r\n<input\r\n style=\"display: none\"\r\n hidden\r\n [readonly]=\"isReadOnly()\"\r\n [disabled]=\"isReadOnly()\"\r\n [type]=\"inputConfig().type || 'file'\"\r\n [accept]=\"uploadAccept()\"\r\n (change)=\"onFileSelected($event)\"\r\n #uploader\r\n/>\r\n\r\n@if (!!shouldLabelFloat) {\r\n <div\r\n [style.border-color]=\"dragOver ? 'var(--mat-stepper-header-selected-state-icon-background-color)' : '#ccc;'\"\r\n class=\"drop-zone\"\r\n (dragover)=\"onDragOver($event)\"\r\n (drop)=\"onDrop($event)\"\r\n (dragleave)=\"onDragLeave($event)\">\r\n <img style=\"width: 100%;\" [src]=\"previewSrc()\" alt=\"\">\r\n <mat-toolbar style=\" height: min-content !important;\">\r\n <mat-icon\r\n [style.color]=\"dragOver ? 'var(--mat-stepper-header-selected-state-icon-background-color)' : ''\">\r\n cloud_upload\r\n </mat-icon>\r\n <span class=\"spacer\"></span>\r\n <div style=\"padding: 8px;\">\r\n @if (!!fileName) {\r\n <div style=\"\r\n line-height: normal;width: 100%;\r\n white-space:normal;overflow: hidden;text-overflow: ellipsis;\r\n font-size: 0.75em;color:var(--mat-stepper-header-selected-state-icon-background-color);\">\r\n {{ fileName }}\r\n </div>\r\n }\r\n <div style=\"font-size: 0.875em;\">\r\n Drag and drop files or click to upload\r\n </div>\r\n </div>\r\n\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"clearFile($event)\" [disabled]=\"isReadOnly()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n </div>\r\n}\r\n", styles: [".fileUploader{opacity:0;display:none;transition:opacity .2s;height:50px}:host.floating .fileUploader{opacity:1}.drop-zone{border:2px dashed #ccc;padding:20px;text-align:center;cursor:pointer}.drop-zone:hover{border-color:var(--mat-stepper-header-selected-state-icon-background-color)}\n"], dependencies: [{ kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
180
180
  }
181
181
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FileUploaderComponent, decorators: [{
182
182
  type: Component,
@@ -203,7 +203,7 @@ class FileUploadInputElementComponent {
203
203
  return this.formGroup().controls[this.inputConfig().id]?.errors;
204
204
  }
205
205
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FileUploadInputElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
206
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FileUploadInputElementComponent, isStandalone: true, selector: "lib-file-upload-input-element", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-file-uploader\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-file-uploader>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n", styles: ["mat-form-field{width:100%!important}mat-form-field .input-sync-button{display:none}mat-form-field:hover .input-sync-button{display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: FileUploaderComponent, selector: "lib-file-uploader", inputs: ["inputConfig"] }, { kind: "component", type: TFormInputStatusComponent, selector: "lib-t-form-input-status", inputs: ["inputConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
206
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FileUploadInputElementComponent, isStandalone: true, selector: "lib-file-upload-input-element", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-file-uploader\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-file-uploader>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"padding: 0 12px;\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding: 0 12px;\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n", styles: ["mat-form-field{width:100%!important}mat-form-field .input-sync-button{display:none}mat-form-field:hover .input-sync-button{display:inline-block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: FileUploaderComponent, selector: "lib-file-uploader", inputs: ["inputConfig"] }, { kind: "component", type: TFormInputStatusComponent, selector: "lib-t-form-input-status", inputs: ["inputConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
207
207
  }
208
208
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FileUploadInputElementComponent, decorators: [{
209
209
  type: Component,
@@ -215,8 +215,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
215
215
  MatTooltipModule,
216
216
  FileUploaderComponent,
217
217
  TFormInputStatusComponent,
218
- ], template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-file-uploader\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-file-uploader>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n", styles: ["mat-form-field{width:100%!important}mat-form-field .input-sync-button{display:none}mat-form-field:hover .input-sync-button{display:inline-block}\n"] }]
218
+ ], template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-file-uploader\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-file-uploader>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"padding: 0 12px;\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding: 0 12px;\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n", styles: ["mat-form-field{width:100%!important}mat-form-field .input-sync-button{display:none}mat-form-field:hover .input-sync-button{display:inline-block}\n"] }]
219
219
  }], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
220
220
 
221
221
  export { FileUploadInputElementComponent };
222
- //# sourceMappingURL=ngx-t-forms-file-upload-input-element.component-BAQx2BLX.mjs.map
222
+ //# sourceMappingURL=ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-file-upload-input-element.component-BAQx2BLX.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/file-upload-input-element/core/file-uploader/file-uploader.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/file-upload-input-element/core/file-uploader/file-uploader.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/file-upload-input-element/file-upload-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/file-upload-input-element/file-upload-input-element.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n PLATFORM_ID,\r\n computed,\r\n inject,\r\n input,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatButtonModule } from '@angular/material/button';\r\n\r\nimport {\r\n AllDocumentFileExtensions,\r\n AllImageFileExtensions,\r\n FileUploadInputValueInterface,\r\n IFileUploadInput,\r\n ITowerStepColumn,\r\n InputFileType,\r\n UploadTypes,\r\n} from 'ngx-t-forms-types';\r\n\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'app-file-uploader',\r\n nextId: 0,\r\n};\r\n\r\n@Component({\r\n selector: 'lib-file-uploader',\r\n templateUrl: './file-uploader.component.html',\r\n styleUrls: ['./file-uploader.component.css'],\r\n imports: [\r\n MatProgressBarModule,\r\n MatIconModule,\r\n MatToolbarModule,\r\n MatButtonModule,\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: FileUploaderComponent }],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FileUploaderComponent extends BaseCustomInput<FileUploadInputValueInterface | object | null> {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n protected readonly uploader = viewChild.required<ElementRef<HTMLInputElement>>('uploader');\r\n\r\n /**\r\n * True when the descriptor marks the field `readonly` or `disabled`. Blocks the\r\n * upload/drop/clear interactions so the file picker honours the same\r\n * `readonly || disabled` contract as the reference text input.\r\n */\r\n protected readonly isReadOnly = computed<boolean>(() => {\r\n const cfg = this.inputConfig();\r\n return !!cfg?.readonly || !!cfg?.disabled;\r\n });\r\n\r\n protected readonly uploadAccept = computed<string>(() => {\r\n const cfg = this.inputConfig() as IFileUploadInput | undefined;\r\n const fileType = cfg?.fileType;\r\n if (!fileType) {\r\n return InputFileType.file;\r\n }\r\n return (UploadTypes as Record<string, string>)[String(fileType)] ?? InputFileType.file;\r\n });\r\n\r\n protected readonly previewSrc = computed(() => {\r\n const cfg = this.inputConfig() as IFileUploadInput | undefined;\r\n const fileType = cfg?.fileType;\r\n switch (fileType) {\r\n case InputFileType.file:\r\n return 'https://res.cloudinary.com/afrob/image/upload/v1676973154/Flows/Icons/iPhone_14_-_1_tx1scw.png';\r\n default:\r\n return (this.value as FileUploadInputValueInterface | null)?.base64 ?? undefined;\r\n }\r\n });\r\n\r\n protected fileName: string | null = null;\r\n protected loading: number | null = null;\r\n protected dragOver = false;\r\n\r\n readonly #platformId = inject(PLATFORM_ID);\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { optional: true, self: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig,\r\n );\r\n }\r\n\r\n override get value(): FileUploadInputValueInterface | object | null {\r\n return this._value;\r\n }\r\n override set value(file: FileUploadInputValueInterface | object | null) {\r\n const fileType = this.inputConfig()?.fileType;\r\n if (!file || typeof file !== 'object') {\r\n this._value = file;\r\n this.stateChanges.next();\r\n return;\r\n }\r\n\r\n const { base64, fileExtension } = file as FileUploadInputValueInterface;\r\n\r\n if (!base64) {\r\n this._value = file;\r\n this.stateChanges.next();\r\n return;\r\n }\r\n\r\n const allDocExtensions = Object.values(AllDocumentFileExtensions);\r\n const allImageExtensions = Object.values(AllImageFileExtensions);\r\n const isFile = allDocExtensions.includes(fileExtension as AllDocumentFileExtensions);\r\n const isImage = allImageExtensions.includes(fileExtension as AllImageFileExtensions);\r\n if (\r\n (fileType === InputFileType.file && !isFile) ||\r\n ((fileType === InputFileType.Image || fileType === InputFileType.CaptureImage) && !isImage)\r\n ) {\r\n this._value = null;\r\n this.temporaryError(`Invalid file type. Expected ${fileType} file`);\r\n this.stateChanges.next();\r\n return;\r\n } else {\r\n this._value = file;\r\n this.stateChanges.next();\r\n return;\r\n }\r\n }\r\n\r\n override get empty(): boolean {\r\n return !this.value;\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n override onContainerClick(event: MouseEvent): void {\r\n if (this.isReadOnly()) return;\r\n this.uploader().nativeElement.click();\r\n if (event.target !== this._elementRef.nativeElement) {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n protected triggerUploader(): void {\r\n if (this.isReadOnly()) return;\r\n this.uploader().nativeElement.click();\r\n }\r\n\r\n protected onFileSelected(event: Event): void {\r\n const files = (event.target as HTMLInputElement).files;\r\n if (files && files.length > 0) {\r\n const file = files[0];\r\n if (!file) return;\r\n this.assignFile(file);\r\n }\r\n }\r\n\r\n protected assignFile(file: File): void {\r\n // FileReader is a browser-only API; gate by isPlatformBrowser to keep SSR-safe.\r\n if (!isPlatformBrowser(this.#platformId)) {\r\n return;\r\n }\r\n const reader = new FileReader();\r\n reader.onload = () => {\r\n this.fileName = file.name;\r\n const nameSplit = file.name.split('.');\r\n const fileExtension = nameSplit[nameSplit.length - 1];\r\n this.value = {\r\n fileName: file.name,\r\n base64: reader.result as string,\r\n type: this.inputConfig()?.fileType,\r\n blob: file,\r\n fileExtension,\r\n };\r\n this.onChange(this.value);\r\n };\r\n reader.readAsDataURL(file);\r\n }\r\n\r\n protected onDragOver(event: DragEvent): void {\r\n this.dragOver = true;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n protected onDrop(event: DragEvent): void {\r\n this.dragOver = false;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (this.isReadOnly()) return;\r\n const files = event.dataTransfer?.files;\r\n if (files && files.length > 0) {\r\n const file = files[0];\r\n if (!file) return;\r\n this.assignFile(file);\r\n }\r\n }\r\n\r\n protected onDragLeave(event: DragEvent): void {\r\n this.dragOver = false;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n protected clearFile(event: MouseEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (this.isReadOnly()) return;\r\n this.value = null;\r\n this.stateChanges.next();\r\n }\r\n}\r\n","@if (loading) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n}\r\n\r\n@if (!shouldLabelFloat) {\r\n <section>\r\n <br>\r\n <div\r\n [style.border-color]=\"dragOver ? ' var(--mat-stepper-header-selected-state-icon-background-color)' : '#ccc;'\"\r\n (dragover)=\"onDragOver($event)\"\r\n (drop)=\"onDrop($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n class=\"drop-zone\">\r\n <div>\r\n <mat-icon>\r\n cloud_upload\r\n </mat-icon>\r\n </div>\r\n <div>\r\n @if (!!errorMessage) {\r\n <span class=\"mat-mdc-form-field-error\">\r\n {{ errorMessage }}\r\n </span>\r\n } @else {\r\n Drag and drop files or click to upload\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n}\r\n\r\n<input\r\n style=\"display: none\"\r\n hidden\r\n [readonly]=\"isReadOnly()\"\r\n [disabled]=\"isReadOnly()\"\r\n [type]=\"inputConfig().type || 'file'\"\r\n [accept]=\"uploadAccept()\"\r\n (change)=\"onFileSelected($event)\"\r\n #uploader\r\n/>\r\n\r\n@if (!!shouldLabelFloat) {\r\n <div\r\n [style.border-color]=\"dragOver ? 'var(--mat-stepper-header-selected-state-icon-background-color)' : '#ccc;'\"\r\n class=\"drop-zone\"\r\n (dragover)=\"onDragOver($event)\"\r\n (drop)=\"onDrop($event)\"\r\n (dragleave)=\"onDragLeave($event)\">\r\n <img style=\"width: 100%;\" [src]=\"previewSrc()\" alt=\"\">\r\n <mat-toolbar style=\" height: min-content !important;\">\r\n <mat-icon\r\n [style.color]=\"dragOver ? 'var(--mat-stepper-header-selected-state-icon-background-color)' : ''\">\r\n cloud_upload\r\n </mat-icon>\r\n <span class=\"spacer\"></span>\r\n <div style=\"padding: 8px;\">\r\n @if (!!fileName) {\r\n <div style=\"\r\n line-height: normal;width: 100%;\r\n white-space:normal;overflow: hidden;text-overflow: ellipsis;\r\n font-size: 0.75em;color:var(--mat-stepper-header-selected-state-icon-background-color);\">\r\n {{ fileName }}\r\n </div>\r\n }\r\n <div style=\"font-size: 0.875em;\">\r\n Drag and drop files or click to upload\r\n </div>\r\n </div>\r\n\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"clearFile($event)\" [disabled]=\"isReadOnly()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n </div>\r\n}\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule, ValidationErrors } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { FileUploaderComponent } from './core/file-uploader/file-uploader.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive file-uploader control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-file-upload-input-element',\r\n templateUrl: './file-upload-input-element.component.html',\r\n styleUrl: './file-upload-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n FileUploaderComponent,\r\n TFormInputStatusComponent,\r\n ],\r\n})\r\nexport class FileUploadInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n\r\n protected getErrors(): ValidationErrors | null | undefined {\r\n return this.formGroup().controls[this.inputConfig().id]?.errors;\r\n }\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-file-uploader\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-file-uploader>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i2","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,mBAAmB;AAChC,IAAA,M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ACnB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,qBAAqB;wBACrB,yBAAyB;AAC1B,qBAAA,EAAA,QAAA,EAAA,grEAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-file-upload-input-element.component-FPxHxAwF.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/file-upload-input-element/core/file-uploader/file-uploader.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/file-upload-input-element/core/file-uploader/file-uploader.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/file-upload-input-element/file-upload-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/file-upload-input-element/file-upload-input-element.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n PLATFORM_ID,\r\n computed,\r\n inject,\r\n input,\r\n viewChild,\r\n} from '@angular/core';\r\nimport { isPlatformBrowser } from '@angular/common';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatButtonModule } from '@angular/material/button';\r\n\r\nimport {\r\n AllDocumentFileExtensions,\r\n AllImageFileExtensions,\r\n FileUploadInputValueInterface,\r\n IFileUploadInput,\r\n ITowerStepColumn,\r\n InputFileType,\r\n UploadTypes,\r\n} from 'ngx-t-forms-types';\r\n\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'app-file-uploader',\r\n nextId: 0,\r\n};\r\n\r\n@Component({\r\n selector: 'lib-file-uploader',\r\n templateUrl: './file-uploader.component.html',\r\n styleUrls: ['./file-uploader.component.css'],\r\n imports: [\r\n MatProgressBarModule,\r\n MatIconModule,\r\n MatToolbarModule,\r\n MatButtonModule,\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: FileUploaderComponent }],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FileUploaderComponent extends BaseCustomInput<FileUploadInputValueInterface | object | null> {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n protected readonly uploader = viewChild.required<ElementRef<HTMLInputElement>>('uploader');\r\n\r\n /**\r\n * True when the descriptor marks the field `readonly` or `disabled`. Blocks the\r\n * upload/drop/clear interactions so the file picker honours the same\r\n * `readonly || disabled` contract as the reference text input.\r\n */\r\n protected readonly isReadOnly = computed<boolean>(() => {\r\n const cfg = this.inputConfig();\r\n return !!cfg?.readonly || !!cfg?.disabled;\r\n });\r\n\r\n protected readonly uploadAccept = computed<string>(() => {\r\n const cfg = this.inputConfig() as IFileUploadInput | undefined;\r\n const fileType = cfg?.fileType;\r\n if (!fileType) {\r\n return InputFileType.file;\r\n }\r\n return (UploadTypes as Record<string, string>)[String(fileType)] ?? InputFileType.file;\r\n });\r\n\r\n protected readonly previewSrc = computed(() => {\r\n const cfg = this.inputConfig() as IFileUploadInput | undefined;\r\n const fileType = cfg?.fileType;\r\n switch (fileType) {\r\n case InputFileType.file:\r\n return 'https://res.cloudinary.com/afrob/image/upload/v1676973154/Flows/Icons/iPhone_14_-_1_tx1scw.png';\r\n default:\r\n return (this.value as FileUploadInputValueInterface | null)?.base64 ?? undefined;\r\n }\r\n });\r\n\r\n protected fileName: string | null = null;\r\n protected loading: number | null = null;\r\n protected dragOver = false;\r\n\r\n readonly #platformId = inject(PLATFORM_ID);\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { optional: true, self: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig,\r\n );\r\n }\r\n\r\n override get value(): FileUploadInputValueInterface | object | null {\r\n return this._value;\r\n }\r\n override set value(file: FileUploadInputValueInterface | object | null) {\r\n const fileType = this.inputConfig()?.fileType;\r\n if (!file || typeof file !== 'object') {\r\n this._value = file;\r\n this.stateChanges.next();\r\n return;\r\n }\r\n\r\n const { base64, fileExtension } = file as FileUploadInputValueInterface;\r\n\r\n if (!base64) {\r\n this._value = file;\r\n this.stateChanges.next();\r\n return;\r\n }\r\n\r\n const allDocExtensions = Object.values(AllDocumentFileExtensions);\r\n const allImageExtensions = Object.values(AllImageFileExtensions);\r\n const isFile = allDocExtensions.includes(fileExtension as AllDocumentFileExtensions);\r\n const isImage = allImageExtensions.includes(fileExtension as AllImageFileExtensions);\r\n if (\r\n (fileType === InputFileType.file && !isFile) ||\r\n ((fileType === InputFileType.Image || fileType === InputFileType.CaptureImage) && !isImage)\r\n ) {\r\n this._value = null;\r\n this.temporaryError(`Invalid file type. Expected ${fileType} file`);\r\n this.stateChanges.next();\r\n return;\r\n } else {\r\n this._value = file;\r\n this.stateChanges.next();\r\n return;\r\n }\r\n }\r\n\r\n override get empty(): boolean {\r\n return !this.value;\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n override onContainerClick(event: MouseEvent): void {\r\n if (this.isReadOnly()) return;\r\n this.uploader().nativeElement.click();\r\n if (event.target !== this._elementRef.nativeElement) {\r\n this.markAsTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n protected triggerUploader(): void {\r\n if (this.isReadOnly()) return;\r\n this.uploader().nativeElement.click();\r\n }\r\n\r\n protected onFileSelected(event: Event): void {\r\n const files = (event.target as HTMLInputElement).files;\r\n if (files && files.length > 0) {\r\n const file = files[0];\r\n if (!file) return;\r\n this.assignFile(file);\r\n }\r\n }\r\n\r\n protected assignFile(file: File): void {\r\n // FileReader is a browser-only API; gate by isPlatformBrowser to keep SSR-safe.\r\n if (!isPlatformBrowser(this.#platformId)) {\r\n return;\r\n }\r\n const reader = new FileReader();\r\n reader.onload = () => {\r\n this.fileName = file.name;\r\n const nameSplit = file.name.split('.');\r\n const fileExtension = nameSplit[nameSplit.length - 1];\r\n this.value = {\r\n fileName: file.name,\r\n base64: reader.result as string,\r\n type: this.inputConfig()?.fileType,\r\n blob: file,\r\n fileExtension,\r\n };\r\n this.onChange(this.value);\r\n };\r\n reader.readAsDataURL(file);\r\n }\r\n\r\n protected onDragOver(event: DragEvent): void {\r\n this.dragOver = true;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n protected onDrop(event: DragEvent): void {\r\n this.dragOver = false;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (this.isReadOnly()) return;\r\n const files = event.dataTransfer?.files;\r\n if (files && files.length > 0) {\r\n const file = files[0];\r\n if (!file) return;\r\n this.assignFile(file);\r\n }\r\n }\r\n\r\n protected onDragLeave(event: DragEvent): void {\r\n this.dragOver = false;\r\n event.preventDefault();\r\n event.stopPropagation();\r\n }\r\n\r\n protected clearFile(event: MouseEvent): void {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n if (this.isReadOnly()) return;\r\n this.value = null;\r\n this.stateChanges.next();\r\n }\r\n}\r\n","@if (loading) {\r\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n}\r\n\r\n@if (!shouldLabelFloat) {\r\n <section>\r\n <br>\r\n <div\r\n [style.border-color]=\"dragOver ? ' var(--mat-stepper-header-selected-state-icon-background-color)' : '#ccc;'\"\r\n (dragover)=\"onDragOver($event)\"\r\n (drop)=\"onDrop($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n class=\"drop-zone\">\r\n <div>\r\n <mat-icon>\r\n cloud_upload\r\n </mat-icon>\r\n </div>\r\n <div>\r\n @if (!!errorMessage) {\r\n <span class=\"mat-mdc-form-field-error\">\r\n {{ errorMessage }}\r\n </span>\r\n } @else {\r\n Drag and drop files or click to upload\r\n }\r\n </div>\r\n </div>\r\n </section>\r\n}\r\n\r\n<input\r\n style=\"display: none\"\r\n hidden\r\n [readonly]=\"isReadOnly()\"\r\n [disabled]=\"isReadOnly()\"\r\n [type]=\"inputConfig().type || 'file'\"\r\n [accept]=\"uploadAccept()\"\r\n (change)=\"onFileSelected($event)\"\r\n #uploader\r\n/>\r\n\r\n@if (!!shouldLabelFloat) {\r\n <div\r\n [style.border-color]=\"dragOver ? 'var(--mat-stepper-header-selected-state-icon-background-color)' : '#ccc;'\"\r\n class=\"drop-zone\"\r\n (dragover)=\"onDragOver($event)\"\r\n (drop)=\"onDrop($event)\"\r\n (dragleave)=\"onDragLeave($event)\">\r\n <img style=\"width: 100%;\" [src]=\"previewSrc()\" alt=\"\">\r\n <mat-toolbar style=\" height: min-content !important;\">\r\n <mat-icon\r\n [style.color]=\"dragOver ? 'var(--mat-stepper-header-selected-state-icon-background-color)' : ''\">\r\n cloud_upload\r\n </mat-icon>\r\n <span class=\"spacer\"></span>\r\n <div style=\"padding: 8px;\">\r\n @if (!!fileName) {\r\n <div style=\"\r\n line-height: normal;width: 100%;\r\n white-space:normal;overflow: hidden;text-overflow: ellipsis;\r\n font-size: 0.75em;color:var(--mat-stepper-header-selected-state-icon-background-color);\">\r\n {{ fileName }}\r\n </div>\r\n }\r\n <div style=\"font-size: 0.875em;\">\r\n Drag and drop files or click to upload\r\n </div>\r\n </div>\r\n\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"clearFile($event)\" [disabled]=\"isReadOnly()\" mat-icon-button>\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n </div>\r\n}\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule, ValidationErrors } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { FileUploaderComponent } from './core/file-uploader/file-uploader.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive file-uploader control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-file-upload-input-element',\r\n templateUrl: './file-upload-input-element.component.html',\r\n styleUrl: './file-upload-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n FileUploaderComponent,\r\n TFormInputStatusComponent,\r\n ],\r\n})\r\nexport class FileUploadInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n\r\n protected getErrors(): ValidationErrors | null | undefined {\r\n return this.formGroup().controls[this.inputConfig().id]?.errors;\r\n }\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-file-uploader\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n ></lib-file-uploader>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"padding: 0 12px;\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding: 0 12px;\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i2","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;AA8BA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,mBAAmB;AAChC,IAAA,MAAM,EAAE,CAAC;CACV;AAmBK,MAAO,qBAAsB,SAAQ,eAA8D,CAAA;AAuC9F,IAAA,WAAW;AAEpB,IAAA,WAAA,GAAA;QACE,KAAK,CACH,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAc,EAC9D,MAAM,CAA0B,UAAU,CAAC,EAC3C,iBAAiB,CAClB;AA7CM,QAAA,IAAA,CAAA,WAAW,GAAG,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AA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACb,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAE,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,sFAAA,EAAA,QAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACf,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,4BAAA,EAAA,oBAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,yBAAA,EAAA,YAAA,EAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,qBAAqB,uFACrB,yBAAyB,EAAA,QAAA,EAAA,yBAAA,EAAA,MAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAGhB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAf3C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,+BAA+B,EAAA,eAAA,EAGxB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,mBAAmB;wBACnB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,qBAAqB;wBACrB,yBAAyB;AAC1B,qBAAA,EAAA,QAAA,EAAA,yrEAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
@@ -6,7 +6,7 @@ import * as i6 from '@angular/material/list';
6
6
  import { MatListModule } from '@angular/material/list';
7
7
  import * as i7 from '@angular/material/core';
8
8
  import { MatRippleModule } from '@angular/material/core';
9
- import { b as getInputIcon, E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs';
9
+ import { b as getInputIcon, E as EmptyStateComponent } from './ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs';
10
10
 
11
11
  /**
12
12
  * Single-select list that lets a user pick one form input by id. Child of
@@ -82,4 +82,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
82
82
  }], propDecorators: { errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], change: [{ type: i0.Output, args: ["change"] }] } });
83
83
 
84
84
  export { FormInputSelectorComponent };
85
- //# sourceMappingURL=ngx-t-forms-form-input-selector.component-M6O7-j2Q.mjs.map
85
+ //# sourceMappingURL=ngx-t-forms-form-input-selector.component-B3ES53R-.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-form-input-selector.component-M6O7-j2Q.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 {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n computed,\r\n input,\r\n output,\r\n} from '@angular/core';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport type { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { getInputIcon } from '../../../../shared/functions/getInputIcon';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\n\r\n/** A form input decorated with the derived view-model fields the list renders. */\r\ninterface FormInputOption {\r\n readonly input: FormColumnInputs;\r\n readonly id: string;\r\n readonly label: string;\r\n readonly icon: string;\r\n readonly dataType: string;\r\n readonly isSubItem: boolean;\r\n readonly selected: boolean;\r\n readonly ariaLabel: string;\r\n}\r\n\r\n/**\r\n * Single-select list that lets a user pick one form input by id. Child of\r\n * `t-dynamic-data-edit`, which supplies the field label, hint, and validation\r\n * errors — so this component owns only the selectable list content.\r\n *\r\n * Selecting an already-selected input deselects it (emits `undefined`). While a\r\n * value is set the list collapses to the selected-only view.\r\n */\r\n@Component({\r\n selector: 'lib-form-input-selector',\r\n imports: [MatIconModule, MatListModule, MatRippleModule, EmptyStateComponent],\r\n templateUrl: './form-input-selector.component.html',\r\n styleUrl: './form-input-selector.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n 'class': 'lib-form-input-selector',\r\n '[attr.id]': 'id()',\r\n },\r\n})\r\nexport class FormInputSelectorComponent {\r\n /**\r\n * Validation errors passed down by the parent editor. Retained on the contract\r\n * (the parent binds `[errors]`) but not rendered here — `t-dynamic-data-edit`\r\n * owns error display, so rendering them again would double them.\r\n */\r\n readonly errors = input<IConfigElementError[] | undefined>([]);\r\n\r\n /** Currently selected input id, or `undefined` when nothing is selected. */\r\n readonly value = input<string | undefined>(undefined);\r\n\r\n /** Available form inputs to choose from. */\r\n readonly formInputs = input<readonly FormColumnInputs[]>([]);\r\n\r\n /** Disable user interaction. */\r\n readonly disabled = input<boolean>(false);\r\n\r\n /** Optional id attribute supplied by the parent editor. */\r\n readonly id = input<string | undefined>(undefined);\r\n\r\n /** Emits the chosen input id, or `undefined` when the selection is cleared. */\r\n readonly change = output<string | undefined>();\r\n\r\n /**\r\n * The list to render: the selected-only view once a value is set, otherwise\r\n * every available input. Each entry carries its derived icon, sub-item flag,\r\n * and accessible label.\r\n */\r\n protected readonly options = computed<readonly FormInputOption[]>(() => {\r\n const value = this.value();\r\n const inputs = this.formInputs();\r\n const selected = value === undefined ? undefined : inputs.find((item) => item.id === value);\r\n const source = selected ? [selected] : inputs;\r\n return source.map((item) => this.#toOption(item, item.id === value));\r\n });\r\n\r\n /** Toggle selection: re-selecting the current value clears it. */\r\n protected select(id: string): void {\r\n if (this.disabled()) {\r\n return;\r\n }\r\n this.change.emit(this.value() === id ? undefined : id);\r\n }\r\n\r\n #toOption(item: FormColumnInputs, selected: boolean): FormInputOption {\r\n const isSubItem = Boolean(item.multipleInputInEditId);\r\n const dataType = item.dataType ?? '';\r\n const kind = isSubItem ? 'Sub-item input' : 'Primary input';\r\n const dataTypeLabel = dataType ? `, ${dataType}` : '';\r\n return {\r\n input: item,\r\n id: item.id,\r\n label: item.label,\r\n icon: getInputIcon(item.element),\r\n dataType,\r\n isSubItem,\r\n selected,\r\n ariaLabel: `${item.label}. ${kind}${dataTypeLabel}.${selected ? ' Selected.' : ''}`,\r\n };\r\n }\r\n}\r\n","@if (options().length) {\r\n<mat-nav-list class=\"lib-form-input-selector__list\" role=\"listbox\" aria-label=\"Form input selector\">\r\n @for (option of options(); track option.id) {\r\n <mat-list-item\r\n class=\"lib-form-input-selector__item\"\r\n matRipple\r\n [disabled]=\"disabled()\"\r\n [activated]=\"option.selected\"\r\n [attr.aria-selected]=\"option.selected\"\r\n [attr.aria-label]=\"option.ariaLabel\"\r\n (click)=\"select(option.id)\">\r\n <mat-icon matListItemAvatar class=\"lib-form-input-selector__avatar\" aria-hidden=\"true\">\r\n {{ option.icon }}\r\n </mat-icon>\r\n <span matListItemTitle class=\"lib-form-input-selector__title\">{{ option.label }}</span>\r\n <span matListItemLine class=\"lib-form-input-selector__meta-text\">\r\n @if (option.isSubItem) {\r\n <span>Sub-item</span>\r\n }\r\n @if (option.dataType) {\r\n <span>{{ option.dataType }}</span>\r\n }\r\n @if (option.selected) {\r\n <span class=\"lib-form-input-selector__selected-hint\">Selected</span>\r\n }\r\n </span>\r\n <mat-icon\r\n matListItemMeta\r\n class=\"lib-form-input-selector__indicator\"\r\n [class.lib-form-input-selector__indicator--on]=\"option.selected\"\r\n aria-hidden=\"true\">\r\n {{ option.selected ? 'check_circle' : 'radio_button_unchecked' }}\r\n </mat-icon>\r\n </mat-list-item>\r\n }\r\n</mat-nav-list>\r\n} @else {\r\n<lib-empty-state icon=\"search_off\" message=\"No form inputs found\" />\r\n}\r\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;AA4BA;;;;;;;AAOG;MAaU,0BAA0B,CAAA;AAZvC,IAAA,WAAA,GAAA;AAaE;;;;AAIG;AACM,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAoC,EAAE,6EAAC;;AAGrD,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAqB,SAAS,4EAAC;;AAG5C,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAA8B,EAAE,iFAAC;;AAGnD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAGhC,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAqB,SAAS,yEAAC;;QAGzC,IAAA,CAAA,MAAM,GAAG,MAAM,EAAsB;AAE9C;;;;AAIG;AACgB,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAA6B,MAAK;AACrE,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;AAC1B,YAAA,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,EAAE;YAChC,MAAM,QAAQ,GAAG,KAAK,KAAK,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,KAAK,KAAK,CAAC;AAC3F,YAAA,MAAM,MAAM,GAAG,QAAQ,GAAG,CAAC,QAAQ,CAAC,GAAG,MAAM;YAC7C,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IA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AC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,OAAO,EAAE,yBAAyB;AAClC,wBAAA,WAAW,EAAE,MAAM;AACpB,qBAAA,EAAA,QAAA,EAAA,kgDAAA,EAAA,MAAA,EAAA,CAAA,kwDAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-form-input-selector.component-B3ES53R-.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 {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n computed,\r\n input,\r\n output,\r\n} from '@angular/core';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport type { FormColumnInputs } from 'ngx-t-forms-types';\r\nimport { getInputIcon } from '../../../../shared/functions/getInputIcon';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\n\r\n/** A form input decorated with the derived view-model fields the list renders. */\r\ninterface FormInputOption {\r\n readonly input: FormColumnInputs;\r\n readonly id: string;\r\n readonly label: string;\r\n readonly icon: string;\r\n readonly dataType: string;\r\n readonly isSubItem: boolean;\r\n readonly selected: boolean;\r\n readonly ariaLabel: string;\r\n}\r\n\r\n/**\r\n * Single-select list that lets a user pick one form input by id. Child of\r\n * `t-dynamic-data-edit`, which supplies the field label, hint, and validation\r\n * errors — so this component owns only the selectable list content.\r\n *\r\n * Selecting an already-selected input deselects it (emits `undefined`). While a\r\n * value is set the list collapses to the selected-only view.\r\n */\r\n@Component({\r\n selector: 'lib-form-input-selector',\r\n imports: [MatIconModule, MatListModule, MatRippleModule, EmptyStateComponent],\r\n templateUrl: './form-input-selector.component.html',\r\n styleUrl: './form-input-selector.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n 'class': 'lib-form-input-selector',\r\n '[attr.id]': 'id()',\r\n },\r\n})\r\nexport class FormInputSelectorComponent {\r\n /**\r\n * Validation errors passed down by the parent editor. Retained on the contract\r\n * (the parent binds `[errors]`) but not rendered here — `t-dynamic-data-edit`\r\n * owns error display, so rendering them again would double them.\r\n */\r\n readonly errors = input<IConfigElementError[] | undefined>([]);\r\n\r\n /** Currently selected input id, or `undefined` when nothing is selected. */\r\n readonly value = input<string | undefined>(undefined);\r\n\r\n /** Available form inputs to choose from. */\r\n readonly formInputs = input<readonly FormColumnInputs[]>([]);\r\n\r\n /** Disable user interaction. */\r\n readonly disabled = input<boolean>(false);\r\n\r\n /** Optional id attribute supplied by the parent editor. */\r\n readonly id = input<string | undefined>(undefined);\r\n\r\n /** Emits the chosen input id, or `undefined` when the selection is cleared. */\r\n readonly change = output<string | undefined>();\r\n\r\n /**\r\n * The list to render: the selected-only view once a value is set, otherwise\r\n * every available input. Each entry carries its derived icon, sub-item flag,\r\n * and accessible label.\r\n */\r\n protected readonly options = computed<readonly FormInputOption[]>(() => {\r\n const value = this.value();\r\n const inputs = this.formInputs();\r\n const selected = value === undefined ? undefined : inputs.find((item) => item.id === value);\r\n const source = selected ? [selected] : inputs;\r\n return source.map((item) => this.#toOption(item, item.id === value));\r\n });\r\n\r\n /** Toggle selection: re-selecting the current value clears it. */\r\n protected select(id: string): void {\r\n if (this.disabled()) {\r\n return;\r\n }\r\n this.change.emit(this.value() === id ? undefined : id);\r\n }\r\n\r\n #toOption(item: FormColumnInputs, selected: boolean): FormInputOption {\r\n const isSubItem = Boolean(item.multipleInputInEditId);\r\n const dataType = item.dataType ?? '';\r\n const kind = isSubItem ? 'Sub-item input' : 'Primary input';\r\n const dataTypeLabel = dataType ? `, ${dataType}` : '';\r\n return {\r\n input: item,\r\n id: item.id,\r\n label: item.label,\r\n icon: getInputIcon(item.element),\r\n dataType,\r\n isSubItem,\r\n selected,\r\n ariaLabel: `${item.label}. ${kind}${dataTypeLabel}.${selected ? ' Selected.' : ''}`,\r\n };\r\n }\r\n}\r\n","@if (options().length) {\r\n<mat-nav-list class=\"lib-form-input-selector__list\" role=\"listbox\" aria-label=\"Form input selector\">\r\n @for (option of options(); track option.id) {\r\n <mat-list-item\r\n class=\"lib-form-input-selector__item\"\r\n matRipple\r\n [disabled]=\"disabled()\"\r\n [activated]=\"option.selected\"\r\n [attr.aria-selected]=\"option.selected\"\r\n [attr.aria-label]=\"option.ariaLabel\"\r\n (click)=\"select(option.id)\">\r\n <mat-icon matListItemAvatar class=\"lib-form-input-selector__avatar\" aria-hidden=\"true\">\r\n {{ option.icon }}\r\n </mat-icon>\r\n <span matListItemTitle class=\"lib-form-input-selector__title\">{{ option.label }}</span>\r\n <span matListItemLine class=\"lib-form-input-selector__meta-text\">\r\n @if (option.isSubItem) {\r\n <span>Sub-item</span>\r\n }\r\n @if (option.dataType) {\r\n <span>{{ option.dataType }}</span>\r\n }\r\n @if (option.selected) {\r\n <span class=\"lib-form-input-selector__selected-hint\">Selected</span>\r\n }\r\n </span>\r\n <mat-icon\r\n matListItemMeta\r\n class=\"lib-form-input-selector__indicator\"\r\n [class.lib-form-input-selector__indicator--on]=\"option.selected\"\r\n aria-hidden=\"true\">\r\n {{ option.selected ? 'check_circle' : 'radio_button_unchecked' }}\r\n </mat-icon>\r\n </mat-list-item>\r\n }\r\n</mat-nav-list>\r\n} @else {\r\n<lib-empty-state icon=\"search_off\" message=\"No form inputs found\" />\r\n}\r\n"],"names":["i2","i3"],"mappings":";;;;;;;;;;AA4BA;;;;;;;AAOG;MAaU,0BAA0B,CAAA;AAZvC,IAAA,WAAA,GAAA;AAaE;;;;AAIG;AACM,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAoC,EAAE,6EAAC;;AAGrD,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK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AA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,eAAe,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAC,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,MAAA,EAAA,CAAA,gBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,iBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAUjE,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAZtC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,WAC1B,CAAC,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,mBAAmB,CAAC,EAAA,eAAA,EAG5D,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,OAAO,EAAE,yBAAyB;AAClC,wBAAA,WAAW,EAAE,MAAM;AACpB,qBAAA,EAAA,QAAA,EAAA,kgDAAA,EAAA,MAAA,EAAA,CAAA,kwDAAA,CAAA,EAAA;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { F as FormsStoreService, c as TDynamicDataViewComponent } from './ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs';
4
+ import { F as FormsStoreService, c as TDynamicDataViewComponent } from './ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs';
5
5
  import { map } from 'rxjs';
6
6
 
7
7
  class FormJsonViewComponent {
@@ -19,4 +19,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
19
19
  }] });
20
20
 
21
21
  export { FormJsonViewComponent };
22
- //# sourceMappingURL=ngx-t-forms-form-json-view.component-Dd-EMosV.mjs.map
22
+ //# sourceMappingURL=ngx-t-forms-form-json-view.component-Cu_ZEw1V.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-form-json-view.component-Dd-EMosV.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 { AsyncPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\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@Component({\r\n selector: 'lib-form-json-view',\r\n imports: [AsyncPipe, TDynamicDataViewComponent],\r\n templateUrl: './form-json-view.component.html',\r\n styleUrl: './form-json-view.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormJsonViewComponent {\r\n readonly #store = inject(FormsStoreService);\r\n\r\n protected readonly form$ = this.#store.selectors.selectFormInEdit$.pipe(\r\n map((form) => form?.form),\r\n );\r\n}\r\n","\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>"],"names":[],"mappings":";;;;;;MAea,qBAAqB,CAAA;AAPlC,IAAA,WAAA,GAAA;AAQW,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAExB,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CACrE,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,IAAI,CAAC,CAC1B;AACF,IAAA;AALU,IAAA,MAAM;+GADJ,qBAAqB,EAAA,IAAA,EAAA,EAAA,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,SAAA,EAAA,IAAA,EAAA,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECflC,gFACwE,EAAA,MAAA,EAAA,CAAA,yYAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDSjD,yBAAyB,iFAApC,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAKR,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BACE,oBAAoB,EAAA,OAAA,EACrB,CAAC,SAAS,EAAE,yBAAyB,CAAC,EAAA,eAAA,EAG9B,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gFAAA,EAAA,MAAA,EAAA,CAAA,yYAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-form-json-view.component-Cu_ZEw1V.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 { AsyncPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\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@Component({\r\n selector: 'lib-form-json-view',\r\n imports: [AsyncPipe, TDynamicDataViewComponent],\r\n templateUrl: './form-json-view.component.html',\r\n styleUrl: './form-json-view.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class FormJsonViewComponent {\r\n readonly #store = inject(FormsStoreService);\r\n\r\n protected readonly form$ = this.#store.selectors.selectFormInEdit$.pipe(\r\n map((form) => form?.form),\r\n );\r\n}\r\n","\r\n<lib-t-dynamic-data-view [data]=\"form$|async\"></lib-t-dynamic-data-view>"],"names":[],"mappings":";;;;;;MAea,qBAAqB,CAAA;AAPlC,IAAA,WAAA,GAAA;AAQW,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAExB,IAAA,CAAA,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,iBAAiB,CAAC,IAAI,CACrE,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,EAAE,IAAI,CAAC,CAC1B;AACF,IAAA;AALU,IAAA,MAAM;+GADJ,qBAAqB,EAAA,IAAA,EAAA,EAAA,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,SAAA,EAAA,IAAA,EAAA,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECflC,gFACwE,EAAA,MAAA,EAAA,CAAA,yYAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDSjD,yBAAyB,iFAApC,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAKR,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;+BACE,oBAAoB,EAAA,OAAA,EACrB,CAAC,SAAS,EAAE,yBAAyB,CAAC,EAAA,eAAA,EAG9B,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,gFAAA,EAAA,MAAA,EAAA,CAAA,yYAAA,CAAA,EAAA;;;;;"}
@@ -29,7 +29,7 @@ import { take, filter, tap, map, Subject, timer, takeUntil } from 'rxjs';
29
29
  import * as i7 from 'ngx-ui-tour-md-menu';
30
30
  import { TourMatMenu } from 'ngx-ui-tour-md-menu';
31
31
  import { ElementTypes, validateFormColumnInputs } from 'ngx-t-forms-types';
32
- import { d as TFormEngine, F as FormsStoreService, e as TourManagerService, f as getSubmissionStatusFn } from './ngx-t-forms-ngx-t-forms-Dt4iPwb-.mjs';
32
+ import { d as TFormEngine, F as FormsStoreService, e as TourManagerService, f as getSubmissionStatusFn } from './ngx-t-forms-ngx-t-forms-CaVyRedJ.mjs';
33
33
 
34
34
  class FormSectionStepperComponent {
35
35
  constructor() {
@@ -361,9 +361,9 @@ class FormSectionStepperComponent {
361
361
  this.#snackBar.open('✨Input field successfully added to the row entry form. Open the form to configure it further.', 'OK', { duration: 3000 });
362
362
  }
363
363
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormSectionStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
364
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FormSectionStepperComponent, isStandalone: true, selector: "lib-form-section-stepper", providers: [TFormEngine], viewQueries: [{ propertyName: "stepper", first: true, predicate: ["stepper"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-card class=\"mainCard\" appearance=\"raised\">\r\n\r\n @if (loadingForm$ | async) {\r\n <div class=\"loading-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-spinner diameter=\"48\" aria-label=\"Loading form\" />\r\n </div>\r\n }\r\n <mat-stepper [style.display]=\"(loadingForm$ | async) ? 'none' : 'block'\" #stepper class=\"form-stepper\"\r\n orientation=\"vertical\" [linear]=\"!isEditable\" aria-label=\"Form sections stepper\" [animationDuration]=\"'300'\"\r\n cdkDropList #formSections=\"cdkDropList\" [cdkDropListData]=\"selectFormStepsComputed\"\r\n (cdkDropListDropped)=\"drop($event)\" (selectionChange)=\"engine.handleStepChange($event)\">\r\n\r\n @for (step of selectFormStepsComputed; track step.sectionId) {\r\n @if (step.sectionForm || getPlaceHolerForSection(step.sectionId)) {\r\n <mat-step [stepControl]=\"step.sectionForm || getPlaceHolerForSection(step.sectionId)\"\r\n [completed]=\"step.sectionIsSeen && !step.sectionIsInvalid\" [editable]=\"isEditable\"\r\n [errorMessage]=\"step.sectionFormErrorMessage||''\" [state]=\"getStepState(step,$index)\"\r\n [hasError]=\"!step.sectionForm?.valid && !!step.sectionForm?.touched\">\r\n <ng-template matStepLabel>\r\n <div cdkDrag class=\"step-label-container\" [attr.aria-label]=\"'Section ' + step.label\">\r\n <button cdkDragHandle type=\"button\" class=\"section-drag-handle\" (click)=\"$event.stopPropagation()\"\r\n matTooltip=\"Drag to reorder section\" aria-label=\"Drag to reorder section\" mat-icon-button>\r\n <mat-icon>drag_indicator</mat-icon>\r\n </button>\r\n <span class=\"step-label-text\">\r\n <input (input)=\"handleInput($event, step.sectionId)\" class=\"section-title-input\" matInput\r\n (keydown.space)=\"onSpaceKey($event, step.sectionId)\" placeholder=\"Untitled section \u2014 click to name\"\r\n [value]=\"step.label\" aria-label=\"Section title\">\r\n <mat-icon class=\"section-title-edit-hint\" aria-hidden=\"true\">edit</mat-icon>\r\n </span>\r\n @if (step.sectionIsSeen) {\r\n <mat-icon class=\"section-status-icon\" [class.error]=\"step.sectionIsInvalid\"\r\n [attr.aria-label]=\"step.sectionIsInvalid ? 'Section has errors' : 'Section completed'\">\r\n {{ step.sectionIsInvalid ? 'error' : 'check_circle' }}\r\n </mat-icon>\r\n }\r\n @if ((step)?.activeSectionHasTour && !!step.isActive) {\r\n <span class=\"tour-trigger\">\r\n <button tourAnchor=\"Form-Tour-trigger\" (click)=\"startTour(step.sectionId)\" matTooltip=\"Start section tour\"\r\n mat-icon-button aria-label=\"Start section tour\">\r\n <mat-icon>tour</mat-icon>\r\n </button>\r\n </span>\r\n }\r\n <span class=\"spacer\"></span>\r\n\r\n @if (!!inputWillBeRemovedIn(step.sectionId)) {\r\n <button\r\n (mouseover)=\"overId = step.sectionId\" (mouseout)=\"overId = null\"\r\n (click)=\"deleteSection(step.sectionId)\" color=\"warn\" mat-stroked-button class=\"countdown-button\"\r\n [attr.aria-label]=\"overId === step.sectionId ? 'Cancel section deletion' : 'Section deleting in ' + inputWillBeRemovedIn(step.sectionId) + ' seconds'\">\r\n <div class=\"delete-countdown\">\r\n <mat-progress-spinner color=\"primary\" class=\"cancelProgress\"\r\n [value]=\"((inputWillBeRemovedIn(step.sectionId)||0)/5)*100\">\r\n </mat-progress-spinner>\r\n {{ overId === step.sectionId ? 'Click to cancel' : 'Deleting in' }}\r\n {{ inputWillBeRemovedIn(step.sectionId) }}\r\n </div>\r\n </button>\r\n }\r\n\r\n @if(engine.canRefreshSection(step.sectionId)&& step.isActive){\r\n <button mat-icon-button\r\n class=\"input-sync-button\"\r\n matTooltip=\"Click to refresh this section.\"\r\n (click)=\"refreshASection(step.sectionId)\" >\r\n <mat-icon>sync</mat-icon>\r\n </button>\r\n }\r\n <button (click)=\"$event.stopPropagation()\"\r\n [matMenuTriggerData]=\"{ sectionId: step.sectionId, columns: step.columns }\" [matMenuTriggerFor]=\"sectionMenu\"\r\n mat-icon-button aria-label=\"Section options menu\">\r\n <mat-icon>more_horiz</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @defer (on viewport; prefetch on idle) {\r\n <div class=\"step-content\">\r\n @if (!openSectionReports[step.sectionId]) {\r\n <div (cdkDropListDropped)=\"dropItems($event,step.sectionId)\" [cdkDropListData]=\"step.columns\" cdkDropList\r\n #InputList=\"cdkDropList\" class=\"row form-section\">\r\n @for (col of step.columns; track col.id) {\r\n <mat-card cdkDrag (cdkDragStarted)=\"dragging = true\" (cdkDragReleased)=\"dragging = false\"\r\n [class.inEditCol]=\"(selectInputInEditId$ | async) === col.id\"\r\n [class]=\"'box inputCard col-md-' + (dragging ? '12' : col.colSize)\" (mouseover)=\"activeInput = col.id\"\r\n (focusin)=\"activeInput = col.id\">\r\n @if (step.sectionForm) {\r\n <lib-t-form-input [editorMode]=\"true\" [tourAnchor]=\"col.id\" (valueChange)=\"engine.updateValue(col.id,$event)\"\r\n [formBuilderFunctions]=\"formBuilderFunctions\" [inputConfig]=\"col\" [formGroup]=\"step.sectionForm\"\r\n [attr.aria-label]=\"col?.label || ''\">\r\n </lib-t-form-input>\r\n }\r\n\r\n\r\n\r\n @if (col.inputConfigErrors.length > 0) {\r\n <div class=\"error\">\r\n <ul class=\"error-list\">\r\n @for (error of col.inputConfigErrors; track $index) {\r\n <li class=\"error-item\">{{ error.message }}</li>\r\n }\r\n </ul>\r\n\r\n </div>\r\n }\r\n @if (activeInput === col.id) {\r\n <mat-card-actions>\r\n\r\n <button color=\"primary\" [matTooltip]=\"'Edit ' + col.label + ' input'\" (click)=\"editInput(col)\"\r\n mat-icon-button aria-label=\"Edit input\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n\r\n @if (canSaveDefaultValue(col)) {\r\n <button color=\"primary\" [matTooltip]=\"'Save current value as the default for ' + col.label\"\r\n (click)=\"saveInputDefaultValue(col)\" mat-icon-button aria-label=\"Save current value as default\">\r\n <mat-icon>bookmark_add</mat-icon>\r\n </button>\r\n }\r\n\r\n <button [matTooltip]=\"'Move this input to another section'\" [matMenuTriggerFor]=\"moveInput\"\r\n [matMenuTriggerData]=\"col\" mat-icon-button aria-label=\"Move input to another section\">\r\n <mat-icon>drive_file_move</mat-icon>\r\n </button>\r\n\r\n <button [matTooltip]=\"'Clone form input'\" (click)=\"cloneCopyFormInput(col.id)\" mat-icon-button\r\n aria-label=\"Clone input\">\r\n <mat-icon>file_copy</mat-icon>\r\n </button>\r\n\r\n <span class=\"spacer\"></span>\r\n\r\n\r\n\r\n @if (!!inputWillBeRemovedIn(col.id)) {\r\n <button (mouseover)=\"overId = col.id\" (mouseout)=\"overId = null\" (click)=\"removeInput(col)\" color=\"warn\"\r\n mat-stroked-button>\r\n <div class=\"delete-countdown\">\r\n <mat-progress-spinner color=\"primary\" class=\"cancelProgress\"\r\n [value]=\"((inputWillBeRemovedIn(col.id)||0)/5)*100\">\r\n </mat-progress-spinner>\r\n\r\n {{ overId === col.id ? 'Click to cancel' : 'Deleting in' }} {{ inputWillBeRemovedIn(col.id) }}\r\n </div>\r\n\r\n </button>\r\n\r\n } @else if (col.systemDefault !== true) {\r\n <button color=\"warn\" [matTooltip]=\"'Delete ' + col.label + ' input'\" (click)=\"removeInput(col)\"\r\n mat-icon-button aria-label=\"Delete input\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n\r\n\r\n @if (activeInput === col.id && col.element ==='multipleInput') {\r\n @if (!col.formIsOpen) {\r\n <button matTooltip=\"Open the row entry form \u2014 configure each column's input type here\"\r\n (click)=\"engine.toggleMultipleInput(col.id, true)\" mat-button>\r\n <mat-icon>table_rows</mat-icon>\r\n Row Entry Form\r\n </button>\r\n }\r\n <button \r\n [disabled]=\"col.systemDefault\"\r\n matTooltip=\"Add a new column field to this table\" (click)=\"\r\n addColAndOpen(col)\"\r\n color=\"accent\" mat-stroked-button>\r\n <mat-icon>view_column</mat-icon>\r\n Add Column\r\n </button>\r\n }\r\n @if (activeInput === col.id && col.element === 'mscoaSelection') {\r\n <button matTooltip=\"Extend SCOA Segments with additional inputs\"\r\n (click)=\"addInputToScoaSelection(col.sectionId, col.id)\" color=\"accent\" mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Form Input\r\n </button>\r\n }\r\n\r\n </mat-card-actions>\r\n }\r\n </mat-card>\r\n }\r\n </div>\r\n @if (step.columns.length === 0) {\r\n <section class=\"empty-state-section\">\r\n <p class=\"empty-state-text\">This section has no fields yet.</p>\r\n <p class=\"empty-state-hint\">Add a field to start collecting information.</p>\r\n <div class=\"empty-state-actions\">\r\n <button matTooltip=\"Add a field to this section\" (click)=\"addNewInput(step.sectionId)\" color=\"primary\"\r\n mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add field\r\n </button>\r\n </div>\r\n </section>\r\n } @else {\r\n <div class=\"section-add-field\">\r\n <button class=\"add-field-button\" matTooltip=\"Add another field to this section\"\r\n (click)=\"addNewInput(step.sectionId)\" mat-stroked-button aria-label=\"Add field to this section\">\r\n <mat-icon>add</mat-icon>\r\n Add field\r\n </button>\r\n </div>\r\n }\r\n\r\n\r\n } @else {\r\n <lib-section-report [sectionId]=\"step.sectionId\"></lib-section-report>\r\n }\r\n <div class=\"step-actions\">\r\n @if (!$first) {\r\n <button mat-button matStepperPrevious type=\"button\" class=\"navigation-button\"\r\n [attr.aria-label]=\"'Go back to ' + getPreviousStepLabel()\">\r\n\r\n Back\r\n </button>\r\n }\r\n @if (!$last) {\r\n <button mat-flat-button matStepperNext color=\"primary\" type=\"button\" class=\"navigation-button\"\r\n matTooltip=\"Continue to next section\" [attr.aria-label]=\"'Continue to ' + getNextStepLabel()\">\r\n Next\r\n </button>\r\n }\r\n @if ($last) {\r\n <button mat-button (click)=\"stepper.reset()\" aria-label=\"Reset form\">Reset</button>\r\n }\r\n\r\n </div>\r\n </div>\r\n } @placeholder {\r\n <div class=\"step-placeholder\">\r\n <mat-spinner diameter=\"24\" aria-label=\"Loading step content\" />\r\n </div>\r\n }\r\n\r\n </mat-step>\r\n }\r\n }\r\n </mat-stepper>\r\n @if (engine.selectFormSteps().length === 0) {\r\n <section class=\"empty-state-section add-section-hint\">\r\n <p class=\"empty-state-text\">A form section groups related fields together.</p>\r\n <p class=\"empty-state-hint\">Click <strong>\"Add Section\"</strong> below to create your first section.</p>\r\n </section>\r\n }\r\n <mat-card-actions class=\"sticky-actions\">\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"addSection()\" color=\"accent\" mat-flat-button aria-label=\"Add new section\">\r\n <mat-icon>add</mat-icon>\r\n Add Section\r\n </button>\r\n <span class=\"spacer\"></span>\r\n </mat-card-actions>\r\n <!-- Defer the footer toolbar until after the main form is loaded -->\r\n @defer (on idle; prefetch on viewport) {\r\n <footer><mat-toolbar class=\"submission-toolbar\" role=\"toolbar\" aria-label=\"Form submission actions\">\r\n <span class=\"submission-status\" role=\"status\">\r\n {{ getSubmissionStatus$ | async }}\r\n </span>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"true\" aria-label=\"Submit form\">\r\n <span>\r\n {{ engine.formSubmissionMessage()}}\r\n </span>\r\n @if (engine.submittingForm) {\r\n <mat-spinner diameter=\"10\"></mat-spinner>\r\n }\r\n\r\n </button>\r\n </mat-toolbar>\r\n </footer>\r\n } @placeholder {\r\n <!-- Simple placeholder for the footer that maintains layout -->\r\n <footer>\r\n <div class=\"submission-toolbar-placeholder\"></div>\r\n </footer>\r\n }\r\n\r\n</mat-card>\r\n<mat-menu #sectionMenu=\"matMenu\">\r\n <ng-template matMenuContent let-sectionId=\"sectionId\" let-columns=\"columns\">\r\n <!-- <button mat-menu-item [matMenuTriggerFor]=\"sectionType\">\r\n <mat-icon> disabled_visible</mat-icon>\r\n Set visibility type</button> -->\r\n @if (sectionIncludesDefault(columns) === false) {\r\n <button (click)=\"deleteSection(sectionId, false)\" matTooltip=\"Deletes this section and all its inputs\"\r\n matTooltipPosition=\"right\" mat-menu-item>\r\n <mat-icon style=\"color: var(--mat-sys-error, #b3261e)\">delete</mat-icon>\r\n <span style=\"color: var(--mat-sys-error, #b3261e)\">Delete section</span>\r\n </button>\r\n <button (click)=\"deleteSection(sectionId, true)\" matTooltip=\"Deletes all inputs in this section\"\r\n matTooltipPosition=\"right\" mat-menu-item>\r\n <mat-icon style=\"color: var(--mat-sys-error, #b3261e)\">delete_sweep</mat-icon>\r\n <span style=\"color: var(--mat-sys-error, #b3261e)\">Delete section inputs</span>\r\n </button>\r\n }\r\n\r\n <button (click)=\"toggleSectionReports(sectionId)\" mat-menu-item>\r\n <mat-icon>leaderboard</mat-icon>\r\n {{ openSectionReports[sectionId] ? 'Close report' : 'Section report' }}</button>\r\n </ng-template>\r\n</mat-menu>\r\n<mat-menu #sectionType=\"matMenu\">\r\n <button mat-menu-item>\r\n <mat-icon>visibility</mat-icon>\r\n view only</button>\r\n <button mat-menu-item>\r\n <mat-icon>visibility_off</mat-icon>\r\n system</button>\r\n <button mat-menu-item>\r\n <mat-icon>edit</mat-icon>\r\n user edit</button>\r\n</mat-menu>\r\n<mat-menu #moveInput=\"matMenu\">\r\n <ng-template matMenuContent let-id=\"id\" let-sectionId=\"sectionId\">\r\n @for (section of ( selectFormStepsComputed); track section.sectionId) {\r\n <button [disabled]=\"section.sectionId === sectionId\" (click)=\"moveInputToSection(id,section.sectionId)\"\r\n mat-menu-item>\r\n <mat-icon>folder</mat-icon>\r\n {{section.label || 'Untitled section'}}\r\n </button>\r\n }\r\n\r\n </ng-template>\r\n</mat-menu>\r\n\r\n", styles: [".mainCard{margin:0 auto;min-height:45vh;box-shadow:var(--lib-forms-shadow-resting);max-width:768px;padding:2rem;border-radius:12px;background:var(--lib-forms-surface-container-low)}.loading-container{display:flex;justify-content:center;align-items:center;padding:1.5rem;min-height:12rem}:host .inEditCol{box-shadow:var(--mdc-elevated-card-container-elevation);border:1px solid var(--lib-forms-primary)}.inputCard{box-shadow:none}:host .cancelProgress{height:24px;width:24px}.delete-countdown{display:flex;align-items:center;gap:.25rem;padding:.5rem}:host .numbers{position:absolute;right:0}mat-vertical-stepper{margin:.5rem}.form-section{min-height:60px}.box{padding:.5rem;cursor:move;box-sizing:border-box}.cdk-drag-preview{box-sizing:border-box;border:none;border-radius:8px;box-shadow:var(--lib-forms-shadow-floating)}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.box:last-child{border:none}.form-section.cdk-drop-list-dragging .box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.step-label-container{display:flex;align-items:center;gap:.5rem;width:100%}.spacer{flex:1 1 auto}.section-drag-handle{flex:none;cursor:grab;color:var(--lib-forms-on-surface-variant);max-width:0;margin-right:-.5rem;opacity:0;overflow:hidden;transition:max-width var(--lib-forms-duration-hover) var(--lib-forms-easing),margin-right var(--lib-forms-duration-hover) var(--lib-forms-easing),opacity var(--lib-forms-duration-hover) var(--lib-forms-easing)}.section-drag-handle:active{cursor:grabbing}.step-label-container:hover .section-drag-handle,.section-drag-handle:focus-visible{max-width:3rem;margin-right:0;opacity:.7}.step-label-text{position:relative;display:flex;align-items:center;flex:1 1 auto;min-width:0}.section-title-edit-hint{flex:none;font-size:1rem;width:1rem;height:1rem;margin-left:.5rem;color:var(--lib-forms-on-surface-variant);opacity:0;transition:opacity var(--lib-forms-duration-hover) var(--lib-forms-easing)}.step-label-text:hover .section-title-edit-hint,.section-title-input:focus~.section-title-edit-hint{opacity:.5}.section-status-icon{flex:none;color:var(--sem-emerald)}.section-status-icon.error{color:var(--sem-error)}.input-sync-button{margin-right:.5rem}.input-sync-button mat-icon{color:var(--lib-forms-primary)}.section-title-input{border:none;border-bottom:1px solid transparent;background-color:transparent;font-size:.9375rem;font-weight:600;color:var(--lib-forms-on-surface);padding:.5rem 0;outline:none;width:100%;transition:border-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing)}.section-title-input::placeholder{color:var(--lib-forms-on-surface-variant);font-weight:400;opacity:.6}.section-title-input:hover{border-bottom-color:var(--lib-forms-outline-variant)}.section-title-input:focus{border-bottom-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.inputElement:focus{box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.headerToolbar{position:sticky;top:0;min-width:100%;background:var(--mdc-elevated-card-container-color)}::ng-deep mat-step-header .mat-step-label{width:100%}.error{color:var(--sem-error);display:flex;align-items:center}.error-list{padding-left:1.75rem;margin:.25rem 0}.error-item{color:var(--sem-error);font-size:.75rem}.empty-state-section{text-align:center;padding:1rem 1.5rem}.empty-state-text{font-size:.875rem;color:var(--lib-forms-on-surface-variant);margin:0 0 .5rem}.empty-state-hint{font-size:.8125rem;color:var(--lib-forms-on-surface-variant);margin:0 0 1rem}.empty-state-actions{margin-top:1rem}.add-section-hint{padding-top:1.5rem}.section-add-field{display:flex;justify-content:center;padding:1rem 0 .5rem}.add-field-button{border:1px dashed color-mix(in srgb,var(--lib-forms-outline) 30%,transparent);color:var(--lib-forms-on-surface-variant);transition:border-color var(--lib-forms-duration) var(--lib-forms-easing),color var(--lib-forms-duration) var(--lib-forms-easing),background var(--lib-forms-duration) var(--lib-forms-easing)}.add-field-button:hover{border-color:var(--lib-forms-primary);color:var(--lib-forms-primary);background:color-mix(in srgb,var(--lib-forms-primary) 6%,transparent)}.step-placeholder{padding:3.125rem;display:flex;justify-content:center;align-items:center;text-align:center}.step-actions{display:flex;gap:.75rem;margin-top:1.5rem;padding-top:1rem}.navigation-button{min-height:2.25rem}.sticky-actions{position:sticky;bottom:0;background:var(--mat-sys-surface-container, var(--mdc-elevated-card-container-color))}.submission-toolbar{z-index:1000;background:color-mix(in srgb,var(--lib-forms-surface) 95%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:var(--mat-divider-width) solid var(--mat-divider-color);padding:1rem 1.5rem;display:flex;justify-content:flex-end;align-items:center;gap:1rem}@media(prefers-color-scheme:dark){.submission-toolbar{background:color-mix(in srgb,var(--mat-sys-surface) 95%,transparent)}}.submission-status{font-size:.75rem;opacity:.87;display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.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: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.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: MatMenuModule }, { kind: "component", type: i6.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i4$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "aria-label", "headerPrefix", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i7.TourAnchorMatMenuDirective, selector: "[tourAnchor]", inputs: ["tourAnchor"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i1.NgControlStatusGroup, i1.FormGroupDirective, i1$1.CdkDropList, i1$1.CdkDrag, i2.MatButton, i2.MatIconButton, i3.MatCard, i3.MatCardActions, i3$1.MatIcon, i6.MatMenuTrigger, i4.MatProgressSpinner, i4$1.MatStepperNext, i4$1.MatStepperPrevious, i5.MatTooltip, import('./ngx-t-forms-index-BnK4nGDh.mjs').then(m => m.TFormInputComponent), import('./ngx-t-forms-section-report.component-foLHlD-I.mjs').then(m => m.SectionReportComponent), i7.TourAnchorMatMenuDirective, AsyncPipe], () => [i2.MatButton, i4.MatProgressSpinner, i8.MatToolbar, AsyncPipe]] }); }
364
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FormSectionStepperComponent, isStandalone: true, selector: "lib-form-section-stepper", providers: [TFormEngine], viewQueries: [{ propertyName: "stepper", first: true, predicate: ["stepper"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-card class=\"mainCard\" appearance=\"raised\">\r\n\r\n @if (loadingForm$ | async) {\r\n <div class=\"loading-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-spinner diameter=\"48\" aria-label=\"Loading form\" />\r\n </div>\r\n }\r\n <mat-stepper [style.display]=\"(loadingForm$ | async) ? 'none' : 'block'\" #stepper class=\"form-stepper\"\r\n orientation=\"vertical\" [linear]=\"!isEditable\" aria-label=\"Form sections stepper\" [animationDuration]=\"'300'\"\r\n cdkDropList #formSections=\"cdkDropList\" [cdkDropListData]=\"selectFormStepsComputed\"\r\n (cdkDropListDropped)=\"drop($event)\" (selectionChange)=\"engine.handleStepChange($event)\">\r\n\r\n @for (step of selectFormStepsComputed; track step.sectionId) {\r\n @if (step.sectionForm || getPlaceHolerForSection(step.sectionId)) {\r\n <mat-step [stepControl]=\"step.sectionForm || getPlaceHolerForSection(step.sectionId)\"\r\n [completed]=\"step.sectionIsSeen && !step.sectionIsInvalid\" [editable]=\"isEditable\"\r\n [errorMessage]=\"step.sectionFormErrorMessage||''\" [state]=\"getStepState(step,$index)\"\r\n [hasError]=\"!step.sectionForm?.valid && !!step.sectionForm?.touched\">\r\n <ng-template matStepLabel>\r\n <div cdkDrag class=\"step-label-container\" [attr.aria-label]=\"'Section ' + step.label\">\r\n <button cdkDragHandle type=\"button\" class=\"section-drag-handle\" (click)=\"$event.stopPropagation()\"\r\n matTooltip=\"Drag to reorder section\" aria-label=\"Drag to reorder section\" mat-icon-button>\r\n <mat-icon>drag_indicator</mat-icon>\r\n </button>\r\n <span class=\"step-label-text\">\r\n <input (input)=\"handleInput($event, step.sectionId)\" class=\"section-title-input\" matInput\r\n (keydown.space)=\"onSpaceKey($event, step.sectionId)\" placeholder=\"Untitled section \u2014 click to name\"\r\n [value]=\"step.label\" aria-label=\"Section title\">\r\n <mat-icon class=\"section-title-edit-hint\" aria-hidden=\"true\">edit</mat-icon>\r\n </span>\r\n @if (step.sectionIsSeen) {\r\n <mat-icon class=\"section-status-icon\" [class.error]=\"step.sectionIsInvalid\"\r\n [attr.aria-label]=\"step.sectionIsInvalid ? 'Section has errors' : 'Section completed'\">\r\n {{ step.sectionIsInvalid ? 'error' : 'check_circle' }}\r\n </mat-icon>\r\n }\r\n @if ((step)?.activeSectionHasTour && !!step.isActive) {\r\n <span class=\"tour-trigger\">\r\n <button tourAnchor=\"Form-Tour-trigger\" (click)=\"startTour(step.sectionId)\" matTooltip=\"Start section tour\"\r\n mat-icon-button aria-label=\"Start section tour\">\r\n <mat-icon>tour</mat-icon>\r\n </button>\r\n </span>\r\n }\r\n <span class=\"spacer\"></span>\r\n\r\n @if (!!inputWillBeRemovedIn(step.sectionId)) {\r\n <button\r\n (mouseover)=\"overId = step.sectionId\" (mouseout)=\"overId = null\"\r\n (click)=\"deleteSection(step.sectionId)\" color=\"warn\" mat-stroked-button class=\"countdown-button\"\r\n [attr.aria-label]=\"overId === step.sectionId ? 'Cancel section deletion' : 'Section deleting in ' + inputWillBeRemovedIn(step.sectionId) + ' seconds'\">\r\n <div class=\"delete-countdown\">\r\n <mat-progress-spinner color=\"primary\" class=\"cancelProgress\"\r\n [value]=\"((inputWillBeRemovedIn(step.sectionId)||0)/5)*100\">\r\n </mat-progress-spinner>\r\n {{ overId === step.sectionId ? 'Click to cancel' : 'Deleting in' }}\r\n {{ inputWillBeRemovedIn(step.sectionId) }}\r\n </div>\r\n </button>\r\n }\r\n\r\n @if(engine.canRefreshSection(step.sectionId)&& step.isActive){\r\n <button mat-icon-button\r\n class=\"input-sync-button\"\r\n matTooltip=\"Click to refresh this section.\"\r\n (click)=\"refreshASection(step.sectionId)\" >\r\n <mat-icon>sync</mat-icon>\r\n </button>\r\n }\r\n <button (click)=\"$event.stopPropagation()\"\r\n [matMenuTriggerData]=\"{ sectionId: step.sectionId, columns: step.columns }\" [matMenuTriggerFor]=\"sectionMenu\"\r\n mat-icon-button aria-label=\"Section options menu\">\r\n <mat-icon>more_horiz</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n\r\n @defer (on viewport; prefetch on idle) {\r\n <div class=\"step-content\">\r\n @if (!openSectionReports[step.sectionId]) {\r\n <div (cdkDropListDropped)=\"dropItems($event,step.sectionId)\" [cdkDropListData]=\"step.columns\" cdkDropList\r\n #InputList=\"cdkDropList\" class=\"row form-section\">\r\n @for (col of step.columns; track col.id) {\r\n <mat-card cdkDrag (cdkDragStarted)=\"dragging = true\" (cdkDragReleased)=\"dragging = false\"\r\n [class.inEditCol]=\"(selectInputInEditId$ | async) === col.id\"\r\n [class]=\"'box inputCard col-md-' + (dragging ? '12' : col.colSize)\" (mouseover)=\"activeInput = col.id\"\r\n (focusin)=\"activeInput = col.id\">\r\n @if (step.sectionForm) {\r\n <lib-t-form-input [editorMode]=\"true\" [tourAnchor]=\"col.id\" (valueChange)=\"engine.updateValue(col.id,$event)\"\r\n [formBuilderFunctions]=\"formBuilderFunctions\" [inputConfig]=\"col\" [formGroup]=\"step.sectionForm\"\r\n [attr.aria-label]=\"col?.label || ''\">\r\n </lib-t-form-input>\r\n }\r\n\r\n\r\n\r\n @if (col.inputConfigErrors.length > 0) {\r\n <div class=\"error\">\r\n <ul class=\"error-list\">\r\n @for (error of col.inputConfigErrors; track $index) {\r\n <li class=\"error-item\">{{ error.message }}</li>\r\n }\r\n </ul>\r\n\r\n </div>\r\n }\r\n @if (activeInput === col.id) {\r\n <mat-card-actions>\r\n\r\n <button color=\"primary\" [matTooltip]=\"'Edit ' + col.label + ' input'\" (click)=\"editInput(col)\"\r\n mat-icon-button aria-label=\"Edit input\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n\r\n @if (canSaveDefaultValue(col)) {\r\n <button color=\"primary\" [matTooltip]=\"'Save current value as the default for ' + col.label\"\r\n (click)=\"saveInputDefaultValue(col)\" mat-icon-button aria-label=\"Save current value as default\">\r\n <mat-icon>bookmark_add</mat-icon>\r\n </button>\r\n }\r\n\r\n <button [matTooltip]=\"'Move this input to another section'\" [matMenuTriggerFor]=\"moveInput\"\r\n [matMenuTriggerData]=\"col\" mat-icon-button aria-label=\"Move input to another section\">\r\n <mat-icon>drive_file_move</mat-icon>\r\n </button>\r\n\r\n <button [matTooltip]=\"'Clone form input'\" (click)=\"cloneCopyFormInput(col.id)\" mat-icon-button\r\n aria-label=\"Clone input\">\r\n <mat-icon>file_copy</mat-icon>\r\n </button>\r\n\r\n <span class=\"spacer\"></span>\r\n\r\n\r\n\r\n @if (!!inputWillBeRemovedIn(col.id)) {\r\n <button (mouseover)=\"overId = col.id\" (mouseout)=\"overId = null\" (click)=\"removeInput(col)\" color=\"warn\"\r\n mat-stroked-button>\r\n <div class=\"delete-countdown\">\r\n <mat-progress-spinner color=\"primary\" class=\"cancelProgress\"\r\n [value]=\"((inputWillBeRemovedIn(col.id)||0)/5)*100\">\r\n </mat-progress-spinner>\r\n\r\n {{ overId === col.id ? 'Click to cancel' : 'Deleting in' }} {{ inputWillBeRemovedIn(col.id) }}\r\n </div>\r\n\r\n </button>\r\n\r\n } @else if (col.systemDefault !== true) {\r\n <button color=\"warn\" [matTooltip]=\"'Delete ' + col.label + ' input'\" (click)=\"removeInput(col)\"\r\n mat-icon-button aria-label=\"Delete input\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n\r\n\r\n @if (activeInput === col.id && col.element ==='multipleInput') {\r\n @if (!col.formIsOpen) {\r\n <button matTooltip=\"Open the row entry form \u2014 configure each column's input type here\"\r\n (click)=\"engine.toggleMultipleInput(col.id, true)\" mat-button>\r\n <mat-icon>table_rows</mat-icon>\r\n Row Entry Form\r\n </button>\r\n }\r\n <button \r\n [disabled]=\"col.systemDefault\"\r\n matTooltip=\"Add a new column field to this table\" (click)=\"\r\n addColAndOpen(col)\"\r\n color=\"accent\" mat-stroked-button>\r\n <mat-icon>view_column</mat-icon>\r\n Add Column\r\n </button>\r\n }\r\n @if (activeInput === col.id && col.element === 'mscoaSelection') {\r\n <button matTooltip=\"Extend SCOA Segments with additional inputs\"\r\n (click)=\"addInputToScoaSelection(col.sectionId, col.id)\" color=\"accent\" mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add Form Input\r\n </button>\r\n }\r\n\r\n </mat-card-actions>\r\n }\r\n </mat-card>\r\n }\r\n </div>\r\n @if (step.columns.length === 0) {\r\n <section class=\"empty-state-section\">\r\n <p class=\"empty-state-text\">This section has no fields yet.</p>\r\n <p class=\"empty-state-hint\">Add a field to start collecting information.</p>\r\n <div class=\"empty-state-actions\">\r\n <button matTooltip=\"Add a field to this section\" (click)=\"addNewInput(step.sectionId)\" color=\"primary\"\r\n mat-flat-button>\r\n <mat-icon>add</mat-icon>\r\n Add field\r\n </button>\r\n </div>\r\n </section>\r\n } @else {\r\n <div class=\"section-add-field\">\r\n <button class=\"add-field-button\" matTooltip=\"Add another field to this section\"\r\n (click)=\"addNewInput(step.sectionId)\" mat-stroked-button aria-label=\"Add field to this section\">\r\n <mat-icon>add</mat-icon>\r\n Add field\r\n </button>\r\n </div>\r\n }\r\n\r\n\r\n } @else {\r\n <lib-section-report [sectionId]=\"step.sectionId\"></lib-section-report>\r\n }\r\n <div class=\"step-actions\">\r\n @if (!$first) {\r\n <button mat-button matStepperPrevious type=\"button\" class=\"navigation-button\"\r\n [attr.aria-label]=\"'Go back to ' + getPreviousStepLabel()\">\r\n\r\n Back\r\n </button>\r\n }\r\n @if (!$last) {\r\n <button mat-flat-button matStepperNext color=\"primary\" type=\"button\" class=\"navigation-button\"\r\n matTooltip=\"Continue to next section\" [attr.aria-label]=\"'Continue to ' + getNextStepLabel()\">\r\n Next\r\n </button>\r\n }\r\n @if ($last) {\r\n <button mat-button (click)=\"stepper.reset()\" aria-label=\"Reset form\">Reset</button>\r\n }\r\n\r\n </div>\r\n </div>\r\n } @placeholder {\r\n <div class=\"step-placeholder\">\r\n <mat-spinner diameter=\"24\" aria-label=\"Loading step content\" />\r\n </div>\r\n }\r\n\r\n </mat-step>\r\n }\r\n }\r\n </mat-stepper>\r\n @if (engine.selectFormSteps().length === 0) {\r\n <section class=\"empty-state-section add-section-hint\">\r\n <p class=\"empty-state-text\">A form section groups related fields together.</p>\r\n <p class=\"empty-state-hint\">Click <strong>\"Add Section\"</strong> below to create your first section.</p>\r\n </section>\r\n }\r\n <mat-card-actions class=\"sticky-actions\">\r\n <span class=\"spacer\"></span>\r\n <button (click)=\"addSection()\" color=\"accent\" mat-flat-button aria-label=\"Add new section\">\r\n <mat-icon>add</mat-icon>\r\n Add Section\r\n </button>\r\n <span class=\"spacer\"></span>\r\n </mat-card-actions>\r\n <!-- Defer the footer toolbar until after the main form is loaded -->\r\n @defer (on idle; prefetch on viewport) {\r\n <footer><mat-toolbar class=\"submission-toolbar\" role=\"toolbar\" aria-label=\"Form submission actions\">\r\n <span class=\"submission-status\" role=\"status\">\r\n {{ getSubmissionStatus$ | async }}\r\n </span>\r\n <button mat-raised-button color=\"primary\" [disabled]=\"true\" aria-label=\"Submit form\">\r\n <span>\r\n {{ engine.formSubmissionMessage()}}\r\n </span>\r\n @if (engine.submittingForm) {\r\n <mat-spinner diameter=\"10\"></mat-spinner>\r\n }\r\n\r\n </button>\r\n </mat-toolbar>\r\n </footer>\r\n } @placeholder {\r\n <!-- Simple placeholder for the footer that maintains layout -->\r\n <footer>\r\n <div class=\"submission-toolbar-placeholder\"></div>\r\n </footer>\r\n }\r\n\r\n</mat-card>\r\n<mat-menu #sectionMenu=\"matMenu\">\r\n <ng-template matMenuContent let-sectionId=\"sectionId\" let-columns=\"columns\">\r\n <!-- <button mat-menu-item [matMenuTriggerFor]=\"sectionType\">\r\n <mat-icon> disabled_visible</mat-icon>\r\n Set visibility type</button> -->\r\n @if (sectionIncludesDefault(columns) === false) {\r\n <button (click)=\"deleteSection(sectionId, false)\" matTooltip=\"Deletes this section and all its inputs\"\r\n matTooltipPosition=\"right\" mat-menu-item>\r\n <mat-icon style=\"color: var(--mat-sys-error, #b3261e)\">delete</mat-icon>\r\n <span style=\"color: var(--mat-sys-error, #b3261e)\">Delete section</span>\r\n </button>\r\n <button (click)=\"deleteSection(sectionId, true)\" matTooltip=\"Deletes all inputs in this section\"\r\n matTooltipPosition=\"right\" mat-menu-item>\r\n <mat-icon style=\"color: var(--mat-sys-error, #b3261e)\">delete_sweep</mat-icon>\r\n <span style=\"color: var(--mat-sys-error, #b3261e)\">Delete section inputs</span>\r\n </button>\r\n }\r\n\r\n <button (click)=\"toggleSectionReports(sectionId)\" mat-menu-item>\r\n <mat-icon>leaderboard</mat-icon>\r\n {{ openSectionReports[sectionId] ? 'Close report' : 'Section report' }}</button>\r\n </ng-template>\r\n</mat-menu>\r\n<mat-menu #sectionType=\"matMenu\">\r\n <button mat-menu-item>\r\n <mat-icon>visibility</mat-icon>\r\n view only</button>\r\n <button mat-menu-item>\r\n <mat-icon>visibility_off</mat-icon>\r\n system</button>\r\n <button mat-menu-item>\r\n <mat-icon>edit</mat-icon>\r\n user edit</button>\r\n</mat-menu>\r\n<mat-menu #moveInput=\"matMenu\">\r\n <ng-template matMenuContent let-id=\"id\" let-sectionId=\"sectionId\">\r\n @for (section of ( selectFormStepsComputed); track section.sectionId) {\r\n <button [disabled]=\"section.sectionId === sectionId\" (click)=\"moveInputToSection(id,section.sectionId)\"\r\n mat-menu-item>\r\n <mat-icon>folder</mat-icon>\r\n {{section.label || 'Untitled section'}}\r\n </button>\r\n }\r\n\r\n </ng-template>\r\n</mat-menu>\r\n\r\n", styles: [".mainCard{margin:0 auto;min-height:45vh;box-shadow:var(--lib-forms-shadow-resting);max-width:768px;padding:2rem;border-radius:12px;background:var(--lib-forms-surface-container-low)}.loading-container{display:flex;justify-content:center;align-items:center;padding:1.5rem;min-height:12rem}:host .inEditCol{box-shadow:var(--mdc-elevated-card-container-elevation);border:1px solid var(--lib-forms-primary)}.inputCard{box-shadow:none}:host .cancelProgress{height:24px;width:24px}.delete-countdown{display:flex;align-items:center;gap:.25rem;padding:.5rem}:host .numbers{position:absolute;right:0}mat-vertical-stepper{margin:.5rem}.form-section{min-height:60px}.box{padding:.5rem;cursor:move;box-sizing:border-box}.cdk-drag-preview{box-sizing:border-box;border:none;border-radius:8px;box-shadow:var(--lib-forms-shadow-floating)}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.box:last-child{border:none}.form-section.cdk-drop-list-dragging .box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.step-label-container{display:flex;align-items:center;gap:.5rem;width:100%}.spacer{flex:1 1 auto}.section-drag-handle{flex:none;cursor:grab;color:var(--lib-forms-on-surface-variant);max-width:0;margin-right:-.5rem;opacity:0;overflow:hidden;transition:max-width var(--lib-forms-duration-hover) var(--lib-forms-easing),margin-right var(--lib-forms-duration-hover) var(--lib-forms-easing),opacity var(--lib-forms-duration-hover) var(--lib-forms-easing)}.section-drag-handle:active{cursor:grabbing}.step-label-container:hover .section-drag-handle,.section-drag-handle:focus-visible{max-width:3rem;margin-right:0;opacity:.7}.step-label-text{position:relative;display:flex;align-items:center;flex:1 1 auto;min-width:0}.section-title-edit-hint{flex:none;font-size:1rem;width:1rem;height:1rem;margin-left:.5rem;color:var(--lib-forms-on-surface-variant);opacity:0;transition:opacity var(--lib-forms-duration-hover) var(--lib-forms-easing)}.step-label-text:hover .section-title-edit-hint,.section-title-input:focus~.section-title-edit-hint{opacity:.5}.section-status-icon{flex:none;color:var(--sem-emerald)}.section-status-icon.error{color:var(--sem-error)}.input-sync-button{margin-right:.5rem}.input-sync-button mat-icon{color:var(--lib-forms-primary)}.section-title-input{border:none;border-bottom:1px solid transparent;background-color:transparent;font-size:.9375rem;font-weight:600;color:var(--lib-forms-on-surface);padding:.5rem 0;outline:none;width:100%;transition:border-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing)}.section-title-input::placeholder{color:var(--lib-forms-on-surface-variant);font-weight:400;opacity:.6}.section-title-input:hover{border-bottom-color:var(--lib-forms-outline-variant)}.section-title-input:focus{border-bottom-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.inputElement:focus{box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.headerToolbar{position:sticky;top:0;min-width:100%;background:var(--mdc-elevated-card-container-color)}::ng-deep mat-step-header .mat-step-label{width:100%}.error{color:var(--sem-error);display:flex;align-items:center}.error-list{padding-left:1.75rem;margin:.25rem 0}.error-item{color:var(--sem-error);font-size:.75rem}.empty-state-section{text-align:center;padding:1rem 1.5rem}.empty-state-text{font-size:.875rem;color:var(--lib-forms-on-surface-variant);margin:0 0 .5rem}.empty-state-hint{font-size:.8125rem;color:var(--lib-forms-on-surface-variant);margin:0 0 1rem}.empty-state-actions{margin-top:1rem}.add-section-hint{padding-top:1.5rem}.section-add-field{display:flex;justify-content:center;padding:1rem 0 .5rem}.add-field-button{border:1px dashed color-mix(in srgb,var(--lib-forms-outline) 30%,transparent);color:var(--lib-forms-on-surface-variant);transition:border-color var(--lib-forms-duration) var(--lib-forms-easing),color var(--lib-forms-duration) var(--lib-forms-easing),background var(--lib-forms-duration) var(--lib-forms-easing)}.add-field-button:hover{border-color:var(--lib-forms-primary);color:var(--lib-forms-primary);background:color-mix(in srgb,var(--lib-forms-primary) 6%,transparent)}.step-placeholder{padding:3.125rem;display:flex;justify-content:center;align-items:center;text-align:center}.step-actions{display:flex;gap:.75rem;margin-top:1.5rem;padding-top:1rem}.navigation-button{min-height:2.25rem}.sticky-actions{position:sticky;bottom:0;background:var(--mat-sys-surface-container, var(--mdc-elevated-card-container-color))}.submission-toolbar{z-index:1000;background:color-mix(in srgb,var(--lib-forms-surface) 95%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:var(--mat-divider-width) solid var(--mat-divider-color);padding:1rem 1.5rem;display:flex;justify-content:flex-end;align-items:center;gap:1rem}@media(prefers-color-scheme:dark){.submission-toolbar{background:color-mix(in srgb,var(--mat-sys-surface) 95%,transparent)}}.submission-status{font-size:.75rem;opacity:.87;display:flex;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i1$1.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.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: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$1.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: MatMenuModule }, { kind: "component", type: i6.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i4$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "aria-label", "headerPrefix", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i7.TourAnchorMatMenuDirective, selector: "[tourAnchor]", inputs: ["tourAnchor"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i1.NgControlStatusGroup, i1.FormGroupDirective, i1$1.CdkDropList, i1$1.CdkDrag, i2.MatButton, i2.MatIconButton, i3.MatCard, i3.MatCardActions, i3$1.MatIcon, i6.MatMenuTrigger, i4.MatProgressSpinner, i4$1.MatStepperNext, i4$1.MatStepperPrevious, i5.MatTooltip, import('./ngx-t-forms-index-zLon09cE.mjs').then(m => m.TFormInputComponent), import('./ngx-t-forms-section-report.component-CocLNrN5.mjs').then(m => m.SectionReportComponent), i7.TourAnchorMatMenuDirective, AsyncPipe], () => [i2.MatButton, i4.MatProgressSpinner, i8.MatToolbar, AsyncPipe]] }); }
365
365
  }
366
- i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: FormSectionStepperComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-index-BnK4nGDh.mjs').then(m => m.TFormInputComponent), import('./ngx-t-forms-section-report.component-foLHlD-I.mjs').then(m => m.SectionReportComponent)], resolveMetadata: (TFormInputComponent, SectionReportComponent) => ({ decorators: [{
366
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: FormSectionStepperComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-index-zLon09cE.mjs').then(m => m.TFormInputComponent), import('./ngx-t-forms-section-report.component-CocLNrN5.mjs').then(m => m.SectionReportComponent)], resolveMetadata: (TFormInputComponent, SectionReportComponent) => ({ decorators: [{
367
367
  type: Component,
368
368
  args: [{ selector: 'lib-form-section-stepper', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [
369
369
  AsyncPipe,
@@ -386,4 +386,4 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", n
386
386
  }], ctorParameters: null, propDecorators: { stepper: [{ type: i0.ViewChild, args: ['stepper', { isSignal: true }] }] } }) });
387
387
 
388
388
  export { FormSectionStepperComponent };
389
- //# sourceMappingURL=ngx-t-forms-form-section-stepper.component-B1dYMlCC.mjs.map
389
+ //# sourceMappingURL=ngx-t-forms-form-section-stepper.component-DmTGnRgi.mjs.map