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