@softpak/components 20.5.0 → 20.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, computed, input, model, output, signal, HostListener, ChangeDetectionStrategy, Component, viewChild } from '@angular/core';
2
+ import { Injectable, inject, computed, input, model, output, signal, HostListener, ChangeDetectionStrategy, Component, viewChild, EventEmitter, ViewChildren, Output } from '@angular/core';
3
3
  import { SpxButtonComponent } from '@softpak/components/spx-button';
4
4
  import * as i1 from '@fortawesome/angular-fontawesome';
5
5
  import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
@@ -10,8 +10,8 @@ import { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpe
10
10
  import * as i1$1 from '@angular/forms';
11
11
  import { ReactiveFormsModule, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
12
12
  import { NgClass } from '@angular/common';
13
- import { SpxSuggestionComponent } from '@softpak/components/spx-suggestion';
14
13
  import { DateTime } from 'luxon';
14
+ import { SpxSuggestionComponent } from '@softpak/components/spx-suggestion';
15
15
  import * as i1$2 from '@ionic/angular/standalone';
16
16
  import { IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';
17
17
 
@@ -182,6 +182,8 @@ var SpxInputTypeEnum;
182
182
  (function (SpxInputTypeEnum) {
183
183
  SpxInputTypeEnum["autocomplete"] = "autocomplete";
184
184
  SpxInputTypeEnum["button"] = "button";
185
+ SpxInputTypeEnum["cycle"] = "cycle";
186
+ SpxInputTypeEnum["cycleNumeric"] = "cycleNumeric";
185
187
  SpxInputTypeEnum["date"] = "date";
186
188
  SpxInputTypeEnum["float"] = "float";
187
189
  SpxInputTypeEnum["hidden"] = "hidden";
@@ -258,15 +260,378 @@ class SpxInputTextComponent {
258
260
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputTextComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
259
261
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: SpxInputTextComponent, isStandalone: true, selector: "spx-input-text", inputs: { spxSpeedDial: { classPropertyName: "spxSpeedDial", publicName: "spxSpeedDial", isSignal: true, isRequired: false, transformFunction: null }, spxName: { classPropertyName: "spxName", publicName: "spxName", isSignal: true, isRequired: false, transformFunction: null }, spxAutofocus: { classPropertyName: "spxAutofocus", publicName: "spxAutofocus", isSignal: true, isRequired: false, transformFunction: null }, spxAutocomplete: { classPropertyName: "spxAutocomplete", publicName: "spxAutocomplete", isSignal: true, isRequired: false, transformFunction: null }, spxInputMode: { classPropertyName: "spxInputMode", publicName: "spxInputMode", isSignal: true, isRequired: false, transformFunction: null }, spxPattern: { classPropertyName: "spxPattern", publicName: "spxPattern", isSignal: true, isRequired: false, transformFunction: null }, spxSuggestions: { classPropertyName: "spxSuggestions", publicName: "spxSuggestions", isSignal: true, isRequired: false, transformFunction: null }, spxReadonly: { classPropertyName: "spxReadonly", publicName: "spxReadonly", isSignal: true, isRequired: false, transformFunction: null }, spxValidators: { classPropertyName: "spxValidators", publicName: "spxValidators", isSignal: true, isRequired: false, transformFunction: null }, spxCapitalize: { classPropertyName: "spxCapitalize", publicName: "spxCapitalize", isSignal: true, isRequired: false, transformFunction: null }, spxType: { classPropertyName: "spxType", publicName: "spxType", isSignal: true, isRequired: false, transformFunction: null }, spxWasInternalUpdate: { classPropertyName: "spxWasInternalUpdate", publicName: "spxWasInternalUpdate", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, spxElementId: { classPropertyName: "spxElementId", publicName: "spxElementId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"relative text-black\">\n <input #input class=\"font-bold text-lg w-full outline-none\" autocomplete=\"off\" spellcheck=\"false\"\n [attr.autocomplete]=\"this.spxAutocomplete()\" [attr.autofocus]=\"this.spxAutofocus()\"\n [attr.inputMode]=\"this.spxInputMode()\" [attr.pattern]=\"this.spxPattern()\" [attr.name]=\"this.spxName()\"\n [attr.type]=\"this.spxType()\" [class.bg-white]=\"!this.spxReadonly()\" [class.bg-gray-300]=\"this.spxReadonly()\"\n [class.cursor-not-allowed]=\"this.spxReadonly()\" [class.uppercase]=\"this.spxCapitalize()\"\n [disabled]=\"this.mappedReadonly()\" [ngModel]=\"\n this.value()?.description\n ? this.value()?.description\n : this.value()?.value\n \" (ngModelChange)=\"this.handleChange($event)\" />\n @if (this.value()?.description && this.value()?.value &&\n this.value()?.description?.valueOf() !== this.value()?.value?.valueOf()) {\n <span>{{ this.value()?.value }}</span>\n } @if (this.spxIsFocused() && (this.spxType() === 'overlay' || this.spxType()\n === 'overlaynumber')) {\n <spx-dropdown [spxSuggestions]=\"this.spxSuggestions()\" (spxSelect)=\"this.handleSuggestionClick($event)\">\n </spx-dropdown>\n } @if (this.spxSpeedDial()) {\n <div class=\"flex flex-wrap gap-3\">\n @for (speedDial of this.spxSpeedDial(); track $index) {\n <button class=\"px-3 px-1\" [ngClass]=\"'bg-' + speedDial.backgroundColor\" (click)=\"doSelect(speedDial)\">\n {{ speedDial.valuePair.description }}\n </button>\n }\n </div>\n }\n</div>", dependencies: [{ kind: "component", type: SpxDropdownComponent, selector: "spx-dropdown", inputs: ["spxSuggestions"], outputs: ["spxSelect"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
260
262
  }
261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputTextComponent, decorators: [{
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputTextComponent, decorators: [{
264
+ type: Component,
265
+ args: [{ selector: 'spx-input-text', imports: [
266
+ SpxDropdownComponent,
267
+ ReactiveFormsModule,
268
+ FormsModule,
269
+ NgClass,
270
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative text-black\">\n <input #input class=\"font-bold text-lg w-full outline-none\" autocomplete=\"off\" spellcheck=\"false\"\n [attr.autocomplete]=\"this.spxAutocomplete()\" [attr.autofocus]=\"this.spxAutofocus()\"\n [attr.inputMode]=\"this.spxInputMode()\" [attr.pattern]=\"this.spxPattern()\" [attr.name]=\"this.spxName()\"\n [attr.type]=\"this.spxType()\" [class.bg-white]=\"!this.spxReadonly()\" [class.bg-gray-300]=\"this.spxReadonly()\"\n [class.cursor-not-allowed]=\"this.spxReadonly()\" [class.uppercase]=\"this.spxCapitalize()\"\n [disabled]=\"this.mappedReadonly()\" [ngModel]=\"\n this.value()?.description\n ? this.value()?.description\n : this.value()?.value\n \" (ngModelChange)=\"this.handleChange($event)\" />\n @if (this.value()?.description && this.value()?.value &&\n this.value()?.description?.valueOf() !== this.value()?.value?.valueOf()) {\n <span>{{ this.value()?.value }}</span>\n } @if (this.spxIsFocused() && (this.spxType() === 'overlay' || this.spxType()\n === 'overlaynumber')) {\n <spx-dropdown [spxSuggestions]=\"this.spxSuggestions()\" (spxSelect)=\"this.handleSuggestionClick($event)\">\n </spx-dropdown>\n } @if (this.spxSpeedDial()) {\n <div class=\"flex flex-wrap gap-3\">\n @for (speedDial of this.spxSpeedDial(); track $index) {\n <button class=\"px-3 px-1\" [ngClass]=\"'bg-' + speedDial.backgroundColor\" (click)=\"doSelect(speedDial)\">\n {{ speedDial.valuePair.description }}\n </button>\n }\n </div>\n }\n</div>" }]
271
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
272
+
273
+ // {
274
+ // defaultFocusPosition: 3,
275
+ // fieldPattern: '[0-9]*',
276
+ // focusOrder: [3, 4, 5, 6, 0, 1, 2],
277
+ // length: 7,
278
+ // requiredPositions: [false, false, false, true, true, true, true]
279
+ // }
280
+
281
+ class SpxInputCycleComponent {
282
+ constructor(changeDetectorRef) {
283
+ this.changeDetectorRef = changeDetectorRef;
284
+ this.mappedReadonly = computed(() => this.spxReadonly() ? true : false, ...(ngDevMode ? [{ debugName: "mappedReadonly" }] : []));
285
+ this.spxSpeedDial = input([], ...(ngDevMode ? [{ debugName: "spxSpeedDial" }] : []));
286
+ this.spxName = input(...(ngDevMode ? [undefined, { debugName: "spxName" }] : []));
287
+ this.spxAutofocus = input(false, ...(ngDevMode ? [{ debugName: "spxAutofocus" }] : []));
288
+ this.spxAutocomplete = input(...(ngDevMode ? [undefined, { debugName: "spxAutocomplete" }] : []));
289
+ this.spxCycleConfig = input.required(...(ngDevMode ? [{ debugName: "spxCycleConfig" }] : []));
290
+ this.spxInputMode = input(...(ngDevMode ? [undefined, { debugName: "spxInputMode" }] : []));
291
+ this.spxReadonly = input(undefined, ...(ngDevMode ? [{ debugName: "spxReadonly" }] : []));
292
+ this.spxValidators = input(...(ngDevMode ? [undefined, { debugName: "spxValidators" }] : []));
293
+ this.spxCapitalize = input(false, ...(ngDevMode ? [{ debugName: "spxCapitalize" }] : []));
294
+ this.spxSeverity = computed(() => this.value()?.description, ...(ngDevMode ? [{ debugName: "spxSeverity" }] : []));
295
+ this.spxType = input(SpxInputTypeEnum.text, ...(ngDevMode ? [{ debugName: "spxType" }] : []));
296
+ this.spxWasInternalUpdate = input(false, ...(ngDevMode ? [{ debugName: "spxWasInternalUpdate" }] : []));
297
+ this.value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : []));
298
+ this.spxElementId = input(...(ngDevMode ? [undefined, { debugName: "spxElementId" }] : []));
299
+ this.selectedInputService = inject(SelectedInputService);
300
+ this.spxIsFocused = signal(false, ...(ngDevMode ? [{ debugName: "spxIsFocused" }] : []));
301
+ this.inputRef = viewChild.required('input');
302
+ this.severityError = SpxSeverityEnum.error;
303
+ this.severitySuccess = SpxSeverityEnum.success;
304
+ this.severityWarning = SpxSeverityEnum.warning;
305
+ this.completeInput = new EventEmitter();
306
+ }
307
+ ngOnInit() {
308
+ this.componentDidLoad();
309
+ const length = this.spxCycleConfig().length;
310
+ this.values = Array(length).fill('');
311
+ if (valuePairToValue(this.value())) {
312
+ valuePairToValue(this.value()).split('').forEach((char, index) => {
313
+ if (this.values[index] !== undefined) {
314
+ this.values[index] = char;
315
+ }
316
+ });
317
+ }
318
+ }
319
+ ngAfterViewInit() {
320
+ if (this.spxAutofocus()) {
321
+ this.spxSetFocus();
322
+ }
323
+ }
324
+ spxSetFocus() {
325
+ const defaultFocusPosition = this.spxCycleConfig().defaultFocusPosition;
326
+ setTimeout(() => this.focusInput(defaultFocusPosition));
327
+ }
328
+ componentDidLoad() {
329
+ // if (this.spxAutofocus()) {
330
+ // this.spxSetFocus();
331
+ // }
332
+ }
333
+ handleChange(event) {
334
+ this.value.set(event);
335
+ }
336
+ onFocus(index) {
337
+ const input = this.inputBoxes.toArray()[index]?.nativeElement;
338
+ if (input?.value) {
339
+ setTimeout(() => input.select(), 0);
340
+ }
341
+ }
342
+ onInput(index, event) {
343
+ const inputEl = event.target;
344
+ const raw = inputEl.value;
345
+ const char = raw.slice(-1); // neem laatste teken
346
+ if (!this.values) {
347
+ return;
348
+ }
349
+ this.values[index] = char;
350
+ inputEl.value = char; // vervang inhoud expliciet
351
+ this.focusInput(this.nextIndex(index));
352
+ this.checkEmitCondition();
353
+ }
354
+ nextIndex(currentIndex) {
355
+ const focusOrder = this.spxCycleConfig().focusOrder;
356
+ const next = focusOrder[focusOrder.indexOf(currentIndex) + 1];
357
+ return next % this.spxCycleConfig().length;
358
+ }
359
+ focusInput(index) {
360
+ const input = this.inputBoxes.toArray()[index]?.nativeElement;
361
+ if (input) {
362
+ input.focus();
363
+ // Selecteer de tekst als er al iets in staat
364
+ if (input.value) {
365
+ // Delay is nodig om select() te laten werken in sommige browsers
366
+ setTimeout(() => input.select(), 0);
367
+ }
368
+ }
369
+ }
370
+ checkEmitCondition() {
371
+ const requiredPositions = this.spxCycleConfig().requiredPositions;
372
+ const completed = this.values.filter((_, index) => requiredPositions[index] === true).every(val => val !== '');
373
+ if (completed) {
374
+ this.handleChange({
375
+ description: SpxSeverityEnum.warning,
376
+ value: this.values.join('').toUpperCase(),
377
+ });
378
+ }
379
+ }
380
+ writeValue(valuePair) {
381
+ console.log(valuePair);
382
+ }
383
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputCycleComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
384
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: SpxInputCycleComponent, isStandalone: true, selector: "spx-input-cycle", inputs: { spxSpeedDial: { classPropertyName: "spxSpeedDial", publicName: "spxSpeedDial", isSignal: true, isRequired: false, transformFunction: null }, spxName: { classPropertyName: "spxName", publicName: "spxName", isSignal: true, isRequired: false, transformFunction: null }, spxAutofocus: { classPropertyName: "spxAutofocus", publicName: "spxAutofocus", isSignal: true, isRequired: false, transformFunction: null }, spxAutocomplete: { classPropertyName: "spxAutocomplete", publicName: "spxAutocomplete", isSignal: true, isRequired: false, transformFunction: null }, spxCycleConfig: { classPropertyName: "spxCycleConfig", publicName: "spxCycleConfig", isSignal: true, isRequired: true, transformFunction: null }, spxInputMode: { classPropertyName: "spxInputMode", publicName: "spxInputMode", isSignal: true, isRequired: false, transformFunction: null }, spxReadonly: { classPropertyName: "spxReadonly", publicName: "spxReadonly", isSignal: true, isRequired: false, transformFunction: null }, spxValidators: { classPropertyName: "spxValidators", publicName: "spxValidators", isSignal: true, isRequired: false, transformFunction: null }, spxCapitalize: { classPropertyName: "spxCapitalize", publicName: "spxCapitalize", isSignal: true, isRequired: false, transformFunction: null }, spxType: { classPropertyName: "spxType", publicName: "spxType", isSignal: true, isRequired: false, transformFunction: null }, spxWasInternalUpdate: { classPropertyName: "spxWasInternalUpdate", publicName: "spxWasInternalUpdate", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, spxElementId: { classPropertyName: "spxElementId", publicName: "spxElementId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", completeInput: "completeInput" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "inputBoxes", predicate: ["inputBox"], descendants: true }], ngImport: i0, template: "<div class=\"relative text-black flex gap-2 w-full\">\n @for (val of values; track $index) {\n <input #inputBox type=\"text\" maxlength=\"1\" pattern=\"\\d*\" [value]=\"val\" (focus)=\"onFocus($index)\"\n (input)=\"onInput($index, $event)\" [attr.inputMode]=\"this.spxInputMode()\" [attr.pattern]=\"spxCycleConfig().fieldPattern\"\n [class.opacity-50]=\"spxCycleConfig().requiredPositions[$index] === false\"\n [class.bg-sky-100]=\"!this.spxReadonly() && !this.spxSeverity()\"\n [class.bg-red-100]=\"!this.spxReadonly() && this.spxSeverity() === severityError\"\n [class.bg-amber-100]=\"!this.spxReadonly() && this.spxSeverity() === severityWarning\"\n [class.bg-teal-100]=\"!this.spxReadonly() && this.spxSeverity() === severitySuccess\"\n [class.bg-gray-300]=\"this.spxReadonly()\" [class.cursor-not-allowed]=\"this.spxReadonly()\"\n [class.uppercase]=\"this.spxCapitalize()\" [disabled]=\"this.mappedReadonly()\"\n class=\"rounded text-center p-3 font-bold text-lg w-full\" />\n }\n</div>", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
385
+ }
386
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputCycleComponent, decorators: [{
387
+ type: Component,
388
+ args: [{ selector: 'spx-input-cycle', imports: [
389
+ ReactiveFormsModule,
390
+ FormsModule,
391
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative text-black flex gap-2 w-full\">\n @for (val of values; track $index) {\n <input #inputBox type=\"text\" maxlength=\"1\" pattern=\"\\d*\" [value]=\"val\" (focus)=\"onFocus($index)\"\n (input)=\"onInput($index, $event)\" [attr.inputMode]=\"this.spxInputMode()\" [attr.pattern]=\"spxCycleConfig().fieldPattern\"\n [class.opacity-50]=\"spxCycleConfig().requiredPositions[$index] === false\"\n [class.bg-sky-100]=\"!this.spxReadonly() && !this.spxSeverity()\"\n [class.bg-red-100]=\"!this.spxReadonly() && this.spxSeverity() === severityError\"\n [class.bg-amber-100]=\"!this.spxReadonly() && this.spxSeverity() === severityWarning\"\n [class.bg-teal-100]=\"!this.spxReadonly() && this.spxSeverity() === severitySuccess\"\n [class.bg-gray-300]=\"this.spxReadonly()\" [class.cursor-not-allowed]=\"this.spxReadonly()\"\n [class.uppercase]=\"this.spxCapitalize()\" [disabled]=\"this.mappedReadonly()\"\n class=\"rounded text-center p-3 font-bold text-lg w-full\" />\n }\n</div>" }]
392
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { completeInput: [{
393
+ type: Output
394
+ }], inputBoxes: [{
395
+ type: ViewChildren,
396
+ args: ['inputBox']
397
+ }] } });
398
+
399
+ var stepType;
400
+ (function (stepType) {
401
+ stepType["years"] = "years";
402
+ stepType["months"] = "months";
403
+ stepType["days"] = "days";
404
+ })(stepType || (stepType = {}));
405
+ class SpxInputDateComponent {
406
+ constructor() {
407
+ this.spxMax = input.required(...(ngDevMode ? [{ debugName: "spxMax" }] : []));
408
+ this.spxMin = input.required(...(ngDevMode ? [{ debugName: "spxMin" }] : []));
409
+ this.spxReadonly = input(...(ngDevMode ? [undefined, { debugName: "spxReadonly" }] : []));
410
+ this.spxValidators = input(...(ngDevMode ? [undefined, { debugName: "spxValidators" }] : []));
411
+ this.spxAutoFocus = input(false, ...(ngDevMode ? [{ debugName: "spxAutoFocus" }] : []));
412
+ this.value = model({
413
+ description: "",
414
+ value: "",
415
+ }, ...(ngDevMode ? [{ debugName: "value" }] : []));
416
+ this.spxSelectedStep = signal(stepType.years, ...(ngDevMode ? [{ debugName: "spxSelectedStep" }] : []));
417
+ this.spxSelectDay = input(false, ...(ngDevMode ? [{ debugName: "spxSelectDay" }] : []));
418
+ this.spxSelectMonth = input(true, ...(ngDevMode ? [{ debugName: "spxSelectMonth" }] : []));
419
+ this.selectedYear = signal(null, ...(ngDevMode ? [{ debugName: "selectedYear" }] : []));
420
+ this.selectedMonth = signal(null, ...(ngDevMode ? [{ debugName: "selectedMonth" }] : []));
421
+ this.selectedDay = signal(null, ...(ngDevMode ? [{ debugName: "selectedDay" }] : []));
422
+ this.yearInputComponent = viewChild.required(stepType.years);
423
+ this.monthInputComponent = viewChild.required(stepType.months);
424
+ this.dayInputComponent = viewChild.required(stepType.days);
425
+ this.spxElementId = input(...(ngDevMode ? [undefined, { debugName: "spxElementId" }] : []));
426
+ this.selectedInputService = inject(SelectedInputService);
427
+ this.spxIsFocused = signal(false, ...(ngDevMode ? [{ debugName: "spxIsFocused" }] : []));
428
+ this.isInternalUpdate = signal(false, ...(ngDevMode ? [{ debugName: "isInternalUpdate" }] : []));
429
+ this.spxSuggestionC = computed(() => {
430
+ switch (this.spxSelectedStep()) {
431
+ case stepType.years:
432
+ return this.spxSuggestions().years;
433
+ case stepType.months:
434
+ return [...this.spxSuggestions().months];
435
+ case stepType.days:
436
+ return [...this.spxSuggestions().days];
437
+ }
438
+ }, ...(ngDevMode ? [{ debugName: "spxSuggestionC" }] : []));
439
+ this.spxSuggestions = input({
440
+ years: [],
441
+ months: [{
442
+ description: 'Jan',
443
+ value: 1,
444
+ }, {
445
+ description: 'Feb',
446
+ value: 2,
447
+ }, {
448
+ description: 'Mar',
449
+ value: 3,
450
+ }, {
451
+ description: 'Apr',
452
+ value: 4,
453
+ }, {
454
+ description: 'May',
455
+ value: 5,
456
+ }, {
457
+ description: 'Jun',
458
+ value: 6,
459
+ }, {
460
+ description: 'Jul',
461
+ value: 7,
462
+ }, {
463
+ description: 'Aug',
464
+ value: 8,
465
+ }, {
466
+ description: 'Sep',
467
+ value: 9,
468
+ }, {
469
+ description: 'Oct',
470
+ value: 10,
471
+ }, {
472
+ description: 'Nov',
473
+ value: 11,
474
+ }, {
475
+ description: 'Dec',
476
+ value: 12,
477
+ }],
478
+ days: [],
479
+ }, ...(ngDevMode ? [{ debugName: "spxSuggestions" }] : []));
480
+ }
481
+ handleFocus(selectedStep) {
482
+ switch (selectedStep) {
483
+ case stepType.years:
484
+ this.spxSelectedStep.set(stepType.years);
485
+ this.yearInputComponent().nativeElement.focus();
486
+ break;
487
+ case stepType.months:
488
+ this.spxSelectedStep.set(stepType.months);
489
+ this.monthInputComponent().nativeElement.focus();
490
+ break;
491
+ case stepType.days:
492
+ this.spxSelectedStep.set(stepType.days);
493
+ this.dayInputComponent().nativeElement.focus();
494
+ break;
495
+ }
496
+ }
497
+ onModelChange(newValue, selectedStep) {
498
+ this.isInternalUpdate.set(true);
499
+ const parsedValue = +newValue; // Convert to number
500
+ if (parsedValue == 0)
501
+ return;
502
+ switch (selectedStep) {
503
+ case stepType.years:
504
+ this.selectedYear.set(parsedValue);
505
+ if (parsedValue > 999) {
506
+ this.spxSelectedStep.set(stepType.months);
507
+ this.monthInputComponent().nativeElement.focus();
508
+ }
509
+ break;
510
+ case stepType.months:
511
+ this.selectedMonth.set(parsedValue);
512
+ break;
513
+ case stepType.days:
514
+ this.selectedDay.set(parsedValue);
515
+ break;
516
+ }
517
+ this.updateValueAndEmit();
518
+ this.isInternalUpdate.set(false);
519
+ }
520
+ ngOnInit() {
521
+ this.suggestYears();
522
+ this.setValue();
523
+ if (this.spxAutoFocus()) {
524
+ this.handleFocus("years");
525
+ }
526
+ // Filter updates based on focus state
527
+ this.selectedInputService.focusedElement$
528
+ .pipe(filter((focusedId) => focusedId === this.spxElementId()))
529
+ .subscribe(() => {
530
+ this.spxIsFocused.set(true); // Update only if focused
531
+ this.handleFocus(this.spxSelectedStep());
532
+ });
533
+ }
534
+ ngOnChanges() {
535
+ if (!this.isInternalUpdate()) {
536
+ this.setValue();
537
+ }
538
+ }
539
+ setValue() {
540
+ if (valuePairToValue(this.value())) {
541
+ const parsedValue = DateTime.fromISO(valuePairToValue(this.value()));
542
+ if (this.selectedYear() && this.selectedYear() < 999) {
543
+ return;
544
+ }
545
+ this.selectedYear.set(parsedValue.year);
546
+ this.selectedMonth.set(parsedValue.month);
547
+ this.selectedDay.set(parsedValue.day);
548
+ }
549
+ }
550
+ handleSuggestionClick(value) {
551
+ switch (this.spxSelectedStep()) {
552
+ case stepType.years:
553
+ this.selectedYear.set(value);
554
+ break;
555
+ case stepType.months:
556
+ this.selectedMonth.set(value);
557
+ break;
558
+ case stepType.days:
559
+ this.selectedDay.set(value);
560
+ break;
561
+ }
562
+ this.updateValueAndEmit();
563
+ this.changeSelectedStep();
564
+ }
565
+ // Handle keyboard navigation (Tab and Shift + Tab)
566
+ handleTabKey(event) {
567
+ if (event.key === 'Tab') {
568
+ this.changeSelectedStep();
569
+ event.preventDefault(); // Prevent default tab behavior
570
+ }
571
+ }
572
+ updateValueAndEmit() {
573
+ if (this.selectedYear() && this.selectedMonth()) {
574
+ const concatenatedValue = `${this.selectedYear() ? this.selectedYear() : ``}${this.selectedMonth() ? `${this.selectedMonth() < 10 ? `0${this.selectedMonth()}` : this.selectedMonth()}` : ``}${this.selectedDay() ? `-${this.selectedDay() < 10 ? `0${this.selectedDay()}` : this.selectedDay()}` : ``}`;
575
+ const parsedValue = DateTime.fromISO(concatenatedValue);
576
+ this.value.set({ value: parsedValue.toISO(), description: parsedValue.toISO() });
577
+ }
578
+ }
579
+ changeSelectedStep() {
580
+ switch (this.spxSelectedStep()) {
581
+ case stepType.years:
582
+ if (this.spxSelectMonth()) {
583
+ this.spxSelectedStep.set(stepType.months);
584
+ this.monthInputComponent().nativeElement.focus();
585
+ }
586
+ else {
587
+ this.spxSelectedStep.set(stepType.years);
588
+ this.yearInputComponent().nativeElement.focus();
589
+ }
590
+ break;
591
+ case stepType.months:
592
+ if (this.spxSelectDay()) {
593
+ this.spxSelectedStep.set(stepType.days);
594
+ this.dayInputComponent().nativeElement.focus();
595
+ }
596
+ else {
597
+ this.spxSelectedStep.set(stepType.years);
598
+ this.yearInputComponent().nativeElement.focus();
599
+ }
600
+ break;
601
+ case stepType.days:
602
+ this.spxSelectedStep.set(stepType.years);
603
+ this.yearInputComponent().nativeElement.focus();
604
+ break;
605
+ }
606
+ }
607
+ suggestYears() {
608
+ this.spxSuggestions().years = [];
609
+ for (let year = DateTime.fromISO(this.spxMin()).year; year <= DateTime.fromISO(this.spxMax()).year; year++) {
610
+ this.spxSuggestions().years.push({
611
+ description: `'${year.toString().substring(2, 4)}`,
612
+ value: year,
613
+ });
614
+ }
615
+ }
616
+ handleClear() {
617
+ this.spxSelectedStep.set(stepType.years);
618
+ this.selectedYear.set(null);
619
+ this.selectedMonth.set(null);
620
+ this.selectedDay.set(null);
621
+ }
622
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
623
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: SpxInputDateComponent, isStandalone: true, selector: "spx-input-date", inputs: { spxMax: { classPropertyName: "spxMax", publicName: "spxMax", isSignal: true, isRequired: true, transformFunction: null }, spxMin: { classPropertyName: "spxMin", publicName: "spxMin", isSignal: true, isRequired: true, transformFunction: null }, spxReadonly: { classPropertyName: "spxReadonly", publicName: "spxReadonly", isSignal: true, isRequired: false, transformFunction: null }, spxValidators: { classPropertyName: "spxValidators", publicName: "spxValidators", isSignal: true, isRequired: false, transformFunction: null }, spxAutoFocus: { classPropertyName: "spxAutoFocus", publicName: "spxAutoFocus", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, spxSelectDay: { classPropertyName: "spxSelectDay", publicName: "spxSelectDay", isSignal: true, isRequired: false, transformFunction: null }, spxSelectMonth: { classPropertyName: "spxSelectMonth", publicName: "spxSelectMonth", isSignal: true, isRequired: false, transformFunction: null }, spxElementId: { classPropertyName: "spxElementId", publicName: "spxElementId", isSignal: true, isRequired: false, transformFunction: null }, spxSuggestions: { classPropertyName: "spxSuggestions", publicName: "spxSuggestions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "keydown": "handleTabKey($event)" } }, viewQueries: [{ propertyName: "yearInputComponent", first: true, predicate: stepType.years, descendants: true, isSignal: true }, { propertyName: "monthInputComponent", first: true, predicate: stepType.months, descendants: true, isSignal: true }, { propertyName: "dayInputComponent", first: true, predicate: stepType.days, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class='spx-input-date__controls'>\n <input #years\n class='spx-input-date__input'\n [ngModel]=\"selectedYear()\"\n (ngModelChange)=\"onModelChange($event, 'years')\"\n [attr.type]=\"'number'\"\n (click)=\"this.handleFocus('years')\"\n [attr.min]=\"1900\"\n [attr.max]=\"2100\"\n [attr.step]=\"1\"\n />\n <div class='spx-input-date__control-label'>Year</div>\n @if (this.spxSelectMonth()) {\n <input #months\n class='spx-input-date__input'\n [ngModel]=\"selectedMonth()\"\n (ngModelChange)=\"onModelChange($event, 'months')\"\n (click)=\"this.handleFocus('months')\"\n [attr.type]=\"'number'\"\n [attr.min]=\"1\"\n [attr.max]=\"12\"\n [attr.step]=\"1\" />\n }\n <div class='spx-input-date__control-label'>Month</div>\n @if (this.spxSelectDay()) {\n <input #days\n class='spx-input-date__input'\n [ngModel]=\"selectedDay()\"\n (ngModelChange)=\"onModelChange($event, 'days')\"\n (click)=\"this.handleFocus('days')\"\n [attr.type]=\"'number'\"\n [attr.min]=\"1\"\n [attr.max]=\"31\"\n [attr.step]=\"1\" />\n <div class='spx-input-date__control-label'>Days</div>\n }\n</div>\n<div class='spx-input-date__suggestions'>\n @for (valuePair of spxSuggestionC(); track valuePair.value) {\n <spx-suggestion [spxSelected]=\"\n (selectedYear() === valuePair.value && this.spxSelectedStep() === 'years') ||\n (selectedMonth() === valuePair.value && this.spxSelectedStep() === 'months') || \n (selectedDay() === valuePair.value && this.spxSelectedStep() === 'days')\"\n (click)=\"this.handleSuggestionClick(valuePair.value)\">{{valuePair?.description}}</spx-suggestion>\n }\n</div>", 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: "component", type: SpxSuggestionComponent, selector: "spx-suggestion", inputs: ["spxDisabled", "spxFocused", "spxSelected", "spxTabbable"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
624
+ }
625
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputDateComponent, decorators: [{
262
626
  type: Component,
263
- args: [{ selector: 'spx-input-text', imports: [
264
- SpxDropdownComponent,
265
- ReactiveFormsModule,
266
- FormsModule,
267
- NgClass,
268
- ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative text-black\">\n <input #input class=\"font-bold text-lg w-full outline-none\" autocomplete=\"off\" spellcheck=\"false\"\n [attr.autocomplete]=\"this.spxAutocomplete()\" [attr.autofocus]=\"this.spxAutofocus()\"\n [attr.inputMode]=\"this.spxInputMode()\" [attr.pattern]=\"this.spxPattern()\" [attr.name]=\"this.spxName()\"\n [attr.type]=\"this.spxType()\" [class.bg-white]=\"!this.spxReadonly()\" [class.bg-gray-300]=\"this.spxReadonly()\"\n [class.cursor-not-allowed]=\"this.spxReadonly()\" [class.uppercase]=\"this.spxCapitalize()\"\n [disabled]=\"this.mappedReadonly()\" [ngModel]=\"\n this.value()?.description\n ? this.value()?.description\n : this.value()?.value\n \" (ngModelChange)=\"this.handleChange($event)\" />\n @if (this.value()?.description && this.value()?.value &&\n this.value()?.description?.valueOf() !== this.value()?.value?.valueOf()) {\n <span>{{ this.value()?.value }}</span>\n } @if (this.spxIsFocused() && (this.spxType() === 'overlay' || this.spxType()\n === 'overlaynumber')) {\n <spx-dropdown [spxSuggestions]=\"this.spxSuggestions()\" (spxSelect)=\"this.handleSuggestionClick($event)\">\n </spx-dropdown>\n } @if (this.spxSpeedDial()) {\n <div class=\"flex flex-wrap gap-3\">\n @for (speedDial of this.spxSpeedDial(); track $index) {\n <button class=\"px-3 px-1\" [ngClass]=\"'bg-' + speedDial.backgroundColor\" (click)=\"doSelect(speedDial)\">\n {{ speedDial.valuePair.description }}\n </button>\n }\n </div>\n }\n</div>" }]
269
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
627
+ args: [{ selector: 'spx-input-date', standalone: true, imports: [
628
+ SpxSuggestionComponent,
629
+ FormsModule
630
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class='spx-input-date__controls'>\n <input #years\n class='spx-input-date__input'\n [ngModel]=\"selectedYear()\"\n (ngModelChange)=\"onModelChange($event, 'years')\"\n [attr.type]=\"'number'\"\n (click)=\"this.handleFocus('years')\"\n [attr.min]=\"1900\"\n [attr.max]=\"2100\"\n [attr.step]=\"1\"\n />\n <div class='spx-input-date__control-label'>Year</div>\n @if (this.spxSelectMonth()) {\n <input #months\n class='spx-input-date__input'\n [ngModel]=\"selectedMonth()\"\n (ngModelChange)=\"onModelChange($event, 'months')\"\n (click)=\"this.handleFocus('months')\"\n [attr.type]=\"'number'\"\n [attr.min]=\"1\"\n [attr.max]=\"12\"\n [attr.step]=\"1\" />\n }\n <div class='spx-input-date__control-label'>Month</div>\n @if (this.spxSelectDay()) {\n <input #days\n class='spx-input-date__input'\n [ngModel]=\"selectedDay()\"\n (ngModelChange)=\"onModelChange($event, 'days')\"\n (click)=\"this.handleFocus('days')\"\n [attr.type]=\"'number'\"\n [attr.min]=\"1\"\n [attr.max]=\"31\"\n [attr.step]=\"1\" />\n <div class='spx-input-date__control-label'>Days</div>\n }\n</div>\n<div class='spx-input-date__suggestions'>\n @for (valuePair of spxSuggestionC(); track valuePair.value) {\n <spx-suggestion [spxSelected]=\"\n (selectedYear() === valuePair.value && this.spxSelectedStep() === 'years') ||\n (selectedMonth() === valuePair.value && this.spxSelectedStep() === 'months') || \n (selectedDay() === valuePair.value && this.spxSelectedStep() === 'days')\"\n (click)=\"this.handleSuggestionClick(valuePair.value)\">{{valuePair?.description}}</spx-suggestion>\n }\n</div>", 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"] }]
631
+ }], propDecorators: { handleTabKey: [{
632
+ type: HostListener,
633
+ args: ['keydown', ['$event']]
634
+ }] } });
270
635
 
271
636
  class SpxInputFloatComponent {
272
637
  constructor() {
@@ -613,243 +978,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImpor
613
978
  args: [{ selector: 'spx-input-time', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"relative text-black\">\n <div class=\"flex items-center justify-around gap-3\">\n <div class=\"grow rounded bg-gray-100 p-3 text-xl text-center font-bold\" (click)=\"openDialog('hours')\">{{ formattedHour() ?? '--' }}</div>\n <div class=\"text-gray text-xl\">:</div>\n <div class=\"grow rounded bg-gray-100 p-3 text-xl text-center font-bold\" (click)=\"openDialog('minutes')\">{{ formattedMinute() ?? '--' }}</div>\n </div>\n</div>", styles: [".custom-square.selected{background-color:#007bff;color:#fff;border-color:#007bff}.custom-bg{--background: #FFFFFF}\n"] }]
614
979
  }], ctorParameters: () => [{ type: i1$2.ModalController }] });
615
980
 
616
- var stepType;
617
- (function (stepType) {
618
- stepType["years"] = "years";
619
- stepType["months"] = "months";
620
- stepType["days"] = "days";
621
- })(stepType || (stepType = {}));
622
- class SpxInputDateComponent {
623
- constructor() {
624
- this.spxMax = input.required(...(ngDevMode ? [{ debugName: "spxMax" }] : []));
625
- this.spxMin = input.required(...(ngDevMode ? [{ debugName: "spxMin" }] : []));
626
- this.spxReadonly = input(...(ngDevMode ? [undefined, { debugName: "spxReadonly" }] : []));
627
- this.spxValidators = input(...(ngDevMode ? [undefined, { debugName: "spxValidators" }] : []));
628
- this.spxAutoFocus = input(false, ...(ngDevMode ? [{ debugName: "spxAutoFocus" }] : []));
629
- this.value = model({
630
- description: "",
631
- value: "",
632
- }, ...(ngDevMode ? [{ debugName: "value" }] : []));
633
- this.spxSelectedStep = signal(stepType.years, ...(ngDevMode ? [{ debugName: "spxSelectedStep" }] : []));
634
- this.spxSelectDay = input(false, ...(ngDevMode ? [{ debugName: "spxSelectDay" }] : []));
635
- this.spxSelectMonth = input(true, ...(ngDevMode ? [{ debugName: "spxSelectMonth" }] : []));
636
- this.selectedYear = signal(null, ...(ngDevMode ? [{ debugName: "selectedYear" }] : []));
637
- this.selectedMonth = signal(null, ...(ngDevMode ? [{ debugName: "selectedMonth" }] : []));
638
- this.selectedDay = signal(null, ...(ngDevMode ? [{ debugName: "selectedDay" }] : []));
639
- this.yearInputComponent = viewChild.required(stepType.years);
640
- this.monthInputComponent = viewChild.required(stepType.months);
641
- this.dayInputComponent = viewChild.required(stepType.days);
642
- this.spxElementId = input(...(ngDevMode ? [undefined, { debugName: "spxElementId" }] : []));
643
- this.selectedInputService = inject(SelectedInputService);
644
- this.spxIsFocused = signal(false, ...(ngDevMode ? [{ debugName: "spxIsFocused" }] : []));
645
- this.isInternalUpdate = signal(false, ...(ngDevMode ? [{ debugName: "isInternalUpdate" }] : []));
646
- this.spxSuggestionC = computed(() => {
647
- switch (this.spxSelectedStep()) {
648
- case stepType.years:
649
- return this.spxSuggestions().years;
650
- case stepType.months:
651
- return [...this.spxSuggestions().months];
652
- case stepType.days:
653
- return [...this.spxSuggestions().days];
654
- }
655
- }, ...(ngDevMode ? [{ debugName: "spxSuggestionC" }] : []));
656
- this.spxSuggestions = input({
657
- years: [],
658
- months: [{
659
- description: 'Jan',
660
- value: 1,
661
- }, {
662
- description: 'Feb',
663
- value: 2,
664
- }, {
665
- description: 'Mar',
666
- value: 3,
667
- }, {
668
- description: 'Apr',
669
- value: 4,
670
- }, {
671
- description: 'May',
672
- value: 5,
673
- }, {
674
- description: 'Jun',
675
- value: 6,
676
- }, {
677
- description: 'Jul',
678
- value: 7,
679
- }, {
680
- description: 'Aug',
681
- value: 8,
682
- }, {
683
- description: 'Sep',
684
- value: 9,
685
- }, {
686
- description: 'Oct',
687
- value: 10,
688
- }, {
689
- description: 'Nov',
690
- value: 11,
691
- }, {
692
- description: 'Dec',
693
- value: 12,
694
- }],
695
- days: [],
696
- }, ...(ngDevMode ? [{ debugName: "spxSuggestions" }] : []));
697
- }
698
- handleFocus(selectedStep) {
699
- switch (selectedStep) {
700
- case stepType.years:
701
- this.spxSelectedStep.set(stepType.years);
702
- this.yearInputComponent().nativeElement.focus();
703
- break;
704
- case stepType.months:
705
- this.spxSelectedStep.set(stepType.months);
706
- this.monthInputComponent().nativeElement.focus();
707
- break;
708
- case stepType.days:
709
- this.spxSelectedStep.set(stepType.days);
710
- this.dayInputComponent().nativeElement.focus();
711
- break;
712
- }
713
- }
714
- onModelChange(newValue, selectedStep) {
715
- this.isInternalUpdate.set(true);
716
- const parsedValue = +newValue; // Convert to number
717
- if (parsedValue == 0)
718
- return;
719
- switch (selectedStep) {
720
- case stepType.years:
721
- this.selectedYear.set(parsedValue);
722
- if (parsedValue > 999) {
723
- this.spxSelectedStep.set(stepType.months);
724
- this.monthInputComponent().nativeElement.focus();
725
- }
726
- break;
727
- case stepType.months:
728
- this.selectedMonth.set(parsedValue);
729
- break;
730
- case stepType.days:
731
- this.selectedDay.set(parsedValue);
732
- break;
733
- }
734
- this.updateValueAndEmit();
735
- this.isInternalUpdate.set(false);
736
- }
737
- ngOnInit() {
738
- this.suggestYears();
739
- this.setValue();
740
- if (this.spxAutoFocus()) {
741
- this.handleFocus("years");
742
- }
743
- // Filter updates based on focus state
744
- this.selectedInputService.focusedElement$
745
- .pipe(filter((focusedId) => focusedId === this.spxElementId()))
746
- .subscribe(() => {
747
- this.spxIsFocused.set(true); // Update only if focused
748
- this.handleFocus(this.spxSelectedStep());
749
- });
750
- }
751
- ngOnChanges() {
752
- if (!this.isInternalUpdate()) {
753
- this.setValue();
754
- }
755
- }
756
- setValue() {
757
- if (valuePairToValue(this.value())) {
758
- const parsedValue = DateTime.fromISO(valuePairToValue(this.value()));
759
- if (this.selectedYear() && this.selectedYear() < 999) {
760
- return;
761
- }
762
- this.selectedYear.set(parsedValue.year);
763
- this.selectedMonth.set(parsedValue.month);
764
- this.selectedDay.set(parsedValue.day);
765
- }
766
- }
767
- handleSuggestionClick(value) {
768
- switch (this.spxSelectedStep()) {
769
- case stepType.years:
770
- this.selectedYear.set(value);
771
- break;
772
- case stepType.months:
773
- this.selectedMonth.set(value);
774
- break;
775
- case stepType.days:
776
- this.selectedDay.set(value);
777
- break;
778
- }
779
- this.updateValueAndEmit();
780
- this.changeSelectedStep();
781
- }
782
- // Handle keyboard navigation (Tab and Shift + Tab)
783
- handleTabKey(event) {
784
- if (event.key === 'Tab') {
785
- this.changeSelectedStep();
786
- event.preventDefault(); // Prevent default tab behavior
787
- }
788
- }
789
- updateValueAndEmit() {
790
- if (this.selectedYear() && this.selectedMonth()) {
791
- const concatenatedValue = `${this.selectedYear() ? this.selectedYear() : ``}${this.selectedMonth() ? `${this.selectedMonth() < 10 ? `0${this.selectedMonth()}` : this.selectedMonth()}` : ``}${this.selectedDay() ? `-${this.selectedDay() < 10 ? `0${this.selectedDay()}` : this.selectedDay()}` : ``}`;
792
- const parsedValue = DateTime.fromISO(concatenatedValue);
793
- this.value.set({ value: parsedValue.toISO(), description: parsedValue.toISO() });
794
- }
795
- }
796
- changeSelectedStep() {
797
- switch (this.spxSelectedStep()) {
798
- case stepType.years:
799
- if (this.spxSelectMonth()) {
800
- this.spxSelectedStep.set(stepType.months);
801
- this.monthInputComponent().nativeElement.focus();
802
- }
803
- else {
804
- this.spxSelectedStep.set(stepType.years);
805
- this.yearInputComponent().nativeElement.focus();
806
- }
807
- break;
808
- case stepType.months:
809
- if (this.spxSelectDay()) {
810
- this.spxSelectedStep.set(stepType.days);
811
- this.dayInputComponent().nativeElement.focus();
812
- }
813
- else {
814
- this.spxSelectedStep.set(stepType.years);
815
- this.yearInputComponent().nativeElement.focus();
816
- }
817
- break;
818
- case stepType.days:
819
- this.spxSelectedStep.set(stepType.years);
820
- this.yearInputComponent().nativeElement.focus();
821
- break;
822
- }
823
- }
824
- suggestYears() {
825
- this.spxSuggestions().years = [];
826
- for (let year = DateTime.fromISO(this.spxMin()).year; year <= DateTime.fromISO(this.spxMax()).year; year++) {
827
- this.spxSuggestions().years.push({
828
- description: `'${year.toString().substring(2, 4)}`,
829
- value: year,
830
- });
831
- }
832
- }
833
- handleClear() {
834
- this.spxSelectedStep.set(stepType.years);
835
- this.selectedYear.set(null);
836
- this.selectedMonth.set(null);
837
- this.selectedDay.set(null);
838
- }
839
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
840
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: SpxInputDateComponent, isStandalone: true, selector: "spx-input-date", inputs: { spxMax: { classPropertyName: "spxMax", publicName: "spxMax", isSignal: true, isRequired: true, transformFunction: null }, spxMin: { classPropertyName: "spxMin", publicName: "spxMin", isSignal: true, isRequired: true, transformFunction: null }, spxReadonly: { classPropertyName: "spxReadonly", publicName: "spxReadonly", isSignal: true, isRequired: false, transformFunction: null }, spxValidators: { classPropertyName: "spxValidators", publicName: "spxValidators", isSignal: true, isRequired: false, transformFunction: null }, spxAutoFocus: { classPropertyName: "spxAutoFocus", publicName: "spxAutoFocus", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, spxSelectDay: { classPropertyName: "spxSelectDay", publicName: "spxSelectDay", isSignal: true, isRequired: false, transformFunction: null }, spxSelectMonth: { classPropertyName: "spxSelectMonth", publicName: "spxSelectMonth", isSignal: true, isRequired: false, transformFunction: null }, spxElementId: { classPropertyName: "spxElementId", publicName: "spxElementId", isSignal: true, isRequired: false, transformFunction: null }, spxSuggestions: { classPropertyName: "spxSuggestions", publicName: "spxSuggestions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { listeners: { "keydown": "handleTabKey($event)" } }, viewQueries: [{ propertyName: "yearInputComponent", first: true, predicate: stepType.years, descendants: true, isSignal: true }, { propertyName: "monthInputComponent", first: true, predicate: stepType.months, descendants: true, isSignal: true }, { propertyName: "dayInputComponent", first: true, predicate: stepType.days, descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<div class='spx-input-date__controls'>\n <input #years\n class='spx-input-date__input'\n [ngModel]=\"selectedYear()\"\n (ngModelChange)=\"onModelChange($event, 'years')\"\n [attr.type]=\"'number'\"\n (click)=\"this.handleFocus('years')\"\n [attr.min]=\"1900\"\n [attr.max]=\"2100\"\n [attr.step]=\"1\"\n />\n <div class='spx-input-date__control-label'>Year</div>\n @if (this.spxSelectMonth()) {\n <input #months\n class='spx-input-date__input'\n [ngModel]=\"selectedMonth()\"\n (ngModelChange)=\"onModelChange($event, 'months')\"\n (click)=\"this.handleFocus('months')\"\n [attr.type]=\"'number'\"\n [attr.min]=\"1\"\n [attr.max]=\"12\"\n [attr.step]=\"1\" />\n }\n <div class='spx-input-date__control-label'>Month</div>\n @if (this.spxSelectDay()) {\n <input #days\n class='spx-input-date__input'\n [ngModel]=\"selectedDay()\"\n (ngModelChange)=\"onModelChange($event, 'days')\"\n (click)=\"this.handleFocus('days')\"\n [attr.type]=\"'number'\"\n [attr.min]=\"1\"\n [attr.max]=\"31\"\n [attr.step]=\"1\" />\n <div class='spx-input-date__control-label'>Days</div>\n }\n</div>\n<div class='spx-input-date__suggestions'>\n @for (valuePair of spxSuggestionC(); track valuePair.value) {\n <spx-suggestion [spxSelected]=\"\n (selectedYear() === valuePair.value && this.spxSelectedStep() === 'years') ||\n (selectedMonth() === valuePair.value && this.spxSelectedStep() === 'months') || \n (selectedDay() === valuePair.value && this.spxSelectedStep() === 'days')\"\n (click)=\"this.handleSuggestionClick(valuePair.value)\">{{valuePair?.description}}</spx-suggestion>\n }\n</div>", 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: "component", type: SpxSuggestionComponent, selector: "spx-suggestion", inputs: ["spxDisabled", "spxFocused", "spxSelected", "spxTabbable"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
841
- }
842
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputDateComponent, decorators: [{
843
- type: Component,
844
- args: [{ selector: 'spx-input-date', standalone: true, imports: [
845
- SpxSuggestionComponent,
846
- FormsModule
847
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class='spx-input-date__controls'>\n <input #years\n class='spx-input-date__input'\n [ngModel]=\"selectedYear()\"\n (ngModelChange)=\"onModelChange($event, 'years')\"\n [attr.type]=\"'number'\"\n (click)=\"this.handleFocus('years')\"\n [attr.min]=\"1900\"\n [attr.max]=\"2100\"\n [attr.step]=\"1\"\n />\n <div class='spx-input-date__control-label'>Year</div>\n @if (this.spxSelectMonth()) {\n <input #months\n class='spx-input-date__input'\n [ngModel]=\"selectedMonth()\"\n (ngModelChange)=\"onModelChange($event, 'months')\"\n (click)=\"this.handleFocus('months')\"\n [attr.type]=\"'number'\"\n [attr.min]=\"1\"\n [attr.max]=\"12\"\n [attr.step]=\"1\" />\n }\n <div class='spx-input-date__control-label'>Month</div>\n @if (this.spxSelectDay()) {\n <input #days\n class='spx-input-date__input'\n [ngModel]=\"selectedDay()\"\n (ngModelChange)=\"onModelChange($event, 'days')\"\n (click)=\"this.handleFocus('days')\"\n [attr.type]=\"'number'\"\n [attr.min]=\"1\"\n [attr.max]=\"31\"\n [attr.step]=\"1\" />\n <div class='spx-input-date__control-label'>Days</div>\n }\n</div>\n<div class='spx-input-date__suggestions'>\n @for (valuePair of spxSuggestionC(); track valuePair.value) {\n <spx-suggestion [spxSelected]=\"\n (selectedYear() === valuePair.value && this.spxSelectedStep() === 'years') ||\n (selectedMonth() === valuePair.value && this.spxSelectedStep() === 'months') || \n (selectedDay() === valuePair.value && this.spxSelectedStep() === 'days')\"\n (click)=\"this.handleSuggestionClick(valuePair.value)\">{{valuePair?.description}}</spx-suggestion>\n }\n</div>", 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"] }]
848
- }], propDecorators: { handleTabKey: [{
849
- type: HostListener,
850
- args: ['keydown', ['$event']]
851
- }] } });
852
-
853
981
  class SpxInputComponent {
854
982
  constructor() {
855
983
  this.mappedName = computed(() => this.spxName() ?? undefined, ...(ngDevMode ? [{ debugName: "mappedName" }] : []));
@@ -880,6 +1008,7 @@ class SpxInputComponent {
880
1008
  this.spxType = input(SpxInputTypeEnum.text, ...(ngDevMode ? [{ debugName: "spxType" }] : []));
881
1009
  this.spxValidators = input(...(ngDevMode ? [undefined, { debugName: "spxValidators" }] : []));
882
1010
  this.spxCapitalize = input(false, ...(ngDevMode ? [{ debugName: "spxCapitalize" }] : []));
1011
+ this.spxCycleConfig = input(...(ngDevMode ? [undefined, { debugName: "spxCycleConfig" }] : []));
883
1012
  this.value = signal({ value: null, description: null }, ...(ngDevMode ? [{ debugName: "value" }] : []));
884
1013
  this.spxClear = output();
885
1014
  this.spxEdit = output();
@@ -892,6 +1021,7 @@ class SpxInputComponent {
892
1021
  this.timeInput = viewChild("spxInputTime", ...(ngDevMode ? [{ debugName: "timeInput" }] : []));
893
1022
  this.radioInput = viewChild("spxInputRadio", ...(ngDevMode ? [{ debugName: "radioInput" }] : []));
894
1023
  this.dateInput = viewChild("spxInputDate", ...(ngDevMode ? [{ debugName: "dateInput" }] : []));
1024
+ this.cycleInput = viewChild("spxInputCycle", ...(ngDevMode ? [{ debugName: "cycleInput" }] : []));
895
1025
  this.spxElementId = signal(0, ...(ngDevMode ? [{ debugName: "spxElementId" }] : []));
896
1026
  this.selectedInputService = inject(SelectedInputService);
897
1027
  this.onChange = () => { };
@@ -947,6 +1077,10 @@ class SpxInputComponent {
947
1077
  case SpxInputTypeEnum.overlayNumber:
948
1078
  this.textInput()?.spxSetFocus();
949
1079
  break;
1080
+ case SpxInputTypeEnum.cycle:
1081
+ case SpxInputTypeEnum.cycleNumeric:
1082
+ this.cycleInput()?.spxSetFocus();
1083
+ break;
950
1084
  case SpxInputTypeEnum.number:
951
1085
  this.numberInput()?.spxSetFocus();
952
1086
  break;
@@ -981,13 +1115,13 @@ class SpxInputComponent {
981
1115
  this.onTouched = fn;
982
1116
  }
983
1117
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
984
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: SpxInputComponent, isStandalone: true, selector: "spx-input", inputs: { spxSpeedDial: { classPropertyName: "spxSpeedDial", publicName: "spxSpeedDial", isSignal: true, isRequired: false, transformFunction: null }, spxLabel: { classPropertyName: "spxLabel", publicName: "spxLabel", isSignal: true, isRequired: false, transformFunction: null }, spxMax: { classPropertyName: "spxMax", publicName: "spxMax", isSignal: true, isRequired: false, transformFunction: null }, spxMin: { classPropertyName: "spxMin", publicName: "spxMin", isSignal: true, isRequired: false, transformFunction: null }, spxName: { classPropertyName: "spxName", publicName: "spxName", isSignal: true, isRequired: false, transformFunction: null }, spxReadonly: { classPropertyName: "spxReadonly", publicName: "spxReadonly", isSignal: true, isRequired: false, transformFunction: null }, spxAutocomplete: { classPropertyName: "spxAutocomplete", publicName: "spxAutocomplete", isSignal: true, isRequired: false, transformFunction: null }, spxAutofocus: { classPropertyName: "spxAutofocus", publicName: "spxAutofocus", isSignal: true, isRequired: false, transformFunction: null }, spxInputMode: { classPropertyName: "spxInputMode", publicName: "spxInputMode", isSignal: true, isRequired: false, transformFunction: null }, spxPattern: { classPropertyName: "spxPattern", publicName: "spxPattern", isSignal: true, isRequired: false, transformFunction: null }, spxRequired: { classPropertyName: "spxRequired", publicName: "spxRequired", isSignal: true, isRequired: false, transformFunction: null }, spxSelectMonth: { classPropertyName: "spxSelectMonth", publicName: "spxSelectMonth", isSignal: true, isRequired: false, transformFunction: null }, spxSelectDay: { classPropertyName: "spxSelectDay", publicName: "spxSelectDay", isSignal: true, isRequired: false, transformFunction: null }, spxShowEdit: { classPropertyName: "spxShowEdit", publicName: "spxShowEdit", isSignal: true, isRequired: false, transformFunction: null }, spxShowHelp: { classPropertyName: "spxShowHelp", publicName: "spxShowHelp", isSignal: true, isRequired: false, transformFunction: null }, spxShowLabel: { classPropertyName: "spxShowLabel", publicName: "spxShowLabel", isSignal: true, isRequired: false, transformFunction: null }, spxCompact: { classPropertyName: "spxCompact", publicName: "spxCompact", isSignal: true, isRequired: false, transformFunction: null }, spxShowClear: { classPropertyName: "spxShowClear", publicName: "spxShowClear", isSignal: true, isRequired: false, transformFunction: null }, spxShowSearch: { classPropertyName: "spxShowSearch", publicName: "spxShowSearch", isSignal: true, isRequired: false, transformFunction: null }, spxAlert: { classPropertyName: "spxAlert", publicName: "spxAlert", isSignal: true, isRequired: false, transformFunction: null }, spxShowValidationMessages: { classPropertyName: "spxShowValidationMessages", publicName: "spxShowValidationMessages", isSignal: true, isRequired: false, transformFunction: null }, spxStep: { classPropertyName: "spxStep", publicName: "spxStep", isSignal: true, isRequired: false, transformFunction: null }, spxSuggestions: { classPropertyName: "spxSuggestions", publicName: "spxSuggestions", isSignal: true, isRequired: false, transformFunction: null }, spxType: { classPropertyName: "spxType", publicName: "spxType", isSignal: true, isRequired: false, transformFunction: null }, spxValidators: { classPropertyName: "spxValidators", publicName: "spxValidators", isSignal: true, isRequired: false, transformFunction: null }, spxCapitalize: { classPropertyName: "spxCapitalize", publicName: "spxCapitalize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxClear: "spxClear", spxEdit: "spxEdit", spxHelp: "spxHelp", spxSearch: "spxSearch", spxBlur: "spxBlur" }, host: { listeners: { "spxChange": "handleChangeEvent($event)", "focusout": "_handleBlurEvent()" } }, providers: [
1118
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: SpxInputComponent, isStandalone: true, selector: "spx-input", inputs: { spxSpeedDial: { classPropertyName: "spxSpeedDial", publicName: "spxSpeedDial", isSignal: true, isRequired: false, transformFunction: null }, spxLabel: { classPropertyName: "spxLabel", publicName: "spxLabel", isSignal: true, isRequired: false, transformFunction: null }, spxMax: { classPropertyName: "spxMax", publicName: "spxMax", isSignal: true, isRequired: false, transformFunction: null }, spxMin: { classPropertyName: "spxMin", publicName: "spxMin", isSignal: true, isRequired: false, transformFunction: null }, spxName: { classPropertyName: "spxName", publicName: "spxName", isSignal: true, isRequired: false, transformFunction: null }, spxReadonly: { classPropertyName: "spxReadonly", publicName: "spxReadonly", isSignal: true, isRequired: false, transformFunction: null }, spxAutocomplete: { classPropertyName: "spxAutocomplete", publicName: "spxAutocomplete", isSignal: true, isRequired: false, transformFunction: null }, spxAutofocus: { classPropertyName: "spxAutofocus", publicName: "spxAutofocus", isSignal: true, isRequired: false, transformFunction: null }, spxInputMode: { classPropertyName: "spxInputMode", publicName: "spxInputMode", isSignal: true, isRequired: false, transformFunction: null }, spxPattern: { classPropertyName: "spxPattern", publicName: "spxPattern", isSignal: true, isRequired: false, transformFunction: null }, spxRequired: { classPropertyName: "spxRequired", publicName: "spxRequired", isSignal: true, isRequired: false, transformFunction: null }, spxSelectMonth: { classPropertyName: "spxSelectMonth", publicName: "spxSelectMonth", isSignal: true, isRequired: false, transformFunction: null }, spxSelectDay: { classPropertyName: "spxSelectDay", publicName: "spxSelectDay", isSignal: true, isRequired: false, transformFunction: null }, spxShowEdit: { classPropertyName: "spxShowEdit", publicName: "spxShowEdit", isSignal: true, isRequired: false, transformFunction: null }, spxShowHelp: { classPropertyName: "spxShowHelp", publicName: "spxShowHelp", isSignal: true, isRequired: false, transformFunction: null }, spxShowLabel: { classPropertyName: "spxShowLabel", publicName: "spxShowLabel", isSignal: true, isRequired: false, transformFunction: null }, spxCompact: { classPropertyName: "spxCompact", publicName: "spxCompact", isSignal: true, isRequired: false, transformFunction: null }, spxShowClear: { classPropertyName: "spxShowClear", publicName: "spxShowClear", isSignal: true, isRequired: false, transformFunction: null }, spxShowSearch: { classPropertyName: "spxShowSearch", publicName: "spxShowSearch", isSignal: true, isRequired: false, transformFunction: null }, spxAlert: { classPropertyName: "spxAlert", publicName: "spxAlert", isSignal: true, isRequired: false, transformFunction: null }, spxShowValidationMessages: { classPropertyName: "spxShowValidationMessages", publicName: "spxShowValidationMessages", isSignal: true, isRequired: false, transformFunction: null }, spxStep: { classPropertyName: "spxStep", publicName: "spxStep", isSignal: true, isRequired: false, transformFunction: null }, spxSuggestions: { classPropertyName: "spxSuggestions", publicName: "spxSuggestions", isSignal: true, isRequired: false, transformFunction: null }, spxType: { classPropertyName: "spxType", publicName: "spxType", isSignal: true, isRequired: false, transformFunction: null }, spxValidators: { classPropertyName: "spxValidators", publicName: "spxValidators", isSignal: true, isRequired: false, transformFunction: null }, spxCapitalize: { classPropertyName: "spxCapitalize", publicName: "spxCapitalize", isSignal: true, isRequired: false, transformFunction: null }, spxCycleConfig: { classPropertyName: "spxCycleConfig", publicName: "spxCycleConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxClear: "spxClear", spxEdit: "spxEdit", spxHelp: "spxHelp", spxSearch: "spxSearch", spxBlur: "spxBlur" }, host: { listeners: { "spxChange": "handleChangeEvent($event)", "focusout": "_handleBlurEvent()" } }, providers: [
985
1119
  {
986
1120
  provide: NG_VALUE_ACCESSOR,
987
1121
  useExisting: SpxInputComponent,
988
1122
  multi: true
989
1123
  }
990
- ], viewQueries: [{ propertyName: "floatInput", first: true, predicate: ["spxInputFloat"], descendants: true, isSignal: true }, { propertyName: "numberInput", first: true, predicate: ["spxInputNumber"], descendants: true, isSignal: true }, { propertyName: "textInput", first: true, predicate: ["spxInputText"], descendants: true, isSignal: true }, { propertyName: "timeInput", first: true, predicate: ["spxInputTime"], descendants: true, isSignal: true }, { propertyName: "radioInput", first: true, predicate: ["spxInputRadio"], descendants: true, isSignal: true }, { propertyName: "dateInput", first: true, predicate: ["spxInputDate"], descendants: true, isSignal: true }], ngImport: i0, template: "<spx-input-box\n (spxClear)=\"this.handleClear()\"\n (spxEdit)=\"this.handleEdit()\"\n (spxHelp)=\"this.handleHelp()\"\n (spxSearch)=\"this.handleSearch()\"\n (spxSetIdInParent)=\"handleSpxElementIdSet($event)\"\n [spxAlert]=\"this.spxAlert()\"\n [spxCompact]=\"this.spxCompact()\"\n [spxLabel]=\"this.spxLabel()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.spxReadonly()\"\n [spxRequired]=\"this.spxRequired()\"\n [spxShowClear]=\"this.spxShowClear()\"\n [spxShowEdit]=\"this.spxShowEdit()\"\n [spxShowHelp]=\"this.spxShowHelp()\"\n [spxShowLabel]=\"this.spxShowLabel()\"\n [spxShowSearch]=\"this.spxShowSearch() ? this.spxShowSearch() : this.spxType() === 'autocomplete'\"\n [spxShowValidationMessages]=\"this.spxShowValidationMessages()\"\n [spxValue]=\"this.value()\"\n>\n <div controls>\n @if (this.spxType() === 'autocomplete' || this.spxType() === 'overlay' ||\n this.spxType() === 'overlaynumber' || this.spxType() === 'text' ||\n this.spxType() === 'password') {\n <spx-input-text\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutocomplete]=\"this.spxAutocomplete() ? this.spxAutocomplete() : undefined\"\n [spxSpeedDial]=\"this.spxSpeedDial()\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxCapitalize]=\"this.spxCapitalize()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxType() === 'overlaynumber' ? 'numeric' : this.spxInputMode()\"\n [spxName]=\"this.mappedName()\"\n [spxPattern]=\"this.spxType() === 'overlaynumber' ? '[0-9]*' : this.spxPattern()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxSuggestions]=\"this.spxSuggestions()\"\n [spxType]=\"this.spxType()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputText\n ></spx-input-text>\n } @if (this.spxType() === 'date') {\n <spx-input-date\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutoFocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxMax]=\"this.spxMax()!\"\n [spxMin]=\"this.spxMin()!\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxSelectDay]=\"this.spxSelectDay()\"\n [spxSelectMonth]=\"this.spxSelectMonth()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputDate\n ></spx-input-date>\n } @if (this.spxType() === 'float') {\n <spx-input-float\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxStep]=\"this.spxStep()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputFloat\n ></spx-input-float>\n } @if (this.spxType() === 'number') {\n <spx-input-number\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxInputMode()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxStep]=\"this.spxStep()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputNumber\n ></spx-input-number>\n } @if (this.spxType() === 'radio') {\n <spx-input-radio\n (valueChange)=\"handleChangeEvent($event)\"\n [spxElementId]=\"this.spxElementId()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxShowLabel]=\"this.spxShowLabel()\"\n [spxSuggestions]=\"this.spxSuggestions()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputRadio\n ></spx-input-radio>\n } @if (this.spxType() === 'time') {\n <spx-input-time\n (valueChange)=\"handleChangeEvent($event)\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputTime\n ></spx-input-time>\n }\n </div>\n <div validation-messages>\n <ng-content></ng-content>\n </div>\n</spx-input-box>\n", dependencies: [{ kind: "component", type: SpxInputBoxComponent, selector: "spx-input-box", inputs: ["spxCompact", "spxLabel", "spxName", "spxReadonly", "spxRequired", "spxShowClear", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxShowSearch", "spxShowValidationMessages", "spxAlert", "spxValue"], outputs: ["spxValueChange", "spxClear", "spxSearch", "spxEdit", "spxHelp", "spxSetIdInParent"] }, { kind: "component", type: SpxInputDateComponent, selector: "spx-input-date", inputs: ["spxMax", "spxMin", "spxReadonly", "spxValidators", "spxAutoFocus", "value", "spxSelectDay", "spxSelectMonth", "spxElementId", "spxSuggestions"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputFloatComponent, selector: "spx-input-float", inputs: ["spxName", "spxAutofocus", "spxElementId", "spxReadonly", "spxValidators", "spxStep", "value", "spxWasInternalUpdate"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputNumberComponent, selector: "spx-input-number", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value", "spxElementId"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputRadioComponent, selector: "spx-input-radio", inputs: ["spxName", "spxValidators", "spxShowLabel", "spxReadonly", "spxSuggestions", "value", "spxElementId"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputTextComponent, selector: "spx-input-text", inputs: ["spxSpeedDial", "spxName", "spxAutofocus", "spxAutocomplete", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "spxType", "spxWasInternalUpdate", "value", "spxElementId"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputTimeComponent, selector: "spx-input-time", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "value"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1124
+ ], viewQueries: [{ propertyName: "floatInput", first: true, predicate: ["spxInputFloat"], descendants: true, isSignal: true }, { propertyName: "numberInput", first: true, predicate: ["spxInputNumber"], descendants: true, isSignal: true }, { propertyName: "textInput", first: true, predicate: ["spxInputText"], descendants: true, isSignal: true }, { propertyName: "timeInput", first: true, predicate: ["spxInputTime"], descendants: true, isSignal: true }, { propertyName: "radioInput", first: true, predicate: ["spxInputRadio"], descendants: true, isSignal: true }, { propertyName: "dateInput", first: true, predicate: ["spxInputDate"], descendants: true, isSignal: true }, { propertyName: "cycleInput", first: true, predicate: ["spxInputCycle"], descendants: true, isSignal: true }], ngImport: i0, template: "<spx-input-box\n (spxClear)=\"this.handleClear()\"\n (spxEdit)=\"this.handleEdit()\"\n (spxHelp)=\"this.handleHelp()\"\n (spxSearch)=\"this.handleSearch()\"\n (spxSetIdInParent)=\"handleSpxElementIdSet($event)\"\n [spxAlert]=\"this.spxAlert()\"\n [spxCompact]=\"this.spxCompact()\"\n [spxLabel]=\"this.spxLabel()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.spxReadonly()\"\n [spxRequired]=\"this.spxRequired()\"\n [spxShowClear]=\"this.spxShowClear()\"\n [spxShowEdit]=\"this.spxShowEdit()\"\n [spxShowHelp]=\"this.spxShowHelp()\"\n [spxShowLabel]=\"this.spxShowLabel()\"\n [spxShowSearch]=\"this.spxShowSearch() ? this.spxShowSearch() : this.spxType() === 'autocomplete'\"\n [spxShowValidationMessages]=\"this.spxShowValidationMessages()\"\n [spxValue]=\"this.value()\"\n>\n <div controls>\n @if (this.spxType() === 'autocomplete' || this.spxType() === 'overlay' ||\n this.spxType() === 'overlaynumber' || this.spxType() === 'text' ||\n this.spxType() === 'password') {\n <spx-input-text\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutocomplete]=\"this.spxAutocomplete() ? this.spxAutocomplete() : undefined\"\n [spxSpeedDial]=\"this.spxSpeedDial()\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxCapitalize]=\"this.spxCapitalize()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxType() === 'overlaynumber' ? 'numeric' : this.spxInputMode()\"\n [spxName]=\"this.mappedName()\"\n [spxPattern]=\"this.spxType() === 'overlaynumber' ? '[0-9]*' : this.spxPattern()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxSuggestions]=\"this.spxSuggestions()\"\n [spxType]=\"this.spxType()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputText\n ></spx-input-text>\n } @if (this.spxType() === 'cycle' || this.spxType() === 'cycleNumeric') {\n <spx-input-cycle\n (valueChange)=\"handleChangeEvent($event)\"\n [spxCycleConfig]=\"this.spxCycleConfig()!\"\n [spxSpeedDial]=\"this.spxSpeedDial()\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxCapitalize]=\"this.spxCapitalize()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxType() === 'cycleNumeric' ? 'numeric' : 'text'\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxType]=\"this.spxType()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputText\n ></spx-input-cycle>\n } @if (this.spxType() === 'date') {\n <spx-input-date\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutoFocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxMax]=\"this.spxMax()!\"\n [spxMin]=\"this.spxMin()!\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxSelectDay]=\"this.spxSelectDay()\"\n [spxSelectMonth]=\"this.spxSelectMonth()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputDate\n ></spx-input-date>\n } @if (this.spxType() === 'float') {\n <spx-input-float\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxStep]=\"this.spxStep()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputFloat\n ></spx-input-float>\n } @if (this.spxType() === 'number') {\n <spx-input-number\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxInputMode()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxStep]=\"this.spxStep()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputNumber\n ></spx-input-number>\n } @if (this.spxType() === 'radio') {\n <spx-input-radio\n (valueChange)=\"handleChangeEvent($event)\"\n [spxElementId]=\"this.spxElementId()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxShowLabel]=\"this.spxShowLabel()\"\n [spxSuggestions]=\"this.spxSuggestions()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputRadio\n ></spx-input-radio>\n } @if (this.spxType() === 'time') {\n <spx-input-time\n (valueChange)=\"handleChangeEvent($event)\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputTime\n ></spx-input-time>\n }\n </div>\n <div validation-messages>\n <ng-content></ng-content>\n </div>\n</spx-input-box>\n", dependencies: [{ kind: "component", type: SpxInputBoxComponent, selector: "spx-input-box", inputs: ["spxCompact", "spxLabel", "spxName", "spxReadonly", "spxRequired", "spxShowClear", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxShowSearch", "spxShowValidationMessages", "spxAlert", "spxValue"], outputs: ["spxValueChange", "spxClear", "spxSearch", "spxEdit", "spxHelp", "spxSetIdInParent"] }, { kind: "component", type: SpxInputCycleComponent, selector: "spx-input-cycle", inputs: ["spxSpeedDial", "spxName", "spxAutofocus", "spxAutocomplete", "spxCycleConfig", "spxInputMode", "spxReadonly", "spxValidators", "spxCapitalize", "spxType", "spxWasInternalUpdate", "value", "spxElementId"], outputs: ["valueChange", "completeInput"] }, { kind: "component", type: SpxInputDateComponent, selector: "spx-input-date", inputs: ["spxMax", "spxMin", "spxReadonly", "spxValidators", "spxAutoFocus", "value", "spxSelectDay", "spxSelectMonth", "spxElementId", "spxSuggestions"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputFloatComponent, selector: "spx-input-float", inputs: ["spxName", "spxAutofocus", "spxElementId", "spxReadonly", "spxValidators", "spxStep", "value", "spxWasInternalUpdate"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputNumberComponent, selector: "spx-input-number", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value", "spxElementId"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputRadioComponent, selector: "spx-input-radio", inputs: ["spxName", "spxValidators", "spxShowLabel", "spxReadonly", "spxSuggestions", "value", "spxElementId"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputTextComponent, selector: "spx-input-text", inputs: ["spxSpeedDial", "spxName", "spxAutofocus", "spxAutocomplete", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "spxType", "spxWasInternalUpdate", "value", "spxElementId"], outputs: ["valueChange"] }, { kind: "component", type: SpxInputTimeComponent, selector: "spx-input-time", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "value"], outputs: ["valueChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
991
1125
  }
992
1126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: SpxInputComponent, decorators: [{
993
1127
  type: Component,
@@ -995,6 +1129,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImpor
995
1129
  '(spxChange)': 'handleChangeEvent($event)'
996
1130
  }, imports: [
997
1131
  SpxInputBoxComponent,
1132
+ SpxInputCycleComponent,
998
1133
  SpxInputDateComponent,
999
1134
  SpxInputFloatComponent,
1000
1135
  SpxInputNumberComponent,
@@ -1007,7 +1142,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImpor
1007
1142
  useExisting: SpxInputComponent,
1008
1143
  multi: true
1009
1144
  }
1010
- ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<spx-input-box\n (spxClear)=\"this.handleClear()\"\n (spxEdit)=\"this.handleEdit()\"\n (spxHelp)=\"this.handleHelp()\"\n (spxSearch)=\"this.handleSearch()\"\n (spxSetIdInParent)=\"handleSpxElementIdSet($event)\"\n [spxAlert]=\"this.spxAlert()\"\n [spxCompact]=\"this.spxCompact()\"\n [spxLabel]=\"this.spxLabel()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.spxReadonly()\"\n [spxRequired]=\"this.spxRequired()\"\n [spxShowClear]=\"this.spxShowClear()\"\n [spxShowEdit]=\"this.spxShowEdit()\"\n [spxShowHelp]=\"this.spxShowHelp()\"\n [spxShowLabel]=\"this.spxShowLabel()\"\n [spxShowSearch]=\"this.spxShowSearch() ? this.spxShowSearch() : this.spxType() === 'autocomplete'\"\n [spxShowValidationMessages]=\"this.spxShowValidationMessages()\"\n [spxValue]=\"this.value()\"\n>\n <div controls>\n @if (this.spxType() === 'autocomplete' || this.spxType() === 'overlay' ||\n this.spxType() === 'overlaynumber' || this.spxType() === 'text' ||\n this.spxType() === 'password') {\n <spx-input-text\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutocomplete]=\"this.spxAutocomplete() ? this.spxAutocomplete() : undefined\"\n [spxSpeedDial]=\"this.spxSpeedDial()\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxCapitalize]=\"this.spxCapitalize()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxType() === 'overlaynumber' ? 'numeric' : this.spxInputMode()\"\n [spxName]=\"this.mappedName()\"\n [spxPattern]=\"this.spxType() === 'overlaynumber' ? '[0-9]*' : this.spxPattern()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxSuggestions]=\"this.spxSuggestions()\"\n [spxType]=\"this.spxType()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputText\n ></spx-input-text>\n } @if (this.spxType() === 'date') {\n <spx-input-date\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutoFocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxMax]=\"this.spxMax()!\"\n [spxMin]=\"this.spxMin()!\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxSelectDay]=\"this.spxSelectDay()\"\n [spxSelectMonth]=\"this.spxSelectMonth()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputDate\n ></spx-input-date>\n } @if (this.spxType() === 'float') {\n <spx-input-float\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxStep]=\"this.spxStep()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputFloat\n ></spx-input-float>\n } @if (this.spxType() === 'number') {\n <spx-input-number\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxInputMode()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxStep]=\"this.spxStep()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputNumber\n ></spx-input-number>\n } @if (this.spxType() === 'radio') {\n <spx-input-radio\n (valueChange)=\"handleChangeEvent($event)\"\n [spxElementId]=\"this.spxElementId()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxShowLabel]=\"this.spxShowLabel()\"\n [spxSuggestions]=\"this.spxSuggestions()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputRadio\n ></spx-input-radio>\n } @if (this.spxType() === 'time') {\n <spx-input-time\n (valueChange)=\"handleChangeEvent($event)\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputTime\n ></spx-input-time>\n }\n </div>\n <div validation-messages>\n <ng-content></ng-content>\n </div>\n</spx-input-box>\n" }]
1145
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<spx-input-box\n (spxClear)=\"this.handleClear()\"\n (spxEdit)=\"this.handleEdit()\"\n (spxHelp)=\"this.handleHelp()\"\n (spxSearch)=\"this.handleSearch()\"\n (spxSetIdInParent)=\"handleSpxElementIdSet($event)\"\n [spxAlert]=\"this.spxAlert()\"\n [spxCompact]=\"this.spxCompact()\"\n [spxLabel]=\"this.spxLabel()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.spxReadonly()\"\n [spxRequired]=\"this.spxRequired()\"\n [spxShowClear]=\"this.spxShowClear()\"\n [spxShowEdit]=\"this.spxShowEdit()\"\n [spxShowHelp]=\"this.spxShowHelp()\"\n [spxShowLabel]=\"this.spxShowLabel()\"\n [spxShowSearch]=\"this.spxShowSearch() ? this.spxShowSearch() : this.spxType() === 'autocomplete'\"\n [spxShowValidationMessages]=\"this.spxShowValidationMessages()\"\n [spxValue]=\"this.value()\"\n>\n <div controls>\n @if (this.spxType() === 'autocomplete' || this.spxType() === 'overlay' ||\n this.spxType() === 'overlaynumber' || this.spxType() === 'text' ||\n this.spxType() === 'password') {\n <spx-input-text\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutocomplete]=\"this.spxAutocomplete() ? this.spxAutocomplete() : undefined\"\n [spxSpeedDial]=\"this.spxSpeedDial()\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxCapitalize]=\"this.spxCapitalize()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxType() === 'overlaynumber' ? 'numeric' : this.spxInputMode()\"\n [spxName]=\"this.mappedName()\"\n [spxPattern]=\"this.spxType() === 'overlaynumber' ? '[0-9]*' : this.spxPattern()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxSuggestions]=\"this.spxSuggestions()\"\n [spxType]=\"this.spxType()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputText\n ></spx-input-text>\n } @if (this.spxType() === 'cycle' || this.spxType() === 'cycleNumeric') {\n <spx-input-cycle\n (valueChange)=\"handleChangeEvent($event)\"\n [spxCycleConfig]=\"this.spxCycleConfig()!\"\n [spxSpeedDial]=\"this.spxSpeedDial()\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxCapitalize]=\"this.spxCapitalize()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxType() === 'cycleNumeric' ? 'numeric' : 'text'\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxType]=\"this.spxType()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputText\n ></spx-input-cycle>\n } @if (this.spxType() === 'date') {\n <spx-input-date\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutoFocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxMax]=\"this.spxMax()!\"\n [spxMin]=\"this.spxMin()!\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxSelectDay]=\"this.spxSelectDay()\"\n [spxSelectMonth]=\"this.spxSelectMonth()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputDate\n ></spx-input-date>\n } @if (this.spxType() === 'float') {\n <spx-input-float\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxStep]=\"this.spxStep()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputFloat\n ></spx-input-float>\n } @if (this.spxType() === 'number') {\n <spx-input-number\n (valueChange)=\"handleChangeEvent($event)\"\n [spxAutofocus]=\"this.spxAutofocus()\"\n [spxElementId]=\"this.spxElementId()\"\n [spxInputMode]=\"this.spxInputMode()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxStep]=\"this.spxStep()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputNumber\n ></spx-input-number>\n } @if (this.spxType() === 'radio') {\n <spx-input-radio\n (valueChange)=\"handleChangeEvent($event)\"\n [spxElementId]=\"this.spxElementId()\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxShowLabel]=\"this.spxShowLabel()\"\n [spxSuggestions]=\"this.spxSuggestions()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputRadio\n ></spx-input-radio>\n } @if (this.spxType() === 'time') {\n <spx-input-time\n (valueChange)=\"handleChangeEvent($event)\"\n [spxName]=\"this.mappedName()\"\n [spxReadonly]=\"this.mappedReadonly()\"\n [spxValidators]=\"this.spxValidators()\"\n [value]=\"value()\"\n #spxInputTime\n ></spx-input-time>\n }\n </div>\n <div validation-messages>\n <ng-content></ng-content>\n </div>\n</spx-input-box>\n" }]
1011
1146
  }], propDecorators: { _handleBlurEvent: [{
1012
1147
  type: HostListener,
1013
1148
  args: ['focusout']