@acorex/components 16.20.11 → 16.20.13
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.
|
@@ -18,7 +18,7 @@ import { FormsModule } from '@angular/forms';
|
|
|
18
18
|
import moment from 'jalali-moment';
|
|
19
19
|
import * as i3 from 'ngx-mask';
|
|
20
20
|
import { NgxMaskDirective, NgxMaskPipe, provideNgxMask } from 'ngx-mask';
|
|
21
|
-
import { trigger, state,
|
|
21
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
22
22
|
import * as i4 from '@angular/cdk/a11y';
|
|
23
23
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
24
24
|
import { differenceBy, cloneDeep } from 'lodash-es';
|
|
@@ -384,6 +384,17 @@ class AXBaseTextComponent extends AXValidatableComponent {
|
|
|
384
384
|
this.value = e.target.value;
|
|
385
385
|
this.onkey.emit(e);
|
|
386
386
|
};
|
|
387
|
+
// Handle paste events (right-click paste)
|
|
388
|
+
this.input.nativeElement.onpaste = (e) => {
|
|
389
|
+
setTimeout(() => {
|
|
390
|
+
this.userChange = true;
|
|
391
|
+
this.value = e.target.value;
|
|
392
|
+
}, 0);
|
|
393
|
+
};
|
|
394
|
+
this.input.nativeElement.oninput = (e) => {
|
|
395
|
+
this.userChange = true;
|
|
396
|
+
this.value = e.target.value;
|
|
397
|
+
};
|
|
387
398
|
}
|
|
388
399
|
}
|
|
389
400
|
ngAfterContentInit() {
|
|
@@ -15339,35 +15350,14 @@ class AXTimePickerComponent extends AXBaseTextComponent {
|
|
|
15339
15350
|
this.input.nativeElement.focus();
|
|
15340
15351
|
}
|
|
15341
15352
|
handleInputBlur(e) {
|
|
15342
|
-
if (this.
|
|
15343
|
-
|
|
15344
|
-
|
|
15345
|
-
|
|
15346
|
-
|
|
15347
|
-
|
|
15348
|
-
|
|
15349
|
-
|
|
15350
|
-
case 'HH':
|
|
15351
|
-
this.textValue = '--';
|
|
15352
|
-
break;
|
|
15353
|
-
case 'hhmmss':
|
|
15354
|
-
this.textValue = '--:--:--';
|
|
15355
|
-
break;
|
|
15356
|
-
case 'hhmm':
|
|
15357
|
-
this.textValue = '--:--';
|
|
15358
|
-
break;
|
|
15359
|
-
case 'hh':
|
|
15360
|
-
this.textValue = '--';
|
|
15361
|
-
break;
|
|
15362
|
-
case 'hhmmssam':
|
|
15363
|
-
this.textValue = this.valueSam;
|
|
15364
|
-
break;
|
|
15365
|
-
case 'hhmmam':
|
|
15366
|
-
this.textValue = this.valueMam;
|
|
15367
|
-
break;
|
|
15368
|
-
case 'hham':
|
|
15369
|
-
this.textValue = this.valueHam;
|
|
15370
|
-
break;
|
|
15353
|
+
if (this.type === 'HHmm') {
|
|
15354
|
+
const v = this.textValue;
|
|
15355
|
+
if ((v && /^\d{2}[::](-|-_|__|--)$/.test(v)) || /^\d{2}:\D\D$/.test(v)) {
|
|
15356
|
+
const hour = Number(v.substring(0, 2));
|
|
15357
|
+
if (hour >= 0 && hour <= 23) {
|
|
15358
|
+
this.value = `${v.substring(0, 2)}:00`;
|
|
15359
|
+
return;
|
|
15360
|
+
}
|
|
15371
15361
|
}
|
|
15372
15362
|
}
|
|
15373
15363
|
}
|