@acorex/components 16.19.17 → 16.19.19

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.
@@ -3863,7 +3863,7 @@ class AXDropdownComponent extends AXBaseDropdownComponent {
3863
3863
  }
3864
3864
  }
3865
3865
  }
3866
- dropdownWidth = "300px";
3866
+ dropdownWidth = '300px';
3867
3867
  overlayRef;
3868
3868
  templatePortal;
3869
3869
  constructor(cdr, ref, overlay, viewContainerRef) {
@@ -3875,7 +3875,10 @@ class AXDropdownComponent extends AXBaseDropdownComponent {
3875
3875
  }
3876
3876
  ngOnInit() {
3877
3877
  if (this.rtl == null) {
3878
- this.rtl = window.getComputedStyle(this.ref.nativeElement, null).getPropertyValue('direction') === 'rtl';
3878
+ this.rtl =
3879
+ window
3880
+ .getComputedStyle(this.ref.nativeElement, null)
3881
+ .getPropertyValue('direction') === 'rtl';
3879
3882
  }
3880
3883
  setTimeout(() => {
3881
3884
  this.ref.nativeElement.classList.add(this.rtl ? 'rtl' : 'ltr');
@@ -3884,11 +3887,14 @@ class AXDropdownComponent extends AXBaseDropdownComponent {
3884
3887
  }
3885
3888
  ngAfterViewInit() {
3886
3889
  setTimeout(() => {
3887
- if (this.endButtons && this.endButtons.nativeElement.childNodes.length !== 0) {
3890
+ if (this.endButtons &&
3891
+ this.endButtons.nativeElement.childNodes.length !== 0) {
3888
3892
  this.content.nativeElement.style.paddingInlineEnd = `${this.endButtons.nativeElement.clientWidth}px`;
3889
3893
  }
3890
3894
  if (this.fitParent == true) {
3891
- this.dropdownWidth = `${this.dropdownEL.nativeElement.offsetWidth}px`;
3895
+ this.dropdownWidth = `${this.dropdownEL.nativeElement.offsetWidth > 100
3896
+ ? this.dropdownEL.nativeElement.offsetWidth
3897
+ : 300}px`;
3892
3898
  }
3893
3899
  }, 5);
3894
3900
  }
@@ -3932,36 +3938,36 @@ class AXDropdownComponent extends AXBaseDropdownComponent {
3932
3938
  originX: 'start',
3933
3939
  originY: 'bottom',
3934
3940
  overlayX: 'start',
3935
- overlayY: 'top'
3941
+ overlayY: 'top',
3936
3942
  },
3937
3943
  {
3938
3944
  originX: 'start',
3939
3945
  originY: 'bottom',
3940
3946
  overlayX: 'start',
3941
- overlayY: 'bottom'
3947
+ overlayY: 'bottom',
3942
3948
  },
3943
3949
  {
3944
3950
  originX: 'end',
3945
3951
  originY: 'bottom',
3946
3952
  overlayX: 'end',
3947
- overlayY: 'top'
3953
+ overlayY: 'top',
3948
3954
  },
3949
3955
  {
3950
3956
  originX: 'end',
3951
3957
  originY: 'bottom',
3952
3958
  overlayX: 'end',
3953
- overlayY: 'bottom'
3954
- }
3959
+ overlayY: 'bottom',
3960
+ },
3955
3961
  ])
3956
3962
  .withPush(false);
3957
3963
  this.overlayRef = this.overlay.create({
3958
3964
  positionStrategy,
3959
3965
  //width: this.dropdownEL.nativeElement.clientWidth,
3960
3966
  scrollStrategy: this.overlay.scrollStrategies.reposition({
3961
- autoClose: true
3967
+ autoClose: true,
3962
3968
  }),
3963
3969
  hasBackdrop: true,
3964
- backdropClass: 'cdk-overlay-transparent-backdrop'
3970
+ backdropClass: 'cdk-overlay-transparent-backdrop',
3965
3971
  });
3966
3972
  this.overlayRef.setDirection(this.rtl ? 'rtl' : 'ltr');
3967
3973
  this.overlayRef.backdropClick().subscribe(() => this.close());
@@ -4165,6 +4171,9 @@ class AXDatePickerComponent extends AXValidatableComponent {
4165
4171
  return { year: y, month: m, day: d };
4166
4172
  }
4167
4173
  textChange(e) {
4174
+ if (this.setLoadingToClear) {
4175
+ return;
4176
+ }
4168
4177
  if (this.setLoading || !e.isUserChange) {
4169
4178
  return;
4170
4179
  }
@@ -4257,6 +4266,9 @@ class AXDatePickerComponent extends AXValidatableComponent {
4257
4266
  set value(v) {
4258
4267
  const oldValue = this._value;
4259
4268
  const old = this.value;
4269
+ if (this.setLoadingToClear) {
4270
+ return;
4271
+ }
4260
4272
  if (v) {
4261
4273
  this._value = new AXDateTime(v, this.type);
4262
4274
  }
@@ -4385,744 +4397,729 @@ class AXDatePickerComponent extends AXValidatableComponent {
4385
4397
  this.dropdown.toggle();
4386
4398
  });
4387
4399
  }
4400
+ setLoadingToClear = false;
4388
4401
  handleKeyPress(e) {
4389
- if (e.type == 'keydown' || e.type == 'keypress' || e.type == 'keyup') {
4390
- if (e.key === 'Delete') {
4391
- e.preventDefault();
4392
- }
4393
- if (e.key === 'Backspace') {
4394
- this.clear();
4395
- }
4396
- if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
4397
- if (this.input.input.nativeElement.selectionStart ||
4398
- this.input.input.nativeElement.selectionStart === 0) {
4399
- this.cursorPosition = this.input.input.nativeElement.selectionStart;
4400
- }
4401
- }
4402
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4403
- e.preventDefault();
4404
- e.stopPropagation();
4405
- }
4406
- }
4407
- const inputChar = String.fromCharCode(e.charCode);
4408
- if (this.text != undefined) {
4409
- const ind1 = this.text.charAt(0);
4410
- const ind2 = this.text.charAt(1);
4411
- const ind3 = this.text.charAt(2);
4412
- const ind4 = this.text.charAt(3);
4413
- const ind5 = this.text.charAt(4);
4414
- const ind6 = this.text.charAt(5);
4415
- const ind7 = this.text.charAt(6);
4416
- const ind8 = this.text.charAt(7);
4417
- const ind9 = this.text.charAt(8);
4418
- const ind10 = this.text.charAt(9);
4419
- switch (this.dateType) {
4420
- case this.yyyyMMdd:
4421
- if (e.type == 'keypress') {
4422
- this.handleClick();
4423
- if ((ind6 == '1' && ind7 == '_' && inputChar >= '3') ||
4424
- (((ind6 == '0' && ind7 == '_') ||
4425
- (ind9 == '0' && ind10 == '_')) &&
4426
- inputChar == '0')) {
4427
- e.preventDefault();
4428
- }
4429
- else if (ind9 == '3' && ind10 == '_') {
4430
- if (ind6 + ind7 <= '06' && inputChar >= '2') {
4431
- e.preventDefault();
4432
- }
4433
- else if (ind6 + ind7 > '06' && inputChar >= '1') {
4434
- e.preventDefault();
4435
- }
4436
- }
4437
- }
4438
- if (this.text.indexOf('_') === -1 && this.text !== '') {
4439
- if (e.type === 'keydown') {
4440
- if (e.key === 'ArrowUp') {
4441
- if (this.cursorPosition <= 4) {
4442
- this.text =
4443
- String(Number(ind1 + ind2 + ind3 + ind4) + 1) +
4444
- ind5 +
4445
- ind6 +
4446
- ind7 +
4447
- ind8 +
4448
- ind9 +
4449
- ind10;
4450
- }
4451
- if (this.cursorPosition >= 5 && this.cursorPosition <= 7) {
4452
- if (Number(ind6 + ind7) < 12) {
4453
- if (Number(ind6 + ind7) < 9) {
4454
- this.text =
4455
- ind1 +
4456
- ind2 +
4457
- ind3 +
4458
- ind4 +
4459
- ind5 +
4460
- '0' +
4461
- String(Number(ind6 + ind7) + 1) +
4462
- ind8 +
4463
- ind9 +
4464
- ind10;
4465
- }
4466
- else {
4467
- this.text =
4468
- ind1 +
4469
- ind2 +
4470
- ind3 +
4471
- ind4 +
4472
- ind5 +
4473
- String(Number(ind6 + ind7) + 1) +
4474
- ind8 +
4475
- ind9 +
4476
- ind10;
4477
- }
4478
- }
4479
- else {
4480
- this.text =
4481
- ind1 +
4482
- ind2 +
4483
- ind3 +
4484
- ind4 +
4485
- ind5 +
4486
- '01' +
4487
- ind8 +
4488
- ind9 +
4489
- ind10;
4490
- }
4491
- }
4492
- if (this.cursorPosition >= 8) {
4493
- if (Number(ind9 + ind10) < 31) {
4494
- if (Number(ind9 + ind10) < 9) {
4495
- this.text =
4496
- ind1 +
4497
- ind2 +
4498
- ind3 +
4499
- ind4 +
4500
- ind5 +
4501
- ind6 +
4502
- ind7 +
4503
- ind8 +
4504
- '0' +
4505
- String(Number(ind9 + ind10) + 1);
4506
- }
4507
- else {
4508
- this.text =
4509
- ind1 +
4510
- ind2 +
4511
- ind3 +
4512
- ind4 +
4513
- ind5 +
4514
- ind6 +
4515
- ind7 +
4516
- ind8 +
4517
- String(Number(ind9 + ind10) + 1);
4518
- }
4519
- }
4520
- else {
4521
- this.text =
4522
- ind1 +
4523
- ind2 +
4524
- ind3 +
4525
- ind4 +
4526
- ind5 +
4527
- ind6 +
4528
- ind7 +
4529
- ind8 +
4530
- '01';
4531
- }
4532
- }
4533
- // this.input.input.nativeElement.style.caretColor = 'transparent';
4534
- // setTimeout(() => {
4535
- // this.setCaret();
4536
- // e.preventDefault();
4537
- // this.input.input.nativeElement.style.caretColor = 'auto';
4538
- // }, 0);
4539
- // e.preventDefault();
4540
- }
4541
- else if (e.key === 'ArrowDown') {
4542
- if (this.cursorPosition <= 4) {
4543
- this.text =
4544
- String(Number(ind1 + ind2 + ind3 + ind4) - 1) +
4545
- ind5 +
4546
- ind6 +
4547
- ind7 +
4548
- ind8 +
4549
- ind9 +
4550
- ind10;
4551
- }
4552
- else if (this.cursorPosition > 4 &&
4553
- this.cursorPosition <= 7) {
4554
- if (Number(ind6 + ind7) > 1) {
4555
- if (Number(ind6 + ind7) < 11) {
4556
- this.text =
4557
- ind1 +
4558
- ind2 +
4559
- ind3 +
4560
- ind4 +
4561
- ind5 +
4562
- '0' +
4563
- String(Number(ind6 + ind7) - 1) +
4564
- ind8 +
4565
- ind9 +
4566
- ind10;
4567
- }
4568
- else {
4569
- this.text =
4570
- ind1 +
4571
- ind2 +
4572
- ind3 +
4573
- ind4 +
4574
- ind5 +
4575
- String(Number(ind6 + ind7) - 1) +
4576
- ind8 +
4577
- ind9 +
4578
- ind10;
4579
- }
4580
- }
4581
- else {
4582
- this.text =
4583
- ind1 +
4584
- ind2 +
4585
- ind3 +
4586
- ind4 +
4587
- ind5 +
4588
- '12' +
4589
- ind8 +
4590
- ind9 +
4591
- ind10;
4592
- }
4593
- }
4594
- else if (this.cursorPosition >= 8) {
4595
- if (Number(ind9 + ind10) > 1) {
4596
- if (Number(ind9 + ind10) < 11) {
4597
- this.text =
4598
- ind1 +
4599
- ind2 +
4600
- ind3 +
4601
- ind4 +
4602
- ind5 +
4603
- ind6 +
4604
- ind7 +
4605
- ind8 +
4606
- '0' +
4607
- String(Number(ind9 + ind10) - 1);
4608
- }
4609
- else {
4610
- this.text =
4611
- ind1 +
4612
- ind2 +
4613
- ind3 +
4614
- ind4 +
4615
- ind5 +
4616
- ind6 +
4617
- ind7 +
4618
- ind8 +
4619
- String(Number(ind9 + ind10) - 1);
4620
- }
4621
- }
4622
- else {
4623
- this.text =
4624
- ind1 +
4625
- ind2 +
4626
- ind3 +
4627
- ind4 +
4628
- ind5 +
4629
- ind6 +
4630
- ind7 +
4631
- ind8 +
4632
- '31';
4633
- }
4634
- }
4635
- // this.input.input.nativeElement.style.caretColor = 'transparent';
4636
- // setTimeout(() => {
4637
- // this.setCaret();
4638
- // this.input.input.nativeElement.style.caretColor = 'auto';
4639
- // }, 0);
4640
- }
4641
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4642
- this.input.input.nativeElement.style.caretColor = 'transparent';
4643
- e.preventDefault();
4644
- e.stopPropagation();
4645
- return false;
4646
- }
4647
- }
4648
- }
4649
- if (e.type === 'keyup') {
4650
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4651
- this.setCaret();
4652
- this.input.input.nativeElement.style.caretColor = 'auto';
4653
- e.preventDefault();
4654
- e.stopPropagation();
4655
- }
4656
- }
4657
- break;
4658
- case this.ddMMyyyy:
4659
- if (e.type === 'keypress') {
4660
- this.handleClick();
4661
- if ((ind4 == '1' && ind5 == '_' && inputChar >= '3') ||
4662
- (((ind1 == '0' && ind2 == '_') || (ind4 == '0' && ind5 == '_')) &&
4663
- inputChar == '0')) {
4664
- e.preventDefault();
4665
- }
4666
- else {
4667
- if (ind1 == '3' && ind2 == '_' && inputChar >= '2') {
4668
- e.preventDefault();
4669
- }
4670
- }
4671
- }
4672
- if (this.text.indexOf('_') === -1 && this.text !== '') {
4673
- if (e.type === 'keydown') {
4674
- if (e.key === 'ArrowUp') {
4675
- if (this.cursorPosition >= 6) {
4676
- this.text =
4677
- ind1 +
4678
- ind2 +
4679
- ind3 +
4680
- ind4 +
4681
- ind5 +
4682
- ind6 +
4683
- String(Number(ind7 + ind8 + ind9 + ind10) + 1);
4684
- }
4685
- if (this.cursorPosition > 2 && this.cursorPosition <= 5) {
4686
- if (Number(ind4 + ind5) < 12) {
4687
- if (Number(ind4 + ind5) < 9) {
4688
- this.text =
4689
- ind1 +
4690
- ind2 +
4691
- ind3 +
4692
- '0' +
4693
- String(Number(ind4 + ind5) + 1) +
4694
- ind6 +
4695
- ind7 +
4696
- ind8 +
4697
- ind9 +
4698
- ind10;
4699
- }
4700
- else {
4701
- this.text =
4702
- ind1 +
4703
- ind2 +
4704
- ind3 +
4705
- String(Number(ind4 + ind5) + 1) +
4706
- ind6 +
4707
- ind7 +
4708
- ind8 +
4709
- ind9 +
4710
- ind10;
4711
- }
4712
- }
4713
- else {
4714
- this.text =
4715
- ind1 +
4716
- ind2 +
4717
- ind3 +
4718
- '01' +
4719
- ind6 +
4720
- ind7 +
4721
- ind8 +
4722
- ind9 +
4723
- ind10;
4724
- }
4725
- }
4726
- if (this.cursorPosition <= 2) {
4727
- if (Number(ind1 + ind2) < 31) {
4728
- if (Number(ind1 + ind2) < 9) {
4729
- this.text =
4730
- '0' +
4731
- String(Number(ind1 + ind2) + 1) +
4732
- ind3 +
4733
- ind4 +
4734
- ind5 +
4735
- ind6 +
4736
- ind7 +
4737
- ind8 +
4738
- ind9 +
4739
- ind10;
4740
- }
4741
- else {
4742
- this.text =
4743
- String(Number(ind1 + ind2) + 1) +
4744
- ind3 +
4745
- ind4 +
4746
- ind5 +
4747
- ind6 +
4748
- ind7 +
4749
- ind8 +
4750
- ind9 +
4751
- ind10;
4752
- }
4753
- }
4754
- else {
4755
- this.text =
4756
- '01' +
4757
- ind3 +
4758
- ind4 +
4759
- ind5 +
4760
- ind6 +
4761
- ind7 +
4762
- ind8 +
4763
- ind9 +
4764
- ind10;
4765
- }
4766
- }
4767
- // this.input.input.nativeElement.style.caretColor = 'transparent';
4768
- // setTimeout(() => {
4769
- // this.setCaret();
4770
- // this.input.input.nativeElement.style.caretColor = 'auto';
4771
- // }, 0);
4772
- }
4773
- else if (e.key === 'ArrowDown') {
4774
- if (this.cursorPosition >= 6) {
4775
- this.text =
4776
- ind1 +
4777
- ind2 +
4778
- ind3 +
4779
- ind4 +
4780
- ind5 +
4781
- ind6 +
4782
- String(Number(ind7 + ind8 + ind9 + ind10) - 1);
4783
- }
4784
- else if (this.cursorPosition > 2 &&
4785
- this.cursorPosition <= 5) {
4786
- if (Number(ind4 + ind5) > 1) {
4787
- if (Number(ind4 + ind5) < 11) {
4788
- this.text =
4789
- ind1 +
4790
- ind2 +
4791
- ind3 +
4792
- '0' +
4793
- String(Number(ind4 + ind5) - 1) +
4794
- ind6 +
4795
- ind7 +
4796
- ind8 +
4797
- ind9 +
4798
- ind10;
4799
- }
4800
- else {
4801
- this.text =
4802
- ind1 +
4803
- ind2 +
4804
- ind3 +
4805
- String(Number(ind4 + ind5) - 1) +
4806
- ind6 +
4807
- ind7 +
4808
- ind8 +
4809
- ind9 +
4810
- ind10;
4811
- }
4812
- }
4813
- else {
4814
- this.text =
4815
- ind1 +
4816
- ind2 +
4817
- ind3 +
4818
- '12' +
4819
- ind6 +
4820
- ind7 +
4821
- ind8 +
4822
- ind9 +
4823
- ind10;
4824
- }
4825
- }
4826
- else if (this.cursorPosition <= 2) {
4827
- if (Number(ind1 + ind2) > 1) {
4828
- if (Number(ind1 + ind2) < 11) {
4829
- this.text =
4830
- '0' +
4831
- String(Number(ind1 + ind2) - 1) +
4832
- ind3 +
4833
- ind4 +
4834
- ind5 +
4835
- ind6 +
4836
- ind7 +
4837
- ind8 +
4838
- ind9 +
4839
- ind10;
4840
- }
4841
- else {
4842
- this.text =
4843
- String(Number(ind1 + ind2) - 1) +
4844
- ind3 +
4845
- ind4 +
4846
- ind5 +
4847
- ind6 +
4848
- ind7 +
4849
- ind8 +
4850
- ind9 +
4851
- ind10;
4852
- }
4853
- }
4854
- else {
4855
- this.text =
4856
- '31' +
4857
- ind3 +
4858
- ind4 +
4859
- ind5 +
4860
- ind6 +
4861
- ind7 +
4862
- ind8 +
4863
- ind9 +
4864
- ind10;
4865
- }
4866
- }
4867
- // this.input.input.nativeElement.style.caretColor = 'transparent';
4868
- // setTimeout(() => {
4869
- // this.setCaret();
4870
- // this.input.input.nativeElement.style.caretColor = 'auto';
4871
- // }, 0);
4872
- }
4873
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4874
- this.input.input.nativeElement.style.caretColor = 'transparent';
4875
- e.preventDefault();
4876
- e.stopPropagation();
4877
- return false;
4878
- }
4879
- }
4880
- }
4881
- if (e.type === 'keyup') {
4882
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4883
- this.setCaret();
4884
- this.input.input.nativeElement.style.caretColor = 'auto';
4885
- e.preventDefault();
4886
- e.stopPropagation();
4887
- }
4888
- }
4889
- break;
4890
- case this.MMddyyyy:
4891
- if (e.type === 'keypress') {
4892
- if ((ind9 === '1' && ind10 == '_' && inputChar >= '3') ||
4893
- (((ind6 == '0' && ind7 == '_') || (ind9 == '0' && ind10)) &&
4894
- inputChar == '0')) {
4895
- e.preventDefault();
4896
- }
4897
- else if (ind6 == '3' && ind7 == '_' && inputChar >= '2') {
4898
- e.preventDefault();
4899
- }
4900
- setTimeout(() => {
4901
- this.handleClick();
4902
- }, 0);
4903
- }
4904
- if (this.text.indexOf('_') === -1 && this.text !== '') {
4905
- if (e.type === 'keydown') {
4906
- if (e.key === 'ArrowUp') {
4907
- if (this.cursorPosition <= 4) {
4908
- this.text =
4909
- String(Number(ind1 + ind2 + ind3 + ind4) + 1) +
4910
- ind5 +
4911
- ind6 +
4912
- ind7 +
4913
- ind8 +
4914
- ind9 +
4915
- ind10;
4916
- }
4917
- if (this.cursorPosition > 4 && this.cursorPosition <= 7) {
4918
- if (Number(ind6 + ind7) < 31) {
4919
- if (Number(ind6 + ind7) < 9) {
4920
- this.text =
4921
- ind1 +
4922
- ind2 +
4923
- ind3 +
4924
- ind4 +
4925
- ind5 +
4926
- '0' +
4927
- String(Number(ind6 + ind7) + 1) +
4928
- ind8 +
4929
- ind9 +
4930
- ind10;
4931
- }
4932
- else {
4933
- this.text =
4934
- ind1 +
4935
- ind2 +
4936
- ind3 +
4937
- ind4 +
4938
- ind5 +
4939
- String(Number(ind6 + ind7) + 1) +
4940
- ind8 +
4941
- ind9 +
4942
- ind10;
4943
- }
4944
- }
4945
- else {
4946
- this.text =
4947
- ind1 +
4948
- ind2 +
4949
- ind3 +
4950
- ind4 +
4951
- ind5 +
4952
- '01' +
4953
- ind8 +
4954
- ind9 +
4955
- ind10;
4956
- }
4957
- }
4958
- if (this.cursorPosition >= 8) {
4959
- if (Number(ind9 + ind10) < 12) {
4960
- if (Number(ind9 + ind10) < 9) {
4961
- this.text =
4962
- ind1 +
4963
- ind2 +
4964
- ind3 +
4965
- ind4 +
4966
- ind5 +
4967
- ind6 +
4968
- ind7 +
4969
- ind8 +
4970
- '0' +
4971
- String(Number(ind9 + ind10) + 1);
4972
- }
4973
- else {
4974
- this.text =
4975
- ind1 +
4976
- ind2 +
4977
- ind3 +
4978
- ind4 +
4979
- ind5 +
4980
- ind6 +
4981
- ind7 +
4982
- ind8 +
4983
- String(Number(ind9 + ind10) + 1);
4984
- }
4985
- }
4986
- else {
4987
- this.text =
4988
- ind1 +
4989
- ind2 +
4990
- ind3 +
4991
- ind4 +
4992
- ind5 +
4993
- ind6 +
4994
- ind7 +
4995
- ind8 +
4996
- '01';
4997
- }
4998
- }
4999
- // this.input.input.nativeElement.style.caretColor = 'transparent';
5000
- // setTimeout(() => {
5001
- // this.setCaret();
5002
- // this.input.input.nativeElement.style.caretColor = 'auto';
5003
- // }, 0);
5004
- }
5005
- else if (e.key === 'ArrowDown') {
5006
- if (this.cursorPosition <= 4) {
5007
- this.text =
5008
- String(Number(ind1 + ind2 + ind3 + ind4) - 1) +
5009
- ind5 +
5010
- ind6 +
5011
- ind7 +
5012
- ind8 +
5013
- ind9 +
5014
- ind10;
5015
- }
5016
- else if (this.cursorPosition > 4 &&
5017
- this.cursorPosition <= 7) {
5018
- if (Number(ind6 + ind7) > 1) {
5019
- if (Number(ind6 + ind7) < 11) {
5020
- this.text =
5021
- ind1 +
5022
- ind2 +
5023
- ind3 +
5024
- ind4 +
5025
- ind5 +
5026
- '0' +
5027
- String(Number(ind6 + ind7) - 1) +
5028
- ind8 +
5029
- ind9 +
5030
- ind10;
5031
- }
5032
- else {
5033
- this.text =
5034
- ind1 +
5035
- ind2 +
5036
- ind3 +
5037
- ind4 +
5038
- ind5 +
5039
- String(Number(ind6 + ind7) - 1) +
5040
- ind8 +
5041
- ind9 +
5042
- ind10;
5043
- }
5044
- }
5045
- else {
5046
- this.text =
5047
- ind1 +
5048
- ind2 +
5049
- ind3 +
5050
- ind4 +
5051
- ind5 +
5052
- '31' +
5053
- ind8 +
5054
- ind9 +
5055
- ind10;
5056
- }
5057
- }
5058
- else if (this.cursorPosition >= 8) {
5059
- if (Number(ind9 + ind10) > 1) {
5060
- if (Number(ind9 + ind10) < 11) {
5061
- this.text =
5062
- ind1 +
5063
- ind2 +
5064
- ind3 +
5065
- ind4 +
5066
- ind5 +
5067
- ind6 +
5068
- ind7 +
5069
- ind8 +
5070
- '0' +
5071
- String(Number(ind9 + ind10) - 1);
5072
- }
5073
- else {
5074
- this.text =
5075
- ind1 +
5076
- ind2 +
5077
- ind3 +
5078
- ind4 +
5079
- ind5 +
5080
- ind6 +
5081
- ind7 +
5082
- ind8 +
5083
- String(Number(ind9 + ind10) - 1);
5084
- }
5085
- }
5086
- else {
5087
- this.text =
5088
- ind1 +
5089
- ind2 +
5090
- ind3 +
5091
- ind4 +
5092
- ind5 +
5093
- ind6 +
5094
- ind7 +
5095
- ind8 +
5096
- '12';
5097
- }
5098
- }
5099
- // this.input.input.nativeElement.style.caretColor = 'transparent';
5100
- // setTimeout(() => {
5101
- // this.setCaret();
5102
- // this.input.input.nativeElement.style.caretColor = 'auto';
5103
- // }, 0);
5104
- }
5105
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
5106
- this.input.input.nativeElement.style.caretColor = 'transparent';
5107
- e.preventDefault();
5108
- e.stopPropagation();
5109
- return false;
5110
- }
5111
- }
5112
- }
5113
- if (e.type === 'keyup') {
5114
- if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
5115
- this.setCaret();
5116
- this.input.input.nativeElement.style.caretColor = 'auto';
5117
- e.preventDefault();
5118
- e.stopPropagation();
5119
- }
5120
- }
5121
- break;
5122
- default:
5123
- break;
5124
- }
5125
- }
4402
+ if (e.key === 'Backspace' && e.type === 'keydown') {
4403
+ this.clearTextBox();
4404
+ this.setLoadingToClear = true;
4405
+ }
4406
+ // if (e.type == 'keydown' || e.type == 'keypress' || e.type == 'keyup') {
4407
+ // if (e.key === 'Delete') {
4408
+ // e.preventDefault();
4409
+ // }
4410
+ // if (e.key === 'Backspace') {
4411
+ // this.clear();
4412
+ // }
4413
+ // if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
4414
+ // if (
4415
+ // this.input.input.nativeElement.selectionStart ||
4416
+ // this.input.input.nativeElement.selectionStart === 0
4417
+ // ) {
4418
+ // this.cursorPosition = this.input.input.nativeElement.selectionStart;
4419
+ // }
4420
+ // }
4421
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4422
+ // e.preventDefault();
4423
+ // e.stopPropagation();
4424
+ // }
4425
+ // }
4426
+ // const inputChar = String.fromCharCode(e.charCode);
4427
+ // if (this.text != undefined) {
4428
+ // const ind1 = this.text.charAt(0);
4429
+ // const ind2 = this.text.charAt(1);
4430
+ // const ind3 = this.text.charAt(2);
4431
+ // const ind4 = this.text.charAt(3);
4432
+ // const ind5 = this.text.charAt(4);
4433
+ // const ind6 = this.text.charAt(5);
4434
+ // const ind7 = this.text.charAt(6);
4435
+ // const ind8 = this.text.charAt(7);
4436
+ // const ind9 = this.text.charAt(8);
4437
+ // const ind10 = this.text.charAt(9);
4438
+ // switch (this.dateType) {
4439
+ // case this.yyyyMMdd:
4440
+ // if (e.type == 'keypress') {
4441
+ // this.handleClick();
4442
+ // if (
4443
+ // (ind6 == '1' && ind7 == '_' && inputChar >= '3') ||
4444
+ // (((ind6 == '0' && ind7 == '_') ||
4445
+ // (ind9 == '0' && ind10 == '_')) &&
4446
+ // inputChar == '0')
4447
+ // ) {
4448
+ // e.preventDefault();
4449
+ // } else if (ind9 == '3' && ind10 == '_') {
4450
+ // if (ind6 + ind7 <= '06' && inputChar >= '2') {
4451
+ // e.preventDefault();
4452
+ // } else if (ind6 + ind7 > '06' && inputChar >= '1') {
4453
+ // e.preventDefault();
4454
+ // }
4455
+ // }
4456
+ // }
4457
+ // if (this.text.indexOf('_') === -1 && this.text !== '') {
4458
+ // if (e.type === 'keydown') {
4459
+ // if (e.key === 'ArrowUp') {
4460
+ // if (this.cursorPosition <= 4) {
4461
+ // this.text =
4462
+ // String(Number(ind1 + ind2 + ind3 + ind4) + 1) +
4463
+ // ind5 +
4464
+ // ind6 +
4465
+ // ind7 +
4466
+ // ind8 +
4467
+ // ind9 +
4468
+ // ind10;
4469
+ // }
4470
+ // if (this.cursorPosition >= 5 && this.cursorPosition <= 7) {
4471
+ // if (Number(ind6 + ind7) < 12) {
4472
+ // if (Number(ind6 + ind7) < 9) {
4473
+ // this.text =
4474
+ // ind1 +
4475
+ // ind2 +
4476
+ // ind3 +
4477
+ // ind4 +
4478
+ // ind5 +
4479
+ // '0' +
4480
+ // String(Number(ind6 + ind7) + 1) +
4481
+ // ind8 +
4482
+ // ind9 +
4483
+ // ind10;
4484
+ // } else {
4485
+ // this.text =
4486
+ // ind1 +
4487
+ // ind2 +
4488
+ // ind3 +
4489
+ // ind4 +
4490
+ // ind5 +
4491
+ // String(Number(ind6 + ind7) + 1) +
4492
+ // ind8 +
4493
+ // ind9 +
4494
+ // ind10;
4495
+ // }
4496
+ // } else {
4497
+ // this.text =
4498
+ // ind1 +
4499
+ // ind2 +
4500
+ // ind3 +
4501
+ // ind4 +
4502
+ // ind5 +
4503
+ // '01' +
4504
+ // ind8 +
4505
+ // ind9 +
4506
+ // ind10;
4507
+ // }
4508
+ // }
4509
+ // if (this.cursorPosition >= 8) {
4510
+ // if (Number(ind9 + ind10) < 31) {
4511
+ // if (Number(ind9 + ind10) < 9) {
4512
+ // this.text =
4513
+ // ind1 +
4514
+ // ind2 +
4515
+ // ind3 +
4516
+ // ind4 +
4517
+ // ind5 +
4518
+ // ind6 +
4519
+ // ind7 +
4520
+ // ind8 +
4521
+ // '0' +
4522
+ // String(Number(ind9 + ind10) + 1);
4523
+ // } else {
4524
+ // this.text =
4525
+ // ind1 +
4526
+ // ind2 +
4527
+ // ind3 +
4528
+ // ind4 +
4529
+ // ind5 +
4530
+ // ind6 +
4531
+ // ind7 +
4532
+ // ind8 +
4533
+ // String(Number(ind9 + ind10) + 1);
4534
+ // }
4535
+ // } else {
4536
+ // this.text =
4537
+ // ind1 +
4538
+ // ind2 +
4539
+ // ind3 +
4540
+ // ind4 +
4541
+ // ind5 +
4542
+ // ind6 +
4543
+ // ind7 +
4544
+ // ind8 +
4545
+ // '01';
4546
+ // }
4547
+ // }
4548
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4549
+ // // setTimeout(() => {
4550
+ // // this.setCaret();
4551
+ // // e.preventDefault();
4552
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
4553
+ // // }, 0);
4554
+ // // e.preventDefault();
4555
+ // } else if (e.key === 'ArrowDown') {
4556
+ // if (this.cursorPosition <= 4) {
4557
+ // this.text =
4558
+ // String(Number(ind1 + ind2 + ind3 + ind4) - 1) +
4559
+ // ind5 +
4560
+ // ind6 +
4561
+ // ind7 +
4562
+ // ind8 +
4563
+ // ind9 +
4564
+ // ind10;
4565
+ // } else if (
4566
+ // this.cursorPosition > 4 &&
4567
+ // this.cursorPosition <= 7
4568
+ // ) {
4569
+ // if (Number(ind6 + ind7) > 1) {
4570
+ // if (Number(ind6 + ind7) < 11) {
4571
+ // this.text =
4572
+ // ind1 +
4573
+ // ind2 +
4574
+ // ind3 +
4575
+ // ind4 +
4576
+ // ind5 +
4577
+ // '0' +
4578
+ // String(Number(ind6 + ind7) - 1) +
4579
+ // ind8 +
4580
+ // ind9 +
4581
+ // ind10;
4582
+ // } else {
4583
+ // this.text =
4584
+ // ind1 +
4585
+ // ind2 +
4586
+ // ind3 +
4587
+ // ind4 +
4588
+ // ind5 +
4589
+ // String(Number(ind6 + ind7) - 1) +
4590
+ // ind8 +
4591
+ // ind9 +
4592
+ // ind10;
4593
+ // }
4594
+ // } else {
4595
+ // this.text =
4596
+ // ind1 +
4597
+ // ind2 +
4598
+ // ind3 +
4599
+ // ind4 +
4600
+ // ind5 +
4601
+ // '12' +
4602
+ // ind8 +
4603
+ // ind9 +
4604
+ // ind10;
4605
+ // }
4606
+ // } else if (this.cursorPosition >= 8) {
4607
+ // if (Number(ind9 + ind10) > 1) {
4608
+ // if (Number(ind9 + ind10) < 11) {
4609
+ // this.text =
4610
+ // ind1 +
4611
+ // ind2 +
4612
+ // ind3 +
4613
+ // ind4 +
4614
+ // ind5 +
4615
+ // ind6 +
4616
+ // ind7 +
4617
+ // ind8 +
4618
+ // '0' +
4619
+ // String(Number(ind9 + ind10) - 1);
4620
+ // } else {
4621
+ // this.text =
4622
+ // ind1 +
4623
+ // ind2 +
4624
+ // ind3 +
4625
+ // ind4 +
4626
+ // ind5 +
4627
+ // ind6 +
4628
+ // ind7 +
4629
+ // ind8 +
4630
+ // String(Number(ind9 + ind10) - 1);
4631
+ // }
4632
+ // } else {
4633
+ // this.text =
4634
+ // ind1 +
4635
+ // ind2 +
4636
+ // ind3 +
4637
+ // ind4 +
4638
+ // ind5 +
4639
+ // ind6 +
4640
+ // ind7 +
4641
+ // ind8 +
4642
+ // '31';
4643
+ // }
4644
+ // }
4645
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4646
+ // // setTimeout(() => {
4647
+ // // this.setCaret();
4648
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
4649
+ // // }, 0);
4650
+ // }
4651
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4652
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
4653
+ // e.preventDefault();
4654
+ // e.stopPropagation();
4655
+ // return false;
4656
+ // }
4657
+ // }
4658
+ // }
4659
+ // if (e.type === 'keyup') {
4660
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4661
+ // this.setCaret();
4662
+ // this.input.input.nativeElement.style.caretColor = 'auto';
4663
+ // e.preventDefault();
4664
+ // e.stopPropagation();
4665
+ // }
4666
+ // }
4667
+ // break;
4668
+ // case this.ddMMyyyy:
4669
+ // if (e.type === 'keypress') {
4670
+ // this.handleClick();
4671
+ // if (
4672
+ // (ind4 == '1' && ind5 == '_' && inputChar >= '3') ||
4673
+ // (((ind1 == '0' && ind2 == '_') || (ind4 == '0' && ind5 == '_')) &&
4674
+ // inputChar == '0')
4675
+ // ) {
4676
+ // e.preventDefault();
4677
+ // } else {
4678
+ // if (ind1 == '3' && ind2 == '_' && inputChar >= '2') {
4679
+ // e.preventDefault();
4680
+ // }
4681
+ // }
4682
+ // }
4683
+ // if (this.text.indexOf('_') === -1 && this.text !== '') {
4684
+ // if (e.type === 'keydown') {
4685
+ // if (e.key === 'ArrowUp') {
4686
+ // if (this.cursorPosition >= 6) {
4687
+ // this.text =
4688
+ // ind1 +
4689
+ // ind2 +
4690
+ // ind3 +
4691
+ // ind4 +
4692
+ // ind5 +
4693
+ // ind6 +
4694
+ // String(Number(ind7 + ind8 + ind9 + ind10) + 1);
4695
+ // }
4696
+ // if (this.cursorPosition > 2 && this.cursorPosition <= 5) {
4697
+ // if (Number(ind4 + ind5) < 12) {
4698
+ // if (Number(ind4 + ind5) < 9) {
4699
+ // this.text =
4700
+ // ind1 +
4701
+ // ind2 +
4702
+ // ind3 +
4703
+ // '0' +
4704
+ // String(Number(ind4 + ind5) + 1) +
4705
+ // ind6 +
4706
+ // ind7 +
4707
+ // ind8 +
4708
+ // ind9 +
4709
+ // ind10;
4710
+ // } else {
4711
+ // this.text =
4712
+ // ind1 +
4713
+ // ind2 +
4714
+ // ind3 +
4715
+ // String(Number(ind4 + ind5) + 1) +
4716
+ // ind6 +
4717
+ // ind7 +
4718
+ // ind8 +
4719
+ // ind9 +
4720
+ // ind10;
4721
+ // }
4722
+ // } else {
4723
+ // this.text =
4724
+ // ind1 +
4725
+ // ind2 +
4726
+ // ind3 +
4727
+ // '01' +
4728
+ // ind6 +
4729
+ // ind7 +
4730
+ // ind8 +
4731
+ // ind9 +
4732
+ // ind10;
4733
+ // }
4734
+ // }
4735
+ // if (this.cursorPosition <= 2) {
4736
+ // if (Number(ind1 + ind2) < 31) {
4737
+ // if (Number(ind1 + ind2) < 9) {
4738
+ // this.text =
4739
+ // '0' +
4740
+ // String(Number(ind1 + ind2) + 1) +
4741
+ // ind3 +
4742
+ // ind4 +
4743
+ // ind5 +
4744
+ // ind6 +
4745
+ // ind7 +
4746
+ // ind8 +
4747
+ // ind9 +
4748
+ // ind10;
4749
+ // } else {
4750
+ // this.text =
4751
+ // String(Number(ind1 + ind2) + 1) +
4752
+ // ind3 +
4753
+ // ind4 +
4754
+ // ind5 +
4755
+ // ind6 +
4756
+ // ind7 +
4757
+ // ind8 +
4758
+ // ind9 +
4759
+ // ind10;
4760
+ // }
4761
+ // } else {
4762
+ // this.text =
4763
+ // '01' +
4764
+ // ind3 +
4765
+ // ind4 +
4766
+ // ind5 +
4767
+ // ind6 +
4768
+ // ind7 +
4769
+ // ind8 +
4770
+ // ind9 +
4771
+ // ind10;
4772
+ // }
4773
+ // }
4774
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4775
+ // // setTimeout(() => {
4776
+ // // this.setCaret();
4777
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
4778
+ // // }, 0);
4779
+ // } else if (e.key === 'ArrowDown') {
4780
+ // if (this.cursorPosition >= 6) {
4781
+ // this.text =
4782
+ // ind1 +
4783
+ // ind2 +
4784
+ // ind3 +
4785
+ // ind4 +
4786
+ // ind5 +
4787
+ // ind6 +
4788
+ // String(Number(ind7 + ind8 + ind9 + ind10) - 1);
4789
+ // } else if (
4790
+ // this.cursorPosition > 2 &&
4791
+ // this.cursorPosition <= 5
4792
+ // ) {
4793
+ // if (Number(ind4 + ind5) > 1) {
4794
+ // if (Number(ind4 + ind5) < 11) {
4795
+ // this.text =
4796
+ // ind1 +
4797
+ // ind2 +
4798
+ // ind3 +
4799
+ // '0' +
4800
+ // String(Number(ind4 + ind5) - 1) +
4801
+ // ind6 +
4802
+ // ind7 +
4803
+ // ind8 +
4804
+ // ind9 +
4805
+ // ind10;
4806
+ // } else {
4807
+ // this.text =
4808
+ // ind1 +
4809
+ // ind2 +
4810
+ // ind3 +
4811
+ // String(Number(ind4 + ind5) - 1) +
4812
+ // ind6 +
4813
+ // ind7 +
4814
+ // ind8 +
4815
+ // ind9 +
4816
+ // ind10;
4817
+ // }
4818
+ // } else {
4819
+ // this.text =
4820
+ // ind1 +
4821
+ // ind2 +
4822
+ // ind3 +
4823
+ // '12' +
4824
+ // ind6 +
4825
+ // ind7 +
4826
+ // ind8 +
4827
+ // ind9 +
4828
+ // ind10;
4829
+ // }
4830
+ // } else if (this.cursorPosition <= 2) {
4831
+ // if (Number(ind1 + ind2) > 1) {
4832
+ // if (Number(ind1 + ind2) < 11) {
4833
+ // this.text =
4834
+ // '0' +
4835
+ // String(Number(ind1 + ind2) - 1) +
4836
+ // ind3 +
4837
+ // ind4 +
4838
+ // ind5 +
4839
+ // ind6 +
4840
+ // ind7 +
4841
+ // ind8 +
4842
+ // ind9 +
4843
+ // ind10;
4844
+ // } else {
4845
+ // this.text =
4846
+ // String(Number(ind1 + ind2) - 1) +
4847
+ // ind3 +
4848
+ // ind4 +
4849
+ // ind5 +
4850
+ // ind6 +
4851
+ // ind7 +
4852
+ // ind8 +
4853
+ // ind9 +
4854
+ // ind10;
4855
+ // }
4856
+ // } else {
4857
+ // this.text =
4858
+ // '31' +
4859
+ // ind3 +
4860
+ // ind4 +
4861
+ // ind5 +
4862
+ // ind6 +
4863
+ // ind7 +
4864
+ // ind8 +
4865
+ // ind9 +
4866
+ // ind10;
4867
+ // }
4868
+ // }
4869
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4870
+ // // setTimeout(() => {
4871
+ // // this.setCaret();
4872
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
4873
+ // // }, 0);
4874
+ // }
4875
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4876
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
4877
+ // e.preventDefault();
4878
+ // e.stopPropagation();
4879
+ // return false;
4880
+ // }
4881
+ // }
4882
+ // }
4883
+ // if (e.type === 'keyup') {
4884
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
4885
+ // this.setCaret();
4886
+ // this.input.input.nativeElement.style.caretColor = 'auto';
4887
+ // e.preventDefault();
4888
+ // e.stopPropagation();
4889
+ // }
4890
+ // }
4891
+ // break;
4892
+ // case this.MMddyyyy:
4893
+ // if (e.type === 'keypress') {
4894
+ // if (
4895
+ // (ind9 === '1' && ind10 == '_' && inputChar >= '3') ||
4896
+ // (((ind6 == '0' && ind7 == '_') || (ind9 == '0' && ind10)) &&
4897
+ // inputChar == '0')
4898
+ // ) {
4899
+ // e.preventDefault();
4900
+ // } else if (ind6 == '3' && ind7 == '_' && inputChar >= '2') {
4901
+ // e.preventDefault();
4902
+ // }
4903
+ // setTimeout(() => {
4904
+ // this.handleClick();
4905
+ // }, 0);
4906
+ // }
4907
+ // if (this.text.indexOf('_') === -1 && this.text !== '') {
4908
+ // if (e.type === 'keydown') {
4909
+ // if (e.key === 'ArrowUp') {
4910
+ // if (this.cursorPosition <= 4) {
4911
+ // this.text =
4912
+ // String(Number(ind1 + ind2 + ind3 + ind4) + 1) +
4913
+ // ind5 +
4914
+ // ind6 +
4915
+ // ind7 +
4916
+ // ind8 +
4917
+ // ind9 +
4918
+ // ind10;
4919
+ // }
4920
+ // if (this.cursorPosition > 4 && this.cursorPosition <= 7) {
4921
+ // if (Number(ind6 + ind7) < 31) {
4922
+ // if (Number(ind6 + ind7) < 9) {
4923
+ // this.text =
4924
+ // ind1 +
4925
+ // ind2 +
4926
+ // ind3 +
4927
+ // ind4 +
4928
+ // ind5 +
4929
+ // '0' +
4930
+ // String(Number(ind6 + ind7) + 1) +
4931
+ // ind8 +
4932
+ // ind9 +
4933
+ // ind10;
4934
+ // } else {
4935
+ // this.text =
4936
+ // ind1 +
4937
+ // ind2 +
4938
+ // ind3 +
4939
+ // ind4 +
4940
+ // ind5 +
4941
+ // String(Number(ind6 + ind7) + 1) +
4942
+ // ind8 +
4943
+ // ind9 +
4944
+ // ind10;
4945
+ // }
4946
+ // } else {
4947
+ // this.text =
4948
+ // ind1 +
4949
+ // ind2 +
4950
+ // ind3 +
4951
+ // ind4 +
4952
+ // ind5 +
4953
+ // '01' +
4954
+ // ind8 +
4955
+ // ind9 +
4956
+ // ind10;
4957
+ // }
4958
+ // }
4959
+ // if (this.cursorPosition >= 8) {
4960
+ // if (Number(ind9 + ind10) < 12) {
4961
+ // if (Number(ind9 + ind10) < 9) {
4962
+ // this.text =
4963
+ // ind1 +
4964
+ // ind2 +
4965
+ // ind3 +
4966
+ // ind4 +
4967
+ // ind5 +
4968
+ // ind6 +
4969
+ // ind7 +
4970
+ // ind8 +
4971
+ // '0' +
4972
+ // String(Number(ind9 + ind10) + 1);
4973
+ // } else {
4974
+ // this.text =
4975
+ // ind1 +
4976
+ // ind2 +
4977
+ // ind3 +
4978
+ // ind4 +
4979
+ // ind5 +
4980
+ // ind6 +
4981
+ // ind7 +
4982
+ // ind8 +
4983
+ // String(Number(ind9 + ind10) + 1);
4984
+ // }
4985
+ // } else {
4986
+ // this.text =
4987
+ // ind1 +
4988
+ // ind2 +
4989
+ // ind3 +
4990
+ // ind4 +
4991
+ // ind5 +
4992
+ // ind6 +
4993
+ // ind7 +
4994
+ // ind8 +
4995
+ // '01';
4996
+ // }
4997
+ // }
4998
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
4999
+ // // setTimeout(() => {
5000
+ // // this.setCaret();
5001
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
5002
+ // // }, 0);
5003
+ // } else if (e.key === 'ArrowDown') {
5004
+ // if (this.cursorPosition <= 4) {
5005
+ // this.text =
5006
+ // String(Number(ind1 + ind2 + ind3 + ind4) - 1) +
5007
+ // ind5 +
5008
+ // ind6 +
5009
+ // ind7 +
5010
+ // ind8 +
5011
+ // ind9 +
5012
+ // ind10;
5013
+ // } else if (
5014
+ // this.cursorPosition > 4 &&
5015
+ // this.cursorPosition <= 7
5016
+ // ) {
5017
+ // if (Number(ind6 + ind7) > 1) {
5018
+ // if (Number(ind6 + ind7) < 11) {
5019
+ // this.text =
5020
+ // ind1 +
5021
+ // ind2 +
5022
+ // ind3 +
5023
+ // ind4 +
5024
+ // ind5 +
5025
+ // '0' +
5026
+ // String(Number(ind6 + ind7) - 1) +
5027
+ // ind8 +
5028
+ // ind9 +
5029
+ // ind10;
5030
+ // } else {
5031
+ // this.text =
5032
+ // ind1 +
5033
+ // ind2 +
5034
+ // ind3 +
5035
+ // ind4 +
5036
+ // ind5 +
5037
+ // String(Number(ind6 + ind7) - 1) +
5038
+ // ind8 +
5039
+ // ind9 +
5040
+ // ind10;
5041
+ // }
5042
+ // } else {
5043
+ // this.text =
5044
+ // ind1 +
5045
+ // ind2 +
5046
+ // ind3 +
5047
+ // ind4 +
5048
+ // ind5 +
5049
+ // '31' +
5050
+ // ind8 +
5051
+ // ind9 +
5052
+ // ind10;
5053
+ // }
5054
+ // } else if (this.cursorPosition >= 8) {
5055
+ // if (Number(ind9 + ind10) > 1) {
5056
+ // if (Number(ind9 + ind10) < 11) {
5057
+ // this.text =
5058
+ // ind1 +
5059
+ // ind2 +
5060
+ // ind3 +
5061
+ // ind4 +
5062
+ // ind5 +
5063
+ // ind6 +
5064
+ // ind7 +
5065
+ // ind8 +
5066
+ // '0' +
5067
+ // String(Number(ind9 + ind10) - 1);
5068
+ // } else {
5069
+ // this.text =
5070
+ // ind1 +
5071
+ // ind2 +
5072
+ // ind3 +
5073
+ // ind4 +
5074
+ // ind5 +
5075
+ // ind6 +
5076
+ // ind7 +
5077
+ // ind8 +
5078
+ // String(Number(ind9 + ind10) - 1);
5079
+ // }
5080
+ // } else {
5081
+ // this.text =
5082
+ // ind1 +
5083
+ // ind2 +
5084
+ // ind3 +
5085
+ // ind4 +
5086
+ // ind5 +
5087
+ // ind6 +
5088
+ // ind7 +
5089
+ // ind8 +
5090
+ // '12';
5091
+ // }
5092
+ // }
5093
+ // // this.input.input.nativeElement.style.caretColor = 'transparent';
5094
+ // // setTimeout(() => {
5095
+ // // this.setCaret();
5096
+ // // this.input.input.nativeElement.style.caretColor = 'auto';
5097
+ // // }, 0);
5098
+ // }
5099
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
5100
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
5101
+ // e.preventDefault();
5102
+ // e.stopPropagation();
5103
+ // return false;
5104
+ // }
5105
+ // }
5106
+ // }
5107
+ // if (e.type === 'keyup') {
5108
+ // if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
5109
+ // this.setCaret();
5110
+ // this.input.input.nativeElement.style.caretColor = 'auto';
5111
+ // e.preventDefault();
5112
+ // e.stopPropagation();
5113
+ // }
5114
+ // }
5115
+ // break;
5116
+ // default:
5117
+ // break;
5118
+ // }
5119
+ // }
5120
+ setTimeout(() => {
5121
+ this.setLoadingToClear = false;
5122
+ }, 1000);
5126
5123
  }
5127
5124
  handleClick() {
5128
5125
  if (this.input.input.nativeElement.selectionStart ||
@@ -5149,13 +5146,13 @@ class AXDatePickerComponent extends AXValidatableComponent {
5149
5146
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXDatePickerComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
5150
5147
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: AXDatePickerComponent, isStandalone: false, selector: "ax-date-picker", inputs: { dayStyle: { classPropertyName: "dayStyle", publicName: "dayStyle", isSignal: false, isRequired: false, transformFunction: null }, dayMinMaxResoan: { classPropertyName: "dayMinMaxResoan", publicName: "dayMinMaxResoan", isSignal: false, isRequired: false, transformFunction: null }, validation: { classPropertyName: "validation", publicName: "validation", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: false, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, allowClear: { classPropertyName: "allowClear", publicName: "allowClear", isSignal: false, isRequired: false, transformFunction: null }, textAlign: { classPropertyName: "textAlign", publicName: "textAlign", isSignal: false, isRequired: false, transformFunction: null }, showToday: { classPropertyName: "showToday", publicName: "showToday", isSignal: false, isRequired: false, transformFunction: null }, selectableHoliday: { classPropertyName: "selectableHoliday", publicName: "selectableHoliday", isSignal: false, isRequired: false, transformFunction: null }, dateType: { classPropertyName: "dateType", publicName: "dateType", isSignal: false, isRequired: false, transformFunction: null }, showTodayButton: { classPropertyName: "showTodayButton", publicName: "showTodayButton", isSignal: false, isRequired: false, transformFunction: null }, openByClick: { classPropertyName: "openByClick", publicName: "openByClick", isSignal: false, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { typeChange: "typeChange", onValueChanged: "onValueChanged", valueChange: "valueChange" }, host: { styleAttribute: "width: 100%" }, providers: [
5151
5148
  { provide: AXValidatableComponent, useExisting: AXDatePickerComponent },
5152
- ], queries: [{ propertyName: "_contentValidation", first: true, predicate: AXValidation, descendants: true, static: true }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }, { propertyName: "calendarRef", first: true, predicate: ["calendarRef"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-drop-down\n [readonly]=\"readonly\"\n [fitParent]=\"false\"\n [size]=\"size\"\n [showDropDownButton]=\"false\"\n icon=\"far fa-calendar-alt\"\n #dropdown\n maxHeight=\"unset\"\n>\n <ng-container start>\n <ng-content select=\"[start]\"> </ng-content>\n </ng-container>\n <ng-container header>\n <ax-text-box\n [mask]=\"dateType\"\n [showMask]=\"true\"\n #input\n [textAlign]=\"textAlign\"\n [value]=\"text\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [size]=\"size\"\n (onBlur)=\"handleInputBlur()\"\n (click)=\"handleClick()\"\n (onValueChanged)=\"textChange($event)\"\n ></ax-text-box>\n </ng-container>\n <ng-container panel>\n @if (_renderPicker) {\n <ax-calendar-box\n #calendarRef\n [showTodayButton]=\"showTodayButton\"\n [selectableHoliday]=\"selectableHoliday\"\n [min]=\"min()\"\n [max]=\"max()\"\n [size]=\"size\"\n (onClick)=\"onClick($event)\"\n (onValueChanged)=\"onDateChange($event)\"\n [type]=\"type\"\n [(value)]=\"calendarValue\"\n [dayStyle]=\"dayStyle\"\n [dayMinMaxResoan]=\"dayMinMaxResoan\"\n >\n </ax-calendar-box>\n }\n </ng-container>\n <ng-container end>\n <ax-button\n end\n *ngIf=\"allowClear && value\"\n [disabled]=\"disabled\"\n icon=\"far fa-times icon\"\n type=\"blank danger\"\n (click)=\"clearTextBox()\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n end\n icon=\"far fa-calendar-alt icon\"\n type=\"light blank\"\n (click)=\"handleButtonClick()\"\n [disabled]=\"disabled\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n ></ax-button>\n <ng-content select=\"[end]\"> </ng-content>\n </ng-container>\n</ax-drop-down>\n", styles: [".ax-dropdown-container-bordered .ax-calendar-container{border:none!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AXDropdownComponent, selector: "ax-drop-down", inputs: ["rtl", "readonly", "loading", "dropdownWidth"], outputs: ["dropdownToggle", "onButtonClick"] }, { kind: "component", type: AXCalendarBoxComponent, selector: "ax-calendar-box", inputs: ["size", "type", "locale", "dir", "min", "max", "selectableHoliday", "dayStyle", "dayMinMaxResoan", "showTodayButton", "view", "depth", "value"], outputs: ["onValueChanged", "onClick", "valueChange"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }, { kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions", "leadZeroDateTime"] }], encapsulation: i0.ViewEncapsulation.None });
5149
+ ], queries: [{ propertyName: "_contentValidation", first: true, predicate: AXValidation, descendants: true, static: true }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }, { propertyName: "calendarRef", first: true, predicate: ["calendarRef"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ax-drop-down\n [readonly]=\"readonly\"\n [fitParent]=\"false\"\n [size]=\"size\"\n [showDropDownButton]=\"false\"\n icon=\"far fa-calendar-alt\"\n #dropdown\n maxHeight=\"unset\"\n>\n <ng-container start>\n <ng-content select=\"[start]\"> </ng-content>\n </ng-container>\n <ng-container header>\n <ax-text-box\n [mask]=\"dateType\"\n [showMask]=\"true\"\n #input\n [textAlign]=\"textAlign\"\n [value]=\"text\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [size]=\"size\"\n (onkey)=\"handleKeyPress($event)\"\n (onBlur)=\"handleInputBlur()\"\n (click)=\"handleClick()\"\n (onValueChanged)=\"textChange($event)\"\n ></ax-text-box>\n </ng-container>\n <ng-container panel>\n @if (_renderPicker) {\n <ax-calendar-box\n #calendarRef\n [showTodayButton]=\"showTodayButton\"\n [selectableHoliday]=\"selectableHoliday\"\n [min]=\"min()\"\n [max]=\"max()\"\n [size]=\"size\"\n (onClick)=\"onClick($event)\"\n (onValueChanged)=\"onDateChange($event)\"\n [type]=\"type\"\n [(value)]=\"calendarValue\"\n [dayStyle]=\"dayStyle\"\n [dayMinMaxResoan]=\"dayMinMaxResoan\"\n >\n </ax-calendar-box>\n }\n </ng-container>\n <ng-container end>\n <ax-button\n end\n *ngIf=\"allowClear && value\"\n [disabled]=\"disabled\"\n icon=\"far fa-times icon\"\n type=\"blank danger\"\n (click)=\"clearTextBox()\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n end\n icon=\"far fa-calendar-alt icon\"\n type=\"light blank\"\n (click)=\"handleButtonClick()\"\n [disabled]=\"disabled\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n ></ax-button>\n <ng-content select=\"[end]\"> </ng-content>\n </ng-container>\n</ax-drop-down>\n", styles: [".ax-dropdown-container-bordered .ax-calendar-container{border:none!important}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AXDropdownComponent, selector: "ax-drop-down", inputs: ["rtl", "readonly", "loading", "dropdownWidth"], outputs: ["dropdownToggle", "onButtonClick"] }, { kind: "component", type: AXCalendarBoxComponent, selector: "ax-calendar-box", inputs: ["size", "type", "locale", "dir", "min", "max", "selectableHoliday", "dayStyle", "dayMinMaxResoan", "showTodayButton", "view", "depth", "value"], outputs: ["onValueChanged", "onClick", "valueChange"] }, { kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["type", "icon", "submitBehavior", "cancelBehavior", "block", "loading", "selected"] }, { kind: "component", type: AXTextBoxComponent, selector: "ax-text-box", inputs: ["mask", "showMask", "type", "maxLength", "maskGuid", "maskPlaceholder", "maskKeepCharPositions", "leadZeroDateTime"] }], encapsulation: i0.ViewEncapsulation.None });
5153
5150
  }
5154
5151
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXDatePickerComponent, decorators: [{
5155
5152
  type: Component,
5156
5153
  args: [{ selector: 'ax-date-picker', encapsulation: ViewEncapsulation.None, providers: [
5157
5154
  { provide: AXValidatableComponent, useExisting: AXDatePickerComponent },
5158
- ], host: { style: 'width: 100%' }, standalone: false, template: "<ax-drop-down\n [readonly]=\"readonly\"\n [fitParent]=\"false\"\n [size]=\"size\"\n [showDropDownButton]=\"false\"\n icon=\"far fa-calendar-alt\"\n #dropdown\n maxHeight=\"unset\"\n>\n <ng-container start>\n <ng-content select=\"[start]\"> </ng-content>\n </ng-container>\n <ng-container header>\n <ax-text-box\n [mask]=\"dateType\"\n [showMask]=\"true\"\n #input\n [textAlign]=\"textAlign\"\n [value]=\"text\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [size]=\"size\"\n (onBlur)=\"handleInputBlur()\"\n (click)=\"handleClick()\"\n (onValueChanged)=\"textChange($event)\"\n ></ax-text-box>\n </ng-container>\n <ng-container panel>\n @if (_renderPicker) {\n <ax-calendar-box\n #calendarRef\n [showTodayButton]=\"showTodayButton\"\n [selectableHoliday]=\"selectableHoliday\"\n [min]=\"min()\"\n [max]=\"max()\"\n [size]=\"size\"\n (onClick)=\"onClick($event)\"\n (onValueChanged)=\"onDateChange($event)\"\n [type]=\"type\"\n [(value)]=\"calendarValue\"\n [dayStyle]=\"dayStyle\"\n [dayMinMaxResoan]=\"dayMinMaxResoan\"\n >\n </ax-calendar-box>\n }\n </ng-container>\n <ng-container end>\n <ax-button\n end\n *ngIf=\"allowClear && value\"\n [disabled]=\"disabled\"\n icon=\"far fa-times icon\"\n type=\"blank danger\"\n (click)=\"clearTextBox()\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n end\n icon=\"far fa-calendar-alt icon\"\n type=\"light blank\"\n (click)=\"handleButtonClick()\"\n [disabled]=\"disabled\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n ></ax-button>\n <ng-content select=\"[end]\"> </ng-content>\n </ng-container>\n</ax-drop-down>\n", styles: [".ax-dropdown-container-bordered .ax-calendar-container{border:none!important}\n"] }]
5155
+ ], host: { style: 'width: 100%' }, standalone: false, template: "<ax-drop-down\n [readonly]=\"readonly\"\n [fitParent]=\"false\"\n [size]=\"size\"\n [showDropDownButton]=\"false\"\n icon=\"far fa-calendar-alt\"\n #dropdown\n maxHeight=\"unset\"\n>\n <ng-container start>\n <ng-content select=\"[start]\"> </ng-content>\n </ng-container>\n <ng-container header>\n <ax-text-box\n [mask]=\"dateType\"\n [showMask]=\"true\"\n #input\n [textAlign]=\"textAlign\"\n [value]=\"text\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [size]=\"size\"\n (onkey)=\"handleKeyPress($event)\"\n (onBlur)=\"handleInputBlur()\"\n (click)=\"handleClick()\"\n (onValueChanged)=\"textChange($event)\"\n ></ax-text-box>\n </ng-container>\n <ng-container panel>\n @if (_renderPicker) {\n <ax-calendar-box\n #calendarRef\n [showTodayButton]=\"showTodayButton\"\n [selectableHoliday]=\"selectableHoliday\"\n [min]=\"min()\"\n [max]=\"max()\"\n [size]=\"size\"\n (onClick)=\"onClick($event)\"\n (onValueChanged)=\"onDateChange($event)\"\n [type]=\"type\"\n [(value)]=\"calendarValue\"\n [dayStyle]=\"dayStyle\"\n [dayMinMaxResoan]=\"dayMinMaxResoan\"\n >\n </ax-calendar-box>\n }\n </ng-container>\n <ng-container end>\n <ax-button\n end\n *ngIf=\"allowClear && value\"\n [disabled]=\"disabled\"\n icon=\"far fa-times icon\"\n type=\"blank danger\"\n (click)=\"clearTextBox()\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n >\n </ax-button>\n <ax-button\n end\n icon=\"far fa-calendar-alt icon\"\n type=\"light blank\"\n (click)=\"handleButtonClick()\"\n [disabled]=\"disabled\"\n [size]=\"size\"\n [tabIndex]=\"-1\"\n ></ax-button>\n <ng-content select=\"[end]\"> </ng-content>\n </ng-container>\n</ax-drop-down>\n", styles: [".ax-dropdown-container-bordered .ax-calendar-container{border:none!important}\n"] }]
5159
5156
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { dropdown: [{
5160
5157
  type: ViewChild,
5161
5158
  args: ['dropdown', { static: true }]