@softpak/components 0.0.0-beta.18 → 0.0.0-beta.181

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 (83) 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 +166 -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 +119 -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 +215 -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 +3 -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-suggestion/spx-suggestion.component.mjs +28 -10
  32. package/esm2022/spx-update/src/spx-update-info.component.mjs +1 -1
  33. package/fesm2022/softpak-components-spx-button.mjs +11 -2
  34. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  35. package/fesm2022/softpak-components-spx-change-details.mjs +173 -0
  36. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -0
  37. package/fesm2022/softpak-components-spx-channel-selection.mjs +2 -2
  38. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  39. package/fesm2022/softpak-components-spx-check-digit.mjs +11 -3
  40. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  41. package/fesm2022/softpak-components-spx-form-section.mjs +8 -8
  42. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  43. package/fesm2022/softpak-components-spx-form-view.mjs +334 -0
  44. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -0
  45. package/fesm2022/softpak-components-spx-inputs.mjs +332 -118
  46. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  47. package/fesm2022/softpak-components-spx-navigation.mjs +37 -12
  48. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  49. package/fesm2022/softpak-components-spx-number-check.mjs +266 -0
  50. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -0
  51. package/fesm2022/softpak-components-spx-suggestion.mjs +27 -9
  52. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  53. package/fesm2022/softpak-components-spx-update.mjs +1 -1
  54. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  55. package/package.json +30 -12
  56. package/spx-button/spx-button.component.d.ts +3 -1
  57. package/spx-change-details/index.d.ts +5 -0
  58. package/spx-change-details/public-api.d.ts +1 -0
  59. package/spx-change-details/spx-change-details-value.interface.d.ts +7 -0
  60. package/spx-change-details/spx-change-details.component.d.ts +54 -0
  61. package/spx-check-digit/spx-check-digit.component.d.ts +3 -1
  62. package/spx-form-view/index.d.ts +5 -0
  63. package/spx-form-view/public-api.d.ts +3 -0
  64. package/spx-form-view/spx-autocomplete-search.component.d.ts +43 -0
  65. package/spx-form-view/spx-form-field.interface.d.ts +16 -0
  66. package/spx-form-view/spx-form-section.interface.d.ts +9 -0
  67. package/spx-form-view/spx-form-view.component.d.ts +37 -0
  68. package/spx-inputs/spx-dropdown.component.d.ts +18 -0
  69. package/spx-inputs/spx-input-box.component.d.ts +14 -7
  70. package/spx-inputs/spx-input-float.component.d.ts +3 -2
  71. package/spx-inputs/spx-input-number.component.d.ts +3 -2
  72. package/spx-inputs/spx-input-radio.component.d.ts +13 -5
  73. package/spx-inputs/spx-input-text.component.d.ts +3 -2
  74. package/spx-inputs/spx-input-type.enum.d.ts +3 -1
  75. package/spx-inputs/spx-input.component.d.ts +11 -3
  76. package/spx-navigation/spx-home-tile.component.d.ts +5 -1
  77. package/spx-navigation/spx-navigation-item.interface.d.ts +1 -0
  78. package/spx-navigation/spx-navigation.component.d.ts +4 -1
  79. package/spx-number-check/index.d.ts +5 -0
  80. package/spx-number-check/public-api.d.ts +1 -0
  81. package/spx-number-check/spx-number-check.component.d.ts +48 -0
  82. package/spx-suggestion/spx-suggestion.component.d.ts +3 -1
  83. package/tailwind.css +1 -1
@@ -0,0 +1,334 @@
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
+ this.ctrlQuery.setValue(this.spxValuePair, { emitEvent: false });
55
+ this.spxSearch.emit(this.spxValuePair);
56
+ }
57
+ ngOnDestroy() {
58
+ if (this.subSelection) {
59
+ this.subSelection.unsubscribe();
60
+ }
61
+ if (this.subQuery) {
62
+ this.subQuery.unsubscribe();
63
+ }
64
+ }
65
+ createForm() {
66
+ this.formGroup = this.formBuilder.group({
67
+ [ctrlQuery]: [null],
68
+ [ctrlOptions]: [null],
69
+ });
70
+ }
71
+ getRawValidators(formControl) {
72
+ return formControl._rawValidators;
73
+ }
74
+ onCancel() {
75
+ this.spxCancel.emit();
76
+ }
77
+ onSubmit() {
78
+ this.spxSubmit.emit(this.ctrlQuery.value);
79
+ }
80
+ listenToQuery() {
81
+ this.subQuery = this.ctrlQuery.valueChanges.pipe(debounceTime(500)).subscribe(valuePair => {
82
+ this.spxSearch.emit(valuePair);
83
+ });
84
+ }
85
+ listenToSelection() {
86
+ this.subSelection = this.ctrlOptions.valueChanges.subscribe(valuePair => {
87
+ this.ctrlQuery.setValue(valuePair);
88
+ });
89
+ }
90
+ 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 }); }
91
+ 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", spxValuePair: "spxValuePair" }, 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 }] }); }
92
+ }
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxAutocompleteSearchComponent, decorators: [{
94
+ type: Component,
95
+ args: [{ selector: 'spx-autocomplete-search', standalone: true, imports: [
96
+ CommonModule,
97
+ FormsModule,
98
+ ReactiveFormsModule,
99
+ SpxButtonComponent,
100
+ SpxInputComponent,
101
+ SpxValidationModule,
102
+ ], 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" }]
103
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { spxSuggestions: [{
104
+ type: Input
105
+ }], spxField: [{
106
+ type: Input
107
+ }], txtOptions: [{
108
+ type: Input
109
+ }], txtQuery: [{
110
+ type: Input
111
+ }], txtSubmit: [{
112
+ type: Input
113
+ }], spxValuePair: [{
114
+ type: Input
115
+ }], spxCancel: [{
116
+ type: Output
117
+ }], spxSearch: [{
118
+ type: Output
119
+ }], spxSubmit: [{
120
+ type: Output
121
+ }] } });
122
+
123
+ class SpxFormViewComponent {
124
+ onBlur(field) {
125
+ return;
126
+ }
127
+ onAutocompleteCancel() {
128
+ this.autocompleteField = undefined;
129
+ }
130
+ onAutocompleteSearch(valuePair) {
131
+ console.log('spxFormView - onAutocompleteSearch: ', valuePair, this.autocompleteField);
132
+ if (this.autocompleteField) {
133
+ this.spxSearch.emit({
134
+ field: this.autocompleteField,
135
+ valuePair,
136
+ });
137
+ }
138
+ }
139
+ onAutocompleteSave(valuePair) {
140
+ this.spxFormGroup.get(this.autocompleteField.key)?.setValue(valuePair);
141
+ this.autocompleteField = undefined;
142
+ }
143
+ onSearch(field) {
144
+ this.autocompleteField = field;
145
+ }
146
+ getRawValidators(formControl) {
147
+ // eslint-disable-next-line no-underscore-dangle
148
+ return formControl._rawValidators;
149
+ }
150
+ hasRequiredField(abstractControl) {
151
+ if (abstractControl.validator) {
152
+ const validator = abstractControl.validator({});
153
+ if (validator && validator['required']) {
154
+ return true;
155
+ }
156
+ }
157
+ if (abstractControl['controls']) {
158
+ for (const controlName in abstractControl['controls']) {
159
+ if (abstractControl['controls'][controlName]) {
160
+ if (this.hasRequiredField(abstractControl['controls'][controlName])) {
161
+ return true;
162
+ }
163
+ }
164
+ }
165
+ }
166
+ return false;
167
+ }
168
+ static initialFormValue(sections) {
169
+ const formObject = {};
170
+ sections.forEach(section => {
171
+ section.fields.forEach(field => {
172
+ formObject[field.key] = [field.defaultValue ? field.defaultValue() : null, field.validators ? [...field.validators()] : []];
173
+ });
174
+ });
175
+ return formObject;
176
+ }
177
+ static createForm(formBuilder, sections) {
178
+ return formBuilder.group(this.initialFormValue(sections));
179
+ }
180
+ constructor(formBuilder) {
181
+ this.formBuilder = formBuilder;
182
+ this.spxSearch = new EventEmitter();
183
+ this.typeAutocomplete = SpxInputTypeEnum.autocomplete;
184
+ this.typeFloat = SpxInputTypeEnum.float;
185
+ this.typeNumber = SpxInputTypeEnum.number;
186
+ this.typeRadio = SpxInputTypeEnum.radio;
187
+ this.typeText = SpxInputTypeEnum.text;
188
+ this.typeNumericKeyboard = SpxInputTypeEnum.textNumericKeyboard;
189
+ this.typeOverlay = SpxInputTypeEnum.overlay;
190
+ this.typeOverlayNumber = SpxInputTypeEnum.overlayNumber;
191
+ }
192
+ 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 }); }
193
+ 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
194
+ *ngIf="autocompleteField"
195
+ [spxField]="autocompleteField"
196
+ [spxSuggestions]="this.spxSuggestions[autocompleteField.key]"
197
+ [spxValuePair]="$any(this.spxFormGroup.get(autocompleteField.key)).value"
198
+ [txtOptions]="'Options'"
199
+ [txtQuery]="'Query'"
200
+ [txtSubmit]="'Save'"
201
+ (spxCancel)="onAutocompleteCancel()"
202
+ (spxSearch)="onAutocompleteSearch($event)"
203
+ (spxSubmit)="onAutocompleteSave($event)">
204
+ </spx-autocomplete-search>
205
+ <spx-form-section
206
+ *ngFor="let spxSection of spxSections; let spxSectionIndex = index;"
207
+ [spxShowTitle]="!spxSection.showTitle || spxSection.showTitle()"
208
+ [spxIndex]="spxSectionIndex + 1"
209
+ [spxTitle]="spxSection.title ? spxSection.title() : undefined">
210
+ <ng-container *ngFor="let spxField of spxSection.fields; let spxFieldIndex = index;">
211
+ <ng-container *ngIf="spxField.show === undefined || spxField.show()">
212
+ <spx-input
213
+ *ngIf="spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard"
214
+ [formControl]="$any(this.spxFormGroup.get(spxField.key))"
215
+ [spxAutofocus]="spxField.autofocus ? spxField.autofocus() : false"
216
+ [spxCapitalize]="spxField.capitalize ? spxField.capitalize() : false"
217
+ [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | capitalize"
218
+ [spxPattern]="spxField.type() === typeNumericKeyboard ? '\\d*' : undefined"
219
+ [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
220
+ [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
221
+ [spxShowSearch]="spxField.type() === typeAutocomplete"
222
+ [spxShowHelp]="false"
223
+ [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
224
+ [spxStep]="spxField.step ? spxField.step() : undefined"
225
+ [spxType]="spxField.type()"
226
+ [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)"
227
+ [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
228
+ (spxBlur)="onBlur(spxField)"
229
+ (spxSearch)="onSearch(spxField)">
230
+ </spx-input>
231
+
232
+ <spx-input
233
+ *ngIf="spxField.type() === typeRadio"
234
+ [formControl]="$any(this.spxFormGroup.get(spxField.key))"
235
+ [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | capitalize"
236
+ [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
237
+ [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
238
+ [spxShowHelp]="false"
239
+ [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
240
+ [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
241
+ [spxType]="typeRadio"
242
+ [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)">
243
+ </spx-input>
244
+ </ng-container>
245
+ </ng-container>
246
+ </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", "spxValuePair"], 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"] }] }); }
247
+ }
248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxFormViewComponent, decorators: [{
249
+ type: Component,
250
+ args: [{
251
+ selector: 'spx-form-view',
252
+ standalone: true,
253
+ imports: [
254
+ FormsModule,
255
+ ReactiveFormsModule,
256
+ JsonPipe,
257
+ NgIf,
258
+ NgFor,
259
+ SpxAutocompleteSearchComponent,
260
+ SpxCapitalizePipe,
261
+ SpxFormSectionComponent,
262
+ SpxInputComponent,
263
+ ],
264
+ template: `<spx-autocomplete-search
265
+ *ngIf="autocompleteField"
266
+ [spxField]="autocompleteField"
267
+ [spxSuggestions]="this.spxSuggestions[autocompleteField.key]"
268
+ [spxValuePair]="$any(this.spxFormGroup.get(autocompleteField.key)).value"
269
+ [txtOptions]="'Options'"
270
+ [txtQuery]="'Query'"
271
+ [txtSubmit]="'Save'"
272
+ (spxCancel)="onAutocompleteCancel()"
273
+ (spxSearch)="onAutocompleteSearch($event)"
274
+ (spxSubmit)="onAutocompleteSave($event)">
275
+ </spx-autocomplete-search>
276
+ <spx-form-section
277
+ *ngFor="let spxSection of spxSections; let spxSectionIndex = index;"
278
+ [spxShowTitle]="!spxSection.showTitle || spxSection.showTitle()"
279
+ [spxIndex]="spxSectionIndex + 1"
280
+ [spxTitle]="spxSection.title ? spxSection.title() : undefined">
281
+ <ng-container *ngFor="let spxField of spxSection.fields; let spxFieldIndex = index;">
282
+ <ng-container *ngIf="spxField.show === undefined || spxField.show()">
283
+ <spx-input
284
+ *ngIf="spxField.type() === typeOverlay || spxField.type() === typeOverlayNumber || spxField.type() === typeFloat || spxField.type() === typeNumber || spxField.type() === typeText || spxField.type() === typeAutocomplete || spxField.type() === typeNumericKeyboard"
285
+ [formControl]="$any(this.spxFormGroup.get(spxField.key))"
286
+ [spxAutofocus]="spxField.autofocus ? spxField.autofocus() : false"
287
+ [spxCapitalize]="spxField.capitalize ? spxField.capitalize() : false"
288
+ [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | capitalize"
289
+ [spxPattern]="spxField.type() === typeNumericKeyboard ? '\\d*' : undefined"
290
+ [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
291
+ [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
292
+ [spxShowSearch]="spxField.type() === typeAutocomplete"
293
+ [spxShowHelp]="false"
294
+ [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
295
+ [spxStep]="spxField.step ? spxField.step() : undefined"
296
+ [spxType]="spxField.type()"
297
+ [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)"
298
+ [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
299
+ (spxBlur)="onBlur(spxField)"
300
+ (spxSearch)="onSearch(spxField)">
301
+ </spx-input>
302
+
303
+ <spx-input
304
+ *ngIf="spxField.type() === typeRadio"
305
+ [formControl]="$any(this.spxFormGroup.get(spxField.key))"
306
+ [spxLabel]="(spxField.label ? spxField.label() : spxField.key) | capitalize"
307
+ [spxReadonly]="spxField.readonly ? spxField.readonly() : false"
308
+ [spxRequired]="hasRequiredField(this.spxFormGroup.get(spxField.key)!)"
309
+ [spxShowHelp]="false"
310
+ [spxShowValidationMessages]="this.spxFormGroup.get(spxField.key)! && this.spxFormGroup.get(spxField.key)!.errors && this.spxFormGroup.get(spxField.key)!.touched"
311
+ [spxSuggestions]="spxField.suggestionsFixed ? spxField.suggestionsFixed() : this.spxSuggestions[spxField.key]"
312
+ [spxType]="typeRadio"
313
+ [spxValidators]="getRawValidators(this.spxFormGroup.get(spxField.key)!)">
314
+ </spx-input>
315
+ </ng-container>
316
+ </ng-container>
317
+ </spx-form-section>`,
318
+ }]
319
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { spxFormGroup: [{
320
+ type: Input
321
+ }], spxSections: [{
322
+ type: Input
323
+ }], spxSuggestions: [{
324
+ type: Input
325
+ }], spxSearch: [{
326
+ type: Output
327
+ }] } });
328
+
329
+ /**
330
+ * Generated bundle index. Do not edit.
331
+ */
332
+
333
+ export { SpxFormViewComponent };
334
+ //# 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 @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","<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 [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 <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;AAoCzC,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;QAxCpC,IAAc,CAAA,cAAA,GAAwB,EAAE,CAAC;AAMxC,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;AACzD,QAAA,IAAA,CAAA,SAAS,GAAoC,IAAI,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