@bpost/bp-address-auto-complete-by-component 1.1.22 → 1.1.23

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.
@@ -5213,35 +5213,25 @@ class LibAddressAutocompleteByComponentComponent {
5213
5213
  const box = this.selectedAddress?.hasOwnProperty('boxNumber');
5214
5214
  this.quitPrefillMode();
5215
5215
  if (event) {
5216
- if (street == true || this.autocompleteStreet.searchText.length > 0) {
5217
- this.clearInputEventEmitter.emit(InputNameType.STREET);
5218
- this.autocompleteStreet.searchText = '';
5216
+ if (street == true) {
5217
+ this.onClearInputEventEmitter(InputNameType.STREET);
5219
5218
  }
5220
- if (house == true || this.autocompleteStreetNb.searchText.length > 0) {
5221
- this.clearInputEventEmitter.emit(InputNameType.STREET_NUMBER);
5222
- this.autocompleteStreetNb.streetName = '';
5223
- this.autocompleteStreetNb.searchText = '';
5219
+ if (house == true) {
5220
+ this.onClearInputEventEmitter(InputNameType.STREET_NUMBER);
5224
5221
  }
5225
- if (box == true || this.autocompleteBoxNb.searchText.length > 0) {
5226
- this.clearInputEventEmitter.emit(InputNameType.BOX_NUMBER);
5227
- this.autocompleteBoxNb.searchText = '';
5228
- this.autocompleteBoxNb.streetNumber = '';
5222
+ if (box == true) {
5223
+ this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
5229
5224
  }
5230
5225
  }
5231
5226
  if (!event) {
5232
- if (street == true || this.autocompleteStreet.searchText.length > 0) {
5233
- this.clearInputEventEmitter.emit(InputNameType.STREET);
5234
- this.autocompleteStreet.searchText = '';
5227
+ if (street == true) {
5228
+ this.onClearInputEventEmitter(InputNameType.STREET);
5235
5229
  }
5236
- if (house == true || this.autocompleteStreetNb.searchText.length > 0) {
5237
- this.clearInputEventEmitter.emit(InputNameType.STREET_NUMBER);
5238
- this.autocompleteStreetNb.streetName = '';
5239
- this.autocompleteStreetNb.searchText = '';
5230
+ if (house == true) {
5231
+ this.onClearInputEventEmitter(InputNameType.STREET_NUMBER);
5240
5232
  }
5241
- if (box == true || this.autocompleteBoxNb.searchText.length > 0) {
5242
- this.clearInputEventEmitter.emit(InputNameType.BOX_NUMBER);
5243
- this.autocompleteBoxNb.searchText = '';
5244
- this.autocompleteBoxNb.streetNumber = '';
5233
+ if (box == true) {
5234
+ this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
5245
5235
  }
5246
5236
  }
5247
5237
  this.setAddress(null, 4);
@@ -5252,28 +5242,24 @@ class LibAddressAutocompleteByComponentComponent {
5252
5242
  const box = this.selectedAddress?.hasOwnProperty('boxNumber');
5253
5243
  this.quitPrefillMode();
5254
5244
  if (event) {
5255
- if (house == true || this.autocompleteStreetNb.searchText.length > 0) {
5256
- this.clearInputEventEmitter.emit(InputNameType.STREET_NUMBER);
5257
- this.autocompleteStreetNb.searchText = '';
5258
- this.autocompleteStreetNb.searchText = '';
5245
+ if (house == true) {
5246
+ this.onClearInputEventEmitter(InputNameType.STREET_NUMBER);
5259
5247
  }
5260
- if (box == true || this.autocompleteBoxNb.searchText.length > 0) {
5261
- this.clearInputEventEmitter.emit(InputNameType.BOX_NUMBER);
5262
- this.autocompleteBoxNb.searchText = '';
5263
- this.autocompleteBoxNb.streetNumber = '';
5248
+ // this.onClearInputEventEmitter(InputNameType.STREET_NUMBER);
5249
+ if (box == true) {
5250
+ this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
5264
5251
  }
5252
+ // this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
5265
5253
  }
5266
5254
  if (!event) {
5267
- if (house == true || this.autocompleteStreetNb.searchText.length > 0) {
5268
- this.clearInputEventEmitter.emit(InputNameType.STREET_NUMBER);
5269
- this.autocompleteStreetNb.searchText = '';
5270
- this.autocompleteStreetNb.searchText = '';
5255
+ if (house == true) {
5256
+ this.onClearInputEventEmitter(InputNameType.STREET_NUMBER);
5271
5257
  }
5272
- if (box == true || this.autocompleteBoxNb.searchText.length > 0) {
5273
- this.clearInputEventEmitter.emit(InputNameType.BOX_NUMBER);
5274
- this.autocompleteBoxNb.searchText = '';
5275
- this.autocompleteBoxNb.streetNumber = '';
5258
+ // this.onClearInputEventEmitter(InputNameType.STREET_NUMBER);
5259
+ if (box == true) {
5260
+ this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
5276
5261
  }
5262
+ // this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
5277
5263
  }
5278
5264
  this.autocompleteStreetNb.addressIsComplete = false;
5279
5265
  this.autocompleteStreetNb.streetName = '';
@@ -5284,13 +5270,13 @@ class LibAddressAutocompleteByComponentComponent {
5284
5270
  const box = this.selectedAddress?.hasOwnProperty('boxNumber');
5285
5271
  this.streetNumber = '';
5286
5272
  this.quitPrefillMode();
5287
- if (event && (box == true || this.autocompleteBoxNb.searchText.length > 0)) {
5288
- this.clearInputEventEmitter.emit(InputNameType.BOX_NUMBER);
5289
- this.autocompleteBoxNb.searchText = '';
5273
+ if (event) {
5274
+ if (box == true) {
5275
+ this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
5276
+ }
5290
5277
  }
5291
- if (!event && (box == true || this.autocompleteBoxNb.searchText.length > 0)) {
5292
- this.clearInputEventEmitter.emit(InputNameType.BOX_NUMBER);
5293
- this.autocompleteBoxNb.searchText = '';
5278
+ if (!event && box == true) {
5279
+ this.onClearInputEventEmitter(InputNameType.BOX_NUMBER);
5294
5280
  }
5295
5281
  this.autocompleteBoxNb.addressIsComplete = false;
5296
5282
  this.autocompleteBoxNb.streetNumber = '';