@softpak/components 0.0.0-beta.17 → 0.0.0-beta.171

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 (86) hide show
  1. package/esm2022/spx-button/spx-button.component.mjs +12 -3
  2. package/esm2022/spx-change-details/public-api.mjs +2 -0
  3. package/esm2022/spx-change-details/softpak-components-spx-change-details.mjs +5 -0
  4. package/esm2022/spx-change-details/spx-change-details-value.interface.mjs +2 -0
  5. package/esm2022/spx-change-details/spx-change-details.component.mjs +138 -0
  6. package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +1 -1
  7. package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +2 -2
  8. package/esm2022/spx-check-digit/spx-check-digit.component.mjs +12 -4
  9. package/esm2022/spx-form-section/spx-form-section.component.mjs +9 -9
  10. package/esm2022/spx-form-view/public-api.mjs +4 -0
  11. package/esm2022/spx-form-view/softpak-components-spx-form-view.mjs +5 -0
  12. package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +115 -0
  13. package/esm2022/spx-form-view/spx-form-field.interface.mjs +2 -0
  14. package/esm2022/spx-form-view/spx-form-section.interface.mjs +2 -0
  15. package/esm2022/spx-form-view/spx-form-view.component.mjs +213 -0
  16. package/esm2022/spx-inputs/spx-dropdown.component.mjs +94 -0
  17. package/esm2022/spx-inputs/spx-input-box.component.mjs +70 -46
  18. package/esm2022/spx-inputs/spx-input-date.component.mjs +1 -1
  19. package/esm2022/spx-inputs/spx-input-float.component.mjs +10 -5
  20. package/esm2022/spx-inputs/spx-input-number.component.mjs +10 -5
  21. package/esm2022/spx-inputs/spx-input-radio.component.mjs +93 -27
  22. package/esm2022/spx-inputs/spx-input-text.component.mjs +21 -32
  23. package/esm2022/spx-inputs/spx-input-type.enum.mjs +2 -1
  24. package/esm2022/spx-inputs/spx-input.component.mjs +48 -13
  25. package/esm2022/spx-navigation/spx-home-tile.component.mjs +29 -10
  26. package/esm2022/spx-navigation/spx-navigation-item.interface.mjs +1 -1
  27. package/esm2022/spx-navigation/spx-navigation.component.mjs +11 -5
  28. package/esm2022/spx-number-check/public-api.mjs +2 -0
  29. package/esm2022/spx-number-check/softpak-components-spx-number-check.mjs +5 -0
  30. package/esm2022/spx-number-check/spx-number-check.component.mjs +259 -0
  31. package/esm2022/spx-spinner/spx-spinner.component.mjs +5 -5
  32. package/esm2022/spx-suggestion/spx-suggestion.component.mjs +28 -10
  33. package/esm2022/spx-update/src/spx-update-info.component.mjs +1 -1
  34. package/fesm2022/softpak-components-spx-button.mjs +11 -2
  35. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  36. package/fesm2022/softpak-components-spx-change-details.mjs +145 -0
  37. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -0
  38. package/fesm2022/softpak-components-spx-channel-selection.mjs +2 -2
  39. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  40. package/fesm2022/softpak-components-spx-check-digit.mjs +11 -3
  41. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  42. package/fesm2022/softpak-components-spx-form-section.mjs +8 -8
  43. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  44. package/fesm2022/softpak-components-spx-form-view.mjs +328 -0
  45. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -0
  46. package/fesm2022/softpak-components-spx-inputs.mjs +331 -118
  47. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  48. package/fesm2022/softpak-components-spx-navigation.mjs +37 -12
  49. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  50. package/fesm2022/softpak-components-spx-number-check.mjs +266 -0
  51. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -0
  52. package/fesm2022/softpak-components-spx-spinner.mjs +4 -4
  53. package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
  54. package/fesm2022/softpak-components-spx-suggestion.mjs +27 -9
  55. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  56. package/fesm2022/softpak-components-spx-update.mjs +1 -1
  57. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  58. package/package.json +24 -6
  59. package/spx-button/spx-button.component.d.ts +3 -1
  60. package/spx-change-details/index.d.ts +5 -0
  61. package/spx-change-details/public-api.d.ts +1 -0
  62. package/spx-change-details/spx-change-details-value.interface.d.ts +7 -0
  63. package/spx-change-details/spx-change-details.component.d.ts +47 -0
  64. package/spx-check-digit/spx-check-digit.component.d.ts +3 -1
  65. package/spx-form-view/index.d.ts +5 -0
  66. package/spx-form-view/public-api.d.ts +3 -0
  67. package/spx-form-view/spx-autocomplete-search.component.d.ts +42 -0
  68. package/spx-form-view/spx-form-field.interface.d.ts +16 -0
  69. package/spx-form-view/spx-form-section.interface.d.ts +9 -0
  70. package/spx-form-view/spx-form-view.component.d.ts +37 -0
  71. package/spx-inputs/spx-dropdown.component.d.ts +18 -0
  72. package/spx-inputs/spx-input-box.component.d.ts +14 -7
  73. package/spx-inputs/spx-input-float.component.d.ts +3 -2
  74. package/spx-inputs/spx-input-number.component.d.ts +3 -2
  75. package/spx-inputs/spx-input-radio.component.d.ts +13 -5
  76. package/spx-inputs/spx-input-text.component.d.ts +3 -2
  77. package/spx-inputs/spx-input-type.enum.d.ts +2 -1
  78. package/spx-inputs/spx-input.component.d.ts +11 -3
  79. package/spx-navigation/spx-home-tile.component.d.ts +5 -1
  80. package/spx-navigation/spx-navigation-item.interface.d.ts +1 -0
  81. package/spx-navigation/spx-navigation.component.d.ts +4 -1
  82. package/spx-number-check/index.d.ts +5 -0
  83. package/spx-number-check/public-api.d.ts +1 -0
  84. package/spx-number-check/spx-number-check.component.d.ts +48 -0
  85. package/spx-suggestion/spx-suggestion.component.d.ts +3 -1
  86. package/tailwind.css +1 -1
@@ -0,0 +1,328 @@
1
+ import { CommonModule, NgIf, NgFor, JsonPipe } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { EventEmitter, Component, Input, Output } from '@angular/core';
4
+ import { SpxFormSectionComponent } from '@softpak/components/spx-form-section';
5
+ import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
6
+ import { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';
7
+ import * as i1 from '@angular/forms';
8
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
9
+ import { debounceTime } from 'rxjs';
10
+ import { SpxValidationModule } from '@softpak/components/spx-validation';
11
+ import { SpxButtonComponent } from '@softpak/components/spx-button';
12
+ import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
13
+
14
+ const sectionAutocompleteSearch = 'autocompleteSearch';
15
+ const ctrlQuery = 'query';
16
+ const ctrlOptions = 'options';
17
+ class SpxAutocompleteSearchComponent {
18
+ get ctrlQuery() { return this.formGroup.get(ctrlQuery); }
19
+ get ctrlOptions() { return this.formGroup.get(ctrlOptions); }
20
+ constructor(formBuilder) {
21
+ this.formBuilder = formBuilder;
22
+ this.spxSuggestions = [];
23
+ this.spxCancel = new EventEmitter();
24
+ this.spxSearch = new EventEmitter();
25
+ this.spxSubmit = new EventEmitter();
26
+ this.inputTypeRadio = SpxInputTypeEnum.radio;
27
+ this.inputTypeText = SpxInputTypeEnum.text;
28
+ this.severityError = SpxSeverityEnum.error;
29
+ this.severitySuccess = SpxSeverityEnum.success;
30
+ this.sections = [
31
+ {
32
+ key: sectionAutocompleteSearch,
33
+ showTitle: () => false,
34
+ fields: [
35
+ {
36
+ key: ctrlQuery,
37
+ type: () => SpxInputTypeEnum.text,
38
+ label: () => this.txtQuery,
39
+ capitalize: () => true,
40
+ },
41
+ {
42
+ key: ctrlOptions,
43
+ type: () => SpxInputTypeEnum.radio,
44
+ label: () => this.txtOptions,
45
+ },
46
+ ]
47
+ }
48
+ ];
49
+ this.createForm();
50
+ }
51
+ ngOnInit() {
52
+ this.listenToSelection();
53
+ this.listenToQuery();
54
+ }
55
+ ngOnDestroy() {
56
+ if (this.subSelection) {
57
+ this.subSelection.unsubscribe();
58
+ }
59
+ if (this.subQuery) {
60
+ this.subQuery.unsubscribe();
61
+ }
62
+ }
63
+ createForm() {
64
+ this.formGroup = this.formBuilder.group({
65
+ [ctrlQuery]: [null],
66
+ [ctrlOptions]: [null],
67
+ });
68
+ }
69
+ getRawValidators(formControl) {
70
+ return formControl._rawValidators;
71
+ }
72
+ onCancel() {
73
+ this.spxCancel.emit();
74
+ }
75
+ onSubmit() {
76
+ this.spxSubmit.emit(this.ctrlQuery.value);
77
+ }
78
+ listenToQuery() {
79
+ this.subQuery = this.ctrlQuery.valueChanges.pipe(debounceTime(500)).subscribe(valuePair => {
80
+ this.spxSearch.emit(valuePair);
81
+ });
82
+ }
83
+ listenToSelection() {
84
+ this.subSelection = this.ctrlOptions.valueChanges.subscribe(valuePair => {
85
+ this.ctrlQuery.setValue(valuePair);
86
+ });
87
+ }
88
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxAutocompleteSearchComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
89
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxAutocompleteSearchComponent, isStandalone: true, selector: "spx-autocomplete-search", inputs: { spxSuggestions: "spxSuggestions", spxField: "spxField", txtOptions: "txtOptions", txtQuery: "txtQuery", txtSubmit: "txtSubmit" }, outputs: { spxCancel: "spxCancel", spxSearch: "spxSearch", spxSubmit: "spxSubmit" }, ngImport: i0, template: "<div class=\"bg-black fixed top-0 left-0 right-0 bottom-0 px-3 pt-16 z-50 overflow-auto\">\n <form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-input\n [formControl]=\"ctrlQuery\"\n [spxLabel]=\"txtQuery\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n <spx-input\n [formControl]=\"ctrlOptions\"\n [spxLabel]=\"txtOptions\"\n [spxSuggestions]=\"spxSuggestions\"\n [spxType]=\"inputTypeRadio\">\n </spx-input>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severityError\"\n [spxType]=\"'button'\"\n (spxClick)=\"onCancel()\">\n Cancel\n </spx-button>\n </form>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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", "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: "ngmodule", type: SpxValidationModule }] }); }
90
+ }
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxAutocompleteSearchComponent, decorators: [{
92
+ type: Component,
93
+ args: [{ selector: 'spx-autocomplete-search', standalone: true, imports: [
94
+ CommonModule,
95
+ FormsModule,
96
+ ReactiveFormsModule,
97
+ SpxButtonComponent,
98
+ SpxInputComponent,
99
+ SpxValidationModule,
100
+ ], template: "<div class=\"bg-black fixed top-0 left-0 right-0 bottom-0 px-3 pt-16 z-50 overflow-auto\">\n <form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-input\n [formControl]=\"ctrlQuery\"\n [spxLabel]=\"txtQuery\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n <spx-input\n [formControl]=\"ctrlOptions\"\n [spxLabel]=\"txtOptions\"\n [spxSuggestions]=\"spxSuggestions\"\n [spxType]=\"inputTypeRadio\">\n </spx-input>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severityError\"\n [spxType]=\"'button'\"\n (spxClick)=\"onCancel()\">\n Cancel\n </spx-button>\n </form>\n</div>\n" }]
101
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { spxSuggestions: [{
102
+ type: Input
103
+ }], spxField: [{
104
+ type: Input
105
+ }], txtOptions: [{
106
+ type: Input
107
+ }], txtQuery: [{
108
+ type: Input
109
+ }], txtSubmit: [{
110
+ type: Input
111
+ }], spxCancel: [{
112
+ type: Output
113
+ }], spxSearch: [{
114
+ type: Output
115
+ }], spxSubmit: [{
116
+ type: Output
117
+ }] } });
118
+
119
+ class SpxFormViewComponent {
120
+ onBlur(field) {
121
+ return;
122
+ }
123
+ onAutocompleteCancel() {
124
+ this.autocompleteField = undefined;
125
+ }
126
+ onAutocompleteSearch(valuePair) {
127
+ console.log('spxFormView - onAutocompleteSearch: ', valuePair, this.autocompleteField);
128
+ if (this.autocompleteField) {
129
+ this.spxSearch.emit({
130
+ field: this.autocompleteField,
131
+ valuePair,
132
+ });
133
+ }
134
+ }
135
+ onAutocompleteSave(valuePair) {
136
+ this.spxFormGroup.get(this.autocompleteField.key)?.setValue(valuePair);
137
+ this.autocompleteField = undefined;
138
+ }
139
+ onSearch(field) {
140
+ this.autocompleteField = field;
141
+ }
142
+ getRawValidators(formControl) {
143
+ // eslint-disable-next-line no-underscore-dangle
144
+ return formControl._rawValidators;
145
+ }
146
+ hasRequiredField(abstractControl) {
147
+ if (abstractControl.validator) {
148
+ const validator = abstractControl.validator({});
149
+ if (validator && validator['required']) {
150
+ return true;
151
+ }
152
+ }
153
+ if (abstractControl['controls']) {
154
+ for (const controlName in abstractControl['controls']) {
155
+ if (abstractControl['controls'][controlName]) {
156
+ if (this.hasRequiredField(abstractControl['controls'][controlName])) {
157
+ return true;
158
+ }
159
+ }
160
+ }
161
+ }
162
+ return false;
163
+ }
164
+ static initialFormValue(sections) {
165
+ const formObject = {};
166
+ sections.forEach(section => {
167
+ section.fields.forEach(field => {
168
+ formObject[field.key] = [field.defaultValue ? field.defaultValue() : null, field.validators ? [...field.validators()] : []];
169
+ });
170
+ });
171
+ return formObject;
172
+ }
173
+ static createForm(formBuilder, sections) {
174
+ return formBuilder.group(this.initialFormValue(sections));
175
+ }
176
+ constructor(formBuilder) {
177
+ this.formBuilder = formBuilder;
178
+ this.spxSearch = new EventEmitter();
179
+ this.typeAutocomplete = SpxInputTypeEnum.autocomplete;
180
+ this.typeFloat = SpxInputTypeEnum.float;
181
+ this.typeNumber = SpxInputTypeEnum.number;
182
+ this.typeRadio = SpxInputTypeEnum.radio;
183
+ this.typeText = SpxInputTypeEnum.text;
184
+ this.typeNumericKeyboard = SpxInputTypeEnum.textNumericKeyboard;
185
+ this.typeOverlay = SpxInputTypeEnum.overlay;
186
+ this.typeOverlayNumber = SpxInputTypeEnum.overlayNumber;
187
+ }
188
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxFormViewComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
189
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxFormViewComponent, isStandalone: true, selector: "spx-form-view", inputs: { spxFormGroup: "spxFormGroup", spxSections: "spxSections", spxSuggestions: "spxSuggestions" }, outputs: { spxSearch: "spxSearch" }, ngImport: i0, template: `<spx-autocomplete-search
190
+ *ngIf="autocompleteField"
191
+ [spxField]="autocompleteField"
192
+ [spxSuggestions]="this.spxSuggestions[autocompleteField.key]"
193
+ [txtOptions]="'Options'"
194
+ [txtQuery]="'Query'"
195
+ [txtSubmit]="'Save'"
196
+ (spxCancel)="onAutocompleteCancel()"
197
+ (spxSearch)="onAutocompleteSearch($event)"
198
+ (spxSubmit)="onAutocompleteSave($event)">
199
+ </spx-autocomplete-search>
200
+ <spx-form-section
201
+ *ngFor="let spxSection of spxSections; let spxSectionIndex = index;"
202
+ [spxShowTitle]="!spxSection.showTitle || spxSection.showTitle()"
203
+ [spxIndex]="spxSectionIndex + 1"
204
+ [spxTitle]="spxSection.title ? spxSection.title() : undefined">
205
+ <ng-container *ngFor="let spxField of spxSection.fields; let spxFieldIndex = index;">
206
+ <ng-container *ngIf="spxField.show === undefined || spxField.show()">
207
+ <spx-input
208
+ *ngIf="spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard"
209
+ [formControl]="$any(this.spxFormGroup.get(spxField.key))"
210
+ [spxAutofocus]="spxField.autofocus ? spxField.autofocus() : false"
211
+ [spxCapitalize]="spxField.capitalize ? spxField.capitalize() : false"
212
+ [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | capitalize"
213
+ [spxPattern]="spxField.type() === typeNumericKeyboard ? '\\d*' : undefined"
214
+ [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
215
+ [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
216
+ [spxShowSearch]="spxField.type() === typeAutocomplete"
217
+ [spxShowHelp]="false"
218
+ [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
219
+ [spxStep]="spxField.step ? spxField.step() : undefined"
220
+ [spxType]="spxField.type()"
221
+ [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)"
222
+ [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
223
+ (spxBlur)="onBlur(spxField)"
224
+ (spxSearch)="onSearch(spxField)">
225
+ </spx-input>
226
+
227
+ <spx-input
228
+ *ngIf="spxField.type() === typeRadio"
229
+ [formControl]="$any(this.spxFormGroup.get(spxField.key))"
230
+ [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | capitalize"
231
+ [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
232
+ [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
233
+ [spxShowHelp]="false"
234
+ [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
235
+ [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
236
+ [spxType]="typeRadio"
237
+ [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)">
238
+ </spx-input>
239
+ </ng-container>
240
+ </ng-container>
241
+ </spx-form-section>`, 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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxAutocompleteSearchComponent, selector: "spx-autocomplete-search", inputs: ["spxSuggestions", "spxField", "txtOptions", "txtQuery", "txtSubmit"], outputs: ["spxCancel", "spxSearch", "spxSubmit"] }, { 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", "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"] }] }); }
242
+ }
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxFormViewComponent, decorators: [{
244
+ type: Component,
245
+ args: [{
246
+ selector: 'spx-form-view',
247
+ standalone: true,
248
+ imports: [
249
+ FormsModule,
250
+ ReactiveFormsModule,
251
+ JsonPipe,
252
+ NgIf,
253
+ NgFor,
254
+ SpxAutocompleteSearchComponent,
255
+ SpxCapitalizePipe,
256
+ SpxFormSectionComponent,
257
+ SpxInputComponent,
258
+ ],
259
+ template: `<spx-autocomplete-search
260
+ *ngIf="autocompleteField"
261
+ [spxField]="autocompleteField"
262
+ [spxSuggestions]="this.spxSuggestions[autocompleteField.key]"
263
+ [txtOptions]="'Options'"
264
+ [txtQuery]="'Query'"
265
+ [txtSubmit]="'Save'"
266
+ (spxCancel)="onAutocompleteCancel()"
267
+ (spxSearch)="onAutocompleteSearch($event)"
268
+ (spxSubmit)="onAutocompleteSave($event)">
269
+ </spx-autocomplete-search>
270
+ <spx-form-section
271
+ *ngFor="let spxSection of spxSections; let spxSectionIndex = index;"
272
+ [spxShowTitle]="!spxSection.showTitle || spxSection.showTitle()"
273
+ [spxIndex]="spxSectionIndex + 1"
274
+ [spxTitle]="spxSection.title ? spxSection.title() : undefined">
275
+ <ng-container *ngFor="let spxField of spxSection.fields; let spxFieldIndex = index;">
276
+ <ng-container *ngIf="spxField.show === undefined || spxField.show()">
277
+ <spx-input
278
+ *ngIf="spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard"
279
+ [formControl]="$any(this.spxFormGroup.get(spxField.key))"
280
+ [spxAutofocus]="spxField.autofocus ? spxField.autofocus() : false"
281
+ [spxCapitalize]="spxField.capitalize ? spxField.capitalize() : false"
282
+ [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | capitalize"
283
+ [spxPattern]="spxField.type() === typeNumericKeyboard ? '\\d*' : undefined"
284
+ [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
285
+ [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
286
+ [spxShowSearch]="spxField.type() === typeAutocomplete"
287
+ [spxShowHelp]="false"
288
+ [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
289
+ [spxStep]="spxField.step ? spxField.step() : undefined"
290
+ [spxType]="spxField.type()"
291
+ [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)"
292
+ [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
293
+ (spxBlur)="onBlur(spxField)"
294
+ (spxSearch)="onSearch(spxField)">
295
+ </spx-input>
296
+
297
+ <spx-input
298
+ *ngIf="spxField.type() === typeRadio"
299
+ [formControl]="$any(this.spxFormGroup.get(spxField.key))"
300
+ [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | capitalize"
301
+ [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
302
+ [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
303
+ [spxShowHelp]="false"
304
+ [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
305
+ [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
306
+ [spxType]="typeRadio"
307
+ [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)">
308
+ </spx-input>
309
+ </ng-container>
310
+ </ng-container>
311
+ </spx-form-section>`,
312
+ }]
313
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { spxFormGroup: [{
314
+ type: Input
315
+ }], spxSections: [{
316
+ type: Input
317
+ }], spxSuggestions: [{
318
+ type: Input
319
+ }], spxSearch: [{
320
+ type: Output
321
+ }] } });
322
+
323
+ /**
324
+ * Generated bundle index. Do not edit.
325
+ */
326
+
327
+ export { SpxFormViewComponent };
328
+ //# sourceMappingURL=softpak-components-spx-form-view.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"softpak-components-spx-form-view.mjs","sources":["../../../../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":["import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription, debounce, debounceTime } from 'rxjs';\nimport { SpxValidationModule } from '@softpak/components/spx-validation';\nimport { CommonModule } from '@angular/common';\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';\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 standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxButtonComponent,\n SpxInputComponent,\n SpxValidationModule,\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 @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 }\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","<div class=\"bg-black fixed top-0 left-0 right-0 bottom-0 px-3 pt-16 z-50 overflow-auto\">\n <form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-input\n [formControl]=\"ctrlQuery\"\n [spxLabel]=\"txtQuery\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n <spx-input\n [formControl]=\"ctrlOptions\"\n [spxLabel]=\"txtOptions\"\n [spxSuggestions]=\"spxSuggestions\"\n [spxType]=\"inputTypeRadio\">\n </spx-input>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severityError\"\n [spxType]=\"'button'\"\n (spxClick)=\"onCancel()\">\n Cancel\n </spx-button>\n </form>\n</div>\n","import { JsonPipe, NgFor, NgIf } from '@angular/common';\nimport { Component, EventEmitter, Input, Output } 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';\n\n@Component({\n selector: 'spx-form-view',\n standalone: true,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n JsonPipe,\n NgIf,\n NgFor,\n SpxAutocompleteSearchComponent,\n SpxCapitalizePipe,\n SpxFormSectionComponent,\n SpxInputComponent,\n ],\n template: `<spx-autocomplete-search\n *ngIf=\"autocompleteField\"\n [spxField]=\"autocompleteField\"\n [spxSuggestions]=\"this.spxSuggestions[autocompleteField.key]\"\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 <spx-form-section\n *ngFor=\"let spxSection of spxSections; let spxSectionIndex = index;\"\n [spxShowTitle]=\"!spxSection.showTitle || spxSection.showTitle()\"\n [spxIndex]=\"spxSectionIndex + 1\"\n [spxTitle]=\"spxSection.title ? spxSection.title() : undefined\">\n <ng-container *ngFor=\"let spxField of spxSection.fields; let spxFieldIndex = index;\">\n <ng-container *ngIf=\"spxField.show === undefined || spxField.show()\">\n <spx-input\n *ngIf=\"spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard\"\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) | capitalize\"\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-input>\n\n <spx-input\n *ngIf=\"spxField.type() === typeRadio\"\n [formControl]=\"$any(this.spxFormGroup.get(spxField.key))\"\n [spxLabel]=\"(spxField.label ? spxField.label() : spxField.key) | capitalize\"\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-input>\n </ng-container>\n </ng-container>\n </spx-form-section>`,\n})\nexport class SpxFormViewComponent {\n @Input() spxFormGroup!: FormGroup;\n @Input() spxSections!: SpxFormSectionI[];\n @Input() spxSuggestions!: any;\n @Output() spxSearch: EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }> = new EventEmitter<{ field: SpxFormFieldI, valuePair: SpxValuePair<any> }>();\n autocompleteField?: SpxFormFieldI;\n\n typeAutocomplete = SpxInputTypeEnum.autocomplete;\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 onBlur(field: SpxFormFieldI) {\n return;\n }\n\n onAutocompleteCancel(): void {\n this.autocompleteField = undefined;\n }\n\n onAutocompleteSearch(valuePair: SpxValuePair<any>): void {\n console.log('spxFormView - onAutocompleteSearch: ', valuePair, this.autocompleteField);\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":";;;;;;;;;;;;;AAWO,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AACvD,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B,MAAM,WAAW,GAAG,SAAS,CAAC;MAexB,8BAA8B,CAAA;AAmCzC,IAAA,IAAI,SAAS,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAgB,CAAC,EAAE;AACrF,IAAA,IAAI,WAAW,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAgB,CAAC,EAAE;AAKzF,IAAA,WAAA,CAAqB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QAvCpC,IAAc,CAAA,cAAA,GAAwB,EAAE,CAAC;AAKxC,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACzD,QAAA,IAAA,CAAA,SAAS,GAAoC,IAAI,YAAY,EAAqB,CAAC;AACnF,QAAA,IAAA,CAAA,SAAS,GAAoC,IAAI,YAAY,EAAqB,CAAC;AAC7F,QAAA,IAAA,CAAA,cAAc,GAAG,gBAAgB,CAAC,KAAK,CAAC;AACxC,QAAA,IAAA,CAAA,aAAa,GAAG,gBAAgB,CAAC,IAAI,CAAC;AACtC,QAAA,IAAA,CAAA,aAAa,GAAG,eAAe,CAA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