ca-components 1.1.2 → 1.1.3

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.
@@ -11507,10 +11507,10 @@ class CaInputDropdownComponent {
11507
11507
  this._sort = value;
11508
11508
  }
11509
11509
  set activeItem(value) {
11510
- this.inputConfig = {
11511
- ...this.inputConfig,
11512
- blackInput: true,
11513
- };
11510
+ // this.inputConfig = {
11511
+ // ...this.inputConfig,
11512
+ // blackInput: true,
11513
+ // };
11514
11514
  this._activeItem = value;
11515
11515
  // With address
11516
11516
  if (this.inputConfig.name &&
@@ -11521,10 +11521,10 @@ class CaInputDropdownComponent {
11521
11521
  }
11522
11522
  if (!this.inputConfig.hideColorValidations) {
11523
11523
  this.clearTimeoutDropdown = setTimeout(() => {
11524
- this.inputConfig = {
11525
- ...this.inputConfig,
11526
- blackInput: false,
11527
- };
11524
+ // this.inputConfig = {
11525
+ // ...this.inputConfig,
11526
+ // blackInput: false,
11527
+ // };
11528
11528
  this.cdRef.detectChanges();
11529
11529
  }, 150);
11530
11530
  }
@@ -11539,10 +11539,10 @@ class CaInputDropdownComponent {
11539
11539
  ? value?.name
11540
11540
  : (value?.companyName ?? null));
11541
11541
  if (!this.inputConfig.hideColorValidations) {
11542
- this.inputConfig = {
11543
- ...this.inputConfig,
11544
- blackInput: false,
11545
- };
11542
+ // this.inputConfig = {
11543
+ // ...this.inputConfig,
11544
+ // blackInput: false,
11545
+ // };
11546
11546
  }
11547
11547
  this.cdRef.detectChanges();
11548
11548
  }, 150);
@@ -11688,10 +11688,10 @@ class CaInputDropdownComponent {
11688
11688
  else {
11689
11689
  // DropDown label
11690
11690
  if (this.inputConfig.dropdownLabel) {
11691
- this.inputConfig.dropdownLabelNew = true;
11691
+ // this.inputConfig.dropdownLabelNew = true;
11692
11692
  this.inputRef.isEditInput = true;
11693
11693
  this.selectedLabelMode.emit('Color');
11694
- this.inputConfig.commands.active = true;
11694
+ // this.inputConfig.commands!.active = true;
11695
11695
  // this.inputRef.setInputCursorAtTheEnd(
11696
11696
  // this.inputRef.inputElement.nativeElement
11697
11697
  // );
@@ -11706,7 +11706,7 @@ class CaInputDropdownComponent {
11706
11706
  // Pick the item
11707
11707
  else {
11708
11708
  console.log(1);
11709
- this.inputConfig.selectedDropdown = true;
11709
+ // this.inputConfig.selectedDropdown = true;
11710
11710
  // Dropdown labels option selected
11711
11711
  if (this.inputConfig.dropdownLabel) {
11712
11712
  console.log(122);
@@ -11766,13 +11766,13 @@ class CaInputDropdownComponent {
11766
11766
  this._options = this.originalOptions;
11767
11767
  this._activeItem = null;
11768
11768
  this.inputHoveredItem = -1;
11769
- this.inputConfig.selectedDropdown = false;
11769
+ //this.inputConfig.selectedDropdown = false;
11770
11770
  this.getSuperControl?.patchValue(null);
11771
- this.inputConfig = {
11772
- ...this.inputConfig,
11773
- placeholder: '',
11774
- dropdownImageInput: null,
11775
- };
11771
+ // this.inputConfig = {
11772
+ // ...this.inputConfig,
11773
+ // placeholder: '',
11774
+ // dropdownImageInput: null,
11775
+ // };
11776
11776
  this.selectedItem.emit(null);
11777
11777
  }
11778
11778
  clearDropdownLabel() {
@@ -11785,7 +11785,7 @@ class CaInputDropdownComponent {
11785
11785
  commandEvent(event) {
11786
11786
  if (event.action === 'Edit Input') {
11787
11787
  this.selectedLabelMode.emit('Color');
11788
- this.inputConfig.dropdownLabelNew = false;
11788
+ //this.inputConfig.dropdownLabelNew = false;
11789
11789
  }
11790
11790
  if (event.action === 'Toggle Dropdown') {
11791
11791
  this.popoverRef.toggle();
@@ -11812,7 +11812,7 @@ class CaInputDropdownComponent {
11812
11812
  id: parseInt(uuidv4()),
11813
11813
  name: this.getSuperControl.value,
11814
11814
  };
11815
- this.inputConfig.commands.active = false;
11815
+ //this.inputConfig.commands!.active = false;
11816
11816
  this.inputRef.isVisibleCommands = false;
11817
11817
  this.inputRef.isFocusInput = false;
11818
11818
  this.saveItem.emit({ data: this._activeItem, action: 'new' });
@@ -11940,21 +11940,21 @@ class CaInputDropdownComponent {
11940
11940
  }
11941
11941
  // Focus In
11942
11942
  else {
11943
- this.inputConfig = {
11944
- ...this.inputConfig,
11945
- placeholder: this.getSuperControl.value
11946
- ? this.getSuperControl.value
11947
- : this._activeItem?.name,
11948
- };
11943
+ // this.inputConfig = {
11944
+ // ...this.inputConfig,
11945
+ // placeholder: this.getSuperControl!.value
11946
+ // ? this.getSuperControl!.value
11947
+ // : this._activeItem?.name,
11948
+ // };
11949
11949
  this.getSuperControl.setValue(null);
11950
11950
  if (this.popoverRef) {
11951
11951
  this.popoverRef.close();
11952
11952
  }
11953
11953
  if (this.isInAddMode) {
11954
- this.inputConfig = {
11955
- ...this.inputConfig,
11956
- placeholder: '',
11957
- };
11954
+ // this.inputConfig = {
11955
+ // ...this.inputConfig,
11956
+ // placeholder: '',
11957
+ // };
11958
11958
  }
11959
11959
  }
11960
11960
  }
@@ -11983,11 +11983,11 @@ class CaInputDropdownComponent {
11983
11983
  }
11984
11984
  if (this.inputConfig.dropdownLabel) {
11985
11985
  this.getSuperControl?.setErrors(null);
11986
- this.inputConfig.dropdownLabelNew = false;
11987
- this.inputConfig.commands.active = false;
11988
- if (!this.inputConfig.hideColorValidations) {
11989
- this.inputConfig.blackInput = false;
11990
- }
11986
+ // this.inputConfig.dropdownLabelNew = false;
11987
+ // this.inputConfig.commands!.active = false;
11988
+ // if (!this.inputConfig.hideColorValidations) {
11989
+ // this.inputConfig.blackInput = false;
11990
+ // }
11991
11991
  this.inputRef.isFocusInput = false;
11992
11992
  this.inputRef.isEditInput = false;
11993
11993
  this.inputRef.inputElement.nativeElement.blur();
@@ -12056,7 +12056,7 @@ class CaInputDropdownComponent {
12056
12056
  // ---------------------------------- Multiselect Dropdown ----------------------------------
12057
12057
  onMultiselectSelect(option) {
12058
12058
  this.isMultiSelectInputFocus = false;
12059
- this.inputConfig.label = undefined;
12059
+ //this.inputConfig.label = undefined;
12060
12060
  if (this.multiselectItems.some((item) => item.id === option.id)) {
12061
12061
  return;
12062
12062
  }
@@ -12093,10 +12093,10 @@ class CaInputDropdownComponent {
12093
12093
  this.inputRef.isFocusInput = false;
12094
12094
  this.inputRef.inputElement.nativeElement.blur();
12095
12095
  }
12096
- this.inputConfig = {
12097
- ...this.inputConfig,
12098
- multiSelectDropdownActive: true,
12099
- };
12096
+ // this.inputConfig = {
12097
+ // ...this.inputConfig,
12098
+ // multiSelectDropdownActive: true,
12099
+ // };
12100
12100
  }
12101
12101
  removeMultiSelectItem(index) {
12102
12102
  this._options = this.originalOptions.map((item) => {
@@ -12112,12 +12112,12 @@ class CaInputDropdownComponent {
12112
12112
  this.originalOptions = this._options;
12113
12113
  this.multiselectItems.splice(index, 1);
12114
12114
  if (!this.multiselectItems.length) {
12115
- this.inputConfig = {
12116
- ...this.inputConfig,
12117
- multiSelectDropdownActive: undefined,
12118
- };
12115
+ // this.inputConfig = {
12116
+ // ...this.inputConfig,
12117
+ // multiSelectDropdownActive: undefined,
12118
+ // };
12119
12119
  this.lastActiveMultiselectItem = null;
12120
- this.inputConfig.label = this.multiSelectLabel;
12120
+ // this.inputConfig.label = this.multiSelectLabel;
12121
12121
  }
12122
12122
  else {
12123
12123
  this.lastActiveMultiselectItem = this._options
@@ -12130,13 +12130,13 @@ class CaInputDropdownComponent {
12130
12130
  }
12131
12131
  deleteAllMultiSelectItems(currentLabel) {
12132
12132
  this.multiselectItems = [];
12133
- this.inputConfig = {
12134
- ...this.inputConfig,
12135
- multiSelectDropdownActive: undefined,
12136
- };
12137
- this.inputConfig.label = currentLabel
12138
- ? currentLabel
12139
- : this.multiSelectLabel;
12133
+ // this.inputConfig = {
12134
+ // ...this.inputConfig,
12135
+ // multiSelectDropdownActive: undefined,
12136
+ // };
12137
+ // this.inputConfig.label = currentLabel
12138
+ // ? currentLabel
12139
+ // : this.multiSelectLabel;
12140
12140
  this._options = this._options.map((item) => {
12141
12141
  return {
12142
12142
  ...item,
@@ -12187,11 +12187,11 @@ class CaInputDropdownComponent {
12187
12187
  });
12188
12188
  this.clearTimeoutDropdown = setTimeout(() => {
12189
12189
  this.getSuperControl.setErrors(null);
12190
- this.inputConfig.dropdownLabelNew = false;
12191
- this.inputConfig.commands.active = false;
12192
- if (!this.inputConfig.hideColorValidations) {
12193
- this.inputConfig.blackInput = false;
12194
- }
12190
+ // this.inputConfig.dropdownLabelNew = false;
12191
+ // this.inputConfig.commands!.active = false;
12192
+ // if (!this.inputConfig.hideColorValidations) {
12193
+ // this.inputConfig.blackInput = false;
12194
+ // }
12195
12195
  this.inputRef.isFocusInput = false;
12196
12196
  this.inputRef.isEditInput = false;
12197
12197
  this.inputRef.inputElement.nativeElement.blur();
@@ -12203,14 +12203,14 @@ class CaInputDropdownComponent {
12203
12203
  if (this.inputConfig.dropdownLabel) {
12204
12204
  // DropDown label
12205
12205
  if (this.inputConfig.dropdownLabel) {
12206
- this.inputConfig.dropdownLabelNew = true;
12206
+ // this.inputConfig.dropdownLabelNew = true;
12207
12207
  this.inputRef.isEditInput = true;
12208
12208
  this.selectedLabelMode.emit('Color');
12209
- this.inputConfig.commands.active = true;
12209
+ //this.inputConfig.commands!.active = true;
12210
12210
  // this.inputRef.setInputCursorAtTheEnd(
12211
12211
  // this.inputRef.inputElement.nativeElement
12212
12212
  // );
12213
- this.inputConfig.blackInput = true;
12213
+ // this.inputConfig.blackInput = true;
12214
12214
  this.selectedItem.emit({
12215
12215
  id: 7655,
12216
12216
  name: DropdownStringEnum.ADD_NEW,
@@ -12385,13 +12385,13 @@ class CaInputDropdownComponent {
12385
12385
  }
12386
12386
  }
12387
12387
  if (['truck', 'trailer'].includes(this.inputConfig?.dropdownImageInput?.template)) {
12388
- this.inputConfig = {
12389
- ...this.inputConfig,
12390
- dropdownImageInput: {
12391
- ...this.inputConfig.dropdownImageInput,
12392
- remove: true,
12393
- },
12394
- };
12388
+ // this.inputConfig = {
12389
+ // ...this.inputConfig,
12390
+ // dropdownImageInput: {
12391
+ // ...this.inputConfig.dropdownImageInput!,
12392
+ // remove: true,
12393
+ // },
12394
+ // };
12395
12395
  }
12396
12396
  const emptyOptionsWihAddNew = this._options.length === 1 &&
12397
12397
  this._options[0].name === DropdownStringEnum.ADD_NEW;
@@ -12408,10 +12408,10 @@ class CaInputDropdownComponent {
12408
12408
  id: 7654,
12409
12409
  name: DropdownStringEnum.NO_RESULTS,
12410
12410
  });
12411
- this.inputConfig = {
12412
- ...this.inputConfig,
12413
- hideAllItemsInInputDropdown: true,
12414
- };
12411
+ // this.inputConfig = {
12412
+ // ...this.inputConfig,
12413
+ // hideAllItemsInInputDropdown: true,
12414
+ // };
12415
12415
  if ((this.inputConfig.name === 'Address' ||
12416
12416
  this.inputConfig.name === 'RoutingAddress') &&
12417
12417
  this.inputRef.isFocusInput) {
@@ -12422,18 +12422,18 @@ class CaInputDropdownComponent {
12422
12422
  else {
12423
12423
  this._options = this.originalOptions;
12424
12424
  if (['truck', 'trailer'].includes(this.inputConfig?.dropdownImageInput?.template)) {
12425
- this.inputConfig = {
12426
- ...this.inputConfig,
12427
- dropdownImageInput: {
12428
- ...this.inputConfig?.dropdownImageInput,
12429
- remove: false,
12430
- },
12431
- };
12425
+ // this.inputConfig = {
12426
+ // ...this.inputConfig,
12427
+ // dropdownImageInput: {
12428
+ // ...this.inputConfig?.dropdownImageInput!,
12429
+ // remove: false,
12430
+ // },
12431
+ // };
12432
12432
  }
12433
- this.inputConfig = {
12434
- ...this.inputConfig,
12435
- hideAllItemsInInputDropdown: false,
12436
- };
12433
+ // this.inputConfig = {
12434
+ // ...this.inputConfig,
12435
+ // hideAllItemsInInputDropdown: false,
12436
+ // };
12437
12437
  }
12438
12438
  }
12439
12439
  // Group Dropdown Items