@softpak/components 0.0.0-beta.1 → 0.0.0-beta.100

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 (89) hide show
  1. package/esm2022/spx-alert/spx-alert.component.mjs +9 -4
  2. package/esm2022/spx-button/spx-button.component.mjs +46 -36
  3. package/esm2022/spx-change-details/public-api.mjs +2 -0
  4. package/esm2022/spx-change-details/softpak-components-spx-change-details.mjs +5 -0
  5. package/esm2022/spx-change-details/spx-change-details-value.interface.mjs +2 -0
  6. package/esm2022/spx-change-details/spx-change-details.component.mjs +118 -0
  7. package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +5 -4
  8. package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +5 -4
  9. package/esm2022/spx-check-digit/spx-check-digit.component.mjs +6 -4
  10. package/esm2022/spx-form-section/spx-form-section.component.mjs +7 -7
  11. package/esm2022/spx-form-view/public-api.mjs +4 -0
  12. package/esm2022/spx-form-view/softpak-components-spx-form-view.mjs +5 -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 +163 -0
  16. package/esm2022/spx-inputs/public-api.mjs +2 -1
  17. package/esm2022/spx-inputs/spx-dropdown.component.mjs +98 -0
  18. package/esm2022/spx-inputs/spx-input-box.component.mjs +71 -57
  19. package/esm2022/spx-inputs/spx-input-text.component.mjs +29 -33
  20. package/esm2022/spx-inputs/spx-input-type.enum.mjs +14 -0
  21. package/esm2022/spx-inputs/spx-input.component.mjs +53 -42
  22. package/esm2022/spx-navigation/spx-home-tile.component.mjs +47 -12
  23. package/esm2022/spx-navigation/spx-home-tiles.component.mjs +3 -5
  24. package/esm2022/spx-navigation/spx-navigation-item.interface.mjs +1 -1
  25. package/esm2022/spx-navigation/spx-navigation.component.mjs +11 -5
  26. package/esm2022/spx-number-check/public-api.mjs +2 -0
  27. package/esm2022/spx-number-check/softpak-components-spx-number-check.mjs +5 -0
  28. package/esm2022/spx-number-check/spx-number-check.component.mjs +262 -0
  29. package/esm2022/spx-progress-bar/spx-progress-bar.component.mjs +3 -3
  30. package/esm2022/spx-spinner/spx-spinner.component.mjs +5 -5
  31. package/esm2022/spx-suggestion/spx-suggestion.component.mjs +10 -6
  32. package/esm2022/spx-toaster/src/spx-toaster.component.mjs +33 -21
  33. package/fesm2022/softpak-components-spx-alert.mjs +8 -3
  34. package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
  35. package/fesm2022/softpak-components-spx-button.mjs +45 -35
  36. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  37. package/fesm2022/softpak-components-spx-change-details.mjs +125 -0
  38. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -0
  39. package/fesm2022/softpak-components-spx-channel-selection.mjs +7 -5
  40. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  41. package/fesm2022/softpak-components-spx-check-digit.mjs +5 -3
  42. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  43. package/fesm2022/softpak-components-spx-form-section.mjs +6 -6
  44. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  45. package/fesm2022/softpak-components-spx-form-view.mjs +170 -0
  46. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -0
  47. package/fesm2022/softpak-components-spx-inputs.mjs +254 -127
  48. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  49. package/fesm2022/softpak-components-spx-navigation.mjs +57 -19
  50. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  51. package/fesm2022/softpak-components-spx-number-check.mjs +269 -0
  52. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -0
  53. package/fesm2022/softpak-components-spx-progress-bar.mjs +2 -2
  54. package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
  55. package/fesm2022/softpak-components-spx-spinner.mjs +4 -4
  56. package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
  57. package/fesm2022/softpak-components-spx-suggestion.mjs +9 -5
  58. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  59. package/fesm2022/softpak-components-spx-toaster.mjs +32 -20
  60. package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
  61. package/package.json +29 -11
  62. package/spx-button/spx-button.component.d.ts +4 -0
  63. package/spx-change-details/index.d.ts +5 -0
  64. package/spx-change-details/public-api.d.ts +1 -0
  65. package/spx-change-details/spx-change-details-value.interface.d.ts +7 -0
  66. package/spx-change-details/spx-change-details.component.d.ts +40 -0
  67. package/spx-channel-selection/src/spx-channel-selection.component.d.ts +2 -1
  68. package/spx-channel-selection/src/spx-company-selection.component.d.ts +2 -1
  69. package/spx-check-digit/spx-check-digit.component.d.ts +3 -0
  70. package/spx-form-view/index.d.ts +5 -0
  71. package/spx-form-view/public-api.d.ts +3 -0
  72. package/spx-form-view/spx-form-field.interface.d.ts +16 -0
  73. package/spx-form-view/spx-form-section.interface.d.ts +9 -0
  74. package/spx-form-view/spx-form-view.component.d.ts +27 -0
  75. package/spx-inputs/public-api.d.ts +1 -0
  76. package/spx-inputs/spx-dropdown.component.d.ts +18 -0
  77. package/spx-inputs/spx-input-box.component.d.ts +9 -5
  78. package/spx-inputs/spx-input-text.component.d.ts +2 -1
  79. package/spx-inputs/spx-input-type.enum.d.ts +12 -0
  80. package/spx-inputs/spx-input.component.d.ts +4 -3
  81. package/spx-navigation/spx-home-tile.component.d.ts +6 -1
  82. package/spx-navigation/spx-navigation-item.interface.d.ts +2 -0
  83. package/spx-navigation/spx-navigation.component.d.ts +4 -1
  84. package/spx-number-check/index.d.ts +5 -0
  85. package/spx-number-check/public-api.d.ts +1 -0
  86. package/spx-number-check/spx-number-check.component.d.ts +48 -0
  87. package/spx-suggestion/spx-suggestion.component.d.ts +1 -0
  88. package/spx-toaster/src/spx-toaster.component.d.ts +1 -1
  89. package/tailwind.css +1 -1
@@ -1,54 +1,41 @@
1
- import { NgIf, NgFor } from '@angular/common';
1
+ import { NgIf, NgFor, JsonPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { EventEmitter, Component, Input, Output, HostListener } from '@angular/core';
3
+ import { EventEmitter, Component, Input, Output, HostListener, ViewChild } from '@angular/core';
4
4
  import { SpxButtonComponent } from '@softpak/components/spx-button';
5
5
  import * as i1 from '@fortawesome/angular-fontawesome';
6
6
  import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
7
- import { faEdit, faSearch, faQuestion, faTimes } from '@fortawesome/free-solid-svg-icons';
7
+ import { faEdit } from '@fortawesome/free-solid-svg-icons/faEdit';
8
+ import { faQuestion } from '@fortawesome/free-solid-svg-icons/faQuestion';
9
+ import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch';
10
+ import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes';
11
+ import { fromEvent } from 'rxjs';
8
12
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
9
13
  import { SpxSuggestionComponent } from '@softpak/components/spx-suggestion';
10
14
  import { DateTime } from 'luxon';
11
15
 
12
16
  class SpxInputBoxComponent {
13
- constructor() {
14
- this.faEdit = faEdit;
15
- this.faSearch = faSearch;
16
- this.faQuestion = faQuestion;
17
- this.faTimes = faTimes;
18
- this.spxReadonly = false;
19
- this.spxShowClear = true;
20
- this.spxClear = new EventEmitter();
21
- this.spxSearchOutput = new EventEmitter();
22
- this.spxFocus = new EventEmitter();
23
- this.spxFocusOut = new EventEmitter();
24
- this.spxEdit = new EventEmitter();
25
- this.spxHelp = new EventEmitter();
26
- this.spxFocused = false;
27
- }
28
- // @Listen('focusout', { capture: true })
29
- // handleFocusOut() {
30
- // this.spxFocused = false;
31
- // this.spxFocusOut.emit();
32
- // }
33
- // @Listen('click', { target: 'window' })
34
- // handleWindowClick(ev) {
35
- // if (ev.composedPath().includes(this.el)) {
36
- // if (!this.spxFocused) {
37
- // this.spxFocused = true;
38
- // this.spxFocus.emit();
39
- // }
40
- // } else {
41
- // this.spxFocused = false;
42
- // }
43
- // }
44
- async spxSetFocus() {
17
+ handleFocusIn(ev) {
45
18
  this.spxFocused = true;
46
19
  }
20
+ handleFocusOut(ev) {
21
+ console.log('focusout', ev.composedPath());
22
+ this.spxFocusOut.emit();
23
+ }
24
+ handleWindowClick(ev) {
25
+ if (ev.composedPath().includes(this.elRef.nativeElement)) {
26
+ if (!this.spxFocused) {
27
+ this.spxFocus.emit();
28
+ }
29
+ }
30
+ else {
31
+ this.spxFocused = false;
32
+ }
33
+ }
47
34
  onClear() {
48
35
  this.spxClear.emit();
49
36
  }
50
37
  onSearch() {
51
- this.spxSearchOutput.emit();
38
+ this.spxSearch.emit();
52
39
  }
53
40
  onEdit() {
54
41
  this.spxEdit.emit();
@@ -56,8 +43,25 @@ class SpxInputBoxComponent {
56
43
  onHelp() {
57
44
  this.spxHelp.emit();
58
45
  }
59
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
60
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputBoxComponent, isStandalone: true, selector: "spx-input-box", inputs: { spxLabel: "spxLabel", spxRequired: "spxRequired", spxReadonly: "spxReadonly", spxShowHelp: "spxShowHelp", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowEdit: "spxShowEdit", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxValue: "spxValue", spxFocused: "spxFocused" }, outputs: { spxClear: "spxClear", spxSearchOutput: "spxSearchOutput", spxFocus: "spxFocus", spxFocusOut: "spxFocusOut", spxEdit: "spxEdit", spxHelp: "spxHelp" }, ngImport: i0, template: `<div class="flex rounded w-full"
46
+ constructor(elRef) {
47
+ this.elRef = elRef;
48
+ this.faEdit = faEdit;
49
+ this.faSearch = faSearch;
50
+ this.faQuestion = faQuestion;
51
+ this.faTimes = faTimes;
52
+ // @Element() el: HTMLElement;
53
+ this.spxFocused = false;
54
+ this.spxReadonly = false;
55
+ this.spxShowClear = true;
56
+ this.spxClear = new EventEmitter();
57
+ this.spxSearch = new EventEmitter();
58
+ this.spxFocus = new EventEmitter();
59
+ this.spxFocusOut = new EventEmitter();
60
+ this.spxEdit = new EventEmitter();
61
+ this.spxHelp = new EventEmitter();
62
+ }
63
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputBoxComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
64
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputBoxComponent, isStandalone: true, selector: "spx-input-box", inputs: { spxFocused: "spxFocused", spxLabel: "spxLabel", spxRequired: "spxRequired", spxReadonly: "spxReadonly", spxShowHelp: "spxShowHelp", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowEdit: "spxShowEdit", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxValue: "spxValue" }, outputs: { spxClear: "spxClear", spxSearch: "spxSearch", spxFocus: "spxFocus", spxFocusOut: "spxFocusOut", spxEdit: "spxEdit", spxHelp: "spxHelp" }, host: { listeners: { "focusout": "handleFocusOut($event)", "document:click": "handleWindowClick($event)" } }, ngImport: i0, template: `<div class="flex rounded w-full gap-3"
61
65
  [class.rounded-none]="this.spxShowValidationMessages"
62
66
  [class.rounded-t]="this.spxShowValidationMessages"
63
67
  [class.outline-none]="this.spxFocused && !this.spxReadonly"
@@ -78,33 +82,34 @@ class SpxInputBoxComponent {
78
82
  </div>
79
83
  <ng-content select="[controls]"></ng-content>
80
84
  </div>
81
- <div class="flex-none p-0.5 gap-3">
85
+ <div class="flex flex-none gap-1 p-1">
82
86
  <spx-button
83
87
  *ngIf="this.spxShowEdit"
84
88
  (spxClick)="onEdit()"
85
89
  [spxFullHeight]="true"
86
90
  [spxSize]="'xl'"
87
- [spxTabIndex]="-1"
88
91
  [spxType]="'button'">
89
- <fa-icon [icon]="faEdit" class="block h-4 w-4 text-xl"></fa-icon>
92
+ <fa-icon [icon]="faEdit" class="block text-xl"></fa-icon>
90
93
  </spx-button>
91
94
  <spx-button
92
95
  *ngIf="this.spxShowHelp"
93
96
  (spxClick)="onHelp()"
94
97
  [spxFullHeight]="true"
98
+ [spxDisabled]="this.spxReadonly"
95
99
  [spxSize]="'xl'"
96
100
  [spxTabIndex]="-1"
97
101
  [spxType]="'button'">
98
- <fa-icon [icon]="faQuestion" class="block h-4 w-4 text-xl"></fa-icon>
102
+ <fa-icon [icon]="faQuestion" class="block text-xl"></fa-icon>
99
103
  </spx-button>
100
104
  <spx-button
101
105
  *ngIf="this.spxShowSearch"
102
106
  (spxClick)="onSearch()"
103
107
  [spxFullHeight]="true"
108
+ [spxDisabled]="this.spxReadonly"
104
109
  [spxSize]="'xl'"
105
110
  [spxTabIndex]="-1"
106
111
  [spxType]="'button'">
107
- <fa-icon [icon]="faSearch" class="block h-4 w-4 text-xl"></fa-icon>
112
+ <fa-icon [icon]="faSearch" class="block text-xl"></fa-icon>
108
113
  </spx-button>
109
114
  <spx-button
110
115
  *ngIf="this.spxShowClear"
@@ -114,11 +119,11 @@ class SpxInputBoxComponent {
114
119
  [spxSize]="'xl'"
115
120
  [spxTabIndex]="-1"
116
121
  [spxType]="'button'">
117
- <fa-icon [icon]="faTimes" class="block h-4 w-4 text-xl"></fa-icon>
122
+ <fa-icon [icon]="faTimes" class="block text-xl"></fa-icon>
118
123
  </spx-button>
119
124
  </div>
120
125
  </div>
121
- <div class="bg-red-600 rounded-b text-white p-3">
126
+ <div *ngIf="this.spxShowValidationMessages" class="bg-red-600 rounded-b text-white p-3">
122
127
  <ng-content select="[validation-messages]"></ng-content>
123
128
  </div>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }] }); }
124
129
  }
@@ -132,7 +137,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
132
137
  SpxButtonComponent,
133
138
  FontAwesomeModule,
134
139
  ],
135
- template: `<div class="flex rounded w-full"
140
+ template: `<div class="flex rounded w-full gap-3"
136
141
  [class.rounded-none]="this.spxShowValidationMessages"
137
142
  [class.rounded-t]="this.spxShowValidationMessages"
138
143
  [class.outline-none]="this.spxFocused && !this.spxReadonly"
@@ -153,33 +158,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
153
158
  </div>
154
159
  <ng-content select="[controls]"></ng-content>
155
160
  </div>
156
- <div class="flex-none p-0.5 gap-3">
161
+ <div class="flex flex-none gap-1 p-1">
157
162
  <spx-button
158
163
  *ngIf="this.spxShowEdit"
159
164
  (spxClick)="onEdit()"
160
165
  [spxFullHeight]="true"
161
166
  [spxSize]="'xl'"
162
- [spxTabIndex]="-1"
163
167
  [spxType]="'button'">
164
- <fa-icon [icon]="faEdit" class="block h-4 w-4 text-xl"></fa-icon>
168
+ <fa-icon [icon]="faEdit" class="block text-xl"></fa-icon>
165
169
  </spx-button>
166
170
  <spx-button
167
171
  *ngIf="this.spxShowHelp"
168
172
  (spxClick)="onHelp()"
169
173
  [spxFullHeight]="true"
174
+ [spxDisabled]="this.spxReadonly"
170
175
  [spxSize]="'xl'"
171
176
  [spxTabIndex]="-1"
172
177
  [spxType]="'button'">
173
- <fa-icon [icon]="faQuestion" class="block h-4 w-4 text-xl"></fa-icon>
178
+ <fa-icon [icon]="faQuestion" class="block text-xl"></fa-icon>
174
179
  </spx-button>
175
180
  <spx-button
176
181
  *ngIf="this.spxShowSearch"
177
182
  (spxClick)="onSearch()"
178
183
  [spxFullHeight]="true"
184
+ [spxDisabled]="this.spxReadonly"
179
185
  [spxSize]="'xl'"
180
186
  [spxTabIndex]="-1"
181
187
  [spxType]="'button'">
182
- <fa-icon [icon]="faSearch" class="block h-4 w-4 text-xl"></fa-icon>
188
+ <fa-icon [icon]="faSearch" class="block text-xl"></fa-icon>
183
189
  </spx-button>
184
190
  <spx-button
185
191
  *ngIf="this.spxShowClear"
@@ -189,15 +195,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
189
195
  [spxSize]="'xl'"
190
196
  [spxTabIndex]="-1"
191
197
  [spxType]="'button'">
192
- <fa-icon [icon]="faTimes" class="block h-4 w-4 text-xl"></fa-icon>
198
+ <fa-icon [icon]="faTimes" class="block text-xl"></fa-icon>
193
199
  </spx-button>
194
200
  </div>
195
201
  </div>
196
- <div class="bg-red-600 rounded-b text-white p-3">
202
+ <div *ngIf="this.spxShowValidationMessages" class="bg-red-600 rounded-b text-white p-3">
197
203
  <ng-content select="[validation-messages]"></ng-content>
198
204
  </div>`,
199
205
  }]
200
- }], propDecorators: { spxLabel: [{
206
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { spxFocused: [{
207
+ type: Input
208
+ }], spxLabel: [{
201
209
  type: Input
202
210
  }], spxRequired: [{
203
211
  type: Input
@@ -219,7 +227,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
219
227
  type: Input
220
228
  }], spxClear: [{
221
229
  type: Output
222
- }], spxSearchOutput: [{
230
+ }], spxSearch: [{
223
231
  type: Output
224
232
  }], spxFocus: [{
225
233
  type: Output
@@ -229,8 +237,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
229
237
  type: Output
230
238
  }], spxHelp: [{
231
239
  type: Output
232
- }], spxFocused: [{
240
+ }], handleFocusIn: [{
241
+ type: HostListener,
242
+ args: ['focusout', ["$event"]]
243
+ }], handleFocusOut: [{
244
+ type: HostListener,
245
+ args: ['focusout', ["$event"]]
246
+ }], handleWindowClick: [{
247
+ type: HostListener,
248
+ args: ['document:click', ["$event"]]
249
+ }] } });
250
+
251
+ class SpxDropdownComponent {
252
+ constructor() {
253
+ this.focusPosition = 0;
254
+ this.spxSuggestions = [];
255
+ this.spxSelect = new EventEmitter();
256
+ }
257
+ ngOnInit() {
258
+ this.listenToKeyUp();
259
+ }
260
+ ngOnChanges(changes) {
261
+ this.focusPosition = 0;
262
+ }
263
+ ngOnDestroy() {
264
+ this.subscriptionKeyUp?.unsubscribe();
265
+ }
266
+ handleSuggestionClick(valuePair) {
267
+ console.log('handleSuggestionClick', valuePair);
268
+ this.select(valuePair);
269
+ }
270
+ listenToKeyUp() {
271
+ this.subscriptionKeyUp = fromEvent(window, 'keyup').subscribe((event) => {
272
+ if (event.key === 'ArrowUp' && this.focusPosition > 0) {
273
+ this.focusPosition = this.focusPosition - 1;
274
+ event.preventDefault();
275
+ }
276
+ if (event.key === 'ArrowDown' && this.focusPosition < this.spxSuggestions.length - 1) {
277
+ this.focusPosition = this.focusPosition + 1;
278
+ event.preventDefault();
279
+ }
280
+ if (event.key === 'Enter' && this.spxSuggestions.length > 0) {
281
+ this.select(this.spxSuggestions.at(this.focusPosition));
282
+ event.preventDefault();
283
+ }
284
+ });
285
+ }
286
+ select(valuePair) {
287
+ this.focusPosition = 0;
288
+ this.spxSelect.emit(valuePair);
289
+ }
290
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
291
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxDropdownComponent, isStandalone: true, selector: "spx-dropdown", inputs: { spxSuggestions: "spxSuggestions" }, outputs: { spxSelect: "spxSelect" }, usesOnChanges: true, ngImport: i0, template: `<div class="relative text-black">
292
+ {{ this.spxSuggestions | json }}
293
+ <div
294
+ class="absolute bg-gray-100 left-0 right-0 z-20">
295
+ <button
296
+ *ngFor="let valuePair of this.spxSuggestions; let i = index"
297
+ class="text-black block w-full p-2 border border-gray-200 rounded-lg shadow hover:bg-gray-200 flex items-center text-left"
298
+ [class.bg-gray-100]="i === this.focusPosition"
299
+ [class.bg-white]="i !== this.focusPosition"
300
+ (click)="this.handleSuggestionClick(valuePair)"
301
+ [attr.tabindex]="-1"
302
+ [type]="'button'">
303
+ <div class="flex-1 p-1 font-bold text-lg">{{valuePair?.description}}</div>
304
+ <spx-button (spxClick)="this.handleSuggestionClick(valuePair)" [spxType]="'button'" [spxTabIndex]="-1"]>Select</spx-button>
305
+ </button>
306
+ </div>
307
+ </div>`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: JsonPipe, name: "json" }] }); }
308
+ }
309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxDropdownComponent, decorators: [{
310
+ type: Component,
311
+ args: [{
312
+ selector: 'spx-dropdown',
313
+ standalone: true,
314
+ imports: [
315
+ NgIf,
316
+ NgFor,
317
+ SpxButtonComponent,
318
+ JsonPipe,
319
+ ],
320
+ template: `<div class="relative text-black">
321
+ {{ this.spxSuggestions | json }}
322
+ <div
323
+ class="absolute bg-gray-100 left-0 right-0 z-20">
324
+ <button
325
+ *ngFor="let valuePair of this.spxSuggestions; let i = index"
326
+ class="text-black block w-full p-2 border border-gray-200 rounded-lg shadow hover:bg-gray-200 flex items-center text-left"
327
+ [class.bg-gray-100]="i === this.focusPosition"
328
+ [class.bg-white]="i !== this.focusPosition"
329
+ (click)="this.handleSuggestionClick(valuePair)"
330
+ [attr.tabindex]="-1"
331
+ [type]="'button'">
332
+ <div class="flex-1 p-1 font-bold text-lg">{{valuePair?.description}}</div>
333
+ <spx-button (spxClick)="this.handleSuggestionClick(valuePair)" [spxType]="'button'" [spxTabIndex]="-1"]>Select</spx-button>
334
+ </button>
335
+ </div>
336
+ </div>`,
337
+ }]
338
+ }], propDecorators: { spxSuggestions: [{
233
339
  type: Input
340
+ }], spxSelect: [{
341
+ type: Output
234
342
  }] } });
235
343
 
236
344
  class SpxInputTextComponent {
@@ -247,7 +355,7 @@ class SpxInputTextComponent {
247
355
  this.spxWasInternalUpdate = false;
248
356
  }
249
357
  async spxSetFocus() {
250
- // this.elInput.focus();
358
+ this.inputRef?.nativeElement?.focus();
251
359
  }
252
360
  componentDidLoad() {
253
361
  if (this.spxAutofocus) {
@@ -279,9 +387,13 @@ class SpxInputTextComponent {
279
387
  this.spxFocused = true;
280
388
  }
281
389
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
282
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputTextComponent, isStandalone: true, selector: "spx-input-text", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxPattern: "spxPattern", spxSuggestions: "spxSuggestions", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxCapitalize: "spxCapitalize", spxFocused: "spxFocused", spxType: "spxType", value: "value", spxWasInternalUpdate: "spxWasInternalUpdate" }, outputs: { spxBlurFromChild: "spxBlurFromChild", spxChange: "spxChange", spxFocus: "spxFocus" }, ngImport: i0, template: `<div class="relative">
390
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputTextComponent, isStandalone: true, selector: "spx-input-text", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxPattern: "spxPattern", spxSuggestions: "spxSuggestions", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxCapitalize: "spxCapitalize", spxFocused: "spxFocused", spxType: "spxType", value: "value", spxWasInternalUpdate: "spxWasInternalUpdate" }, outputs: { spxBlurFromChild: "spxBlurFromChild", spxChange: "spxChange", spxFocus: "spxFocus" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: `<div class="relative text-black">
283
391
  <input
392
+ #input
284
393
  class="font-bold text-lg w-full outline-none"
394
+ [class.bg-white]="!this.spxReadonly"
395
+ [class.bg-gray-300]="this.spxReadonly"
396
+ [class.cursor-not-allowed]="this.spxReadonly"
285
397
  [class.uppercase]="this.spxCapitalize"
286
398
  [attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
287
399
  [attr.disabled]="this.spxReadonly ? this.spxReadonly : undefined"
@@ -289,27 +401,18 @@ class SpxInputTextComponent {
289
401
  [attr.pattern]="this.spxPattern ? this.spxPattern : undefined"
290
402
  [attr.name]="this.spxName"
291
403
  [attr.type]="this.spxType"
292
- [attr.value]="this.value?.description ? this.value?.description : this.value?.value"
404
+ [value]="this.value?.description ? this.value?.description : this.value?.value"
293
405
  (blur)="this.handleBlur()"
294
406
  (keyUp)="this.handleKeyUp()"
295
407
  (focus)="this.handleFocus()"
296
408
  (input)="this.handleDescriptionInput($event)"
297
409
  />
298
410
  <span *ngIf="this.value?.description && this.value?.value && this.value?.description?.valueOf() !== this.value?.value?.valueOf()">{{this.value?.value}}</span>
299
- <div
411
+ <spx-dropdown
300
412
  *ngIf="this.spxFocused && (this.spxType === 'overlay' || this.spxType === 'overlaynumber')"
301
- class="absolute bg-gray-100 left-0 right-0 z-20">
302
- <div
303
- *ngFor="let valuePair of this.spxSuggestions"
304
- class="text-black block w-full p-2 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 flex items-center"
305
- (click)="this.handleSuggestionClick($event)"
306
- [attr.tabindex]="0"
307
- >
308
- <div class="flex-1 p-1 font-bold text-lg">{{valuePair?.description}}</div>
309
- <spx-button spxType="button">Select</spx-button>
310
- </div>
311
- </div>
312
- </div>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }] }); }
413
+ [spxSuggestions]="this.spxSuggestions" (spxSelect)="this.handleSuggestionClick($event)">
414
+ </spx-dropdown>
415
+ </div>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxDropdownComponent, selector: "spx-dropdown", inputs: ["spxSuggestions"], outputs: ["spxSelect"] }] }); }
313
416
  }
314
417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputTextComponent, decorators: [{
315
418
  type: Component,
@@ -320,10 +423,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
320
423
  NgIf,
321
424
  NgFor,
322
425
  SpxButtonComponent,
426
+ SpxDropdownComponent,
427
+ JsonPipe,
323
428
  ],
324
- template: `<div class="relative">
429
+ template: `<div class="relative text-black">
325
430
  <input
431
+ #input
326
432
  class="font-bold text-lg w-full outline-none"
433
+ [class.bg-white]="!this.spxReadonly"
434
+ [class.bg-gray-300]="this.spxReadonly"
435
+ [class.cursor-not-allowed]="this.spxReadonly"
327
436
  [class.uppercase]="this.spxCapitalize"
328
437
  [attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
329
438
  [attr.disabled]="this.spxReadonly ? this.spxReadonly : undefined"
@@ -331,26 +440,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
331
440
  [attr.pattern]="this.spxPattern ? this.spxPattern : undefined"
332
441
  [attr.name]="this.spxName"
333
442
  [attr.type]="this.spxType"
334
- [attr.value]="this.value?.description ? this.value?.description : this.value?.value"
443
+ [value]="this.value?.description ? this.value?.description : this.value?.value"
335
444
  (blur)="this.handleBlur()"
336
445
  (keyUp)="this.handleKeyUp()"
337
446
  (focus)="this.handleFocus()"
338
447
  (input)="this.handleDescriptionInput($event)"
339
448
  />
340
449
  <span *ngIf="this.value?.description && this.value?.value && this.value?.description?.valueOf() !== this.value?.value?.valueOf()">{{this.value?.value}}</span>
341
- <div
450
+ <spx-dropdown
342
451
  *ngIf="this.spxFocused && (this.spxType === 'overlay' || this.spxType === 'overlaynumber')"
343
- class="absolute bg-gray-100 left-0 right-0 z-20">
344
- <div
345
- *ngFor="let valuePair of this.spxSuggestions"
346
- class="text-black block w-full p-2 bg-white border border-gray-200 rounded-lg shadow hover:bg-gray-100 flex items-center"
347
- (click)="this.handleSuggestionClick($event)"
348
- [attr.tabindex]="0"
349
- >
350
- <div class="flex-1 p-1 font-bold text-lg">{{valuePair?.description}}</div>
351
- <spx-button spxType="button">Select</spx-button>
352
- </div>
353
- </div>
452
+ [spxSuggestions]="this.spxSuggestions" (spxSelect)="this.handleSuggestionClick($event)">
453
+ </spx-dropdown>
354
454
  </div>`,
355
455
  }]
356
456
  }], propDecorators: { spxName: [{
@@ -383,6 +483,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
383
483
  type: Output
384
484
  }], spxWasInternalUpdate: [{
385
485
  type: Input
486
+ }], inputRef: [{
487
+ type: ViewChild,
488
+ args: ['input', { static: true }]
386
489
  }] } });
387
490
 
388
491
  class SpxInputDateComponent {
@@ -962,6 +1065,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
962
1065
  type: Output
963
1066
  }] } });
964
1067
 
1068
+ var SpxInputTypeEnum;
1069
+ (function (SpxInputTypeEnum) {
1070
+ SpxInputTypeEnum["autocomplete"] = "autocomplete";
1071
+ SpxInputTypeEnum["date"] = "date";
1072
+ SpxInputTypeEnum["float"] = "float";
1073
+ SpxInputTypeEnum["overlay"] = "overlay";
1074
+ SpxInputTypeEnum["overlayNumber"] = "overlaynumber";
1075
+ SpxInputTypeEnum["radio"] = "radio";
1076
+ SpxInputTypeEnum["number"] = "number";
1077
+ SpxInputTypeEnum["password"] = "password";
1078
+ SpxInputTypeEnum["text"] = "text";
1079
+ SpxInputTypeEnum["textNumericKeyboard"] = "textNumericKeyboard";
1080
+ })(SpxInputTypeEnum || (SpxInputTypeEnum = {}));
1081
+
965
1082
  class SpxInputComponent {
966
1083
  constructor() {
967
1084
  this.spxLabel = 'label';
@@ -977,7 +1094,7 @@ class SpxInputComponent {
977
1094
  this.spxShowSearch = false;
978
1095
  this.spxShowValidationMessages = false;
979
1096
  this.spxSuggestions = [];
980
- this.spxType = 'text';
1097
+ this.spxType = SpxInputTypeEnum.text;
981
1098
  this.spxCapitalize = false;
982
1099
  this.spxBlur = new EventEmitter();
983
1100
  this.spxClear = new EventEmitter();
@@ -990,9 +1107,6 @@ class SpxInputComponent {
990
1107
  this.onChange = () => { };
991
1108
  this.onTouched = () => { };
992
1109
  }
993
- async spxSetFocus() {
994
- this.passFocusToControl();
995
- }
996
1110
  handleBlur() {
997
1111
  this.spxBlur.emit();
998
1112
  }
@@ -1001,6 +1115,7 @@ class SpxInputComponent {
1001
1115
  this.spxChange.emit(this.value);
1002
1116
  }
1003
1117
  handleClear() {
1118
+ this.spxClear.emit();
1004
1119
  this.spxFocused = true;
1005
1120
  this.passFocusToControl();
1006
1121
  this.value = {
@@ -1010,6 +1125,7 @@ class SpxInputComponent {
1010
1125
  this.spxChange.emit(this.value);
1011
1126
  }
1012
1127
  handleFocus() {
1128
+ this.spxFocus.emit();
1013
1129
  this.spxFocused = true;
1014
1130
  // this.elBox.spxSetFocus();
1015
1131
  }
@@ -1024,15 +1140,24 @@ class SpxInputComponent {
1024
1140
  this.spxFocused = false;
1025
1141
  }
1026
1142
  handleEdit() {
1143
+ this.spxEdit.emit();
1027
1144
  this.spxFocused = true;
1028
1145
  }
1029
1146
  handleHelp() {
1147
+ this.spxHelp.emit();
1030
1148
  this.spxFocused = true;
1031
1149
  }
1032
1150
  passFocusToControl() {
1151
+ switch (this.spxType) {
1152
+ case SpxInputTypeEnum.autocomplete:
1153
+ case SpxInputTypeEnum.text:
1154
+ case SpxInputTypeEnum.overlayNumber:
1155
+ this.textInput?.spxSetFocus();
1156
+ break;
1157
+ }
1033
1158
  }
1034
1159
  writeValue(value) {
1035
- this.value = this.lastValue = value == null ? '' : value;
1160
+ this.value = this.lastValue = value;
1036
1161
  }
1037
1162
  handleChangeEvent(value) {
1038
1163
  if (value !== this.lastValue) {
@@ -1049,9 +1174,6 @@ class SpxInputComponent {
1049
1174
  registerOnTouched(fn) {
1050
1175
  this.onTouched = fn;
1051
1176
  }
1052
- setDisabledState(isDisabled) {
1053
- this.spxReadonly = isDisabled;
1054
- }
1055
1177
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1056
1178
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputComponent, isStandalone: true, selector: "spx-input", inputs: { spxLabel: "spxLabel", spxMax: "spxMax", spxMin: "spxMin", spxName: "spxName", spxReadonly: "spxReadonly", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxPattern: "spxPattern", spxRequired: "spxRequired", spxSelectMonth: "spxSelectMonth", spxSelectDay: "spxSelectDay", spxShowEdit: "spxShowEdit", spxShowHelp: "spxShowHelp", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxStep: "spxStep", spxSuggestions: "spxSuggestions", spxType: "spxType", spxValidators: "spxValidators", value: "value", spxCapitalize: "spxCapitalize", spxFocused: "spxFocused" }, outputs: { spxBlur: "spxBlur", spxClear: "spxClear", spxChange: "spxChange", spxFocus: "spxFocus", spxEdit: "spxEdit", spxHelp: "spxHelp", spxSearch: "spxSearch" }, host: { listeners: { "spxChange": "handleChangeEvent($event)", "focusout": "_handleBlurEvent()" } }, providers: [
1057
1179
  {
@@ -1059,7 +1181,8 @@ class SpxInputComponent {
1059
1181
  useExisting: SpxInputComponent,
1060
1182
  multi: true
1061
1183
  }
1062
- ], ngImport: i0, template: `<spx-input-box
1184
+ ], viewQueries: [{ propertyName: "textInput", first: true, predicate: SpxInputTextComponent, descendants: true }], ngImport: i0, template: `<spx-input-box
1185
+ [spxFocused]="this.spxFocused"
1063
1186
  [spxLabel]="this.spxLabel"
1064
1187
  [spxReadonly]="this.spxReadonly"
1065
1188
  [spxRequired]="this.spxRequired"
@@ -1075,10 +1198,13 @@ class SpxInputComponent {
1075
1198
  (spxHelp)="this.handleHelp()"
1076
1199
  (spxFocus)="this.setFocus()"
1077
1200
  (spxFocusOut)="this.setFocusOut()"
1078
- (spxSearchOutput)="this.handleSearch()">
1201
+ (spxSearch)="this.handleSearch()">
1079
1202
  <div controls>
1080
1203
  <spx-input-text
1081
1204
  *ngIf="this.spxType === 'autocomplete' || this.spxType === 'overlay' || this.spxType === 'overlaynumber' || this.spxType === 'text' || this.spxType === 'password'"
1205
+ (spxBlurFromChild)="this.handleBlur()"
1206
+ (spxChange)="this.handleChange($event)"
1207
+ (spxFocus)="this.handleFocus()"
1082
1208
  [spxAutofocus]="this.spxAutofocus"
1083
1209
  [spxCapitalize]="this.spxCapitalize"
1084
1210
  [spxFocused]="this.spxFocused"
@@ -1090,12 +1216,11 @@ class SpxInputComponent {
1090
1216
  [spxType]="this.spxType"
1091
1217
  [spxValidators]="this.spxValidators"
1092
1218
  [value]="this.value"
1093
- (spxBlurFromChild)="this.handleBlur()"
1094
- (spxChange)="this.handleChange($event)"
1095
- (spxFocus)="this.handleFocus()"
1096
1219
  ></spx-input-text>
1097
1220
  <spx-input-date
1098
1221
  *ngIf="this.spxType === 'date'"
1222
+ (spxChange)="this.handleChange($event)"
1223
+ (spxFocus)="this.handleFocus()"
1099
1224
  [spxFocused]="this.spxFocused"
1100
1225
  [spxMax]="this.spxMax"
1101
1226
  [spxMin]="this.spxMin"
@@ -1105,11 +1230,11 @@ class SpxInputComponent {
1105
1230
  [spxSelectMonth]="this.spxSelectMonth"
1106
1231
  [spxValidators]="this.spxValidators"
1107
1232
  [value]="this.value"
1108
- (spxChange)="this.handleChange($event)"
1109
- (spxFocus)="this.handleFocus()"
1110
1233
  ></spx-input-date>
1111
1234
  <spx-input-float
1112
1235
  *ngIf="this.spxType === 'float'"
1236
+ (spxChange)="this.handleChange($event)"
1237
+ (spxFocus)="this.handleFocus()"
1113
1238
  [spxAutofocus]="this.spxAutofocus"
1114
1239
  [spxFocused]="this.spxFocused"
1115
1240
  [spxName]="this.spxName"
@@ -1117,38 +1242,36 @@ class SpxInputComponent {
1117
1242
  [spxStep]="this.spxStep"
1118
1243
  [spxValidators]="this.spxValidators"
1119
1244
  [value]="this.value"
1120
- (spxChange)="this.handleChange($event)"
1121
- (spxFocus)="this.handleFocus()"
1122
1245
  ></spx-input-float>
1123
1246
  <spx-input-number
1124
1247
  *ngIf="this.spxType === 'number'"
1125
- [spxStep]="this.spxStep"
1248
+ (spxChange)="this.handleChange($event)"
1249
+ (spxFocus)="this.handleFocus()"
1126
1250
  [spxAutofocus]="this.spxAutofocus"
1127
1251
  [spxFocused]="this.spxFocused"
1128
1252
  [spxInputMode]="this.spxInputMode"
1129
1253
  [spxName]="this.spxName"
1254
+ [spxReadonly]="this.spxReadonly"
1255
+ [spxStep]="this.spxStep"
1130
1256
  [spxValidators]="this.spxValidators"
1131
- (spxChange)="this.handleChange($event)"
1132
- (spxFocus)="this.handleFocus()"
1133
- (spxReadonly)="this.spxReadonly"
1134
1257
  [value]="this.value"
1135
1258
  ></spx-input-number>
1136
1259
  <spx-input-radio
1137
1260
  *ngIf="this.spxType === 'radio'"
1261
+ (spxChange)="this.handleChange($event)"
1262
+ (spxFocus)="this.handleFocus()"
1138
1263
  [spxFocused]="this.spxFocused"
1139
1264
  [spxName]="this.spxName"
1265
+ [spxReadonly]="this.spxReadonly"
1140
1266
  [spxSuggestions]="this.spxSuggestions"
1141
1267
  [spxValidators]="this.spxValidators"
1142
- (spxChange)="this.handleChange($event)"
1143
- (spxFocus)="this.handleFocus()"
1144
- (spxReadonly)="this.spxReadonly"
1145
1268
  [value]="this.value"
1146
1269
  ></spx-input-radio>
1147
1270
  </div>
1148
1271
  <div validation-messages>
1149
1272
  <ng-content></ng-content>
1150
1273
  </div>
1151
- </spx-input-box>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxInputBoxComponent, selector: "spx-input-box", inputs: ["spxLabel", "spxRequired", "spxReadonly", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowEdit", "spxShowSearch", "spxShowValidationMessages", "spxValue", "spxFocused"], outputs: ["spxClear", "spxSearchOutput", "spxFocus", "spxFocusOut", "spxEdit", "spxHelp"] }, { kind: "component", type: SpxInputDateComponent, selector: "spx-input-date", inputs: ["spxMax", "spxMin", "spxName", "spxReadonly", "spxValidators", "spxFocused", "spxSelectMonth", "spxSelectDay", "value", "spxLastKeyPressed", "spxSelectStep", "spxInternalValue", "spxSuggestions", "spxWasInternalUpdate"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputFloatComponent, selector: "spx-input-float", inputs: ["spxName", "spxAutofocus", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value", "spxWasInternalUpdate", "tick"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputNumberComponent, selector: "spx-input-number", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputRadioComponent, selector: "spx-input-radio", inputs: ["spxName", "spxValidators", "spxFocused", "spxReadonly", "spxSuggestions", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputTextComponent, selector: "spx-input-text", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "spxFocused", "spxType", "value", "spxWasInternalUpdate"], outputs: ["spxBlurFromChild", "spxChange", "spxFocus"] }] }); }
1274
+ </spx-input-box>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxInputBoxComponent, selector: "spx-input-box", inputs: ["spxFocused", "spxLabel", "spxRequired", "spxReadonly", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowEdit", "spxShowSearch", "spxShowValidationMessages", "spxValue"], outputs: ["spxClear", "spxSearch", "spxFocus", "spxFocusOut", "spxEdit", "spxHelp"] }, { kind: "component", type: SpxInputDateComponent, selector: "spx-input-date", inputs: ["spxMax", "spxMin", "spxName", "spxReadonly", "spxValidators", "spxFocused", "spxSelectMonth", "spxSelectDay", "value", "spxLastKeyPressed", "spxSelectStep", "spxInternalValue", "spxSuggestions", "spxWasInternalUpdate"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputFloatComponent, selector: "spx-input-float", inputs: ["spxName", "spxAutofocus", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value", "spxWasInternalUpdate", "tick"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputNumberComponent, selector: "spx-input-number", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputRadioComponent, selector: "spx-input-radio", inputs: ["spxName", "spxValidators", "spxFocused", "spxReadonly", "spxSuggestions", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputTextComponent, selector: "spx-input-text", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "spxFocused", "spxType", "value", "spxWasInternalUpdate"], outputs: ["spxBlurFromChild", "spxChange", "spxFocus"] }] }); }
1152
1275
  }
1153
1276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputComponent, decorators: [{
1154
1277
  type: Component,
@@ -1175,6 +1298,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1175
1298
  }
1176
1299
  ],
1177
1300
  template: `<spx-input-box
1301
+ [spxFocused]="this.spxFocused"
1178
1302
  [spxLabel]="this.spxLabel"
1179
1303
  [spxReadonly]="this.spxReadonly"
1180
1304
  [spxRequired]="this.spxRequired"
@@ -1190,10 +1314,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1190
1314
  (spxHelp)="this.handleHelp()"
1191
1315
  (spxFocus)="this.setFocus()"
1192
1316
  (spxFocusOut)="this.setFocusOut()"
1193
- (spxSearchOutput)="this.handleSearch()">
1317
+ (spxSearch)="this.handleSearch()">
1194
1318
  <div controls>
1195
1319
  <spx-input-text
1196
1320
  *ngIf="this.spxType === 'autocomplete' || this.spxType === 'overlay' || this.spxType === 'overlaynumber' || this.spxType === 'text' || this.spxType === 'password'"
1321
+ (spxBlurFromChild)="this.handleBlur()"
1322
+ (spxChange)="this.handleChange($event)"
1323
+ (spxFocus)="this.handleFocus()"
1197
1324
  [spxAutofocus]="this.spxAutofocus"
1198
1325
  [spxCapitalize]="this.spxCapitalize"
1199
1326
  [spxFocused]="this.spxFocused"
@@ -1205,12 +1332,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1205
1332
  [spxType]="this.spxType"
1206
1333
  [spxValidators]="this.spxValidators"
1207
1334
  [value]="this.value"
1208
- (spxBlurFromChild)="this.handleBlur()"
1209
- (spxChange)="this.handleChange($event)"
1210
- (spxFocus)="this.handleFocus()"
1211
1335
  ></spx-input-text>
1212
1336
  <spx-input-date
1213
1337
  *ngIf="this.spxType === 'date'"
1338
+ (spxChange)="this.handleChange($event)"
1339
+ (spxFocus)="this.handleFocus()"
1214
1340
  [spxFocused]="this.spxFocused"
1215
1341
  [spxMax]="this.spxMax"
1216
1342
  [spxMin]="this.spxMin"
@@ -1220,11 +1346,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1220
1346
  [spxSelectMonth]="this.spxSelectMonth"
1221
1347
  [spxValidators]="this.spxValidators"
1222
1348
  [value]="this.value"
1223
- (spxChange)="this.handleChange($event)"
1224
- (spxFocus)="this.handleFocus()"
1225
1349
  ></spx-input-date>
1226
1350
  <spx-input-float
1227
1351
  *ngIf="this.spxType === 'float'"
1352
+ (spxChange)="this.handleChange($event)"
1353
+ (spxFocus)="this.handleFocus()"
1228
1354
  [spxAutofocus]="this.spxAutofocus"
1229
1355
  [spxFocused]="this.spxFocused"
1230
1356
  [spxName]="this.spxName"
@@ -1232,31 +1358,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1232
1358
  [spxStep]="this.spxStep"
1233
1359
  [spxValidators]="this.spxValidators"
1234
1360
  [value]="this.value"
1235
- (spxChange)="this.handleChange($event)"
1236
- (spxFocus)="this.handleFocus()"
1237
1361
  ></spx-input-float>
1238
1362
  <spx-input-number
1239
1363
  *ngIf="this.spxType === 'number'"
1240
- [spxStep]="this.spxStep"
1364
+ (spxChange)="this.handleChange($event)"
1365
+ (spxFocus)="this.handleFocus()"
1241
1366
  [spxAutofocus]="this.spxAutofocus"
1242
1367
  [spxFocused]="this.spxFocused"
1243
1368
  [spxInputMode]="this.spxInputMode"
1244
1369
  [spxName]="this.spxName"
1370
+ [spxReadonly]="this.spxReadonly"
1371
+ [spxStep]="this.spxStep"
1245
1372
  [spxValidators]="this.spxValidators"
1246
- (spxChange)="this.handleChange($event)"
1247
- (spxFocus)="this.handleFocus()"
1248
- (spxReadonly)="this.spxReadonly"
1249
1373
  [value]="this.value"
1250
1374
  ></spx-input-number>
1251
1375
  <spx-input-radio
1252
1376
  *ngIf="this.spxType === 'radio'"
1377
+ (spxChange)="this.handleChange($event)"
1378
+ (spxFocus)="this.handleFocus()"
1253
1379
  [spxFocused]="this.spxFocused"
1254
1380
  [spxName]="this.spxName"
1381
+ [spxReadonly]="this.spxReadonly"
1255
1382
  [spxSuggestions]="this.spxSuggestions"
1256
1383
  [spxValidators]="this.spxValidators"
1257
- (spxChange)="this.handleChange($event)"
1258
- (spxFocus)="this.handleFocus()"
1259
- (spxReadonly)="this.spxReadonly"
1260
1384
  [value]="this.value"
1261
1385
  ></spx-input-radio>
1262
1386
  </div>
@@ -1325,6 +1449,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1325
1449
  type: Output
1326
1450
  }], spxSearch: [{
1327
1451
  type: Output
1452
+ }], textInput: [{
1453
+ type: ViewChild,
1454
+ args: [SpxInputTextComponent]
1328
1455
  }], spxFocused: [{
1329
1456
  type: Input
1330
1457
  }], _handleBlurEvent: [{
@@ -1336,5 +1463,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1336
1463
  * Generated bundle index. Do not edit.
1337
1464
  */
1338
1465
 
1339
- export { SpxInputBoxComponent, SpxInputComponent, SpxInputTextComponent };
1466
+ export { SpxInputBoxComponent, SpxInputComponent, SpxInputTextComponent, SpxInputTypeEnum };
1340
1467
  //# sourceMappingURL=softpak-components-spx-inputs.mjs.map