@softpak/components 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/spx-app-update/spx-app-update.component.mjs +5 -7
- package/esm2022/spx-change-details/spx-change-details.component.mjs +13 -9
- package/esm2022/spx-form-view/spx-form-view.component.mjs +3 -3
- package/esm2022/spx-inputs/spx-input-time-modal.component.mjs +116 -0
- package/esm2022/spx-inputs/spx-input-time.component.mjs +166 -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-app-update.mjs +4 -6
- package/fesm2022/softpak-components-spx-app-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +13 -9
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- 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 +297 -3
- 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 +13 -13
- package/spx-change-details/spx-change-details.component.d.ts +3 -2
- package/spx-inputs/spx-input-time-modal.component.d.ts +19 -0
- package/spx-inputs/spx-input-time.component.d.ts +45 -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
|
@@ -12,7 +12,10 @@ 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 { faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
17
|
+
import * as i1$1 from '@ionic/angular';
|
|
18
|
+
import { IonicModule } from '@ionic/angular';
|
|
16
19
|
|
|
17
20
|
class SpxInputBoxComponent {
|
|
18
21
|
handleFocusIn(ev) {
|
|
@@ -1166,8 +1169,270 @@ var SpxInputTypeEnum;
|
|
|
1166
1169
|
SpxInputTypeEnum["password"] = "password";
|
|
1167
1170
|
SpxInputTypeEnum["text"] = "text";
|
|
1168
1171
|
SpxInputTypeEnum["textNumericKeyboard"] = "textNumericKeyboard";
|
|
1172
|
+
SpxInputTypeEnum["time"] = "time";
|
|
1169
1173
|
})(SpxInputTypeEnum || (SpxInputTypeEnum = {}));
|
|
1170
1174
|
|
|
1175
|
+
class SpxInputTimeModalComponent {
|
|
1176
|
+
constructor(modalController) {
|
|
1177
|
+
this.modalController = modalController;
|
|
1178
|
+
this.change = new EventEmitter();
|
|
1179
|
+
this.faXmark = faXmark;
|
|
1180
|
+
this.hourOptions = Array.from({ length: 24 }, (_, i) => i); // 0 to 23
|
|
1181
|
+
this.minuteOptions = Array.from({ length: 12 }, (_, i) => i * 5); // Minutes in incrementen van 5
|
|
1182
|
+
this.typeError = SpxSeverityEnum.error;
|
|
1183
|
+
this.hourOptions.push(this.hourOptions.shift());
|
|
1184
|
+
this.minuteOptions.push(this.minuteOptions.shift());
|
|
1185
|
+
}
|
|
1186
|
+
closeDialog() {
|
|
1187
|
+
this.modalController.dismiss();
|
|
1188
|
+
}
|
|
1189
|
+
onChange(value) {
|
|
1190
|
+
this.change.emit(value);
|
|
1191
|
+
console.log(value);
|
|
1192
|
+
this.modalController.dismiss(value);
|
|
1193
|
+
}
|
|
1194
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputTimeModalComponent, deps: [{ token: i1$1.ModalController }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1195
|
+
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>
|
|
1196
|
+
<ion-toolbar>
|
|
1197
|
+
<ion-title>Select {{view}}</ion-title>
|
|
1198
|
+
<ion-buttons slot="end">
|
|
1199
|
+
<spx-button [spxSeverity]="typeError" (spxClick)="closeDialog()">
|
|
1200
|
+
<fa-icon [icon]="faXmark"></fa-icon>
|
|
1201
|
+
</spx-button>
|
|
1202
|
+
</ion-buttons>
|
|
1203
|
+
</ion-toolbar>
|
|
1204
|
+
</ion-header>
|
|
1205
|
+
<ion-content class="ion-padding bg-white">
|
|
1206
|
+
<!-- Uren -->
|
|
1207
|
+
<div class="custom-bg grid grid-cols-1 gap-3">
|
|
1208
|
+
<div *ngIf="view === 'hours'" class="flex-wrap gap-2">
|
|
1209
|
+
<div class="grid grid-cols-3 md:grid-cols-4 gap-3">
|
|
1210
|
+
<div *ngFor="let hour of hourOptions" class="text-center font-bold custom-square rounded text-gray-900 text-lg p-3 w-full 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)">
|
|
1211
|
+
{{ hour }}
|
|
1212
|
+
</div>
|
|
1213
|
+
</div>
|
|
1214
|
+
</div>
|
|
1215
|
+
<!-- Minuten -->
|
|
1216
|
+
<div *ngIf="view === 'minutes'" class="grid grid-cols-1 gap-3">
|
|
1217
|
+
<div class="grid grid-cols-4 md:grid-cols-5 gap-3">
|
|
1218
|
+
<div *ngFor="let minute of minuteOptions" class="text-center font-bold custom-square rounded text-gray-900 text-lg p-3 w-ful 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)">
|
|
1219
|
+
{{ minute }}
|
|
1220
|
+
</div>
|
|
1221
|
+
</div>
|
|
1222
|
+
</div>
|
|
1223
|
+
</div>
|
|
1224
|
+
</ion-content>
|
|
1225
|
+
`, 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: "ngmodule", type: IonicModule }, { kind: "component", type: i1$1.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i1$1.IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: i1$1.IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: i1$1.IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: i1$1.IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }] }); }
|
|
1226
|
+
}
|
|
1227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputTimeModalComponent, decorators: [{
|
|
1228
|
+
type: Component,
|
|
1229
|
+
args: [{
|
|
1230
|
+
selector: 'spx-input-time-modal',
|
|
1231
|
+
standalone: true,
|
|
1232
|
+
imports: [
|
|
1233
|
+
NgIf,
|
|
1234
|
+
NgFor,
|
|
1235
|
+
IonicModule,
|
|
1236
|
+
SpxButtonComponent,
|
|
1237
|
+
SpxDropdownComponent,
|
|
1238
|
+
FontAwesomeModule,
|
|
1239
|
+
],
|
|
1240
|
+
template: `<ion-header>
|
|
1241
|
+
<ion-toolbar>
|
|
1242
|
+
<ion-title>Select {{view}}</ion-title>
|
|
1243
|
+
<ion-buttons slot="end">
|
|
1244
|
+
<spx-button [spxSeverity]="typeError" (spxClick)="closeDialog()">
|
|
1245
|
+
<fa-icon [icon]="faXmark"></fa-icon>
|
|
1246
|
+
</spx-button>
|
|
1247
|
+
</ion-buttons>
|
|
1248
|
+
</ion-toolbar>
|
|
1249
|
+
</ion-header>
|
|
1250
|
+
<ion-content class="ion-padding bg-white">
|
|
1251
|
+
<!-- Uren -->
|
|
1252
|
+
<div class="custom-bg grid grid-cols-1 gap-3">
|
|
1253
|
+
<div *ngIf="view === 'hours'" class="flex-wrap gap-2">
|
|
1254
|
+
<div class="grid grid-cols-3 md:grid-cols-4 gap-3">
|
|
1255
|
+
<div *ngFor="let hour of hourOptions" class="text-center font-bold custom-square rounded text-gray-900 text-lg p-3 w-full 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)">
|
|
1256
|
+
{{ hour }}
|
|
1257
|
+
</div>
|
|
1258
|
+
</div>
|
|
1259
|
+
</div>
|
|
1260
|
+
<!-- Minuten -->
|
|
1261
|
+
<div *ngIf="view === 'minutes'" class="grid grid-cols-1 gap-3">
|
|
1262
|
+
<div class="grid grid-cols-4 md:grid-cols-5 gap-3">
|
|
1263
|
+
<div *ngFor="let minute of minuteOptions" class="text-center font-bold custom-square rounded text-gray-900 text-lg p-3 w-ful 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)">
|
|
1264
|
+
{{ minute }}
|
|
1265
|
+
</div>
|
|
1266
|
+
</div>
|
|
1267
|
+
</div>
|
|
1268
|
+
</div>
|
|
1269
|
+
</ion-content>
|
|
1270
|
+
`,
|
|
1271
|
+
}]
|
|
1272
|
+
}], ctorParameters: () => [{ type: i1$1.ModalController }], propDecorators: { view: [{
|
|
1273
|
+
type: Input
|
|
1274
|
+
}], value: [{
|
|
1275
|
+
type: Input
|
|
1276
|
+
}], change: [{
|
|
1277
|
+
type: Output
|
|
1278
|
+
}] } });
|
|
1279
|
+
|
|
1280
|
+
class SpxInputTimeComponent {
|
|
1281
|
+
get formattedHour() {
|
|
1282
|
+
return this.selectedHour !== null && this.selectedHour < 10 ? `0${this.selectedHour}` : this.selectedHour;
|
|
1283
|
+
}
|
|
1284
|
+
get formattedMinute() {
|
|
1285
|
+
return this.selectedMinute !== null && this.selectedMinute < 10 ? `0${this.selectedMinute}` : this.selectedMinute;
|
|
1286
|
+
}
|
|
1287
|
+
get hour() { return this.value?.value ? DateTime.fromISO(this.value.value).hour : null; }
|
|
1288
|
+
get minute() { return this.value?.value ? DateTime.fromISO(this.value.value).minute : null; }
|
|
1289
|
+
constructor(modalController) {
|
|
1290
|
+
this.modalController = modalController;
|
|
1291
|
+
this.spxAutofocus = false;
|
|
1292
|
+
this.spxSuggestions = [];
|
|
1293
|
+
this.spxReadonly = false;
|
|
1294
|
+
this.spxCapitalize = false;
|
|
1295
|
+
this.spxFocused = true;
|
|
1296
|
+
this.spxBlurFromChild = new EventEmitter();
|
|
1297
|
+
this.spxChange = new EventEmitter();
|
|
1298
|
+
this.spxFocus = new EventEmitter();
|
|
1299
|
+
this.spxWasInternalUpdate = false;
|
|
1300
|
+
this.severitySuccess = SpxSeverityEnum.success;
|
|
1301
|
+
this.hourOptions = Array.from({ length: 24 }, (_, i) => i).unshift(); // 0 to 23
|
|
1302
|
+
this.minuteOptions = Array.from({ length: 12 }, (_, i) => i * 5).unshift(); // Minutes in incrementen van 5
|
|
1303
|
+
this.selectedHour = null;
|
|
1304
|
+
this.selectedMinute = null;
|
|
1305
|
+
}
|
|
1306
|
+
spxSetFocus() {
|
|
1307
|
+
this.inputRef?.nativeElement?.focus();
|
|
1308
|
+
}
|
|
1309
|
+
componentDidLoad() {
|
|
1310
|
+
if (this.spxAutofocus) {
|
|
1311
|
+
this.spxFocus.emit();
|
|
1312
|
+
this.spxSetFocus();
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
handleBlur() {
|
|
1316
|
+
this.spxBlurFromChild.emit();
|
|
1317
|
+
}
|
|
1318
|
+
handleFocus() {
|
|
1319
|
+
this.spxFocus.emit();
|
|
1320
|
+
}
|
|
1321
|
+
handleDescriptionInput(event) {
|
|
1322
|
+
this.value = {
|
|
1323
|
+
description: event.target ? event.target.value : null,
|
|
1324
|
+
value: event.target ? event.target.value : null,
|
|
1325
|
+
};
|
|
1326
|
+
this.spxChange.emit(this.value);
|
|
1327
|
+
}
|
|
1328
|
+
handleSuggestionClick(value) {
|
|
1329
|
+
if (!this.spxReadonly) {
|
|
1330
|
+
this.value = value;
|
|
1331
|
+
this.spxChange.emit(this.value);
|
|
1332
|
+
this.spxFocused = false;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
handleKeyUp() {
|
|
1336
|
+
this.spxFocused = true;
|
|
1337
|
+
}
|
|
1338
|
+
async openDialog(view) {
|
|
1339
|
+
const modal = await this.modalController.create({
|
|
1340
|
+
component: SpxInputTimeModalComponent,
|
|
1341
|
+
componentProps: {
|
|
1342
|
+
value: this.value?.value ?
|
|
1343
|
+
(view === 'hours' ? DateTime.fromISO(this.value.value).hour : DateTime.fromISO(this.value.value).minute) : undefined,
|
|
1344
|
+
view,
|
|
1345
|
+
},
|
|
1346
|
+
});
|
|
1347
|
+
modal.onDidDismiss().then((data) => {
|
|
1348
|
+
// this.appStore.dispatch(infArticleActions.reset({}));
|
|
1349
|
+
if (view === 'hours') {
|
|
1350
|
+
// console.log('hours');
|
|
1351
|
+
// console.log(data);
|
|
1352
|
+
this.selectedHour = data.data;
|
|
1353
|
+
this.openDialog('minutes');
|
|
1354
|
+
this.updateValue();
|
|
1355
|
+
}
|
|
1356
|
+
else if (view === 'minutes') {
|
|
1357
|
+
// console.log('minutes');
|
|
1358
|
+
// console.log(data);
|
|
1359
|
+
this.selectedMinute = data.data;
|
|
1360
|
+
this.updateValue();
|
|
1361
|
+
}
|
|
1362
|
+
});
|
|
1363
|
+
await modal.present();
|
|
1364
|
+
}
|
|
1365
|
+
updateValue() {
|
|
1366
|
+
if (this.selectedHour !== null && this.selectedMinute !== null) {
|
|
1367
|
+
const formattedHour = this.selectedHour < 10 ? `0${this.selectedHour}` : this.selectedHour;
|
|
1368
|
+
const formattedMinute = this.selectedMinute < 10 ? `0${this.selectedMinute}` : this.selectedMinute;
|
|
1369
|
+
const newValue = `${formattedHour}:${formattedMinute}`;
|
|
1370
|
+
this.value = {
|
|
1371
|
+
description: newValue,
|
|
1372
|
+
value: newValue,
|
|
1373
|
+
};
|
|
1374
|
+
this.spxChange.emit(this.value);
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputTimeComponent, deps: [{ token: i1$1.ModalController }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1378
|
+
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" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: `<div class="relative text-black">
|
|
1379
|
+
<div class="flex items-center justify-around gap-3">
|
|
1380
|
+
<div class="grow rounded bg-gray-100 p-3 text-xl text-center font-bold" (click)="openDialog('hours')">{{ formattedHour ?? '--' }}</div>
|
|
1381
|
+
<div class="text-gray text-xl">:</div>
|
|
1382
|
+
<div class="grow rounded bg-gray-100 p-3 text-xl text-center font-bold" (click)="openDialog('minutes')">{{ formattedMinute ?? '--' }}</div>
|
|
1383
|
+
</div>
|
|
1384
|
+
</div>`, isInline: true, styles: [".custom-square.selected{background-color:#007bff;color:#fff;border-color:#007bff}.custom-bg{--background: #FFFFFF}\n"], dependencies: [{ kind: "ngmodule", type: IonicModule }] }); }
|
|
1385
|
+
}
|
|
1386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputTimeComponent, decorators: [{
|
|
1387
|
+
type: Component,
|
|
1388
|
+
args: [{ selector: 'spx-input-time', standalone: true, imports: [
|
|
1389
|
+
NgIf,
|
|
1390
|
+
NgFor,
|
|
1391
|
+
SpxButtonComponent,
|
|
1392
|
+
SpxDropdownComponent,
|
|
1393
|
+
IonicModule,
|
|
1394
|
+
], template: `<div class="relative text-black">
|
|
1395
|
+
<div class="flex items-center justify-around gap-3">
|
|
1396
|
+
<div class="grow rounded bg-gray-100 p-3 text-xl text-center font-bold" (click)="openDialog('hours')">{{ formattedHour ?? '--' }}</div>
|
|
1397
|
+
<div class="text-gray text-xl">:</div>
|
|
1398
|
+
<div class="grow rounded bg-gray-100 p-3 text-xl text-center font-bold" (click)="openDialog('minutes')">{{ formattedMinute ?? '--' }}</div>
|
|
1399
|
+
</div>
|
|
1400
|
+
</div>`, styles: [".custom-square.selected{background-color:#007bff;color:#fff;border-color:#007bff}.custom-bg{--background: #FFFFFF}\n"] }]
|
|
1401
|
+
}], ctorParameters: () => [{ type: i1$1.ModalController }], propDecorators: { spxName: [{
|
|
1402
|
+
type: Input
|
|
1403
|
+
}], spxAutofocus: [{
|
|
1404
|
+
type: Input
|
|
1405
|
+
}], spxInputMode: [{
|
|
1406
|
+
type: Input
|
|
1407
|
+
}], spxPattern: [{
|
|
1408
|
+
type: Input
|
|
1409
|
+
}], spxSuggestions: [{
|
|
1410
|
+
type: Input
|
|
1411
|
+
}], spxReadonly: [{
|
|
1412
|
+
type: Input
|
|
1413
|
+
}], spxValidators: [{
|
|
1414
|
+
type: Input
|
|
1415
|
+
}], spxCapitalize: [{
|
|
1416
|
+
type: Input
|
|
1417
|
+
}], spxFocused: [{
|
|
1418
|
+
type: Input
|
|
1419
|
+
}], spxType: [{
|
|
1420
|
+
type: Input
|
|
1421
|
+
}], value: [{
|
|
1422
|
+
type: Input
|
|
1423
|
+
}], spxBlurFromChild: [{
|
|
1424
|
+
type: Output
|
|
1425
|
+
}], spxChange: [{
|
|
1426
|
+
type: Output
|
|
1427
|
+
}], spxFocus: [{
|
|
1428
|
+
type: Output
|
|
1429
|
+
}], spxWasInternalUpdate: [{
|
|
1430
|
+
type: Input
|
|
1431
|
+
}], inputRef: [{
|
|
1432
|
+
type: ViewChild,
|
|
1433
|
+
args: ['input', { static: true }]
|
|
1434
|
+
}] } });
|
|
1435
|
+
|
|
1171
1436
|
class SpxInputComponent {
|
|
1172
1437
|
constructor() {
|
|
1173
1438
|
this.spxLabel = 'label';
|
|
@@ -1252,6 +1517,9 @@ class SpxInputComponent {
|
|
|
1252
1517
|
case SpxInputTypeEnum.radio:
|
|
1253
1518
|
this.radioInput?.spxFocusIn();
|
|
1254
1519
|
break;
|
|
1520
|
+
case SpxInputTypeEnum.time:
|
|
1521
|
+
this.timeInput?.spxSetFocus();
|
|
1522
|
+
break;
|
|
1255
1523
|
}
|
|
1256
1524
|
}
|
|
1257
1525
|
writeValue(value) {
|
|
@@ -1279,7 +1547,7 @@ class SpxInputComponent {
|
|
|
1279
1547
|
useExisting: SpxInputComponent,
|
|
1280
1548
|
multi: true
|
|
1281
1549
|
}
|
|
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
|
|
1550
|
+
], 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
1551
|
[spxFocused]="this.spxFocused"
|
|
1284
1552
|
[spxLabel]="this.spxLabel"
|
|
1285
1553
|
[spxReadonly]="this.spxReadonly"
|
|
@@ -1368,11 +1636,22 @@ class SpxInputComponent {
|
|
|
1368
1636
|
[spxValidators]="this.spxValidators"
|
|
1369
1637
|
[value]="this.value"
|
|
1370
1638
|
></spx-input-radio>
|
|
1639
|
+
<spx-input-time
|
|
1640
|
+
#timeInput
|
|
1641
|
+
*ngIf="this.spxType === 'time'"
|
|
1642
|
+
(spxChange)="this.handleChange($event)"
|
|
1643
|
+
(spxFocus)="this.handleFocus()"
|
|
1644
|
+
[spxFocused]="this.spxFocused"
|
|
1645
|
+
[spxName]="this.spxName"
|
|
1646
|
+
[spxReadonly]="this.spxReadonly"
|
|
1647
|
+
[spxValidators]="this.spxValidators"
|
|
1648
|
+
[value]="this.value"
|
|
1649
|
+
></spx-input-time>
|
|
1371
1650
|
</div>
|
|
1372
1651
|
<div validation-messages>
|
|
1373
1652
|
<ng-content></ng-content>
|
|
1374
1653
|
</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"] }] }); }
|
|
1654
|
+
</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
1655
|
}
|
|
1377
1656
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: SpxInputComponent, decorators: [{
|
|
1378
1657
|
type: Component,
|
|
@@ -1390,6 +1669,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
1390
1669
|
SpxInputNumberComponent,
|
|
1391
1670
|
SpxInputRadioComponent,
|
|
1392
1671
|
SpxInputTextComponent,
|
|
1672
|
+
SpxInputTimeComponent,
|
|
1393
1673
|
],
|
|
1394
1674
|
providers: [
|
|
1395
1675
|
{
|
|
@@ -1487,6 +1767,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
1487
1767
|
[spxValidators]="this.spxValidators"
|
|
1488
1768
|
[value]="this.value"
|
|
1489
1769
|
></spx-input-radio>
|
|
1770
|
+
<spx-input-time
|
|
1771
|
+
#timeInput
|
|
1772
|
+
*ngIf="this.spxType === 'time'"
|
|
1773
|
+
(spxChange)="this.handleChange($event)"
|
|
1774
|
+
(spxFocus)="this.handleFocus()"
|
|
1775
|
+
[spxFocused]="this.spxFocused"
|
|
1776
|
+
[spxName]="this.spxName"
|
|
1777
|
+
[spxReadonly]="this.spxReadonly"
|
|
1778
|
+
[spxValidators]="this.spxValidators"
|
|
1779
|
+
[value]="this.value"
|
|
1780
|
+
></spx-input-time>
|
|
1490
1781
|
</div>
|
|
1491
1782
|
<div validation-messages>
|
|
1492
1783
|
<ng-content></ng-content>
|
|
@@ -1564,6 +1855,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImpor
|
|
|
1564
1855
|
}], textInput: [{
|
|
1565
1856
|
type: ViewChild,
|
|
1566
1857
|
args: [SpxInputTextComponent]
|
|
1858
|
+
}], timeInput: [{
|
|
1859
|
+
type: ViewChild,
|
|
1860
|
+
args: [SpxInputTimeComponent]
|
|
1567
1861
|
}], radioInput: [{
|
|
1568
1862
|
type: ViewChild,
|
|
1569
1863
|
args: [SpxInputRadioComponent]
|