@softpak/components 0.0.0-beta.98 → 0.0.0
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.
- package/esm2022/spx-app-expiry/public-api.mjs +6 -0
- package/esm2022/spx-app-expiry/softpak-components-spx-app-expiry.mjs +5 -0
- package/esm2022/spx-app-expiry/spx-app-expiry.component.mjs +90 -0
- package/esm2022/spx-app-expiry/spx-app-expiry.interface.mjs +2 -0
- package/esm2022/spx-app-expiry/spx-check-expiry-final-warning.interface.mjs +5 -0
- package/esm2022/spx-app-expiry/spx-check-expiry-happened.interface.mjs +5 -0
- package/esm2022/spx-app-expiry/spx-check-expiry-warning.interface.mjs +5 -0
- package/esm2022/spx-button/spx-button.component.mjs +18 -5
- package/esm2022/spx-change-details/spx-change-details.component.mjs +94 -13
- package/esm2022/spx-channel-selection/public-api.mjs +1 -3
- package/esm2022/spx-channel-selection/src/spx-welcome.component.mjs +112 -19
- package/esm2022/spx-check-digit/spx-check-digit.component.mjs +14 -7
- package/esm2022/spx-form-section/spx-form-section.component.mjs +11 -11
- package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +119 -0
- package/esm2022/spx-form-view/spx-form-field.interface.mjs +1 -1
- package/esm2022/spx-form-view/spx-form-view.component.mjs +119 -14
- package/esm2022/spx-inputs/spx-dropdown.component.mjs +7 -8
- package/esm2022/spx-inputs/spx-input-box.component.mjs +32 -19
- package/esm2022/spx-inputs/spx-input-date.component.mjs +1 -1
- package/esm2022/spx-inputs/spx-input-float.component.mjs +10 -5
- package/esm2022/spx-inputs/spx-input-number.component.mjs +10 -5
- package/esm2022/spx-inputs/spx-input-radio.component.mjs +93 -27
- package/esm2022/spx-inputs/spx-input-text.component.mjs +7 -4
- package/esm2022/spx-inputs/spx-input-type.enum.mjs +3 -1
- package/esm2022/spx-inputs/spx-input.component.mjs +34 -8
- package/esm2022/spx-navigation/spx-home-tile.component.mjs +3 -3
- package/esm2022/spx-navigation/spx-home-tiles.component.mjs +14 -5
- package/esm2022/spx-navigation/spx-navigation.component.mjs +6 -3
- package/esm2022/spx-number-check/spx-number-check.component.mjs +1 -4
- package/esm2022/spx-suggestion/spx-suggestion.component.mjs +30 -16
- package/esm2022/spx-update/src/spx-update-info.component.mjs +1 -1
- package/esm2022/spx-validation/public-api.mjs +1 -2
- package/esm2022/spx-validation/spx-validate-control.component.mjs +8 -3
- package/fesm2022/softpak-components-spx-app-expiry.mjs +107 -0
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-button.mjs +17 -4
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +94 -13
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +109 -97
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +13 -6
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +10 -10
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +229 -14
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +186 -68
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +19 -7
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +0 -3
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +29 -15
- package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +1 -1
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +8 -28
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +23 -16
- package/spx-app-expiry/index.d.ts +5 -0
- package/spx-app-expiry/public-api.d.ts +5 -0
- package/spx-app-expiry/spx-app-expiry.component.d.ts +21 -0
- package/spx-app-expiry/spx-app-expiry.interface.d.ts +7 -0
- package/spx-app-expiry/spx-check-expiry-final-warning.interface.d.ts +2 -0
- package/spx-app-expiry/spx-check-expiry-happened.interface.d.ts +2 -0
- package/spx-app-expiry/spx-check-expiry-warning.interface.d.ts +2 -0
- package/spx-button/spx-button.component.d.ts +4 -2
- package/spx-change-details/spx-change-details.component.d.ts +27 -4
- package/spx-channel-selection/public-api.d.ts +0 -2
- package/spx-channel-selection/src/spx-welcome.component.d.ts +37 -8
- package/spx-check-digit/spx-check-digit.component.d.ts +3 -1
- package/spx-form-view/spx-autocomplete-search.component.d.ts +43 -0
- package/spx-form-view/spx-form-field.interface.d.ts +2 -0
- package/spx-form-view/spx-form-view.component.d.ts +23 -2
- package/spx-inputs/spx-input-box.component.d.ts +8 -5
- package/spx-inputs/spx-input-float.component.d.ts +3 -2
- package/spx-inputs/spx-input-number.component.d.ts +3 -2
- package/spx-inputs/spx-input-radio.component.d.ts +13 -5
- package/spx-inputs/spx-input-text.component.d.ts +1 -1
- package/spx-inputs/spx-input-type.enum.d.ts +2 -0
- package/spx-inputs/spx-input.component.d.ts +9 -2
- package/spx-navigation/spx-home-tiles.component.d.ts +2 -1
- package/spx-navigation/spx-navigation.component.d.ts +2 -1
- package/spx-suggestion/spx-suggestion.component.d.ts +3 -2
- package/spx-validation/public-api.d.ts +0 -1
- package/spx-validation/spx-validate-control.component.d.ts +1 -1
- package/tailwind.css +1 -1
- package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +0 -41
- package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +0 -49
- package/esm2022/spx-validation/spx-validation.module.mjs +0 -28
- package/spx-channel-selection/src/spx-channel-selection.component.d.ts +0 -12
- package/spx-channel-selection/src/spx-company-selection.component.d.ts +0 -13
- package/spx-validation/spx-validation.module.d.ts +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NgIf, NgFor
|
|
1
|
+
import { NgIf, NgFor } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { EventEmitter, Component, Input, Output, HostListener, ViewChild } from '@angular/core';
|
|
4
4
|
import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
@@ -12,23 +12,25 @@ import { fromEvent } from 'rxjs';
|
|
|
12
12
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
13
13
|
import { SpxSuggestionComponent } from '@softpak/components/spx-suggestion';
|
|
14
14
|
import { DateTime } from 'luxon';
|
|
15
|
+
import { valuePairToValue } from '@softpak/components/spx-helpers';
|
|
15
16
|
|
|
16
17
|
class SpxInputBoxComponent {
|
|
17
18
|
handleFocusIn(ev) {
|
|
18
|
-
this.
|
|
19
|
+
this.emitFocusIn();
|
|
19
20
|
}
|
|
20
21
|
handleFocusOut(ev) {
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const thisEl = this.elRef.nativeElement;
|
|
23
|
+
const relatedElement = ev.relatedTarget;
|
|
24
|
+
if (!relatedElement || !thisEl.contains(relatedElement)) {
|
|
25
|
+
this.emitFocusOut();
|
|
26
|
+
}
|
|
23
27
|
}
|
|
24
28
|
handleWindowClick(ev) {
|
|
25
29
|
if (ev.composedPath().includes(this.elRef.nativeElement)) {
|
|
26
|
-
|
|
27
|
-
this.spxFocus.emit();
|
|
28
|
-
}
|
|
30
|
+
this.emitFocusIn();
|
|
29
31
|
}
|
|
30
32
|
else {
|
|
31
|
-
this.
|
|
33
|
+
this.emitFocusOut();
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
onClear() {
|
|
@@ -49,10 +51,10 @@ class SpxInputBoxComponent {
|
|
|
49
51
|
this.faSearch = faSearch;
|
|
50
52
|
this.faQuestion = faQuestion;
|
|
51
53
|
this.faTimes = faTimes;
|
|
52
|
-
// @Element() el: HTMLElement;
|
|
53
54
|
this.spxFocused = false;
|
|
54
55
|
this.spxReadonly = false;
|
|
55
56
|
this.spxShowClear = true;
|
|
57
|
+
this.spxShowLabel = true;
|
|
56
58
|
this.spxClear = new EventEmitter();
|
|
57
59
|
this.spxSearch = new EventEmitter();
|
|
58
60
|
this.spxFocus = new EventEmitter();
|
|
@@ -60,8 +62,18 @@ class SpxInputBoxComponent {
|
|
|
60
62
|
this.spxEdit = new EventEmitter();
|
|
61
63
|
this.spxHelp = new EventEmitter();
|
|
62
64
|
}
|
|
65
|
+
emitFocusIn() {
|
|
66
|
+
if (!this.spxFocused) {
|
|
67
|
+
this.spxFocus.emit();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
emitFocusOut() {
|
|
71
|
+
if (this.spxFocused) {
|
|
72
|
+
this.spxFocusOut.emit();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
63
75
|
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",
|
|
76
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputBoxComponent, isStandalone: true, selector: "spx-input-box", inputs: { spxCompact: "spxCompact", spxFocused: "spxFocused", spxLabel: "spxLabel", spxReadonly: "spxReadonly", spxRequired: "spxRequired", spxShowClear: "spxShowClear", spxShowEdit: "spxShowEdit", spxShowHelp: "spxShowHelp", spxShowLabel: "spxShowLabel", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxValue: "spxValue" }, outputs: { spxClear: "spxClear", spxSearch: "spxSearch", spxFocus: "spxFocus", spxFocusOut: "spxFocusOut", spxEdit: "spxEdit", spxHelp: "spxHelp" }, host: { listeners: { "focusin": "handleFocusIn($event)", "focusout": "handleFocusOut($event)", "document:click": "handleWindowClick($event)" } }, ngImport: i0, template: `<div class="flex rounded w-full gap-3"
|
|
65
77
|
[class.rounded-none]="this.spxShowValidationMessages"
|
|
66
78
|
[class.rounded-t]="this.spxShowValidationMessages"
|
|
67
79
|
[class.outline-none]="this.spxFocused && !this.spxReadonly"
|
|
@@ -75,7 +87,7 @@ class SpxInputBoxComponent {
|
|
|
75
87
|
[class.p-0]="this.spxCompact"
|
|
76
88
|
[class.flex]="this.spxCompact"
|
|
77
89
|
[class.items-center]="this.spxCompact">
|
|
78
|
-
<div class="text-sm mb-1 text-gray-800"
|
|
90
|
+
<div *ngIf="this.spxShowLabel" class="font-bold text-sm mb-1 text-gray-800"
|
|
79
91
|
[class.mb-0]="this.spxCompact"
|
|
80
92
|
[class.px-3]="this.spxCompact">
|
|
81
93
|
{{this.spxLabel}} <span *ngIf="spxRequired" class="text-red-800">*</span>
|
|
@@ -151,7 +163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
151
163
|
[class.p-0]="this.spxCompact"
|
|
152
164
|
[class.flex]="this.spxCompact"
|
|
153
165
|
[class.items-center]="this.spxCompact">
|
|
154
|
-
<div class="text-sm mb-1 text-gray-800"
|
|
166
|
+
<div *ngIf="this.spxShowLabel" class="font-bold text-sm mb-1 text-gray-800"
|
|
155
167
|
[class.mb-0]="this.spxCompact"
|
|
156
168
|
[class.px-3]="this.spxCompact">
|
|
157
169
|
{{this.spxLabel}} <span *ngIf="spxRequired" class="text-red-800">*</span>
|
|
@@ -203,22 +215,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
203
215
|
<ng-content select="[validation-messages]"></ng-content>
|
|
204
216
|
</div>`,
|
|
205
217
|
}]
|
|
206
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: {
|
|
218
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { spxCompact: [{
|
|
207
219
|
type: Input
|
|
208
|
-
}],
|
|
220
|
+
}], spxFocused: [{
|
|
209
221
|
type: Input
|
|
210
|
-
}],
|
|
222
|
+
}], spxLabel: [{
|
|
211
223
|
type: Input
|
|
212
224
|
}], spxReadonly: [{
|
|
213
225
|
type: Input
|
|
214
|
-
}],
|
|
215
|
-
type: Input
|
|
216
|
-
}], spxCompact: [{
|
|
226
|
+
}], spxRequired: [{
|
|
217
227
|
type: Input
|
|
218
228
|
}], spxShowClear: [{
|
|
219
229
|
type: Input
|
|
220
230
|
}], spxShowEdit: [{
|
|
221
231
|
type: Input
|
|
232
|
+
}], spxShowHelp: [{
|
|
233
|
+
type: Input
|
|
234
|
+
}], spxShowLabel: [{
|
|
235
|
+
type: Input
|
|
222
236
|
}], spxShowSearch: [{
|
|
223
237
|
type: Input
|
|
224
238
|
}], spxShowValidationMessages: [{
|
|
@@ -239,7 +253,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
239
253
|
type: Output
|
|
240
254
|
}], handleFocusIn: [{
|
|
241
255
|
type: HostListener,
|
|
242
|
-
args: ['
|
|
256
|
+
args: ['focusin', ["$event"]]
|
|
243
257
|
}], handleFocusOut: [{
|
|
244
258
|
type: HostListener,
|
|
245
259
|
args: ['focusout', ["$event"]]
|
|
@@ -264,7 +278,6 @@ class SpxDropdownComponent {
|
|
|
264
278
|
this.subscriptionKeyUp?.unsubscribe();
|
|
265
279
|
}
|
|
266
280
|
handleSuggestionClick(valuePair) {
|
|
267
|
-
console.log('handleSuggestionClick', valuePair);
|
|
268
281
|
this.select(valuePair);
|
|
269
282
|
}
|
|
270
283
|
listenToKeyUp() {
|
|
@@ -298,10 +311,10 @@ class SpxDropdownComponent {
|
|
|
298
311
|
[class.bg-white]="i !== this.focusPosition"
|
|
299
312
|
(click)="this.handleSuggestionClick(valuePair)"
|
|
300
313
|
[attr.tabindex]="-1"
|
|
301
|
-
[type]="'button'">
|
|
314
|
+
[attr.type]="'button'">
|
|
302
315
|
<div class="flex-1 p-1 font-bold text-lg">{{valuePair?.description}}</div>
|
|
303
|
-
|
|
304
|
-
</button>
|
|
316
|
+
<spx-button (spxClick)="this.handleSuggestionClick(valuePair)" [spxType]="'button'" [spxTabIndex]="-1">Select</spx-button>
|
|
317
|
+
</button>
|
|
305
318
|
</div>
|
|
306
319
|
</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"] }] }); }
|
|
307
320
|
}
|
|
@@ -325,10 +338,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
325
338
|
[class.bg-white]="i !== this.focusPosition"
|
|
326
339
|
(click)="this.handleSuggestionClick(valuePair)"
|
|
327
340
|
[attr.tabindex]="-1"
|
|
328
|
-
[type]="'button'">
|
|
341
|
+
[attr.type]="'button'">
|
|
329
342
|
<div class="flex-1 p-1 font-bold text-lg">{{valuePair?.description}}</div>
|
|
330
|
-
|
|
331
|
-
</button>
|
|
343
|
+
<spx-button (spxClick)="this.handleSuggestionClick(valuePair)" [spxType]="'button'" [spxTabIndex]="-1">Select</spx-button>
|
|
344
|
+
</button>
|
|
332
345
|
</div>
|
|
333
346
|
</div>`,
|
|
334
347
|
}]
|
|
@@ -351,7 +364,7 @@ class SpxInputTextComponent {
|
|
|
351
364
|
this.spxFocus = new EventEmitter();
|
|
352
365
|
this.spxWasInternalUpdate = false;
|
|
353
366
|
}
|
|
354
|
-
|
|
367
|
+
spxSetFocus() {
|
|
355
368
|
this.inputRef?.nativeElement?.focus();
|
|
356
369
|
}
|
|
357
370
|
componentDidLoad() {
|
|
@@ -388,6 +401,8 @@ class SpxInputTextComponent {
|
|
|
388
401
|
<input
|
|
389
402
|
#input
|
|
390
403
|
class="font-bold text-lg w-full outline-none"
|
|
404
|
+
autocomplete="off"
|
|
405
|
+
spellcheck="false"
|
|
391
406
|
[class.bg-white]="!this.spxReadonly"
|
|
392
407
|
[class.bg-gray-300]="this.spxReadonly"
|
|
393
408
|
[class.cursor-not-allowed]="this.spxReadonly"
|
|
@@ -421,12 +436,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
421
436
|
NgFor,
|
|
422
437
|
SpxButtonComponent,
|
|
423
438
|
SpxDropdownComponent,
|
|
424
|
-
JsonPipe,
|
|
425
439
|
],
|
|
426
440
|
template: `<div class="relative text-black">
|
|
427
441
|
<input
|
|
428
442
|
#input
|
|
429
443
|
class="font-bold text-lg w-full outline-none"
|
|
444
|
+
autocomplete="off"
|
|
445
|
+
spellcheck="false"
|
|
430
446
|
[class.bg-white]="!this.spxReadonly"
|
|
431
447
|
[class.bg-gray-300]="this.spxReadonly"
|
|
432
448
|
[class.cursor-not-allowed]="this.spxReadonly"
|
|
@@ -687,7 +703,7 @@ class SpxInputDateComponent {
|
|
|
687
703
|
<spx-suggestion
|
|
688
704
|
*ngFor="let valuePair of spxSuggestions[spxSelectStep]"
|
|
689
705
|
(click)="this.handleSuggestionClick(valuePair.value)">{{valuePair?.description}}</spx-suggestion>
|
|
690
|
-
</div>`, isInline: true, styles: [":host{display:block}.spx-input-date__input{background-color:transparent;border:1px solid #979797;border-radius:4px;color:var(--spx-input--color, rgba(0, 0, 0, .9));box-sizing:border-box;font-size:16px;margin-right:10px;padding:6px;text-align:center;width:100%}.spx-input-date__input:active{transform:scale(.95)}.spx-input-date__input:focus{border:var(--spx-input-box--focus--border, 1px solid rgb(115, 168, 210));border-radius:4px;outline:none}.spx-input-date__control-label{align-items:center;color:#000000b3;display:inline-grid;font-size:13px;letter-spacing:1px}.spx-input-date__input::-webkit-outer-spin-button,.spx-input-date__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.spx-input-date__input[type=number]{-moz-appearance:textfield}.spx-input-date__suggestions,.spx-input-date__controls{display:grid;grid-gap:8px;grid-template-columns:repeat(4,1fr);margin-top:8px}\n"], 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: SpxSuggestionComponent, selector: "spx-suggestion", inputs: ["spxDisabled", "spxSelected"] }] }); }
|
|
706
|
+
</div>`, isInline: true, styles: [":host{display:block}.spx-input-date__input{background-color:transparent;border:1px solid #979797;border-radius:4px;color:var(--spx-input--color, rgba(0, 0, 0, .9));box-sizing:border-box;font-size:16px;margin-right:10px;padding:6px;text-align:center;width:100%}.spx-input-date__input:active{transform:scale(.95)}.spx-input-date__input:focus{border:var(--spx-input-box--focus--border, 1px solid rgb(115, 168, 210));border-radius:4px;outline:none}.spx-input-date__control-label{align-items:center;color:#000000b3;display:inline-grid;font-size:13px;letter-spacing:1px}.spx-input-date__input::-webkit-outer-spin-button,.spx-input-date__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.spx-input-date__input[type=number]{-moz-appearance:textfield}.spx-input-date__suggestions,.spx-input-date__controls{display:grid;grid-gap:8px;grid-template-columns:repeat(4,1fr);margin-top:8px}\n"], 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: SpxSuggestionComponent, selector: "spx-suggestion", inputs: ["spxDisabled", "spxFocused", "spxSelected", "spxTabbable"] }] }); }
|
|
691
707
|
}
|
|
692
708
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputDateComponent, decorators: [{
|
|
693
709
|
type: Component,
|
|
@@ -789,8 +805,8 @@ class SpxInputFloatComponent {
|
|
|
789
805
|
this.spxWasInternalUpdate = false;
|
|
790
806
|
this.tick = {};
|
|
791
807
|
}
|
|
792
|
-
|
|
793
|
-
|
|
808
|
+
spxSetFocus() {
|
|
809
|
+
this.firstInputRef?.nativeElement?.focus();
|
|
794
810
|
}
|
|
795
811
|
// @Watch('value') onValueChanged(newValue: SpxValuePair<any>, _oldValue: SpxValuePair<any>) {
|
|
796
812
|
// this.handleSetValue(newValue);
|
|
@@ -842,8 +858,9 @@ class SpxInputFloatComponent {
|
|
|
842
858
|
return /^[+-]?\d+(\.\d+)?$/.test(value);
|
|
843
859
|
}
|
|
844
860
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputFloatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
845
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputFloatComponent, isStandalone: true, selector: "spx-input-float", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxFocused: "spxFocused", spxStep: "spxStep", value: "value", spxWasInternalUpdate: "spxWasInternalUpdate", tick: "tick" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, ngImport: i0, template: `<div class="flex items-end">
|
|
861
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputFloatComponent, isStandalone: true, selector: "spx-input-float", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxFocused: "spxFocused", spxStep: "spxStep", value: "value", spxWasInternalUpdate: "spxWasInternalUpdate", tick: "tick" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, viewQueries: [{ propertyName: "firstInputRef", first: true, predicate: ["firstInputRef"], descendants: true, static: true }], ngImport: i0, template: `<div class="flex items-end">
|
|
846
862
|
<input
|
|
863
|
+
#firstInputRef
|
|
847
864
|
class="spx-input-float__input"
|
|
848
865
|
[attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
|
|
849
866
|
[attr.disabled]="this.spxReadonly ? this.spxReadonly : undefined"
|
|
@@ -876,6 +893,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
876
893
|
SpxButtonComponent,
|
|
877
894
|
], template: `<div class="flex items-end">
|
|
878
895
|
<input
|
|
896
|
+
#firstInputRef
|
|
879
897
|
class="spx-input-float__input"
|
|
880
898
|
[attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
|
|
881
899
|
[attr.disabled]="this.spxReadonly ? this.spxReadonly : undefined"
|
|
@@ -921,6 +939,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
921
939
|
type: Input
|
|
922
940
|
}], tick: [{
|
|
923
941
|
type: Input
|
|
942
|
+
}], firstInputRef: [{
|
|
943
|
+
type: ViewChild,
|
|
944
|
+
args: ['firstInputRef', { static: true }]
|
|
924
945
|
}] } });
|
|
925
946
|
|
|
926
947
|
class SpxInputNumberComponent {
|
|
@@ -932,8 +953,8 @@ class SpxInputNumberComponent {
|
|
|
932
953
|
this.spxFocus = new EventEmitter();
|
|
933
954
|
this.spxWasInternalUpdate = false;
|
|
934
955
|
}
|
|
935
|
-
|
|
936
|
-
|
|
956
|
+
spxSetFocus() {
|
|
957
|
+
this.inputRef?.nativeElement?.focus();
|
|
937
958
|
}
|
|
938
959
|
componentDidLoad() {
|
|
939
960
|
if (this.spxAutofocus) {
|
|
@@ -952,8 +973,9 @@ class SpxInputNumberComponent {
|
|
|
952
973
|
this.spxChange.emit(this.value);
|
|
953
974
|
}
|
|
954
975
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
955
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputNumberComponent, isStandalone: true, selector: "spx-input-number", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxFocused: "spxFocused", spxStep: "spxStep", value: "value" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, ngImport: i0, template: `<div class="spx-input-number__controls">
|
|
976
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputNumberComponent, isStandalone: true, selector: "spx-input-number", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxFocused: "spxFocused", spxStep: "spxStep", value: "value" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: `<div class="spx-input-number__controls">
|
|
956
977
|
<input
|
|
978
|
+
#input
|
|
957
979
|
class="spx-input-number__input"
|
|
958
980
|
[attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
|
|
959
981
|
[class.spx-input-number--readonly]="this.spxReadonly ? this.spxReadonly : undefined"
|
|
@@ -970,6 +992,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
970
992
|
type: Component,
|
|
971
993
|
args: [{ selector: 'spx-input-number', standalone: true, imports: [], template: `<div class="spx-input-number__controls">
|
|
972
994
|
<input
|
|
995
|
+
#input
|
|
973
996
|
class="spx-input-number__input"
|
|
974
997
|
[attr.autofocus]="this.spxAutofocus ? this.spxAutofocus : undefined"
|
|
975
998
|
[class.spx-input-number--readonly]="this.spxReadonly ? this.spxReadonly : undefined"
|
|
@@ -1001,55 +1024,122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1001
1024
|
type: Output
|
|
1002
1025
|
}], spxFocus: [{
|
|
1003
1026
|
type: Output
|
|
1027
|
+
}], inputRef: [{
|
|
1028
|
+
type: ViewChild,
|
|
1029
|
+
args: ['input', { static: true }]
|
|
1004
1030
|
}] } });
|
|
1005
1031
|
|
|
1006
1032
|
class SpxInputRadioComponent {
|
|
1007
1033
|
constructor() {
|
|
1008
|
-
this.
|
|
1034
|
+
this.focusPosition = 0;
|
|
1035
|
+
this.spxFocused = false;
|
|
1036
|
+
this.spxShowLabel = true;
|
|
1009
1037
|
this.spxReadonly = false;
|
|
1010
1038
|
this.spxSuggestions = [];
|
|
1011
1039
|
this.spxChange = new EventEmitter();
|
|
1012
1040
|
this.spxFocus = new EventEmitter();
|
|
1013
|
-
this.spxWasInternalUpdate = false;
|
|
1014
1041
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1042
|
+
spxFocusIn() {
|
|
1043
|
+
this.listenToKeys();
|
|
1044
|
+
this.determineFocusPosition();
|
|
1017
1045
|
}
|
|
1018
|
-
|
|
1019
|
-
this.
|
|
1020
|
-
this.
|
|
1046
|
+
spxFocusOut() {
|
|
1047
|
+
this.subscriptionKeyDown?.unsubscribe();
|
|
1048
|
+
this.subscriptionKeyUp?.unsubscribe();
|
|
1049
|
+
}
|
|
1050
|
+
ngOnChanges(changes) {
|
|
1051
|
+
if ((changes['spxSuggestions'] && changes['spxSuggestions'].previousValue !== changes['spxSuggestions'].currentValue) ||
|
|
1052
|
+
(changes['value'] && changes['value'].previousValue !== changes['value'].currentValue)) {
|
|
1053
|
+
this.determineFocusPosition();
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
handleSuggestionClick(valuePair) {
|
|
1057
|
+
if (this.spxReadonly) {
|
|
1058
|
+
console.log('spxInputRadio: clicked, but readonly');
|
|
1059
|
+
}
|
|
1060
|
+
else {
|
|
1061
|
+
console.log('spxInputRadio: clicked');
|
|
1062
|
+
this.select(valuePair);
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
determineFocusPosition() {
|
|
1066
|
+
if (this.value && this.spxSuggestions?.length) {
|
|
1067
|
+
const index = this.spxSuggestions.findIndex(valuePair => valuePairToValue(valuePair) === valuePairToValue(this.value));
|
|
1068
|
+
this.focusPosition = index >= 0 ? index : 0;
|
|
1069
|
+
}
|
|
1070
|
+
else {
|
|
1071
|
+
this.focusPosition = 0;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
select(valuePair) {
|
|
1075
|
+
this.focusPosition = 0;
|
|
1076
|
+
this.value = valuePair;
|
|
1077
|
+
this.spxChange.emit(valuePair);
|
|
1078
|
+
}
|
|
1079
|
+
listenToKeys() {
|
|
1080
|
+
this.subscriptionKeyUp = fromEvent(window, 'keyup').subscribe((event) => {
|
|
1081
|
+
if ((event.key === 'ArrowUp' || event.key === 'ArrowLeft') && this.focusPosition > 0) {
|
|
1082
|
+
this.focusPosition = this.focusPosition - 1;
|
|
1083
|
+
this.select(this.spxSuggestions.at(this.focusPosition));
|
|
1084
|
+
event.preventDefault();
|
|
1085
|
+
}
|
|
1086
|
+
if ((event.key === 'ArrowDown' || event.key === 'ArrowRight') && this.focusPosition < this.spxSuggestions.length - 1) {
|
|
1087
|
+
this.focusPosition = this.focusPosition + 1;
|
|
1088
|
+
this.select(this.spxSuggestions.at(this.focusPosition));
|
|
1089
|
+
event.preventDefault();
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
this.subscriptionKeyDown = fromEvent(window, 'keydown').subscribe((event) => {
|
|
1093
|
+
if (event.key === 'ArrowDown' ||
|
|
1094
|
+
event.key === 'ArrowLeft' ||
|
|
1095
|
+
event.key === 'ArrowRight' ||
|
|
1096
|
+
event.key === 'ArrowUp') {
|
|
1097
|
+
event.preventDefault();
|
|
1098
|
+
}
|
|
1099
|
+
});
|
|
1021
1100
|
}
|
|
1022
1101
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1023
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputRadioComponent, isStandalone: true, selector: "spx-input-radio", inputs: { spxName: "spxName", spxValidators: "spxValidators", spxFocused: "spxFocused", spxReadonly: "spxReadonly", spxSuggestions: "spxSuggestions", value: "value" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, ngImport: i0, template: `<div class="
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputRadioComponent, isStandalone: true, selector: "spx-input-radio", inputs: { spxName: "spxName", spxValidators: "spxValidators", spxFocused: "spxFocused", spxShowLabel: "spxShowLabel", spxReadonly: "spxReadonly", spxSuggestions: "spxSuggestions", value: "value" }, outputs: { spxChange: "spxChange", spxFocus: "spxFocus" }, usesOnChanges: true, ngImport: i0, template: `<div class="grid grid-cols-2 gap-2" [class.mt-3]="this.spxShowLabel">
|
|
1103
|
+
<spx-suggestion
|
|
1104
|
+
*ngFor="let valuePair of this.spxSuggestions; let i = index"
|
|
1105
|
+
[spxDisabled]="this.spxReadonly"
|
|
1106
|
+
[spxFocused]="this.spxFocused && i === this.focusPosition"
|
|
1107
|
+
[spxSelected]="this.value?.value === this.valuePair?.value"
|
|
1108
|
+
[spxTabbable]="this.focusPosition === i"
|
|
1109
|
+
(pointerdown)="this.handleSuggestionClick(valuePair)">
|
|
1110
|
+
{{this.valuePair?.description}}
|
|
1111
|
+
</spx-suggestion>
|
|
1112
|
+
</div>`, isInline: true, dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxSuggestionComponent, selector: "spx-suggestion", inputs: ["spxDisabled", "spxFocused", "spxSelected", "spxTabbable"] }] }); }
|
|
1032
1113
|
}
|
|
1033
1114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputRadioComponent, decorators: [{
|
|
1034
1115
|
type: Component,
|
|
1035
|
-
args: [{
|
|
1116
|
+
args: [{
|
|
1117
|
+
selector: 'spx-input-radio',
|
|
1118
|
+
standalone: true,
|
|
1119
|
+
imports: [
|
|
1036
1120
|
NgFor,
|
|
1037
1121
|
SpxSuggestionComponent,
|
|
1038
|
-
],
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1122
|
+
],
|
|
1123
|
+
template: `<div class="grid grid-cols-2 gap-2" [class.mt-3]="this.spxShowLabel">
|
|
1124
|
+
<spx-suggestion
|
|
1125
|
+
*ngFor="let valuePair of this.spxSuggestions; let i = index"
|
|
1126
|
+
[spxDisabled]="this.spxReadonly"
|
|
1127
|
+
[spxFocused]="this.spxFocused && i === this.focusPosition"
|
|
1128
|
+
[spxSelected]="this.value?.value === this.valuePair?.value"
|
|
1129
|
+
[spxTabbable]="this.focusPosition === i"
|
|
1130
|
+
(pointerdown)="this.handleSuggestionClick(valuePair)">
|
|
1131
|
+
{{this.valuePair?.description}}
|
|
1132
|
+
</spx-suggestion>
|
|
1133
|
+
</div>`,
|
|
1134
|
+
}]
|
|
1047
1135
|
}], propDecorators: { spxName: [{
|
|
1048
1136
|
type: Input
|
|
1049
1137
|
}], spxValidators: [{
|
|
1050
1138
|
type: Input
|
|
1051
1139
|
}], spxFocused: [{
|
|
1052
1140
|
type: Input
|
|
1141
|
+
}], spxShowLabel: [{
|
|
1142
|
+
type: Input
|
|
1053
1143
|
}], spxReadonly: [{
|
|
1054
1144
|
type: Input
|
|
1055
1145
|
}], spxSuggestions: [{
|
|
@@ -1065,8 +1155,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1065
1155
|
var SpxInputTypeEnum;
|
|
1066
1156
|
(function (SpxInputTypeEnum) {
|
|
1067
1157
|
SpxInputTypeEnum["autocomplete"] = "autocomplete";
|
|
1158
|
+
SpxInputTypeEnum["button"] = "button";
|
|
1068
1159
|
SpxInputTypeEnum["date"] = "date";
|
|
1069
1160
|
SpxInputTypeEnum["float"] = "float";
|
|
1161
|
+
SpxInputTypeEnum["hidden"] = "hidden";
|
|
1070
1162
|
SpxInputTypeEnum["overlay"] = "overlay";
|
|
1071
1163
|
SpxInputTypeEnum["overlayNumber"] = "overlaynumber";
|
|
1072
1164
|
SpxInputTypeEnum["radio"] = "radio";
|
|
@@ -1086,6 +1178,7 @@ class SpxInputComponent {
|
|
|
1086
1178
|
this.spxSelectDay = true;
|
|
1087
1179
|
this.spxShowEdit = false;
|
|
1088
1180
|
this.spxShowHelp = false;
|
|
1181
|
+
this.spxShowLabel = true;
|
|
1089
1182
|
this.spxCompact = false;
|
|
1090
1183
|
this.spxShowClear = true;
|
|
1091
1184
|
this.spxShowSearch = false;
|
|
@@ -1124,17 +1217,19 @@ class SpxInputComponent {
|
|
|
1124
1217
|
handleFocus() {
|
|
1125
1218
|
this.spxFocus.emit();
|
|
1126
1219
|
this.spxFocused = true;
|
|
1127
|
-
// this.elBox.spxSetFocus();
|
|
1128
1220
|
}
|
|
1129
1221
|
handleSearch() {
|
|
1130
1222
|
this.spxSearch.emit();
|
|
1131
1223
|
}
|
|
1132
|
-
|
|
1224
|
+
setFocusIn() {
|
|
1133
1225
|
this.spxFocused = true;
|
|
1134
1226
|
this.passFocusToControl();
|
|
1135
1227
|
}
|
|
1136
1228
|
setFocusOut() {
|
|
1137
1229
|
this.spxFocused = false;
|
|
1230
|
+
if (this.spxType === SpxInputTypeEnum.radio) {
|
|
1231
|
+
this.radioInput?.spxFocusOut();
|
|
1232
|
+
}
|
|
1138
1233
|
}
|
|
1139
1234
|
handleEdit() {
|
|
1140
1235
|
this.spxEdit.emit();
|
|
@@ -1151,6 +1246,12 @@ class SpxInputComponent {
|
|
|
1151
1246
|
case SpxInputTypeEnum.overlayNumber:
|
|
1152
1247
|
this.textInput?.spxSetFocus();
|
|
1153
1248
|
break;
|
|
1249
|
+
case SpxInputTypeEnum.number:
|
|
1250
|
+
this.numberInput?.spxSetFocus();
|
|
1251
|
+
break;
|
|
1252
|
+
case SpxInputTypeEnum.radio:
|
|
1253
|
+
this.radioInput?.spxFocusIn();
|
|
1254
|
+
break;
|
|
1154
1255
|
}
|
|
1155
1256
|
}
|
|
1156
1257
|
writeValue(value) {
|
|
@@ -1172,13 +1273,13 @@ class SpxInputComponent {
|
|
|
1172
1273
|
this.onTouched = fn;
|
|
1173
1274
|
}
|
|
1174
1275
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1175
|
-
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: [
|
|
1276
|
+
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", spxShowLabel: "spxShowLabel", 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: [
|
|
1176
1277
|
{
|
|
1177
1278
|
provide: NG_VALUE_ACCESSOR,
|
|
1178
1279
|
useExisting: SpxInputComponent,
|
|
1179
1280
|
multi: true
|
|
1180
1281
|
}
|
|
1181
|
-
], viewQueries: [{ propertyName: "textInput", first: true, predicate: SpxInputTextComponent, descendants: true }], ngImport: i0, template: `<spx-input-box
|
|
1282
|
+
], viewQueries: [{ propertyName: "floatInput", first: true, predicate: SpxInputFloatComponent, descendants: true }, { propertyName: "numberInput", first: true, predicate: SpxInputNumberComponent, descendants: true }, { propertyName: "textInput", first: true, predicate: SpxInputTextComponent, descendants: true }, { propertyName: "radioInput", first: true, predicate: SpxInputRadioComponent, descendants: true }], ngImport: i0, template: `<spx-input-box
|
|
1182
1283
|
[spxFocused]="this.spxFocused"
|
|
1183
1284
|
[spxLabel]="this.spxLabel"
|
|
1184
1285
|
[spxReadonly]="this.spxReadonly"
|
|
@@ -1188,12 +1289,13 @@ class SpxInputComponent {
|
|
|
1188
1289
|
[spxCompact]="this.spxCompact"
|
|
1189
1290
|
[spxShowClear]="this.spxShowClear"
|
|
1190
1291
|
[spxShowEdit]="this.spxShowEdit"
|
|
1292
|
+
[spxShowLabel]="this.spxShowLabel"
|
|
1191
1293
|
[spxShowSearch]="this.spxShowSearch ? this.spxShowSearch : this.spxType === 'autocomplete'"
|
|
1192
1294
|
[spxShowValidationMessages]="this.spxShowValidationMessages"
|
|
1193
1295
|
(spxClear)="this.handleClear()"
|
|
1194
1296
|
(spxEdit)="this.handleEdit()"
|
|
1195
1297
|
(spxHelp)="this.handleHelp()"
|
|
1196
|
-
(spxFocus)="this.
|
|
1298
|
+
(spxFocus)="this.setFocusIn()"
|
|
1197
1299
|
(spxFocusOut)="this.setFocusOut()"
|
|
1198
1300
|
(spxSearch)="this.handleSearch()">
|
|
1199
1301
|
<div controls>
|
|
@@ -1254,12 +1356,14 @@ class SpxInputComponent {
|
|
|
1254
1356
|
[value]="this.value"
|
|
1255
1357
|
></spx-input-number>
|
|
1256
1358
|
<spx-input-radio
|
|
1359
|
+
#radioInput
|
|
1257
1360
|
*ngIf="this.spxType === 'radio'"
|
|
1258
1361
|
(spxChange)="this.handleChange($event)"
|
|
1259
1362
|
(spxFocus)="this.handleFocus()"
|
|
1260
1363
|
[spxFocused]="this.spxFocused"
|
|
1261
1364
|
[spxName]="this.spxName"
|
|
1262
1365
|
[spxReadonly]="this.spxReadonly"
|
|
1366
|
+
[spxShowLabel]="this.spxShowLabel"
|
|
1263
1367
|
[spxSuggestions]="this.spxSuggestions"
|
|
1264
1368
|
[spxValidators]="this.spxValidators"
|
|
1265
1369
|
[value]="this.value"
|
|
@@ -1268,7 +1372,7 @@ class SpxInputComponent {
|
|
|
1268
1372
|
<div validation-messages>
|
|
1269
1373
|
<ng-content></ng-content>
|
|
1270
1374
|
</div>
|
|
1271
|
-
</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", "
|
|
1375
|
+
</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: ["spxCompact", "spxFocused", "spxLabel", "spxReadonly", "spxRequired", "spxShowClear", "spxShowEdit", "spxShowHelp", "spxShowLabel", "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", "spxShowLabel", "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"] }] }); }
|
|
1272
1376
|
}
|
|
1273
1377
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputComponent, decorators: [{
|
|
1274
1378
|
type: Component,
|
|
@@ -1304,12 +1408,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1304
1408
|
[spxCompact]="this.spxCompact"
|
|
1305
1409
|
[spxShowClear]="this.spxShowClear"
|
|
1306
1410
|
[spxShowEdit]="this.spxShowEdit"
|
|
1411
|
+
[spxShowLabel]="this.spxShowLabel"
|
|
1307
1412
|
[spxShowSearch]="this.spxShowSearch ? this.spxShowSearch : this.spxType === 'autocomplete'"
|
|
1308
1413
|
[spxShowValidationMessages]="this.spxShowValidationMessages"
|
|
1309
1414
|
(spxClear)="this.handleClear()"
|
|
1310
1415
|
(spxEdit)="this.handleEdit()"
|
|
1311
1416
|
(spxHelp)="this.handleHelp()"
|
|
1312
|
-
(spxFocus)="this.
|
|
1417
|
+
(spxFocus)="this.setFocusIn()"
|
|
1313
1418
|
(spxFocusOut)="this.setFocusOut()"
|
|
1314
1419
|
(spxSearch)="this.handleSearch()">
|
|
1315
1420
|
<div controls>
|
|
@@ -1370,12 +1475,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1370
1475
|
[value]="this.value"
|
|
1371
1476
|
></spx-input-number>
|
|
1372
1477
|
<spx-input-radio
|
|
1478
|
+
#radioInput
|
|
1373
1479
|
*ngIf="this.spxType === 'radio'"
|
|
1374
1480
|
(spxChange)="this.handleChange($event)"
|
|
1375
1481
|
(spxFocus)="this.handleFocus()"
|
|
1376
1482
|
[spxFocused]="this.spxFocused"
|
|
1377
1483
|
[spxName]="this.spxName"
|
|
1378
1484
|
[spxReadonly]="this.spxReadonly"
|
|
1485
|
+
[spxShowLabel]="this.spxShowLabel"
|
|
1379
1486
|
[spxSuggestions]="this.spxSuggestions"
|
|
1380
1487
|
[spxValidators]="this.spxValidators"
|
|
1381
1488
|
[value]="this.value"
|
|
@@ -1412,6 +1519,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1412
1519
|
type: Input
|
|
1413
1520
|
}], spxShowHelp: [{
|
|
1414
1521
|
type: Input
|
|
1522
|
+
}], spxShowLabel: [{
|
|
1523
|
+
type: Input
|
|
1415
1524
|
}], spxCompact: [{
|
|
1416
1525
|
type: Input
|
|
1417
1526
|
}], spxShowClear: [{
|
|
@@ -1446,9 +1555,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
1446
1555
|
type: Output
|
|
1447
1556
|
}], spxSearch: [{
|
|
1448
1557
|
type: Output
|
|
1558
|
+
}], floatInput: [{
|
|
1559
|
+
type: ViewChild,
|
|
1560
|
+
args: [SpxInputFloatComponent]
|
|
1561
|
+
}], numberInput: [{
|
|
1562
|
+
type: ViewChild,
|
|
1563
|
+
args: [SpxInputNumberComponent]
|
|
1449
1564
|
}], textInput: [{
|
|
1450
1565
|
type: ViewChild,
|
|
1451
1566
|
args: [SpxInputTextComponent]
|
|
1567
|
+
}], radioInput: [{
|
|
1568
|
+
type: ViewChild,
|
|
1569
|
+
args: [SpxInputRadioComponent]
|
|
1452
1570
|
}], spxFocused: [{
|
|
1453
1571
|
type: Input
|
|
1454
1572
|
}], _handleBlurEvent: [{
|