@softpak/components 19.4.0 → 19.5.0-beta.2

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 (87) hide show
  1. package/README.md +24 -24
  2. package/fesm2022/softpak-components-spx-alert.mjs +25 -159
  3. package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
  4. package/fesm2022/softpak-components-spx-app-configuration.mjs.map +1 -1
  5. package/fesm2022/softpak-components-spx-app-expiry.mjs +56 -56
  6. package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
  7. package/fesm2022/softpak-components-spx-button.mjs +28 -111
  8. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  9. package/fesm2022/softpak-components-spx-capitalize.mjs.map +1 -1
  10. package/fesm2022/softpak-components-spx-card.mjs +80 -293
  11. package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
  12. package/fesm2022/softpak-components-spx-change-details.mjs +5 -5
  13. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
  14. package/fesm2022/softpak-components-spx-channel-selection.mjs +52 -52
  15. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  16. package/fesm2022/softpak-components-spx-check-digit.mjs +3 -3
  17. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  18. package/fesm2022/softpak-components-spx-form-section.mjs +22 -22
  19. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  20. package/fesm2022/softpak-components-spx-form-view.mjs +23 -202
  21. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
  22. package/fesm2022/softpak-components-spx-helpers.mjs.map +1 -1
  23. package/fesm2022/softpak-components-spx-inputs.mjs +441 -1286
  24. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  25. package/fesm2022/softpak-components-spx-navigation.mjs +44 -44
  26. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  27. package/fesm2022/softpak-components-spx-number-check.mjs +77 -79
  28. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
  29. package/fesm2022/softpak-components-spx-pagination.mjs +2 -2
  30. package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
  31. package/fesm2022/softpak-components-spx-patch.mjs +25 -25
  32. package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
  33. package/fesm2022/softpak-components-spx-pipes.mjs +28 -0
  34. package/fesm2022/softpak-components-spx-pipes.mjs.map +1 -0
  35. package/fesm2022/softpak-components-spx-progress-bar.mjs +14 -14
  36. package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
  37. package/fesm2022/softpak-components-spx-spinner.mjs +142 -142
  38. package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
  39. package/fesm2022/softpak-components-spx-stock-info.mjs +2 -2
  40. package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
  41. package/fesm2022/softpak-components-spx-storage.mjs.map +1 -1
  42. package/fesm2022/softpak-components-spx-suggestion.mjs +3 -47
  43. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  44. package/fesm2022/softpak-components-spx-toaster.mjs +93 -93
  45. package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
  46. package/fesm2022/softpak-components-spx-translate.mjs.map +1 -1
  47. package/fesm2022/softpak-components-spx-update.mjs +4 -7
  48. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  49. package/fesm2022/softpak-components-spx-validation.mjs +2 -2
  50. package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
  51. package/package.json +30 -26
  52. package/spx-alert/spx-alert.component.d.ts +9 -14
  53. package/spx-button/spx-button.component.d.ts +15 -18
  54. package/spx-card/public-api.d.ts +3 -3
  55. package/spx-card/{spx-card-grid.component.d.ts → spx-card-grid/spx-card-grid.component.d.ts} +2 -2
  56. package/spx-card/spx-card-item/spx-card-item.component.d.ts +15 -0
  57. package/spx-card/spx-card-line/spx-card-line.component.d.ts +16 -0
  58. package/spx-change-details/spx-change-details.component.d.ts +2 -2
  59. package/spx-form-view/spx-autocomplete-search.component.d.ts +3 -4
  60. package/spx-form-view/spx-form-field.interface.d.ts +1 -1
  61. package/spx-form-view/spx-form-view.component.d.ts +10 -10
  62. package/spx-inputs/input.service.d.ts +12 -0
  63. package/spx-inputs/public-api.d.ts +2 -2
  64. package/spx-inputs/{spx-dropdown.component.d.ts → spx-dropdown/spx-dropdown.component.d.ts} +7 -7
  65. package/spx-inputs/spx-input-box/spx-input-box.component.d.ts +37 -0
  66. package/spx-inputs/spx-input-date/spx-input-date.component.d.ts +8 -4
  67. package/spx-inputs/spx-input-float/spx-input-float.component.d.ts +30 -0
  68. package/spx-inputs/spx-input-number/spx-input-number.component.d.ts +23 -0
  69. package/spx-inputs/spx-input-radio/spx-input-radio.component.d.ts +27 -0
  70. package/spx-inputs/spx-input-text/spx-input-text.component.d.ts +33 -0
  71. package/spx-inputs/spx-input-time/spx-input-time.component.d.ts +35 -0
  72. package/spx-inputs/{spx-input-time-modal.component.d.ts → spx-input-time-modal/spx-input-time-modal.component.d.ts} +6 -7
  73. package/spx-inputs/spx-input-type.enum.d.ts +2 -1
  74. package/spx-inputs/spx-input.component.d.ts +50 -49
  75. package/spx-number-check/spx-number-check.component.d.ts +1 -3
  76. package/spx-pipes/index.d.ts +5 -0
  77. package/spx-pipes/public-api.d.ts +1 -0
  78. package/spx-pipes/spx-severity-pipe.d.ts +8 -0
  79. package/tailwind.css +1 -1
  80. package/spx-card/spx-card-item.component.d.ts +0 -24
  81. package/spx-card/spx-card-line.component.d.ts +0 -17
  82. package/spx-inputs/spx-input-box.component.d.ts +0 -40
  83. package/spx-inputs/spx-input-float.component.d.ts +0 -30
  84. package/spx-inputs/spx-input-number.component.d.ts +0 -23
  85. package/spx-inputs/spx-input-radio.component.d.ts +0 -27
  86. package/spx-inputs/spx-input-text.component.d.ts +0 -31
  87. package/spx-inputs/spx-input-time.component.d.ts +0 -45
@@ -1,16 +1,16 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output, ViewChildren } from '@angular/core';
3
- import { SpxFormSectionComponent } from '@softpak/components/spx-form-section';
4
- import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
5
- import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
2
+ import { EventEmitter, Component, Input, Output, input, output, viewChildren, ElementRef, ChangeDetectionStrategy } from '@angular/core';
6
3
  import * as i1 from '@angular/forms';
7
4
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
8
5
  import { debounceTime } from 'rxjs';
9
6
  import { SpxButtonComponent } from '@softpak/components/spx-button';
10
7
  import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
11
- import { SpxValidateControlComponent } from '@softpak/components/spx-validation';
8
+ import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
12
9
  import * as i2 from '@ngx-translate/core';
13
10
  import { TranslateModule } from '@ngx-translate/core';
11
+ import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
12
+ import { SpxFormSectionComponent } from '@softpak/components/spx-form-section';
13
+ import { SpxValidateControlComponent } from '@softpak/components/spx-validation';
14
14
 
15
15
  var SpxFormButtonTypeEnum;
16
16
  (function (SpxFormButtonTypeEnum) {
@@ -32,8 +32,7 @@ class SpxAutocompleteSearchComponent {
32
32
  this.spxSubmit = new EventEmitter();
33
33
  this.inputTypeRadio = SpxInputTypeEnum.radio;
34
34
  this.inputTypeText = SpxInputTypeEnum.text;
35
- this.severityError = SpxSeverityEnum.error;
36
- this.severitySuccess = SpxSeverityEnum.success;
35
+ this.SpxSeverity = SpxSeverityEnum;
37
36
  this.sections = [
38
37
  {
39
38
  key: sectionAutocompleteSearch,
@@ -95,7 +94,7 @@ class SpxAutocompleteSearchComponent {
95
94
  });
96
95
  }
97
96
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxAutocompleteSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
98
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SpxAutocompleteSearchComponent, isStandalone: true, selector: "spx-autocomplete-search", inputs: { spxSuggestions: "spxSuggestions", spxField: "spxField", txtOptions: "txtOptions", txtQuery: "txtQuery", txtSubmit: "txtSubmit", spxValuePair: "spxValuePair" }, outputs: { spxCancel: "spxCancel", spxSearch: "spxSearch", spxSubmit: "spxSubmit" }, ngImport: i0, template: "<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\n </spx-input>\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\n [spxType]=\"inputTypeRadio\">\n </spx-input>\n </div>\n <div class=\"py-3 flex flex-col gap-3\">\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severityError\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\n Cancel\n </spx-button>\n </div>\n </div>\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
97
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SpxAutocompleteSearchComponent, isStandalone: true, selector: "spx-autocomplete-search", inputs: { spxSuggestions: "spxSuggestions", spxField: "spxField", txtOptions: "txtOptions", txtQuery: "txtQuery", txtSubmit: "txtSubmit", spxValuePair: "spxValuePair" }, outputs: { spxCancel: "spxCancel", spxSearch: "spxSearch", spxSubmit: "spxSubmit" }, ngImport: i0, template: "<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\r\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\r\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\r\n [spxType]=\"inputTypeRadio\">\r\n </spx-input>\r\n </div>\r\n <div class=\"py-3 flex flex-col gap-3\">\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"SpxSeverity.success\">\r\n Save\r\n </spx-button>\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"SpxSeverity.error\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\r\n Cancel\r\n </spx-button>\r\n </div>\r\n </div>\r\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "spxCapitalize"], outputs: ["spxClear", "spxEdit", "spxHelp", "spxSearch", "spxBlur"] }] }); }
99
98
  }
100
99
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxAutocompleteSearchComponent, decorators: [{
101
100
  type: Component,
@@ -104,8 +103,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
104
103
  ReactiveFormsModule,
105
104
  SpxButtonComponent,
106
105
  SpxInputComponent,
107
- SpxValidateControlComponent
108
- ], template: "<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\n </spx-input>\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\n [spxType]=\"inputTypeRadio\">\n </spx-input>\n </div>\n <div class=\"py-3 flex flex-col gap-3\">\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severityError\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\n Cancel\n </spx-button>\n </div>\n </div>\n</form>" }]
106
+ ], template: "<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\r\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\r\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\r\n [spxType]=\"inputTypeRadio\">\r\n </spx-input>\r\n </div>\r\n <div class=\"py-3 flex flex-col gap-3\">\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"SpxSeverity.success\">\r\n Save\r\n </spx-button>\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"SpxSeverity.error\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\r\n Cancel\r\n </spx-button>\r\n </div>\r\n </div>\r\n</form>" }]
109
107
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { spxSuggestions: [{
110
108
  type: Input
111
109
  }], spxField: [{
@@ -128,15 +126,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
128
126
 
129
127
  class SpxFormViewComponent {
130
128
  setAutofocus(key) {
131
- const field = this.spxInputs.find(input => input.spxName === key);
129
+ const field = this.spxInputs().find(input => input.nativeElement.spxName() === key);
132
130
  if (field) {
133
- field.setFocusIn();
131
+ field.nativeElement.setFocusIn();
134
132
  }
135
133
  }
136
134
  onBlur(field) {
137
135
  this.spxBlur.emit({
138
136
  field,
139
- valuePair: this.spxFormGroup.get(field.key).value,
137
+ valuePair: this.spxFormGroup().get(field.key).value,
140
138
  });
141
139
  }
142
140
  onClick(field) {
@@ -156,7 +154,7 @@ class SpxFormViewComponent {
156
154
  }
157
155
  }
158
156
  onAutocompleteSave(valuePair) {
159
- this.spxFormGroup.get(this.autocompleteField.key)?.setValue(valuePair);
157
+ this.spxFormGroup().get(this.autocompleteField.key)?.setValue(valuePair);
160
158
  this.autocompleteField = undefined;
161
159
  }
162
160
  onSearch(field) {
@@ -198,9 +196,13 @@ class SpxFormViewComponent {
198
196
  }
199
197
  constructor(formBuilder) {
200
198
  this.formBuilder = formBuilder;
201
- this.spxBlur = new EventEmitter();
202
- this.spxClick = new EventEmitter();
203
- this.spxSearch = new EventEmitter();
199
+ this.spxFormGroup = input.required();
200
+ this.spxForm = input.required();
201
+ this.spxSuggestions = input.required();
202
+ this.spxBlur = output();
203
+ this.spxClick = output();
204
+ this.spxSearch = output();
205
+ this.spxInputs = viewChildren((ElementRef));
204
206
  this.typeAutocomplete = SpxInputTypeEnum.autocomplete;
205
207
  this.typeButton = SpxInputTypeEnum.button;
206
208
  this.typeFloat = SpxInputTypeEnum.float;
@@ -212,94 +214,11 @@ class SpxFormViewComponent {
212
214
  this.typeOverlayNumber = SpxInputTypeEnum.overlayNumber;
213
215
  }
214
216
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxFormViewComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
215
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxFormViewComponent, isStandalone: true, selector: "spx-form-view", inputs: { spxFormGroup: "spxFormGroup", spxForm: "spxForm", spxSuggestions: "spxSuggestions" }, outputs: { spxBlur: "spxBlur", spxClick: "spxClick", spxSearch: "spxSearch" }, viewQueries: [{ propertyName: "spxInputs", predicate: SpxInputComponent, descendants: true }], ngImport: i0, template: `@if (autocompleteField) {
216
- <spx-autocomplete-search
217
- [spxField]="autocompleteField"
218
- [spxSuggestions]="this.spxSuggestions[autocompleteField.key]"
219
- [spxValuePair]="$any(this.spxFormGroup.get(autocompleteField.key)).value"
220
- [txtOptions]="'Options'"
221
- [txtQuery]="'Query'"
222
- [txtSubmit]="'Save'"
223
- (spxCancel)="onAutocompleteCancel()"
224
- (spxSearch)="onAutocompleteSearch($event)"
225
- (spxSubmit)="onAutocompleteSave($event)">
226
- </spx-autocomplete-search>
227
- }
228
- <div class="flex flex-col gap-3">
229
- @for (spxSection of spxForm.sections; track spxSection; let spxSectionIndex = $index) {
230
- <spx-form-section
231
- [spxShowTitle]="!spxSection.showTitle || spxSection.showTitle()"
232
- [spxIndex]="spxSectionIndex + 1"
233
- [spxTitle]="spxSection.title ? (spxSection.title() | translate | capitalize) : undefined">
234
- @for (spxField of spxSection.fields; track spxField; let spxFieldIndex = $index) {
235
- @if (spxField.show === undefined || spxField.show()) {
236
- @if (spxField.type() === typeButton) {
237
- <spx-button
238
- [spxFullWidth]="true"
239
- [spxSeverity]="spxField.severity ? spxField.severity() : undefined"
240
- [spxType]="'button'"
241
- (spxClick)="onClick(spxField)"
242
- >{{ (spxField.label ? spxField.label() : spxField.key) | translate | capitalize }}</spx-button>
243
- }
244
- @if (spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard) {
245
- <spx-input
246
- [formControl]="$any(this.spxFormGroup.get(spxField.key))"
247
- [spxAutofocus]="spxField.autofocus ? spxField.autofocus() : false"
248
- [spxCapitalize]="spxField.capitalize ? spxField.capitalize() : false"
249
- [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | translate | capitalize"
250
- [spxName]="spxField.key"
251
- [spxPattern]="spxField.type() === typeNumericKeyboard ? '\\d*' : undefined"
252
- [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
253
- [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
254
- [spxShowSearch]="spxField.type() === typeAutocomplete"
255
- [spxShowHelp]="false"
256
- [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
257
- [spxStep]="spxField.step ? spxField.step() : undefined"
258
- [spxType]="spxField.type()"
259
- [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)"
260
- [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
261
- (spxBlur)="onBlur(spxField)"
262
- (spxSearch)="onSearch(spxField)">
263
- <spx-validate-control [control]="$any(this.spxFormGroup.get(spxField.key))" [label]="(spxField.label ? spxField.label() : spxField.key)| translate | capitalize"></spx-validate-control>
264
- </spx-input>
265
- }
266
- @if (spxField.type() === typeRadio) {
267
- <spx-input
268
- [formControl]="$any(this.spxFormGroup.get(spxField.key))"
269
- [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | translate | capitalize"
270
- [spxName]="spxField.key"
271
- [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
272
- [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
273
- [spxShowHelp]="false"
274
- [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
275
- [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
276
- [spxType]="typeRadio"
277
- [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)">
278
- <spx-validate-control [control]="$any(this.spxFormGroup.get(spxField.key))" [label]="(spxField.label ? spxField.label() : spxField.key) | translate | capitalize"></spx-validate-control>
279
- </spx-input>
280
- }
281
- }
282
- }
283
- </spx-form-section>
284
- }
285
-
286
- @for (spxButton of spxForm.buttons; track spxButton) {
287
- <spx-button
288
- [spxFullWidth]="true"
289
- [spxSeverity]="spxButton.severity"
290
- [spxType]="spxButton.type"
291
- (spxClick)="spxButton.onClick ? spxButton.onClick() : undefined">
292
- {{ ((spxButton && spxButton.label) ? spxButton.label() : '') | translate | capitalize }}
293
- </spx-button>
294
- }
295
- </div>
296
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SpxAutocompleteSearchComponent, selector: "spx-autocomplete-search", inputs: ["spxSuggestions", "spxField", "txtOptions", "txtQuery", "txtSubmit", "spxValuePair"], outputs: ["spxCancel", "spxSearch", "spxSubmit"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxFormSectionComponent, selector: "spx-form-section", inputs: ["spxIndex", "spxIndexSecondary", "spxTitle", "spxShowTitle"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }, { kind: "component", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] }); }
217
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxFormViewComponent, isStandalone: true, selector: "spx-form-view", inputs: { spxFormGroup: { classPropertyName: "spxFormGroup", publicName: "spxFormGroup", isSignal: true, isRequired: true, transformFunction: null }, spxForm: { classPropertyName: "spxForm", publicName: "spxForm", isSignal: true, isRequired: true, transformFunction: null }, spxSuggestions: { classPropertyName: "spxSuggestions", publicName: "spxSuggestions", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { spxBlur: "spxBlur", spxClick: "spxClick", spxSearch: "spxSearch" }, viewQueries: [{ propertyName: "spxInputs", predicate: (ElementRef), descendants: true, isSignal: true }], ngImport: i0, template: "@if (autocompleteField) {\r\n <spx-autocomplete-search\r\n [spxField]=\"autocompleteField\"\r\n [spxSuggestions]=\"this.spxSuggestions()[autocompleteField.key]\"\r\n [spxValuePair]=\"$any(this.spxFormGroup().get(autocompleteField.key)).value\"\r\n [txtOptions]=\"'Options'\"\r\n [txtQuery]=\"'Query'\"\r\n [txtSubmit]=\"'Save'\"\r\n (spxCancel)=\"onAutocompleteCancel()\"\r\n (spxSearch)=\"onAutocompleteSearch($event)\"\r\n (spxSubmit)=\"onAutocompleteSave($event)\">\r\n </spx-autocomplete-search>\r\n}\r\n<div class=\"flex flex-col gap-3\">\r\n @for (spxSection of spxForm().sections; track spxSection; let spxSectionIndex = $index) {\r\n <spx-form-section\r\n [spxShowTitle]=\"!spxSection.showTitle || spxSection.showTitle()\"\r\n [spxIndex]=\"spxSectionIndex + 1\"\r\n [spxTitle]=\"spxSection.title ? (spxSection.title() | translate | capitalize) : undefined\">\r\n @for (spxField of spxSection.fields; track spxField; let spxFieldIndex = $index) {\r\n @if (spxField.show === undefined || spxField.show()) {\r\n @if (spxField.type() === typeButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxField.severity ? spxField.severity() : undefined\"\r\n [spxType]=\"'button'\"\r\n (spxClick)=\"onClick(spxField)\"\r\n >{{ (spxField.label ? spxField.label() : spxField.key) | translate | capitalize }}</spx-button>\r\n }\r\n @if (spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup().get(spxField.key))\"\r\n [spxAutofocus]=\"spxField.autofocus ? spxField.autofocus() : false\"\r\n [spxCapitalize]=\"spxField.capitalize ? spxField.capitalize() : false\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxPattern]=\"spxField.type() === typeNumericKeyboard ? '\\\\d*' : undefined\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup().get(spxField.key)!)\"\r\n [spxShowSearch]=\"spxField.type() === typeAutocomplete\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup().get(spxField.key)! && this.spxFormGroup().get(spxField.key)!.errors && this.spxFormGroup().get(spxField.key)!.touched\"\r\n [spxStep]=\"spxField.step ? spxField.step() : undefined\"\r\n [spxType]=\"spxField.type()\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup().get(spxField.key)!)\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions()[spxField.key]\"\r\n (spxBlur)=\"onBlur(spxField)\"\r\n (spxSearch)=\"onSearch(spxField)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup().get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key)| translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n @if (spxField.type() === typeRadio) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup().get(spxField.key))\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup().get(spxField.key)!)\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup().get(spxField.key)! && this.spxFormGroup().get(spxField.key)!.errors && this.spxFormGroup().get(spxField.key)!.touched\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions()[spxField.key]\"\r\n [spxType]=\"typeRadio\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup().get(spxField.key)!)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup().get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n }\r\n \r\n }\r\n </spx-form-section>\r\n }\r\n\r\n @for (spxButton of spxForm().buttons; track spxButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxButton.severity\"\r\n [spxType]=\"spxButton.type\"\r\n (spxClick)=\"spxButton.onClick ? spxButton.onClick() : undefined\">\r\n {{ ((spxButton && spxButton.label) ? spxButton.label() : '') | translate | capitalize }}\r\n </spx-button>\r\n }\r\n</div>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SpxAutocompleteSearchComponent, selector: "spx-autocomplete-search", inputs: ["spxSuggestions", "spxField", "txtOptions", "txtQuery", "txtSubmit", "spxValuePair"], outputs: ["spxCancel", "spxSearch", "spxSubmit"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "component", type: SpxFormSectionComponent, selector: "spx-form-section", inputs: ["spxIndex", "spxIndexSecondary", "spxTitle", "spxShowTitle"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "spxCapitalize"], outputs: ["spxClear", "spxEdit", "spxHelp", "spxSearch", "spxBlur"] }, { kind: "component", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
297
218
  }
298
219
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxFormViewComponent, decorators: [{
299
220
  type: Component,
300
- args: [{
301
- selector: 'spx-form-view',
302
- imports: [
221
+ args: [{ selector: 'spx-form-view', imports: [
303
222
  FormsModule,
304
223
  ReactiveFormsModule,
305
224
  SpxAutocompleteSearchComponent,
@@ -309,106 +228,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
309
228
  SpxInputComponent,
310
229
  SpxValidateControlComponent,
311
230
  TranslateModule
312
- ],
313
- template: `@if (autocompleteField) {
314
- <spx-autocomplete-search
315
- [spxField]="autocompleteField"
316
- [spxSuggestions]="this.spxSuggestions[autocompleteField.key]"
317
- [spxValuePair]="$any(this.spxFormGroup.get(autocompleteField.key)).value"
318
- [txtOptions]="'Options'"
319
- [txtQuery]="'Query'"
320
- [txtSubmit]="'Save'"
321
- (spxCancel)="onAutocompleteCancel()"
322
- (spxSearch)="onAutocompleteSearch($event)"
323
- (spxSubmit)="onAutocompleteSave($event)">
324
- </spx-autocomplete-search>
325
- }
326
- <div class="flex flex-col gap-3">
327
- @for (spxSection of spxForm.sections; track spxSection; let spxSectionIndex = $index) {
328
- <spx-form-section
329
- [spxShowTitle]="!spxSection.showTitle || spxSection.showTitle()"
330
- [spxIndex]="spxSectionIndex + 1"
331
- [spxTitle]="spxSection.title ? (spxSection.title() | translate | capitalize) : undefined">
332
- @for (spxField of spxSection.fields; track spxField; let spxFieldIndex = $index) {
333
- @if (spxField.show === undefined || spxField.show()) {
334
- @if (spxField.type() === typeButton) {
335
- <spx-button
336
- [spxFullWidth]="true"
337
- [spxSeverity]="spxField.severity ? spxField.severity() : undefined"
338
- [spxType]="'button'"
339
- (spxClick)="onClick(spxField)"
340
- >{{ (spxField.label ? spxField.label() : spxField.key) | translate | capitalize }}</spx-button>
341
- }
342
- @if (spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard) {
343
- <spx-input
344
- [formControl]="$any(this.spxFormGroup.get(spxField.key))"
345
- [spxAutofocus]="spxField.autofocus ? spxField.autofocus() : false"
346
- [spxCapitalize]="spxField.capitalize ? spxField.capitalize() : false"
347
- [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | translate | capitalize"
348
- [spxName]="spxField.key"
349
- [spxPattern]="spxField.type() === typeNumericKeyboard ? '\\d*' : undefined"
350
- [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
351
- [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
352
- [spxShowSearch]="spxField.type() === typeAutocomplete"
353
- [spxShowHelp]="false"
354
- [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
355
- [spxStep]="spxField.step ? spxField.step() : undefined"
356
- [spxType]="spxField.type()"
357
- [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)"
358
- [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
359
- (spxBlur)="onBlur(spxField)"
360
- (spxSearch)="onSearch(spxField)">
361
- <spx-validate-control [control]="$any(this.spxFormGroup.get(spxField.key))" [label]="(spxField.label ? spxField.label() : spxField.key)| translate | capitalize"></spx-validate-control>
362
- </spx-input>
363
- }
364
- @if (spxField.type() === typeRadio) {
365
- <spx-input
366
- [formControl]="$any(this.spxFormGroup.get(spxField.key))"
367
- [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | translate | capitalize"
368
- [spxName]="spxField.key"
369
- [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
370
- [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
371
- [spxShowHelp]="false"
372
- [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
373
- [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
374
- [spxType]="typeRadio"
375
- [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)">
376
- <spx-validate-control [control]="$any(this.spxFormGroup.get(spxField.key))" [label]="(spxField.label ? spxField.label() : spxField.key) | translate | capitalize"></spx-validate-control>
377
- </spx-input>
378
- }
379
- }
380
- }
381
- </spx-form-section>
382
- }
383
-
384
- @for (spxButton of spxForm.buttons; track spxButton) {
385
- <spx-button
386
- [spxFullWidth]="true"
387
- [spxSeverity]="spxButton.severity"
388
- [spxType]="spxButton.type"
389
- (spxClick)="spxButton.onClick ? spxButton.onClick() : undefined">
390
- {{ ((spxButton && spxButton.label) ? spxButton.label() : '') | translate | capitalize }}
391
- </spx-button>
392
- }
393
- </div>
394
- `
395
- }]
396
- }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { spxFormGroup: [{
397
- type: Input
398
- }], spxForm: [{
399
- type: Input
400
- }], spxSuggestions: [{
401
- type: Input
402
- }], spxBlur: [{
403
- type: Output
404
- }], spxClick: [{
405
- type: Output
406
- }], spxSearch: [{
407
- type: Output
408
- }], spxInputs: [{
409
- type: ViewChildren,
410
- args: [SpxInputComponent]
411
- }] } });
231
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (autocompleteField) {\r\n <spx-autocomplete-search\r\n [spxField]=\"autocompleteField\"\r\n [spxSuggestions]=\"this.spxSuggestions()[autocompleteField.key]\"\r\n [spxValuePair]=\"$any(this.spxFormGroup().get(autocompleteField.key)).value\"\r\n [txtOptions]=\"'Options'\"\r\n [txtQuery]=\"'Query'\"\r\n [txtSubmit]=\"'Save'\"\r\n (spxCancel)=\"onAutocompleteCancel()\"\r\n (spxSearch)=\"onAutocompleteSearch($event)\"\r\n (spxSubmit)=\"onAutocompleteSave($event)\">\r\n </spx-autocomplete-search>\r\n}\r\n<div class=\"flex flex-col gap-3\">\r\n @for (spxSection of spxForm().sections; track spxSection; let spxSectionIndex = $index) {\r\n <spx-form-section\r\n [spxShowTitle]=\"!spxSection.showTitle || spxSection.showTitle()\"\r\n [spxIndex]=\"spxSectionIndex + 1\"\r\n [spxTitle]=\"spxSection.title ? (spxSection.title() | translate | capitalize) : undefined\">\r\n @for (spxField of spxSection.fields; track spxField; let spxFieldIndex = $index) {\r\n @if (spxField.show === undefined || spxField.show()) {\r\n @if (spxField.type() === typeButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxField.severity ? spxField.severity() : undefined\"\r\n [spxType]=\"'button'\"\r\n (spxClick)=\"onClick(spxField)\"\r\n >{{ (spxField.label ? spxField.label() : spxField.key) | translate | capitalize }}</spx-button>\r\n }\r\n @if (spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup().get(spxField.key))\"\r\n [spxAutofocus]=\"spxField.autofocus ? spxField.autofocus() : false\"\r\n [spxCapitalize]=\"spxField.capitalize ? spxField.capitalize() : false\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxPattern]=\"spxField.type() === typeNumericKeyboard ? '\\\\d*' : undefined\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup().get(spxField.key)!)\"\r\n [spxShowSearch]=\"spxField.type() === typeAutocomplete\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup().get(spxField.key)! && this.spxFormGroup().get(spxField.key)!.errors && this.spxFormGroup().get(spxField.key)!.touched\"\r\n [spxStep]=\"spxField.step ? spxField.step() : undefined\"\r\n [spxType]=\"spxField.type()\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup().get(spxField.key)!)\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions()[spxField.key]\"\r\n (spxBlur)=\"onBlur(spxField)\"\r\n (spxSearch)=\"onSearch(spxField)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup().get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key)| translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n @if (spxField.type() === typeRadio) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup().get(spxField.key))\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup().get(spxField.key)!)\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup().get(spxField.key)! && this.spxFormGroup().get(spxField.key)!.errors && this.spxFormGroup().get(spxField.key)!.touched\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions()[spxField.key]\"\r\n [spxType]=\"typeRadio\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup().get(spxField.key)!)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup().get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n }\r\n \r\n }\r\n </spx-form-section>\r\n }\r\n\r\n @for (spxButton of spxForm().buttons; track spxButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxButton.severity\"\r\n [spxType]=\"spxButton.type\"\r\n (spxClick)=\"spxButton.onClick ? spxButton.onClick() : undefined\">\r\n {{ ((spxButton && spxButton.label) ? spxButton.label() : '') | translate | capitalize }}\r\n </spx-button>\r\n }\r\n</div>" }]
232
+ }], ctorParameters: () => [{ type: i1.FormBuilder }] });
412
233
 
413
234
  /**
414
235
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-form-view.mjs","sources":["../../../../projects/softpak/components/spx-form-view/spx-form-button-type.enum.ts","../../../../projects/softpak/components/spx-form-view/spx-autocomplete-search.component.ts","../../../../projects/softpak/components/spx-form-view/spx-autocomplete-search.component.html","../../../../projects/softpak/components/spx-form-view/spx-form-view.component.ts","../../../../projects/softpak/components/spx-form-view/softpak-components-spx-form-view.ts"],"sourcesContent":["export enum SpxFormButtonTypeEnum {\n button = 'button',\n submit = 'submit',\n}\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription, debounceTime } from 'rxjs';\n\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { SpxFormFieldI } from './spx-form-field.interface';\nimport { SpxFormSectionI } from './spx-form-section.interface';\nimport { SpxValidateControlComponent } from '@softpak/components/spx-validation';\n\nexport const sectionAutocompleteSearch = 'autocompleteSearch';\nexport const ctrlQuery = 'query';\nexport const ctrlOptions = 'options';\n\n@Component({\n selector: 'spx-autocomplete-search',\n templateUrl: './spx-autocomplete-search.component.html',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxButtonComponent,\n SpxInputComponent,\n SpxValidateControlComponent\n ]\n})\nexport class SpxAutocompleteSearchComponent implements OnInit, OnDestroy {\n formGroup!: FormGroup;\n @Input() spxSuggestions: SpxValuePair<any>[] = [];\n @Input() spxField!: SpxFormFieldI;\n @Input() txtOptions!: string;\n @Input() txtQuery!: string;\n @Input() txtSubmit!: string;\n @Input() spxValuePair!: SpxValuePair<any>;\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\n @Output() spxSearch: EventEmitter<SpxValuePair<any>> = new EventEmitter<SpxValuePair<any>>(); \n @Output() spxSubmit: EventEmitter<SpxValuePair<any>> = new EventEmitter<SpxValuePair<any>>();\n inputTypeRadio = SpxInputTypeEnum.radio;\n inputTypeText = SpxInputTypeEnum.text;\n severityError = SpxSeverityEnum.error;\n severitySuccess = SpxSeverityEnum.success;\n \n sections: SpxFormSectionI[] = [\n {\n key: sectionAutocompleteSearch,\n showTitle: () => false,\n fields: [\n {\n key: ctrlQuery,\n type: () => SpxInputTypeEnum.text,\n label: () => this.txtQuery,\n capitalize: () => true,\n },\n {\n key: ctrlOptions,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.txtOptions,\n },\n ]\n }\n ];\n\n get ctrlQuery(): FormControl { return this.formGroup.get(ctrlQuery) as FormControl; }\n get ctrlOptions(): FormControl { return this.formGroup.get(ctrlOptions) as FormControl; }\n\n private subSelection?: Subscription;\n private subQuery?: Subscription;\n\n constructor(readonly formBuilder: FormBuilder) {\n this.createForm();\n }\n\n ngOnInit(): void {\n this.listenToSelection();\n this.listenToQuery();\n this.ctrlQuery.setValue(this.spxValuePair, { emitEvent: false });\n this.spxSearch.emit(this.spxValuePair);\n }\n\n ngOnDestroy(): void {\n if (this.subSelection) {\n this.subSelection.unsubscribe();\n }\n if (this.subQuery) {\n this.subQuery.unsubscribe();\n }\n }\n\n private createForm(): void {\n this.formGroup = this.formBuilder.group({\n [ctrlQuery]: [null],\n [ctrlOptions]: [null],\n });\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n\n onCancel(): void {\n this.spxCancel.emit();\n }\n \n onSubmit(): void {\n this.spxSubmit.emit(this.ctrlQuery.value);\n }\n\n private listenToQuery(): void {\n this.subQuery = this.ctrlQuery.valueChanges.pipe(debounceTime(500)).subscribe(valuePair => {\n this.spxSearch.emit(valuePair);\n });\n }\n\n private listenToSelection(): void {\n this.subSelection = this.ctrlOptions.valueChanges.subscribe(valuePair => {\n this.ctrlQuery.setValue(valuePair);\n });\n }\n}\n","<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\n </spx-input>\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\n [spxType]=\"inputTypeRadio\">\n </spx-input>\n </div>\n <div class=\"py-3 flex flex-col gap-3\">\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"severityError\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\n Cancel\n </spx-button>\n </div>\n </div>\n</form>","import { JsonPipe } from '@angular/common';\nimport { Component, EventEmitter, Input, Output, QueryList, ViewChild, ViewChildren } from '@angular/core';\nimport { SpxFormSectionI } from './spx-form-section.interface';\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { AbstractControl, FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxFormFieldI } from './spx-form-field.interface';\nimport { SpxAutocompleteSearchComponent } from './spx-autocomplete-search.component';\nimport { SpxValidateControlComponent } from '@softpak/components/spx-validation';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxFormI } from './spx-form.interface';\n\n@Component({\n selector: 'spx-form-view',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxAutocompleteSearchComponent,\n SpxButtonComponent,\n SpxCapitalizePipe,\n SpxFormSectionComponent,\n SpxInputComponent,\n SpxValidateControlComponent,\n TranslateModule\n ],\n template: `@if (autocompleteField) {\n <spx-autocomplete-search\n [spxField]=\"autocompleteField\"\n [spxSuggestions]=\"this.spxSuggestions[autocompleteField.key]\"\n [spxValuePair]=\"$any(this.spxFormGroup.get(autocompleteField.key)).value\"\n [txtOptions]=\"'Options'\"\n [txtQuery]=\"'Query'\"\n [txtSubmit]=\"'Save'\"\n (spxCancel)=\"onAutocompleteCancel()\"\n (spxSearch)=\"onAutocompleteSearch($event)\"\n (spxSubmit)=\"onAutocompleteSave($event)\">\n </spx-autocomplete-search>\n}\n<div class=\"flex flex-col gap-3\">\n @for (spxSection of spxForm.sections; track spxSection; let spxSectionIndex = $index) {\n <spx-form-section\n [spxShowTitle]=\"!spxSection.showTitle || spxSection.showTitle()\"\n [spxIndex]=\"spxSectionIndex + 1\"\n [spxTitle]=\"spxSection.title ? (spxSection.title() | translate | capitalize) : undefined\">\n @for (spxField of spxSection.fields; track spxField; let spxFieldIndex = $index) {\n @if (spxField.show === undefined || spxField.show()) {\n @if (spxField.type() === typeButton) {\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"spxField.severity ? spxField.severity() : undefined\"\n [spxType]=\"'button'\"\n (spxClick)=\"onClick(spxField)\"\n >{{ (spxField.label ? spxField.label() : spxField.key) | translate | capitalize }}</spx-button>\n }\n @if (spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard) {\n <spx-input\n [formControl]=\"$any(this.spxFormGroup.get(spxField.key))\"\n [spxAutofocus]=\"spxField.autofocus ? spxField.autofocus() : false\"\n [spxCapitalize]=\"spxField.capitalize ? spxField.capitalize() : false\"\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\n [spxName]=\"spxField.key\"\n [spxPattern]=\"spxField.type() === typeNumericKeyboard ? '\\\\d*' : undefined\"\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\n [spxRequired]=\"hasRequiredField(this.spxFormGroup.get(spxField.key)!)\"\n [spxShowSearch]=\"spxField.type() === typeAutocomplete\"\n [spxShowHelp]=\"false\"\n [spxShowValidationMessages]=\"this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched\"\n [spxStep]=\"spxField.step ? spxField.step() : undefined\"\n [spxType]=\"spxField.type()\"\n [spxValidators]=\"getRawValidators(this.spxFormGroup.get(spxField.key)!)\"\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]\"\n (spxBlur)=\"onBlur(spxField)\"\n (spxSearch)=\"onSearch(spxField)\">\n <spx-validate-control [control]=\"$any(this.spxFormGroup.get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key)| translate | capitalize\"></spx-validate-control>\n </spx-input>\n }\n @if (spxField.type() === typeRadio) {\n <spx-input\n [formControl]=\"$any(this.spxFormGroup.get(spxField.key))\"\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\n [spxName]=\"spxField.key\"\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\n [spxRequired]=\"hasRequiredField(this.spxFormGroup.get(spxField.key)!)\"\n [spxShowHelp]=\"false\"\n [spxShowValidationMessages]=\"this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched\"\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]\"\n [spxType]=\"typeRadio\"\n [spxValidators]=\"getRawValidators(this.spxFormGroup.get(spxField.key)!)\">\n <spx-validate-control [control]=\"$any(this.spxFormGroup.get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"></spx-validate-control>\n </spx-input>\n }\n }\n }\n </spx-form-section>\n }\n\n @for (spxButton of spxForm.buttons; track spxButton) {\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"spxButton.severity\"\n [spxType]=\"spxButton.type\"\n (spxClick)=\"spxButton.onClick ? spxButton.onClick() : undefined\">\n {{ ((spxButton && spxButton.label) ? spxButton.label() : '') | translate | capitalize }}\n </spx-button>\n }\n</div>\n`\n})\nexport class SpxFormViewComponent {\n @Input() spxFormGroup!: FormGroup;\n @Input() spxForm!: SpxFormI;\n @Input() spxSuggestions!: any;\n @Output() spxBlur: EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }> = new EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }>();\n @Output() spxClick: EventEmitter<{ field: SpxFormFieldI }> = new EventEmitter<{ field: SpxFormFieldI }>();\n @Output() spxSearch: EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }> = new EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }>();\n @ViewChildren(SpxInputComponent) spxInputs!: QueryList<SpxInputComponent>;\n autocompleteField?: SpxFormFieldI;\n\n typeAutocomplete = SpxInputTypeEnum.autocomplete;\n typeButton = SpxInputTypeEnum.button;\n typeFloat = SpxInputTypeEnum.float;\n typeNumber = SpxInputTypeEnum.number;\n typeRadio = SpxInputTypeEnum.radio;\n typeText = SpxInputTypeEnum.text;\n typeNumericKeyboard = SpxInputTypeEnum.textNumericKeyboard;\n typeOverlay = SpxInputTypeEnum.overlay;\n typeOverlayNumber = SpxInputTypeEnum.overlayNumber;\n\n setAutofocus(key: string): void {\n const field = this.spxInputs.find(input => input.spxName === key);\n if (field) {\n field.setFocusIn();\n }\n }\n\n onBlur(field: SpxFormFieldI) {\n this.spxBlur.emit({\n field,\n valuePair: this.spxFormGroup.get(field.key)!.value,\n });\n }\n\n onClick(field: SpxFormFieldI) {\n this.spxClick.emit({\n field,\n });\n }\n\n onAutocompleteCancel(): void {\n this.autocompleteField = undefined;\n }\n\n onAutocompleteSearch(valuePair: SpxValuePair<any>): void {\n if (this.autocompleteField) {\n this.spxSearch.emit({\n field: this.autocompleteField,\n valuePair,\n });\n }\n }\n\n onAutocompleteSave(valuePair: SpxValuePair<any>) {\n this.spxFormGroup.get(this.autocompleteField!.key)?.setValue(valuePair);\n this.autocompleteField = undefined;\n }\n\n onSearch(field: SpxFormFieldI) {\n this.autocompleteField = field;\n }\n\n getRawValidators(formControl: AbstractControl) {\n // eslint-disable-next-line no-underscore-dangle\n return (formControl as any)._rawValidators;\n }\n\n hasRequiredField(abstractControl: AbstractControl): boolean {\n if (abstractControl.validator) {\n const validator = abstractControl.validator({} as AbstractControl);\n if (validator && validator['required']) {\n return true;\n }\n }\n if ((abstractControl as any)['controls']) {\n for (const controlName in (abstractControl as any)['controls']) {\n if ((abstractControl as any)['controls'][controlName]) {\n if (this.hasRequiredField((abstractControl as any)['controls'][controlName])) {\n return true;\n }\n }\n }\n }\n return false;\n }\n\n static initialFormValue(sections: SpxFormSectionI[]) {\n const formObject: any = {};\n sections.forEach(section => {\n section.fields.forEach(field => {\n formObject[field.key] = [field.defaultValue ? field.defaultValue() : null, field.validators ? [...field.validators()] : []];\n });\n });\n return formObject;\n }\n\n static createForm(formBuilder: FormBuilder, sections: SpxFormSectionI[]): FormGroup {\n return formBuilder.group(this.initialFormValue(sections));\n }\n\n constructor(readonly formBuilder: FormBuilder) {\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAAY;AAAZ,CAAA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WAAW;wBACX,mBAAmB;wBACnB,8BAA8B;wBAC9B,kBAAkB;wBAClB,iBAAiB;wBACjB,uBAAuB;wBACvB,iBAAiB;wBACjB,2BAA2B;wBAC3B;AACH,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFb;AACA,iBAAA;gFAEU,YAAY,EAAA,CAAA;sBAApB;gBACQ,OAAO,EAAA,CAAA;sBAAf;gBACQ,cAAc,EAAA,CAAA;sBAAtB;gBACS,OAAO,EAAA,CAAA;sBAAhB;gBACS,QAAQ,EAAA,CAAA;sBAAjB;gBACS,SAAS,EAAA,CAAA;sBAAlB;gBACgC,SAAS,EAAA,CAAA;sBAAzC,YAAY;uBAAC,iBAAiB;;;ACrHjC;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-form-view.mjs","sources":["../../../../projects/softpak/components/spx-form-view/spx-form-button-type.enum.ts","../../../../projects/softpak/components/spx-form-view/spx-autocomplete-search.component.ts","../../../../projects/softpak/components/spx-form-view/spx-autocomplete-search.component.html","../../../../projects/softpak/components/spx-form-view/spx-form-view.component.ts","../../../../projects/softpak/components/spx-form-view/spx-form-view.component.html","../../../../projects/softpak/components/spx-form-view/softpak-components-spx-form-view.ts"],"sourcesContent":["export enum SpxFormButtonTypeEnum {\r\n button = 'button',\r\n submit = 'submit',\r\n}\r\n","import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { Subscription, debounceTime } from 'rxjs';\r\n\r\nimport { SpxFormFieldI } from './spx-form-field.interface';\r\nimport { SpxFormSectionI } from './spx-form-section.interface';\r\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\r\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\r\nimport { SpxInputComponent, SpxValuePair, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\r\n\r\nexport const sectionAutocompleteSearch = 'autocompleteSearch';\r\nexport const ctrlQuery = 'query';\r\nexport const ctrlOptions = 'options';\r\n\r\n@Component({\r\n selector: 'spx-autocomplete-search',\r\n templateUrl: './spx-autocomplete-search.component.html',\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SpxButtonComponent,\r\n SpxInputComponent,\r\n ]\r\n})\r\nexport class SpxAutocompleteSearchComponent implements OnInit, OnDestroy {\r\n formGroup!: FormGroup;\r\n @Input() spxSuggestions: SpxValuePair<any>[] = [];\r\n @Input() spxField!: SpxFormFieldI;\r\n @Input() txtOptions!: string;\r\n @Input() txtQuery!: string;\r\n @Input() txtSubmit!: string;\r\n @Input() spxValuePair!: SpxValuePair<any>;\r\n @Output() spxCancel: EventEmitter<void> = new EventEmitter<void>();\r\n @Output() spxSearch: EventEmitter<SpxValuePair<any>> = new EventEmitter<SpxValuePair<any>>(); \r\n @Output() spxSubmit: EventEmitter<SpxValuePair<any>> = new EventEmitter<SpxValuePair<any>>();\r\n inputTypeRadio = SpxInputTypeEnum.radio;\r\n inputTypeText = SpxInputTypeEnum.text;\r\n SpxSeverity = SpxSeverityEnum;\r\n \r\n sections: SpxFormSectionI[] = [\r\n {\r\n key: sectionAutocompleteSearch,\r\n showTitle: () => false,\r\n fields: [\r\n {\r\n key: ctrlQuery,\r\n type: () => SpxInputTypeEnum.text,\r\n label: () => this.txtQuery,\r\n capitalize: () => true,\r\n },\r\n {\r\n key: ctrlOptions,\r\n type: () => SpxInputTypeEnum.radio,\r\n label: () => this.txtOptions,\r\n },\r\n ]\r\n }\r\n ];\r\n\r\n get ctrlQuery(): FormControl { return this.formGroup.get(ctrlQuery) as FormControl; }\r\n get ctrlOptions(): FormControl { return this.formGroup.get(ctrlOptions) as FormControl; }\r\n\r\n private subSelection?: Subscription;\r\n private subQuery?: Subscription;\r\n\r\n constructor(readonly formBuilder: FormBuilder) {\r\n this.createForm();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.listenToSelection();\r\n this.listenToQuery();\r\n this.ctrlQuery.setValue(this.spxValuePair, { emitEvent: false });\r\n this.spxSearch.emit(this.spxValuePair);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this.subSelection) {\r\n this.subSelection.unsubscribe();\r\n }\r\n if (this.subQuery) {\r\n this.subQuery.unsubscribe();\r\n }\r\n }\r\n\r\n private createForm(): void {\r\n this.formGroup = this.formBuilder.group({\r\n [ctrlQuery]: [null],\r\n [ctrlOptions]: [null],\r\n });\r\n }\r\n\r\n getRawValidators(formControl: FormControl) {\r\n return (formControl as any)._rawValidators;\r\n }\r\n\r\n onCancel(): void {\r\n this.spxCancel.emit();\r\n }\r\n \r\n onSubmit(): void {\r\n this.spxSubmit.emit(this.ctrlQuery.value);\r\n }\r\n\r\n private listenToQuery(): void {\r\n this.subQuery = this.ctrlQuery.valueChanges.pipe(debounceTime(500)).subscribe(valuePair => {\r\n this.spxSearch.emit(valuePair);\r\n });\r\n }\r\n\r\n private listenToSelection(): void {\r\n this.subSelection = this.ctrlOptions.valueChanges.subscribe(valuePair => {\r\n this.ctrlQuery.setValue(valuePair);\r\n });\r\n }\r\n}\r\n","<form class=\"bg-black fixed pt-16 z-50 top-0 left-0 right-0 bottom-0\" [formGroup]=\"formGroup\" (ngSubmit)=\"onSubmit()\">\r\n <div class=\"h-full w-full px-3 flex flex-col gap-3\">\r\n <div class=\"grow flex flex-col gap-3 overflow-y-auto\">\r\n <spx-input [formControl]=\"ctrlQuery\" [spxLabel]=\"txtQuery\" [spxType]=\"inputTypeText\">\r\n </spx-input>\r\n <spx-input [formControl]=\"ctrlOptions\" [spxLabel]=\"txtOptions\" [spxSuggestions]=\"spxSuggestions\"\r\n [spxType]=\"inputTypeRadio\">\r\n </spx-input>\r\n </div>\r\n <div class=\"py-3 flex flex-col gap-3\">\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"SpxSeverity.success\">\r\n Save\r\n </spx-button>\r\n <spx-button [spxFullWidth]=\"true\" [spxSeverity]=\"SpxSeverity.error\" [spxType]=\"'button'\" (spxClick)=\"onCancel()\">\r\n Cancel\r\n </spx-button>\r\n </div>\r\n </div>\r\n</form>","import { ChangeDetectionStrategy, Component, ElementRef, input, output, viewChildren } from '@angular/core';\r\nimport { SpxFormSectionI } from './spx-form-section.interface';\r\nimport { AbstractControl, FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { SpxFormFieldI } from './spx-form-field.interface';\r\nimport { SpxAutocompleteSearchComponent } from './spx-autocomplete-search.component';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { SpxFormI } from './spx-form.interface';\r\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\r\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\r\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\r\nimport { SpxInputComponent, SpxValuePair, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\r\nimport { SpxValidateControlComponent } from '@softpak/components/spx-validation';\r\n\r\n@Component({\r\n selector: 'spx-form-view',\r\n imports: [\r\n FormsModule,\r\n ReactiveFormsModule,\r\n SpxAutocompleteSearchComponent,\r\n SpxButtonComponent,\r\n SpxCapitalizePipe,\r\n SpxFormSectionComponent,\r\n SpxInputComponent,\r\n SpxValidateControlComponent,\r\n TranslateModule\r\n ],\r\n templateUrl: './spx-form-view.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SpxFormViewComponent {\r\n readonly spxFormGroup = input.required<FormGroup>();\r\n readonly spxForm = input.required<SpxFormI>();\r\n readonly spxSuggestions = input.required<any>();\r\n spxBlur = output<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }>();\r\n spxClick = output<{ field: SpxFormFieldI }>();\r\n spxSearch = output<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }>();\r\n spxInputs = viewChildren(ElementRef<SpxInputComponent>);\r\n autocompleteField?: SpxFormFieldI;\r\n\r\n typeAutocomplete = SpxInputTypeEnum.autocomplete;\r\n typeButton = SpxInputTypeEnum.button;\r\n typeFloat = SpxInputTypeEnum.float;\r\n typeNumber = SpxInputTypeEnum.number;\r\n typeRadio = SpxInputTypeEnum.radio;\r\n typeText = SpxInputTypeEnum.text;\r\n typeNumericKeyboard = SpxInputTypeEnum.textNumericKeyboard;\r\n typeOverlay = SpxInputTypeEnum.overlay;\r\n typeOverlayNumber = SpxInputTypeEnum.overlayNumber;\r\n\r\n setAutofocus(key: string): void {\r\n const field = this.spxInputs().find(input => input.nativeElement.spxName() === key);\r\n if (field) {\r\n field.nativeElement.setFocusIn();\r\n }\r\n }\r\n\r\n onBlur(field: SpxFormFieldI) {\r\n this.spxBlur.emit({\r\n field,\r\n valuePair: this.spxFormGroup().get(field.key)!.value,\r\n });\r\n }\r\n\r\n onClick(field: SpxFormFieldI) {\r\n this.spxClick.emit({\r\n field,\r\n });\r\n }\r\n\r\n onAutocompleteCancel(): void {\r\n this.autocompleteField = undefined;\r\n }\r\n\r\n onAutocompleteSearch(valuePair: SpxValuePair<any>): void {\r\n if (this.autocompleteField) {\r\n this.spxSearch.emit({\r\n field: this.autocompleteField,\r\n valuePair,\r\n });\r\n }\r\n }\r\n\r\n onAutocompleteSave(valuePair: SpxValuePair<any>) {\r\n this.spxFormGroup().get(this.autocompleteField!.key)?.setValue(valuePair);\r\n this.autocompleteField = undefined;\r\n }\r\n\r\n onSearch(field: SpxFormFieldI) {\r\n this.autocompleteField = field;\r\n }\r\n\r\n getRawValidators(formControl: AbstractControl) {\r\n // eslint-disable-next-line no-underscore-dangle\r\n return (formControl as any)._rawValidators;\r\n }\r\n\r\n hasRequiredField(abstractControl: AbstractControl): boolean {\r\n if (abstractControl.validator) {\r\n const validator = abstractControl.validator({} as AbstractControl);\r\n if (validator && validator['required']) {\r\n return true;\r\n }\r\n }\r\n if ((abstractControl as any)['controls']) {\r\n for (const controlName in (abstractControl as any)['controls']) {\r\n if ((abstractControl as any)['controls'][controlName]) {\r\n if (this.hasRequiredField((abstractControl as any)['controls'][controlName])) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n static initialFormValue(sections: SpxFormSectionI[]) {\r\n const formObject: any = {};\r\n sections.forEach(section => {\r\n section.fields.forEach(field => {\r\n formObject[field.key] = [field.defaultValue ? field.defaultValue() : null, field.validators ? [...field.validators()] : []];\r\n });\r\n });\r\n return formObject;\r\n }\r\n\r\n static createForm(formBuilder: FormBuilder, sections: SpxFormSectionI[]): FormGroup {\r\n return formBuilder.group(this.initialFormValue(sections));\r\n }\r\n\r\n constructor(readonly formBuilder: FormBuilder) {\r\n }\r\n}\r\n","@if (autocompleteField) {\r\n <spx-autocomplete-search\r\n [spxField]=\"autocompleteField\"\r\n [spxSuggestions]=\"this.spxSuggestions()[autocompleteField.key]\"\r\n [spxValuePair]=\"$any(this.spxFormGroup().get(autocompleteField.key)).value\"\r\n [txtOptions]=\"'Options'\"\r\n [txtQuery]=\"'Query'\"\r\n [txtSubmit]=\"'Save'\"\r\n (spxCancel)=\"onAutocompleteCancel()\"\r\n (spxSearch)=\"onAutocompleteSearch($event)\"\r\n (spxSubmit)=\"onAutocompleteSave($event)\">\r\n </spx-autocomplete-search>\r\n}\r\n<div class=\"flex flex-col gap-3\">\r\n @for (spxSection of spxForm().sections; track spxSection; let spxSectionIndex = $index) {\r\n <spx-form-section\r\n [spxShowTitle]=\"!spxSection.showTitle || spxSection.showTitle()\"\r\n [spxIndex]=\"spxSectionIndex + 1\"\r\n [spxTitle]=\"spxSection.title ? (spxSection.title() | translate | capitalize) : undefined\">\r\n @for (spxField of spxSection.fields; track spxField; let spxFieldIndex = $index) {\r\n @if (spxField.show === undefined || spxField.show()) {\r\n @if (spxField.type() === typeButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxField.severity ? spxField.severity() : undefined\"\r\n [spxType]=\"'button'\"\r\n (spxClick)=\"onClick(spxField)\"\r\n >{{ (spxField.label ? spxField.label() : spxField.key) | translate | capitalize }}</spx-button>\r\n }\r\n @if (spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup().get(spxField.key))\"\r\n [spxAutofocus]=\"spxField.autofocus ? spxField.autofocus() : false\"\r\n [spxCapitalize]=\"spxField.capitalize ? spxField.capitalize() : false\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxPattern]=\"spxField.type() === typeNumericKeyboard ? '\\\\d*' : undefined\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup().get(spxField.key)!)\"\r\n [spxShowSearch]=\"spxField.type() === typeAutocomplete\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup().get(spxField.key)! && this.spxFormGroup().get(spxField.key)!.errors && this.spxFormGroup().get(spxField.key)!.touched\"\r\n [spxStep]=\"spxField.step ? spxField.step() : undefined\"\r\n [spxType]=\"spxField.type()\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup().get(spxField.key)!)\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions()[spxField.key]\"\r\n (spxBlur)=\"onBlur(spxField)\"\r\n (spxSearch)=\"onSearch(spxField)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup().get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key)| translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n @if (spxField.type() === typeRadio) {\r\n <spx-input\r\n [formControl]=\"$any(this.spxFormGroup().get(spxField.key))\"\r\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"\r\n [spxName]=\"spxField.key\"\r\n [spxReadonly]=\"spxField.readonly ? spxField.readonly() : false\"\r\n [spxRequired]=\"hasRequiredField(this.spxFormGroup().get(spxField.key)!)\"\r\n [spxShowHelp]=\"false\"\r\n [spxShowValidationMessages]=\"this.spxFormGroup().get(spxField.key)! && this.spxFormGroup().get(spxField.key)!.errors && this.spxFormGroup().get(spxField.key)!.touched\"\r\n [spxSuggestions]=\"spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions()[spxField.key]\"\r\n [spxType]=\"typeRadio\"\r\n [spxValidators]=\"getRawValidators(this.spxFormGroup().get(spxField.key)!)\">\r\n <spx-validate-control [control]=\"$any(this.spxFormGroup().get(spxField.key))\" [label]=\"(spxField.label ? spxField.label() : spxField.key) | translate | capitalize\"></spx-validate-control>\r\n </spx-input>\r\n }\r\n }\r\n \r\n }\r\n </spx-form-section>\r\n }\r\n\r\n @for (spxButton of spxForm().buttons; track spxButton) {\r\n <spx-button\r\n [spxFullWidth]=\"true\"\r\n [spxSeverity]=\"spxButton.severity\"\r\n [spxType]=\"spxButton.type\"\r\n (spxClick)=\"spxButton.onClick ? spxButton.onClick() : undefined\">\r\n {{ ((spxButton && spxButton.label) ? spxButton.label() : '') | translate | capitalize }}\r\n </spx-button>\r\n }\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC7B,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACrB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,GAGhC,EAAA,CAAA,CAAA;;ACOM,MAAM,yBAAyB,GAAG,oBAAoB;AACtD,MAAM,SAAS,GAAG,OAAO;AACzB,MAAM,WAAW,GAAG,SAAS;MAYvB,8BAA8B,CAAA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AAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKV,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAhBhC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAChB,OAAA,EAAA;wBACL,WAAW;wBACX,mBAAmB;wBACnB,8BAA8B;wBAC9B,kBAAkB;wBAClB,iBAAiB;wBACjB,uBAAuB;wBACvB,iBAAiB;wBACjB,2BAA2B;wBAC3B;qBACH,EAEgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,8kKAAA,EAAA;;;AE3BnD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-helpers.mjs","sources":["../../../../projects/softpak/components/spx-helpers/calc-check-digit.function.ts","../../../../projects/softpak/components/spx-helpers/spx-severity.enum.ts","../../../../projects/softpak/components/spx-helpers/unsubscribe-subscriptions.function.ts","../../../../projects/softpak/components/spx-helpers/value-pair-to-value.function.ts","../../../../projects/softpak/components/spx-helpers/softpak-components-spx-helpers.ts"],"sourcesContent":["export const calcCheckDigit = (container: string): string => {\n container = container.toUpperCase();\n\n const mapping = {\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\n A: 10, B: 12, C: 13, D: 14, E: 15, F: 16, G: 17, H: 18, I: 19, J: 20, K: 21, L: 23, M: 24,\n N: 25, O: 26, P: 27, Q: 28, R: 29, S: 30, T: 31, U: 32, V: 34, W: 35, X: 36, Y: 37, Z: 38\n };\n\n let total = 0;\n\n for (let i = 0; i < container.length; i++) {\n const cChar = container.substr(i, 1);\n const value = (mapping as any)[cChar];\n const multiplier = Math.pow(2, i);\n total = total + (value * multiplier);\n }\n\n let outcome = total % 11;\n if (outcome === 10) {\n outcome = 0;\n }\n\n return outcome.toString();\n}\n","export enum SpxSeverityEnum {\n error = 'error',\n info = 'info',\n success = 'success',\n unknown = 'unknown',\n warning = 'warning',\n primary = 'primary',\n}\n","import { Subscription } from \"rxjs\";\n\nexport function unsubscribeSubscriptions(subscriptionObject: object): void {\n for (const key in subscriptionObject) {\n if ((subscriptionObject as any)[key]) {\n ((subscriptionObject as any)[key] as Subscription).unsubscribe();\n }\n }\n}","export const valuePairToValue = (pair: any) => {\n if (pair === null || (typeof pair === 'object' && pair.value === undefined)) {\n return null;\n }\n return pair?.value || pair?.value === false || pair?.value === null || pair?.value === '' || pair?.value === 0 ? pair?.value : pair;\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAa,MAAA,cAAc,GAAG,CAAC,SAAiB,KAAY;AAC1D,IAAA,SAAS,GAAG,SAAS,CAAC,WAAW,EAAE;AAEnC,IAAA,MAAM,OAAO,GAAG;AACd,QAAA,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAC1D,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE;QACzF,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAA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AC,EAAE;AAChC,YAAA,kBAA0B,CAAC,GAAG,CAAkB,CAAC,WAAW,EAAE;;;AAG5E;;ACRa,MAAA,gBAAgB,GAAG,CAAC,IAAS,KAAI;AAC1C,IAAA,IAAI,IAAI,KAAK,IAAI,KAAK,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,EAAE;AACzE,QAAA,OAAO,IAAI;;AAEf,IAAA,OAAO,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,KAAK,KAAK,IAAI,IAAI,EAAE,KAAK,KAAK,IAAI,IAAI,IAAI,EAAE,KAAK,KAAK,EAAE,IAAI,IAAI,EAAE,KAAK,KAAK,CAAC,GAAG,IAAI,EAAE,KAAK,GAAG,IAAI;AACvI;;ACLA;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-helpers.mjs","sources":["../../../../projects/softpak/components/spx-helpers/calc-check-digit.function.ts","../../../../projects/softpak/components/spx-helpers/spx-severity.enum.ts","../../../../projects/softpak/components/spx-helpers/unsubscribe-subscriptions.function.ts","../../../../projects/softpak/components/spx-helpers/value-pair-to-value.function.ts","../../../../projects/softpak/components/spx-helpers/softpak-components-spx-helpers.ts"],"sourcesContent":["export const calcCheckDigit = (container: string): string => {\r\n container = container.toUpperCase();\r\n\r\n const mapping = {\r\n 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9,\r\n A: 10, B: 12, C: 13, D: 14, E: 15, F: 16, G: 17, H: 18, I: 19, J: 20, K: 21, L: 23, M: 24,\r\n N: 25, O: 26, P: 27, Q: 28, R: 29, S: 30, T: 31, U: 32, V: 34, W: 35, X: 36, Y: 37, Z: 38\r\n };\r\n\r\n let total = 0;\r\n\r\n for (let i = 0; i < container.length; i++) {\r\n const cChar = container.substr(i, 1);\r\n const value = (mapping as any)[cChar];\r\n const multiplier = Math.pow(2, i);\r\n total = total + (value * multiplier);\r\n }\r\n\r\n let outcome = total % 11;\r\n if (outcome === 10) {\r\n outcome = 0;\r\n }\r\n\r\n return outcome.toString();\r\n}\r\n","export enum SpxSeverityEnum {\r\n error = 'error',\r\n info = 'info',\r\n success = 'success',\r\n unknown = 'unknown',\r\n warning = 'warning',\r\n primary = 'primary',\r\n}\r\n","import { Subscription } from \"rxjs\";\r\n\r\nexport function unsubscribeSubscriptions(subscriptionObject: object): void {\r\n for (const key in subscriptionObject) {\r\n if ((subscriptionObject as any)[key]) {\r\n ((subscriptionObject as any)[key] as Subscription).unsubscribe();\r\n }\r\n }\r\n}","export const valuePairToValue = (pair: any) => {\r\n if (pair === null || (typeof pair === 'object' && pair.value === undefined)) {\r\n return null;\r\n }\r\n return pair?.value || pair?.value === false || pair?.value === null || pair?.value === '' || pair?.value === 0 ? pair?.value : pair;\r\n};\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAa,MAAA,cAAc,GAAG,CAAC,SAAiB,KAAY;AAC1D,IAAA,SAAS,GAAG,SAAS,CAAC,WAAW,EAAE;AAEnC,IAAA,MAAM,OAAO,GAAG;AACd,QAAA,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;QAC1D,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EA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