ca-components 1.3.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1993,6 +1993,12 @@ class InputErrorPipe {
1993
1993
  else if (value['fuelStoreCommonMessage']) {
1994
1994
  errorMessageValue = 'Already in use by other fuel stop.';
1995
1995
  }
1996
+ else if (value['fuelTransactionTruckNotLinkedMessage']) {
1997
+ errorMessageValue = 'Truck not Linked';
1998
+ }
1999
+ else if (value['fuelTransactionDriverNotLinkedMessage']) {
2000
+ errorMessageValue = 'Driver Not Linked';
2001
+ }
1996
2002
  else if (value['pattern']?.requiredPattern) {
1997
2003
  switch (inputName?.toLowerCase()) {
1998
2004
  case 'phone': {
@@ -14271,8 +14277,7 @@ class CaInputDatetimePickerComponent {
14271
14277
  }, 90);
14272
14278
  }
14273
14279
  selectLastOneAfterMouseUp() {
14274
- if (this.inputConfig.name ===
14275
- InputConfigNameStringEnum.DATE_PICKER_BANK_CARD) {
14280
+ if (this.inputConfig.name === InputConfigNameStringEnum.DATE_PICKER_BANK_CARD) {
14276
14281
  this.selectionInput = 1;
14277
14282
  this.span2.nativeElement.focus();
14278
14283
  this.setSpanSelection(this.span2.nativeElement);
@@ -14324,8 +14329,7 @@ class CaInputDatetimePickerComponent {
14324
14329
  isNumber(evt) {
14325
14330
  evt = evt ? evt : window.event;
14326
14331
  let charCode = evt.which ? evt.which : evt.keyCode;
14327
- return ((charCode >= 48 && charCode <= 57) ||
14328
- (charCode >= 96 && charCode <= 105));
14332
+ return ((charCode >= 48 && charCode <= 57) || (charCode >= 96 && charCode <= 105));
14329
14333
  }
14330
14334
  isNavigationKey(e) {
14331
14335
  const navigationKeys = [37, 38, 39, 40, 8, 9, 46]; // Arrow keys, Backspace, Tab, Delete
@@ -14442,9 +14446,7 @@ class CaInputDatetimePickerComponent {
14442
14446
  else {
14443
14447
  if (this.inputConfig.expiredDateInvalid &&
14444
14448
  moment(this.dateTimeInputDate).isBefore(moment())) {
14445
- this.superControl.control?.setErrors({
14446
- invalid: true,
14447
- }); // don't accept expired dates
14449
+ this.superControl.control?.setErrors({ invalid: true }); // don't accept expired dates
14448
14450
  }
14449
14451
  else {
14450
14452
  this.calendarService.dateChanged.next(this.dateTimeInputDate);
@@ -14508,8 +14510,7 @@ class CaInputDatetimePickerComponent {
14508
14510
  text = moment(new Date(date)).format('MM/DD/YY');
14509
14511
  dateFormat = text.split('/');
14510
14512
  }
14511
- else if (this.inputConfig.name ===
14512
- InputConfigNameStringEnum.DATE_PICKER_BANK_CARD) {
14513
+ else if (this.inputConfig.name === InputConfigNameStringEnum.DATE_PICKER_BANK_CARD) {
14513
14514
  text = moment(new Date(date)).format('MM/DD/YY');
14514
14515
  dateFormat = text.split('/');
14515
14516
  }
@@ -14548,11 +14549,9 @@ class CaInputDatetimePickerComponent {
14548
14549
  ? undefined
14549
14550
  : parseInt(this.span2.nativeElement.innerHTML);
14550
14551
  let span3Value;
14551
- if (this.inputConfig.name !==
14552
- InputConfigNameStringEnum.DATE_PICKER_BANK_CARD) {
14552
+ if (this.inputConfig.name !== InputConfigNameStringEnum.DATE_PICKER_BANK_CARD) {
14553
14553
  span3Value =
14554
- isNaN(this.span3.nativeElement.innerHTML) ||
14555
- this.newInputChanged
14554
+ isNaN(this.span3.nativeElement.innerHTML) || this.newInputChanged
14556
14555
  ? ''
14557
14556
  : parseInt(this.span3.nativeElement.innerHTML);
14558
14557
  }
@@ -14572,13 +14571,12 @@ class CaInputDatetimePickerComponent {
14572
14571
  this.selectSpanByTabIndex(1, true);
14573
14572
  }
14574
14573
  else {
14575
- this.dateTimeInputDate = new Date(this.dateTimeInputDate.setMonth(parseInt(this.span1.nativeElement.innerHTML +
14576
- parseInt(e.key)) - 1));
14574
+ this.dateTimeInputDate = new Date(this.dateTimeInputDate.setMonth(parseInt(this.span1.nativeElement.innerHTML + parseInt(e.key)) -
14575
+ 1));
14577
14576
  if (!final_value)
14578
14577
  this.span1.nativeElement.innerHTML = 'mm';
14579
14578
  else
14580
- this.span1.nativeElement.innerHTML = (this.span1.nativeElement.innerHTML +
14581
- parseInt(e.key)).slice(-2);
14579
+ this.span1.nativeElement.innerHTML = (this.span1.nativeElement.innerHTML + parseInt(e.key)).slice(-2);
14582
14580
  this.selectionInput = 1;
14583
14581
  this.selectSpanByTabIndex(1, true);
14584
14582
  }
@@ -14610,14 +14608,12 @@ class CaInputDatetimePickerComponent {
14610
14608
  this.selectSpanByTabIndex(2, true);
14611
14609
  }
14612
14610
  else {
14613
- this.dateTimeInputDate = new Date(this.dateTimeInputDate.setDate(parseInt(this.span2.nativeElement.innerHTML +
14614
- parseInt(e.key))));
14611
+ this.dateTimeInputDate = new Date(this.dateTimeInputDate.setDate(parseInt(this.span2.nativeElement.innerHTML + parseInt(e.key))));
14615
14612
  if (!final_value) {
14616
14613
  this.span2.nativeElement.innerHTML = 'dd';
14617
14614
  }
14618
14615
  else {
14619
- this.span2.nativeElement.innerHTML = (this.span2.nativeElement.innerHTML +
14620
- parseInt(e.key)).slice(-2);
14616
+ this.span2.nativeElement.innerHTML = (this.span2.nativeElement.innerHTML + parseInt(e.key)).slice(-2);
14621
14617
  }
14622
14618
  this.selectionInput = 2;
14623
14619
  this.selectSpanByTabIndex(2, true);
@@ -14658,8 +14654,7 @@ class CaInputDatetimePickerComponent {
14658
14654
  }
14659
14655
  }
14660
14656
  }
14661
- else if (this.inputConfig.name ===
14662
- InputConfigNameStringEnum.DATE_PICKER_BANK_CARD) {
14657
+ else if (this.inputConfig.name === InputConfigNameStringEnum.DATE_PICKER_BANK_CARD) {
14663
14658
  if (!this.selectionInput) {
14664
14659
  if (isRestart) {
14665
14660
  this.span1.nativeElement.innerHTML = 'mm';
@@ -14674,14 +14669,13 @@ class CaInputDatetimePickerComponent {
14674
14669
  this.selectSpanByTabIndex(1, true);
14675
14670
  }
14676
14671
  else {
14677
- this.dateTimeInputDate = new Date(this.dateTimeInputDate.setMonth(parseInt(this.span1.nativeElement.innerHTML +
14678
- parseInt(e.key)) - 1));
14672
+ this.dateTimeInputDate = new Date(this.dateTimeInputDate.setMonth(parseInt(this.span1.nativeElement.innerHTML + parseInt(e.key)) -
14673
+ 1));
14679
14674
  if (!final_value) {
14680
14675
  this.span1.nativeElement.innerHTML = 'mm';
14681
14676
  }
14682
14677
  else {
14683
- this.span1.nativeElement.innerHTML = (this.span1.nativeElement.innerHTML +
14684
- parseInt(e.key)).slice(-2);
14678
+ this.span1.nativeElement.innerHTML = (this.span1.nativeElement.innerHTML + parseInt(e.key)).slice(-2);
14685
14679
  }
14686
14680
  this.selectionInput = 1;
14687
14681
  this.selectSpanByTabIndex(1, true);
@@ -14774,16 +14768,14 @@ class CaInputDatetimePickerComponent {
14774
14768
  this.selectionInput = 0;
14775
14769
  const isUp = direction === 'up';
14776
14770
  const isDatePicker = this.inputConfig.name === InputConfigNameStringEnum.DATE_PICKER;
14777
- const isBankCardPicker = this.inputConfig.name ===
14778
- InputConfigNameStringEnum.DATE_PICKER_BANK_CARD;
14771
+ const isBankCardPicker = this.inputConfig.name === InputConfigNameStringEnum.DATE_PICKER_BANK_CARD;
14779
14772
  if (isDatePicker || isBankCardPicker)
14780
14773
  this.handleDatePickerInput(isUp, isDatePicker);
14781
14774
  else
14782
14775
  this.handleTimePickerInput(isUp);
14783
14776
  }
14784
14777
  moveSelectionRightOrTab(e) {
14785
- const isDatepickerBankCard = this.inputConfig.name ===
14786
- InputConfigNameStringEnum.DATE_PICKER_BANK_CARD;
14778
+ const isDatepickerBankCard = this.inputConfig.name === InputConfigNameStringEnum.DATE_PICKER_BANK_CARD;
14787
14779
  const maxIndex = isDatepickerBankCard ? 1 : 2;
14788
14780
  if (this.selectionInput < maxIndex && !e.shiftKey) {
14789
14781
  this.selectionInput += 1;