@softpak/components 0.1.3-beta.1 → 0.1.3-beta.11
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-form-view/spx-form-view.component.mjs +3 -3
- package/esm2022/spx-inputs/spx-input-time-modal.component.mjs +112 -0
- package/esm2022/spx-inputs/spx-input-time.component.mjs +173 -0
- package/esm2022/spx-inputs/spx-input-type.enum.mjs +2 -1
- package/esm2022/spx-inputs/spx-input.component.mjs +33 -3
- package/esm2022/spx-spinner/spx-spinner.component.mjs +3 -3
- package/fesm2022/softpak-components-spx-form-view.mjs +2 -2
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +304 -4
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-spinner.mjs +2 -2
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/package.json +3 -3
- package/spx-inputs/spx-input-time-modal.component.d.ts +17 -0
- package/spx-inputs/spx-input-time.component.d.ts +43 -0
- package/spx-inputs/spx-input-type.enum.d.ts +2 -1
- package/spx-inputs/spx-input.component.d.ts +2 -0
- package/tailwind.css +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgIf, NgFor } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { EventEmitter, Component, Input, Output, HostListener, ViewChild } from '@angular/core';
|
|
3
|
+
import { EventEmitter, Component, Input, Output, HostListener, ViewChild, inject } from '@angular/core';
|
|
4
4
|
import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
5
5
|
import * as i1 from '@fortawesome/angular-fontawesome';
|
|
6
6
|
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
@@ -12,7 +12,8 @@ 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
|
+
import { valuePairToValue, SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
16
|
+
import { ModalController, IonButtons, IonContent, IonHeader, IonToolbar, IonTitle } from '@ionic/angular/standalone';
|
|
16
17
|
|
|
17
18
|
class SpxInputBoxComponent {
|
|
18
19
|
handleFocusIn(ev) {
|
|
@@ -1166,8 +1167,278 @@ var SpxInputTypeEnum;
|
|
|
1166
1167
|
SpxInputTypeEnum["password"] = "password";
|
|
1167
1168
|
SpxInputTypeEnum["text"] = "text";
|
|
1168
1169
|
SpxInputTypeEnum["textNumericKeyboard"] = "textNumericKeyboard";
|
|
1170
|
+
SpxInputTypeEnum["time"] = "time";
|
|
1169
1171
|
})(SpxInputTypeEnum || (SpxInputTypeEnum = {}));
|
|
1170
1172
|
|
|
1173
|
+
class SpxInputTimeModalComponent {
|
|
1174
|
+
constructor() {
|
|
1175
|
+
this.change = new EventEmitter();
|
|
1176
|
+
this.hourOptions = Array.from({ length: 24 }, (_, i) => i); // 0 to 23
|
|
1177
|
+
this.minuteOptions = Array.from({ length: 12 }, (_, i) => i * 5); // Minutes in incrementen van 5
|
|
1178
|
+
this.modalController = inject(ModalController);
|
|
1179
|
+
this.typeError = SpxSeverityEnum.error;
|
|
1180
|
+
this.hourOptions.push(this.hourOptions.shift());
|
|
1181
|
+
}
|
|
1182
|
+
closeDialog() {
|
|
1183
|
+
this.modalController.dismiss();
|
|
1184
|
+
}
|
|
1185
|
+
onChange(value) {
|
|
1186
|
+
this.change.emit(value);
|
|
1187
|
+
this.modalController.dismiss(value);
|
|
1188
|
+
}
|
|
1189
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputTimeModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1190
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: SpxInputTimeModalComponent, isStandalone: true, selector: "spx-input-time-modal", inputs: { view: "view", value: "value" }, outputs: { change: "change" }, ngImport: i0, template: `<ion-header>
|
|
1191
|
+
<ion-toolbar>
|
|
1192
|
+
<ion-title>Inline Modal</ion-title>
|
|
1193
|
+
<ion-buttons slot="end">
|
|
1194
|
+
<spx-button [spxSeverity]="typeError" (spxClick)="closeDialog()">Close</spx-button>
|
|
1195
|
+
</ion-buttons>
|
|
1196
|
+
</ion-toolbar>
|
|
1197
|
+
</ion-header>
|
|
1198
|
+
<ion-content class="ion-padding">
|
|
1199
|
+
<!-- Uren -->
|
|
1200
|
+
<div class="grid grid-cols-1 gap-3">
|
|
1201
|
+
<div *ngIf="view === 'hours'" class="flex-wrap gap-2">
|
|
1202
|
+
<p> Select Hour </p>
|
|
1203
|
+
<div class="grid grid-cols-4 gap-3">
|
|
1204
|
+
<div *ngFor="let hour of hourOptions" class="custom-square rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none bg-sky-100 focus:ring-sky-300 hover:bg-sky-300 active:bg-sky-300" [class.selected]="value === hour" (click)="onChange(hour)">
|
|
1205
|
+
{{ hour }}
|
|
1206
|
+
</div>
|
|
1207
|
+
</div>
|
|
1208
|
+
</div>
|
|
1209
|
+
<!-- Minuten -->
|
|
1210
|
+
<div *ngIf="view === 'minutes'" class="grid grid-cols-1 gap-3">
|
|
1211
|
+
<p>Select Minute</p>
|
|
1212
|
+
<div class="grid grid-cols-5 gap-3">
|
|
1213
|
+
<div *ngFor="let minute of minuteOptions" class="custom-square rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none bg-sky-100 focus:ring-sky-300 hover:bg-sky-300 active:bg-sky-300" [class.selected]="value === minute" (click)="onChange(minute)">
|
|
1214
|
+
{{ minute }}
|
|
1215
|
+
</div>
|
|
1216
|
+
</div>
|
|
1217
|
+
</div>
|
|
1218
|
+
</div>
|
|
1219
|
+
</ion-content>
|
|
1220
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }] }); }
|
|
1221
|
+
}
|
|
1222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputTimeModalComponent, decorators: [{
|
|
1223
|
+
type: Component,
|
|
1224
|
+
args: [{
|
|
1225
|
+
selector: 'spx-input-time-modal',
|
|
1226
|
+
standalone: true,
|
|
1227
|
+
imports: [
|
|
1228
|
+
NgIf,
|
|
1229
|
+
NgFor,
|
|
1230
|
+
IonButtons,
|
|
1231
|
+
IonContent,
|
|
1232
|
+
IonHeader,
|
|
1233
|
+
IonToolbar,
|
|
1234
|
+
IonTitle,
|
|
1235
|
+
SpxButtonComponent,
|
|
1236
|
+
SpxDropdownComponent,
|
|
1237
|
+
],
|
|
1238
|
+
template: `<ion-header>
|
|
1239
|
+
<ion-toolbar>
|
|
1240
|
+
<ion-title>Inline Modal</ion-title>
|
|
1241
|
+
<ion-buttons slot="end">
|
|
1242
|
+
<spx-button [spxSeverity]="typeError" (spxClick)="closeDialog()">Close</spx-button>
|
|
1243
|
+
</ion-buttons>
|
|
1244
|
+
</ion-toolbar>
|
|
1245
|
+
</ion-header>
|
|
1246
|
+
<ion-content class="ion-padding">
|
|
1247
|
+
<!-- Uren -->
|
|
1248
|
+
<div class="grid grid-cols-1 gap-3">
|
|
1249
|
+
<div *ngIf="view === 'hours'" class="flex-wrap gap-2">
|
|
1250
|
+
<p> Select Hour </p>
|
|
1251
|
+
<div class="grid grid-cols-4 gap-3">
|
|
1252
|
+
<div *ngFor="let hour of hourOptions" class="custom-square rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none bg-sky-100 focus:ring-sky-300 hover:bg-sky-300 active:bg-sky-300" [class.selected]="value === hour" (click)="onChange(hour)">
|
|
1253
|
+
{{ hour }}
|
|
1254
|
+
</div>
|
|
1255
|
+
</div>
|
|
1256
|
+
</div>
|
|
1257
|
+
<!-- Minuten -->
|
|
1258
|
+
<div *ngIf="view === 'minutes'" class="grid grid-cols-1 gap-3">
|
|
1259
|
+
<p>Select Minute</p>
|
|
1260
|
+
<div class="grid grid-cols-5 gap-3">
|
|
1261
|
+
<div *ngFor="let minute of minuteOptions" class="custom-square rounded text-gray-900 text-sm p-3 w-full text-left truncate outline-none bg-sky-100 focus:ring-sky-300 hover:bg-sky-300 active:bg-sky-300" [class.selected]="value === minute" (click)="onChange(minute)">
|
|
1262
|
+
{{ minute }}
|
|
1263
|
+
</div>
|
|
1264
|
+
</div>
|
|
1265
|
+
</div>
|
|
1266
|
+
</div>
|
|
1267
|
+
</ion-content>
|
|
1268
|
+
`,
|
|
1269
|
+
}]
|
|
1270
|
+
}], ctorParameters: () => [], propDecorators: { view: [{
|
|
1271
|
+
type: Input
|
|
1272
|
+
}], value: [{
|
|
1273
|
+
type: Input
|
|
1274
|
+
}], change: [{
|
|
1275
|
+
type: Output
|
|
1276
|
+
}] } });
|
|
1277
|
+
|
|
1278
|
+
class SpxInputTimeComponent {
|
|
1279
|
+
constructor() {
|
|
1280
|
+
this.spxAutofocus = false;
|
|
1281
|
+
this.spxSuggestions = [];
|
|
1282
|
+
this.spxReadonly = false;
|
|
1283
|
+
this.spxCapitalize = false;
|
|
1284
|
+
this.spxFocused = true;
|
|
1285
|
+
this.spxBlurFromChild = new EventEmitter();
|
|
1286
|
+
this.spxChange = new EventEmitter();
|
|
1287
|
+
this.spxFocus = new EventEmitter();
|
|
1288
|
+
this.spxWasInternalUpdate = false;
|
|
1289
|
+
this.modalController = inject(ModalController);
|
|
1290
|
+
this.severitySuccess = SpxSeverityEnum.success;
|
|
1291
|
+
this.hourOptions = Array.from({ length: 24 }, (_, i) => i).unshift(); // 0 to 23
|
|
1292
|
+
this.minuteOptions = Array.from({ length: 12 }, (_, i) => i * 5); // Minutes in incrementen van 5
|
|
1293
|
+
this.selectedHour = null;
|
|
1294
|
+
this.selectedMinute = null;
|
|
1295
|
+
}
|
|
1296
|
+
get formattedHour() {
|
|
1297
|
+
return this.selectedHour !== null && this.selectedHour < 10 ? `0${this.selectedHour}` : this.selectedHour;
|
|
1298
|
+
}
|
|
1299
|
+
get formattedMinute() {
|
|
1300
|
+
return this.selectedMinute !== null && this.selectedMinute < 10 ? `0${this.selectedMinute}` : this.selectedMinute;
|
|
1301
|
+
}
|
|
1302
|
+
get hour() { return this.value?.value ? DateTime.fromISO(this.value.value).hour : null; }
|
|
1303
|
+
get minute() { return this.value?.value ? DateTime.fromISO(this.value.value).minute : null; }
|
|
1304
|
+
spxSetFocus() {
|
|
1305
|
+
this.inputRef?.nativeElement?.focus();
|
|
1306
|
+
}
|
|
1307
|
+
componentDidLoad() {
|
|
1308
|
+
if (this.spxAutofocus) {
|
|
1309
|
+
this.spxFocus.emit();
|
|
1310
|
+
this.spxSetFocus();
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
handleBlur() {
|
|
1314
|
+
this.spxBlurFromChild.emit();
|
|
1315
|
+
}
|
|
1316
|
+
handleFocus() {
|
|
1317
|
+
this.spxFocus.emit();
|
|
1318
|
+
}
|
|
1319
|
+
handleDescriptionInput(event) {
|
|
1320
|
+
this.value = {
|
|
1321
|
+
description: event.target ? event.target.value : null,
|
|
1322
|
+
value: event.target ? event.target.value : null,
|
|
1323
|
+
};
|
|
1324
|
+
this.spxChange.emit(this.value);
|
|
1325
|
+
}
|
|
1326
|
+
handleSuggestionClick(value) {
|
|
1327
|
+
if (!this.spxReadonly) {
|
|
1328
|
+
this.value = value;
|
|
1329
|
+
this.spxChange.emit(this.value);
|
|
1330
|
+
this.spxFocused = false;
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
handleKeyUp() {
|
|
1334
|
+
this.spxFocused = true;
|
|
1335
|
+
}
|
|
1336
|
+
async openDialog(view) {
|
|
1337
|
+
const modal = await this.modalController.create({
|
|
1338
|
+
component: SpxInputTimeModalComponent,
|
|
1339
|
+
componentProps: {
|
|
1340
|
+
value: this.value?.value ?
|
|
1341
|
+
(view === 'hours' ? DateTime.fromISO(this.value.value).hour : DateTime.fromISO(this.value.value).minute) : undefined,
|
|
1342
|
+
view,
|
|
1343
|
+
},
|
|
1344
|
+
});
|
|
1345
|
+
modal.onDidDismiss().then(() => {
|
|
1346
|
+
// this.appStore.dispatch(infArticleActions.reset({}));
|
|
1347
|
+
if (view === 'hours') {
|
|
1348
|
+
console.log('hours');
|
|
1349
|
+
}
|
|
1350
|
+
else {
|
|
1351
|
+
console.log('minutes');
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
// const { data } = await modal.onDidDismiss();
|
|
1355
|
+
// console.log(data);
|
|
1356
|
+
// if (data) {
|
|
1357
|
+
// if (view === 'hours') {
|
|
1358
|
+
// this.selectedHour = data; // Update selectedHour with the emitted value
|
|
1359
|
+
// console.log('dit is de uur weg');
|
|
1360
|
+
// } else if (view === 'minutes') {
|
|
1361
|
+
// this.selectedMinute = data; // Update selectedMinute with the emitted value
|
|
1362
|
+
// console.log('dit is de minuut weg');
|
|
1363
|
+
// }
|
|
1364
|
+
// this.updateValue(); // Call updateValue to format and emit the new time
|
|
1365
|
+
// }
|
|
1366
|
+
await modal.present();
|
|
1367
|
+
}
|
|
1368
|
+
updateValue() {
|
|
1369
|
+
if (this.selectedHour !== null && this.selectedMinute !== null) {
|
|
1370
|
+
const formattedHour = this.selectedHour < 10 ? `0${this.selectedHour}` : this.selectedHour;
|
|
1371
|
+
const formattedMinute = this.selectedMinute < 10 ? `0${this.selectedMinute}` : this.selectedMinute;
|
|
1372
|
+
const newValue = `${formattedHour}:${formattedMinute}`;
|
|
1373
|
+
this.value = {
|
|
1374
|
+
description: newValue,
|
|
1375
|
+
value: newValue,
|
|
1376
|
+
};
|
|
1377
|
+
this.spxChange.emit(this.value);
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputTimeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1381
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: SpxInputTimeComponent, isStandalone: true, selector: "spx-input-time", inputs: { spxName: "spxName", spxAutofocus: "spxAutofocus", spxInputMode: "spxInputMode", spxPattern: "spxPattern", spxSuggestions: "spxSuggestions", spxReadonly: "spxReadonly", spxValidators: "spxValidators", spxCapitalize: "spxCapitalize", spxFocused: "spxFocused", spxType: "spxType", value: "value", spxWasInternalUpdate: "spxWasInternalUpdate" }, outputs: { spxBlurFromChild: "spxBlurFromChild", spxChange: "spxChange", spxFocus: "spxFocus" }, providers: [
|
|
1382
|
+
ModalController,
|
|
1383
|
+
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: `<div class="relative text-black">
|
|
1384
|
+
<div class="flex items-center justify-around gap-3">
|
|
1385
|
+
<div class="grow rounded bg-gray-100 p-3 text-xl text-center font-bold" (click)="openDialog('hours')">{{ hour }}</div>
|
|
1386
|
+
<div class="text-gray text-xl">:</div>
|
|
1387
|
+
<div class="grow rounded bg-gray-100 p-3 text-xl text-center font-bold" (click)="openDialog('minutes')">{{ minute }}</div>
|
|
1388
|
+
</div>
|
|
1389
|
+
</div>`, isInline: true, styles: [".custom-square.selected{background-color:#007bff;color:#fff;border-color:#007bff}\n"] }); }
|
|
1390
|
+
}
|
|
1391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputTimeComponent, decorators: [{
|
|
1392
|
+
type: Component,
|
|
1393
|
+
args: [{ selector: 'spx-input-time', standalone: true, imports: [
|
|
1394
|
+
NgIf,
|
|
1395
|
+
NgFor,
|
|
1396
|
+
SpxButtonComponent,
|
|
1397
|
+
SpxDropdownComponent,
|
|
1398
|
+
], providers: [
|
|
1399
|
+
ModalController,
|
|
1400
|
+
], template: `<div class="relative text-black">
|
|
1401
|
+
<div class="flex items-center justify-around gap-3">
|
|
1402
|
+
<div class="grow rounded bg-gray-100 p-3 text-xl text-center font-bold" (click)="openDialog('hours')">{{ hour }}</div>
|
|
1403
|
+
<div class="text-gray text-xl">:</div>
|
|
1404
|
+
<div class="grow rounded bg-gray-100 p-3 text-xl text-center font-bold" (click)="openDialog('minutes')">{{ minute }}</div>
|
|
1405
|
+
</div>
|
|
1406
|
+
</div>`, styles: [".custom-square.selected{background-color:#007bff;color:#fff;border-color:#007bff}\n"] }]
|
|
1407
|
+
}], propDecorators: { spxName: [{
|
|
1408
|
+
type: Input
|
|
1409
|
+
}], spxAutofocus: [{
|
|
1410
|
+
type: Input
|
|
1411
|
+
}], spxInputMode: [{
|
|
1412
|
+
type: Input
|
|
1413
|
+
}], spxPattern: [{
|
|
1414
|
+
type: Input
|
|
1415
|
+
}], spxSuggestions: [{
|
|
1416
|
+
type: Input
|
|
1417
|
+
}], spxReadonly: [{
|
|
1418
|
+
type: Input
|
|
1419
|
+
}], spxValidators: [{
|
|
1420
|
+
type: Input
|
|
1421
|
+
}], spxCapitalize: [{
|
|
1422
|
+
type: Input
|
|
1423
|
+
}], spxFocused: [{
|
|
1424
|
+
type: Input
|
|
1425
|
+
}], spxType: [{
|
|
1426
|
+
type: Input
|
|
1427
|
+
}], value: [{
|
|
1428
|
+
type: Input
|
|
1429
|
+
}], spxBlurFromChild: [{
|
|
1430
|
+
type: Output
|
|
1431
|
+
}], spxChange: [{
|
|
1432
|
+
type: Output
|
|
1433
|
+
}], spxFocus: [{
|
|
1434
|
+
type: Output
|
|
1435
|
+
}], spxWasInternalUpdate: [{
|
|
1436
|
+
type: Input
|
|
1437
|
+
}], inputRef: [{
|
|
1438
|
+
type: ViewChild,
|
|
1439
|
+
args: ['input', { static: true }]
|
|
1440
|
+
}] } });
|
|
1441
|
+
|
|
1171
1442
|
class SpxInputComponent {
|
|
1172
1443
|
constructor() {
|
|
1173
1444
|
this.spxLabel = 'label';
|
|
@@ -1252,6 +1523,9 @@ class SpxInputComponent {
|
|
|
1252
1523
|
case SpxInputTypeEnum.radio:
|
|
1253
1524
|
this.radioInput?.spxFocusIn();
|
|
1254
1525
|
break;
|
|
1526
|
+
case SpxInputTypeEnum.time:
|
|
1527
|
+
this.timeInput?.spxSetFocus();
|
|
1528
|
+
break;
|
|
1255
1529
|
}
|
|
1256
1530
|
}
|
|
1257
1531
|
writeValue(value) {
|
|
@@ -1279,7 +1553,7 @@ class SpxInputComponent {
|
|
|
1279
1553
|
useExisting: SpxInputComponent,
|
|
1280
1554
|
multi: true
|
|
1281
1555
|
}
|
|
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
|
|
1556
|
+
], 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: "timeInput", first: true, predicate: SpxInputTimeComponent, descendants: true }, { propertyName: "radioInput", first: true, predicate: SpxInputRadioComponent, descendants: true }], ngImport: i0, template: `<spx-input-box
|
|
1283
1557
|
[spxFocused]="this.spxFocused"
|
|
1284
1558
|
[spxLabel]="this.spxLabel"
|
|
1285
1559
|
[spxReadonly]="this.spxReadonly"
|
|
@@ -1368,11 +1642,22 @@ class SpxInputComponent {
|
|
|
1368
1642
|
[spxValidators]="this.spxValidators"
|
|
1369
1643
|
[value]="this.value"
|
|
1370
1644
|
></spx-input-radio>
|
|
1645
|
+
<spx-input-time
|
|
1646
|
+
#timeInput
|
|
1647
|
+
*ngIf="this.spxType === 'time'"
|
|
1648
|
+
(spxChange)="this.handleChange($event)"
|
|
1649
|
+
(spxFocus)="this.handleFocus()"
|
|
1650
|
+
[spxFocused]="this.spxFocused"
|
|
1651
|
+
[spxName]="this.spxName"
|
|
1652
|
+
[spxReadonly]="this.spxReadonly"
|
|
1653
|
+
[spxValidators]="this.spxValidators"
|
|
1654
|
+
[value]="this.value"
|
|
1655
|
+
></spx-input-time>
|
|
1371
1656
|
</div>
|
|
1372
1657
|
<div validation-messages>
|
|
1373
1658
|
<ng-content></ng-content>
|
|
1374
1659
|
</div>
|
|
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"] }] }); }
|
|
1660
|
+
</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"] }, { kind: "component", type: SpxInputTimeComponent, selector: "spx-input-time", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "spxFocused", "spxType", "value", "spxWasInternalUpdate"], outputs: ["spxBlurFromChild", "spxChange", "spxFocus"] }] }); }
|
|
1376
1661
|
}
|
|
1377
1662
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputComponent, decorators: [{
|
|
1378
1663
|
type: Component,
|
|
@@ -1390,6 +1675,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
1390
1675
|
SpxInputNumberComponent,
|
|
1391
1676
|
SpxInputRadioComponent,
|
|
1392
1677
|
SpxInputTextComponent,
|
|
1678
|
+
SpxInputTimeComponent,
|
|
1393
1679
|
],
|
|
1394
1680
|
providers: [
|
|
1395
1681
|
{
|
|
@@ -1487,6 +1773,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
1487
1773
|
[spxValidators]="this.spxValidators"
|
|
1488
1774
|
[value]="this.value"
|
|
1489
1775
|
></spx-input-radio>
|
|
1776
|
+
<spx-input-time
|
|
1777
|
+
#timeInput
|
|
1778
|
+
*ngIf="this.spxType === 'time'"
|
|
1779
|
+
(spxChange)="this.handleChange($event)"
|
|
1780
|
+
(spxFocus)="this.handleFocus()"
|
|
1781
|
+
[spxFocused]="this.spxFocused"
|
|
1782
|
+
[spxName]="this.spxName"
|
|
1783
|
+
[spxReadonly]="this.spxReadonly"
|
|
1784
|
+
[spxValidators]="this.spxValidators"
|
|
1785
|
+
[value]="this.value"
|
|
1786
|
+
></spx-input-time>
|
|
1490
1787
|
</div>
|
|
1491
1788
|
<div validation-messages>
|
|
1492
1789
|
<ng-content></ng-content>
|
|
@@ -1564,6 +1861,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
1564
1861
|
}], textInput: [{
|
|
1565
1862
|
type: ViewChild,
|
|
1566
1863
|
args: [SpxInputTextComponent]
|
|
1864
|
+
}], timeInput: [{
|
|
1865
|
+
type: ViewChild,
|
|
1866
|
+
args: [SpxInputTimeComponent]
|
|
1567
1867
|
}], radioInput: [{
|
|
1568
1868
|
type: ViewChild,
|
|
1569
1869
|
args: [SpxInputRadioComponent]
|