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

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